gnu: Add maven-surefire-common.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017-2020 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
15 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
16 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
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)
37 #:use-module (guix hg-download)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module (guix utils)
41 #:use-module (guix build-system ant)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system trivial)
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)
49 #:use-module (gnu packages certs)
50 #:use-module (gnu packages cpio)
51 #:use-module (gnu packages cups)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages elf)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages gawk)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages gl)
58 #:use-module (gnu packages ghostscript) ;lcms
59 #:use-module (gnu packages gnome)
60 #:use-module (gnu packages groovy)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages guile)
63 #:use-module (gnu packages icu4c)
64 #:use-module (gnu packages image)
65 #:use-module (gnu packages java-compression)
66 #:use-module (gnu packages libffi)
67 #:use-module (gnu packages linux) ;alsa
68 #:use-module (gnu packages maths)
69 #:use-module (gnu packages maven)
70 #:use-module (gnu packages maven-parent-pom)
71 #:use-module (gnu packages nss)
72 #:use-module (gnu packages onc-rpc)
73 #:use-module (gnu packages web)
74 #:use-module (gnu packages wget)
75 #:use-module (gnu packages pkg-config)
76 #:use-module (gnu packages perl)
77 #:use-module (gnu packages popt)
78 #:use-module (gnu packages kerberos)
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages xorg)
81 #:use-module (gnu packages texinfo)
82 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
83 #:use-module (srfi srfi-11)
84 #:use-module (ice-9 match))
85
86 \f
87 ;;;
88 ;;; Java bootstrap toolchain.
89 ;;;
90
91 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
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.
102 ;;
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.
111
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
146 Tool for Language Recognition v3).")
147 (home-page "https://www.antlr3.org/")
148 (license license:bsd-3)))
149
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
165 defined in The Java Language Specification into the bytecoded instruction set
166 and binary format defined in The Java Virtual Machine Specification.")
167 (license license:ibmpl1.0)))
168
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
222 provides much faster startup times than the @command{java} command. The @command{drip}
223 script is intended to be a drop-in replacement for the @command{java} command,
224 only faster.")
225 (license license:epl1.0))))
226
227 ;; This is the last version of GNU Classpath that can be built without ECJ.
228 (define classpath-bootstrap
229 (package
230 (name "classpath")
231 (version "0.93")
232 (source (origin
233 (method url-fetch)
234 (uri (string-append "mirror://gnu/classpath/classpath-"
235 version ".tar.gz"))
236 (sha256
237 (base32
238 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
239 (patches (search-patches "classpath-aarch64-support.patch"))))
240 (build-system gnu-build-system)
241 (arguments
242 `(#:configure-flags
243 (list (string-append "JAVAC="
244 (assoc-ref %build-inputs "jikes")
245 "/bin/jikes")
246 "--disable-Werror"
247 "--disable-gmp"
248 "--disable-gtk-peer"
249 "--disable-gconf-peer"
250 "--disable-plugin"
251 "--disable-dssi"
252 "--disable-alsa"
253 "--disable-gjdoc")
254 #:phases
255 (modify-phases %standard-phases
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))
267 (add-after 'install 'install-data
268 (lambda _ (invoke "make" "install-data"))))))
269 (native-inputs
270 `(("jikes" ,jikes)
271 ("fastjar" ,fastjar)
272 ("libltdl" ,libltdl)
273 ("pkg-config" ,pkg-config)))
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
277 for use with runtimes, compilers and tools for the Java programming
278 language.")
279 ;; GPLv2 or later, with special linking exception.
280 (license license:gpl2+)))
281
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
285 (package
286 (name "jamvm")
287 (version "1.5.1")
288 (source (origin
289 (method url-fetch)
290 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
291 "JamVM%20" version "/jamvm-"
292 version ".tar.gz"))
293 (patches (search-patches "jamvm-arm.patch"))
294 (sha256
295 (base32
296 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
297 (snippet
298 '(begin
299 ;; Remove precompiled software.
300 (delete-file "lib/classes.zip")
301 #t))))
302 (build-system gnu-build-system)
303 (arguments
304 `(#:configure-flags
305 (list (string-append "--with-classpath-install-dir="
306 (assoc-ref %build-inputs "classpath"))
307 "--disable-int-caching"
308 "--enable-runtime-reloc-checks"
309 "--enable-ffi")))
310 (inputs
311 `(("classpath" ,classpath-bootstrap)
312 ("jikes" ,jikes)
313 ("libffi" ,libffi)
314 ("zip" ,zip)
315 ("zlib" ,zlib)))
316 (home-page "http://jamvm.sourceforge.net/")
317 (synopsis "Small Java Virtual Machine")
318 (description "JamVM is a Java Virtual Machine conforming to the JVM
319 specification edition 2 (blue book). It is extremely small. However, unlike
320 other small VMs it supports the full spec, including object finalisation and
321 JNI.")
322 (license license:gpl2+)))
323
324 (define ant-bootstrap
325 (package
326 (name "ant-bootstrap")
327 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
328 ;; are not supported. The 1.8.x series is the last to use only features
329 ;; supported by Jikes.
330 (version "1.8.4")
331 (source (origin
332 (method url-fetch)
333 (uri (string-append "mirror://apache/"
334 "ant/source/apache-ant-"
335 version "-src.tar.bz2"))
336 (sha256
337 (base32
338 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
339 (build-system gnu-build-system)
340 (arguments
341 `(#:imported-modules ((guix build syscalls)
342 ,@%gnu-build-system-modules)
343 #:modules ((srfi srfi-1)
344 (guix build gnu-build-system)
345 (guix build utils)
346 (guix build syscalls))
347 #:tests? #f ; no "check" target
348 #:phases
349 (modify-phases %standard-phases
350 (delete 'bootstrap)
351 (delete 'configure)
352 (replace 'build
353 (lambda* (#:key inputs #:allow-other-keys)
354 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
355 (setenv "JAVACMD"
356 (string-append (assoc-ref inputs "jamvm")
357 "/bin/jamvm"))
358 (setenv "JAVAC"
359 (string-append (assoc-ref inputs "jikes")
360 "/bin/jikes"))
361 (setenv "CLASSPATH"
362 (string-append (assoc-ref inputs "jamvm")
363 "/lib/rt.jar"))
364
365 ;; Ant complains if this file doesn't exist.
366 (setenv "HOME" "/tmp")
367 (with-output-to-file "/tmp/.ant.properties"
368 (lambda _ (display "")))
369
370 ;; Use jikes instead of javac for <javac ...> tags in build.xml
371 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
372
373 ;; jikes produces lots of warnings, but they are not very
374 ;; interesting, so we silence them.
375 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
376
377 ;; Without these JamVM options the build may freeze.
378 (substitute* "bootstrap.sh"
379 (("^\"\\$\\{JAVACMD\\}\" " m)
380 ,@(if (string-prefix? "armhf" (or (%current-system)
381 (%current-target-system)))
382 `((string-append m "-Xnocompact "))
383 `((string-append m "-Xnocompact -Xnoinlining ")))))
384
385 ;; Disable tests because we are bootstrapping and thus don't have
386 ;; any of the dependencies required to build and run the tests.
387 (substitute* "build.xml"
388 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
389 (invoke "bash" "bootstrap.sh"
390 (string-append "-Ddist.dir="
391 (assoc-ref %outputs "out")))))
392 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
393 (lambda* (#:key outputs #:allow-other-keys)
394 (define (repack-archive jar)
395 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
396 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
397 (with-directory-excursion dir
398 (invoke "unzip" jar))
399 (delete-file jar)
400 ;; XXX: copied from (gnu build install)
401 (for-each (lambda (file)
402 (let ((s (lstat file)))
403 (unless (eq? (stat:type s) 'symlink)
404 (utime file 0 0 0 0))))
405 (find-files dir #:directories? #t))
406 ;; It is important that the manifest appears first.
407 (with-directory-excursion dir
408 (let* ((files (find-files "." ".*" #:directories? #t))
409 ;; To ensure that the reference scanner can
410 ;; detect all store references in the jars
411 ;; we disable compression with the "-0" option.
412 (command (if (file-exists? manifest)
413 `("zip" "-0" "-X" ,jar ,manifest
414 ,@files)
415 `("zip" "-0" "-X" ,jar ,@files))))
416 (apply invoke command)))))
417 (for-each repack-archive
418 (find-files
419 (string-append (assoc-ref %outputs "out") "/lib")
420 "\\.jar$"))
421 #t))
422 (delete 'install))))
423 (native-inputs
424 `(("jikes" ,jikes)
425 ("jamvm" ,jamvm-1-bootstrap)
426 ("unzip" ,unzip)
427 ("zip" ,zip)))
428 (home-page "https://ant.apache.org")
429 (synopsis "Build tool for Java")
430 (description
431 "Ant is a platform-independent build tool for Java. It is similar to
432 make but is implemented using the Java language, requires the Java platform,
433 and is best suited to building Java projects. Ant uses XML to describe the
434 build process and its dependencies, whereas Make uses Makefile format.")
435 (license license:asl2.0)))
436
437 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
438 ;; compiler for Java 1.5.
439 (define ecj-bootstrap
440 (package
441 (name "ecj-bootstrap")
442 (version "3.2.2")
443 (source (origin
444 (method url-fetch)
445 (uri (string-append "http://archive.eclipse.org/eclipse/"
446 "downloads/drops/R-" version
447 "-200702121330/ecjsrc.zip"))
448 (sha256
449 (base32
450 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
451 ;; It would be so much easier if we could use the ant-build-system, but we
452 ;; cannot as we don't have ant at this point. We use ecj for
453 ;; bootstrapping the JDK.
454 (build-system gnu-build-system)
455 (arguments
456 `(#:modules ((guix build gnu-build-system)
457 (guix build utils)
458 (srfi srfi-1))
459 #:tests? #f ; there are no tests
460 #:phases
461 (modify-phases %standard-phases
462 (replace 'configure
463 (lambda* (#:key inputs #:allow-other-keys)
464 (setenv "CLASSPATH"
465 (string-join
466 (cons (string-append (assoc-ref inputs "jamvm")
467 "/lib/rt.jar")
468 (find-files (string-append
469 (assoc-ref inputs "ant-bootstrap")
470 "/lib")
471 "\\.jar$"))
472 ":"))
473 #t))
474 (replace 'build
475 (lambda* (#:key inputs #:allow-other-keys)
476 ;; The unpack phase enters the "org" directory by mistake.
477 (chdir "..")
478
479 ;; Create a simple manifest to make ecj executable.
480 (with-output-to-file "manifest"
481 (lambda _
482 (display "Manifest-Version: 1.0
483 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
484
485 ;; Compile it all!
486 (and (apply invoke "jikes"
487 (find-files "." "\\.java$"))
488 (invoke "fastjar" "cvfm"
489 "ecj-bootstrap.jar" "manifest" "."))))
490 (replace 'install
491 (lambda* (#:key outputs #:allow-other-keys)
492 (let ((share (string-append (assoc-ref outputs "out")
493 "/share/java/")))
494 (mkdir-p share)
495 (install-file "ecj-bootstrap.jar" share)
496 #t))))))
497 (native-inputs
498 `(("ant-bootstrap" ,ant-bootstrap)
499 ("unzip" ,unzip)
500 ("jikes" ,jikes)
501 ("jamvm" ,jamvm-1-bootstrap)
502 ("fastjar" ,fastjar)))
503 (home-page "https://eclipse.org")
504 (synopsis "Eclipse Java development tools core batch compiler")
505 (description "This package provides the Eclipse Java core batch compiler
506 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
507 requirement for all GNU Classpath releases after version 0.93.")
508 (license license:epl1.0)))
509
510 (define ecj-javac-wrapper
511 (package (inherit ecj-bootstrap)
512 (name "ecj-javac-wrapper")
513 (source #f)
514 (build-system trivial-build-system)
515 (arguments
516 `(#:modules ((guix build utils))
517 #:builder
518 (begin
519 (use-modules (guix build utils))
520 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
521 (target (string-append bin "/javac"))
522 (guile (string-append (assoc-ref %build-inputs "guile")
523 "/bin/guile"))
524 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
525 "/share/java/ecj-bootstrap.jar"))
526 (java (string-append (assoc-ref %build-inputs "jamvm")
527 "/bin/jamvm"))
528 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
529 "/share/classpath")))
530 (string-append jvmlib "/glibj.zip:"
531 jvmlib "/tools.zip"))))
532 (mkdir-p bin)
533 (with-output-to-file target
534 (lambda _
535 (format #t "#!~a --no-auto-compile\n!#\n" guile)
536 (write
537 `(begin (use-modules (ice-9 match)
538 (ice-9 receive)
539 (ice-9 hash-table)
540 (srfi srfi-1)
541 (srfi srfi-26))
542 (define defaults
543 '(("-bootclasspath" ,bootcp)
544 ("-source" "1.5")
545 ("-target" "1.5")
546 ("-cp" ".")))
547 (define (main args)
548 (let ((classpath (getenv "CLASSPATH")))
549 (setenv "CLASSPATH"
550 (string-join (list ,ecj
551 ,(string-append (assoc-ref %build-inputs "jamvm")
552 "/lib/rt.jar")
553 (or classpath ""))
554 ":")))
555 (receive (vm-args other-args)
556 ;; Separate VM arguments from arguments to ECJ.
557 (partition (cut string-prefix? "-J" <>)
558 (fold (lambda (default acc)
559 (if (member (first default) acc)
560 acc (append default acc)))
561 args defaults))
562 (apply system* ,java
563 (append
564 ;; Remove "-J" prefix
565 (map (cut string-drop <> 2) vm-args)
566 '("org.eclipse.jdt.internal.compiler.batch.Main")
567 (cons "-nowarn" other-args)))))
568 ;; Entry point
569 (let ((args (cdr (command-line))))
570 (if (null? args)
571 (format (current-error-port) "javac: no arguments given!\n")
572 (main args)))))))
573 (chmod target #o755)
574 #t))))
575 (native-inputs
576 `(("guile" ,guile-2.2)
577 ("ecj-bootstrap" ,ecj-bootstrap)
578 ("jamvm" ,jamvm-1-bootstrap)
579 ("classpath" ,classpath-bootstrap)))
580 (description "This package provides a wrapper around the @dfn{Eclipse
581 compiler for Java} (ecj) with a command line interface that is compatible with
582 the standard javac executable.")))
583
584 ;; The classpath-bootstrap was built without a virtual machine, so it does not
585 ;; provide a wrapper for javah. We cannot build the development version of
586 ;; Classpath without javah.
587 (define classpath-0.99
588 (package (inherit classpath-bootstrap)
589 (version "0.99")
590 (source (origin
591 (method url-fetch)
592 (uri (string-append "mirror://gnu/classpath/classpath-"
593 version ".tar.gz"))
594 (sha256
595 (base32
596 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
597 (patches (search-patches "classpath-aarch64-support.patch"))))
598 (arguments
599 `(#:configure-flags
600 (list (string-append "--with-ecj-jar="
601 (assoc-ref %build-inputs "ecj-bootstrap")
602 "/share/java/ecj-bootstrap.jar")
603 (string-append "JAVAC="
604 (assoc-ref %build-inputs "ecj-javac-wrapper")
605 "/bin/javac")
606 (string-append "JAVA="
607 (assoc-ref %build-inputs "jamvm")
608 "/bin/jamvm")
609 "GCJ_JAVAC_TRUE=no"
610 "ac_cv_prog_java_works=yes" ; trust me
611 "--disable-Werror"
612 "--disable-gmp"
613 "--disable-gtk-peer"
614 "--disable-gconf-peer"
615 "--disable-plugin"
616 "--disable-dssi"
617 "--disable-alsa"
618 "--disable-gjdoc")
619 #:phases
620 (modify-phases %standard-phases
621 (add-after 'install 'install-data
622 (lambda _ (invoke "make" "install-data"))))))
623 (native-inputs
624 `(("ecj-bootstrap" ,ecj-bootstrap)
625 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
626 ("fastjar" ,fastjar)
627 ("jamvm" ,jamvm-1-bootstrap)
628 ("classpath" ,classpath-bootstrap)
629 ("libltdl" ,libltdl)
630 ("pkg-config" ,pkg-config)))))
631
632 ;; We need this because classpath-bootstrap does not provide all of the tools
633 ;; we need to build classpath-devel.
634 (define classpath-jamvm-wrappers
635 (package (inherit classpath-0.99)
636 (name "classpath-jamvm-wrappers")
637 (source #f)
638 (build-system trivial-build-system)
639 (arguments
640 `(#:modules ((guix build utils))
641 #:builder
642 (begin
643 (use-modules (guix build utils))
644 (let* ((bash (assoc-ref %build-inputs "bash"))
645 (jamvm (assoc-ref %build-inputs "jamvm"))
646 (classpath (assoc-ref %build-inputs "classpath"))
647 (bin (string-append (assoc-ref %outputs "out")
648 "/bin/")))
649 (mkdir-p bin)
650 (for-each (lambda (tool)
651 (with-output-to-file (string-append bin tool)
652 (lambda _
653 ,@(if (string-prefix? "armhf" (or (%current-system)
654 (%current-target-system)))
655 `((format #t "#!~a/bin/sh
656 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
657 gnu.classpath.tools.~a.~a $@"
658 bash jamvm classpath tool
659 (if (string=? "native2ascii" tool)
660 "Native2ASCII" "Main")))
661 `((format #t "#!~a/bin/sh
662 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
663 gnu.classpath.tools.~a.~a $@"
664 bash jamvm classpath tool
665 (if (string=? "native2ascii" tool)
666 "Native2ASCII" "Main"))))))
667 (chmod (string-append bin tool) #o755))
668 (list "javah"
669 "rmic"
670 "rmid"
671 "orbd"
672 "rmiregistry"
673 "native2ascii"))
674 #t))))
675 (native-inputs
676 `(("bash" ,bash)
677 ("jamvm" ,jamvm-1-bootstrap)
678 ("classpath" ,classpath-0.99)))
679 (inputs '())
680 (synopsis "Executables from GNU Classpath")
681 (description "This package provides wrappers around the tools provided by
682 the GNU Classpath library. They are executed by the JamVM virtual
683 machine.")))
684
685 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
686 ;; then Classpath has gained much more support for Java 1.6.
687 (define-public classpath-devel
688 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
689 (revision "1"))
690 (package (inherit classpath-bootstrap)
691 (version (string-append "0.99-" revision "." (string-take commit 9)))
692 (source (origin
693 (method git-fetch)
694 (uri (git-reference
695 (url "https://git.savannah.gnu.org/git/classpath.git")
696 (commit commit)))
697 (file-name (string-append "classpath-" version "-checkout"))
698 (sha256
699 (base32
700 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
701 (arguments
702 `(#:make-flags
703 ;; Ensure that the initial heap size is smaller than the maximum
704 ;; size. By default only Xmx is set, which can lead to invalid
705 ;; memory settings on some machines with a lot of memory.
706 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
707 #:configure-flags
708 (list (string-append "--with-ecj-jar="
709 (assoc-ref %build-inputs "ecj-bootstrap")
710 "/share/java/ecj-bootstrap.jar")
711 (string-append "--with-javac="
712 (assoc-ref %build-inputs "ecj-javac-wrapper")
713 "/bin/javac")
714 (string-append "JAVA="
715 (assoc-ref %build-inputs "jamvm")
716 "/bin/jamvm")
717 "GCJ_JAVAC_TRUE=no"
718 "ac_cv_prog_java_works=yes" ; trust me
719 "--disable-Werror"
720 "--disable-gmp"
721 "--disable-gtk-peer"
722 "--disable-gconf-peer"
723 "--disable-plugin"
724 "--disable-dssi"
725 "--disable-alsa"
726 "--disable-gjdoc")
727 #:phases
728 (modify-phases %standard-phases
729 ;; XXX The bootstrap phase executes autogen.sh, which fails after
730 ;; complaining about the lack of gettext.
731 (replace 'bootstrap
732 (lambda _ (invoke "autoreconf" "-vif")))
733 (add-after 'unpack 'remove-unsupported-annotations
734 (lambda _
735 (substitute* (find-files "java" "\\.java$")
736 (("@Override") ""))
737 #t))
738 (add-after 'install 'install-data
739 (lambda _ (invoke "make" "install-data"))))))
740 (native-inputs
741 `(("autoconf" ,autoconf)
742 ("automake" ,automake)
743 ("libtool" ,libtool)
744 ("gettext" ,gettext-minimal)
745 ("texinfo" ,texinfo)
746 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
747 ("ecj-bootstrap" ,ecj-bootstrap)
748 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
749 ("fastjar" ,fastjar)
750 ("jamvm" ,jamvm-1-bootstrap)
751 ("libltdl" ,libltdl)
752 ("pkg-config" ,pkg-config))))))
753
754 (define jamvm
755 (package (inherit jamvm-1-bootstrap)
756 (version "2.0.0")
757 (source (origin
758 (method url-fetch)
759 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
760 "JamVM%20" version "/jamvm-"
761 version ".tar.gz"))
762 (sha256
763 (base32
764 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
765 (patches
766 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"))
767 (snippet
768 '(begin
769 ;; Remove precompiled software.
770 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
771 #t))))
772 (build-system gnu-build-system)
773 (arguments
774 `(#:configure-flags
775 (list (string-append "--with-classpath-install-dir="
776 (assoc-ref %build-inputs "classpath")))))
777 (inputs
778 `(("classpath" ,classpath-devel)
779 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
780 ("zip" ,zip)
781 ("zlib" ,zlib)))))
782
783 (define ecj-javac-wrapper-final
784 (package (inherit ecj-javac-wrapper)
785 (native-inputs
786 `(("guile" ,guile-2.2)
787 ("ecj-bootstrap" ,ecj-bootstrap)
788 ("jamvm" ,jamvm)
789 ("classpath" ,classpath-devel)))))
790
791 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
792 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
793 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
794 ;; which uses Java 6 only.
795 (define-public icedtea-6
796 (package
797 (name "icedtea")
798 (version "1.13.13")
799 (source (origin
800 (method url-fetch)
801 (uri (string-append
802 "http://icedtea.wildebeest.org/download/source/icedtea6-"
803 version ".tar.xz"))
804 (sha256
805 (base32
806 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
807 (modules '((guix build utils)))
808 (snippet
809 '(begin
810 (substitute* "Makefile.in"
811 ;; do not leak information about the build host
812 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
813 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
814 #t))))
815 (build-system gnu-build-system)
816 (outputs '("out" ; Java Runtime Environment
817 "jdk" ; Java Development Kit
818 "doc")) ; all documentation
819 (arguments
820 `(;; There are many failing tests and many are known to fail upstream.
821 #:tests? #f
822
823 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
824 ;; gremlin) doesn't support it yet, so skip this phase.
825 #:validate-runpath? #f
826
827 #:modules ((guix build utils)
828 (guix build gnu-build-system)
829 (srfi srfi-19))
830
831 #:configure-flags
832 `("--enable-bootstrap"
833 "--enable-nss"
834 "--without-rhino"
835 "--with-parallel-jobs"
836 "--disable-downloading"
837 "--disable-tests"
838 ,(string-append "--with-ecj="
839 (assoc-ref %build-inputs "ecj")
840 "/share/java/ecj-bootstrap.jar")
841 ,(string-append "--with-jar="
842 (assoc-ref %build-inputs "fastjar")
843 "/bin/fastjar")
844 ,(string-append "--with-jdk-home="
845 (assoc-ref %build-inputs "classpath"))
846 ,(string-append "--with-java="
847 (assoc-ref %build-inputs "jamvm")
848 "/bin/jamvm"))
849 #:phases
850 (modify-phases %standard-phases
851 (replace 'unpack
852 (lambda* (#:key source inputs #:allow-other-keys)
853 (invoke "tar" "xvf" source)
854 (chdir (string-append "icedtea6-" ,version))
855 (mkdir "openjdk")
856 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
857 ;; The convenient OpenJDK source bundle is no longer
858 ;; available for download, so we have to take the sources
859 ;; from the Mercurial repositories and change the Makefile
860 ;; to avoid tests for the OpenJDK zip archive.
861 (with-directory-excursion "openjdk"
862 (for-each (lambda (part)
863 (mkdir part)
864 (copy-recursively
865 (assoc-ref inputs
866 (string-append part "-src"))
867 part))
868 '("jdk" "corba"
869 "langtools" "jaxp" "jaxws")))
870 (with-directory-excursion "openjdk"
871 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
872 (rename-file "hg-checkout" "hotspot"))
873 (substitute* "patches/freetypeversion.patch"
874 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
875 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
876 (substitute* "Makefile.in"
877 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
878 "echo \"trust me\";")
879 ;; The contents of the bootstrap directory must be
880 ;; writeable but when copying from the store they are
881 ;; not.
882 (("mkdir -p lib/rt" line)
883 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
884 (invoke "chmod" "-R" "u+w" "openjdk")))
885 (add-after 'unpack 'use-classpath
886 (lambda* (#:key inputs #:allow-other-keys)
887 (let ((jvmlib (assoc-ref inputs "classpath"))
888 (jamvm (assoc-ref inputs "jamvm")))
889 ;; Classpath does not provide rt.jar.
890 (substitute* "Makefile.in"
891 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
892 (string-append jvmlib "/share/classpath/glibj.zip")))
893 ;; Make sure we can find all classes.
894 (setenv "CLASSPATH"
895 (string-append jvmlib "/share/classpath/glibj.zip:"
896 jvmlib "/share/classpath/tools.zip:"
897 jamvm "/lib/rt.jar"))
898 (setenv "JAVACFLAGS"
899 (string-append "-cp "
900 jvmlib "/share/classpath/glibj.zip:"
901 jvmlib "/share/classpath/tools.zip")))
902 #t))
903 (add-after 'unpack 'patch-patches
904 (lambda _
905 ;; shebang in patches so that they apply cleanly
906 (substitute* '("patches/jtreg-jrunscript.patch"
907 "patches/hotspot/hs23/drop_unlicensed_test.patch")
908 (("#!/bin/sh") (string-append "#!" (which "sh"))))
909 #t))
910 (add-after 'unpack 'patch-paths
911 (lambda* (#:key inputs #:allow-other-keys)
912 ;; buildtree.make generates shell scripts, so we need to replace
913 ;; the generated shebang
914 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
915 (("/bin/sh") (which "bash")))
916
917 (let ((corebin (string-append
918 (assoc-ref inputs "coreutils") "/bin/"))
919 (binbin (string-append
920 (assoc-ref inputs "binutils") "/bin/"))
921 (grepbin (string-append
922 (assoc-ref inputs "grep") "/bin/")))
923 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
924 "openjdk/corba/make/common/shared/Defs-linux.gmk")
925 (("UNIXCOMMAND_PATH = /bin/")
926 (string-append "UNIXCOMMAND_PATH = " corebin))
927 (("USRBIN_PATH = /usr/bin/")
928 (string-append "USRBIN_PATH = " corebin))
929 (("DEVTOOLS_PATH *= */usr/bin/")
930 (string-append "DEVTOOLS_PATH = " corebin))
931 (("COMPILER_PATH *= */usr/bin/")
932 (string-append "COMPILER_PATH = "
933 (assoc-ref inputs "gcc") "/bin/"))
934 (("DEF_OBJCOPY *=.*objcopy")
935 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
936
937 ;; fix path to alsa header
938 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
939 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
940 (string-append "ALSA_INCLUDE="
941 (assoc-ref inputs "alsa-lib")
942 "/include/alsa/version.h")))
943
944 ;; fix hard-coded utility paths
945 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
946 "openjdk/corba/make/common/shared/Defs-utils.gmk")
947 (("ECHO *=.*echo")
948 (string-append "ECHO = " (which "echo")))
949 (("^GREP *=.*grep")
950 (string-append "GREP = " (which "grep")))
951 (("EGREP *=.*egrep")
952 (string-append "EGREP = " (which "egrep")))
953 (("CPIO *=.*cpio")
954 (string-append "CPIO = " (which "cpio")))
955 (("READELF *=.*readelf")
956 (string-append "READELF = " (which "readelf")))
957 (("^ *AR *=.*ar")
958 (string-append "AR = " (which "ar")))
959 (("^ *TAR *=.*tar")
960 (string-append "TAR = " (which "tar")))
961 (("AS *=.*as")
962 (string-append "AS = " (which "as")))
963 (("LD *=.*ld")
964 (string-append "LD = " (which "ld")))
965 (("STRIP *=.*strip")
966 (string-append "STRIP = " (which "strip")))
967 (("NM *=.*nm")
968 (string-append "NM = " (which "nm")))
969 (("^SH *=.*sh")
970 (string-append "SH = " (which "bash")))
971 (("^FIND *=.*find")
972 (string-append "FIND = " (which "find")))
973 (("LDD *=.*ldd")
974 (string-append "LDD = " (which "ldd")))
975 (("NAWK *=.*(n|g)awk")
976 (string-append "NAWK = " (which "gawk")))
977 (("XARGS *=.*xargs")
978 (string-append "XARGS = " (which "xargs")))
979 (("UNZIP *=.*unzip")
980 (string-append "UNZIP = " (which "unzip")))
981 (("ZIPEXE *=.*zip")
982 (string-append "ZIPEXE = " (which "zip")))
983 (("SED *=.*sed")
984 (string-append "SED = " (which "sed"))))
985
986 ;; Some of these timestamps cause problems as they are more than
987 ;; 10 years ago, failing the build process.
988 (substitute*
989 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
990 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
991 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
992 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
993 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
994 #t)))
995 (add-before 'configure 'set-additional-paths
996 (lambda* (#:key inputs #:allow-other-keys)
997 (setenv "CPATH"
998 (string-append (assoc-ref inputs "libxrender")
999 "/include/X11/extensions" ":"
1000 (assoc-ref inputs "libxtst")
1001 "/include/X11/extensions" ":"
1002 (assoc-ref inputs "libxinerama")
1003 "/include/X11/extensions" ":"
1004 (or (getenv "CPATH") "")))
1005 (setenv "ALT_CUPS_HEADERS_PATH"
1006 (string-append (assoc-ref inputs "cups")
1007 "/include"))
1008 (setenv "ALT_FREETYPE_HEADERS_PATH"
1009 (string-append (assoc-ref inputs "freetype")
1010 "/include"))
1011 (setenv "ALT_FREETYPE_LIB_PATH"
1012 (string-append (assoc-ref inputs "freetype")
1013 "/lib"))
1014 #t))
1015 (add-before 'build 'disable-os-version-check
1016 ;; allow build on linux major version change
1017 (lambda _
1018 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1019 #t))
1020 (replace 'install
1021 (lambda* (#:key outputs #:allow-other-keys)
1022 (let ((doc (string-append (assoc-ref outputs "doc")
1023 "/share/doc/icedtea"))
1024 (jre (assoc-ref outputs "out"))
1025 (jdk (assoc-ref outputs "jdk")))
1026 (copy-recursively "openjdk.build/docs" doc)
1027 (copy-recursively "openjdk.build/j2re-image" jre)
1028 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1029 #t)))))
1030 (native-inputs
1031 `(("ant" ,ant-bootstrap)
1032 ("alsa-lib" ,alsa-lib)
1033 ("attr" ,attr)
1034 ("classpath" ,classpath-devel)
1035 ("coreutils" ,coreutils)
1036 ("cpio" ,cpio)
1037 ("cups" ,cups)
1038 ("ecj" ,ecj-bootstrap)
1039 ("ecj-javac" ,ecj-javac-wrapper-final)
1040 ("fastjar" ,fastjar)
1041 ("fontconfig" ,fontconfig)
1042 ("freetype" ,freetype)
1043 ("gtk" ,gtk+-2)
1044 ("gawk" ,gawk)
1045 ("giflib" ,giflib)
1046 ("grep" ,grep)
1047 ("jamvm" ,jamvm)
1048 ("lcms" ,lcms)
1049 ("libjpeg" ,libjpeg-turbo)
1050 ("libnsl" ,libnsl)
1051 ("libpng" ,libpng)
1052 ("libtool" ,libtool)
1053 ("libx11" ,libx11)
1054 ("libxcomposite" ,libxcomposite)
1055 ("libxi" ,libxi)
1056 ("libxinerama" ,libxinerama)
1057 ("libxrender" ,libxrender)
1058 ("libxslt" ,libxslt) ;for xsltproc
1059 ("libxt" ,libxt)
1060 ("libxtst" ,libxtst)
1061 ("mit-krb5" ,mit-krb5)
1062 ("nss" ,nss)
1063 ("nss-certs" ,nss-certs)
1064 ("perl" ,perl)
1065 ("pkg-config" ,pkg-config)
1066 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1067 ("unzip" ,unzip)
1068 ("wget" ,wget)
1069 ("which" ,which)
1070 ("zip" ,zip)
1071 ("zlib" ,zlib)
1072 ("openjdk-src"
1073 ,(origin
1074 (method hg-fetch)
1075 (uri (hg-reference
1076 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1077 (changeset "jdk6-b41")))
1078 (sha256
1079 (base32
1080 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1081 ("jdk-src"
1082 ,(origin
1083 (method hg-fetch)
1084 (uri (hg-reference
1085 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1086 (changeset "jdk6-b41")))
1087 (sha256
1088 (base32
1089 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1090 ("hotspot-src"
1091 ,(origin
1092 (method hg-fetch)
1093 (uri (hg-reference
1094 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1095 (changeset "jdk6-b41")))
1096 (sha256
1097 (base32
1098 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1099 (patches
1100 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
1101 ("corba-src"
1102 ,(origin
1103 (method hg-fetch)
1104 (uri (hg-reference
1105 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1106 (changeset "jdk6-b41")))
1107 (sha256
1108 (base32
1109 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1110 ("langtools-src"
1111 ,(origin
1112 (method hg-fetch)
1113 (uri (hg-reference
1114 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1115 (changeset "jdk6-b41")))
1116 (sha256
1117 (base32
1118 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1119 ("jaxp-src"
1120 ,(origin
1121 (method hg-fetch)
1122 (uri (hg-reference
1123 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1124 (changeset "jdk6-b41")))
1125 (sha256
1126 (base32
1127 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1128 ("jaxws-src"
1129 ,(origin
1130 (method hg-fetch)
1131 (uri (hg-reference
1132 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1133 (changeset "jdk6-b41")))
1134 (sha256
1135 (base32
1136 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1137 (home-page "http://icedtea.classpath.org")
1138 (synopsis "Java development kit")
1139 (description
1140 "This package provides the OpenJDK built with the IcedTea build harness.
1141 This version of the OpenJDK is no longer maintained and is only used for
1142 bootstrapping purposes.")
1143 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1144 ;; same license as both GNU Classpath and OpenJDK.
1145 (license license:gpl2+)))
1146
1147 (define-public icedtea-7
1148 (let* ((version "2.6.13")
1149 (drop (lambda (name hash)
1150 (origin
1151 (method url-fetch)
1152 (uri (string-append
1153 "http://icedtea.classpath.org/download/drops"
1154 "/icedtea7/" version "/" name ".tar.bz2"))
1155 (sha256 (base32 hash))))))
1156 (package
1157 (name "icedtea")
1158 (version version)
1159 (source (origin
1160 (method url-fetch)
1161 (uri (string-append
1162 "http://icedtea.wildebeest.org/download/source/icedtea-"
1163 version ".tar.xz"))
1164 (sha256
1165 (base32
1166 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1167 (modules '((guix build utils)))
1168 (snippet
1169 '(begin
1170 (substitute* "Makefile.in"
1171 ;; do not leak information about the build host
1172 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1173 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1174 #t))))
1175 (build-system gnu-build-system)
1176 (outputs '("out" ; Java Runtime Environment
1177 "jdk" ; Java Development Kit
1178 "doc")) ; all documentation
1179 (arguments
1180 `(;; There are many test failures. Some are known to
1181 ;; fail upstream, others relate to not having an X
1182 ;; server running at test time, yet others are a
1183 ;; complete mystery to me.
1184
1185 ;; hotspot: passed: 241; failed: 45; error: 2
1186 ;; langtools: passed: 1,934; failed: 26
1187 ;; jdk: unknown
1188 #:tests? #f
1189
1190 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1191 ;; gremlin) doesn't support it yet, so skip this phase.
1192 #:validate-runpath? #f
1193
1194 ;; Apparently, the C locale is needed for some of the tests.
1195 #:locale "C"
1196
1197 #:modules ((guix build utils)
1198 (guix build gnu-build-system)
1199 (ice-9 match)
1200 (ice-9 popen)
1201 (srfi srfi-19)
1202 (srfi srfi-26))
1203
1204 #:configure-flags
1205 ;; TODO: package pcsc and sctp, and add to inputs
1206 `("--disable-system-pcsc"
1207 "--disable-system-sctp"
1208 "--enable-bootstrap"
1209 "--enable-nss"
1210 "--without-rhino"
1211 "--disable-downloading"
1212 "--disable-tests" ;they are run in the check phase instead
1213 "--with-openjdk-src-dir=./openjdk.src"
1214 ,(string-append "--with-jdk-home="
1215 (assoc-ref %build-inputs "jdk")))
1216
1217 #:phases
1218 (modify-phases %standard-phases
1219 (replace 'unpack
1220 (lambda* (#:key source inputs #:allow-other-keys)
1221 (let ((target (string-append "icedtea-" ,version))
1222 (unpack (lambda* (name #:optional dir)
1223 (let ((dir (or dir
1224 (string-drop-right name 5))))
1225 (mkdir dir)
1226 (invoke "tar" "xvf"
1227 (assoc-ref inputs name)
1228 "-C" dir
1229 "--strip-components=1")))))
1230 (mkdir target)
1231 (invoke "tar" "xvf" source
1232 "-C" target "--strip-components=1")
1233 (chdir target)
1234 (unpack "openjdk-src" "openjdk.src")
1235 (with-directory-excursion "openjdk.src"
1236 (for-each unpack
1237 (filter (cut string-suffix? "-drop" <>)
1238 (map (match-lambda
1239 ((name . _) name))
1240 inputs))))
1241 #t)))
1242 (add-after 'unpack 'patch-bitrot
1243 (lambda _
1244 (substitute* '("patches/boot/revert-6973616.patch"
1245 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1246 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1247 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1248 ;; As of attr 2.4.48 this header is no longer
1249 ;; included. It is provided by the libc instead.
1250 (substitute* '("configure"
1251 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1252 (("attr/xattr.h") "sys/xattr.h"))
1253 #t))
1254 (add-after 'unpack 'fix-x11-extension-include-path
1255 (lambda* (#:key inputs #:allow-other-keys)
1256 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1257 (((string-append "\\$\\(firstword \\$\\(wildcard "
1258 "\\$\\(OPENWIN_HOME\\)"
1259 "/include/X11/extensions\\).*$"))
1260 (string-append (assoc-ref inputs "libxrender")
1261 "/include/X11/extensions"
1262 " -I" (assoc-ref inputs "libxtst")
1263 "/include/X11/extensions"
1264 " -I" (assoc-ref inputs "libxinerama")
1265 "/include/X11/extensions"))
1266 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1267 #t))
1268 (add-after 'unpack 'patch-paths
1269 (lambda _
1270 ;; buildtree.make generates shell scripts, so we need to replace
1271 ;; the generated shebang
1272 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1273 (("/bin/sh") (which "bash")))
1274
1275 (let ((corebin (string-append
1276 (assoc-ref %build-inputs "coreutils") "/bin/"))
1277 (binbin (string-append
1278 (assoc-ref %build-inputs "binutils") "/bin/"))
1279 (grepbin (string-append
1280 (assoc-ref %build-inputs "grep") "/bin/")))
1281 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1282 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1283 (("UNIXCOMMAND_PATH = /bin/")
1284 (string-append "UNIXCOMMAND_PATH = " corebin))
1285 (("USRBIN_PATH = /usr/bin/")
1286 (string-append "USRBIN_PATH = " corebin))
1287 (("DEVTOOLS_PATH *= */usr/bin/")
1288 (string-append "DEVTOOLS_PATH = " corebin))
1289 (("COMPILER_PATH *= */usr/bin/")
1290 (string-append "COMPILER_PATH = "
1291 (assoc-ref %build-inputs "gcc") "/bin/"))
1292 (("DEF_OBJCOPY *=.*objcopy")
1293 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1294
1295 ;; fix path to alsa header
1296 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1297 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1298 (string-append "ALSA_INCLUDE="
1299 (assoc-ref %build-inputs "alsa-lib")
1300 "/include/alsa/version.h")))
1301
1302 ;; fix hard-coded utility paths
1303 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1304 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1305 (("ECHO *=.*echo")
1306 (string-append "ECHO = " (which "echo")))
1307 (("^GREP *=.*grep")
1308 (string-append "GREP = " (which "grep")))
1309 (("EGREP *=.*egrep")
1310 (string-append "EGREP = " (which "egrep")))
1311 (("CPIO *=.*cpio")
1312 (string-append "CPIO = " (which "cpio")))
1313 (("READELF *=.*readelf")
1314 (string-append "READELF = " (which "readelf")))
1315 (("^ *AR *=.*ar")
1316 (string-append "AR = " (which "ar")))
1317 (("^ *TAR *=.*tar")
1318 (string-append "TAR = " (which "tar")))
1319 (("AS *=.*as")
1320 (string-append "AS = " (which "as")))
1321 (("LD *=.*ld")
1322 (string-append "LD = " (which "ld")))
1323 (("STRIP *=.*strip")
1324 (string-append "STRIP = " (which "strip")))
1325 (("NM *=.*nm")
1326 (string-append "NM = " (which "nm")))
1327 (("^SH *=.*sh")
1328 (string-append "SH = " (which "bash")))
1329 (("^FIND *=.*find")
1330 (string-append "FIND = " (which "find")))
1331 (("LDD *=.*ldd")
1332 (string-append "LDD = " (which "ldd")))
1333 (("NAWK *=.*(n|g)awk")
1334 (string-append "NAWK = " (which "gawk")))
1335 (("XARGS *=.*xargs")
1336 (string-append "XARGS = " (which "xargs")))
1337 (("UNZIP *=.*unzip")
1338 (string-append "UNZIP = " (which "unzip")))
1339 (("ZIPEXE *=.*zip")
1340 (string-append "ZIPEXE = " (which "zip")))
1341 (("SED *=.*sed")
1342 (string-append "SED = " (which "sed"))))
1343
1344 ;; Some of these timestamps cause problems as they are more than
1345 ;; 10 years ago, failing the build process.
1346 (substitute*
1347 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1348 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1349 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1350 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1351 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1352 #t))
1353 (add-before 'configure 'set-additional-paths
1354 (lambda* (#:key inputs #:allow-other-keys)
1355 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1356 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1357 (string-append "ALSA_INCLUDE="
1358 (assoc-ref inputs "alsa-lib")
1359 "/include/alsa/version.h")))
1360 (setenv "CC" "gcc")
1361 (setenv "CPATH"
1362 (string-append (assoc-ref inputs "libxcomposite")
1363 "/include/X11/extensions" ":"
1364 (assoc-ref inputs "libxrender")
1365 "/include/X11/extensions" ":"
1366 (assoc-ref inputs "libxtst")
1367 "/include/X11/extensions" ":"
1368 (assoc-ref inputs "libxinerama")
1369 "/include/X11/extensions" ":"
1370 (or (getenv "CPATH") "")))
1371 (setenv "ALT_OBJCOPY" (which "objcopy"))
1372 (setenv "ALT_CUPS_HEADERS_PATH"
1373 (string-append (assoc-ref inputs "cups")
1374 "/include"))
1375 (setenv "ALT_FREETYPE_HEADERS_PATH"
1376 (string-append (assoc-ref inputs "freetype")
1377 "/include"))
1378 (setenv "ALT_FREETYPE_LIB_PATH"
1379 (string-append (assoc-ref inputs "freetype")
1380 "/lib"))
1381 #t))
1382 (add-before 'build 'disable-os-version-check
1383 ;; allow build on linux major version change
1384 (lambda _
1385 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1386 #t))
1387 (add-before 'check 'fix-test-framework
1388 (lambda _
1389 ;; Fix PATH in test environment
1390 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1391 (("PATH=/bin:/usr/bin")
1392 (string-append "PATH=" (getenv "PATH"))))
1393 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1394 (("/usr/bin/env") (which "env")))
1395 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1396 (("/bin/rm") (which "rm"))
1397 (("/bin/cp") (which "cp"))
1398 (("/bin/mv") (which "mv")))
1399 #t))
1400 (add-before 'check 'fix-hotspot-tests
1401 (lambda _
1402 (with-directory-excursion "openjdk.src/hotspot/test/"
1403 (substitute* "jprt.config"
1404 (("PATH=\"\\$\\{path4sdk\\}\"")
1405 (string-append "PATH=" (getenv "PATH")))
1406 (("make=/usr/bin/make")
1407 (string-append "make=" (which "make"))))
1408 (substitute* '("runtime/6626217/Test6626217.sh"
1409 "runtime/7110720/Test7110720.sh")
1410 (("/bin/rm") (which "rm"))
1411 (("/bin/cp") (which "cp"))
1412 (("/bin/mv") (which "mv"))))
1413 #t))
1414 (add-before 'check 'fix-jdk-tests
1415 (lambda _
1416 (with-directory-excursion "openjdk.src/jdk/test/"
1417 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1418 (("/bin/pwd") (which "pwd")))
1419 (substitute* "com/sun/jdi/ShellScaffold.sh"
1420 (("/bin/kill") (which "kill")))
1421 (substitute* "start-Xvfb.sh"
1422 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1423 (("/usr/bin/nohup") (which "nohup")))
1424 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1425 (("/bin/rm") (which "rm")))
1426 (substitute* "tools/launcher/MultipleJRE.sh"
1427 (("echo \"#!/bin/sh\"")
1428 (string-append "echo \"#!" (which "rm") "\""))
1429 (("/usr/bin/zip") (which "zip")))
1430 (substitute* "com/sun/jdi/OnThrowTest.java"
1431 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1432 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1433 (("/usr/bin/uptime") (which "uptime")))
1434 (substitute* "java/lang/ProcessBuilder/Basic.java"
1435 (("/usr/bin/env") (which "env"))
1436 (("/bin/false") (which "false"))
1437 (("/bin/true") (which "true"))
1438 (("/bin/cp") (which "cp"))
1439 (("/bin/sh") (which "sh")))
1440 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1441 (("/bin/sh") (which "sh")))
1442 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1443 (("/usr/bin/perl") (which "perl"))
1444 (("/bin/ps") (which "ps"))
1445 (("/bin/true") (which "true")))
1446 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1447 (("/usr/bin/tee") (which "tee")))
1448 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1449 (("/bin/true") (which "true")))
1450 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1451 (("/bin/cat") (which "cat")))
1452 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1453 (("/bin/sh") (which "sh"))
1454 (("/bin/true") (which "true"))
1455 (("/bin/kill") (which "kill")))
1456 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1457 (("/usr/bin/echo") (which "echo")))
1458 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1459 (("/usr/bin/cat") (which "cat")))
1460 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1461 (("/bin/cat") (which "cat"))
1462 (("/bin/sleep") (which "sleep"))
1463 (("/bin/sh") (which "sh")))
1464 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1465 (("/bin/cat") (which "cat")))
1466 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1467 (("/bin/chmod") (which "chmod")))
1468 (substitute* "java/util/zip/ZipFile/Assortment.java"
1469 (("/bin/sh") (which "sh"))))
1470 #t))
1471 (replace 'check
1472 (lambda _
1473 ;; The "make check-*" targets always return zero, so we need to
1474 ;; check for errors in the associated log files to determine
1475 ;; whether any tests have failed.
1476 (use-modules (ice-9 rdelim))
1477 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1478 (checker (lambda (port)
1479 (let loop ()
1480 (let ((line (read-line port)))
1481 (cond
1482 ((eof-object? line) #t)
1483 ((regexp-exec error-pattern line)
1484 (error "test failed"))
1485 (else (loop)))))))
1486 (run-test (lambda (test)
1487 (invoke "make" test)
1488 (call-with-input-file
1489 (string-append "test/" test ".log")
1490 checker))))
1491 (when #f ; skip tests
1492 (run-test "check-hotspot")
1493 (run-test "check-langtools")
1494 (run-test "check-jdk"))
1495 #t)))
1496 (replace 'install
1497 (lambda* (#:key outputs #:allow-other-keys)
1498 (let ((doc (string-append (assoc-ref outputs "doc")
1499 "/share/doc/icedtea"))
1500 (jre (assoc-ref outputs "out"))
1501 (jdk (assoc-ref outputs "jdk")))
1502 (copy-recursively "openjdk.build/docs" doc)
1503 (copy-recursively "openjdk.build/j2re-image" jre)
1504 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1505 #t))
1506 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1507 ;; But that shared object is located in the server/ folder, so it
1508 ;; cannot be found. This phase creates a symbolic link in the
1509 ;; lib/amd64 folder so that the other libraries can find it.
1510 ;;
1511 ;; See:
1512 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1513 ;;
1514 ;; FIXME: Find the bug in the build system, so that this symlink is
1515 ;; not needed.
1516 (add-after 'install 'install-libjvm
1517 (lambda* (#:key inputs outputs #:allow-other-keys)
1518 (let* ((lib-path (string-append (assoc-ref outputs "out")
1519 ;; See 'INSTALL_ARCH_DIR' in
1520 ;; 'configure'.
1521 ,(match (%current-system)
1522 ("i686-linux"
1523 "/lib/i386")
1524 ("x86_64-linux"
1525 "/lib/amd64")
1526 ("armhf-linux"
1527 "/lib/arm")
1528 ("aarch64-linux"
1529 "/lib/aarch64")
1530 ;; We need a catch-all, dropping
1531 ;; '-linux' works in most cases.
1532 (_
1533 (string-append
1534 "/lib/"
1535 (string-drop-right
1536 (%current-system) 6)))))))
1537 (symlink (string-append lib-path "/server/libjvm.so")
1538 (string-append lib-path "/libjvm.so")))
1539 #t))
1540 ;; By default IcedTea only generates an empty keystore. In order to
1541 ;; be able to use certificates in Java programs we need to generate a
1542 ;; keystore from a set of certificates. For convenience we use the
1543 ;; certificates from the nss-certs package.
1544 (add-after 'install 'install-keystore
1545 (lambda* (#:key inputs outputs #:allow-other-keys)
1546 (let* ((keystore "cacerts")
1547 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1548 "/etc/ssl/certs"))
1549 (keytool (string-append (assoc-ref outputs "jdk")
1550 "/bin/keytool")))
1551 (define (extract-cert file target)
1552 (call-with-input-file file
1553 (lambda (in)
1554 (call-with-output-file target
1555 (lambda (out)
1556 (let loop ((line (read-line in 'concat))
1557 (copying? #f))
1558 (cond
1559 ((eof-object? line) #t)
1560 ((string-prefix? "-----BEGIN" line)
1561 (display line out)
1562 (loop (read-line in 'concat) #t))
1563 ((string-prefix? "-----END" line)
1564 (display line out)
1565 #t)
1566 (else
1567 (when copying? (display line out))
1568 (loop (read-line in 'concat) copying?)))))))))
1569 (define (import-cert cert)
1570 (format #t "Importing certificate ~a\n" (basename cert))
1571 (let ((temp "tmpcert"))
1572 (extract-cert cert temp)
1573 (let ((port (open-pipe* OPEN_WRITE keytool
1574 "-import"
1575 "-alias" (basename cert)
1576 "-keystore" keystore
1577 "-storepass" "changeit"
1578 "-file" temp)))
1579 (display "yes\n" port)
1580 (when (not (zero? (status:exit-val (close-pipe port))))
1581 (format #t "failed to import ~a\n" cert)))
1582 (delete-file temp)))
1583
1584 ;; This is necessary because the certificate directory contains
1585 ;; files with non-ASCII characters in their names.
1586 (setlocale LC_ALL "en_US.utf8")
1587 (setenv "LC_ALL" "en_US.utf8")
1588
1589 (for-each import-cert (find-files certs-dir "\\.pem$"))
1590 (mkdir-p (string-append (assoc-ref outputs "out")
1591 "/lib/security"))
1592 (mkdir-p (string-append (assoc-ref outputs "jdk")
1593 "/jre/lib/security"))
1594
1595 ;; The cacerts files we are going to overwrite are chmod'ed as
1596 ;; read-only (444) in icedtea-8 (which derives from this
1597 ;; package). We have to change this so we can overwrite them.
1598 (chmod (string-append (assoc-ref outputs "out")
1599 "/lib/security/" keystore) #o644)
1600 (chmod (string-append (assoc-ref outputs "jdk")
1601 "/jre/lib/security/" keystore) #o644)
1602
1603 (install-file keystore
1604 (string-append (assoc-ref outputs "out")
1605 "/lib/security"))
1606 (install-file keystore
1607 (string-append (assoc-ref outputs "jdk")
1608 "/jre/lib/security"))
1609 #t))))))
1610 (native-inputs
1611 `(("openjdk-src"
1612 ,(drop "openjdk"
1613 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1614 ("corba-drop"
1615 ,(drop "corba"
1616 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1617 ("jaxp-drop"
1618 ,(drop "jaxp"
1619 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1620 ("jaxws-drop"
1621 ,(drop "jaxws"
1622 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1623 ("jdk-drop"
1624 ,(drop "jdk"
1625 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1626 ("langtools-drop"
1627 ,(drop "langtools"
1628 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1629 ("hotspot-drop"
1630 ,(origin
1631 (method url-fetch)
1632 (uri (string-append
1633 "http://icedtea.classpath.org/downloads/drops"
1634 "/icedtea7/" version "/hotspot.tar.bz2"))
1635 (sha256
1636 (base32
1637 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1638 (patches (search-patches
1639 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1640 ("ant" ,ant-bootstrap)
1641 ("attr" ,attr)
1642 ("coreutils" ,coreutils)
1643 ("diffutils" ,diffutils) ;for tests
1644 ("gawk" ,gawk)
1645 ("grep" ,grep)
1646 ("libtool" ,libtool)
1647 ("pkg-config" ,pkg-config)
1648 ("wget" ,wget)
1649 ("which" ,which)
1650 ("cpio" ,cpio)
1651 ("zip" ,zip)
1652 ("unzip" ,unzip)
1653 ("fastjar" ,fastjar)
1654 ("libxslt" ,libxslt) ;for xsltproc
1655 ("nss-certs" ,nss-certs)
1656 ("perl" ,perl)
1657 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1658 ("jdk" ,icedtea-6 "jdk")))
1659 (inputs
1660 `(("alsa-lib" ,alsa-lib)
1661 ("cups" ,cups)
1662 ("libx11" ,libx11)
1663 ("libxcomposite" ,libxcomposite)
1664 ("libxt" ,libxt)
1665 ("libxtst" ,libxtst)
1666 ("libxi" ,libxi)
1667 ("libxinerama" ,libxinerama)
1668 ("libxrender" ,libxrender)
1669 ("libjpeg" ,libjpeg-turbo)
1670 ("libpng" ,libpng)
1671 ("mit-krb5" ,mit-krb5)
1672 ("nss" ,nss)
1673 ("giflib" ,giflib)
1674 ("fontconfig" ,fontconfig)
1675 ("freetype" ,freetype)
1676 ("lcms" ,lcms)
1677 ("zlib" ,zlib)
1678 ("gtk" ,gtk+-2)))
1679 (home-page "http://icedtea.classpath.org")
1680 (synopsis "Java development kit")
1681 (description
1682 "This package provides the Java development kit OpenJDK built with the
1683 IcedTea build harness.")
1684
1685 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1686 (supported-systems (delete "mips64el-linux" %supported-systems))
1687
1688 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1689 ;; same license as both GNU Classpath and OpenJDK.
1690 (license license:gpl2+))))
1691
1692 (define-public icedtea-8
1693 (let* ((version "3.7.0")
1694 (drop (lambda (name hash)
1695 (origin
1696 (method url-fetch)
1697 (uri (string-append
1698 "http://icedtea.classpath.org/download/drops"
1699 "/icedtea8/" version "/" name ".tar.xz"))
1700 (sha256 (base32 hash))))))
1701 (package (inherit icedtea-7)
1702 (version "3.7.0")
1703 (source (origin
1704 (method url-fetch)
1705 (uri (string-append
1706 "http://icedtea.wildebeest.org/download/source/icedtea-"
1707 version ".tar.xz"))
1708 (sha256
1709 (base32
1710 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1711 (modules '((guix build utils)))
1712 (snippet
1713 '(begin
1714 (substitute* '("configure"
1715 "acinclude.m4")
1716 ;; Do not embed build time
1717 (("(DIST_ID=\"Custom build).*$" _ prefix)
1718 (string-append prefix "\"\n"))
1719 ;; Do not leak information about the build host
1720 (("DIST_NAME=\"\\$build_os\"")
1721 "DIST_NAME=\"guix\""))
1722 #t))))
1723 (arguments
1724 `(#:imported-modules
1725 ((guix build ant-build-system)
1726 (guix build syscalls)
1727 ,@%gnu-build-system-modules)
1728 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1729 ((#:modules modules)
1730 `((guix build utils)
1731 (guix build gnu-build-system)
1732 ((guix build ant-build-system) #:prefix ant:)
1733 (ice-9 match)
1734 (ice-9 popen)
1735 (srfi srfi-19)
1736 (srfi srfi-26)))
1737 ((#:configure-flags flags)
1738 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1739 `( ;;"--disable-bootstrap"
1740 "--enable-bootstrap"
1741 "--enable-nss"
1742 "--disable-downloading"
1743 "--disable-system-pcsc"
1744 "--disable-system-sctp"
1745 "--disable-tests" ;they are run in the check phase instead
1746 "--with-openjdk-src-dir=./openjdk.src"
1747 ,(string-append "--with-jdk-home=" jdk))))
1748 ((#:phases phases)
1749 `(modify-phases ,phases
1750 (delete 'fix-x11-extension-include-path)
1751 (delete 'patch-paths)
1752 (delete 'set-additional-paths)
1753 (delete 'patch-patches)
1754 (delete 'patch-bitrot)
1755 ;; Prevent the keytool from recording the current time when
1756 ;; adding certificates at build time.
1757 (add-after 'unpack 'patch-keystore
1758 (lambda _
1759 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1760 (("date = new Date\\(\\);")
1761 "\
1762 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1763 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1764 new Date();"))
1765 #t))
1766 (add-after 'unpack 'patch-jni-libs
1767 ;; Hardcode dynamically loaded libraries.
1768 (lambda _
1769 (let* ((library-path (search-path-as-string->list
1770 (getenv "LIBRARY_PATH")))
1771 (find-library (lambda (name)
1772 (search-path
1773 library-path
1774 (string-append "lib" name ".so")))))
1775 (for-each
1776 (lambda (file)
1777 (catch 'decoding-error
1778 (lambda ()
1779 (substitute* file
1780 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1781 _ name version)
1782 (format #f "\"~a\"" (find-library name)))
1783 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1784 (format #f "\"~a\"" (find-library name)))))
1785 (lambda _
1786 ;; Those are safe to skip.
1787 (format (current-error-port)
1788 "warning: failed to substitute: ~a~%"
1789 file))))
1790 (find-files "openjdk.src/jdk/src/solaris/native"
1791 "\\.c|\\.h"))
1792 #t)))
1793 (replace 'install
1794 (lambda* (#:key outputs #:allow-other-keys)
1795 (let ((doc (string-append (assoc-ref outputs "doc")
1796 "/share/doc/icedtea"))
1797 (jre (assoc-ref outputs "out"))
1798 (jdk (assoc-ref outputs "jdk")))
1799 (copy-recursively "openjdk.build/docs" doc)
1800 (copy-recursively "openjdk.build/images/j2re-image" jre)
1801 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1802 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1803 ;; support via NSS.
1804 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1805 (string-append jre "/lib/security/nss.cfg"))
1806 #t)))
1807 (add-after 'install 'strip-jar-timestamps
1808 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1809 (native-inputs
1810 `(("jdk" ,icedtea-7 "jdk")
1811 ("openjdk-src"
1812 ,(drop "openjdk"
1813 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1814 ("aarch32-drop"
1815 ,(drop "aarch32"
1816 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1817 ("corba-drop"
1818 ,(drop "corba"
1819 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1820 ("jaxp-drop"
1821 ,(drop "jaxp"
1822 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1823 ("jaxws-drop"
1824 ,(drop "jaxws"
1825 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1826 ("jdk-drop"
1827 ,(drop "jdk"
1828 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1829 ("langtools-drop"
1830 ,(drop "langtools"
1831 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1832 ("hotspot-drop"
1833 ,(origin
1834 (method url-fetch)
1835 (uri (string-append
1836 "http://icedtea.classpath.org/download/drops"
1837 "/icedtea8/" version "/hotspot.tar.xz"))
1838 (sha256
1839 (base32
1840 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1841 (patches (search-patches
1842 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1843 ("nashorn-drop"
1844 ,(drop "nashorn"
1845 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1846 ("shenandoah-drop"
1847 ,(drop "shenandoah"
1848 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1849 ,@(fold alist-delete (package-native-inputs icedtea-7)
1850 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1851 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1852
1853 (define-public openjdk9
1854 (package
1855 (name "openjdk")
1856 (version "9.181")
1857 (source (origin
1858 (method url-fetch)
1859 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1860 (file-name (string-append name "-" version ".tar.bz2"))
1861 (sha256
1862 (base32
1863 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1864 (modules '((guix build utils)))
1865 (snippet
1866 `(begin
1867 (for-each delete-file
1868 (find-files "." ".*.(bin|exe|jar)$"))
1869 #t))))
1870 (build-system gnu-build-system)
1871 (outputs '("out" "jdk" "doc"))
1872 (arguments
1873 `(#:tests? #f; require jtreg
1874 #:make-flags '("all")
1875 #:imported-modules
1876 ((guix build syscalls)
1877 ,@%gnu-build-system-modules)
1878 #:phases
1879 (modify-phases %standard-phases
1880 (add-after 'patch-source-shebangs 'fix-java-shebangs
1881 (lambda _
1882 ;; This file was "fixed" by patch-source-shebangs, but it requires
1883 ;; this exact first line.
1884 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1885 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1886 #t))
1887 (replace 'configure
1888 (lambda* (#:key inputs outputs #:allow-other-keys)
1889 ;; TODO: unbundle libpng and lcms
1890 (invoke "bash" "./configure"
1891 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1892 "--disable-freetype-bundling"
1893 "--disable-warnings-as-errors"
1894 "--disable-hotspot-gtest"
1895 "--with-giflib=system"
1896 "--with-libjpeg=system"
1897 (string-append "--prefix=" (assoc-ref outputs "out")))
1898 #t))
1899 (add-before 'build 'write-source-revision-file
1900 (lambda _
1901 (with-output-to-file ".src-rev"
1902 (lambda _
1903 (display ,version)))
1904 #t))
1905 (replace 'build
1906 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1907 (apply invoke "make"
1908 `(,@(if parallel-build?
1909 (list (string-append "JOBS="
1910 (number->string (parallel-job-count))))
1911 '())
1912 ,@make-flags))))
1913 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1914 ;; But that shared object is located in the server/ folder, so it
1915 ;; cannot be found. This phase creates a symbolic link in the
1916 ;; lib/ folder so that the other libraries can find it.
1917 ;;
1918 ;; See:
1919 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1920 ;;
1921 ;; FIXME: Find the bug in the build system, so that this symlink is
1922 ;; not needed.
1923 (add-after 'install 'install-libjvm
1924 (lambda* (#:key inputs outputs #:allow-other-keys)
1925 (let* ((lib-out (string-append (assoc-ref outputs "out")
1926 "/lib"))
1927 (lib-jdk (string-append (assoc-ref outputs "jdk")
1928 "/lib")))
1929 (symlink (string-append lib-jdk "/server/libjvm.so")
1930 (string-append lib-jdk "/libjvm.so"))
1931 (symlink (string-append lib-out "/server/libjvm.so")
1932 (string-append lib-out "/libjvm.so")))
1933 #t))
1934 (replace 'install
1935 (lambda* (#:key outputs #:allow-other-keys)
1936 (let ((out (assoc-ref outputs "out"))
1937 (jdk (assoc-ref outputs "jdk"))
1938 (doc (assoc-ref outputs "doc"))
1939 (images (car (find-files "build" ".*-server-release"
1940 #:directories? #t))))
1941 (copy-recursively (string-append images "/images/jdk") jdk)
1942 (copy-recursively (string-append images "/images/jre") out)
1943 (copy-recursively (string-append images "/images/docs") doc))
1944 #t))
1945 (add-after 'install 'strip-zip-timestamps
1946 (lambda* (#:key outputs #:allow-other-keys)
1947 (use-modules (guix build syscalls))
1948 (for-each (lambda (zip)
1949 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1950 (with-directory-excursion dir
1951 (invoke "unzip" zip))
1952 (delete-file zip)
1953 (for-each (lambda (file)
1954 (let ((s (lstat file)))
1955 (unless (eq? (stat:type s) 'symlink)
1956 (format #t "reset ~a~%" file)
1957 (utime file 0 0 0 0))))
1958 (find-files dir #:directories? #t))
1959 (with-directory-excursion dir
1960 (let ((files (find-files "." ".*" #:directories? #t)))
1961 (apply invoke "zip" "-0" "-X" zip files)))))
1962 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1963 #t)))))
1964 (inputs
1965 `(("alsa-lib" ,alsa-lib)
1966 ("cups" ,cups)
1967 ("fontconfig" ,fontconfig)
1968 ("freetype" ,freetype)
1969 ("giflib" ,giflib)
1970 ("lcms" ,lcms)
1971 ("libelf" ,libelf)
1972 ("libjpeg" ,libjpeg-turbo)
1973 ("libice" ,libice)
1974 ("libpng" ,libpng)
1975 ("libx11" ,libx11)
1976 ("libxcomposite" ,libxcomposite)
1977 ("libxi" ,libxi)
1978 ("libxinerama" ,libxinerama)
1979 ("libxrender" ,libxrender)
1980 ("libxt" ,libxt)
1981 ("libxtst" ,libxtst)))
1982 (native-inputs
1983 `(("icedtea-8" ,icedtea-8)
1984 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1985 ;; XXX: The build system fails with newer versions of GNU Make.
1986 ("make@4.2" ,gnu-make-4.2)
1987 ("unzip" ,unzip)
1988 ("which" ,which)
1989 ("zip" ,zip)))
1990 (home-page "https://openjdk.java.net/projects/jdk9/")
1991 (synopsis "Java development kit")
1992 (description
1993 "This package provides the Java development kit OpenJDK.")
1994 (license license:gpl2+)))
1995
1996 (define-public openjdk10
1997 (package
1998 (inherit openjdk9)
1999 (name "openjdk")
2000 (version "10.46")
2001 (source (origin
2002 (method url-fetch)
2003 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2004 (file-name (string-append name "-" version ".tar.bz2"))
2005 (sha256
2006 (base32
2007 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2008 (patches (search-patches
2009 "openjdk-10-idlj-reproducibility.patch"))
2010 (modules '((guix build utils)))
2011 (snippet
2012 `(begin
2013 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2014 #t))))
2015 (arguments
2016 (substitute-keyword-arguments (package-arguments openjdk9)
2017 ((#:phases phases)
2018 `(modify-phases ,phases
2019 (replace 'fix-java-shebangs
2020 (lambda _
2021 ;; This file was "fixed" by patch-source-shebangs, but it requires
2022 ;; this exact first line.
2023 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2024 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2025 #t))
2026 (replace 'configure
2027 (lambda* (#:key inputs outputs #:allow-other-keys)
2028 (invoke "bash" "./configure"
2029 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2030 "--disable-freetype-bundling"
2031 "--disable-warnings-as-errors"
2032 "--disable-hotspot-gtest"
2033 "--with-giflib=system"
2034 "--with-libjpeg=system"
2035 "--with-native-debug-symbols=zipped"
2036 (string-append "--prefix=" (assoc-ref outputs "out")))
2037 #t))))))
2038 (native-inputs
2039 `(("openjdk9" ,openjdk9)
2040 ("openjdk9:jdk" ,openjdk9 "jdk")
2041 ("make@4.2" ,gnu-make-4.2)
2042 ("unzip" ,unzip)
2043 ("which" ,which)
2044 ("zip" ,zip)))))
2045
2046 (define-public openjdk11
2047 (package
2048 (name "openjdk")
2049 (version "11.28")
2050 (source (origin
2051 (method url-fetch)
2052 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2053 (file-name (string-append name "-" version ".tar.bz2"))
2054 (sha256
2055 (base32
2056 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2057 (modules '((guix build utils)))
2058 (snippet
2059 `(begin
2060 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2061 #t))))
2062 (build-system gnu-build-system)
2063 (outputs '("out" "jdk" "doc"))
2064 (arguments
2065 `(#:imported-modules
2066 ((guix build syscalls)
2067 (ice-9 binary-ports)
2068 (rnrs bytevectors)
2069 ,@%gnu-build-system-modules)
2070 #:tests? #f; requires jtreg
2071 ;; TODO package jtreg
2072 #:configure-flags
2073 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2074 "--disable-warnings-as-errors"
2075 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2076 "--with-native-debug-symbols=zipped"
2077 ;; do not use the bundled libraries
2078 "--with-giflib=system"
2079 "--with-lcms=system"
2080 "--with-libjpeg=system"
2081 "--with-libpng=system"
2082 "--with-version-pre="
2083 ;; allow the build system to locate the system freetype
2084 ,(string-append "--with-freetype-include="
2085 (assoc-ref %build-inputs "freetype") "/include")
2086 ,(string-append "--with-freetype-lib="
2087 (assoc-ref %build-inputs "freetype") "/lib"))
2088 #:phases
2089 (modify-phases %standard-phases
2090 (add-after 'patch-source-shebangs 'fix-java-shebangs
2091 (lambda _
2092 ;; This file was "fixed" by patch-source-shebangs, but it requires
2093 ;; this exact first line.
2094 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2095 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2096 #t))
2097 (add-before 'build 'write-source-revision-file
2098 (lambda _
2099 (with-output-to-file ".src-rev"
2100 (lambda _
2101 (display ,version)))
2102 #t))
2103 (replace 'build
2104 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2105 (apply invoke "make" "all"
2106 `(,@(if parallel-build?
2107 (list (string-append "JOBS="
2108 (number->string (parallel-job-count))))
2109 '())
2110 ,@make-flags))))
2111 ;; jdk 11 does not build jre by default any more
2112 ;; building it anyways
2113 ;; for further information see:
2114 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2115 (add-after 'build 'build-jre
2116 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2117 (apply invoke "make" "legacy-jre-image"
2118 `(,@(if parallel-build?
2119 (list (string-append "JOBS="
2120 (number->string (parallel-job-count))))
2121 '())
2122 ,@make-flags))))
2123 (replace 'install
2124 (lambda* (#:key outputs #:allow-other-keys)
2125 (let ((out (assoc-ref outputs "out"))
2126 (jdk (assoc-ref outputs "jdk"))
2127 (doc (assoc-ref outputs "doc"))
2128 (images (car (find-files "build" ".*-server-release"
2129 #:directories? #t))))
2130 (copy-recursively (string-append images "/images/jdk") jdk)
2131 (copy-recursively (string-append images "/images/jre") out)
2132 (copy-recursively (string-append images "/images/docs") doc))
2133 #t))
2134 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2135 ;; But that shared object is located in the server/ folder, so it
2136 ;; cannot be found. This phase creates a symbolic link in the
2137 ;; lib/ folder so that the other libraries can find it.
2138 ;;
2139 ;; See:
2140 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2141 ;;
2142 ;; FIXME: Find the bug in the build system, so that this symlink is
2143 ;; not needed.
2144 (add-after 'install 'install-libjvm
2145 (lambda* (#:key inputs outputs #:allow-other-keys)
2146 (let* ((lib-out (string-append (assoc-ref outputs "out")
2147 "/lib"))
2148 (lib-jdk (string-append (assoc-ref outputs "jdk")
2149 "/lib")))
2150 (symlink (string-append lib-jdk "/server/libjvm.so")
2151 (string-append lib-jdk "/libjvm.so"))
2152 (symlink (string-append lib-out "/server/libjvm.so")
2153 (string-append lib-out "/libjvm.so")))
2154 #t))
2155 (add-after 'install 'strip-character-data-timestamps
2156 (lambda* (#:key outputs #:allow-other-keys)
2157 (use-modules (guix build syscalls))
2158 (let ((archive (string-append
2159 (assoc-ref outputs "jdk") "/lib/src.zip"))
2160 (dir (mkdtemp! "zip-contents.XXXXXX")))
2161 (with-directory-excursion dir
2162 (invoke "unzip" archive))
2163 (delete-file archive)
2164 (with-directory-excursion dir
2165 (let ((char-data-files (find-files "." "CharacterData.*")))
2166 (for-each (lambda (file)
2167 (substitute* file
2168 (((string-append "This file was generated "
2169 "AUTOMATICALLY from a template "
2170 "file.*"))
2171 (string-append "This file was generated "
2172 "AUTOMATICALLY from a template "
2173 "file"))))
2174 char-data-files)))
2175 (with-directory-excursion dir
2176 (let ((files (find-files "." ".*" #:directories? #t)))
2177 (apply invoke "zip" "-0" "-X" archive files))))))
2178 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2179 (lambda* (#:key outputs #:allow-other-keys)
2180 (use-modules (guix build syscalls)
2181 (ice-9 binary-ports)
2182 (rnrs bytevectors))
2183 (letrec ((repack-archive
2184 (lambda (archive)
2185 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2186 (with-directory-excursion dir
2187 (invoke "unzip" archive))
2188 (delete-file archive)
2189 (for-each (compose repack-archive canonicalize-path)
2190 (find-files dir "(ct.sym|.*.jar)$"))
2191 (let ((reset-file-timestamp
2192 (lambda (file)
2193 (let ((s (lstat file)))
2194 (unless (eq? (stat:type s) 'symlink)
2195 (format #t "reset ~a~%" file)
2196 (utime file 0 0 0 0))))))
2197 (for-each reset-file-timestamp
2198 (find-files dir #:directories? #t)))
2199 (with-directory-excursion dir
2200 (let ((files (find-files "." ".*" #:directories? #t)))
2201 (apply invoke "zip" "-0" "-X" archive files)))))))
2202 (for-each repack-archive
2203 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2204 (for-each repack-archive
2205 (find-files (assoc-ref outputs "jdk")
2206 ".*.(zip|jar|diz)$"))
2207 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2208 (let ((repack-jmod
2209 (lambda (file-name)
2210 (call-with-input-file file-name
2211 (lambda (file)
2212 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2213 (if (equal? (get-bytevector-n
2214 file (bytevector-length header))
2215 header)
2216 (let* ((header-length (bytevector-length header))
2217 (temp-file (mkstemp!
2218 (string-copy
2219 "temp-file.XXXXXX")))
2220 (temp-filename (port-filename temp-file))
2221 (content-length
2222 (- (stat:size (stat file))
2223 header-length)))
2224 (sendfile temp-file file content-length header-length)
2225 (delete-file file-name)
2226 (close-port temp-file)
2227 (repack-archive (canonicalize-path temp-filename))
2228 (call-with-output-file file-name
2229 (lambda (file)
2230 (put-bytevector file header)
2231 (call-with-input-file temp-filename
2232 (lambda (temp-file)
2233 (sendfile
2234 file temp-file
2235 (stat:size (stat temp-file)) 0)))))))))))))
2236 (for-each repack-jmod
2237 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2238 #t)))
2239 (add-after 'install 'remove-timestamp-from-api-summary
2240 (lambda* (#:key outputs #:allow-other-keys)
2241 (substitute* (string-append (assoc-ref outputs "doc")
2242 "/api/overview-summary.html")
2243 (("Generated by javadoc \\(11-internal\\).*$")
2244 "Generated by javadoc (11-internal) -->\n"))
2245 #t)))))
2246 (inputs
2247 `(("alsa-lib" ,alsa-lib)
2248 ("cups" ,cups)
2249 ("fontconfig" ,fontconfig)
2250 ("freetype" ,freetype)
2251 ("giflib" ,giflib)
2252 ("lcms" ,lcms)
2253 ("libjpeg" ,libjpeg-turbo)
2254 ("libpng" ,libpng)
2255 ("libx11" ,libx11)
2256 ("libxext" ,libxext)
2257 ("libxrender" ,libxrender)
2258 ("libxt" ,libxt)
2259 ("libxtst" ,libxtst)))
2260 (native-inputs
2261 `(("autoconf" ,autoconf)
2262 ("openjdk10" ,openjdk10)
2263 ("openjdk10:jdk" ,openjdk10 "jdk")
2264 ("make" ,gnu-make-4.2)
2265 ("pkg-config" ,pkg-config)
2266 ("unzip" ,unzip)
2267 ("which" ,which)
2268 ("zip" ,zip)))
2269 (home-page "https://openjdk.java.net/projects/jdk/11/")
2270 (synopsis "Java development kit")
2271 (description
2272 "This package provides the Java development kit OpenJDK.")
2273 (license license:gpl2+)))
2274
2275 (define-public openjdk12
2276 (package
2277 (inherit openjdk11)
2278 (name "openjdk")
2279 (version "12.33")
2280 (source (origin
2281 (method url-fetch)
2282 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2283 (file-name (string-append name "-" version ".tar.bz2"))
2284 (sha256
2285 (base32
2286 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2287 (modules '((guix build utils)))
2288 (snippet
2289 `(begin
2290 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2291 #t))))
2292 (inputs
2293 `(("alsa-lib" ,alsa-lib)
2294 ("cups" ,cups)
2295 ("fontconfig" ,fontconfig)
2296 ("freetype" ,freetype)
2297 ("giflib" ,giflib)
2298 ("lcms" ,lcms)
2299 ("libjpeg" ,libjpeg-turbo)
2300 ("libpng" ,libpng)
2301 ("libx11" ,libx11)
2302 ("libxext" ,libxext)
2303 ("libxrandr" ,libxrandr)
2304 ("libxrender" ,libxrender)
2305 ("libxt" ,libxt)
2306 ("libxtst" ,libxtst)))
2307 (native-inputs
2308 `(("autoconf" ,autoconf)
2309 ("openjdk11" ,openjdk11)
2310 ("openjdk11:jdk" ,openjdk11 "jdk")
2311 ("make@4.2" ,gnu-make-4.2)
2312 ("pkg-config" ,pkg-config)
2313 ("unzip" ,unzip)
2314 ("which" ,which)
2315 ("zip" ,zip)))
2316 (home-page "https://openjdk.java.net/projects/jdk/12")))
2317
2318 (define-public openjdk13
2319 (package
2320 (inherit openjdk12)
2321 (name "openjdk")
2322 (version "13.0")
2323 (source (origin
2324 (method url-fetch)
2325 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2326 (file-name (string-append name "-" version ".tar.bz2"))
2327 (sha256
2328 (base32
2329 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2330 (modules '((guix build utils)))
2331 (snippet
2332 `(begin
2333 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2334 #t))))
2335 (inputs
2336 `(("alsa-lib" ,alsa-lib)
2337 ("cups" ,cups)
2338 ("fontconfig" ,fontconfig)
2339 ("freetype" ,freetype)
2340 ("giflib" ,giflib)
2341 ("lcms" ,lcms)
2342 ("libjpeg" ,libjpeg-turbo)
2343 ("libpng" ,libpng)
2344 ("libx11" ,libx11)
2345 ("libxext" ,libxext)
2346 ("libxrandr" ,libxrandr)
2347 ("libxrender" ,libxrender)
2348 ("libxt" ,libxt)
2349 ("libxtst" ,libxtst)))
2350 (native-inputs
2351 `(("autoconf" ,autoconf)
2352 ("openjdk12:jdk" ,openjdk12 "jdk")
2353 ("make@4.2" ,gnu-make-4.2)
2354 ("pkg-config" ,pkg-config)
2355 ("unzip" ,unzip)
2356 ("which" ,which)
2357 ("zip" ,zip)))
2358 (home-page "https://openjdk.java.net/projects/jdk/13")))
2359
2360 (define-public openjdk14
2361 (package
2362 (inherit openjdk13)
2363 (name "openjdk")
2364 (version "14.0")
2365 (source (origin
2366 (method url-fetch)
2367 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2368 (file-name (string-append name "-" version ".tar.bz2"))
2369 (sha256
2370 (base32
2371 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2372 (modules '((guix build utils)))
2373 (snippet
2374 `(begin
2375 ;; The m4 macro uses 'help' to search for builtins, which is
2376 ;; not available in bash-minimal
2377 (substitute* "make/autoconf/basics.m4"
2378 (("if help") "if command -v"))
2379 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2380 #t))))
2381 (inputs
2382 `(("alsa-lib" ,alsa-lib)
2383 ("cups" ,cups)
2384 ("fontconfig" ,fontconfig)
2385 ("freetype" ,freetype)
2386 ("giflib" ,giflib)
2387 ("lcms" ,lcms)
2388 ("libjpeg" ,libjpeg-turbo)
2389 ("libpng" ,libpng)
2390 ("libx11" ,libx11)
2391 ("libxext" ,libxext)
2392 ("libxrandr" ,libxrandr)
2393 ("libxrender" ,libxrender)
2394 ("libxt" ,libxt)
2395 ("libxtst" ,libxtst)))
2396 (native-inputs
2397 `(("autoconf" ,autoconf)
2398 ("make@4.2" ,gnu-make-4.2)
2399 ("openjdk13:jdk" ,openjdk13 "jdk")
2400 ("pkg-config" ,pkg-config)
2401 ("unzip" ,unzip)
2402 ("which" ,which)
2403 ("zip" ,zip)))
2404 (home-page "https://openjdk.java.net/projects/jdk/14")))
2405
2406 (define-public icedtea icedtea-8)
2407
2408 \f
2409 (define-public ant/java8
2410 (package (inherit ant-bootstrap)
2411 (name "ant")
2412 (version "1.10.1")
2413 (source (origin
2414 (method url-fetch)
2415 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2416 version "-src.tar.gz"))
2417 (sha256
2418 (base32
2419 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2420 (modules '((guix build utils)))
2421 (snippet
2422 '(begin
2423 (for-each delete-file
2424 (find-files "lib/optional" "\\.jar$"))
2425 #t))))
2426 (arguments
2427 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2428 ((#:phases phases)
2429 `(modify-phases ,phases
2430 (add-after 'unpack 'remove-scripts
2431 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2432 ;; wrappers.
2433 (lambda _
2434 (for-each delete-file
2435 (find-files "src/script"
2436 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2437 #t))
2438 (replace 'build
2439 (lambda* (#:key inputs outputs #:allow-other-keys)
2440 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2441
2442 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2443 ;; Ant to build. This is necessary in addition to disabling the
2444 ;; "check" phase, because the dependency on "test-jar" would always
2445 ;; result in the tests to be run.
2446 (substitute* "build.xml"
2447 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2448 (invoke "bash" "bootstrap.sh"
2449 (string-append "-Ddist.dir="
2450 (assoc-ref outputs "out")))))))))
2451 (native-inputs
2452 `(("jdk" ,icedtea-8 "jdk")
2453 ("zip" ,zip)
2454 ("unzip" ,unzip)))))
2455
2456 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2457 ;; requires Java 8.
2458 (define-public ant
2459 (package (inherit ant/java8)
2460 (version "1.9.9")
2461 (source (origin
2462 (method url-fetch)
2463 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2464 version "-src.tar.gz"))
2465 (sha256
2466 (base32
2467 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2468 (native-inputs
2469 `(("jdk" ,icedtea-7 "jdk")
2470 ("zip" ,zip)
2471 ("unzip" ,unzip)))))
2472
2473 (define-public ant-apache-bcel
2474 (package
2475 (inherit ant/java8)
2476 (name "ant-apache-bcel")
2477 (arguments
2478 (substitute-keyword-arguments (package-arguments ant/java8)
2479 ((#:phases phases)
2480 `(modify-phases ,phases
2481 (add-after 'unpack 'link-bcel
2482 (lambda* (#:key inputs #:allow-other-keys)
2483 (for-each (lambda (file)
2484 (symlink file
2485 (string-append "lib/optional/"
2486 (basename file))))
2487 (find-files (assoc-ref inputs "java-commons-bcel")
2488 "\\.jar$"))
2489 #t))
2490 (add-after 'build 'install
2491 (lambda* (#:key outputs #:allow-other-keys)
2492 (let* ((out (assoc-ref outputs "out"))
2493 (share (string-append out "/share/java"))
2494 (bin (string-append out "/bin"))
2495 (lib (string-append out "/lib")))
2496 (mkdir-p share)
2497 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2498 (delete-file-recursively bin)
2499 (delete-file-recursively lib)
2500 #t)))))))
2501 (inputs
2502 `(("java-commons-bcel" ,java-commons-bcel)
2503 ,@(package-inputs ant/java8)))))
2504
2505 (define-public ant-junit
2506 (package
2507 (inherit ant/java8)
2508 (name "ant-junit")
2509 (arguments
2510 (substitute-keyword-arguments (package-arguments ant/java8)
2511 ((#:phases phases)
2512 `(modify-phases ,phases
2513 (add-after 'unpack 'link-junit
2514 (lambda* (#:key inputs #:allow-other-keys)
2515 (for-each (lambda (file)
2516 (symlink file
2517 (string-append "lib/optional/"
2518 (basename file))))
2519 (find-files (assoc-ref inputs "java-junit")
2520 "\\.jar$"))
2521 #t))
2522 (add-after 'build 'install
2523 (lambda* (#:key outputs #:allow-other-keys)
2524 (let* ((out (assoc-ref outputs "out"))
2525 (share (string-append out "/share/java"))
2526 (bin (string-append out "/bin"))
2527 (lib (string-append out "/lib")))
2528 (mkdir-p share)
2529 (install-file (string-append lib "/ant-junit.jar") share)
2530 (delete-file-recursively bin)
2531 (delete-file-recursively lib)
2532 #t)))))))
2533 (inputs
2534 `(("java-junit" ,java-junit)
2535 ,@(package-inputs ant/java8)))))
2536
2537 (define-public java-openjfx-build
2538 (package
2539 (name "java-openjfx-build")
2540 ;; This is a java-8 version
2541 (version "8.202")
2542 (source (origin
2543 (method hg-fetch)
2544 (uri (hg-reference
2545 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2546 (changeset (string-append
2547 (string-join (string-split version #\.) "u")
2548 "-ga"))))
2549 (file-name (string-append name "-" version "-checkout"))
2550 (modules '((guix build utils)))
2551 (snippet
2552 '(begin
2553 ;; Delete included gradle jar
2554 (delete-file-recursively "gradle/wrapper")
2555 #t))
2556 (sha256
2557 (base32
2558 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2559 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2560 (build-system ant-build-system)
2561 (arguments
2562 `(#:jar-name "java-openjfx.jar"
2563 #:source-dir "buildSrc/src/main/java"
2564 #:test-dir "buildSrc/src/test"
2565 #:phases
2566 (modify-phases %standard-phases
2567 (add-before 'configure 'generate-jsl-parser
2568 (lambda _
2569 (invoke "antlr3" "-o"
2570 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2571 "buildSrc/src/main/antlr/JSL.g"))))))
2572 (inputs
2573 `(("antlr3" ,antlr3)
2574 ("java-stringtemplate" ,java-stringtemplate)))
2575 (native-inputs
2576 `(("java-junit" ,java-junit)
2577 ("java-hamcrest-core" ,java-hamcrest-core)))
2578 (home-page "https://openjfx.io")
2579 (synopsis "Graphical application toolkit in Java")
2580 (description "OpenJFX is a client application platform for desktop,
2581 mobile and embedded systems built on Java. Its goal is to produce a
2582 modern, efficient, and fully featured toolkit for developing rich client
2583 applications. This package contains base classes for the OpenJFX
2584 distribution and helper classes for building other parts of the
2585 distribution.")
2586 (license license:gpl2))) ;gpl2 only, with classpath exception
2587
2588 (define-public java-openjfx-base
2589 (package (inherit java-openjfx-build)
2590 (name "java-openjfx-base")
2591 (arguments
2592 `(#:jar-name "java-openjfx-base.jar"
2593 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2594 #:test-dir "modules/base/src/test"
2595 #:phases
2596 (modify-phases %standard-phases
2597 (add-before 'check 'remove-empty-file
2598 (lambda _
2599 (with-directory-excursion "modules/base/src/test/java"
2600 ;; These files are completely commented, but junit expects them to
2601 ;; contain a class, so tests fail.
2602 (delete-file
2603 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2604 (delete-file
2605 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2606 (delete-file "javafx/beans/property/PropertiesTest.java")
2607 (delete-file
2608 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2609 ;; This one fails
2610 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2611 #t)))))
2612 (propagated-inputs
2613 `(("java-openjfx-build" ,java-openjfx-build)))
2614 (description "OpenJFX is a client application platform for desktop,
2615 mobile and embedded systems built on Java. Its goal is to produce a
2616 modern, efficient, and fully featured toolkit for developing rich client
2617 applications. This package contains base classes for the OpenJFX
2618 distribution.")))
2619
2620 (define-public java-openjfx-graphics
2621 (package (inherit java-openjfx-build)
2622 (name "java-openjfx-graphics")
2623 (arguments
2624 `(#:jar-name "java-openjfx-graphics.jar"
2625 #:source-dir "modules/graphics/src/main/java"
2626 #:tests? #f; require X
2627 #:test-dir "modules/graphics/src/test"))
2628 (propagated-inputs
2629 `(("java-openjfx-base" ,java-openjfx-base)
2630 ("java-swt" ,java-swt)))
2631 (description "OpenJFX is a client application platform for desktop,
2632 mobile and embedded systems built on Java. Its goal is to produce a
2633 modern, efficient, and fully featured toolkit for developing rich client
2634 applications. This package contains graphics-related classes for the
2635 OpenJFX distribution.")))
2636
2637 (define-public java-openjfx-media
2638 (package (inherit java-openjfx-build)
2639 (name "java-openjfx-media")
2640 (propagated-inputs
2641 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2642 (arguments
2643 `(#:jar-name "java-openjfx-media.jar"
2644 #:source-dir "modules/media/src/main/java"
2645 #:tests? #f)); no tests
2646 (description "OpenJFX is a client application platform for desktop,
2647 mobile and embedded systems built on Java. Its goal is to produce a
2648 modern, efficient, and fully featured toolkit for developing rich client
2649 applications. This package contains media-related classes for the
2650 OpenJFX distribution.")))
2651
2652 (define-public javacc-4
2653 (package
2654 (name "javacc")
2655 (version "4.1")
2656 (source (origin
2657 (method git-fetch)
2658 (uri (git-reference
2659 (url "https://github.com/javacc/javacc")
2660 (commit "release_41")))
2661 (file-name (string-append "javacc-" version "-checkout"))
2662 (sha256
2663 (base32
2664 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2665 (modules '((guix build utils)))
2666 ;; delete bundled jars
2667 (snippet '(begin (delete-file-recursively "lib") #t))))
2668 (build-system ant-build-system)
2669 ;; Tests fail with
2670 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2671 ;; JAVACODE failed
2672 (arguments
2673 `(#:tests? #f
2674 #:phases
2675 (modify-phases %standard-phases
2676 ;; Delete tests to avoid build failure (we don't run them anyway).
2677 (add-after 'unpack 'delete-tests
2678 (lambda _
2679 (for-each delete-file
2680 '("src/org/javacc/JavaCCTestCase.java"
2681 "src/org/javacc/parser/ExpansionTest.java"
2682 "src/org/javacc/parser/OptionsTest.java"
2683 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2684 (for-each delete-file-recursively
2685 '("src/org/javacc/parser/test"
2686 "src/org/javacc/jjdoc/test"))
2687 #t))
2688 (replace 'install (install-jars "bin/lib")))))
2689 (home-page "https://javacc.org/")
2690 (synopsis "Java parser generator")
2691 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2692 generator for use with Java applications. A parser generator is a tool that
2693 reads a grammar specification and converts it to a Java program that can
2694 recognize matches to the grammar. In addition to the parser generator itself,
2695 JavaCC provides other standard capabilities related to parser generation such
2696 as tree building (via a tool called JJTree included with JavaCC), actions,
2697 debugging, etc.")
2698 (license license:bsd-3)))
2699
2700 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2701 ;; in the bootstrap/ directory.
2702 (define-public javacc-3
2703 (package
2704 (inherit javacc-4)
2705 (version "3.2")
2706 (source (origin
2707 (method git-fetch)
2708 (uri (git-reference
2709 (url "https://github.com/javacc/javacc.git")
2710 (commit "release_32")))
2711 (file-name (string-append "javacc-" version "-checkout"))
2712 (sha256
2713 (base32
2714 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2715 (arguments
2716 `(#:tests? #f
2717 #:phases
2718 (modify-phases %standard-phases
2719 (add-before 'build 'set-java-version
2720 (lambda _
2721 (for-each
2722 (lambda (file)
2723 (substitute* file
2724 (("debug=") "source=\"1.4\" debug=")))
2725 (find-files "." "build.xml"))
2726 #t))
2727 (replace 'install (install-jars "bin/lib")))))))
2728
2729 (define-public javacc
2730 (package
2731 (inherit javacc-4)
2732 (version "7.0.4")
2733 (source
2734 (origin
2735 (method git-fetch)
2736 (uri (git-reference
2737 (url "https://github.com/javacc/javacc")
2738 (commit version)))
2739 (file-name (git-file-name "javacc" version))
2740 (sha256
2741 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2742 (modules '((guix build utils)))
2743 ;; Delete bundled jars.
2744 (snippet '(begin (for-each delete-file-recursively
2745 '("bootstrap" "lib"))
2746 #t))))
2747 (arguments
2748 `(#:make-flags ; bootstrap from javacc-4
2749 (list (string-append "-Dbootstrap-jar="
2750 (assoc-ref %build-inputs "javacc")
2751 "/share/java/javacc.jar"))
2752 #:test-target "test"
2753 #:phases
2754 (modify-phases %standard-phases
2755 (replace 'install (install-jars "target"))
2756 (add-after 'install 'install-bin
2757 (lambda* (#:key outputs inputs #:allow-other-keys)
2758 (let* ((out (assoc-ref outputs "out"))
2759 (dir (string-append out "/share/java"))
2760 (bin (string-append out "/bin"))
2761 (javacc (string-append bin "/javacc")))
2762 (mkdir-p bin)
2763 (with-output-to-file javacc
2764 (lambda _
2765 (display
2766 (string-append "#!/bin/sh\n"
2767 (assoc-ref inputs "jdk") "/bin/java"
2768 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2769 (chmod javacc #o755)
2770 ;; symlink to different names to affect the first argument and
2771 ;; change the behavior of the jar file.
2772 (symlink javacc (string-append bin "/jjdoc"))
2773 (symlink javacc (string-append bin "/jjtree"))
2774 #t))))))
2775
2776 (native-inputs
2777 `(("javacc" ,javacc-4)))))
2778
2779 ;; This is the last 3.x release of ECJ
2780 (define-public java-ecj-3
2781 (package
2782 (name "java-ecj")
2783 (version "3.8.2")
2784 (source (origin
2785 (method url-fetch)
2786 (uri (string-append "http://archive.eclipse.org/eclipse/"
2787 "downloads/drops/R-" version
2788 "-201301310800/ecjsrc-" version ".jar"))
2789 (sha256
2790 (base32
2791 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2792 (build-system ant-build-system)
2793 (arguments
2794 `(#:tests? #f ; none included
2795 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2796 #:make-flags (list "-f" "src/build.xml")
2797 #:build-target "build"
2798 #:phases
2799 (modify-phases %standard-phases
2800 (add-after 'unpack 'fix-manifest
2801 (lambda _
2802 ;; Record the main class to make ecj executable.
2803 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2804 (lambda (in out)
2805 (display "Manifest-Version: 1.0
2806 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2807 out)))
2808 #t))
2809 (replace 'install (install-jars ".")))))
2810 (home-page "https://eclipse.org")
2811 (synopsis "Eclipse Java development tools core batch compiler")
2812 (description "This package provides the Eclipse Java core batch compiler.")
2813 (license license:epl1.0)))
2814
2815 ;; This is needed for java-cisd-args4j
2816 (define-public java-ecj-3.5
2817 (package (inherit java-ecj-3)
2818 (version "3.5.1")
2819 (source (origin
2820 (method url-fetch/zipbomb)
2821 (uri (string-append "http://archive.eclipse.org/eclipse/"
2822 "downloads/drops/R-" version
2823 "-200909170800/ecjsrc-" version ".zip"))
2824 (sha256
2825 (base32
2826 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2827 (build-system ant-build-system)
2828 (arguments
2829 `(#:tests? #f ; none included
2830 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2831 #:build-target "build"
2832 #:phases
2833 (modify-phases %standard-phases
2834 (add-after 'unpack 'fix-manifest
2835 (lambda _
2836 ;; Record the main class to make ecj executable.
2837 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2838 (lambda (in out)
2839 (dump-port in out)
2840 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2841 out)))
2842 #t))
2843 (replace 'install (install-jars ".")))))
2844 (native-inputs
2845 `(("unzip" ,unzip)))))
2846
2847 (define-public java-ecj
2848 (package (inherit java-ecj-3)
2849 (version "4.6.3")
2850 (source
2851 (origin
2852 (method url-fetch)
2853 (uri (string-append
2854 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2855 version
2856 "-201703010400/ecjsrc-"
2857 version
2858 ".jar"))
2859 (sha256
2860 (base32
2861 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2862 (arguments
2863 `(#:tests? #f ; none included
2864 #:build-target "build"
2865 #:phases
2866 (modify-phases %standard-phases
2867 (add-after 'unpack 'fix-build.xml
2868 (lambda _
2869 (substitute* "src/build.xml"
2870 (("^.*MANIFEST.*$")
2871 ""))
2872 #t))
2873 (add-after 'unpack 'fix-prop
2874 (lambda _
2875 (substitute* "src/build.xml"
2876 (("^.*properties.*$")
2877 "<include name=\"**/*.properties\"/>
2878 <include name=\"**/*.props\"/>"))
2879 #t))
2880 (add-before 'build 'chdir
2881 (lambda _
2882 (chdir "src")
2883 #t))
2884 (replace 'install (install-jars ".")))))))
2885
2886 (define-public java-cisd-base
2887 (let ((revision 38938)
2888 (base-version "14.12.0"))
2889 (package
2890 (name "java-cisd-base")
2891 (version (string-append base-version "-" (number->string revision)))
2892 (source (origin
2893 (method svn-fetch)
2894 (uri (svn-reference
2895 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2896 "base/tags/release/"
2897 (version-major+minor base-version)
2898 ".x/" base-version "/base/"))
2899 (revision revision)))
2900 (file-name (string-append "java-cisd-base-" version "-checkout"))
2901 (sha256
2902 (base32
2903 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2904 (modules '((guix build utils)))
2905 (snippet
2906 '(begin
2907 ;; Delete included gradle jar
2908 (delete-file-recursively "gradle/wrapper")
2909 ;; Delete pre-built native libraries
2910 (delete-file-recursively "libs")
2911 #t))))
2912 (build-system ant-build-system)
2913 (arguments
2914 `(#:make-flags '("-file" "build/build.xml")
2915 #:test-target "jar-test"
2916 #:jdk ,icedtea-8
2917 #:phases
2918 (modify-phases %standard-phases
2919 (add-after 'unpack 'unpack-build-resources
2920 (lambda* (#:key inputs #:allow-other-keys)
2921 (copy-recursively (assoc-ref inputs "build-resources")
2922 "../build_resources")
2923 #t))
2924 (add-after 'unpack-build-resources 'fix-dependencies
2925 (lambda* (#:key inputs #:allow-other-keys)
2926 (substitute* "build/build.xml"
2927 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2928 (string-append (assoc-ref inputs "java-testng")
2929 "/share/java/java-testng.jar"))
2930 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2931 (string-append (assoc-ref inputs "java-commons-lang")
2932 "/share/java/commons-lang-"
2933 ,(package-version java-commons-lang) ".jar"))
2934 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2935 (string-append (assoc-ref inputs "java-commons-io")
2936 "/share/java/commons-io-"
2937 ,(package-version java-commons-io)
2938 "-SNAPSHOT.jar"))
2939 ;; Remove dependency on svn
2940 (("<build-info.*") "")
2941 (("\\$\\{revision.number\\}")
2942 ,(number->string revision))
2943 (("\\$\\{version.number\\}") ,base-version))
2944 ;; Remove dependency on classycle
2945 (substitute* "../build_resources/ant/build-common.xml"
2946 (("<taskdef name=\"dependency-checker.*") "")
2947 (("classname=\"classycle.*") "")
2948 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2949 #t))
2950 ;; A few tests fail because of the lack of a proper /etc/groups and
2951 ;; /etc/passwd file in the build container.
2952 (add-after 'unpack 'disable-broken-tests
2953 (lambda _
2954 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2955 (("Unix.isOperational\\(\\)") "false"))
2956 #t))
2957 ;; These decorators are almost useless and pull in an unpackaged
2958 ;; dependency.
2959 (add-after 'unpack 'remove-useless-decorators
2960 (lambda _
2961 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2962 (("@Private") "")
2963 (("import ch.rinn.restrictions.Private;") ""))
2964 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2965 (("@Friend.*") "")
2966 (("import ch.rinn.restrictions.Friend;") ""))
2967 #t))
2968 (add-before 'configure 'build-native-code
2969 (lambda* (#:key inputs #:allow-other-keys)
2970 (let ((jdk (assoc-ref inputs "jdk"))
2971 (dir ,(match (%current-system)
2972 ("i686-linux"
2973 "i386-Linux")
2974 ((or "armhf-linux" "aarch64-linux")
2975 "arm-Linux")
2976 ((or "x86_64-linux")
2977 "amd64-Linux")
2978 (_ "unknown-Linux"))))
2979 (with-directory-excursion "source/c"
2980 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2981 (string-append "-I" jdk "/include")
2982 (string-append "-I" jdk "/include/linux")
2983 "-o" "libunix.so")
2984 (invoke "gcc" "-shared" "-O3" "-fPIC"
2985 "-DMACHINE_BYTE_ORDER=1"
2986 "copyCommon.c"
2987 "copyByteChar.c"
2988 "copyByteDouble.c"
2989 "copyByteFloat.c"
2990 "copyByteInt.c"
2991 "copyByteLong.c"
2992 "copyByteShort.c"
2993 (string-append "-I" jdk "/include")
2994 (string-append "-I" jdk "/include/linux")
2995 "-o" "libnativedata.so"))
2996 (install-file "source/c/libunix.so"
2997 (string-append "libs/native/unix/" dir))
2998 (install-file "source/c/libnativedata.so"
2999 (string-append "libs/native/nativedata/" dir))
3000 #t)))
3001 ;; In the "check" phase we only build the test executable.
3002 (add-after 'check 'run-tests
3003 (lambda _
3004 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3005 (delete-file "targets/dist/sis-base-test.jar")
3006 #t))
3007 (replace 'install (install-jars "targets/dist")))))
3008 (native-inputs
3009 `(("jdk" ,icedtea-8)
3010 ("java-commons-lang" ,java-commons-lang)
3011 ("java-commons-io" ,java-commons-io)
3012 ("java-testng" ,java-testng)
3013 ("build-resources"
3014 ,(origin
3015 (method svn-fetch)
3016 (uri (svn-reference
3017 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3018 "base/tags/release/"
3019 (version-major+minor base-version)
3020 ".x/" base-version
3021 "/build_resources/"))
3022 (revision revision)))
3023 (sha256
3024 (base32
3025 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3026 (home-page "http://svnsis.ethz.ch")
3027 (synopsis "Utility classes for libraries from ETH Zurich")
3028 (description "This library supplies some utility classes needed for
3029 libraries from the SIS division at ETH Zurich like jHDF5.")
3030 ;; The C sources are under a non-copyleft license, which looks like a
3031 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3032 (license (list license:asl2.0
3033 (license:non-copyleft "file://source/c/COPYING"))))))
3034
3035 (define-public java-cisd-args4j
3036 (let ((revision 39162)
3037 (base-version "9.11.2"))
3038 (package
3039 (name "java-cisd-args4j")
3040 (version (string-append base-version "-" (number->string revision)))
3041 (source (origin
3042 (method svn-fetch)
3043 (uri (svn-reference
3044 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3045 "args4j/tags/release/"
3046 (version-major+minor base-version)
3047 ".x/" base-version "/args4j/"))
3048 (revision revision)))
3049 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3050 (sha256
3051 (base32
3052 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3053 (build-system ant-build-system)
3054 (arguments
3055 `(#:make-flags '("-file" "build/build.xml")
3056 #:tests? #f ; there are no tests
3057 ;; There are weird build failures with JDK8, such as: "The type
3058 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3059 ;; referenced from required .class files"
3060 #:jdk ,icedtea-7
3061 #:modules ((guix build ant-build-system)
3062 (guix build utils)
3063 (guix build java-utils)
3064 (sxml simple)
3065 (sxml transform)
3066 (sxml xpath))
3067 #:phases
3068 (modify-phases %standard-phases
3069 (add-after 'unpack 'unpack-build-resources
3070 (lambda* (#:key inputs #:allow-other-keys)
3071 (mkdir-p "../build_resources")
3072 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3073 "-C" "../build_resources"
3074 "--strip-components=1")
3075 (mkdir-p "../build_resources/lib")
3076 #t))
3077 (add-after 'unpack-build-resources 'fix-dependencies
3078 (lambda* (#:key inputs #:allow-other-keys)
3079 ;; FIXME: There should be a more convenient abstraction for
3080 ;; editing XML files.
3081 (with-directory-excursion "../build_resources/ant/"
3082 (chmod "build-common.xml" #o664)
3083 (call-with-output-file "build-common.xml.new"
3084 (lambda (port)
3085 (sxml->xml
3086 (pre-post-order
3087 (with-input-from-file "build-common.xml"
3088 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3089 `(;; Remove dependency on classycle and custom ant tasks
3090 (taskdef . ,(lambda (tag . kids)
3091 (let ((name ((sxpath '(name *text*)) kids)))
3092 (if (or (member "build-info" name)
3093 (member "dependency-checker" name)
3094 (member "build-java-subprojects" name)
3095 (member "project-classpath" name))
3096 '() ; skip
3097 `(,tag ,@kids)))))
3098 (typedef . ,(lambda (tag . kids)
3099 (let ((name ((sxpath '(name *text*)) kids)))
3100 (if (member "recursive-jar" name)
3101 '() ; skip
3102 `(,tag ,@kids)))))
3103 (build-java-subprojects . ,(lambda _ '()))
3104 ;; Ignore everything else
3105 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3106 (*text* . ,(lambda (_ txt) txt))))
3107 port)))
3108 (rename-file "build-common.xml.new" "build-common.xml"))
3109 (substitute* "build/build.xml"
3110 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3111 (string-append (assoc-ref inputs "java-cisd-base")
3112 "/share/java/sis-base.jar"))
3113 ;; Remove dependency on svn
3114 (("<build-info.*") "")
3115 (("\\$\\{revision.number\\}")
3116 ,(number->string revision))
3117 (("\\$\\{version.number\\}") ,base-version)
3118 ;; Don't use custom ant tasks.
3119 (("recursive-jar") "jar")
3120 (("<project-classpath.*") ""))
3121 #t))
3122 (replace 'install (install-jars "targets/dist")))))
3123 (inputs
3124 `(("java-cisd-base" ,java-cisd-base)))
3125 (native-inputs
3126 `(("ecj" ,java-ecj-3.5)
3127 ("build-resources"
3128 ,(origin
3129 (method svn-fetch)
3130 (uri (svn-reference
3131 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3132 "args4j/tags/release/"
3133 (version-major+minor base-version)
3134 ".x/" base-version
3135 "/build_resources/"))
3136 (revision revision)))
3137 (sha256
3138 (base32
3139 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3140 (modules '((guix build utils)))
3141 ;; Delete bundled pre-built jars.
3142 (snippet
3143 '(begin (delete-file-recursively "lib/") #t))))))
3144 (home-page "http://svnsis.ethz.ch")
3145 (synopsis "Command line parser library")
3146 (description "This package provides a parser for command line arguments.")
3147 (license license:asl2.0))))
3148
3149 (define-public java-cisd-jhdf5
3150 (let ((revision 39162)
3151 (base-version "14.12.6"))
3152 (package
3153 (name "java-cisd-jhdf5")
3154 (version (string-append base-version "-" (number->string revision)))
3155 (source (origin
3156 (method svn-fetch)
3157 (uri (svn-reference
3158 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3159 "jhdf5/tags/release/"
3160 (version-major+minor base-version)
3161 ".x/" base-version "/jhdf5/"))
3162 (revision revision)))
3163 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3164 (sha256
3165 (base32
3166 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3167 (modules '((guix build utils)))
3168 (snippet
3169 '(begin
3170 ;; Delete included gradle jar
3171 (delete-file-recursively "gradle/wrapper")
3172 ;; Delete pre-built native libraries
3173 (delete-file-recursively "libs")
3174 #t))))
3175 (build-system ant-build-system)
3176 (arguments
3177 `(#:make-flags '("-file" "build/build.xml")
3178 #:build-target "jar-all"
3179 #:test-target "jar-test"
3180 #:jdk ,icedtea-8
3181 #:phases
3182 (modify-phases %standard-phases
3183 ;; FIXME: this build phase fails.
3184 (delete 'generate-jar-indices)
3185 ;; Don't erase results from the build phase when building tests.
3186 (add-after 'unpack 'separate-test-target-from-clean
3187 (lambda _
3188 (substitute* "build/build.xml"
3189 (("\"jar-test\" depends=\"clean, ")
3190 "\"jar-test\" depends=\""))
3191 #t))
3192 (add-after 'unpack 'unpack-build-resources
3193 (lambda* (#:key inputs #:allow-other-keys)
3194 (copy-recursively (assoc-ref inputs "build-resources")
3195 "../build_resources")
3196 (delete-file-recursively "../build_resources/lib/")
3197 (mkdir-p "../build_resources/lib")
3198 ;; Remove dependency on classycle
3199 (substitute* "../build_resources/ant/build-common.xml"
3200 (("<taskdef name=\"dependency-checker.*") "")
3201 (("classname=\"classycle.*") "")
3202 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3203 ;; Remove dependency on svn
3204 (substitute* "build/build.xml"
3205 (("<build-info.*") "")
3206 (("\\$\\{revision.number\\}")
3207 ,(number->string revision))
3208 (("\\$\\{version.number\\}") ,base-version))
3209 #t))
3210 (add-after 'unpack-build-resources 'fix-dependencies
3211 (lambda* (#:key inputs #:allow-other-keys)
3212 (substitute* "../build_resources/ant/build-common.xml"
3213 (("../libraries/testng/testng-jdk15.jar")
3214 (string-append (assoc-ref inputs "java-testng")
3215 "/share/java/java-testng.jar")))
3216 (substitute* "build/build.xml"
3217 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3218 (string-append (assoc-ref inputs "java-cisd-base")
3219 "/share/java/sis-base.jar"))
3220 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3221 (string-append (assoc-ref inputs "java-cisd-args4j")
3222 "/share/java/cisd-args4j.jar"))
3223 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3224 (string-append (assoc-ref inputs "java-commons-lang")
3225 "/share/java/commons-lang-"
3226 ,(package-version java-commons-lang) ".jar"))
3227 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3228 (string-append (assoc-ref inputs "java-commons-io")
3229 "/share/java/commons-io-"
3230 ,(package-version java-commons-io)
3231 "-SNAPSHOT.jar"))
3232 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3233 (string-append (assoc-ref inputs "java-testng")
3234 "/share/java/java-testng.jar"))
3235 (("\\$\\{lib\\}/junit4/junit.jar")
3236 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3237 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3238 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3239 "jar$"))))
3240 ;; Remove dependency on ch.rinn.restrictions
3241 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3242 (substitute* '("BitSetConversionUtils.java"
3243 "HDF5Utils.java")
3244 (("import ch.rinn.restrictions.Private;") "")
3245 (("@Private") "")))
3246 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3247 (substitute* '("BitSetConversionTest.java"
3248 "h5ar/HDF5ArchiverTest.java")
3249 (("import ch.rinn.restrictions.Friend;") "")
3250 (("@Friend.*") ""))
3251 ;; Remove leftovers from removing @Friend
3252 (substitute* "h5ar/HDF5ArchiverTest.java"
3253 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3254 "")))
3255 #t))
3256 (add-before 'configure 'build-native-library
3257 (lambda* (#:key inputs #:allow-other-keys)
3258 (let ((jdk (assoc-ref inputs "jdk"))
3259 (hdf5 (assoc-ref inputs "hdf5"))
3260 (dir ,(match (%current-system)
3261 ("i686-linux"
3262 "i386-Linux")
3263 ((or "armhf-linux" "aarch64-linux")
3264 "arm-Linux")
3265 ((or "x86_64-linux")
3266 "amd64-Linux")
3267 (_ "unknown-Linux"))))
3268 (with-directory-excursion "source/c"
3269 (apply invoke `("gcc" "-shared" "-O3"
3270 "-fPIC"
3271 "-Wl,--exclude-libs,ALL"
3272 ,@(find-files "jhdf5" "\\.c$")
3273 ,@(find-files "hdf-java" "\\.c$")
3274 ,(string-append "-I" hdf5 "/include")
3275 ,(string-append "-I" jdk "/include")
3276 ,(string-append "-I" jdk "/include/linux")
3277 ,(string-append hdf5 "/lib/libhdf5.a")
3278 "-o" "libjhdf5.so" "-lz")))
3279 (install-file "source/c/libjhdf5.so"
3280 (string-append "libs/native/jhdf5/" dir))
3281 #t)))
3282 ;; In the "check" phase we only build the test executable.
3283 (add-after 'check 'run-tests
3284 (lambda _
3285 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3286 (delete-file "targets/dist/sis-jhdf5-test.jar")
3287 #t))
3288 (replace 'install
3289 (install-jars "targets/dist")))))
3290 (inputs
3291 `(("java-cisd-base" ,java-cisd-base)
3292 ("java-cisd-args4j" ,java-cisd-args4j)
3293 ("java-commons-lang" ,java-commons-lang)
3294 ("java-commons-io" ,java-commons-io)
3295 ("hdf5" ,hdf5)
3296 ("zlib" ,zlib)))
3297 (native-inputs
3298 `(("jdk" ,icedtea-8)
3299 ("java-testng" ,java-testng)
3300 ("java-junit" ,java-junit)
3301 ("java-jmock" ,java-jmock)
3302 ("java-hamcrest-core" ,java-hamcrest-core)
3303 ("build-resources"
3304 ,(origin
3305 (method svn-fetch)
3306 (uri (svn-reference
3307 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3308 "jhdf5/tags/release/"
3309 (version-major+minor base-version)
3310 ".x/" base-version
3311 "/build_resources/"))
3312 (revision revision)))
3313 (sha256
3314 (base32
3315 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3316 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3317 (synopsis "Java binding for HDF5")
3318 (description "JHDF5 is a high-level API in Java for reading and writing
3319 HDF5 files, building on the libraries provided by the HDF Group.")
3320 ;; The C sources are under a non-copyleft license, which looks like a
3321 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3322 (license (list license:asl2.0
3323 (license:non-copyleft "file://source/c/COPYING"))))))
3324
3325 (define-public java-classpathx-servletapi
3326 (package
3327 (name "java-classpathx-servletapi")
3328 (version "3.0.1")
3329 (source (origin
3330 (method url-fetch)
3331 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3332 "servletapi-" version ".tar.gz"))
3333 (sha256
3334 (base32
3335 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3336 (build-system ant-build-system)
3337 (arguments
3338 `(#:tests? #f ; there is no test target
3339 #:build-target "compile"
3340 #:make-flags
3341 (list "-Dbuild.compiler=javac1.8"
3342 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3343 #:phases
3344 (modify-phases %standard-phases
3345 (replace 'install
3346 (lambda* (#:key make-flags #:allow-other-keys)
3347 (apply invoke `("ant" "dist" ,@make-flags)))))))
3348 (home-page "https://www.gnu.org/software/classpathx/")
3349 (synopsis "Java servlet API implementation")
3350 (description "This is the GNU servlet API distribution, part of the
3351 ClasspathX project. It provides implementations of version 3.0 of the servlet
3352 API and version 2.1 of the Java ServerPages API.")
3353 (license license:gpl3+)))
3354
3355 (define-public java-javaee-servletapi
3356 (package
3357 (name "java-javaee-servletapi")
3358 (version "3.1.0")
3359 (source (origin
3360 (method git-fetch)
3361 (uri (git-reference
3362 (url "https://github.com/javaee/servlet-spec")
3363 (commit version)))
3364 (file-name (git-file-name name version))
3365 (sha256
3366 (base32
3367 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3368 (build-system ant-build-system)
3369 (arguments
3370 `(#:jar-name "javax-servletapi.jar"
3371 ;; no tests
3372 #:tests? #f
3373 #:source-dir "src/main/java"
3374 #:phases
3375 (modify-phases %standard-phases
3376 (add-before 'build 'copy-resources
3377 (lambda _
3378 (mkdir-p "build/classes/javax/servlet/http")
3379 (let ((from-prefix "src/main/java/javax/servlet/")
3380 (to-prefix "build/classes/javax/servlet/"))
3381 (for-each (lambda (f)
3382 (copy-file (string-append from-prefix f)
3383 (string-append to-prefix f)))
3384 (list "LocalStrings_ja.properties"
3385 "LocalStrings.properties"
3386 "LocalStrings_fr.properties"
3387 "http/LocalStrings_es.properties"
3388 "http/LocalStrings_ja.properties"
3389 "http/LocalStrings.properties"
3390 "http/LocalStrings_fr.properties")))
3391 #t)))))
3392 (native-inputs
3393 `(("unzip" ,unzip)))
3394 (home-page "https://javaee.github.io/servlet-spec/")
3395 (synopsis "Java servlet API")
3396 (description "Java Servlet is the foundation web specification in the
3397 Java Enterprise Platform. Developers can build web applications using the
3398 Servlet API to interact with the request/response workflow. This project
3399 provides information on the continued development of the Java Servlet
3400 specification.")
3401 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3402 ;; Some files are licensed under ASL 2.0.
3403 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3404
3405 (define-public java-swt
3406 (package
3407 (name "java-swt")
3408 (version "4.7.1a")
3409 (source
3410 ;; The types of many variables and procedures differ in the sources
3411 ;; dependent on whether the target architecture is a 32-bit system or a
3412 ;; 64-bit system. Instead of patching the sources on demand in a build
3413 ;; phase we download either the 32-bit archive (which mostly uses "int"
3414 ;; types) or the 64-bit archive (which mostly uses "long" types).
3415 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3416 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3417 (file32 "x86")
3418 (file64 "x86_64"))
3419 (let-values (((hash file)
3420 (match (or (%current-target-system) (%current-system))
3421 ("x86_64-linux" (values hash64 file64))
3422 (_ (values hash32 file32)))))
3423 (origin
3424 (method url-fetch)
3425 (uri (string-append
3426 "http://download.eclipse.org/eclipse/downloads/drops4/"
3427 "R-" version "-201710090410/swt-" version
3428 "-gtk-linux-" file ".zip"))
3429 (sha256 (base32 hash))))))
3430 (build-system ant-build-system)
3431 (arguments
3432 `(#:jar-name "swt.jar"
3433 #:jdk ,icedtea-8
3434 #:tests? #f ; no "check" target
3435 #:phases
3436 (modify-phases %standard-phases
3437 (replace 'unpack
3438 (lambda* (#:key source #:allow-other-keys)
3439 (mkdir "swt")
3440 (invoke "unzip" source "-d" "swt")
3441 (chdir "swt")
3442 (mkdir "src")
3443 (invoke "unzip" "src.zip" "-d" "src")))
3444 ;; The classpath contains invalid icecat jars. Since we don't need
3445 ;; anything other than the JDK on the classpath, we can simply unset
3446 ;; it.
3447 (add-after 'configure 'unset-classpath
3448 (lambda _ (unsetenv "CLASSPATH") #t))
3449 (add-before 'build 'build-native
3450 (lambda* (#:key inputs outputs #:allow-other-keys)
3451 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3452 ;; Build shared libraries. Users of SWT have to set the system
3453 ;; property swt.library.path to the "lib" directory of this
3454 ;; package output.
3455 (mkdir-p lib)
3456 (setenv "OUTPUT_DIR" lib)
3457 (with-directory-excursion "src"
3458 (invoke "bash" "build.sh")))))
3459 (add-after 'install 'install-native
3460 (lambda* (#:key outputs #:allow-other-keys)
3461 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3462 (for-each (lambda (file)
3463 (install-file file lib))
3464 (find-files "." "\\.so$"))
3465 #t))))))
3466 (inputs
3467 `(("gtk" ,gtk+-2)
3468 ("libxtst" ,libxtst)
3469 ("libxt" ,libxt)
3470 ("mesa" ,mesa)
3471 ("glu" ,glu)))
3472 (native-inputs
3473 `(("pkg-config" ,pkg-config)
3474 ("unzip" ,unzip)))
3475 (home-page "https://www.eclipse.org/swt/")
3476 (synopsis "Widget toolkit for Java")
3477 (description
3478 "SWT is a widget toolkit for Java designed to provide efficient, portable
3479 access to the user-interface facilities of the operating systems on which it
3480 is implemented.")
3481 ;; SWT code is licensed under EPL1.0
3482 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3483 ;; Cairo bindings contain code under MPL1.1
3484 ;; XULRunner 1.9 bindings contain code under MPL2.0
3485 (license (list
3486 license:epl1.0
3487 license:mpl1.1
3488 license:mpl2.0
3489 license:lgpl2.1+))))
3490
3491 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3492 ;; of the latest release.
3493 (define-public java-qdox-1.12
3494 (package
3495 (name "java-qdox")
3496 (version "1.12.1")
3497 (source (origin
3498 (method url-fetch)
3499 (uri (string-append "https://repo1.maven.org/maven2/"
3500 "com/thoughtworks/qdox/qdox/" version
3501 "/qdox-" version "-sources.jar"))
3502 (sha256
3503 (base32
3504 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3505 (build-system ant-build-system)
3506 (arguments
3507 `(;; Tests require junit
3508 #:tests? #f
3509 #:jar-name "qdox.jar"
3510 #:phases
3511 (modify-phases %standard-phases
3512 (replace 'unpack
3513 (lambda* (#:key source #:allow-other-keys)
3514 (mkdir "src")
3515 (with-directory-excursion "src"
3516 (invoke "jar" "-xf" source))))
3517 ;; At this point we don't have junit, so we must remove the API
3518 ;; tests.
3519 (add-after 'unpack 'delete-tests
3520 (lambda _
3521 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3522 #t)))))
3523 (home-page "https://github.com/codehaus/qdox")
3524 (synopsis "Parse definitions from Java source files")
3525 (description
3526 "QDox is a high speed, small footprint parser for extracting
3527 class/interface/method definitions from source files complete with JavaDoc
3528 @code{@@tags}. It is designed to be used by active code generators or
3529 documentation tools.")
3530 (license license:asl2.0)))
3531
3532 (define-public java-qdox
3533 (package
3534 (name "java-qdox")
3535 ; Newer version exists, but this version is required by java-plexus-component-metadata
3536 (version "2.0-M2")
3537 (source (origin
3538 (method url-fetch)
3539 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3540 ;; Older releases at https://github.com/codehaus/qdox/
3541 ;; Note: The release at maven is pre-generated. The release at
3542 ;; github requires jflex.
3543 (uri (string-append "https://repo1.maven.org/maven2/"
3544 "com/thoughtworks/qdox/qdox/" version
3545 "/qdox-" version "-sources.jar"))
3546 (sha256
3547 (base32
3548 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3549 (build-system ant-build-system)
3550 (arguments
3551 `(#:jar-name "qdox.jar"
3552 #:tests? #f; no tests
3553 #:modules
3554 ((guix build ant-build-system)
3555 (guix build java-utils)
3556 (guix build utils)
3557 (sxml simple))
3558 #:phases
3559 (modify-phases %standard-phases
3560 (add-before 'install 'create-pom
3561 (lambda _
3562 (with-output-to-file "pom.xml"
3563 (lambda _
3564 (sxml->xml
3565 `((project
3566 (modelVersion "4.0.0")
3567 (name "QDox")
3568 (groupId "com.thoughtworks.qdox")
3569 (artifactId "qdox")
3570 (version ,,version))))))
3571 #t))
3572 (replace 'install
3573 (install-from-pom "pom.xml")))))
3574 (home-page "https://github.com/codehaus/qdox")
3575 (synopsis "Parse definitions from Java source files")
3576 (description "QDox is a high speed, small footprint parser for extracting
3577 class/interface/method definitions from source files complete with JavaDoc
3578 @code{@@tags}. It is designed to be used by active code generators or
3579 documentation tools.")
3580 (license license:asl2.0)))
3581
3582 (define-public java-qdox-2-M9
3583 (package
3584 (inherit java-qdox)
3585 (version "2.0-M9"); required by plexus-java
3586 (source (origin
3587 (method url-fetch)
3588 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3589 ;; Older releases at https://github.com/codehaus/qdox/
3590 ;; Note: The release at maven is pre-generated. The release at
3591 ;; github requires jflex.
3592 (uri (string-append "https://repo1.maven.org/maven2/"
3593 "com/thoughtworks/qdox/qdox/" version
3594 "/qdox-" version "-sources.jar"))
3595 (sha256
3596 (base32
3597 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3598
3599 (define-public java-jarjar
3600 (package
3601 (name "java-jarjar")
3602 (version "1.4")
3603 (source (origin
3604 (method url-fetch)
3605 (uri (string-append
3606 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3607 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3608 (sha256
3609 (base32
3610 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3611 (modules '((guix build utils)))
3612 (snippet
3613 '(begin
3614 ;; Delete bundled thirds-party jar archives.
3615 (delete-file-recursively "lib")
3616 (delete-file "src/test/enumtest.jar")
3617 ;; the CLASSPATH needs this directory, create an empty one
3618 (mkdir-p "lib")
3619 #t))))
3620 (build-system ant-build-system)
3621 (arguments
3622 `(;; Tests require junit, which ultimately depends on this package.
3623 #:tests? #f
3624 #:build-target "jar"
3625 #:phases
3626 (modify-phases %standard-phases
3627 (add-before 'build 'do-not-use-bundled-asm
3628 (lambda* (#:key inputs #:allow-other-keys)
3629 (substitute* "build.xml"
3630 (("<path id=\"path.build\">")
3631 (string-append "<path id=\"path.build\"><fileset dir=\""
3632 (assoc-ref inputs "java-asm-bootstrap")
3633 "/lib/m2\" includes=\"**/*.jar\"/>"))
3634 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3635 (("lib/asm-commons-4.0.jar")
3636 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3637 "asm-6.0.jar")))
3638 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3639 (string-append "<include name=\"org/objectweb/asm/"
3640 "commons/Remap*.class\"/>"
3641 "<include name=\"org/objectweb/asm/*.class\"/>"
3642 "<include name=\"org/objectweb/asm/"
3643 "signature/*.class\"/>"
3644 "<include name=\"org/objectweb/asm/"
3645 "commons/SignatureRemapper.class\"/>")))
3646 #t))
3647 (add-before 'build 'remove-maven-dependency
3648 (lambda _
3649 ;; We do not need to build jarjar as a maven plugin just yet, so
3650 ;; remove this file. Maven requires jarjar (but not that plugin),
3651 ;; so removing it improves the bootstrap.
3652 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3653 #t))
3654 (replace 'install
3655 (lambda* (#:key outputs #:allow-other-keys)
3656 (let ((target (string-append (assoc-ref outputs "out")
3657 "/share/java")))
3658 (install-file (string-append "dist/jarjar-" ,version ".jar")
3659 target))
3660 #t)))))
3661 (inputs
3662 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3663 (native-inputs
3664 `(("unzip" ,unzip)))
3665 (home-page "https://code.google.com/archive/p/jarjar/")
3666 (synopsis "Repackage Java libraries")
3667 (description
3668 "Jar Jar Links is a utility that makes it easy to repackage Java
3669 libraries and embed them into your own distribution. Jar Jar Links includes
3670 an Ant task that extends the built-in @code{jar} task.")
3671 (license license:asl2.0)))
3672
3673 (define-public java-hamcrest-core
3674 (package
3675 (name "java-hamcrest-core")
3676 (version "1.3")
3677 (source (origin
3678 (method git-fetch)
3679 (uri (git-reference
3680 (url "https://github.com/hamcrest/JavaHamcrest/")
3681 (commit (string-append "hamcrest-java-" version))))
3682 (file-name (git-file-name name version))
3683 (sha256
3684 (base32
3685 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3686 (modules '((guix build utils)))
3687 (snippet
3688 '(begin
3689 ;; Delete bundled thirds-party jar archives.
3690 (delete-file-recursively "lib")
3691 #t))))
3692 (build-system ant-build-system)
3693 (arguments
3694 `(#:tests? #f ; Tests require junit
3695 #:modules ((guix build ant-build-system)
3696 (guix build java-utils)
3697 (guix build utils)
3698 (srfi srfi-1))
3699 #:make-flags (list (string-append "-Dversion=" ,version))
3700 #:test-target "unit-test"
3701 #:build-target "core"
3702 #:phases
3703 (modify-phases %standard-phases
3704 ;; Disable unit tests, because they require junit, which requires
3705 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3706 ;; attribute from the manifest for reproducibility.
3707 (add-before 'configure 'patch-build.xml
3708 (lambda _
3709 (substitute* "build.xml"
3710 (("unit-test, ") "")
3711 (("\\$\\{build.timestamp\\}") "guix"))
3712 #t))
3713 ;; Java's "getMethods()" returns methods in an unpredictable order.
3714 ;; To make the output of the generated code deterministic we must
3715 ;; sort the array of methods.
3716 (add-after 'unpack 'make-method-order-deterministic
3717 (lambda _
3718 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3719 (("import java\\.util\\.Iterator;" line)
3720 (string-append line "\n"
3721 "import java.util.Arrays; import java.util.Comparator;"))
3722 (("allMethods = cls\\.getMethods\\(\\);" line)
3723 (string-append "_" line
3724 "
3725 private Method[] getSortedMethods() {
3726 Arrays.sort(_allMethods, new Comparator<Method>() {
3727 @Override
3728 public int compare(Method a, Method b) {
3729 return a.toString().compareTo(b.toString());
3730 }
3731 });
3732 return _allMethods;
3733 }
3734
3735 private Method[] allMethods = getSortedMethods();")))
3736 #t))
3737 (add-before 'build 'do-not-use-bundled-qdox
3738 (lambda* (#:key inputs #:allow-other-keys)
3739 (substitute* "build.xml"
3740 (("lib/generator/qdox-1.12.jar")
3741 (string-append (assoc-ref inputs "java-qdox-1.12")
3742 "/share/java/qdox.jar")))
3743 #t))
3744 ;; build.xml searches for .jar files in this directoy, which
3745 ;; we remove from the source archive.
3746 (add-before 'build 'create-dummy-directories
3747 (lambda _
3748 (mkdir-p "lib/integration")
3749 #t))
3750 (add-before 'build 'create-pom
3751 (lambda _
3752 (substitute* "pom/hamcrest-core.pom"
3753 (("@VERSION@") ,version))
3754 #t))
3755 (replace 'install
3756 (install-from-pom "pom/hamcrest-core.pom")))))
3757 (native-inputs
3758 `(("java-qdox-1.12" ,java-qdox-1.12)
3759 ("java-jarjar" ,java-jarjar)))
3760 (propagated-inputs
3761 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3762 (home-page "http://hamcrest.org/")
3763 (synopsis "Library of matchers for building test expressions")
3764 (description
3765 "This package provides a library of matcher objects (also known as
3766 constraints or predicates) allowing @code{match} rules to be defined
3767 declaratively, to be used in other frameworks. Typical scenarios include
3768 testing frameworks, mocking libraries and UI validation rules.")
3769 (license license:bsd-2)))
3770
3771 (define java-hamcrest-parent-pom
3772 (package
3773 (inherit java-hamcrest-core)
3774 (name "java-hamcrest-parent-pom")
3775 (propagated-inputs '())
3776 (native-inputs '())
3777 (arguments
3778 `(#:tests? #f
3779 #:phases
3780 (modify-phases %standard-phases
3781 (delete 'configure)
3782 (replace 'build
3783 (lambda _
3784 (substitute* "pom/hamcrest-parent.pom"
3785 (("@VERSION@") ,(package-version java-hamcrest-core)))
3786 #t))
3787 (replace 'install
3788 (install-pom-file "pom/hamcrest-parent.pom")))))))
3789
3790 (define-public java-hamcrest-library
3791 (package
3792 (inherit java-hamcrest-core)
3793 (name "java-hamcrest-library")
3794 (arguments
3795 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3796 ((#:build-target _) "library")
3797 ((#:phases phases)
3798 `(modify-phases ,phases
3799 (replace 'create-pom
3800 (lambda _
3801 (substitute* "pom/hamcrest-library.pom"
3802 (("@VERSION@") ,(package-version java-hamcrest-core)))
3803 #t))
3804 (replace 'install
3805 (install-from-pom "pom/hamcrest-library.pom"))))))
3806 (propagated-inputs
3807 `(("java-hamcrest-core" ,java-hamcrest-core)
3808 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
3809
3810 (define-public java-junit
3811 (package
3812 (name "java-junit")
3813 (version "4.12")
3814 (source (origin
3815 (method git-fetch)
3816 (uri (git-reference
3817 (url "https://github.com/junit-team/junit/")
3818 (commit (string-append "r" version))))
3819 (file-name (git-file-name name version))
3820 (sha256
3821 (base32
3822 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3823 (modules '((guix build utils)))
3824 (snippet
3825 '(begin
3826 ;; Delete bundled jar archives.
3827 (delete-file-recursively "lib")
3828 #t))))
3829 (build-system ant-build-system)
3830 (arguments
3831 `(#:jar-name "junit.jar"
3832 #:source-dir "src/main/java"
3833 #:test-dir "src/test"
3834 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3835 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3836 #:phases
3837 (modify-phases %standard-phases
3838 (add-before 'check 'copy-test-resources
3839 (lambda _
3840 (copy-recursively "src/test/resources" "build/test-classes")
3841 #t))
3842 (replace 'install
3843 (install-from-pom "pom.xml")))))
3844 (propagated-inputs
3845 `(("java-hamcrest-core" ,java-hamcrest-core)))
3846 (native-inputs
3847 `(("java-hamcrest-library" ,java-hamcrest-library)))
3848 (home-page "https://junit.org/junit4/")
3849 (synopsis "Test framework for Java")
3850 (description
3851 "JUnit is a simple framework to write repeatable tests for Java projects.
3852 JUnit provides assertions for testing expected results, test fixtures for
3853 sharing common test data, and test runners for running tests.")
3854 (license license:epl1.0)))
3855
3856 (define-public java-junitparams
3857 (package
3858 (name "java-junitparams")
3859 (version "1.1.1")
3860 (source (origin
3861 (method git-fetch)
3862 (uri (git-reference
3863 (url "https://github.com/Pragmatists/JUnitParams")
3864 (commit (string-append "JUnitParams-" version))))
3865 (file-name (git-file-name name version))
3866 (sha256
3867 (base32
3868 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3869 (build-system ant-build-system)
3870 (arguments
3871 `(#:jar-name "junitparams.jar"
3872 #:source-dir "src/main/java"
3873 #:test-dir "src/test"
3874 #:test-exclude (list "**/SuperclassTest.java")))
3875 (inputs
3876 `(("java-junit" ,java-junit)))
3877 (native-inputs
3878 `(("java-junit" ,java-junit)
3879 ("java-hamcrest-core" ,java-hamcrest-core)
3880 ("java-assertj" ,java-assertj)))
3881 (home-page "https://github.com/Pragmatists/JUnitParams")
3882 (synopsis "Parameterised test support for JUnit")
3883 (description "The JUnitParams project adds a new runner to JUnit and
3884 provides much easier and readable parametrised tests for JUnit.")
3885 (license license:asl2.0)))
3886
3887 (define-public java-plexus-utils
3888 (package
3889 (name "java-plexus-utils")
3890 ;; sisu-build-api needs this version, later versions don't work
3891 (version "3.2.1")
3892 (source (origin
3893 (method git-fetch)
3894 (uri (git-reference
3895 (url "https://github.com/codehaus-plexus/plexus-utils")
3896 (commit (string-append "plexus-utils-" version))))
3897 (file-name (git-file-name name version))
3898 (sha256
3899 (base32
3900 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
3901 (build-system ant-build-system)
3902 ;; FIXME: The default build.xml does not include a target to install
3903 ;; javadoc files.
3904 (arguments
3905 `(#:jar-name "plexus-utils.jar"
3906 #:source-dir "src/main"
3907 #:phases
3908 (modify-phases %standard-phases
3909 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3910 (lambda _
3911 (substitute* "src/main/java/org/codehaus/plexus/util/\
3912 cli/shell/BourneShell.java"
3913 (("/bin/sh") (which "sh"))
3914 (("/usr/") (getcwd)))
3915 #t))
3916 (add-after 'unpack 'fix-or-disable-broken-tests
3917 (lambda _
3918 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3919 (substitute* '("cli/CommandlineTest.java"
3920 "cli/shell/BourneShellTest.java")
3921 (("/bin/sh") (which "sh"))
3922 (("/bin/echo") (which "echo")))
3923
3924 ;; This test depends on MavenProjectStub, but we don't have
3925 ;; a package for Maven.
3926 (delete-file "introspection/ReflectionValueExtractorTest.java")
3927
3928 ;; FIXME: The command line tests fail, maybe because they use
3929 ;; absolute paths.
3930 (delete-file "cli/CommandlineTest.java")
3931
3932 ;; These tests require openjdk jmh, which is not packaged yet
3933 (for-each delete-file (find-files "." "PerfTest.java$")))
3934 #t))
3935 (add-before 'build 'copy-resources
3936 (lambda _
3937 (copy-recursively "src/main/resources" "build/classes")
3938 #t))
3939 (replace 'install (install-from-pom "pom.xml")))))
3940 (native-inputs
3941 `(("java-hamcrest-core" ,java-hamcrest-core)
3942 ("java-junit" ,java-junit)))
3943 (propagated-inputs
3944 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
3945 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3946 (synopsis "Common utilities for the Plexus framework")
3947 (description "This package provides various Java utility classes for the
3948 Plexus framework to ease working with strings, files, command lines, XML and
3949 more.")
3950 (license license:asl2.0)))
3951
3952 (define-public java-plexus-utils-3.3.0
3953 (package
3954 (inherit java-plexus-utils)
3955 (version "3.3.0")
3956 (source (origin
3957 (method git-fetch)
3958 (uri (git-reference
3959 (url "https://github.com/codehaus-plexus/plexus-utils")
3960 (commit (string-append "plexus-utils-" version))))
3961 (file-name (git-file-name "java-plexus-utils" version))
3962 (sha256
3963 (base32
3964 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
3965
3966 (define-public java-plexus-interpolation
3967 (package
3968 (name "java-plexus-interpolation")
3969 (version "1.26")
3970 (source (origin
3971 (method git-fetch)
3972 (uri (git-reference
3973 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3974 (commit (string-append "plexus-interpolation-" version))))
3975 (file-name (git-file-name name version))
3976 (sha256
3977 (base32
3978 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
3979 (build-system ant-build-system)
3980 (arguments
3981 `(#:jar-name "plexus-interpolation.jar"
3982 #:source-dir "src/main"
3983 #:phases
3984 (modify-phases %standard-phases
3985 (replace 'install (install-from-pom "pom.xml")))))
3986 (propagated-inputs
3987 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3988 (native-inputs
3989 `(("java-junit" ,java-junit)
3990 ("java-hamcrest-core" ,java-hamcrest-core)))
3991 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3992 (synopsis "Java components for interpolating ${} strings and the like")
3993 (description "Plexus interpolator is a modular, flexible interpolation
3994 framework for the expression language style commonly seen in Maven, Plexus,
3995 and other related projects.
3996
3997 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3998 package within @code{plexus-utils}, but has been separated in order to allow
3999 these two libraries to vary independently of one another.")
4000 (license license:asl2.0)))
4001
4002 (define-public java-plexus-classworlds
4003 (package
4004 (name "java-plexus-classworlds")
4005 (version "2.6.0")
4006 (source (origin
4007 (method git-fetch)
4008 (uri (git-reference
4009 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4010 (commit (string-append "plexus-classworlds-" version))))
4011 (file-name (git-file-name name version))
4012 (sha256
4013 (base32
4014 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4015 (build-system ant-build-system)
4016 (arguments
4017 `(#:jar-name "plexus-classworlds.jar"
4018 #:source-dir "src/main"
4019 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4020 #:phases
4021 (modify-phases %standard-phases
4022 (replace 'install (install-from-pom "pom.xml")))))
4023 (propagated-inputs
4024 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4025 (native-inputs
4026 `(("java-junit" ,java-junit)))
4027 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4028 (synopsis "Java class loader framework")
4029 (description "Plexus classworlds replaces the native @code{ClassLoader}
4030 mechanism of Java. It is especially useful for dynamic loading of application
4031 components.")
4032 (license license:asl2.0)))
4033
4034 (define java-plexus-container-default-bootstrap
4035 (package
4036 (name "java-plexus-container-default-bootstrap")
4037 (version "1.7.1")
4038 (source (origin
4039 (method git-fetch)
4040 (uri (git-reference
4041 (url "https://github.com/codehaus-plexus/plexus-containers")
4042 (commit (string-append "plexus-containers-" version))))
4043 (file-name (git-file-name name version))
4044 (sha256
4045 (base32
4046 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4047 (build-system ant-build-system)
4048 (arguments
4049 `(#:jar-name "container-default.jar"
4050 #:source-dir "plexus-container-default/src/main/java"
4051 #:test-dir "plexus-container-default/src/test"
4052 #:tests? #f; requires plexus-archiver, which depends on this package
4053 #:phases
4054 (modify-phases %standard-phases
4055 (add-before 'build 'fix-google-collections
4056 (lambda _
4057 ;; Google collections are now replaced with guava
4058 (substitute* "plexus-container-default/pom.xml"
4059 (("google-collections") "guava")
4060 (("com.google.collections") "com.google.guava"))
4061 #t))
4062 (add-before 'build 'copy-resources
4063 (lambda _
4064 (copy-recursively
4065 "plexus-container-default/src/main/resources/"
4066 "build/classes")
4067 #t))
4068 (replace 'install
4069 (install-from-pom "plexus-container-default/pom.xml")))))
4070 (propagated-inputs
4071 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4072 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4073 ("java-plexus-utils" ,java-plexus-utils)
4074 ("java-junit" ,java-junit)
4075 ("java-guava" ,java-guava)
4076 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4077 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4078 (synopsis "Inversion-of-control container")
4079 (description "Plexus-default-container is Plexus' inversion-of-control
4080 (@dfn{IoC}) container. It is composed of its public API and its default
4081 implementation.")
4082 (license license:asl2.0)))
4083
4084 (define java-plexus-containers-parent-pom
4085 (package
4086 (inherit java-plexus-container-default-bootstrap)
4087 (name "java-plexus-containers-parent-pom")
4088 (arguments
4089 `(#:tests? #f
4090 #:phases
4091 (modify-phases %standard-phases
4092 (delete 'configure)
4093 (delete 'build)
4094 (replace 'install
4095 (install-pom-file "pom.xml")))))
4096 (propagated-inputs
4097 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4098
4099 (define-public java-plexus-io
4100 (package
4101 (name "java-plexus-io")
4102 (version "3.2.0")
4103 (source (origin
4104 (method git-fetch)
4105 (uri (git-reference
4106 (url "https://github.com/codehaus-plexus/plexus-io")
4107 (commit (string-append "plexus-io-" version))))
4108 (file-name (git-file-name name version))
4109 (sha256
4110 (base32
4111 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4112 (build-system ant-build-system)
4113 (arguments
4114 `(#:jar-name "plexus-io.jar"
4115 #:source-dir "src/main/java"
4116 #:test-dir "src/test"
4117 #:phases
4118 (modify-phases %standard-phases
4119 (add-before 'build 'copy-resources
4120 (lambda _
4121 (mkdir-p "build/classes")
4122 (copy-recursively "src/main/resources" "build/classes")
4123 (mkdir-p "build/test-classes")
4124 (copy-recursively "src/test/resources" "build/test-classes")
4125 #t))
4126 (replace 'install (install-from-pom "pom.xml")))))
4127 (propagated-inputs
4128 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4129 ("java-commons-io" ,java-commons-io)
4130 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4131 (inputs
4132 `(("java-jsr305" ,java-jsr305)))
4133 (native-inputs
4134 `(("junit" ,java-junit)
4135 ("hamcrest" ,java-hamcrest-core)
4136 ("guava" ,java-guava)
4137 ("classworlds" ,java-plexus-classworlds)
4138 ("xbean" ,java-geronimo-xbean-reflect)
4139 ("container-default" ,java-plexus-container-default-bootstrap)))
4140 (home-page "https://github.com/codehaus-plexus/plexus-io")
4141 (synopsis "I/O plexus components")
4142 (description "Plexus IO is a set of plexus components, which are designed
4143 for use in I/O operations. This implementation using plexus components allows
4144 reusing it in maven.")
4145 (license license:asl2.0)))
4146
4147 (define-public java-plexus-archiver
4148 (package
4149 (name "java-plexus-archiver")
4150 (version "4.2.2")
4151 (source (origin
4152 (method url-fetch)
4153 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4154 "/archive/plexus-archiver-" version ".tar.gz"))
4155 (sha256
4156 (base32
4157 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4158 (build-system ant-build-system)
4159 (arguments
4160 `(#:jar-name "plexus-archiver.jar"
4161 #:source-dir "src/main/java"
4162 #:test-dir "src/test"
4163 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4164 #:phases
4165 (modify-phases %standard-phases
4166 (add-before 'check 'remove-failing
4167 (lambda _
4168 ;; Requires an older version of plexus container
4169 (delete-file
4170 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4171 #t))
4172 (add-before 'check 'fix-test-building
4173 (lambda _
4174 (substitute* "build.xml"
4175 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4176 #t))
4177 (add-before 'build 'copy-resources
4178 (lambda _
4179 (mkdir-p "build/classes")
4180 (copy-recursively "src/main/resources" "build/classes")
4181 (mkdir-p "build/test-classes")
4182 (copy-recursively "src/test/resources" "build/test-classes")
4183 #t))
4184 (replace 'install (install-from-pom "pom.xml")))))
4185 (propagated-inputs
4186 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4187 ("java-plexus-io" ,java-plexus-io)
4188 ("java-iq80-snappy" ,java-iq80-snappy)
4189 ("java-commons-compress" ,java-commons-compress)
4190 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4191 (inputs
4192 `(("java-jsr305" ,java-jsr305)
4193 ("java-plexus-container-default"
4194 ,java-plexus-container-default-bootstrap)))
4195 (native-inputs
4196 `(("java-hamcrest-core" ,java-hamcrest-core)
4197 ("junit" ,java-junit)
4198 ("classworld" ,java-plexus-classworlds)
4199 ("xbean" ,java-geronimo-xbean-reflect)
4200 ("xz" ,java-xz)
4201 ("guava" ,java-guava)))
4202 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4203 (synopsis "Archiver component of the Plexus project")
4204 (description "Plexus-archiver contains a component to deal with project
4205 archives (jar).")
4206 (license license:asl2.0)))
4207
4208 (define-public java-plexus-container-default
4209 (package
4210 (inherit java-plexus-container-default-bootstrap)
4211 (name "java-plexus-container-default")
4212 (arguments
4213 `(#:jar-name "container-default.jar"
4214 #:source-dir "plexus-container-default/src/main/java"
4215 #:test-dir "plexus-container-default/src/test"
4216 #:test-exclude (list ;"**/*Test.java"
4217 "**/Abstract*.java"
4218 ;; Requires plexus-hierarchy
4219 "**/PlexusHierarchyTest.java"
4220 ;; Failures
4221 "**/ComponentRealmCompositionTest.java"
4222 "**/PlexusContainerTest.java")
4223 #:phases
4224 (modify-phases %standard-phases
4225 (add-before 'build 'fix-google-collections
4226 (lambda _
4227 ;; Google collections are now replaced with guava
4228 (substitute* "plexus-container-default/pom.xml"
4229 (("google-collections") "guava")
4230 (("com.google.collections") "com.google.guava"))
4231 #t))
4232 (add-before 'build 'copy-resources
4233 (lambda _
4234 (copy-recursively
4235 "plexus-container-default/src/main/resources/"
4236 "build/classes")
4237 #t))
4238 (add-before 'check 'fix-paths
4239 (lambda _
4240 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4241 (substitute*
4242 (string-append
4243 dir "/plexus/component/composition/"
4244 "ComponentRealmCompositionTest.java")
4245 (("src/test") "plexus-container-default/src/test"))
4246 #t)))
4247 (replace 'install
4248 (install-from-pom "plexus-container-default/pom.xml")))))
4249 (inputs
4250 `(("worldclass" ,java-plexus-classworlds)
4251 ("xbean" ,java-geronimo-xbean-reflect)
4252 ("utils" ,java-plexus-utils)
4253 ("junit" ,java-junit)
4254 ("guava" ,java-guava)))
4255 (native-inputs
4256 `(("archiver" ,java-plexus-archiver)
4257 ("hamcrest" ,java-hamcrest-core)))))
4258
4259 (define-public java-plexus-component-annotations
4260 (package
4261 (inherit java-plexus-container-default)
4262 (name "java-plexus-component-annotations")
4263 (arguments
4264 `(#:jar-name "plexus-component-annotations.jar"
4265 #:source-dir "plexus-component-annotations/src/main/java"
4266 #:tests? #f; no tests
4267 #:phases
4268 (modify-phases %standard-phases
4269 (replace 'install
4270 (install-from-pom "plexus-component-annotations/pom.xml")))))
4271 (propagated-inputs
4272 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4273 (inputs '())
4274 (native-inputs '())
4275 (synopsis "Plexus descriptors generator")
4276 (description "This package is a Maven plugin to generate Plexus descriptors
4277 from source tags and class annotations.")))
4278
4279 (define-public java-plexus-component-metadata
4280 (package
4281 (inherit java-plexus-container-default)
4282 (name "java-plexus-component-metadata")
4283 (arguments
4284 `(#:jar-name "plexus-component-metadata.jar"
4285 #:source-dir "src/main/java"
4286 #:test-dir "src/test"
4287 #:jdk ,icedtea-8
4288 #:phases
4289 (modify-phases %standard-phases
4290 (add-before 'configure 'chdir
4291 (lambda _
4292 (chdir "plexus-component-metadata")
4293 #t))
4294 (add-before 'build 'copy-resources
4295 (lambda _
4296 (copy-recursively "src/main/resources"
4297 "build/classes/")
4298 #t)))))
4299 (propagated-inputs
4300 `(("java-plexus-container-default" ,java-plexus-container-default)
4301 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4302 ("java-plexus-utils" ,java-plexus-utils)
4303 ("java-plexus-cli" ,java-plexus-cli)
4304 ("java-plexus-classworlds" ,java-plexus-classworlds)
4305 ("maven-plugin-api" ,maven-plugin-api)
4306 ("maven-plugin-annotations" ,maven-plugin-annotations)
4307 ("maven-core-bootstrap" ,maven-core-bootstrap)
4308 ("maven-model" ,maven-model)
4309 ("java-commons-cli" ,java-commons-cli)
4310 ("java-qdox" ,java-qdox)
4311 ("java-jdom2" ,java-jdom2)
4312 ("java-asm" ,java-asm)))
4313 (native-inputs
4314 `(("java-junit" ,java-junit)
4315 ("java-guava" ,java-guava)
4316 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4317 (synopsis "Inversion-of-control container for Maven")
4318 (description "The Plexus project provides a full software stack for creating
4319 and executing software projects. Based on the Plexus container, the
4320 applications can utilise component-oriented programming to build modular,
4321 reusable components that can easily be assembled and reused. This package
4322 provides the Maven plugin generating the component metadata.")))
4323
4324 (define-public java-plexus-cipher
4325 (package
4326 (name "java-plexus-cipher")
4327 (version "1.7")
4328 (source (origin
4329 (method git-fetch)
4330 (uri (git-reference
4331 (url "https://github.com/codehaus-plexus/plexus-cipher")
4332 (commit (string-append "plexus-cipher-" version))))
4333 (file-name (git-file-name name version))
4334 (sha256
4335 (base32
4336 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4337 (build-system ant-build-system)
4338 (arguments
4339 `(#:jar-name "plexus-cipher.jar"
4340 #:source-dir "src/main/java"
4341 #:tests? #f; FIXME: requires sisu-inject-bean
4342 #:phases
4343 (modify-phases %standard-phases
4344 (add-before 'build 'copy-resources
4345 (lambda _
4346 (copy-recursively "src/main/resources" "build/classes")
4347 (mkdir-p "build/classes/META-INF/sisu")
4348 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4349 (lambda _
4350 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4351 #t))
4352 (add-before 'install 'fix-test-dependency
4353 (lambda _
4354 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4355 (substitute* "pom.xml"
4356 (("provided") "test"))
4357 #t))
4358 (replace 'install (install-from-pom "pom.xml")))))
4359 (inputs
4360 `(("java-cdi-api" ,java-cdi-api)
4361 ("java-javax-inject" ,java-javax-inject)))
4362 (propagated-inputs
4363 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4364 (native-inputs
4365 `(("java-junit" ,java-junit)))
4366 (home-page "https://github.com/sonatype/plexus-cipher")
4367 (synopsis "Encryption/decryption Component")
4368 (description "Plexus-cipher contains a component to deal with encryption
4369 and decryption.")
4370 (license license:asl2.0)))
4371
4372 (define-public java-plexus-java
4373 (package
4374 (name "java-plexus-java")
4375 (version "0.9.10")
4376 (source (origin
4377 (method git-fetch)
4378 (uri (git-reference
4379 (url "https://github.com/codehaus-plexus/plexus-languages")
4380 (commit (string-append "plexus-languages-" version))))
4381 (file-name (git-file-name name version))
4382 (sha256
4383 (base32
4384 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4385 (modules '((guix build utils)))
4386 (snippet
4387 `(begin
4388 (for-each delete-file (find-files "." ".*.jar$"))
4389 #t))))
4390 (build-system ant-build-system)
4391 (arguments
4392 `(#:jar-name "plexus-java.java"
4393 #:source-dir "plexus-java/src/main/java"
4394 #:test-dir "plexus-java/src/test"
4395 #:tests? #f; require mockito 2
4396 #:phases
4397 (modify-phases %standard-phases
4398 (add-after 'build 'generate-metadata
4399 (lambda _
4400 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4401 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4402 "--source" "plexus-java/src/main/java"
4403 "--output" "build/classes/META-INF/plexus/components.xml"
4404 "--classes" "build/classes"
4405 "--descriptors" "build/classes/META-INF")
4406 (invoke "ant" "jar")
4407 #t))
4408 (add-before 'install 'install-parent
4409 (install-pom-file "pom.xml"))
4410 (replace 'install
4411 (install-from-pom "plexus-java/pom.xml")))))
4412 (propagated-inputs
4413 `(("java-asm" ,java-asm)
4414 ("java-qdox" ,java-qdox-2-M9)
4415 ("java-javax-inject" ,java-javax-inject)
4416 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4417 (inputs
4418 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4419 (native-inputs
4420 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4421 ("java-junit" ,java-junit)))
4422 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4423 (synopsis "Shared language features for Java")
4424 (description "This package contains shared language features of the Java
4425 language, for the plexus project.")
4426 (license license:asl2.0)))
4427
4428 (define-public java-plexus-compiler-api
4429 (package
4430 (name "java-plexus-compiler-api")
4431 (version "2.8.4")
4432 (source (origin
4433 (method git-fetch)
4434 (uri (git-reference
4435 (url "https://github.com/codehaus-plexus/plexus-compiler")
4436 (commit (string-append "plexus-compiler-" version))))
4437 (file-name (git-file-name name version))
4438 (sha256
4439 (base32
4440 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4441 (build-system ant-build-system)
4442 (arguments
4443 `(#:jar-name "plexus-compiler-api.jar"
4444 #:source-dir "plexus-compiler-api/src/main/java"
4445 #:test-dir "plexus-compiler-api/src/test"
4446 #:phases
4447 (modify-phases %standard-phases
4448 (replace 'install
4449 (install-from-pom "plexus-compiler-api/pom.xml")))))
4450 (propagated-inputs
4451 `(("java-plexus-container-default" ,java-plexus-container-default)
4452 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4453 ("java-plexus-util" ,java-plexus-utils)))
4454 (native-inputs
4455 `(("java-junit" ,java-junit)))
4456 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4457 (synopsis "Plexus Compilers component's API to manipulate compilers")
4458 (description "This package contains the API used by components to manipulate
4459 compilers.")
4460 (license (list license:asl2.0
4461 license:expat))))
4462
4463 (define java-plexus-compiler-pom
4464 (package
4465 (inherit java-plexus-compiler-api)
4466 (name "java-plexus-compiler-pom")
4467 (arguments
4468 `(#:tests? #f
4469 #:phases
4470 (modify-phases %standard-phases
4471 (delete 'configure)
4472 (delete 'build)
4473 (replace 'install
4474 (install-pom-file "pom.xml"))
4475 (add-after 'install 'install-compilers
4476 (install-pom-file "plexus-compilers/pom.xml")))))
4477 (propagated-inputs
4478 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4479
4480 (define plexus-components-parent-pom-4.0
4481 (package
4482 (name "plexus-components-parent-pom")
4483 (version "4.0")
4484 (source (origin
4485 (method git-fetch)
4486 (uri (git-reference
4487 (url "https://github.com/codehaus-plexus/plexus-components")
4488 (commit (string-append "plexus-components-" version))))
4489 (file-name (git-file-name name version))
4490 (sha256
4491 (base32
4492 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4493 (build-system ant-build-system)
4494 (arguments
4495 `(#:tests? #f
4496 #:phases
4497 (modify-phases %standard-phases
4498 (delete 'configure)
4499 (delete 'build)
4500 (replace 'install
4501 (install-pom-file "pom.xml")))))
4502 (propagated-inputs
4503 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4504 (home-page "https://codehaus-plexus.github.io/plexus-components")
4505 (synopsis "Plexus parent pom")
4506 (description "This package contains the Plexus components parent POM.")
4507 (license license:asl2.0)))
4508
4509 (define-public java-plexus-compiler-manager
4510 (package
4511 (inherit java-plexus-compiler-api)
4512 (name "java-plexus-compiler-manager")
4513 (arguments
4514 `(#:jar-name "compiler-compiler-manager.java"
4515 #:source-dir "plexus-compiler-manager/src/main/java"
4516 #:test-dir "plexus-compiler-manager/src/test"
4517 #:tests? #f
4518 #:phases
4519 (modify-phases %standard-phases
4520 (add-after 'build 'generate-metadata
4521 (lambda _
4522 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4523 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4524 "--source" "plexus-compiler-manager/src/main/java"
4525 "--output" "build/classes/META-INF/plexus/components.xml"
4526 "--classes" "build/classes"
4527 "--descriptors" "build/classes/META-INF")
4528 (invoke "ant" "jar")
4529 #t))
4530 (add-after 'generate-metadata 'rebuild
4531 (lambda _
4532 (invoke "ant" "jar")
4533 #t))
4534 (replace 'install
4535 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4536 (propagated-inputs
4537 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4538 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4539 ("java-plexus-container-default" ,java-plexus-container-default)))
4540 (native-inputs
4541 `(("unzip" ,unzip)
4542 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4543 (synopsis "Compiler management for Plexus Compiler component")
4544 (description "Plexus Compiler is a Plexus component to use different
4545 compilers through a uniform API. This component chooses the compiler
4546 implementation to use in a project.")))
4547
4548 (define-public java-plexus-compiler-javac
4549 (package
4550 (inherit java-plexus-compiler-api)
4551 (name "java-plexus-compiler-javac")
4552 (arguments
4553 `(#:jar-name "plexus-compiler-javac.jar"
4554 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4555 #:jdk ,icedtea-8
4556 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4557 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4558 #:modules ((guix build ant-build-system)
4559 (guix build utils)
4560 (guix build java-utils)
4561 (sxml simple))
4562 #:phases
4563 (modify-phases %standard-phases
4564 ;; We cannot use java-plexus-component-metadata to generate the metadata
4565 ;; because it ultimately depends on this package.
4566 ;; Create it manually instead
4567 (add-before 'build 'create-metadata
4568 (lambda _
4569 (let* ((dir "build/classes/META-INF/plexus")
4570 (file (string-append dir "/components.xml")))
4571 (mkdir-p dir)
4572 (with-output-to-file file
4573 (lambda _
4574 (sxml->xml
4575 `(component-set
4576 (components
4577 (component
4578 (role "org.codehaus.plexus.compiler.Compiler")
4579 (role-hint "javac")
4580 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4581 (isolated-realm "false"))))))))
4582 #t))
4583 (replace 'install
4584 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4585 (propagated-inputs
4586 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4587 ("java-plexus-utils" ,java-plexus-utils)
4588 ("java-plexus-container-default" ,java-plexus-container-default)))
4589 (synopsis "Javac Compiler support for Plexus Compiler component")
4590 (description "This package contains the Javac Compiler support for Plexus
4591 Compiler component.")))
4592
4593 (define plexus-components-pom-1.1.20
4594 (package
4595 (name "plexus-components-pom-1.1.20")
4596 (version "1.1.20")
4597 (source (origin
4598 (method git-fetch)
4599 (uri (git-reference
4600 (url "https://github.com/codehaus-plexus/plexus-components")
4601 (commit (string-append "plexus-components-" version))))
4602 (file-name (git-file-name name version))
4603 (sha256
4604 (base32
4605 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4606 (build-system ant-build-system)
4607 (arguments
4608 `(#:tests? #f
4609 #:phases
4610 (modify-phases %standard-phases
4611 (delete 'configure)
4612 (delete 'build)
4613 (replace 'install
4614 (install-pom-file "pom.xml")))))
4615 (propagated-inputs
4616 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4617 (home-page "https://github.com/codehaus-plexus/plexus-components")
4618 (synopsis "Maven parent pom for plexus packages")
4619 (description "This package contains the parent pom for plexus component
4620 packages.")
4621 (license license:asl2.0)))
4622
4623 (define-public java-plexus-digest
4624 (package
4625 (name "java-plexus-digest")
4626 (version "1.2")
4627 (source (origin
4628 (method git-fetch)
4629 (uri (git-reference
4630 (url "https://github.com/codehaus-plexus/plexus-digest")
4631 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4632 (file-name (git-file-name name version))
4633 (sha256
4634 (base32
4635 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4636 (build-system ant-build-system)
4637 (arguments
4638 `(#:jar-name "plexus-digest.jar"
4639 #:source-dir "src/main/java"
4640 #:tests? #f
4641 #:phases
4642 (modify-phases %standard-phases
4643 (replace 'install
4644 (install-from-pom "pom.xml")))))
4645 (propagated-inputs
4646 `(("java-plexus-utils" ,java-plexus-utils)
4647 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4648 (native-inputs
4649 `(("java-junit" ,java-junit)))
4650 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4651 (synopsis "Hash function utilities for Java")
4652 (description "This package is a plexus component that contains hash
4653 function utilities.")
4654 (license license:asl2.0)))
4655
4656 (define-public java-plexus-sec-dispatcher
4657 (package
4658 (name "java-plexus-sec-dispatcher")
4659 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4660 (source (origin
4661 ;; This project doesn't tag releases or publish tarballs, so we take
4662 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4663 (method git-fetch)
4664 (uri (git-reference
4665 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4666 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4667 (sha256
4668 (base32
4669 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4670 (file-name (git-file-name name version))))
4671 (arguments
4672 `(#:jar-name "plexus-sec-dispatcher.jar"
4673 #:source-dir "src/main/java"
4674 #:phases
4675 (modify-phases %standard-phases
4676 (add-before 'build 'generate-models
4677 (lambda* (#:key inputs #:allow-other-keys)
4678 (define (modello-single-mode file version mode)
4679 (invoke "java"
4680 "org.codehaus.modello.ModelloCli"
4681 file mode "src/main/java" version
4682 "false" "true"))
4683 (let ((file "src/main/mdo/settings-security.mdo"))
4684 (modello-single-mode file "1.0.0" "java")
4685 (modello-single-mode file "1.0.0" "xpp3-reader")
4686 (modello-single-mode file "1.0.0" "xpp3-writer"))
4687 #t))
4688 (add-before 'build 'generate-components.xml
4689 (lambda _
4690 (mkdir-p "build/classes/META-INF/plexus")
4691 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4692 (lambda _
4693 (display
4694 "<component-set>\n
4695 <components>\n
4696 <component>\n
4697 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4698 <role-hint>default</role-hint>\n
4699 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4700 <description></description>\n
4701 <requirements>\n
4702 <requirement>\n
4703 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4704 <field-name>_cipher</field-name>\n
4705 </requirement>\n
4706 <requirement>\n
4707 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4708 <field-name>_decryptors</field-name>\n
4709 </requirement>\n
4710 </requirements>\n
4711 <configuration>\n
4712 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4713 </configuration>\n
4714 </component>\n
4715 </components>\n
4716 </component-set>\n")))
4717 #t))
4718 (add-before 'check 'fix-paths
4719 (lambda _
4720 (copy-recursively "src/test/resources" "target")
4721 #t))
4722 (replace 'install (install-from-pom "pom.xml")))))
4723 (propagated-inputs
4724 `(("java-plexus-utils" ,java-plexus-utils)
4725 ("java-plexus-cipher" ,java-plexus-cipher)
4726 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4727 (native-inputs
4728 `(("java-modello-core" ,java-modello-core)
4729 ;; for modello:
4730 ("java-plexus-container-default" ,java-plexus-container-default)
4731 ("java-plexus-classworlds" ,java-plexus-classworlds)
4732 ("java-plexus-utils" ,java-plexus-utils)
4733 ("java-guava" ,java-guava)
4734 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4735 ("java-sisu-build-api" ,java-sisu-build-api)
4736 ;; modello plugins:
4737 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4738 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4739 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4740 ;; for tests
4741 ("java-junit" ,java-junit)))
4742 (build-system ant-build-system)
4743 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4744 (synopsis "Plexus Security Dispatcher Component")
4745 (description "This package is the Plexus Security Dispatcher Component.
4746 This component decrypts a string passed to it.")
4747 (license license:asl2.0)))
4748
4749 (define-public java-plexus-cli
4750 (package
4751 (name "java-plexus-cli")
4752 (version "1.7")
4753 (source (origin
4754 (method git-fetch)
4755 (uri (git-reference
4756 (url "https://github.com/sonatype/plexus-cli")
4757 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4758 (file-name (string-append name "-" version))
4759 (sha256
4760 (base32
4761 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4762 (build-system ant-build-system)
4763 (arguments
4764 `(#:jar-name "plexus-cli.jar"
4765 #:source-dir "src/main/java"
4766 #:jdk ,icedtea-8
4767 #:test-dir "src/test"))
4768 (inputs
4769 `(("java-commons-cli" ,java-commons-cli)
4770 ("java-plexus-container-default" ,java-plexus-container-default)
4771 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4772 (native-inputs
4773 `(("java-plexus-utils" ,java-plexus-utils)
4774 ("java-junit" ,java-junit)
4775 ("java-guava" ,java-guava)))
4776 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4777 (synopsis "CLI building library for plexus")
4778 (description "This package is a library to help creating CLI around
4779 Plexus components.")
4780 (license license:asl2.0)))
4781
4782 (define-public java-sisu-build-api
4783 (package
4784 (name "java-sisu-build-api")
4785 (version "0.0.7")
4786 (source (origin
4787 (method git-fetch)
4788 (uri (git-reference
4789 (url "https://github.com/sonatype/sisu-build-api")
4790 (commit (string-append "plexus-build-api-" version))))
4791 (file-name (git-file-name name version))
4792 (sha256
4793 (base32
4794 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4795 (build-system ant-build-system)
4796 (arguments
4797 `(#:jar-name "sisu-build-api.jar"
4798 #:source-dir "src/main/java"
4799 #:jdk ,icedtea-8
4800 #:tests? #f; FIXME: how to run the tests?
4801 #:phases
4802 (modify-phases %standard-phases
4803 (add-before 'build 'copy-resources
4804 (lambda _
4805 (copy-recursively "src/main/resources" "build/classes")
4806 (substitute* (find-files "build/classes")
4807 (("\\$\\{project.version\\}") ,version))
4808 #t))
4809 (add-before 'build 'generate-plexus-compontent
4810 (lambda _
4811 (mkdir-p "build/classes/META-INF/plexus")
4812 ;; This file is required for plexus to inject this package.
4813 ;; FIXME: how is it generated?
4814 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4815 (lambda _
4816 (display
4817 "<component-set>\n
4818 <components>\n
4819 <component>\n
4820 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4821 <role-hint>default</role-hint>\n
4822 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4823 <description>Filesystem based non-incremental build context implementation\n
4824 which behaves as if all files were just created.</description>\n
4825 </component>\n
4826 </components>\n
4827 </component-set>\n")))
4828 #t))
4829 (replace 'install
4830 (install-from-pom "pom.xml")))))
4831 (inputs
4832 `(("java-plexus-utils" ,java-plexus-utils)
4833 ("java-plexus-container-default" ,java-plexus-container-default)))
4834 (home-page "https://github.com/sonatype/sisu-build-api/")
4835 (synopsis "Base build API for maven")
4836 (description "This package contains the base build API for maven and
4837 a default implementation of it. This API is about scanning files in a
4838 project and determining what files need to be rebuilt.")
4839 (license license:asl2.0)))
4840
4841 (define-public java-modello-core
4842 (package
4843 (name "java-modello-core")
4844 (version "1.9.1")
4845 (source (origin
4846 (method git-fetch)
4847 (uri (git-reference
4848 (url "https://github.com/codehaus-plexus/modello")
4849 (commit (string-append "modello-" version))))
4850 (file-name (git-file-name name version))
4851 (sha256
4852 (base32
4853 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4854 (build-system ant-build-system)
4855 (arguments
4856 `(#:jar-name "modello-core.jar"
4857 #:source-dir "modello-core/src/main/java"
4858 #:test-dir "modello-core/src/test"
4859 #:main-class "org.codehaus.modello.ModelloCli"
4860 #:jdk ,icedtea-8
4861 #:phases
4862 (modify-phases %standard-phases
4863 (add-before 'build 'copy-resources
4864 (lambda _
4865 (mkdir-p "build/classes/META-INF/plexus")
4866 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4867 "build/classes/META-INF/plexus/components.xml")
4868 #t))
4869 (add-before 'check 'fix-tests
4870 (lambda _
4871 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4872 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4873 "modello/core/io/ModelReaderTest.java")
4874 (("src/test") "modello-core/src/test")))
4875 #t)))))
4876 (propagated-inputs
4877 `(("java-plexus-utils" ,java-plexus-utils)
4878 ("java-plexus-container-default" ,java-plexus-container-default)
4879 ("java-sisu-build-api" ,java-sisu-build-api)))
4880 (native-inputs
4881 `(("java-junit" ,java-junit)
4882 ("java-plexus-classworlds" ,java-plexus-classworlds)
4883 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4884 ("java-guava" ,java-guava)))
4885 (home-page "https://codehaus-plexus.github.io/modello/")
4886 (synopsis "Framework for code generation from a simple model")
4887 (description "Modello is a framework for code generation from a simple model.
4888
4889 Modello generates code from a simple model format: based on a plugin
4890 architecture, various types of code and descriptors can be generated from the
4891 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4892 XSD and documentation.")
4893 (license (list
4894 license:expat
4895 ;; Although this package uses only files licensed under expat,
4896 ;; other parts of the source are licensed under different
4897 ;; licenses. We include them to be inherited by other packages.
4898 license:asl2.0
4899 ;; Some files in modello-plugin-java are licensed under a
4900 ;; 5-clause BSD license.
4901 (license:non-copyleft
4902 (string-append "file:///modello-plugins/modello-plugin-java/"
4903 "src/main/java/org/codehaus/modello/plugin/"
4904 "java/javasource/JNaming.java"))))))
4905
4906 (define-public java-modello-plugins-java
4907 (package
4908 (inherit java-modello-core)
4909 (name "java-modello-plugins-java")
4910 (arguments
4911 `(#:jar-name "modello-plugins-java.jar"
4912 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4913 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4914 #:jdk ,icedtea-8
4915 #:tests? #f; requires maven-model, which depends on this package
4916 #:phases
4917 (modify-phases %standard-phases
4918 (add-before 'build 'copy-resources
4919 (lambda _
4920 (mkdir-p "build/classes")
4921 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4922 "build/classes")
4923 #t)))))
4924 (inputs
4925 `(("java-modello-core" ,java-modello-core)))
4926 (synopsis "Modello Java Plugin")
4927 (description "Modello Java Plugin generates Java objects for the model.")))
4928
4929 (define-public java-modello-plugins-xml
4930 (package
4931 (inherit java-modello-core)
4932 (name "java-modello-plugins-xml")
4933 (arguments
4934 `(#:jar-name "modello-plugins-xml.jar"
4935 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4936 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4937 #:jdk ,icedtea-8
4938 #:phases
4939 (modify-phases %standard-phases
4940 (add-before 'build 'copy-resources
4941 (lambda _
4942 (mkdir-p "build/classes")
4943 (copy-recursively
4944 "modello-plugins/modello-plugin-xml/src/main/resources"
4945 "build/classes")
4946 #t))
4947 (add-before 'check 'fix-paths
4948 (lambda _
4949 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4950 (substitute*
4951 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4952 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4953 #t)))))
4954 (propagated-inputs
4955 `(("java-modello-core" ,java-modello-core)
4956 ("java-modello-plugins-java" ,java-modello-plugins-java)))
4957 (synopsis "Modello XML Plugin")
4958 (description "Modello XML Plugin contains shared code for every plugins
4959 working on XML representation of the model.")))
4960
4961 (define-public java-modello-test
4962 (package
4963 (inherit java-modello-core)
4964 (name "java-modello-test")
4965 (arguments
4966 `(#:jar-name "modello-test.jar"
4967 #:source-dir "modello-test/src/main/java"
4968 #:tests? #f; no tests
4969 #:jdk ,icedtea-8))
4970 (inputs
4971 `(("java-plexus-utils" ,java-plexus-utils)
4972 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4973 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4974 ("java-plexus-container-default" ,java-plexus-container-default)))
4975 (synopsis "Modello test package")
4976 (description "The modello test package contains the basis to create
4977 Modello generator unit-tests, including sample models and xml files to test
4978 every feature for every plugin.")))
4979
4980 (define-public java-modello-plugins-xpp3
4981 (package
4982 (inherit java-modello-core)
4983 (name "java-modello-plugins-xpp3")
4984 (arguments
4985 `(#:jar-name "modello-plugins-xpp3.jar"
4986 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4987 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4988 ;; One of the test dependencies is maven-model which depends on this package.
4989 #:tests? #f
4990 #:jdk ,icedtea-8
4991 #:phases
4992 (modify-phases %standard-phases
4993 (add-before 'build 'copy-resources
4994 (lambda _
4995 (mkdir-p "build/classes")
4996 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4997 "build/classes")
4998 #t)))))
4999 (propagated-inputs
5000 `(("java-modello-core" ,java-modello-core)
5001 ("java-modello-plugins-java" ,java-modello-plugins-java)
5002 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5003 (native-inputs
5004 `(("java-xmlunit" ,java-xmlunit)
5005 ("java-modello-test" ,java-modello-test)
5006 ,@(package-native-inputs java-modello-core)))
5007 (synopsis "Modello XPP3 Plugin")
5008 (description "The modello XPP3 plugin generates XML readers and writers based
5009 on the XPP3 API (XML Pull Parser).")))
5010
5011 (define-public java-asm
5012 (package
5013 (name "java-asm")
5014 (version "6.0")
5015 (source (origin
5016 (method url-fetch)
5017 (uri (string-append "https://download.forge.ow2.org/asm/"
5018 "asm-" version ".tar.gz"))
5019 (sha256
5020 (base32
5021 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5022 (build-system ant-build-system)
5023 (arguments
5024 `(#:build-target "compile"
5025 ;; The tests require an old version of Janino, which no longer compiles
5026 ;; with the JDK7.
5027 #:tests? #f
5028 #:make-flags
5029 (list
5030 ;; We don't need these extra ant tasks, but the build system asks us to
5031 ;; provide a path anyway.
5032 "-Dobjectweb.ant.tasks.path=dummy-path"
5033 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5034 ;; used during the build automatically by ant-build-system, but
5035 ;; java-asm's build.xml fails unless we provide something here.
5036 "-Dbiz.aQute.bnd.path=dummy-path")
5037 #:phases
5038 (modify-phases %standard-phases
5039 (add-before 'build 'remove-bnd-dependency
5040 (lambda _
5041 ;; This file is the only one to require bnd, and is not needed
5042 ;; because we don't build a bundle.
5043 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5044 #t))
5045 (add-before 'install 'build-jars
5046 (lambda* (#:key make-flags #:allow-other-keys)
5047 ;; We cannot use the "jar" target because it depends on a couple
5048 ;; of unpackaged, complicated tools.
5049 (mkdir "dist")
5050 (invoke "jar"
5051 "-cf" (string-append "dist/asm-" ,version ".jar")
5052 "-C" "output/build/tmp" ".")))
5053 (add-before 'install 'fix-pom
5054 (lambda _
5055 (substitute* (find-files "archive" "\\.pom$")
5056 (("@product.artifact@") ,version))
5057 #t))
5058 (add-before 'install 'install-parent
5059 (install-pom-file "archive/asm-parent.pom"))
5060 (replace 'install
5061 (install-from-pom "archive/asm.pom")))))
5062 (native-inputs
5063 `(("java-junit" ,java-junit)))
5064 (propagated-inputs
5065 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5066 (home-page "https://asm.ow2.io/")
5067 (synopsis "Very small and fast Java bytecode manipulation framework")
5068 (description "ASM is an all purpose Java bytecode manipulation and
5069 analysis framework. It can be used to modify existing classes or dynamically
5070 generate classes, directly in binary form. The provided common
5071 transformations and analysis algorithms allow easily assembling custom
5072 complex transformations and code analysis tools.")
5073 (license license:bsd-3)))
5074
5075 (define java-org-ow2-parent-pom-1.3
5076 (package
5077 (name "java-org-ow2-parent-pom")
5078 (version "1.3")
5079 (source (origin
5080 (method url-fetch)
5081 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5082 (sha256
5083 (base32
5084 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5085 (build-system ant-build-system)
5086 (arguments
5087 `(#:tests? #f
5088 #:phases
5089 (modify-phases %standard-phases
5090 (delete 'unpack)
5091 (delete 'build)
5092 (delete 'configure)
5093 (replace 'install
5094 (install-pom-file (assoc-ref %build-inputs "source"))))))
5095 (home-page "https://ow2.org")
5096 (synopsis "Ow2.org parent pom")
5097 (description "This package contains the parent pom for projects from ow2.org,
5098 including java-asm.")
5099 (license license:lgpl2.1+)))
5100
5101 (define java-asm-bootstrap
5102 (package
5103 (inherit java-asm)
5104 (name "java-asm-bootstrap")
5105 (arguments
5106 (substitute-keyword-arguments (package-arguments java-asm)
5107 ((#:tests? _) #f)))
5108 (native-inputs `())))
5109
5110 (define-public java-cglib
5111 (package
5112 (name "java-cglib")
5113 (version "3.2.4")
5114 (source
5115 (origin
5116 (method git-fetch)
5117 (uri (git-reference
5118 (url "https://github.com/cglib/cglib")
5119 (commit (string-append
5120 "RELEASE_"
5121 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5122 version)))))
5123 (file-name (git-file-name name version))
5124 (sha256
5125 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5126 (build-system ant-build-system)
5127 (arguments
5128 `(;; FIXME: tests fail because junit runs
5129 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5130 ;; to describe a test at all.
5131 #:tests? #f
5132 #:jar-name "cglib.jar"
5133 #:phases
5134 (modify-phases %standard-phases
5135 (add-after 'unpack 'chdir
5136 (lambda _ (chdir "cglib") #t)))))
5137 (inputs
5138 `(("java-asm" ,java-asm)
5139 ("java-junit" ,java-junit)))
5140 (home-page "https://github.com/cglib/cglib/")
5141 (synopsis "Java byte code generation library")
5142 (description "The byte code generation library CGLIB is a high level API
5143 to generate and transform Java byte code.")
5144 (license license:asl2.0)))
5145
5146 (define-public java-objenesis
5147 (package
5148 (name "java-objenesis")
5149 (version "2.5.1")
5150 (source (origin
5151 (method git-fetch)
5152 (uri (git-reference
5153 (url "https://github.com/easymock/objenesis")
5154 (commit version)))
5155 (file-name (git-file-name name version))
5156 (sha256
5157 (base32
5158 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5159 (build-system ant-build-system)
5160 (arguments
5161 `(#:jar-name "objenesis.jar"
5162 #:source-dir "main/src/"
5163 #:test-dir "main/src/test/"))
5164 (native-inputs
5165 `(("java-junit" ,java-junit)
5166 ("java-hamcrest-core" ,java-hamcrest-core)))
5167 (home-page "http://objenesis.org/")
5168 (synopsis "Bypass the constructor when creating an object")
5169 (description "Objenesis is a small Java library that serves one purpose:
5170 to instantiate a new object of a particular class. It is common to see
5171 restrictions in libraries stating that classes must require a default
5172 constructor. Objenesis aims to overcome these restrictions by bypassing the
5173 constructor on object instantiation.")
5174 (license license:asl2.0)))
5175
5176 (define-public java-easymock
5177 (package
5178 (name "java-easymock")
5179 (version "3.4")
5180 (source (origin
5181 (method git-fetch)
5182 (uri (git-reference
5183 (url "https://github.com/easymock/easymock/")
5184 (commit (string-append "easymock-" version))))
5185 (file-name (git-file-name name version))
5186 (sha256
5187 (base32
5188 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5189 (build-system ant-build-system)
5190 (arguments
5191 `(#:jar-name "easymock.jar"
5192 #:source-dir "core/src/main"
5193 #:test-dir "core/src/test"
5194 #:phases
5195 (modify-phases %standard-phases
5196 ;; FIXME: Android support requires the following packages to be
5197 ;; available: com.google.dexmaker.stock.ProxyBuilder
5198 (add-after 'unpack 'delete-android-support
5199 (lambda _
5200 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5201 (substitute* "MocksControl.java"
5202 (("AndroidSupport.isAndroid\\(\\)") "false")
5203 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5204 (delete-file "AndroidClassProxyFactory.java"))
5205 #t))
5206 (add-after 'unpack 'delete-broken-tests
5207 (lambda _
5208 (with-directory-excursion "core/src/test/java/org/easymock"
5209 ;; This test depends on dexmaker.
5210 (delete-file "tests2/ClassExtensionHelperTest.java")
5211
5212 ;; This is not a test.
5213 (delete-file "tests/BaseEasyMockRunnerTest.java")
5214
5215 ;; This test should be executed with a different runner...
5216 (delete-file "tests2/EasyMockAnnotationsTest.java")
5217 ;; ...but deleting it means that we also have to delete these
5218 ;; dependent files.
5219 (delete-file "tests2/EasyMockRunnerTest.java")
5220 (delete-file "tests2/EasyMockRuleTest.java")
5221
5222 ;; This test fails because the file "easymock.properties" does
5223 ;; not exist.
5224 (delete-file "tests2/EasyMockPropertiesTest.java"))
5225 #t)))))
5226 (inputs
5227 `(("java-asm" ,java-asm)
5228 ("java-cglib" ,java-cglib)
5229 ("java-objenesis" ,java-objenesis)))
5230 (native-inputs
5231 `(("java-junit" ,java-junit)
5232 ("java-hamcrest-core" ,java-hamcrest-core)))
5233 (home-page "https://easymock.org/")
5234 (synopsis "Java library providing mock objects for unit tests")
5235 (description "EasyMock is a Java library that provides an easy way to use
5236 mock objects in unit testing.")
5237 (license license:asl2.0)))
5238
5239 (define-public java-jmock-1
5240 (package
5241 (name "java-jmock")
5242 (version "1.2.0")
5243 (source (origin
5244 (method git-fetch)
5245 (uri (git-reference
5246 (url "https://github.com/jmock-developers/jmock-library")
5247 (commit version)))
5248 (file-name (git-file-name name version))
5249 (sha256
5250 (base32
5251 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5252 (build-system ant-build-system)
5253 (arguments
5254 `(#:build-target "jars"
5255 #:test-target "run.tests"
5256 #:phases
5257 (modify-phases %standard-phases
5258 (replace 'install (install-jars "build")))))
5259 (home-page "http://jmock.org/")
5260 (synopsis "Mock object library for test-driven development")
5261 (description "JMock is a library that supports test-driven development of
5262 Java code with mock objects. Mock objects help you design and test the
5263 interactions between the objects in your programs.
5264
5265 The jMock library
5266
5267 @itemize
5268 @item makes it quick and easy to define mock objects
5269 @item lets you precisely specify the interactions between
5270 your objects, reducing the brittleness of your tests
5271 @item plugs into your favourite test framework
5272 @item is easy to extend.
5273 @end itemize\n")
5274 (license license:bsd-3)))
5275
5276 (define-public java-jmock
5277 (package
5278 (inherit java-jmock-1)
5279 (name "java-jmock")
5280 (version "2.8.2")
5281 (source (origin
5282 (method git-fetch)
5283 (uri (git-reference
5284 (url "https://github.com/jmock-developers/jmock-library")
5285 (commit version)))
5286 (file-name (git-file-name name version))
5287 (sha256
5288 (base32
5289 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5290 (inputs
5291 `(("java-hamcrest-all" ,java-hamcrest-all)
5292 ("java-asm" ,java-asm)
5293 ("java-bsh" ,java-bsh)
5294 ("java-junit" ,java-junit)))
5295 (native-inputs
5296 `(("cglib" ,java-cglib)))
5297 (arguments
5298 `(#:jar-name "java-jmock.jar"
5299 #:source-dir "jmock/src/main/java"
5300 #:test-dir "jmock/src/test"))))
5301
5302 (define-public java-jmock-junit4
5303 (package
5304 (inherit java-jmock)
5305 (name "java-jmock-junit4")
5306 (arguments
5307 `(#:jar-name "java-jmock-junit4.jar"
5308 #:source-dir "jmock-junit4/src/main/java"
5309 #:test-dir "jmock-junit4/src/test"))
5310 (inputs
5311 `(("java-hamcrest-all" ,java-hamcrest-all)
5312 ("java-asm" ,java-asm)
5313 ("java-bsh" ,java-bsh)
5314 ("java-jmock" ,java-jmock)
5315 ("java-jumit" ,java-junit)))))
5316
5317 (define-public java-jmock-legacy
5318 (package
5319 (inherit java-jmock)
5320 (name "java-jmock-legacy")
5321 (arguments
5322 `(#:jar-name "java-jmock-legacy.jar"
5323 #:source-dir "jmock-legacy/src/main/java"
5324 #:test-dir "jmock-legacy/src/test"
5325 #:phases
5326 (modify-phases %standard-phases
5327 (add-before 'check 'copy-tests
5328 (lambda _
5329 ;; This file is a dependancy of some tests
5330 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5331 (copy-file (string-append "jmock/src/test/java/" file)
5332 (string-append "jmock-legacy/src/test/java/" file))
5333 #t))))))
5334 (inputs
5335 `(("java-hamcrest-all" ,java-hamcrest-all)
5336 ("java-objenesis" ,java-objenesis)
5337 ("java-cglib" ,java-cglib)
5338 ("java-jmock" ,java-jmock)
5339 ("java-asm" ,java-asm)
5340 ("java-bsh" ,java-bsh)
5341 ("java-junit" ,java-junit)))
5342 (native-inputs
5343 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5344
5345 (define-public java-hamcrest-all
5346 (package (inherit java-hamcrest-core)
5347 (name "java-hamcrest-all")
5348 (arguments
5349 `(#:jdk ,icedtea-8
5350 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5351 ((#:build-target _) "bigjar")
5352 ((#:phases phases)
5353 `(modify-phases ,phases
5354 ;; Some build targets override the classpath, so we need to patch
5355 ;; the build.xml to ensure that required dependencies are on the
5356 ;; classpath.
5357 (add-after 'unpack 'patch-classpath-for-integration
5358 (lambda* (#:key inputs #:allow-other-keys)
5359 (substitute* "build.xml"
5360 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5361 (string-join
5362 (cons line
5363 (append
5364 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5365 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5366 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5367 ";"))
5368 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5369 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5370 "jar$"))))
5371 #t))
5372 (replace 'install
5373 (lambda* (#:key outputs #:allow-other-keys)
5374 (let* ((target (string-append (assoc-ref outputs "out")
5375 "/share/java/"))
5376 (version-suffix
5377 ,(string-append
5378 "-" (package-version java-hamcrest-core) ".jar"))
5379 (install-without-version-suffix
5380 (lambda (jar)
5381 (copy-file jar
5382 (string-append target
5383 (basename jar version-suffix)
5384 ".jar")))))
5385 (mkdir-p target)
5386 (for-each
5387 install-without-version-suffix
5388 (find-files "build"
5389 (lambda (name _)
5390 (and (string-suffix? ".jar" name)
5391 (not (string-suffix? "-sources.jar" name)))))))
5392 #t)))))))
5393 (inputs
5394 `(("java-junit" ,java-junit)
5395 ("java-jmock" ,java-jmock-1)
5396 ;; This is necessary because of what seems to be a race condition.
5397 ;; This package would sometimes fail to build because hamcrest-core.jar
5398 ;; could not be found, even though it is built as part of this package.
5399 ;; Adding java-hamcrest-core appears to fix this problem. See
5400 ;; https://debbugs.gnu.org/31390 for more information.
5401 ("java-hamcrest-core" ,java-hamcrest-core)
5402 ("java-easymock" ,java-easymock)
5403 ,@(package-inputs java-hamcrest-core)))))
5404
5405 (define-public java-jopt-simple
5406 (package
5407 (name "java-jopt-simple")
5408 (version "5.0.3")
5409 (source (origin
5410 (method url-fetch)
5411 (uri (string-append "http://repo1.maven.org/maven2/"
5412 "net/sf/jopt-simple/jopt-simple/"
5413 version "/jopt-simple-"
5414 version "-sources.jar"))
5415 (sha256
5416 (base32
5417 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5418 (build-system ant-build-system)
5419 (arguments
5420 `(#:tests? #f ; there are no tests
5421 #:jar-name "jopt-simple.jar"))
5422 (home-page "https://pholser.github.io/jopt-simple/")
5423 (synopsis "Java library for parsing command line options")
5424 (description "JOpt Simple is a Java library for parsing command line
5425 options, such as those you might pass to an invocation of @code{javac}. In
5426 the interest of striving for simplicity, as closely as possible JOpt Simple
5427 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5428 GNU @code{getopt_long}. It also aims to make option parser configuration and
5429 retrieval of options and their arguments simple and expressive, without being
5430 overly clever.")
5431 (license license:expat)))
5432
5433 (define-public java-commons-math3
5434 (package
5435 (name "java-commons-math3")
5436 (version "3.6.1")
5437 (source (origin
5438 (method url-fetch)
5439 (uri (string-append "mirror://apache/commons/math/source/"
5440 "commons-math3-" version "-src.tar.gz"))
5441 (sha256
5442 (base32
5443 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5444 (build-system ant-build-system)
5445 (arguments
5446 `(#:build-target "jar"
5447 #:test-target "test"
5448 #:make-flags
5449 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5450 (junit (assoc-ref %build-inputs "java-junit")))
5451 (list (string-append "-Djunit.jar="
5452 (car (find-files junit "jar$")))
5453 (string-append "-Dhamcrest.jar="
5454 (car (find-files hamcrest ".*.jar$")))))
5455 #:phases
5456 (modify-phases %standard-phases
5457 ;; We want to build the jar in the build phase and run the tests
5458 ;; later in a separate phase.
5459 (add-after 'unpack 'untangle-targets
5460 (lambda _
5461 (substitute* "build.xml"
5462 (("name=\"jar\" depends=\"test\"")
5463 "name=\"jar\" depends=\"compile\""))
5464 #t))
5465 ;; There is no install target.
5466 (replace 'install
5467 (install-jars "target")))))
5468 (native-inputs
5469 `(("java-junit" ,java-junit)
5470 ("java-hamcrest-core" ,java-hamcrest-core)))
5471 (home-page "https://commons.apache.org/math/")
5472 (synopsis "Apache Commons mathematics library")
5473 (description "Commons Math is a library of lightweight, self-contained
5474 mathematics and statistics components addressing the most common problems not
5475 available in the Java programming language or Commons Lang.")
5476 (license license:asl2.0)))
5477
5478 (define-public java-jmh
5479 (package
5480 (name "java-jmh")
5481 (version "1.17.5")
5482 (source (origin
5483 (method hg-fetch)
5484 (uri (hg-reference
5485 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5486 (changeset version)))
5487 (file-name (string-append name "-" version "-checkout"))
5488 (sha256
5489 (base32
5490 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5491 (build-system ant-build-system)
5492 (arguments
5493 `(#:jar-name "jmh-core.jar"
5494 #:source-dir "jmh-core/src/main"
5495 #:test-dir "jmh-core/src/test"
5496 #:phases
5497 (modify-phases %standard-phases
5498 ;; This seems to be a bug in the JDK. It may not be necessary in
5499 ;; future versions of the JDK.
5500 (add-after 'unpack 'fix-bug
5501 (lambda _
5502 (with-directory-excursion
5503 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5504 (substitute* '("IntegerValueConverter.java"
5505 "ThreadsValueConverter.java")
5506 (("public Class<Integer> valueType")
5507 "public Class<? extends Integer> valueType")))
5508 #t)))))
5509 (inputs
5510 `(("java-jopt-simple" ,java-jopt-simple)
5511 ("java-commons-math3" ,java-commons-math3)))
5512 (native-inputs
5513 `(("java-junit" ,java-junit)
5514 ("java-hamcrest-core" ,java-hamcrest-core)))
5515 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5516 (synopsis "Benchmark harness for the JVM")
5517 (description "JMH is a Java harness for building, running, and analysing
5518 nano/micro/milli/macro benchmarks written in Java and other languages
5519 targeting the JVM.")
5520 ;; GPLv2 only
5521 (license license:gpl2)))
5522
5523 (define-public java-commons-collections4
5524 (package
5525 (name "java-commons-collections4")
5526 (version "4.1")
5527 (source (origin
5528 (method url-fetch)
5529 (uri (string-append "mirror://apache/commons/collections/source/"
5530 "commons-collections4-" version "-src.tar.gz"))
5531 (sha256
5532 (base32
5533 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5534 (build-system ant-build-system)
5535 (arguments
5536 `(#:test-target "test"
5537 #:make-flags
5538 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5539 (junit (assoc-ref %build-inputs "java-junit"))
5540 (easymock (assoc-ref %build-inputs "java-easymock")))
5541 (list (string-append "-Djunit.jar="
5542 (car (find-files junit "jar$")))
5543 (string-append "-Dhamcrest.jar="
5544 (car (find-files hamcrest "jar$")))
5545 (string-append "-Deasymock.jar=" easymock
5546 "/share/java/easymock.jar")))
5547 #:phases
5548 (modify-phases %standard-phases
5549 (replace 'install
5550 (install-jars "target")))))
5551 (native-inputs
5552 `(("java-junit" ,java-junit)
5553 ("java-hamcrest-core" ,java-hamcrest-core)
5554 ("java-easymock" ,java-easymock)))
5555 (home-page "https://commons.apache.org/collections/")
5556 (synopsis "Collections framework")
5557 (description "The Java Collections Framework is the recognised standard
5558 for collection handling in Java. Commons-Collections seek to build upon the
5559 JDK classes by providing new interfaces, implementations and utilities. There
5560 are many features, including:
5561
5562 @itemize
5563 @item @code{Bag} interface for collections that have a number of copies of
5564 each object
5565 @item @code{BidiMap} interface for maps that can be looked up from value to
5566 key as well and key to value
5567 @item @code{MapIterator} interface to provide simple and quick iteration over
5568 maps
5569 @item Transforming decorators that alter each object as it is added to the
5570 collection
5571 @item Composite collections that make multiple collections look like one
5572 @item Ordered maps and sets that retain the order elements are added in,
5573 including an LRU based map
5574 @item Reference map that allows keys and/or values to be garbage collected
5575 under close control
5576 @item Many comparator implementations
5577 @item Many iterator implementations
5578 @item Adapter classes from array and enumerations to collections
5579 @item Utilities to test or create typical set-theory properties of collections
5580 such as union, intersection, and closure.
5581 @end itemize\n")
5582 (license license:asl2.0)))
5583
5584 (define-public java-commons-collections
5585 (package
5586 (inherit java-commons-collections4)
5587 (name "java-commons-collections")
5588 (version "3.2.2")
5589 (source (origin
5590 (method url-fetch)
5591 (uri (string-append "mirror://apache/commons/collections/source/"
5592 "commons-collections-" version "-src.tar.gz"))
5593 (sha256
5594 (base32
5595 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5596 (patches
5597 (search-patches "java-commons-collections-fix-java8.patch"))))
5598 (arguments
5599 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5600 ((#:phases phases)
5601 `(modify-phases ,phases
5602 ;; The manifest is required by the build procedure
5603 (add-before 'build 'add-manifest
5604 (lambda _
5605 (mkdir-p "build/conf")
5606 (call-with-output-file "build/conf/MANIFEST.MF"
5607 (lambda (file)
5608 (format file "Manifest-Version: 1.0\n")))
5609 #t))
5610 (replace 'install
5611 (install-jars "build"))))))))
5612
5613 (define java-commons-collections-test-classes
5614 (package
5615 (inherit java-commons-collections)
5616 (arguments
5617 `(#:jar-name "commons-collections-test-classes.jar"
5618 #:source-dir "src/test"
5619 #:tests? #f))
5620 (inputs
5621 `(("collection" ,java-commons-collections)))))
5622
5623 (define-public java-commons-beanutils
5624 (package
5625 (name "java-commons-beanutils")
5626 (version "1.9.3")
5627 (source (origin
5628 (method url-fetch)
5629 (uri (string-append "mirror://apache/commons/beanutils/source/"
5630 "commons-beanutils-" version "-src.tar.gz"))
5631 (sha256
5632 (base32
5633 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5634 (build-system ant-build-system)
5635 (arguments
5636 `(#:test-target "test"
5637 #:tests? #f
5638 #:phases
5639 (modify-phases %standard-phases
5640 (replace 'install
5641 (lambda* (#:key outputs #:allow-other-keys)
5642 (rename-file (string-append "dist/commons-beanutils-" ,version
5643 "-SNAPSHOT.jar")
5644 "commons-beanutils.jar")
5645 (install-file "commons-beanutils.jar"
5646 (string-append (assoc-ref outputs "out") "/share/java/"))
5647 #t)))))
5648 (inputs
5649 `(("logging" ,java-commons-logging-minimal)
5650 ("collections" ,java-commons-collections)))
5651 (native-inputs
5652 `(("junit" ,java-junit)
5653 ("collections-test" ,java-commons-collections-test-classes)))
5654 (home-page "https://commons.apache.org/beanutils/")
5655 (synopsis "Dynamically set or get properties in Java")
5656 (description "BeanUtils provides a simplified interface to reflection and
5657 introspection to set or get dynamically determined properties through their
5658 setter and getter method.")
5659 (license license:asl2.0)))
5660
5661 (define-public java-commons-io
5662 (package
5663 (name "java-commons-io")
5664 (version "2.5")
5665 (source
5666 (origin
5667 (method url-fetch)
5668 (uri (string-append "mirror://apache/commons/io/source/"
5669 "commons-io-" version "-src.tar.gz"))
5670 (sha256
5671 (base32
5672 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5673 (build-system ant-build-system)
5674 (outputs '("out" "doc"))
5675 (arguments
5676 `(#:test-target "test"
5677 #:make-flags
5678 (list (string-append "-Djunit.jar="
5679 (car (find-files (assoc-ref %build-inputs "java-junit")
5680 "jar$"))))
5681 #:phases
5682 (modify-phases %standard-phases
5683 (add-after 'build 'build-javadoc ant-build-javadoc)
5684 (replace 'install (install-from-pom "pom.xml"))
5685 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5686 (native-inputs
5687 `(("java-junit" ,java-junit)
5688 ("java-hamcrest-core" ,java-hamcrest-core)))
5689 (propagated-inputs
5690 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5691 (home-page "https://commons.apache.org/io/")
5692 (synopsis "Common useful IO related classes")
5693 (description "Commons-IO contains utility classes, stream implementations,
5694 file filters and endian classes.")
5695 (license license:asl2.0)))
5696
5697 (define-public java-commons-exec-1.1
5698 (package
5699 (name "java-commons-exec")
5700 (version "1.1")
5701 (source
5702 (origin
5703 (method url-fetch)
5704 (uri (string-append "mirror://apache/commons/exec/source/"
5705 "commons-exec-" version "-src.tar.gz"))
5706 (sha256
5707 (base32
5708 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5709 (build-system ant-build-system)
5710 (arguments
5711 `(#:test-target "test"
5712 #:make-flags
5713 (list (string-append "-Dmaven.junit.jar="
5714 (car (find-files (assoc-ref %build-inputs "java-junit")
5715 "jar$"))))
5716 #:phases
5717 (modify-phases %standard-phases
5718 (add-before 'build 'delete-network-tests
5719 (lambda _
5720 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5721 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5722 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5723 #t))
5724 ;; The "build" phase automatically tests.
5725 (delete 'check)
5726 (replace 'install (install-jars "target")))))
5727 (native-inputs
5728 `(("java-junit" ,java-junit)))
5729 (home-page "https://commons.apache.org/proper/commons-exec/")
5730 (synopsis "Common program execution related classes")
5731 (description "Commons-Exec simplifies executing external processes.")
5732 (license license:asl2.0)))
5733
5734 (define-public java-commons-exec
5735 (package
5736 (inherit java-commons-exec-1.1)
5737 (version "1.3")
5738 (source
5739 (origin
5740 (method url-fetch)
5741 (uri (string-append "mirror://apache/commons/exec/source/"
5742 "commons-exec-" version "-src.tar.gz"))
5743 (sha256
5744 (base32
5745 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5746 (arguments
5747 `(#:test-target "test"
5748 #:make-flags
5749 (list (string-append "-Dmaven.junit.jar="
5750 (car (find-files (assoc-ref %build-inputs "java-junit")
5751 "jar$")))
5752 "-Dmaven.compiler.source=1.7"
5753 "-Dmaven.compiler.target=1.7")
5754 #:phases
5755 (modify-phases %standard-phases
5756 (add-before 'build 'delete-network-tests
5757 (lambda* (#:key inputs #:allow-other-keys)
5758 ;; This test hangs indefinitely.
5759 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5760 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5761 (("ping -c 10 127.0.0.1") "sleep 10"))
5762 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5763 (("/bin/ls") "ls"))
5764 (call-with-output-file "src/test/scripts/ping.sh"
5765 (lambda (port)
5766 (format port "#!~a/bin/sh\nsleep $1\n"
5767 (assoc-ref inputs "bash"))))
5768 #t))
5769 ;; The "build" phase automatically tests.
5770 (delete 'check)
5771 (replace 'install (install-jars "target")))))
5772 (native-inputs
5773 `(("java-junit" ,java-junit)
5774 ("java-hamcrest-core" ,java-hamcrest-core)))))
5775
5776 (define-public java-commons-lang
5777 (package
5778 (name "java-commons-lang")
5779 (version "2.6")
5780 (source
5781 (origin
5782 (method url-fetch)
5783 (uri (string-append "mirror://apache/commons/lang/source/"
5784 "commons-lang-" version "-src.tar.gz"))
5785 (sha256
5786 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5787 (build-system ant-build-system)
5788 (outputs '("out" "doc"))
5789 (arguments
5790 `(#:test-target "test"
5791 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5792 #:phases
5793 (modify-phases %standard-phases
5794 (add-after 'build 'build-javadoc ant-build-javadoc)
5795 (add-before 'check 'disable-failing-test
5796 (lambda _
5797 ;; Disable a failing test
5798 (substitute* "src/test/java/org/apache/commons/lang/\
5799 time/FastDateFormatTest.java"
5800 (("public void testFormat\\(\\)")
5801 "public void disabled_testFormat()"))
5802 #t))
5803 (replace 'install (install-jars "target"))
5804 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5805 (native-inputs
5806 `(("java-junit" ,java-junit)))
5807 (home-page "https://commons.apache.org/lang/")
5808 (synopsis "Extension of the java.lang package")
5809 (description "The Commons Lang components contains a set of Java classes
5810 that provide helper methods for standard Java classes, especially those found
5811 in the @code{java.lang} package in the Sun JDK. The following classes are
5812 included:
5813
5814 @itemize
5815 @item StringUtils - Helper for @code{java.lang.String}.
5816 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5817 of characters such as @code{[a-z]} and @code{[abcdez]}.
5818 @item RandomStringUtils - Helper for creating randomised strings.
5819 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5820 @item NumberRange - A range of numbers with an upper and lower bound.
5821 @item ObjectUtils - Helper for @code{java.lang.Object}.
5822 @item SerializationUtils - Helper for serializing objects.
5823 @item SystemUtils - Utility class defining the Java system properties.
5824 @item NestedException package - A sub-package for the creation of nested
5825 exceptions.
5826 @item Enum package - A sub-package for the creation of enumerated types.
5827 @item Builder package - A sub-package for the creation of @code{equals},
5828 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5829 @end itemize\n")
5830 (license license:asl2.0)))
5831
5832 (define-public java-commons-lang3
5833 (package
5834 (name "java-commons-lang3")
5835 (version "3.9")
5836 (source
5837 (origin
5838 (method url-fetch)
5839 (uri (string-append "mirror://apache/commons/lang/source/"
5840 "commons-lang3-" version "-src.tar.gz"))
5841 (sha256
5842 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
5843 (build-system ant-build-system)
5844 (arguments
5845 `(#:jar-name "commons-lang3.jar"
5846 #:source-dir "src/main/java"
5847 #:tests? #f; require junit5
5848 #:phases
5849 (modify-phases %standard-phases
5850 (replace 'install (install-from-pom "pom.xml")))))
5851 (propagated-inputs
5852 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
5853 (home-page "https://commons.apache.org/lang/")
5854 (synopsis "Extension of the java.lang package")
5855 (description "The Commons Lang components contains a set of Java classes
5856 that provide helper methods for standard Java classes, especially those found
5857 in the @code{java.lang} package. The following classes are included:
5858
5859 @itemize
5860 @item StringUtils - Helper for @code{java.lang.String}.
5861 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5862 characters such as @code{[a-z]} and @code{[abcdez]}.
5863 @item RandomStringUtils - Helper for creating randomised strings.
5864 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5865 @item NumberRange - A range of numbers with an upper and lower bound.
5866 @item ObjectUtils - Helper for @code{java.lang.Object}.
5867 @item SerializationUtils - Helper for serializing objects.
5868 @item SystemUtils - Utility class defining the Java system properties.
5869 @item NestedException package - A sub-package for the creation of nested
5870 exceptions.
5871 @item Enum package - A sub-package for the creation of enumerated types.
5872 @item Builder package - A sub-package for the creation of @code{equals},
5873 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5874 @end itemize\n")
5875 (license license:asl2.0)))
5876
5877 (define-public java-commons-bsf
5878 (package
5879 (name "java-commons-bsf")
5880 (version "2.4.0")
5881 (source (origin
5882 (method url-fetch)
5883 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5884 version ".tar.gz"))
5885 (sha256
5886 (base32
5887 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5888 (modules '((guix build utils)))
5889 (snippet
5890 '(begin
5891 (for-each delete-file
5892 (find-files "." "\\.jar$"))
5893 #t))))
5894 (build-system ant-build-system)
5895 (arguments
5896 `(#:build-target "jar"
5897 #:tests? #f; No test file
5898 #:modules ((guix build ant-build-system)
5899 (guix build utils)
5900 (guix build java-utils)
5901 (sxml simple))
5902 #:phases
5903 (modify-phases %standard-phases
5904 (add-before 'build 'create-properties
5905 (lambda _
5906 ;; This file is missing from the distribution
5907 (call-with-output-file "build-properties.xml"
5908 (lambda (port)
5909 (sxml->xml
5910 `(project (@ (basedir ".") (name "build-properties") (default ""))
5911 (property (@ (name "project.name") (value "bsf")))
5912 (property (@ (name "source.level") (value "1.5")))
5913 (property (@ (name "build.lib") (value "build/jar")))
5914 (property (@ (name "src.dir") (value "src")))
5915 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5916 (property (@ (name "build.tests") (value "build/test-classes")))
5917 (property (@ (name "build.dest") (value "build/classes"))))
5918 port)))
5919 #t))
5920 (replace 'install (install-jars "build")))))
5921 (native-inputs
5922 `(("java-junit" ,java-junit)))
5923 (inputs
5924 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5925 (home-page "https://commons.apache.org/proper/commons-bsf")
5926 (synopsis "Bean Scripting Framework")
5927 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5928 which provides scripting language support within Java applications, and access
5929 to Java objects and methods from scripting languages. BSF allows one to write
5930 JSPs in languages other than Java while providing access to the Java class
5931 library. In addition, BSF permits any Java application to be implemented in
5932 part (or dynamically extended) by a language that is embedded within it. This
5933 is achieved by providing an API that permits calling scripting language engines
5934 from within Java, as well as an object registry that exposes Java objects to
5935 these scripting language engines.")
5936 (license license:asl2.0)))
5937
5938 (define-public java-commons-jxpath
5939 (package
5940 (name "java-commons-jxpath")
5941 (version "1.3")
5942 (source (origin
5943 (method url-fetch)
5944 (uri (string-append "mirror://apache/commons/jxpath/source/"
5945 "commons-jxpath-" version "-src.tar.gz"))
5946 (sha256
5947 (base32
5948 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5949 (build-system ant-build-system)
5950 (arguments
5951 `(#:jar-name "commons-jxpath.jar"
5952 ;; tests require more dependencies, including mockrunner which depends on old software
5953 #:tests? #f
5954 #:source-dir "src/java"))
5955 (inputs
5956 `(("servlet" ,java-classpathx-servletapi)
5957 ("java-jdom" ,java-jdom)
5958 ("java-commons-beanutils" ,java-commons-beanutils)))
5959 (native-inputs
5960 `(("java-junit" ,java-junit)))
5961 (home-page "https://commons.apache.org/jxpath/")
5962 (synopsis "Simple interpreter of an expression language called XPath.")
5963 (description "The org.apache.commons.jxpath package defines a simple
5964 interpreter of an expression language called XPath. JXPath applies XPath
5965 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5966 contexts, DOM etc, including mixtures thereof.")
5967 (license license:asl2.0)))
5968
5969 (define-public java-commons-pool
5970 (package
5971 (name "java-commons-pool")
5972 (version "2.6.2")
5973 (source (origin
5974 (method url-fetch)
5975 (uri (string-append "mirror://apache/commons/pool/source/"
5976 "commons-pool2-" version "-src.tar.gz"))
5977 (sha256
5978 (base32
5979 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5980 (arguments
5981 `(#:jar-name "common-pool.jar"
5982 #:source-dir "src/main/java"
5983 #:test-exclude
5984 (list "**/PerformanceTest.java")))
5985 (build-system ant-build-system)
5986 (inputs
5987 `(("java-cglib" ,java-cglib)))
5988 (native-inputs
5989 `(("java-junit" ,java-junit)
5990 ("java-hamcrest-core" ,java-hamcrest-core)
5991 ("java-asm" ,java-asm)
5992 ("java-objenesis" ,java-objenesis)))
5993 (home-page "https://commons.apache.org/proper/commons-pool/")
5994 (synopsis "Object-pooling API in Java")
5995 (description "The commons-pool package provides an object-pooling API
5996 and a number of object pool implementations. This package defines a
5997 handful of pooling interfaces and some base classes that may be useful when
5998 creating new pool implementations.")
5999 (license license:asl2.0)))
6000
6001 (define-public java-commons-dbcp
6002 (package
6003 (name "java-commons-dbcp")
6004 (version "2.6.0")
6005 (source (origin
6006 (method url-fetch)
6007 (uri (string-append "mirror://apache/commons/dbcp/source/"
6008 "commons-dbcp2-" version "-src.tar.gz"))
6009 (sha256
6010 (base32
6011 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6012 (arguments
6013 `(#:source-dir "src/main/java"
6014 #:jar-name "java-commons-dbcp.jar"
6015 #:tests? #f)); requires apache-geronimo
6016 (inputs
6017 `(("java-commons-pool" ,java-commons-pool)
6018 ("java-commons-logging" ,java-commons-logging-minimal)
6019 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6020 (native-inputs
6021 `(("java-junit" ,java-junit)))
6022 (build-system ant-build-system)
6023 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6024 (synopsis "Database Connection Pool for Java")
6025 (description "Commons-dbcp allows you to share a pool of database
6026 connections between users. Creating a new connection for each user can be
6027 time consuming and even unfeasible when the number of simultaneous users is
6028 very large. This package provides a way to share a poole of connections to
6029 reduce that load.")
6030 (license license:asl2.0)))
6031
6032 (define-public java-commons-jcs
6033 (package
6034 (name "java-commons-jcs")
6035 (version "2.2.1")
6036 (source (origin
6037 (method url-fetch)
6038 (uri (string-append "mirror://apache/commons/jcs/source/"
6039 "commons-jcs-dist-" version "-src.tar.gz"))
6040 (sha256
6041 (base32
6042 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6043 (build-system ant-build-system)
6044 (arguments
6045 `(#:jar-name "commons-jcs.jar"
6046 #:source-dir "commons-jcs-core/src/main/java"
6047 #:test-dir "commons-jcs-core/src/test"
6048 #:tests? #f; requires hsqldb
6049 #:phases
6050 (modify-phases %standard-phases
6051 (add-before 'build 'prepare
6052 (lambda _
6053 (with-directory-excursion
6054 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6055 (substitute*
6056 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6057 (("commons.dbcp") "commons.dbcp2")
6058 ((".*\\.setMaxActive.*") ""))
6059 ;;; Remove dependency on velocity-tools
6060 (delete-file "admin/servlet/JCSAdminServlet.java"))
6061 #t)))))
6062 (propagated-inputs
6063 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6064 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6065 ("java-commons-httpclient" ,java-commons-httpclient)
6066 ("java-commons-dbcp" ,java-commons-dbcp)))
6067 (native-inputs
6068 `(("java-junit" ,java-junit)))
6069 (home-page "https://commons.apache.org/proper/commons-jcs/")
6070 (synopsis "Distributed caching system in Java")
6071 (description "JCS is a distributed caching system written in Java. It
6072 is intended to speed up applications by providing a means to manage cached
6073 data of various dynamic natures. Like any caching system, JCS is most useful
6074 for high read, low put applications. Latency times drop sharply and
6075 bottlenecks move away from the database in an effectively cached system.")
6076 (license license:asl2.0)))
6077
6078 (define-public java-jsr250
6079 (package
6080 (name "java-jsr250")
6081 (version "1.3")
6082 (source (origin
6083 (method url-fetch)
6084 (uri (string-append "https://repo1.maven.org/maven2/"
6085 "javax/annotation/javax.annotation-api/"
6086 version "/javax.annotation-api-"
6087 version "-sources.jar"))
6088 (sha256
6089 (base32
6090 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6091 (build-system ant-build-system)
6092 (arguments
6093 `(#:tests? #f ; no tests included
6094 #:jdk ,icedtea-8
6095 #:jar-name "jsr250.jar"
6096 #:modules ((guix build ant-build-system)
6097 (guix build utils)
6098 (guix build maven pom)
6099 (guix build java-utils)
6100 (sxml simple))
6101 #:phases
6102 (modify-phases %standard-phases
6103 (add-before 'install 'create-pom
6104 (lambda _
6105 (with-output-to-file "pom.xml"
6106 (lambda _
6107 (sxml->xml
6108 `((project
6109 (modelVersion "4.0.0")
6110 (name "jsr250")
6111 (groupId "javax.annotation")
6112 (artifactId "jsr250-api")
6113 (version ,,version))))))
6114 #t))
6115 (replace 'install
6116 (install-from-pom "pom.xml")))))
6117 (home-page "https://jcp.org/en/jsr/detail?id=250")
6118 (synopsis "Security-related annotations")
6119 (description "This package provides annotations for security. It provides
6120 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6121 namespaces.")
6122 ;; either cddl or gpl2 only, with classpath exception
6123 (license (list license:cddl1.0
6124 license:gpl2))))
6125
6126 (define-public java-jsr305
6127 (package
6128 (name "java-jsr305")
6129 (version "3.0.1")
6130 (source (origin
6131 (method url-fetch)
6132 (uri (string-append "https://repo1.maven.org/maven2/"
6133 "com/google/code/findbugs/"
6134 "jsr305/" version "/jsr305-"
6135 version "-sources.jar"))
6136 (sha256
6137 (base32
6138 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6139 (build-system ant-build-system)
6140 (arguments
6141 `(#:tests? #f ; no tests included
6142 #:jar-name "jsr305.jar"
6143 #:modules ((guix build ant-build-system)
6144 (guix build java-utils)
6145 (guix build maven pom)
6146 (guix build utils)
6147 (sxml simple))
6148 #:phases
6149 (modify-phases %standard-phases
6150 (add-before 'install 'create-pom
6151 (lambda _
6152 (with-output-to-file "pom.xml"
6153 (lambda _
6154 (sxml->xml
6155 `((project
6156 (modelVersion "4.0.0")
6157 (name "jsr305")
6158 (groupId "com.google.code.findbugs")
6159 (artifactId "jsr305")
6160 (version ,,version))))))
6161 #t))
6162 (replace 'install
6163 (install-from-pom "pom.xml")))))
6164 (home-page "http://findbugs.sourceforge.net/")
6165 (synopsis "Annotations for the static analyzer called findbugs")
6166 (description "This package provides annotations for the findbugs package.
6167 It provides packages in the @code{javax.annotations} namespace.")
6168 (license license:asl2.0)))
6169
6170 (define-public java-guava
6171 (package
6172 (name "java-guava")
6173 ;; This is the last release of Guava that can be built with Java 7.
6174 (version "20.0")
6175 (source (origin
6176 (method git-fetch)
6177 (uri (git-reference
6178 (url "https://github.com/google/guava/")
6179 (commit (string-append "v" version))))
6180 (sha256
6181 (base32
6182 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6183 (build-system ant-build-system)
6184 (arguments
6185 `(#:tests? #f ; no tests included
6186 #:jar-name "guava.jar"
6187 #:source-dir "guava/src"
6188 #:phases
6189 (modify-phases %standard-phases
6190 (add-after 'unpack 'trim-sources
6191 (lambda _
6192 (with-directory-excursion "guava/src/com/google/common"
6193 ;; Remove annotations to avoid extra dependencies:
6194 ;; * "j2objc" annotations are used when converting Java to
6195 ;; Objective C;
6196 ;; * "errorprone" annotations catch common Java mistakes at
6197 ;; compile time;
6198 ;; * "IgnoreJRERequirement" is used for Android.
6199 (substitute* (find-files "." "\\.java$")
6200 (("import com.google.j2objc.*") "")
6201 (("import com.google.errorprone.annotation.*") "")
6202 (("import org.codehaus.mojo.animal_sniffer.*") "")
6203 (("@CanIgnoreReturnValue") "")
6204 (("@LazyInit") "")
6205 (("@WeakOuter") "")
6206 (("@RetainedWith") "")
6207 (("@Weak") "")
6208 (("@ForOverride") "")
6209 (("@J2ObjCIncompatible") "")
6210 (("@IgnoreJRERequirement") "")))
6211 #t))
6212 (replace 'install (install-from-pom "guava/pom.xml")))))
6213 (inputs
6214 `(("java-jsr305" ,java-jsr305)))
6215 (propagated-inputs
6216 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6217 (home-page "https://github.com/google/guava")
6218 (synopsis "Google core libraries for Java")
6219 (description "Guava is a set of core libraries that includes new
6220 collection types (such as multimap and multiset), immutable collections, a
6221 graph library, functional types, an in-memory cache, and APIs/utilities for
6222 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6223 more!")
6224 (license license:asl2.0)))
6225
6226 (define java-guava-parent-pom
6227 (package
6228 (inherit java-guava)
6229 (name "java-guava-parent-pom")
6230 (arguments
6231 `(#:tests? #f
6232 #:phases
6233 (modify-phases %standard-phases
6234 (delete 'configure)
6235 (delete 'build)
6236 (replace 'install
6237 (install-pom-file "pom.xml")))))
6238 (propagated-inputs
6239 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6240
6241 ;; The java-commons-logging package provides adapters to many different
6242 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6243 ;; it with only a minimal set of adapters.
6244 (define-public java-commons-logging-minimal
6245 (package
6246 (name "java-commons-logging-minimal")
6247 (version "1.2")
6248 (source (origin
6249 (method url-fetch)
6250 (uri (string-append "mirror://apache/commons/logging/source/"
6251 "commons-logging-" version "-src.tar.gz"))
6252 (sha256
6253 (base32
6254 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6255 (build-system ant-build-system)
6256 (arguments
6257 `(#:tests? #f ; avoid dependency on logging frameworks
6258 #:jar-name "commons-logging-minimal.jar"
6259 #:phases
6260 (modify-phases %standard-phases
6261 (add-after 'unpack 'delete-adapters-and-tests
6262 (lambda _
6263 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6264 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6265 ;; is used by applications; SimpleLog is the only actually usable
6266 ;; implementation that does not depend on another logging
6267 ;; framework.
6268 (for-each
6269 (lambda (file)
6270 (delete-file (string-append
6271 "src/main/java/org/apache/commons/logging/impl/" file)))
6272 (list "Jdk13LumberjackLogger.java"
6273 "WeakHashtable.java"
6274 "Log4JLogger.java"
6275 "ServletContextCleaner.java"
6276 "Jdk14Logger.java"
6277 "AvalonLogger.java"
6278 "LogKitLogger.java"))
6279 (delete-file-recursively "src/test")
6280 #t)))))
6281 (home-page "https://commons.apache.org/logging/")
6282 (synopsis "Common API for logging implementations")
6283 (description "The Logging package is a thin bridge between different
6284 logging implementations. A library that uses the commons-logging API can be
6285 used with any logging implementation at runtime.")
6286 (license license:asl2.0)))
6287
6288 ;; This is the last release of the 1.x series.
6289 (define-public java-mockito-1
6290 (package
6291 (name "java-mockito")
6292 (version "1.10.19")
6293 (source (origin
6294 (method url-fetch)
6295 (uri (string-append "http://repo1.maven.org/maven2/"
6296 "org/mockito/mockito-core/" version
6297 "/mockito-core-" version "-sources.jar"))
6298 (sha256
6299 (base32
6300 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6301 (build-system ant-build-system)
6302 (arguments
6303 `(#:jar-name "mockito.jar"
6304 #:tests? #f ; no tests included
6305 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6306 ;; patches in build phases.
6307 #:phases
6308 (modify-phases %standard-phases
6309 ;; Mockito was developed against a different version of hamcrest,
6310 ;; which does not require matcher implementations to provide an
6311 ;; implementation of the "describeMismatch" method. We add this
6312 ;; simple definition to pass the build with our version of hamcrest.
6313 (add-after 'unpack 'fix-hamcrest-build-error
6314 (lambda _
6315 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6316 (("public Matcher getActualMatcher\\(\\) .*" line)
6317 (string-append "
6318 public void describeMismatch(Object item, Description description) {
6319 actualMatcher.describeMismatch(item, description);
6320 }"
6321 line)))
6322 #t))
6323 ;; Mockito bundles cglib. We have a cglib package, so let's use
6324 ;; that instead.
6325 (add-after 'unpack 'use-system-libraries
6326 (lambda _
6327 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6328 (substitute* '("CGLIBHacker.java"
6329 "CglibMockMaker.java"
6330 "ClassImposterizer.java"
6331 "DelegatingMockitoMethodProxy.java"
6332 "MethodInterceptorFilter.java"
6333 "MockitoNamingPolicy.java"
6334 "SerializableMockitoMethodProxy.java"
6335 "SerializableNoOp.java")
6336 (("import org.mockito.cglib") "import net.sf.cglib")))
6337 #t)))))
6338 (inputs
6339 `(("java-junit" ,java-junit)
6340 ("java-objenesis" ,java-objenesis)
6341 ("java-cglib" ,java-cglib)
6342 ("java-hamcrest-core" ,java-hamcrest-core)))
6343 (home-page "http://mockito.org")
6344 (synopsis "Mockito is a mock library for Java")
6345 (description "Mockito is a mocking library for Java which lets you write
6346 tests with a clean and simple API. It generates mocks using reflection, and
6347 it records all mock invocations, including methods arguments.")
6348 (license license:asl2.0)))
6349
6350 (define-public java-httpcomponents-httpcore
6351 (package
6352 (name "java-httpcomponents-httpcore")
6353 (version "4.4.6")
6354 (source (origin
6355 (method url-fetch)
6356 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6357 "source/httpcomponents-core-"
6358 version "-src.tar.gz"))
6359 (sha256
6360 (base32
6361 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6362 (build-system ant-build-system)
6363 (arguments
6364 `(#:jar-name "httpcomponents-httpcore.jar"
6365 #:phases
6366 (modify-phases %standard-phases
6367 (add-after 'unpack 'chdir
6368 (lambda _ (chdir "httpcore") #t)))))
6369 (inputs
6370 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6371 ("java-commons-lang3" ,java-commons-lang3)))
6372 (native-inputs
6373 `(("java-junit" ,java-junit)
6374 ("java-mockito" ,java-mockito-1)))
6375 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6376 (synopsis "Low level HTTP transport components")
6377 (description "HttpCore is a set of low level HTTP transport components
6378 that can be used to build custom client and server side HTTP services with a
6379 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6380 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6381 NIO.
6382
6383 This package provides the blocking I/O model library.")
6384 (license license:asl2.0)))
6385
6386 (define-public java-httpcomponents-httpcore-nio
6387 (package (inherit java-httpcomponents-httpcore)
6388 (name "java-httpcomponents-httpcore-nio")
6389 (arguments
6390 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6391 #:phases
6392 (modify-phases %standard-phases
6393 (add-after 'unpack 'chdir
6394 (lambda _ (chdir "httpcore-nio") #t)))))
6395 (inputs
6396 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6397 ("java-hamcrest-core" ,java-hamcrest-core)
6398 ,@(package-inputs java-httpcomponents-httpcore)))
6399 (description "HttpCore is a set of low level HTTP transport components
6400 that can be used to build custom client and server side HTTP services with a
6401 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6402 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6403 NIO.
6404
6405 This package provides the non-blocking I/O model library based on Java
6406 NIO.")))
6407
6408 (define-public java-httpcomponents-httpcore-ab
6409 (package (inherit java-httpcomponents-httpcore)
6410 (name "java-httpcomponents-httpcore-ab")
6411 (arguments
6412 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6413 #:phases
6414 (modify-phases %standard-phases
6415 (add-after 'unpack 'chdir
6416 (lambda _ (chdir "httpcore-ab") #t)))))
6417 (inputs
6418 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6419 ("java-commons-cli" ,java-commons-cli)
6420 ("java-hamcrest-core" ,java-hamcrest-core)
6421 ,@(package-inputs java-httpcomponents-httpcore)))
6422 (synopsis "Apache HttpCore benchmarking tool")
6423 (description "This package provides the HttpCore benchmarking tool. It is
6424 an Apache AB clone based on HttpCore.")))
6425
6426 (define-public java-httpcomponents-httpclient
6427 (package
6428 (name "java-httpcomponents-httpclient")
6429 (version "4.5.12")
6430 (source (origin
6431 (method url-fetch)
6432 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6433 "source/httpcomponents-client-"
6434 version "-src.tar.gz"))
6435 (sha256
6436 (base32
6437 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6438 (build-system ant-build-system)
6439 (arguments
6440 `(#:jar-name "httpcomponents-httpclient.jar"
6441 #:phases
6442 (modify-phases %standard-phases
6443 (add-after 'unpack 'chdir
6444 (lambda _ (chdir "httpclient") #t)))))
6445 (inputs
6446 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6447 ("java-commons-codec" ,java-commons-codec)
6448 ("java-hamcrest-core" ,java-hamcrest-core)
6449 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6450 ("java-mockito" ,java-mockito-1)
6451 ("java-junit" ,java-junit)))
6452 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6453 (synopsis "HTTP client library for Java")
6454 (description "Although the @code{java.net} package provides basic
6455 functionality for accessing resources via HTTP, it doesn't provide the full
6456 flexibility or functionality needed by many applications. @code{HttpClient}
6457 seeks to fill this void by providing an efficient, up-to-date, and
6458 feature-rich package implementing the client side of the most recent HTTP
6459 standards and recommendations.")
6460 (license license:asl2.0)))
6461
6462 (define-public java-httpcomponents-httpmime
6463 (package (inherit java-httpcomponents-httpclient)
6464 (name "java-httpcomponents-httpmime")
6465 (arguments
6466 `(#:jar-name "httpcomponents-httpmime.jar"
6467 #:phases
6468 (modify-phases %standard-phases
6469 (add-after 'unpack 'chdir
6470 (lambda _ (chdir "httpmime") #t)))))
6471 (inputs
6472 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6473 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6474 ("java-junit" ,java-junit)
6475 ("java-hamcrest-core" ,java-hamcrest-core)))))
6476
6477 (define-public java-commons-net
6478 (package
6479 (name "java-commons-net")
6480 (version "3.6")
6481 (source (origin
6482 (method url-fetch)
6483 (uri (string-append "mirror://apache/commons/net/source/"
6484 "commons-net-" version "-src.tar.gz"))
6485 (sha256
6486 (base32
6487 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6488 (build-system ant-build-system)
6489 (arguments
6490 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6491 ;; should be "resources/examples/examples.properties"), but gets "null"
6492 ;; instead.
6493 #:tests? #f
6494 #:jar-name "commons-net.jar"))
6495 (native-inputs
6496 `(("java-junit" ,java-junit)
6497 ("java-hamcrest-core" ,java-hamcrest-core)))
6498 (home-page "https://commons.apache.org/net/")
6499 (synopsis "Client library for many basic Internet protocols")
6500 (description "The Apache Commons Net library implements the client side of
6501 many basic Internet protocols. The purpose of the library is to provide
6502 fundamental protocol access, not higher-level abstractions.")
6503 (license license:asl2.0)))
6504
6505 (define-public java-jsch
6506 (package
6507 (name "java-jsch")
6508 (version "0.1.55")
6509 (source (origin
6510 (method url-fetch)
6511 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6512 version "/jsch-" version ".zip"))
6513 (sha256
6514 (base32
6515 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6516 (build-system ant-build-system)
6517 (arguments
6518 `(#:build-target "dist"
6519 #:tests? #f ; no tests included
6520 #:phases
6521 (modify-phases %standard-phases
6522 (replace 'install (install-jars "dist")))))
6523 (native-inputs
6524 `(("unzip" ,unzip)))
6525 (home-page "http://www.jcraft.com/jsch/")
6526 (synopsis "Pure Java implementation of SSH2")
6527 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6528 to connect to an SSH server and use port forwarding, X11 forwarding, file
6529 transfer, etc., and you can integrate its functionality into your own Java
6530 programs.")
6531 (license license:bsd-3)))
6532
6533 (define-public java-commons-compress
6534 (package
6535 (name "java-commons-compress")
6536 (version "1.13")
6537 (source (origin
6538 (method url-fetch)
6539 (uri (string-append "mirror://apache/commons/compress/source/"
6540 "commons-compress-" version "-src.tar.gz"))
6541 (sha256
6542 (base32
6543 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6544 (build-system ant-build-system)
6545 (arguments
6546 `(#:jar-name "commons-compress.jar"
6547 #:phases
6548 (modify-phases %standard-phases
6549 (add-after 'unpack 'delete-bad-tests
6550 (lambda _
6551 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6552 ;; FIXME: These tests really should not fail. Maybe they are
6553 ;; indicative of problems with our Java packaging work.
6554
6555 ;; This test fails with a null pointer exception.
6556 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6557 ;; This test fails to open test resources.
6558 (delete-file "archivers/zip/ExplodeSupportTest.java")
6559
6560 ;; FIXME: This test adds a dependency on powermock, which is hard to
6561 ;; package at this point.
6562 ;; https://github.com/powermock/powermock
6563 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6564 #t))
6565 (replace 'install (install-from-pom "pom.xml")))))
6566 (propagated-inputs
6567 `(("java-xz" ,java-xz)
6568 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6569 (native-inputs
6570 `(("java-junit" ,java-junit)
6571 ("java-mockito" ,java-mockito-1)))
6572 (home-page "https://commons.apache.org/proper/commons-compress/")
6573 (synopsis "Java library for working with compressed files")
6574 (description "The Apache Commons Compress library defines an API for
6575 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6576 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6577 (license license:asl2.0)))
6578
6579 (define-public java-commons-csv
6580 (package
6581 (name "java-commons-csv")
6582 (version "1.4")
6583 (source (origin
6584 (method url-fetch)
6585 (uri (string-append "mirror://apache/commons/csv/source/"
6586 "commons-csv-" version "-src.tar.gz"))
6587 (sha256
6588 (base32
6589 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6590 (build-system ant-build-system)
6591 (arguments
6592 `(#:jar-name "commons-csv.jar"
6593 #:source-dir "src/main/java"
6594 #:tests? #f)); FIXME: requires java-h2
6595 (inputs
6596 `(("java-hamcrest-core" ,java-hamcrest-core)
6597 ("java-commons-io" ,java-commons-io)
6598 ("java-commons-lang3" ,java-commons-lang3)
6599 ("junit" ,java-junit)))
6600 (home-page "https://commons.apache.org/proper/commons-csv/")
6601 (synopsis "Read and write CSV documents")
6602 (description "Commons CSV reads and writes files in variations of the Comma
6603 Separated Value (CSV) format. The most common CSV formats are predefined in the
6604 CSVFormat class:
6605
6606 @itemize
6607 @item Microsoft Excel
6608 @item Informix UNLOAD
6609 @item Informix UNLOAD CSV
6610 @item MySQL
6611 @item RFC 4180
6612 @item TDF
6613 @end itemize
6614
6615 Custom formats can be created using a fluent style API.")
6616 (license license:asl2.0)))
6617
6618 (define-public java-osgi-annotation
6619 (package
6620 (name "java-osgi-annotation")
6621 (version "6.0.0")
6622 (source (origin
6623 (method url-fetch)
6624 (uri (string-append "https://repo1.maven.org/maven2/"
6625 "org/osgi/org.osgi.annotation/" version "/"
6626 "org.osgi.annotation-" version "-sources.jar"))
6627 (sha256
6628 (base32
6629 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6630 (build-system ant-build-system)
6631 (arguments
6632 `(#:tests? #f ; no tests
6633 #:jar-name "osgi-annotation.jar"))
6634 (home-page "https://www.osgi.org")
6635 (synopsis "Annotation module of OSGi framework")
6636 (description
6637 "OSGi, for Open Services Gateway initiative framework, is a module system
6638 and service platform for the Java programming language. This package contains
6639 the OSGi annotation module, providing additional services to help dynamic
6640 components.")
6641 (license license:asl2.0)))
6642
6643 (define-public java-osgi-core
6644 (package
6645 (name "java-osgi-core")
6646 (version "6.0.0")
6647 (source (origin
6648 (method url-fetch)
6649 (uri (string-append "https://repo1.maven.org/maven2/"
6650 "org/osgi/org.osgi.core/" version "/"
6651 "org.osgi.core-" version "-sources.jar"))
6652 (sha256
6653 (base32
6654 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6655 (build-system ant-build-system)
6656 (arguments
6657 `(#:tests? #f ; no tests
6658 #:jar-name "osgi-core.jar"))
6659 (inputs
6660 `(("java-osgi-annotation" ,java-osgi-annotation)))
6661 (home-page "https://www.osgi.org")
6662 (synopsis "Core module of OSGi framework")
6663 (description
6664 "OSGi, for Open Services Gateway initiative framework, is a module system
6665 and service platform for the Java programming language. This package contains
6666 the OSGi Core module.")
6667 (license license:asl2.0)))
6668
6669 (define-public java-osgi-service-event
6670 (package
6671 (name "java-osgi-service-event")
6672 (version "1.3.1")
6673 (source (origin
6674 (method url-fetch)
6675 (uri (string-append "https://repo1.maven.org/maven2/"
6676 "org/osgi/org.osgi.service.event/"
6677 version "/org.osgi.service.event-"
6678 version "-sources.jar"))
6679 (sha256
6680 (base32
6681 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6682 (build-system ant-build-system)
6683 (arguments
6684 `(#:tests? #f ; no tests
6685 #:jar-name "osgi-service-event.jar"))
6686 (inputs
6687 `(("java-osgi-annotation" ,java-osgi-annotation)
6688 ("java-osgi-core" ,java-osgi-core)))
6689 (home-page "https://www.osgi.org")
6690 (synopsis "OSGi service event module")
6691 (description
6692 "OSGi, for Open Services Gateway initiative framework, is a module system
6693 and service platform for the Java programming language. This package contains
6694 the OSGi @code{org.osgi.service.event} module.")
6695 (license license:asl2.0)))
6696
6697 (define-public java-eclipse-osgi
6698 (package
6699 (name "java-eclipse-osgi")
6700 (version "3.11.3")
6701 (source (origin
6702 (method url-fetch)
6703 (uri (string-append "https://repo1.maven.org/maven2/"
6704 "org/eclipse/platform/org.eclipse.osgi/"
6705 version "/org.eclipse.osgi-"
6706 version "-sources.jar"))
6707 (sha256
6708 (base32
6709 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6710 (build-system ant-build-system)
6711 (arguments
6712 `(#:tests? #f ; no tests included
6713 #:jar-name "eclipse-equinox-osgi.jar"))
6714 (inputs
6715 `(("java-osgi-annotation" ,java-osgi-annotation)))
6716 (home-page "http://www.eclipse.org/equinox/")
6717 (synopsis "Eclipse Equinox OSGi framework")
6718 (description "This package provides an implementation of the OSGi Core
6719 specification.")
6720 (license license:epl1.0)))
6721
6722 (define-public java-eclipse-equinox-common
6723 (package
6724 (name "java-eclipse-equinox-common")
6725 (version "3.10.200")
6726 (source (origin
6727 (method url-fetch)
6728 (uri (string-append "https://repo1.maven.org/maven2/"
6729 "org/eclipse/platform/org.eclipse.equinox.common/"
6730 version "/org.eclipse.equinox.common-"
6731 version "-sources.jar"))
6732 (sha256
6733 (base32
6734 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6735 (build-system ant-build-system)
6736 (arguments
6737 `(#:tests? #f ; no tests included
6738 #:jar-name "eclipse-equinox-common.jar"))
6739 (inputs
6740 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6741 (home-page "http://www.eclipse.org/equinox/")
6742 (synopsis "Common Eclipse runtime")
6743 (description "This package provides the common Eclipse runtime.")
6744 (license license:epl1.0)))
6745
6746 (define-public java-eclipse-core-jobs
6747 (package
6748 (name "java-eclipse-core-jobs")
6749 (version "3.8.0")
6750 (source (origin
6751 (method url-fetch)
6752 (uri (string-append "https://repo1.maven.org/maven2/"
6753 "org/eclipse/platform/org.eclipse.core.jobs/"
6754 version "/org.eclipse.core.jobs-"
6755 version "-sources.jar"))
6756 (sha256
6757 (base32
6758 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6759 (build-system ant-build-system)
6760 (arguments
6761 `(#:tests? #f ; no tests included
6762 #:jar-name "eclipse-core-jobs.jar"))
6763 (inputs
6764 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6765 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6766 (home-page "http://www.eclipse.org/equinox/")
6767 (synopsis "Eclipse jobs mechanism")
6768 (description "This package provides the Eclipse jobs mechanism.")
6769 (license license:epl1.0)))
6770
6771 (define-public java-eclipse-equinox-registry
6772 (package
6773 (name "java-eclipse-equinox-registry")
6774 (version "3.6.100")
6775 (source (origin
6776 (method url-fetch)
6777 (uri (string-append "https://repo1.maven.org/maven2/"
6778 "org/eclipse/platform/org.eclipse.equinox.registry/"
6779 version "/org.eclipse.equinox.registry-"
6780 version "-sources.jar"))
6781 (sha256
6782 (base32
6783 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6784 (build-system ant-build-system)
6785 (arguments
6786 `(#:tests? #f ; no tests included
6787 #:jar-name "eclipse-equinox-registry.jar"))
6788 (inputs
6789 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6790 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6791 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6792 (home-page "http://www.eclipse.org/equinox/")
6793 (synopsis "Eclipse extension registry support")
6794 (description "This package provides support for the Eclipse extension
6795 registry.")
6796 (license license:epl1.0)))
6797
6798 (define-public java-eclipse-equinox-app
6799 (package
6800 (name "java-eclipse-equinox-app")
6801 (version "1.3.400")
6802 (source (origin
6803 (method url-fetch)
6804 (uri (string-append "https://repo1.maven.org/maven2/"
6805 "org/eclipse/platform/org.eclipse.equinox.app/"
6806 version "/org.eclipse.equinox.app-"
6807 version "-sources.jar"))
6808 (sha256
6809 (base32
6810 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6811 (build-system ant-build-system)
6812 (arguments
6813 `(#:tests? #f ; no tests included
6814 #:jar-name "eclipse-equinox-app.jar"))
6815 (inputs
6816 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6817 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6818 ("java-eclipse-osgi" ,java-eclipse-osgi)
6819 ("java-osgi-service-event" ,java-osgi-service-event)))
6820 (home-page "http://www.eclipse.org/equinox/")
6821 (synopsis "Equinox application container")
6822 (description "This package provides the Equinox application container for
6823 Eclipse.")
6824 (license license:epl1.0)))
6825
6826 (define-public java-eclipse-equinox-preferences
6827 (package
6828 (name "java-eclipse-equinox-preferences")
6829 (version "3.6.1")
6830 (source (origin
6831 (method url-fetch)
6832 (uri (string-append "https://repo1.maven.org/maven2/"
6833 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6834 version "/org.eclipse.equinox.preferences-"
6835 version "-sources.jar"))
6836 (sha256
6837 (base32
6838 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6839 (build-system ant-build-system)
6840 (arguments
6841 `(#:tests? #f ; no tests included
6842 #:jar-name "eclipse-equinox-preferences.jar"))
6843 (inputs
6844 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6845 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6846 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6847 (home-page "http://www.eclipse.org/equinox/")
6848 (synopsis "Eclipse preferences mechanism")
6849 (description "This package provides the Eclipse preferences mechanism with
6850 the module @code{org.eclipse.equinox.preferences}.")
6851 (license license:epl1.0)))
6852
6853 (define-public java-eclipse-core-contenttype
6854 (package
6855 (name "java-eclipse-core-contenttype")
6856 (version "3.5.100")
6857 (source (origin
6858 (method url-fetch)
6859 (uri (string-append "https://repo1.maven.org/maven2/"
6860 "org/eclipse/platform/org.eclipse.core.contenttype/"
6861 version "/org.eclipse.core.contenttype-"
6862 version "-sources.jar"))
6863 (sha256
6864 (base32
6865 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6866 (build-system ant-build-system)
6867 (arguments
6868 `(#:tests? #f ; no tests included
6869 #:jar-name "eclipse-core-contenttype.jar"))
6870 (inputs
6871 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6872 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6873 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6874 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6875 (home-page "http://www.eclipse.org/")
6876 (synopsis "Eclipse content mechanism")
6877 (description "This package provides the Eclipse content mechanism in the
6878 @code{org.eclipse.core.contenttype} module.")
6879 (license license:epl1.0)))
6880
6881 (define-public java-eclipse-core-runtime
6882 (package
6883 (name "java-eclipse-core-runtime")
6884 (version "3.15.100")
6885 (source (origin
6886 (method url-fetch)
6887 (uri (string-append "https://repo1.maven.org/maven2/"
6888 "org/eclipse/platform/org.eclipse.core.runtime/"
6889 version "/org.eclipse.core.runtime-"
6890 version "-sources.jar"))
6891 (sha256
6892 (base32
6893 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6894 (build-system ant-build-system)
6895 (arguments
6896 `(#:tests? #f ; no tests included
6897 #:jar-name "eclipse-core-runtime.jar"))
6898 (inputs
6899 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6900 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6901 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6902 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6903 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6904 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6905 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6906 (home-page "https://www.eclipse.org/")
6907 (synopsis "Eclipse core runtime")
6908 (description "This package provides the Eclipse core runtime with the
6909 module @code{org.eclipse.core.runtime}.")
6910 (license license:epl1.0)))
6911
6912 (define-public java-eclipse-core-filesystem
6913 (package
6914 (name "java-eclipse-core-filesystem")
6915 (version "1.6.1")
6916 (source (origin
6917 (method url-fetch)
6918 (uri (string-append "https://repo1.maven.org/maven2/"
6919 "org/eclipse/platform/org.eclipse.core.filesystem/"
6920 version "/org.eclipse.core.filesystem-"
6921 version "-sources.jar"))
6922 (sha256
6923 (base32
6924 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6925 (build-system ant-build-system)
6926 (arguments
6927 `(#:tests? #f ; no tests included
6928 #:jar-name "eclipse-core-filesystem.jar"))
6929 (inputs
6930 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6931 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6932 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6933 (home-page "https://www.eclipse.org/")
6934 (synopsis "Eclipse core file system")
6935 (description "This package provides the Eclipse core file system with the
6936 module @code{org.eclipse.core.filesystem}.")
6937 (license license:epl1.0)))
6938
6939 (define-public java-eclipse-core-expressions
6940 (package
6941 (name "java-eclipse-core-expressions")
6942 (version "3.5.100")
6943 (source (origin
6944 (method url-fetch)
6945 (uri (string-append "https://repo1.maven.org/maven2/"
6946 "org/eclipse/platform/org.eclipse.core.expressions/"
6947 version "/org.eclipse.core.expressions-"
6948 version "-sources.jar"))
6949 (sha256
6950 (base32
6951 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6952 (build-system ant-build-system)
6953 (arguments
6954 `(#:tests? #f ; no tests included
6955 #:jar-name "eclipse-core-expressions.jar"))
6956 (inputs
6957 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6958 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6959 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6960 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6961 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6962 (home-page "https://www.eclipse.org/")
6963 (synopsis "Eclipse core expression language")
6964 (description "This package provides the Eclipse core expression language
6965 with the @code{org.eclipse.core.expressions} module.")
6966 (license license:epl1.0)))
6967
6968 (define-public java-eclipse-core-variables
6969 (package
6970 (name "java-eclipse-core-variables")
6971 (version "3.3.0")
6972 (source (origin
6973 (method url-fetch)
6974 (uri (string-append "https://repo1.maven.org/maven2/"
6975 "org/eclipse/platform/org.eclipse.core.variables/"
6976 version "/org.eclipse.core.variables-"
6977 version "-sources.jar"))
6978 (sha256
6979 (base32
6980 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6981 (build-system ant-build-system)
6982 (arguments
6983 `(#:tests? #f ; no tests included
6984 #:jar-name "eclipse-core-variables.jar"))
6985 (inputs
6986 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6987 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6988 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6989 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6990 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6991 (home-page "https://www.eclipse.org/platform")
6992 (synopsis "Eclipse core variables")
6993 (description "This package provides the Eclipse core variables module
6994 @code{org.eclipse.core.variables}.")
6995 (license license:epl1.0)))
6996
6997 (define-public java-eclipse-ant-core
6998 (package
6999 (name "java-eclipse-ant-core")
7000 (version "3.4.100")
7001 (source (origin
7002 (method url-fetch)
7003 (uri (string-append "https://repo1.maven.org/maven2/"
7004 "org/eclipse/platform/org.eclipse.ant.core/"
7005 version "/org.eclipse.ant.core-"
7006 version "-sources.jar"))
7007 (sha256
7008 (base32
7009 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7010 (build-system ant-build-system)
7011 (arguments
7012 `(#:tests? #f ; no tests included
7013 #:jar-name "eclipse-ant-core.jar"))
7014 (inputs
7015 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7016 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7017 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7018 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7019 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7020 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7021 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7022 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7023 (home-page "https://www.eclipse.org/platform")
7024 (synopsis "Ant build tool core libraries")
7025 (description "This package provides the ant build tool core libraries with
7026 the module @code{org.eclipse.ant.core}.")
7027 (license license:epl1.0)))
7028
7029 (define-public java-eclipse-core-resources
7030 (package
7031 (name "java-eclipse-core-resources")
7032 (version "3.13.200")
7033 (source (origin
7034 (method url-fetch)
7035 (uri (string-append "https://repo1.maven.org/maven2/"
7036 "org/eclipse/platform/org.eclipse.core.resources/"
7037 version "/org.eclipse.core.resources-"
7038 version "-sources.jar"))
7039 (sha256
7040 (base32
7041 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7042 (build-system ant-build-system)
7043 (arguments
7044 `(#:tests? #f ; no tests included
7045 #:jar-name "eclipse-core-resources.jar"))
7046 (inputs
7047 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7048 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7049 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7050 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7051 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7052 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7053 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7054 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7055 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7056 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7057 (home-page "https://www.eclipse.org/")
7058 (synopsis "Eclipse core resource management")
7059 (description "This package provides the Eclipse core resource management
7060 module @code{org.eclipse.core.resources}.")
7061 (license license:epl1.0)))
7062
7063 (define-public java-eclipse-compare-core
7064 (package
7065 (name "java-eclipse-compare-core")
7066 (version "3.6.0")
7067 (source (origin
7068 (method url-fetch)
7069 (uri (string-append "https://repo1.maven.org/maven2/"
7070 "org/eclipse/platform/org.eclipse.compare.core/"
7071 version "/org.eclipse.compare.core-"
7072 version "-sources.jar"))
7073 (sha256
7074 (base32
7075 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7076 (build-system ant-build-system)
7077 (arguments
7078 `(#:tests? #f ; no tests included
7079 #:jar-name "eclipse-compare-core.jar"))
7080 (inputs
7081 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7082 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7083 ("java-eclipse-osgi" ,java-eclipse-osgi)
7084 ("java-icu4j" ,java-icu4j)))
7085 (home-page "https://www.eclipse.org/")
7086 (synopsis "Eclipse core compare support")
7087 (description "This package provides the Eclipse core compare support
7088 module @code{org.eclipse.compare.core}.")
7089 (license license:epl1.0)))
7090
7091 (define-public java-eclipse-team-core
7092 (package
7093 (name "java-eclipse-team-core")
7094 (version "3.8.0")
7095 (source (origin
7096 (method url-fetch)
7097 (uri (string-append "https://repo1.maven.org/maven2/"
7098 "org/eclipse/platform/org.eclipse.team.core/"
7099 version "/org.eclipse.team.core-"
7100 version "-sources.jar"))
7101 (sha256
7102 (base32
7103 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7104 (build-system ant-build-system)
7105 (arguments
7106 `(#:tests? #f ; no tests included
7107 #:jar-name "eclipse-team-core.jar"))
7108 (inputs
7109 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7110 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7111 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7112 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7113 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7114 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7115 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7116 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7117 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7118 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7119 (home-page "https://www.eclipse.org/platform")
7120 (synopsis "Eclipse team support core")
7121 (description "This package provides the Eclipse team support core module
7122 @code{org.eclipse.team.core}.")
7123 (license license:epl1.0)))
7124
7125 (define-public java-eclipse-core-commands
7126 (package
7127 (name "java-eclipse-core-commands")
7128 (version "3.8.1")
7129 (source (origin
7130 (method url-fetch)
7131 (uri (string-append "https://repo1.maven.org/maven2/"
7132 "org/eclipse/platform/org.eclipse.core.commands/"
7133 version "/org.eclipse.core.commands-"
7134 version "-sources.jar"))
7135 (sha256
7136 (base32
7137 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7138 (build-system ant-build-system)
7139 (arguments
7140 `(#:tests? #f ; no tests included
7141 #:jar-name "eclipse-core-commands.jar"))
7142 (inputs
7143 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7144 (home-page "https://www.eclipse.org/platform")
7145 (synopsis "Eclipse core commands")
7146 (description "This package provides Eclipse core commands in the module
7147 @code{org.eclipse.core.commands}.")
7148 (license license:epl1.0)))
7149
7150 (define-public java-eclipse-text
7151 (package
7152 (name "java-eclipse-text")
7153 (version "3.6.0")
7154 (source (origin
7155 (method url-fetch)
7156 (uri (string-append "https://repo1.maven.org/maven2/"
7157 "org/eclipse/platform/org.eclipse.text/"
7158 version "/org.eclipse.text-"
7159 version "-sources.jar"))
7160 (sha256
7161 (base32
7162 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7163 (build-system ant-build-system)
7164 (arguments
7165 `(#:tests? #f ; no tests included
7166 #:jar-name "eclipse-text.jar"
7167 #:phases
7168 (modify-phases %standard-phases
7169 ;; When creating a new category we must make sure that the new list
7170 ;; matches List<Position>. By default it seems to be too generic
7171 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7172 ;; Without this we get this error:
7173 ;;
7174 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7175 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7176 ;; [javac] fPositions.put(category, new ArrayList<>());
7177 ;; [javac] ^
7178 ;; [javac] required: String,List<Position>
7179 ;; [javac] found: String,ArrayList<Object>
7180 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7181 ;; to List<Position> by method invocation conversion
7182 ;; [javac] where K,V are type-variables:
7183 ;; [javac] K extends Object declared in interface Map
7184 ;; [javac] V extends Object declared in interface Map
7185 ;;
7186 ;; I don't know if this is a good fix. I suspect it is not, but it
7187 ;; seems to work.
7188 (add-after 'unpack 'fix-compilation-error
7189 (lambda _
7190 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7191 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7192 "Positions.put(category, new ArrayList<Position>());"))
7193 #t)))))
7194 (inputs
7195 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7196 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7197 ("java-icu4j" ,java-icu4j)))
7198 (home-page "http://www.eclipse.org/platform")
7199 (synopsis "Eclipse text library")
7200 (description "Platform Text is part of the Platform UI project and
7201 provides the basic building blocks for text and text editors within Eclipse
7202 and contributes the Eclipse default text editor.")
7203 (license license:epl1.0)))
7204
7205 (define-public java-eclipse-jdt-core
7206 (package
7207 (name "java-eclipse-jdt-core")
7208 (version "3.16.0")
7209 (source (origin
7210 (method url-fetch)
7211 (uri (string-append "https://repo1.maven.org/maven2/"
7212 "org/eclipse/jdt/org.eclipse.jdt.core/"
7213 version "/org.eclipse.jdt.core-"
7214 version "-sources.jar"))
7215 (sha256
7216 (base32
7217 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7218 (build-system ant-build-system)
7219 (arguments
7220 `(#:tests? #f ; no tests included
7221 #:jar-name "eclipse-jdt-core.jar"
7222 #:phases
7223 (modify-phases %standard-phases
7224 (add-after 'unpack 'move-sources
7225 (lambda _
7226 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7227 (for-each (lambda (file)
7228 (install-file file (string-append "../" (dirname file))))
7229 (find-files "." ".*")))
7230 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7231 #t))
7232 (add-before 'build 'copy-resources
7233 (lambda _
7234 (with-directory-excursion "src"
7235 (for-each (lambda (file)
7236 (install-file file (string-append "../build/classes/" (dirname file))))
7237 (find-files "." ".*.(props|properties|rsc)")))
7238 #t)))))
7239 (inputs
7240 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7241 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7242 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7243 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7244 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7245 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7246 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7247 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7248 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7249 ("java-eclipse-osgi" ,java-eclipse-osgi)
7250 ("java-eclipse-text" ,java-eclipse-text)))
7251 (home-page "https://www.eclipse.org/jdt")
7252 (synopsis "Java development tools core libraries")
7253 (description "This package provides the core libraries of the Eclipse Java
7254 development tools.")
7255 (license license:epl1.0)))
7256
7257 (define-public java-eclipse-jdt-compiler-apt
7258 (package
7259 (name "java-eclipse-jdt-compiler-apt")
7260 (version "1.3.400")
7261 (source (origin
7262 (method url-fetch)
7263 (uri (string-append "https://repo1.maven.org/maven2/"
7264 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7265 version "/org.eclipse.jdt.compiler.apt-"
7266 version "-sources.jar"))
7267 (sha256
7268 (base32
7269 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7270 (build-system ant-build-system)
7271 (arguments
7272 `(#:tests? #f ; no tests included
7273 #:jar-name "eclipse-jdt-compiler-apt.jar"
7274 #:jdk ,openjdk11))
7275 (inputs
7276 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7277 (home-page "https://www.eclipse.org/jdt/apt/")
7278 (synopsis "Annotation processing tool")
7279 (description "APT stands for Annotation Processing Tool. APT provides a
7280 means for generating files and compiling new Java classes based on annotations
7281 found in your source code.")
7282 (license license:epl2.0)))
7283
7284 (define-public java-javax-mail
7285 (package
7286 (name "java-javax-mail")
7287 (version "1.5.6")
7288 (source (origin
7289 (method url-fetch)
7290 (uri (string-append "https://repo1.maven.org/maven2/"
7291 "com/sun/mail/javax.mail/"
7292 version "/javax.mail-"
7293 version "-sources.jar"))
7294 (sha256
7295 (base32
7296 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7297 (build-system ant-build-system)
7298 (arguments
7299 `(#:tests? #f ; no tests
7300 #:jar-name "javax-mail.jar"))
7301 (home-page "https://javamail.java.net")
7302 (synopsis "Reference implementation of the JavaMail API")
7303 (description
7304 "This package provides versions of the JavaMail API implementation, IMAP,
7305 SMTP, and POP3 service providers, some examples, and documentation for the
7306 JavaMail API.")
7307 ;; GPLv2 only with "classpath exception".
7308 (license license:gpl2)))
7309
7310 (define-public java-log4j-api
7311 (package
7312 (name "java-log4j-api")
7313 (version "2.4.1")
7314 (source (origin
7315 (method url-fetch)
7316 (uri (string-append "mirror://apache/logging/log4j/" version
7317 "/apache-log4j-" version "-src.tar.gz"))
7318 (sha256
7319 (base32
7320 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7321 (build-system ant-build-system)
7322 (arguments
7323 `(#:tests? #f ; tests require unpackaged software
7324 #:jar-name "log4j-api.jar"
7325 #:make-flags
7326 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7327 "/share/java"))
7328 #:phases
7329 (modify-phases %standard-phases
7330 (add-after 'unpack 'enter-dir
7331 (lambda _ (chdir "log4j-api") #t))
7332 ;; FIXME: The tests require additional software that has not been
7333 ;; packaged yet, such as
7334 ;; * org.apache.maven
7335 ;; * org.apache.felix
7336 (add-after 'enter-dir 'delete-tests
7337 (lambda _ (delete-file-recursively "src/test") #t)))))
7338 (inputs
7339 `(("java-osgi-core" ,java-osgi-core)
7340 ("java-hamcrest-core" ,java-hamcrest-core)
7341 ("java-junit" ,java-junit)))
7342 (home-page "https://logging.apache.org/log4j/2.x/")
7343 (synopsis "API module of the Log4j logging framework for Java")
7344 (description
7345 "This package provides the API module of the Log4j logging framework for
7346 Java.")
7347 (license license:asl2.0)))
7348
7349 (define-public java-log4j-core
7350 (package
7351 (inherit java-log4j-api)
7352 (name "java-log4j-core")
7353 (inputs
7354 `(("java-osgi-core" ,java-osgi-core)
7355 ("java-hamcrest-core" ,java-hamcrest-core)
7356 ("java-log4j-api" ,java-log4j-api)
7357 ("java-mail" ,java-mail)
7358 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7359 ("java-lmax-disruptor" ,java-lmax-disruptor)
7360 ("java-kafka" ,java-kafka-clients)
7361 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7362 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7363 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7364 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7365 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7366 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7367 ("java-commons-compress" ,java-commons-compress)
7368 ("java-commons-csv" ,java-commons-csv)
7369 ("java-jeromq" ,java-jeromq)
7370 ("java-junit" ,java-junit)))
7371 (native-inputs
7372 `(("hamcrest" ,java-hamcrest-all)
7373 ("java-commons-io" ,java-commons-io)
7374 ("java-commons-lang3" ,java-commons-lang3)
7375 ("slf4j" ,java-slf4j-api)))
7376 (arguments
7377 `(#:tests? #f ; tests require more dependencies
7378 #:test-dir "src/test"
7379 #:source-dir "src/main/java"
7380 #:jar-name "log4j-core.jar"
7381 #:jdk ,icedtea-8
7382 #:make-flags
7383 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7384 "/share/java"))
7385 #:phases
7386 (modify-phases %standard-phases
7387 (add-after 'unpack 'enter-dir
7388 (lambda _ (chdir "log4j-core") #t)))))
7389 (synopsis "Core component of the Log4j framework")
7390 (description "This package provides the core component of the Log4j
7391 logging framework for Java.")))
7392
7393 (define-public java-log4j-1.2-api
7394 (package
7395 (inherit java-log4j-api)
7396 (name "java-log4j-1.2-api")
7397 (arguments
7398 `(#:jar-name "java-log4j-1.2-api.jar"
7399 #:source-dir "log4j-1.2-api/src/main/java"
7400 #:jdk ,icedtea-8
7401 ;; Tests require maven-model (and other maven subprojects), which is a
7402 ;; cyclic dependency.
7403 #:tests? #f))
7404 (inputs
7405 `(("log4j-api" ,java-log4j-api)
7406 ("log4j-core" ,java-log4j-core)
7407 ("osgi-core" ,java-osgi-core)
7408 ("eclipse-osgi" ,java-eclipse-osgi)
7409 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7410
7411 (define-public java-commons-cli
7412 (package
7413 (name "java-commons-cli")
7414 (version "1.4")
7415 (source (origin
7416 (method url-fetch)
7417 (uri (string-append "mirror://apache/commons/cli/source/"
7418 "commons-cli-" version "-src.tar.gz"))
7419 (sha256
7420 (base32
7421 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7422 (build-system ant-build-system)
7423 ;; TODO: javadoc
7424 (arguments
7425 `(#:jar-name "commons-cli.jar"
7426 #:phases
7427 (modify-phases %standard-phases
7428 (replace 'install
7429 (install-from-pom "pom.xml")))))
7430 (native-inputs
7431 `(("java-junit" ,java-junit)
7432 ("java-hamcrest-core" ,java-hamcrest-core)))
7433 (home-page "https://commons.apache.org/cli/")
7434 (synopsis "Command line arguments and options parsing library")
7435 (description "The Apache Commons CLI library provides an API for parsing
7436 command line options passed to programs. It is also able to print help
7437 messages detailing the options available for a command line tool.
7438
7439 Commons CLI supports different types of options:
7440
7441 @itemize
7442 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7443 @item GNU like long options (ie. du --human-readable --max-depth=1)
7444 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7445 @item Short options with value attached (ie. gcc -O2 foo.c)
7446 @item long options with single hyphen (ie. ant -projecthelp)
7447 @end itemize
7448
7449 This is a part of the Apache Commons Project.")
7450 (license license:asl2.0)))
7451
7452 (define-public java-commons-codec
7453 (package
7454 (name "java-commons-codec")
7455 (version "1.14")
7456 (source (origin
7457 (method url-fetch)
7458 (uri (string-append "mirror://apache/commons/codec/source/"
7459 "commons-codec-" version "-src.tar.gz"))
7460 (sha256
7461 (base32
7462 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7463 (build-system ant-build-system)
7464 (arguments
7465 `(#:jar-name "java-commons-codec.jar"
7466 #:source-dir "src/main/java"
7467 #:test-dir "src/test"
7468 #:test-exclude (list "**/*AbstractTest.java")
7469 #:phases
7470 (modify-phases %standard-phases
7471 (add-before 'build 'copy-resources
7472 (lambda _
7473 (copy-recursively "src/main/resources"
7474 "build/classes")
7475 #t))
7476 (add-before 'check 'copy-test-resources
7477 (lambda _
7478 (copy-recursively "src/test/resources"
7479 "build/test-classes")
7480 #t))
7481 (replace 'install (install-from-pom "pom.xml")))))
7482 (native-inputs
7483 `(("java-commons-lang3" ,java-commons-lang3)
7484 ("java-junit" ,java-junit)))
7485 (propagated-inputs
7486 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7487 (home-page "https://commons.apache.org/codec/")
7488 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7489 (description "The codec package contains simple encoder and decoders for
7490 various formats such as Base64 and Hexadecimal. In addition to these widely
7491 used encoders and decoders, the codec package also maintains a collection of
7492 phonetic encoding utilities.
7493
7494 This is a part of the Apache Commons Project.")
7495 (license license:asl2.0)))
7496
7497 (define-public java-commons-daemon
7498 (package
7499 (name "java-commons-daemon")
7500 (version "1.1.0")
7501 (source (origin
7502 (method url-fetch)
7503 (uri (string-append "mirror://apache/commons/daemon/source/"
7504 "commons-daemon-" version "-src.tar.gz"))
7505 (sha256
7506 (base32
7507 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7508 (build-system ant-build-system)
7509 (arguments
7510 `(#:test-target "test"
7511 #:phases
7512 (modify-phases %standard-phases
7513 (add-after 'build 'build-javadoc ant-build-javadoc)
7514 (replace 'install (install-jars "dist"))
7515 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7516 (native-inputs
7517 `(("java-junit" ,java-junit)))
7518 (home-page "https://commons.apache.org/daemon/")
7519 (synopsis "Library to launch Java applications as daemons")
7520 (description "The Daemon package from Apache Commons can be used to
7521 implement Java applications which can be launched as daemons. For example the
7522 program will be notified about a shutdown so that it can perform cleanup tasks
7523 before its process of execution is destroyed by the operation system.
7524
7525 This package contains the Java library. You will also need the actual binary
7526 for your architecture which is provided by the jsvc package.
7527
7528 This is a part of the Apache Commons Project.")
7529 (license license:asl2.0)))
7530
7531 (define-public java-javaewah
7532 (package
7533 (name "java-javaewah")
7534 (version "1.1.6")
7535 (source (origin
7536 (method git-fetch)
7537 (uri (git-reference
7538 (url "https://github.com/lemire/javaewah/")
7539 (commit (string-append "JavaEWAH-" version))))
7540 (file-name (git-file-name name version))
7541 (sha256
7542 (base32
7543 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7544 (build-system ant-build-system)
7545 (arguments `(#:jar-name "javaewah.jar"))
7546 (inputs
7547 `(("java-junit" ,java-junit)
7548 ("java-hamcrest-core" ,java-hamcrest-core)))
7549 (home-page "https://github.com/lemire/javaewah")
7550 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7551 (description "This is a word-aligned compressed variant of the Java
7552 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7553 compression scheme. It can be used to implement bitmap indexes.
7554
7555 The goal of word-aligned compression is not to achieve the best compression,
7556 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7557 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7558 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7559 @code{BitSet} class by Sun).")
7560 ;; GPL2.0 derivates are explicitly allowed.
7561 (license license:asl2.0)))
7562
7563 (define-public java-slf4j-api
7564 (package
7565 (name "java-slf4j-api")
7566 (version "1.7.25")
7567 (source (origin
7568 (method url-fetch)
7569 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7570 version ".tar.gz"))
7571 (sha256
7572 (base32
7573 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7574 (modules '((guix build utils)))
7575 ;; Delete bundled jars.
7576 (snippet
7577 '(begin
7578 (for-each delete-file (find-files "." "\\.jar$"))
7579 #t))))
7580 (build-system ant-build-system)
7581 (arguments
7582 `(#:jar-name "slf4j-api.jar"
7583 #:source-dir "slf4j-api/src/main"
7584 #:test-dir "slf4j-api/src/test"
7585 #:phases
7586 (modify-phases %standard-phases
7587 (add-after 'build 'regenerate-jar
7588 (lambda _
7589 ;; pom.xml ignores these files in the jar creation process. If we don't,
7590 ;; we get the error "This code should have never made it into slf4j-api.jar"
7591 (delete-file-recursively "build/classes/org/slf4j/impl")
7592 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7593 "build/classes" ".")))
7594 (add-before 'check 'dont-test-abstract-classes
7595 (lambda _
7596 ;; abstract classes are not meant to be run with junit
7597 (substitute* "build.xml"
7598 (("<include name=\"\\*\\*/\\*Test.java\" />")
7599 (string-append "<include name=\"**/*Test.java\" />"
7600 "<exclude name=\"**/MultithreadedInitializationTest"
7601 ".java\" />")))
7602 #t))
7603 (replace 'install
7604 (install-from-pom "slf4j-api/pom.xml")))))
7605 (propagated-inputs
7606 `(("java-slf4j-parent" ,java-slf4j-parent)))
7607 (native-inputs
7608 `(("java-junit" ,java-junit)
7609 ("java-hamcrest-core" ,java-hamcrest-core)))
7610 (home-page "https://www.slf4j.org/")
7611 (synopsis "Simple logging facade for Java")
7612 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7613 simple facade or abstraction for various logging
7614 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7615 allowing the end user to plug in the desired logging framework at deployment
7616 time.")
7617 (license license:expat)))
7618
7619 (define java-slf4j-parent
7620 (package
7621 (inherit java-slf4j-api)
7622 (name "java-slf4j-parent")
7623 (native-inputs `())
7624 (propagated-inputs '())
7625 (arguments
7626 `(#:tests? #f
7627 #:phases
7628 (modify-phases %standard-phases
7629 (delete 'build)
7630 (delete 'configure)
7631 (replace 'install
7632 (install-pom-file "pom.xml")))))))
7633
7634 (define-public java-slf4j-simple
7635 (package
7636 (name "java-slf4j-simple")
7637 (version "1.7.25")
7638 (source (package-source java-slf4j-api))
7639 (build-system ant-build-system)
7640 (arguments
7641 `(#:jar-name "slf4j-simple.jar"
7642 #:source-dir "slf4j-simple/src/main"
7643 #:test-dir "slf4j-simple/src/test"
7644 #:phases
7645 (modify-phases %standard-phases
7646 ;; The tests need some test classes from slf4j-api
7647 (add-before 'check 'build-slf4j-api-test-helpers
7648 (lambda _
7649 ;; Add current dir to CLASSPATH ...
7650 (setenv "CLASSPATH"
7651 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7652 ;; ... and build test helper classes here:
7653 (apply invoke
7654 `("javac" "-d" "."
7655 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7656 (replace 'install
7657 (install-from-pom "slf4j-simple/pom.xml")))))
7658 (propagated-inputs
7659 `(("java-slf4j-api" ,java-slf4j-api)))
7660 (native-inputs
7661 `(("java-junit" ,java-junit)
7662 ("java-hamcrest-core" ,java-hamcrest-core)))
7663 (home-page "https://www.slf4j.org/")
7664 (synopsis "Simple implementation of simple logging facade for Java")
7665 (description "SLF4J binding for the Simple implementation, which outputs
7666 all events to System.err. Only messages of level INFO and higher are
7667 printed.")
7668 (license license:expat)))
7669
7670 (define-public antlr2
7671 (package
7672 (name "antlr2")
7673 (version "2.7.7")
7674 (source (origin
7675 (method url-fetch)
7676 (uri (string-append "https://www.antlr2.org/download/antlr-"
7677 version ".tar.gz"))
7678 (sha256
7679 (base32
7680 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7681 (modules '((guix build utils)))
7682 (snippet
7683 '(begin
7684 (delete-file "antlr.jar")
7685 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7686 (("#include <map>")
7687 (string-append
7688 "#include <map>\n"
7689 "#define EOF (-1)\n"
7690 "#include <strings.h>")))
7691 (substitute* "configure"
7692 (("/bin/sh") "sh"))
7693 #t))))
7694 (build-system gnu-build-system)
7695 (arguments
7696 `(#:tests? #f ; no test target
7697 #:imported-modules ((guix build ant-build-system)
7698 (guix build syscalls)
7699 ,@%gnu-build-system-modules)
7700 #:modules (((guix build ant-build-system) #:prefix ant:)
7701 (guix build gnu-build-system)
7702 (guix build utils))
7703 #:phases
7704 (modify-phases %standard-phases
7705 (add-after 'install 'strip-jar-timestamps
7706 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7707 (add-before 'configure 'fix-timestamp
7708 (lambda _
7709 (substitute* "configure"
7710 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7711 #t))
7712 (add-after 'configure 'fix-bin-ls
7713 (lambda _
7714 (substitute* (find-files "." "Makefile")
7715 (("/bin/ls") "ls"))
7716 #t)))))
7717 (native-inputs
7718 `(("which" ,which)
7719 ("zip" ,zip)
7720 ("java" ,icedtea "jdk")))
7721 (inputs
7722 `(("java" ,icedtea)))
7723 (home-page "https://www.antlr2.org")
7724 (synopsis "Framework for constructing recognizers, compilers, and translators")
7725 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7726 is a language tool that provides a framework for constructing recognizers,
7727 compilers, and translators from grammatical descriptions containing Java, C#,
7728 C++, or Python actions. ANTLR provides excellent support for tree construction,
7729 tree walking, and translation.")
7730 (license license:public-domain)))
7731
7732 (define-public java-stringtemplate-3
7733 (package
7734 (name "java-stringtemplate")
7735 (version "3.2.1")
7736 (source (origin
7737 (method url-fetch)
7738 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7739 "gh-pages/download/stringtemplate-"
7740 version ".tar.gz"))
7741 (sha256
7742 (base32
7743 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7744 (build-system ant-build-system)
7745 (arguments
7746 `(#:jar-name (string-append ,name "-" ,version ".jar")
7747 #:test-dir "test"
7748 #:modules ((guix build ant-build-system)
7749 (guix build utils)
7750 (srfi srfi-1))
7751 #:phases
7752 (modify-phases %standard-phases
7753 (add-before 'check 'fix-tests
7754 (lambda _
7755 (substitute* "build.xml"
7756 (("\\$\\{test.home\\}/java")
7757 "${test.home}/org"))
7758 #t))
7759 (add-before 'build 'generate-grammar
7760 (lambda _
7761 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7762 (for-each (lambda (file)
7763 (format #t "~a\n" file)
7764 (invoke "antlr" file))
7765 '("template.g" "angle.bracket.template.g" "action.g"
7766 "eval.g" "group.g" "interface.g")))
7767 #t)))))
7768 (native-inputs
7769 `(("antlr" ,antlr2)
7770 ("java-junit" ,java-junit)))
7771 (home-page "https://www.stringtemplate.org")
7772 (synopsis "Template engine to generate formatted text output")
7773 (description "StringTemplate is a java template engine (with ports for C#,
7774 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7775 or any other formatted text output. StringTemplate is particularly good at
7776 code generators, multiple site skins, and internationalization / localization.
7777 StringTemplate also powers ANTLR.")
7778 (license license:bsd-3)))
7779
7780 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7781 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7782 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7783 ;; of antlr3 at runtime.
7784 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7785 ;; This version of ST4 is sufficient for the latest antlr3.
7786 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7787 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7788 ;; against the latest ST4.
7789 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7790 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7791 ;; only grammar files with the antlr2 syntax.
7792 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7793
7794 (define-public java-stringtemplate
7795 (package (inherit java-stringtemplate-3)
7796 (name "java-stringtemplate")
7797 (version "4.0.8")
7798 (source (origin
7799 (method url-fetch)
7800 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7801 version ".tar.gz"))
7802 (file-name (string-append name "-" version ".tar.gz"))
7803 (sha256
7804 (base32
7805 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7806 (build-system ant-build-system)
7807 (arguments
7808 `(#:jar-name (string-append ,name "-" ,version ".jar")
7809 #:tests? #f ; FIXME: tests fail for unknown reasons
7810 #:test-dir "test"
7811 #:modules ((guix build ant-build-system)
7812 (guix build utils)
7813 (srfi srfi-1))
7814 #:phases
7815 (modify-phases %standard-phases
7816 (add-before 'check 'fix-test-target
7817 (lambda _
7818 (substitute* "build.xml"
7819 (("\\$\\{test.home\\}/java") "${test.home}/")
7820 (("\\*Test.java") "Test*.java"))
7821 #t))
7822 (add-before 'build 'generate-grammar
7823 (lambda _
7824 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7825 (for-each (lambda (file)
7826 (format #t "~a\n" file)
7827 (invoke "antlr3" file))
7828 '("STParser.g" "Group.g" "CodeGenerator.g")))
7829 #t)))))
7830 (inputs
7831 `(("antlr3" ,antlr3-bootstrap)
7832 ("antlr2" ,antlr2)
7833 ("java-stringtemplate" ,java-stringtemplate-3)
7834 ("java-junit" ,java-junit)))))
7835
7836 (define java-stringtemplate-4.0.6
7837 (package (inherit java-stringtemplate)
7838 (name "java-stringtemplate")
7839 (version "4.0.6")
7840 (source (origin
7841 (method url-fetch)
7842 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7843 version ".tar.gz"))
7844 (file-name (string-append name "-" version ".tar.gz"))
7845 (sha256
7846 (base32
7847 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7848 (inputs
7849 `(("antlr3" ,antlr3-3.3)
7850 ("antlr2" ,antlr2)
7851 ("java-stringtemplate" ,java-stringtemplate-3)))))
7852
7853 (define-public antlr3
7854 (package
7855 (name "antlr3")
7856 (version "3.5.2")
7857 (source (origin
7858 (method git-fetch)
7859 (uri (git-reference
7860 (url "https://github.com/antlr/antlr3")
7861 (commit version)))
7862 (file-name (git-file-name name version))
7863 (sha256
7864 (base32
7865 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7866 (build-system ant-build-system)
7867 (arguments
7868 `(#:jar-name (string-append ,name "-" ,version ".jar")
7869 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7870 #:tests? #f
7871 #:phases
7872 (modify-phases %standard-phases
7873 (add-after 'install 'bin-install
7874 (lambda* (#:key inputs outputs #:allow-other-keys)
7875 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7876 (bin (string-append (assoc-ref outputs "out") "/bin")))
7877 (mkdir-p bin)
7878 (with-output-to-file (string-append bin "/antlr3")
7879 (lambda _
7880 (display
7881 (string-append "#!" (which "sh") "\n"
7882 "java -cp " jar "/" ,name "-" ,version ".jar:"
7883 (string-concatenate
7884 (find-files (assoc-ref inputs "stringtemplate")
7885 ".*\\.jar"))
7886 ":"
7887 (string-concatenate
7888 (find-files (assoc-ref inputs "stringtemplate4")
7889 ".*\\.jar"))
7890 ":"
7891 (string-concatenate
7892 (find-files (string-append
7893 (assoc-ref inputs "antlr")
7894 "/lib")
7895 ".*\\.jar"))
7896 " org.antlr.Tool $*"))))
7897 (chmod (string-append bin "/antlr3") #o755))
7898 #t))
7899 (add-before 'build 'generate-grammar
7900 (lambda _
7901 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7902 (for-each (lambda (file)
7903 (display file)
7904 (newline)
7905 (invoke "antlr3" file))
7906 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7907 "AssignTokenTypesWalker.g"
7908 "ActionTranslator.g" "TreeToNFAConverter.g"
7909 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7910 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7911 (substitute* "ANTLRParser.java"
7912 (("public Object getTree") "public GrammarAST getTree"))
7913 (substitute* "ANTLRv3Parser.java"
7914 (("public Object getTree") "public CommonTree getTree"))
7915 (chdir "../../../../../java")
7916 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7917 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7918 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7919 (substitute* "org/antlr/tool/ErrorManager.java"
7920 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
7921 (chdir "../../../..")
7922 #t))
7923 (add-before 'build 'fix-build-xml
7924 (lambda _
7925 (substitute* "build.xml"
7926 (("target name=\"compile\">")
7927 "target name=\"compile\">
7928 <copy todir=\"${classes.dir}\">
7929 <fileset dir=\"tool/src/main/resources\">
7930 <include name=\"**/*.stg\"/>
7931 <include name=\"**/*.st\"/>
7932 <include name=\"**/*.sti\"/>
7933 <include name=\"**/STLexer.tokens\"/>
7934 </fileset>
7935 </copy>"))
7936 #t)))))
7937 (native-inputs
7938 `(("antlr" ,antlr2)
7939 ("antlr3" ,antlr3-bootstrap)))
7940 (inputs
7941 `(("junit" ,java-junit)
7942 ("stringtemplate" ,java-stringtemplate-3)
7943 ("stringtemplate4" ,java-stringtemplate)))
7944 (propagated-inputs
7945 `(("stringtemplate" ,java-stringtemplate-3)
7946 ("antlr" ,antlr2)
7947 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
7948 (home-page "https://www.antlr3.org")
7949 (synopsis "Framework for constructing recognizers, compilers, and translators")
7950 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7951 is a language tool that provides a framework for constructing recognizers,
7952 compilers, and translators from grammatical descriptions containing Java, C#,
7953 C++, or Python actions. ANTLR provides excellent support for tree construction,
7954 tree walking, and translation.")
7955 (license license:bsd-3)))
7956
7957 (define antlr3-bootstrap
7958 (package
7959 (inherit antlr3)
7960 (name "antlr3-bootstrap")
7961 (native-inputs
7962 `(("antlr" ,antlr2)
7963 ("antlr3" ,antlr3-3.3)))
7964 (inputs
7965 `(("junit" ,java-junit)))))
7966
7967 (define-public antlr3-3.3
7968 (package
7969 (inherit antlr3)
7970 (name "antlr3")
7971 (version "3.3")
7972 (source (origin
7973 (method url-fetch)
7974 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7975 "gh-pages/download/antlr-"
7976 version ".tar.gz"))
7977 (sha256
7978 (base32
7979 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7980 (patches
7981 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
7982 (arguments
7983 `(#:jar-name (string-append ,name "-" ,version ".jar")
7984 #:source-dir (string-join '("tool/src/main/java"
7985 "runtime/Java/src/main/java"
7986 "tool/src/main/antlr2"
7987 "tool/src/main/antlr3")
7988 ":")
7989 #:tests? #f ; FIXME: tests seem to require maven plugin
7990 #:modules ((guix build ant-build-system)
7991 (guix build utils)
7992 (srfi srfi-1))
7993 #:phases
7994 (modify-phases %standard-phases
7995 (add-after 'install 'bin-install
7996 (lambda* (#:key inputs outputs #:allow-other-keys)
7997 (let* ((out (assoc-ref outputs "out"))
7998 (jar (string-append out "/share/java"))
7999 (bin (string-append out "/bin")))
8000 (mkdir-p bin)
8001 (with-output-to-file (string-append bin "/antlr3")
8002 (lambda _
8003 (display
8004 (string-append
8005 "#!" (which "sh") "\n"
8006 "java -cp " jar "/antlr3-3.3.jar:"
8007 (string-join
8008 (append (find-files (assoc-ref inputs "java-stringtemplate")
8009 ".*\\.jar$")
8010 (find-files (string-append (assoc-ref inputs "antlr")
8011 "/lib")
8012 ".*\\.jar$"))
8013 ":")
8014 " org.antlr.Tool $*"))))
8015 (chmod (string-append bin "/antlr3") #o755)
8016 #t)))
8017 (add-before 'build 'generate-grammar
8018 (lambda _
8019 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8020 (("import org.antlr.grammar.v2.\\*;")
8021 "import org.antlr.grammar.v2.*;\n
8022 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8023 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8024 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8025 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8026 (for-each (lambda (file)
8027 (format #t "~a\n" file)
8028 (invoke "antlr" file))
8029 '("antlr.g" "antlr.print.g" "assign.types.g"
8030 "buildnfa.g" "codegen.g" "define.g")))
8031 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8032 (for-each (lambda (file)
8033 (format #t "~a\n" file)
8034 (invoke "antlr3" file))
8035 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8036 "ANTLRv3Tree.g")))
8037 #t))
8038 (add-before 'build 'fix-build-xml
8039 (lambda _
8040 (substitute* "build.xml"
8041 (("target name=\"compile\">")
8042 "target name=\"compile\">
8043 <copy todir=\"${classes.dir}\">
8044 <fileset dir=\"tool/src/main/resources\">
8045 <include name=\"**/*.stg\"/>
8046 <include name=\"**/*.st\"/>
8047 <include name=\"**/*.sti\"/>
8048 <include name=\"**/STLexer.tokens\"/>
8049 </fileset>
8050 </copy>"))
8051 #t)))))
8052 (native-inputs
8053 `(("antlr" ,antlr2)
8054 ("antlr3" ,antlr3-3.1)))
8055 (inputs
8056 `(("junit" ,java-junit)))
8057 (propagated-inputs
8058 `(("java-stringtemplate" ,java-stringtemplate-3)
8059 ("antlr" ,antlr2)))))
8060
8061 (define-public antlr3-3.1
8062 (package
8063 (inherit antlr3)
8064 (version "3.1")
8065 (source (origin
8066 (method url-fetch)
8067 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8068 "gh-pages/download/antlr-"
8069 version ".tar.gz"))
8070 (sha256
8071 (base32
8072 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8073 (patches
8074 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8075 (arguments
8076 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8077 #:source-dir "src:runtime/Java/src"
8078 #:tests? #f
8079 #:phases
8080 (modify-phases %standard-phases
8081 (add-after 'install 'bin-install
8082 (lambda* (#:key inputs outputs #:allow-other-keys)
8083 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8084 (bin (string-append (assoc-ref outputs "out") "/bin")))
8085 (mkdir-p bin)
8086 (with-output-to-file (string-append bin "/antlr3")
8087 (lambda _
8088 (display
8089 (string-append "#!" (which "sh") "\n"
8090 "java -cp " jar "/antlr3-3.1.jar:"
8091 (string-concatenate
8092 (find-files (assoc-ref inputs "stringtemplate")
8093 ".*\\.jar"))
8094 ":"
8095 (string-concatenate
8096 (find-files (string-append
8097 (assoc-ref inputs "antlr")
8098 "/lib")
8099 ".*\\.jar"))
8100 " org.antlr.Tool $*"))))
8101 (chmod (string-append bin "/antlr3") #o755))
8102 #t))
8103 (add-before 'build 'generate-grammar
8104 (lambda _
8105 (let ((dir "src/org/antlr/tool/"))
8106 (for-each (lambda (file)
8107 (display file)
8108 (newline)
8109 (invoke "antlr" "-o" dir (string-append dir file)))
8110 '("antlr.g" "antlr.print.g" "assign.types.g"
8111 "buildnfa.g" "define.g")))
8112 (format #t "codegen.g\n")
8113 (invoke "antlr" "-o" "src/org/antlr/codegen"
8114 "src/org/antlr/codegen/codegen.g")
8115 #t))
8116 (add-before 'build 'fix-build-xml
8117 (lambda _
8118 (substitute* "build.xml"
8119 (("target name=\"compile\">")
8120 "target name=\"compile\">
8121 <copy todir=\"${classes.dir}\">
8122 <fileset dir=\"src\">
8123 <include name=\"**/*.stg\"/>
8124 <include name=\"**/*.st\"/>
8125 <include name=\"**/*.sti\"/>
8126 <include name=\"**/STLexer.tokens\"/>
8127 </fileset>
8128 </copy>"))
8129 #t)))))
8130 (native-inputs
8131 `(("antlr" ,antlr2)))
8132 (inputs
8133 `(("junit" ,java-junit)))
8134 (propagated-inputs
8135 `(("stringtemplate" ,java-stringtemplate-3)))))
8136
8137 (define-public java-commons-cli-1.2
8138 ;; This is a bootstrap dependency for Maven2.
8139 (package
8140 (inherit java-commons-cli)
8141 (version "1.2")
8142 (source (origin
8143 (method url-fetch)
8144 (uri (string-append "mirror://apache/commons/cli/source/"
8145 "commons-cli-" version "-src.tar.gz"))
8146 (sha256
8147 (base32
8148 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8149 (arguments
8150 `(#:jar-name "commons-cli.jar"
8151 #:phases
8152 (modify-phases %standard-phases
8153 (add-before 'check 'fix-build-xml
8154 (lambda* (#:key inputs #:allow-other-keys)
8155 (substitute* "build.xml"
8156 (("dir=\"\\$\\{test.home\\}/java\"")
8157 "dir=\"${test.home}\""))
8158 #t)))))
8159 (native-inputs
8160 `(("java-junit" ,java-junit)))))
8161
8162 (define-public java-microemulator-cldc
8163 (package
8164 (name "java-microemulator-cldc")
8165 (version "2.0.4")
8166 (source (origin
8167 (method url-fetch)
8168 (uri (string-append "https://github.com/barteo/microemu/archive/"
8169 "microemulator_"
8170 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8171 version)
8172 ".tar.gz"))
8173 (file-name (string-append name "-" version ".tar.gz"))
8174 (sha256
8175 (base32
8176 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8177 (build-system ant-build-system)
8178 (arguments
8179 `(#:jar-name "microemulator-cldc.jar"
8180 #:source-dir "microemu-cldc/src/main/java"
8181 #:tests? #f)); Requires even older software
8182 (home-page "https://github.com/barteo/microemu")
8183 (synopsis "J2ME CLDC emulator")
8184 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8185 Emulator. It demonstrates MIDlet based applications in web browser
8186 applet and can be run as a standalone java application.")
8187 (license (list license:asl2.0
8188 ;; or altenatively:
8189 license:lgpl2.1+))))
8190
8191 (define-public java-datanucleus-javax-persistence
8192 (package
8193 (name "java-datanucleus-javax-persistence")
8194 (version "2.2.0")
8195 (source (origin
8196 (method url-fetch)
8197 (uri (string-append "https://github.com/datanucleus/"
8198 "javax.persistence/archive/javax.persistence-"
8199 version "-release.tar.gz"))
8200 (sha256
8201 (base32
8202 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8203 (build-system ant-build-system)
8204 (arguments
8205 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8206 #:jdk ,icedtea-8
8207 #:source-dir "src/main/java"
8208 #:tests? #f)); no tests
8209 (home-page "https://github.com/datanucleus/javax.persistence")
8210 (synopsis "JPA API")
8211 (description "This package contains a clean definition of JPA API intended
8212 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8213 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8214 used to generate this API.")
8215 (license (list license:edl1.0 license:epl1.0))))
8216
8217 (define-public java-osgi-cmpn
8218 (package
8219 (name "java-osgi-cmpn")
8220 (version "6.0.0")
8221 (source (origin
8222 (method url-fetch)
8223 (uri (string-append "https://repo1.maven.org/maven2/"
8224 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8225 version "-sources.jar"))
8226 (sha256
8227 (base32
8228 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8229 (build-system ant-build-system)
8230 (arguments
8231 `(#:jar-name "osgi-cmpn.jar"
8232 #:tests? #f)); no tests
8233 (inputs
8234 `(("annotation" ,java-osgi-annotation)
8235 ("core" ,java-osgi-core)
8236 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8237 ("microemulator" ,java-microemulator-cldc)
8238 ("servlet" ,java-classpathx-servletapi)))
8239 (home-page "https://www.osgi.org")
8240 (synopsis "Compendium specification module of OSGi framework")
8241 (description
8242 "OSGi, for Open Services Gateway initiative framework, is a module system
8243 and service platform for the Java programming language. This package contains
8244 the compendium specification module, providing interfaces and classes for use
8245 in compiling bundles.")
8246 (license license:asl2.0)))
8247
8248 (define-public java-osgi-service-component-annotations
8249 (package
8250 (name "java-osgi-service-component-annotations")
8251 (version "1.3.0")
8252 (source (origin
8253 (method url-fetch)
8254 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8255 "org.osgi.service.component.annotations/"
8256 version "/org.osgi.service.component.annotations-"
8257 version "-sources.jar"))
8258 (sha256
8259 (base32
8260 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8261 (build-system ant-build-system)
8262 (arguments
8263 `(#:jar-name "osgi-service-component-annotations.jar"
8264 #:tests? #f)); no tests
8265 (inputs
8266 `(("annotation" ,java-osgi-annotation)))
8267 (home-page "https://www.osgi.org")
8268 (synopsis "Support annotations for osgi-service-component")
8269 (description
8270 "OSGi, for Open Services Gateway initiative framework, is a module system
8271 and service platform for the Java programming language. This package contains
8272 the support annotations for osgi-service-component.")
8273 (license license:asl2.0)))
8274
8275 (define-public java-osgi-dto
8276 (package
8277 (name "java-osgi-dto")
8278 (version "1.0.0")
8279 (source (origin
8280 (method url-fetch)
8281 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8282 "org.osgi.dto/" version "/org.osgi.dto-"
8283 version "-sources.jar"))
8284 (sha256
8285 (base32
8286 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8287 (build-system ant-build-system)
8288 (arguments
8289 `(#:jar-name "osgi-dto.jar"
8290 #:tests? #f)); no tests
8291 (inputs
8292 `(("annotation" ,java-osgi-annotation)))
8293 (home-page "https://www.osgi.org")
8294 (synopsis "Data Transfer Objects")
8295 (description
8296 "OSGi, for Open Services Gateway initiative framework, is a module system
8297 and service platform for the Java programming language. This package contains
8298 the Data Transfer Objects. It is easily serializable having only public fields
8299 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8300 Map and array aggregates may also be used. The aggregates must only hold
8301 objects of the listed types or aggregates.")
8302 (license license:asl2.0)))
8303
8304 (define-public java-osgi-resource
8305 (package
8306 (name "java-osgi-resource")
8307 (version "1.0.0")
8308 (source (origin
8309 (method url-fetch)
8310 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8311 "org.osgi.resource/"
8312 version "/org.osgi.resource-"
8313 version "-sources.jar"))
8314 (sha256
8315 (base32
8316 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8317 (build-system ant-build-system)
8318 (arguments
8319 `(#:jar-name "osgi-resource.jar"
8320 #:tests? #f)); no tests
8321 (inputs
8322 `(("annotation" ,java-osgi-annotation)
8323 ("dto" ,java-osgi-dto)))
8324 (home-page "https://www.osgi.org")
8325 (synopsis "OSGI Resource")
8326 (description
8327 "OSGi, for Open Services Gateway initiative framework, is a module system
8328 and service platform for the Java programming language. This package contains
8329 the definition of common types in osgi packages.")
8330 (license license:asl2.0)))
8331
8332 (define-public java-osgi-namespace-contract
8333 (package
8334 (name "java-osgi-namespace-contract")
8335 (version "1.0.0")
8336 (source (origin
8337 (method url-fetch)
8338 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8339 "org.osgi.namespace.contract/"
8340 version "/org.osgi.namespace.contract-"
8341 version "-sources.jar"))
8342 (sha256
8343 (base32
8344 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
8345 (build-system ant-build-system)
8346 (inputs
8347 `(("resource" ,java-osgi-resource)
8348 ("annotation" ,java-osgi-annotation)))
8349 (arguments
8350 `(#:jar-name "osgi-namespace-contract.jar"
8351 #:tests? #f)); no tests
8352 (home-page "https://www.osgi.org")
8353 (synopsis "Contract Capability and Requirement Namespace")
8354 (description
8355 "OSGi, for Open Services Gateway initiative framework, is a module system
8356 and service platform for the Java programming language. This package contains
8357 the names for the attributes and directives for a namespace with contracts.")
8358 (license license:asl2.0)))
8359
8360 (define-public java-osgi-namespace-extender
8361 (package
8362 (name "java-osgi-namespace-extender")
8363 (version "1.0.1")
8364 (source (origin
8365 (method url-fetch)
8366 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8367 "org.osgi.namespace.extender/"
8368 version "/org.osgi.namespace.extender-"
8369 version "-sources.jar"))
8370 (sha256
8371 (base32
8372 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
8373 (build-system ant-build-system)
8374 (inputs
8375 `(("resource" ,java-osgi-resource)
8376 ("annotation" ,java-osgi-annotation)))
8377 (arguments
8378 `(#:jar-name "osgi-namespace-extendent.jar"
8379 #:tests? #f)); no tests
8380 (home-page "https://www.osgi.org")
8381 (synopsis "Extender Capability and Requirement Namespace")
8382 (description
8383 "OSGi, for Open Services Gateway initiative framework, is a module system
8384 and service platform for the Java programming language. This package contains
8385 the names for the attributes and directives for an extender namespace.")
8386 (license license:asl2.0)))
8387
8388 (define-public java-osgi-namespace-service
8389 (package
8390 (name "java-osgi-namespace-service")
8391 (version "1.0.0")
8392 (source (origin
8393 (method url-fetch)
8394 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8395 "org.osgi.namespace.service/"
8396 version "/org.osgi.namespace.service-"
8397 version "-sources.jar"))
8398 (sha256
8399 (base32
8400 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
8401 (build-system ant-build-system)
8402 (inputs
8403 `(("resource" ,java-osgi-resource)
8404 ("annotation" ,java-osgi-annotation)))
8405 (arguments
8406 `(#:jar-name "osgi-namespace-service.jar"
8407 #:tests? #f)); no tests
8408 (home-page "https://www.osgi.org")
8409 (synopsis "Service Capability and Requirement Namespace")
8410 (description
8411 "OSGi, for Open Services Gateway initiative framework, is a module system
8412 and service platform for the Java programming language. This package contains
8413 the names for the attributes and directives for a service namespace.")
8414 (license license:asl2.0)))
8415
8416 (define-public java-osgi-util-function
8417 (package
8418 (name "java-osgi-util-function")
8419 (version "1.0.0")
8420 (source (origin
8421 (method url-fetch)
8422 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8423 "org.osgi.util.function/"
8424 version "/org.osgi.util.function-"
8425 version "-sources.jar"))
8426 (sha256
8427 (base32
8428 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
8429 (build-system ant-build-system)
8430 (arguments
8431 `(#:jar-name "osgi-util-function.jar"
8432 #:tests? #f)); no tests
8433 (inputs
8434 `(("annotation" ,java-osgi-annotation)))
8435 (home-page "https://www.osgi.org")
8436 (synopsis "OSGI Util Function")
8437 (description
8438 "OSGi, for Open Services Gateway initiative framework, is a module system
8439 and service platform for the Java programming language. This package contains
8440 an interface for a function that accepts a single argument and produces a result.")
8441 (license license:asl2.0)))
8442
8443 (define-public java-osgi-util-promise
8444 (package
8445 (name "java-osgi-util-promise")
8446 (version "1.0.0")
8447 (source (origin
8448 (method url-fetch)
8449 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8450 "org.osgi.util.promise/"
8451 version "/org.osgi.util.promise-"
8452 version "-sources.jar"))
8453 (sha256
8454 (base32
8455 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
8456 (build-system ant-build-system)
8457 (arguments
8458 `(#:jar-name "osgi-util-promise.jar"
8459 #:tests? #f)); no tests
8460 (inputs
8461 `(("annotation" ,java-osgi-annotation)
8462 ("function" ,java-osgi-util-function)))
8463 (home-page "https://www.osgi.org")
8464 (synopsis "Promise of a value")
8465 (description
8466 "OSGi, for Open Services Gateway initiative framework, is a module system
8467 and service platform for the Java programming language. This package contains
8468 an interface and utilitary classes for promises. A Promise represents a future
8469 value. It handles the interactions for asynchronous processing.")
8470 (license license:asl2.0)))
8471
8472 (define-public java-osgi-service-metatype-annotations
8473 (package
8474 (name "java-osgi-service-metatype-annotations")
8475 (version "1.3.0")
8476 (source (origin
8477 (method url-fetch)
8478 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8479 "org.osgi.service.metatype.annotations/"
8480 version "/org.osgi.service.metatype.annotations-"
8481 version "-sources.jar"))
8482 (sha256
8483 (base32
8484 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
8485 (build-system ant-build-system)
8486 (arguments
8487 `(#:jar-name "osgi-service-metatype-annotations.jar"
8488 #:tests? #f)); no tests
8489 (inputs
8490 `(("annotation" ,java-osgi-annotation)))
8491 (home-page "https://www.osgi.org")
8492 (synopsis "Support annotations for metatype")
8493 (description
8494 "OSGi, for Open Services Gateway initiative framework, is a module system
8495 and service platform for the Java programming language. This package contains
8496 the support annotations for metatype.")
8497 (license license:asl2.0)))
8498
8499 (define-public java-osgi-service-repository
8500 (package
8501 (name "java-osgi-service-repository")
8502 (version "1.1.0")
8503 (source (origin
8504 (method url-fetch)
8505 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8506 "org.osgi.service.repository/"
8507 version "/org.osgi.service.repository-"
8508 version "-sources.jar"))
8509 (sha256
8510 (base32
8511 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
8512 (build-system ant-build-system)
8513 (arguments
8514 `(#:jar-name "osgi-service-repository.jar"
8515 #:tests? #f)); no tests
8516 (inputs
8517 `(("annotation" ,java-osgi-annotation)
8518 ("promise" ,java-osgi-util-promise)
8519 ("resource" ,java-osgi-resource)))
8520 (home-page "https://www.osgi.org")
8521 (synopsis "OSGI service repository")
8522 (description
8523 "OSGi, for Open Services Gateway initiative framework, is a module system
8524 and service platform for the Java programming language. This package contains
8525 a repository service that contains resources.")
8526 (license license:asl2.0)))
8527
8528 (define-public java-osgi-framework
8529 (package
8530 (name "java-osgi-framework")
8531 (version "1.8.0")
8532 (source (origin
8533 (method url-fetch)
8534 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8535 "org.osgi.framework/" version "/org.osgi.framework-"
8536 version "-sources.jar"))
8537 (sha256
8538 (base32
8539 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
8540 (build-system ant-build-system)
8541 (arguments
8542 `(#:jar-name "osgi-framework.jar"
8543 #:tests? #f)); no tests
8544 (inputs
8545 `(("annotation" ,java-osgi-annotation)
8546 ("resource" ,java-osgi-resource)
8547 ("dto" ,java-osgi-dto)))
8548 (home-page "https://www.osgi.org")
8549 (synopsis "OSGi framework")
8550 (description
8551 "OSGi, for Open Services Gateway initiative framework, is a module system
8552 and service platform for the Java programming language.")
8553 (license license:asl2.0)))
8554
8555 (define-public java-osgi-service-log
8556 (package
8557 (name "java-osgi-service-log")
8558 (version "1.3.0")
8559 (source (origin
8560 (method url-fetch)
8561 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8562 "org.osgi.service.log/"
8563 version "/org.osgi.service.log-"
8564 version "-sources.jar"))
8565 (sha256
8566 (base32
8567 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
8568 (build-system ant-build-system)
8569 (arguments
8570 `(#:jar-name "osgi-service-log.jar"
8571 #:tests? #f)); no tests
8572 (inputs
8573 `(("java-osgi-framework" ,java-osgi-framework)))
8574 (home-page "https://www.osgi.org")
8575 (synopsis "Provides methods for bundles to write messages to the log")
8576 (description
8577 "OSGi, for Open Services Gateway initiative framework, is a module system
8578 and service platform for the Java programming language. This package contains
8579 the log service.")
8580 (license license:asl2.0)))
8581
8582 (define-public java-osgi-service-jdbc
8583 (package
8584 (name "java-osgi-service-jdbc")
8585 (version "1.0.0")
8586 (source (origin
8587 (method url-fetch)
8588 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8589 "org.osgi.service.jdbc/"
8590 version "/org.osgi.service.jdbc-"
8591 version "-sources.jar"))
8592 (sha256
8593 (base32
8594 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
8595 (build-system ant-build-system)
8596 (arguments
8597 `(#:jar-name "osgi-service-jdbc.jar"
8598 #:tests? #f)); no tests
8599 (home-page "https://www.osgi.org")
8600 (synopsis "Factory for JDBC connection factories")
8601 (description
8602 "OSGi, for Open Services Gateway initiative framework, is a module system
8603 and service platform for the Java programming language. This package contains
8604 a factory for JDBC connection factories. There are 3 preferred connection
8605 factories for getting JDBC connections:
8606
8607 @itemize
8608 @item @code{javax.sql.DataSource};
8609 @item @code{javax.sql.ConnectionPoolDataSource};
8610 @item @code{javax.sql.XADataSource}.
8611 @end itemize")
8612 (license license:asl2.0)))
8613
8614 (define-public java-osgi-service-resolver
8615 (package
8616 (name "java-osgi-service-resolver")
8617 (version "1.0.1")
8618 (source (origin
8619 (method url-fetch)
8620 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8621 "org.osgi.service.resolver/"
8622 version "/org.osgi.service.resolver-"
8623 version "-sources.jar"))
8624 (sha256
8625 (base32
8626 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
8627 (build-system ant-build-system)
8628 (arguments
8629 `(#:jar-name "osgi-service-resolver.jar"
8630 #:tests? #f)); no tests
8631 (inputs
8632 `(("annotation" ,java-osgi-annotation)
8633 ("resource" ,java-osgi-resource)))
8634 (home-page "https://www.osgi.org")
8635 (synopsis "OSGI Resolver service")
8636 (description
8637 "OSGi, for Open Services Gateway initiative framework, is a module system
8638 and service platform for the Java programming language. This package contains
8639 a resolver service that resolves the specified resources in the context supplied
8640 by the caller.")
8641 (license license:asl2.0)))
8642
8643 (define-public java-osgi-util-tracker
8644 (package
8645 (name "java-osgi-util-tracker")
8646 (version "1.5.1")
8647 (source (origin
8648 (method url-fetch)
8649 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8650 "org.osgi.util.tracker/"
8651 version "/org.osgi.util.tracker-"
8652 version "-sources.jar"))
8653 (sha256
8654 (base32
8655 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
8656 (build-system ant-build-system)
8657 (arguments
8658 `(#:jar-name "osgi-util-tracker.jar"
8659 #:tests? #f)); no tests
8660 (inputs
8661 `(("framework" ,java-osgi-framework)
8662 ("annotation" ,java-osgi-annotation)))
8663 (home-page "https://www.osgi.org")
8664 (synopsis "Bundle tracking")
8665 (description
8666 "OSGi, for Open Services Gateway initiative framework, is a module system
8667 and service platform for the Java programming language. This package contains
8668 bundle tracking utility classes.")
8669 (license license:asl2.0)))
8670
8671 (define-public java-osgi-service-cm
8672 (package
8673 (name "java-osgi-service-cm")
8674 (version "1.5.0")
8675 (source (origin
8676 (method url-fetch)
8677 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8678 "org.osgi.service.cm/"
8679 version "/org.osgi.service.cm-"
8680 version "-sources.jar"))
8681 (sha256
8682 (base32
8683 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
8684 (build-system ant-build-system)
8685 (arguments
8686 `(#:jar-name "osgi-service-cm.jar"
8687 #:tests? #f)); no tests
8688 (inputs
8689 `(("framework" ,java-osgi-framework)
8690 ("annotation" ,java-osgi-annotation)))
8691 (home-page "https://www.osgi.org")
8692 (synopsis "OSGI Configuration Management")
8693 (description
8694 "OSGi, for Open Services Gateway initiative framework, is a module system
8695 and service platform for the Java programming language. This package contains
8696 utility classes for the configuration of services.")
8697 (license license:asl2.0)))
8698
8699 (define-public java-osgi-service-packageadmin
8700 (package
8701 (name "java-osgi-service-packageadmin")
8702 (version "1.2.0")
8703 (source (origin
8704 (method url-fetch)
8705 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8706 "org.osgi.service.packageadmin/"
8707 version "/org.osgi.service.packageadmin-"
8708 version "-sources.jar"))
8709 (sha256
8710 (base32
8711 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
8712 (build-system ant-build-system)
8713 (arguments
8714 `(#:jar-name "osgi-service-packageadmin.jar"
8715 #:tests? #f)); no tests
8716 (inputs
8717 `(("framework" ,java-osgi-framework)))
8718 (home-page "https://www.osgi.org")
8719 (synopsis "OSGI Package Administration")
8720 (description
8721 "OSGi, for Open Services Gateway initiative framework, is a module system
8722 and service platform for the Java programming language. This package contains
8723 the packageadmin service.")
8724 (license license:asl2.0)))
8725
8726 (define-public java-ops4j-base-lang
8727 (package
8728 (name "java-ops4j-base-lang")
8729 (version "1.5.0")
8730 (source (origin
8731 (method url-fetch)
8732 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
8733 "archive/base-" version ".tar.gz"))
8734 (sha256
8735 (base32
8736 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
8737 (build-system ant-build-system)
8738 (arguments
8739 `(#:jar-name "java-ops4j-base-lang.jar"
8740 #:source-dir "ops4j-base-lang/src/main/java"
8741 #:tests? #f; no tests
8742 #:phases
8743 (modify-phases %standard-phases
8744 (add-before 'build 'add-test-file
8745 (lambda _
8746 ;; That file is required by a test in ops4j-pax-exam-core-spi
8747 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
8748 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
8749 (lambda _
8750 (display
8751 (string-append
8752 "version=" ,version "\n"
8753 "groupId=org.ops4j.base"
8754 "artifactId=ops4j-base-lang\n"))))
8755 #t)))))
8756 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
8757 (synopsis "Utility classes and extensions to be used in OPS4J projects")
8758 (description "OPS4J stands for Open Participation Software for Java. This
8759 package contains utilities and extensions related to @code{java.lang}.")
8760 (license license:asl2.0)))
8761
8762 (define-public java-ops4j-base-monitors
8763 (package
8764 (inherit java-ops4j-base-lang)
8765 (name "java-ops4j-base-monitors")
8766 (arguments
8767 `(#:jar-name "java-ops4j-base-monitors.jar"
8768 #:source-dir "ops4j-base-monitors/src/main/java"
8769 #:tests? #f)); no tests
8770 (inputs
8771 `(("lang" ,java-ops4j-base-lang)))
8772 (description "OPS4J stands for Open Participation Software for Java. This
8773 package contains utilities and extensions related to monitoring.")))
8774
8775 (define-public java-ops4j-base-io
8776 (package
8777 (inherit java-ops4j-base-lang)
8778 (name "java-ops4j-base-io")
8779 (arguments
8780 `(#:jar-name "java-ops4j-base-io.jar"
8781 #:source-dir "ops4j-base-io/src/main/java"
8782 #:test-dir "ops4j-base-io/src/test"
8783 #:test-exclude
8784 (list "**/ListerTest.java")))
8785 (inputs
8786 `(("lang" ,java-ops4j-base-monitors)
8787 ("lang" ,java-ops4j-base-lang)))
8788 (native-inputs
8789 `(("junit" ,java-junit)
8790 ("hamcrest" ,java-hamcrest-core)))
8791 (description "OPS4J stands for Open Participation Software for Java. This
8792 package contains utilities and extensions related to handling streams and files.")))
8793
8794 (define-public java-ops4j-base-util
8795 (package
8796 (inherit java-ops4j-base-lang)
8797 (name "java-ops4j-base-util")
8798 (arguments
8799 `(#:jar-name "java-ops4j-base-util.jar"
8800 #:source-dir "ops4j-base-util/src/main/java"
8801 #:test-dir "ops4j-base-util/src/test"))
8802 (inputs
8803 `(("lang" ,java-ops4j-base-lang)))
8804 (native-inputs
8805 `(("junit" ,java-junit)))
8806 (description "OPS4J stands for Open Participation Software for Java. This
8807 package contains utilities and extensions related to environment, i18n and
8808 mime types.")))
8809
8810 (define-public java-ops4j-base-util-property
8811 (package
8812 (inherit java-ops4j-base-lang)
8813 (name "java-ops4j-base-util-property")
8814 (arguments
8815 `(#:jar-name "java-ops4j-base-util-property.jar"
8816 #:source-dir "ops4j-base-util-property/src/main/java"
8817 #:tests? #f)); no tests
8818 (inputs
8819 `(("lang" ,java-ops4j-base-lang)
8820 ("util" ,java-ops4j-base-util)))
8821 (description "OPS4J stands for Open Participation Software for Java. This
8822 package contains utilities and extensions related to resolving properties from
8823 different sources.")))
8824
8825 (define-public java-ops4j-base-store
8826 (package
8827 (inherit java-ops4j-base-lang)
8828 (name "java-ops4j-base-store")
8829 (arguments
8830 `(#:jar-name "java-ops4j-base-store.jar"
8831 #:source-dir "ops4j-base-store/src/main/java"
8832 #:tests? #f)); no tests
8833 (inputs
8834 `(("lang" ,java-ops4j-base-lang)
8835 ("slf4j" ,java-slf4j-api)
8836 ("io" ,java-ops4j-base-io)))
8837 (description "OPS4J stands for Open Participation Software for Java. This
8838 package contains utilities for storing and retrieving data from an
8839 @code{InputStream}.")))
8840
8841 (define-public java-ops4j-base-spi
8842 (package
8843 (inherit java-ops4j-base-lang)
8844 (name "java-ops4j-base-spi")
8845 (arguments
8846 `(#:jar-name "java-ops4j-base-spi.jar"
8847 #:source-dir "ops4j-base-spi/src/main/java"
8848 #:test-dir "ops4j-base-spi/src/test"))
8849 (native-inputs
8850 `(("junit" ,java-junit)
8851 ("hamcrest" ,java-hamcrest-core)))
8852 (description "OPS4J stands for Open Participation Software for Java. This
8853 package contains utilities for obtaining services via the Java SE 6
8854 @code{ServiceLoader}.")))
8855
8856 (define-public java-aqute-bnd-annotation
8857 (package
8858 (name "java-aqute-bnd-annotation")
8859 (version "3.5.0")
8860 (source (origin
8861 (method url-fetch)
8862 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8863 version ".REL.tar.gz"))
8864 (file-name (string-append name "-" version ".tar.gz"))
8865 (sha256
8866 (base32
8867 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
8868 (build-system ant-build-system)
8869 (arguments
8870 `(#:jar-name "java-aqute-bnd-annotation.jar"
8871 #:source-dir "biz.aQute.bnd.annotation/src"
8872 #:tests? #f)); empty test dir
8873 (home-page "https://bnd.bndtools.org/")
8874 (synopsis "Tools for OSGi")
8875 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8876 headers based on analyzing the class code, it verifies the project settings,
8877 it manages project dependencies, gives diffs jars, and much more.")
8878 (license license:asl2.0)))
8879
8880 (define-public java-aqute-libg
8881 (package
8882 (inherit java-aqute-bnd-annotation)
8883 (name "java-aqute-libg")
8884 (arguments
8885 `(#:jar-name "java-aqute-libg.jar"
8886 ;; The build fails when source/target more recent than 1.7. This
8887 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8888 ;;
8889 ;; It is closed as won't fix. There is no way to change the source
8890 ;; so that it works on 1.8, and still works on 1.6, the upstream
8891 ;; target. It work fine on 1.7, so we use 1.7.
8892 #:make-flags (list "-Dant.build.javac.source=1.7"
8893 "-Dant.build.javac.target=1.7")
8894 #:phases
8895 (modify-phases %standard-phases
8896 (add-before 'configure 'chdir
8897 ;; Change to aQute.libg directory, so that the relative
8898 ;; paths in the tests aren't broken.
8899 (lambda _
8900 (chdir "aQute.libg")
8901 #t))
8902 (add-before 'check 'create-test-directory
8903 ;; Copy the test directory to test/java, since that's where
8904 ;; ant-build-system's default project in build.xml expects to find
8905 ;; the test classes. Leave a copy in the original place to not
8906 ;; break paths in tests.
8907 (lambda _
8908 (mkdir "src/test")
8909 (copy-recursively "test" "src/test/java")
8910 #t)))))
8911 (inputs
8912 `(("slf4j" ,java-slf4j-api)
8913 ("osgi-annot" ,java-osgi-annotation)
8914 ("java-osgi-cmpn" ,java-osgi-cmpn)
8915 ("osgi" ,java-osgi-core)))
8916 (native-inputs
8917 `(("hamcrest" ,java-hamcrest-core)
8918 ("java-junit" ,java-junit)))))
8919
8920 (define-public java-aqute-bndlib
8921 (package
8922 (inherit java-aqute-bnd-annotation)
8923 (name "java-aqute-bndlib")
8924 (arguments
8925 `(#:jar-name "java-bndlib.jar"
8926 #:source-dir "biz.aQute.bndlib/src"
8927 #:tests? #f)); no tests
8928 (inputs
8929 `(("slf4j" ,java-slf4j-api)
8930 ("osgi-annot" ,java-osgi-annotation)
8931 ("java-aqute-libg" ,java-aqute-libg)
8932 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8933 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8934 ("java-osgi-service-repository" ,java-osgi-service-repository)
8935 ("java-osgi-service-log" ,java-osgi-service-log)
8936 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8937 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8938 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8939 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8940 ("promise" ,java-osgi-util-promise)
8941 ("osgi" ,java-osgi-core)))))
8942
8943 (define-public java-ops4j-pax-tinybundles
8944 (package
8945 (name "java-ops4j-pax-tinybundles")
8946 (version "2.1.1")
8947 (source (origin
8948 (method url-fetch)
8949 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8950 "archive/tinybundles-" version ".tar.gz"))
8951 (sha256
8952 (base32
8953 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8954 (arguments
8955 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8956 #:source-dir "src/main/java"
8957 #:test-exclude
8958 ;; Abstract base classes for other tests
8959 (list "**/BndTest.java" "**/CoreTest.java")
8960 #:phases
8961 (modify-phases %standard-phases
8962 (add-before 'check 'fix-version
8963 (lambda _
8964 ;; This test has a reference to an old version of bndlib we are not
8965 ;; packaging. It uses the version referenced in pom.xml. We replace
8966 ;; it with our own version.
8967 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
8968 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
8969 ,(package-version java-aqute-bndlib)))
8970 #t)))))
8971 (inputs
8972 `(("lang" ,java-ops4j-base-lang)
8973 ("io" ,java-ops4j-base-io)
8974 ("store" ,java-ops4j-base-store)
8975 ("slf4j" ,java-slf4j-api)
8976 ("libg" ,java-aqute-libg)
8977 ("bndlib" ,java-aqute-bndlib)))
8978 (native-inputs
8979 `(("junit" ,java-junit)
8980 ("hamcrest" ,java-hamcrest-core)
8981 ("log4j" ,java-log4j-api)
8982 ("bndannotation" ,java-aqute-bnd-annotation)
8983 ("framework" ,java-osgi-framework)))
8984 (build-system ant-build-system)
8985 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8986 (synopsis "Java APIs to create OSGi related artifacts")
8987 (description "Tinybundles is all about creating OSGi related artifacts like
8988 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
8989 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8990 other hand, this library can be a foundation of real end user tools that need
8991 to create those artifacts.")
8992 (license license:asl2.0)))
8993
8994 (define-public java-ops4j-pax-exam-core
8995 (package
8996 (name "java-ops4j-pax-exam-core")
8997 (version "4.11.0")
8998 (source (origin
8999 (method url-fetch)
9000 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9001 "archive/exam-reactor-" version ".tar.gz"))
9002 (sha256
9003 (base32
9004 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9005 (arguments
9006 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9007 #:source-dir "core/pax-exam/src/main/java"
9008 #:test-dir "core/pax-exam/src/test"))
9009 (inputs
9010 `(("slf4j" ,java-slf4j-api)
9011 ("lang" ,java-ops4j-base-lang)
9012 ("io" ,java-ops4j-base-io)
9013 ("util-property" ,java-ops4j-base-util-property)
9014 ("util-store" ,java-ops4j-base-store)
9015 ("java-osgi-core" ,java-osgi-core)))
9016 (native-inputs
9017 `(("junit" ,java-junit)
9018 ("hamcrest" ,java-hamcrest-core)))
9019 (build-system ant-build-system)
9020 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9021 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9022 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9023 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9024 the system under test at the same time.")
9025 (license license:asl2.0)))
9026
9027 (define-public java-ops4j-pax-exam-core-spi
9028 (package
9029 (inherit java-ops4j-pax-exam-core)
9030 (name "java-ops4j-pax-exam-core-spi")
9031 (arguments
9032 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9033 #:source-dir "src/main/java"
9034 #:test-exclude
9035 (list
9036 ;; Abstract base class, not a test
9037 "**/BaseStagedReactorTest.java"
9038 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9039 "**/WarBuilderTest.java")
9040 #:phases
9041 (modify-phases %standard-phases
9042 (add-before 'configure 'chdir
9043 (lambda _
9044 ;; Tests assume we are in this directory
9045 (chdir "core/pax-exam-spi")
9046 #t))
9047 (add-before 'check 'fix-tests
9048 (lambda _
9049 ;; One test checks that this file is present.
9050 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9051 (with-output-to-file
9052 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9053 (lambda _
9054 (display
9055 (string-append "artifactId = pax-exam-spi\n"
9056 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9057 ;; Maven puts compilation results in the target directory, while we
9058 ;; put them in the build directory.
9059 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9060 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9061 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9062 (("target") "build"))
9063 ;; One test is expected to fail, but it doesn't throw the expected exception
9064 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9065 (("AssertionError") "IllegalArgumentException"))
9066 #t)))))
9067 (inputs
9068 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9069 ("lang" ,java-ops4j-base-lang)
9070 ("monitors" ,java-ops4j-base-monitors)
9071 ("store" ,java-ops4j-base-store)
9072 ("io" ,java-ops4j-base-io)
9073 ("spi" ,java-ops4j-base-spi)
9074 ("osgi" ,java-osgi-core)
9075 ("slf4j" ,java-slf4j-api)
9076 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9077 (native-inputs
9078 `(("mockito" ,java-mockito-1)
9079 ("junit" ,java-junit)
9080 ("hamcrest" ,java-hamcrest-core)
9081 ("cglib" ,java-cglib)
9082 ("objenesis" ,java-objenesis)
9083 ("asm" ,java-asm)))))
9084
9085 (define-public java-ops4j-pax-exam-core-junit
9086 (package
9087 (inherit java-ops4j-pax-exam-core)
9088 (name "java-ops4j-pax-exam-core-junit")
9089 (arguments
9090 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9091 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9092 #:tests? #f)); no tests
9093 (inputs
9094 `(("junit" ,java-junit)
9095 ("slf4j" ,java-slf4j-api)
9096 ("core" ,java-ops4j-pax-exam-core)
9097 ("spi" ,java-ops4j-pax-exam-core-spi)))
9098 (native-inputs '())))
9099
9100 (define-public java-fasterxml-jackson-annotations
9101 (package
9102 (name "java-fasterxml-jackson-annotations")
9103 (version "2.9.4")
9104 (source (origin
9105 (method url-fetch)
9106 (uri (string-append "https://github.com/FasterXML/"
9107 "jackson-annotations/archive/"
9108 "jackson-annotations-" version ".tar.gz"))
9109 (sha256
9110 (base32
9111 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9112 (build-system ant-build-system)
9113 (arguments
9114 `(#:jar-name "jackson-annotations.jar"
9115 #:source-dir "src/main/java"
9116 #:test-dir "src/test"))
9117 (native-inputs
9118 `(("junit" ,java-junit)))
9119 (home-page "https://github.com/FasterXML/jackson-annotations")
9120 (synopsis "General purpose annotations for the Jackson Data Processor")
9121 (description "This package contains general purpose annotations for the
9122 Jackson Data Processor, used on value and handler types. The only annotations
9123 not included are ones that require dependency to the Databind package.")
9124 (license license:asl2.0)))
9125
9126 (define-public java-fasterxml-jackson-core
9127 (package
9128 (name "java-fasterxml-jackson-core")
9129 (version "2.9.4")
9130 (source (origin
9131 (method url-fetch)
9132 (uri (string-append "https://github.com/FasterXML/"
9133 "jackson-core/archive/"
9134 "jackson-core-" version ".tar.gz"))
9135 (sha256
9136 (base32
9137 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9138 (build-system ant-build-system)
9139 (arguments
9140 `(#:jar-name "jackson-core.jar"
9141 #:source-dir "src/main/java"
9142 #:test-dir "src/test"
9143 #:test-exclude
9144 (list
9145 ;; Expected failure. pom.xml excludes these
9146 "**/failing/**"
9147 ;; Base classes that have no constructor for junit
9148 "**/BaseTest.java"
9149 "**/ConcurrencyReadTest.java"
9150 "**/ManualCharAccessTest.java"
9151 "**/ManualCharAccessTest.java"
9152 "**/TrailingCommasTest.java"
9153 "**/AsyncMissingValuesInObjectTest.java"
9154 "**/AsyncMissingValuesInArrayTest.java")
9155 #:phases
9156 (modify-phases %standard-phases
9157 (add-before 'configure 'generate-PackageVersion.java
9158 (lambda _
9159 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9160 (in (string-append out ".in")))
9161 (copy-file in out)
9162 (substitute* out
9163 (("@package@") "com.fasterxml.jackson.core.json")
9164 (("@projectversion@") ,version)
9165 (("@projectgroupid@") "com.fasterxml.jackson.core")
9166 (("@projectartifactid@") "jackson-core")))
9167 #t))
9168 (add-before 'build 'copy-resources
9169 (lambda _
9170 (copy-recursively "src/main/resources"
9171 "build/classes")
9172 #t))
9173 (add-before 'check 'copy-test-resources
9174 (lambda _
9175 (copy-recursively "src/test/resources"
9176 "build/test-classes")
9177 #t)))))
9178 (native-inputs
9179 `(("junit" ,java-junit)
9180 ("hamcrest" ,java-hamcrest-core)))
9181 (home-page "https://github.com/FasterXML/jackson-core")
9182 (synopsis "")
9183 (description "")
9184 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9185
9186 (define-public java-fasterxml-jackson-databind
9187 (package
9188 (name "java-fasterxml-jackson-databind")
9189 (version "2.9.4")
9190 (source (origin
9191 (method url-fetch)
9192 (uri (string-append "https://github.com/FasterXML/"
9193 "jackson-databind/archive/"
9194 "jackson-databind-" version ".tar.gz"))
9195 (sha256
9196 (base32
9197 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9198 (build-system ant-build-system)
9199 (arguments
9200 `(#:jar-name "jackson-databind.jar"
9201 #:source-dir "src/main/java"
9202 #:tests? #f; requires javax.measures for which I can't find a free implementation
9203 #:phases
9204 (modify-phases %standard-phases
9205 (add-before 'configure 'generate-PackageVersion.java
9206 (lambda _
9207 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9208 (in (string-append out ".in")))
9209 (copy-file in out)
9210 (substitute* out
9211 (("@package@") "com.fasterxml.jackson.databind.cfg")
9212 (("@projectversion@") ,version)
9213 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9214 (("@projectartifactid@") "jackson-databind")))
9215 #t))
9216 (add-before 'build 'copy-resources
9217 (lambda _
9218 (copy-recursively "src/main/resources" "build/classes")
9219 #t)))))
9220 (inputs
9221 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9222 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9223 (home-page "https://github.com/FasterXML/jackson-databind")
9224 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9225 (description "This package contains the general-purpose data-binding
9226 functionality and tree-model for Jackson Data Processor. It builds on core
9227 streaming parser/generator package, and uses Jackson Annotations for
9228 configuration.")
9229 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9230
9231 (define-public java-fasterxml-jackson-modules-base-jaxb
9232 (package
9233 (name "java-fasterxml-jackson-modules-base-jaxb")
9234 (version "2.9.4")
9235 (source (origin
9236 (method url-fetch)
9237 (uri (string-append "https://github.com/FasterXML/"
9238 "jackson-modules-base/archive/"
9239 "jackson-modules-base-" version ".tar.gz"))
9240 (sha256
9241 (base32
9242 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9243 (build-system ant-build-system)
9244 (arguments
9245 `(#:jar-name "jackson-modules-base-jaxb.jar"
9246 #:source-dir "jaxb/src/main/java"
9247 #:test-dir "jaxb/src/test"
9248 #:test-exclude
9249 ;; Base class for tests
9250 (list "**/BaseJaxbTest.java")
9251 #:phases
9252 (modify-phases %standard-phases
9253 (add-before 'configure 'generate-PackageVersion.java
9254 (lambda _
9255 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9256 "jackson/module/jaxb/PackageVersion.java"))
9257 (in (string-append out ".in")))
9258 (copy-file in out)
9259 (substitute* out
9260 (("@package@") "com.fasterxml.jackson.module.jaxb")
9261 (("@projectversion@") ,version)
9262 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9263 (("@projectartifactid@") "jackson-module-jaxb")))
9264 #t))
9265 (add-before 'build 'copy-resources
9266 (lambda _
9267 (copy-recursively "jaxb/src/main/resources" "build/classes")
9268 #t)))))
9269 (inputs
9270 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9271 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9272 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9273 (native-inputs
9274 `(("java-junit" ,java-junit)))
9275 (home-page "https://github.com/FasterXML/jackson-modules-base")
9276 (synopsis "Jaxb annotations jackson module")
9277 (description "This package is the jaxb annotations module for jackson.")
9278 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9279
9280 (define-public java-fasterxml-jackson-modules-base-mrbean
9281 (package
9282 (name "java-fasterxml-jackson-modules-base-mrbean")
9283 (version "2.9.4")
9284 (source (origin
9285 (method url-fetch)
9286 (uri (string-append "https://github.com/FasterXML/"
9287 "jackson-modules-base/archive/"
9288 "jackson-modules-base-" version ".tar.gz"))
9289 (sha256
9290 (base32
9291 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9292 (build-system ant-build-system)
9293 (arguments
9294 `(#:jar-name "jackson-modules-base-mrbean.jar"
9295 #:source-dir "mrbean/src/main/java"
9296 #:test-dir "mrbean/src/test"
9297 #:test-exclude
9298 ;; Base class for tests
9299 (list "**/BaseTest.java")
9300 #:phases
9301 (modify-phases %standard-phases
9302 (add-before 'configure 'generate-PackageVersion.java
9303 (lambda _
9304 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9305 "jackson/module/mrbean/PackageVersion.java"))
9306 (in (string-append out ".in")))
9307 (copy-file in out)
9308 (substitute* out
9309 (("@package@") "com.fasterxml.jackson.module.mrbean")
9310 (("@projectversion@") ,version)
9311 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9312 (("@projectartifactid@") "jackson-module-mrbean")))
9313 #t)))))
9314 (inputs
9315 `(("java-asm" ,java-asm)
9316 ("java-fasterxml-jackson-annotations"
9317 ,java-fasterxml-jackson-annotations)
9318 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9319 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9320 (native-inputs
9321 `(("java-junit" ,java-junit)))
9322 (home-page "https://github.com/FasterXML/jackson-modules-base")
9323 (synopsis "POJO type materialization for Java")
9324 (description "This package implements POJO type materialization.
9325 Databinders can construct implementation classes for Java interfaces as part
9326 of deserialization.")
9327 (license license:asl2.0)))
9328
9329 (define-public java-snakeyaml
9330 (package
9331 (name "java-snakeyaml")
9332 (version "1.18")
9333 (source (origin
9334 (method url-fetch)
9335 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
9336 version ".tar.gz"))
9337 (file-name (string-append name "-" version ".tar.gz"))
9338 (sha256
9339 (base32
9340 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
9341 (build-system ant-build-system)
9342 (arguments
9343 `(#:jar-name "java-snakeyaml.jar"
9344 #:source-dir "src/main/java"
9345 ;; Tests require velocity, a cyclic dependency, and
9346 ;; java-spring-framework-context which is not packaged.
9347 #:tests? #f))
9348 (home-page "https://bitbucket.org/asomov/snakeyaml")
9349 (synopsis "YAML processor")
9350 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
9351 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9352
9353 (define-public java-fasterxml-jackson-dataformat-yaml
9354 (package
9355 (name "java-fasterxml-jackson-dataformat-yaml")
9356 (version "2.9.4")
9357 (source (origin
9358 (method url-fetch)
9359 (uri (string-append "https://github.com/FasterXML/"
9360 "jackson-dataformats-text/archive/"
9361 "jackson-dataformats-text-" version ".tar.gz"))
9362 (sha256
9363 (base32
9364 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
9365 (build-system ant-build-system)
9366 (arguments
9367 `(#:jar-name "jackson-dataformat-yaml.jar"
9368 #:source-dir "yaml/src/main/java"
9369 #:test-dir "yaml/src/test"
9370 #:test-exclude (list "**/failing/**.java")
9371 #:phases
9372 (modify-phases %standard-phases
9373 (add-before 'configure 'generate-PackageVersion.java
9374 (lambda _
9375 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
9376 (in (string-append out ".in")))
9377 (copy-file in out)
9378 (substitute* out
9379 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
9380 (("@projectversion@") ,version)
9381 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
9382 (("@projectartifactid@") "jackson-dataformat-yaml")))
9383 #t)))))
9384 (inputs
9385 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9386 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9387 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
9388 ("java-snakeyaml" ,java-snakeyaml)))
9389 (native-inputs
9390 `(("junit" ,java-junit)
9391 ("hamcrest" ,java-hamcrest-core)
9392 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
9393 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
9394 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
9395 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
9396 (synopsis "Yaml backend for Jackson")
9397 (description "Dataformat backends are used to support format alternatives
9398 to JSON, supported by default. This is done by sub-classing Jackson core
9399 abstractions.")
9400 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9401
9402 (define-public java-stax2-api
9403 (package
9404 (name "java-stax2-api")
9405 (version "4.0.0")
9406 (source (origin
9407 (method url-fetch)
9408 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
9409 "stax2-api-" version ".tar.gz"))
9410 (sha256
9411 (base32
9412 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
9413 (build-system ant-build-system)
9414 (arguments
9415 `(#:jar-name "java-stax2-api.jar"
9416 #:source-dir "src/main/java"
9417 #:tests? #f)); no tests
9418 (home-page "https://github.com/FasterXML/stax2-api")
9419 (synopsis "Stax2 API")
9420 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
9421 significant new functionalities, such as full-featured bi-direction validation
9422 interface and high-performance Typed Access API.")
9423 (license license:bsd-2)))
9424
9425 (define-public java-woodstox-core
9426 (package
9427 (name "java-woodstox-core")
9428 (version "5.0.3")
9429 (source (origin
9430 (method url-fetch)
9431 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
9432 "woodstox-core-" version ".tar.gz"))
9433 (sha256
9434 (base32
9435 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
9436 (build-system ant-build-system)
9437 (arguments
9438 `(#:jar-name "woodstox.jar"
9439 #:test-exclude
9440 (list "**/Base*.java" "failing/**")
9441 #:phases
9442 (modify-phases %standard-phases
9443 (add-before 'build 'remove-msv-dep
9444 (lambda _
9445 ;; we don't need osgi, and it depends on msv
9446 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
9447 ;; msv's latest release is from 2011 and we don't need it
9448 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
9449 (delete-file-recursively "src/test/java/wstxtest/osgi")
9450 (delete-file-recursively "src/test/java/wstxtest/msv")
9451 #t))
9452 (add-before 'build 'copy-resources
9453 (lambda _
9454 (copy-recursively "src/main/resources" "build/classes")
9455 #t)))))
9456 (inputs
9457 `(("stax2" ,java-stax2-api)))
9458 (native-inputs
9459 `(("junit" ,java-junit)))
9460 (home-page "https://github.com/FasterXML/woodstox")
9461 (synopsis "Stax XML API implementation")
9462 (description "Woodstox is a stax XML API implementation.")
9463 (license license:asl2.0)))
9464
9465 (define-public java-fasterxml-jackson-dataformat-xml
9466 (package
9467 (name "java-fasterxml-jackson-dataformat-xml")
9468 (version "2.9.4")
9469 (source (origin
9470 (method url-fetch)
9471 (uri (string-append "https://github.com/FasterXML/"
9472 "jackson-dataformat-xml/archive/"
9473 "jackson-dataformat-xml-" version ".tar.gz"))
9474 (sha256
9475 (base32
9476 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
9477 (build-system ant-build-system)
9478 (arguments
9479 `(#:jar-name "jackson-dataformat-xml.jar"
9480 #:source-dir "src/main/java"
9481 #:test-exclude
9482 (list "**/failing/**")
9483 #:phases
9484 (modify-phases %standard-phases
9485 (add-before 'configure 'generate-PackageVersion.java
9486 (lambda _
9487 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
9488 (in (string-append out ".in")))
9489 (copy-file in out)
9490 (newline)
9491 (substitute* out
9492 (("@package@") "com.fasterxml.jackson.dataformat.xml")
9493 (("@projectversion@") ,version)
9494 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
9495 (("@projectartifactid@") "jackson-dataformat-xml")))
9496 #t))
9497 (add-before 'build 'copy-resources
9498 (lambda _
9499 (copy-recursively "src/main/resources" "build/classes")
9500 #t)))))
9501 (inputs
9502 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
9503 ("jackson-core" ,java-fasterxml-jackson-core)
9504 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
9505 ("jackson-databind" ,java-fasterxml-jackson-databind)
9506 ("stax2-api" ,java-stax2-api)
9507 ("woodstox" ,java-woodstox-core)))
9508 (native-inputs
9509 `(("junit" ,java-junit)
9510 ("hamcrest" ,java-hamcrest-core)))
9511 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
9512 (synopsis "Read and write XML")
9513 (description "This package contains Jackson extension component for reading
9514 and writing XML encoded data.
9515
9516 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
9517 approach (that is, no support is added for \"Schema-first\" approach). Support
9518 for JAXB annotations is provided by JAXB annotation module; this module
9519 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
9520 @code{JsonFactory}) as well as small number of higher level overrides needed to
9521 make data-binding work.")
9522 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9523
9524 (define-public java-hdrhistogram
9525 (package
9526 (name "java-hdrhistogram")
9527 (version "2.1.9")
9528 (source (origin
9529 (method url-fetch)
9530 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
9531 "archive/HdrHistogram-" version ".tar.gz"))
9532 (sha256
9533 (base32
9534 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
9535 (build-system ant-build-system)
9536 (arguments
9537 `(#:jar-name "java-hdrhistogram.jar"
9538 #:source-dir "src/main/java"
9539 #:phases
9540 (modify-phases %standard-phases
9541 (add-before 'configure 'set-version
9542 (lambda _
9543 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
9544 (template (string-append version-java ".template")))
9545 (copy-file template version-java)
9546 (substitute* version-java
9547 (("\\$VERSION\\$") ,version)
9548 (("\\$BUILD_TIME\\$") "0"))
9549 #t))))))
9550 (native-inputs
9551 `(("junit" ,java-junit)
9552 ("hamcrest" ,java-hamcrest-core)))
9553 (home-page "https://hdrhistogram.github.io/HdrHistogram")
9554 (synopsis "High dynamic range histogram")
9555 (description "Hdrhistogram creates histograms that support
9556 recording and analyzing sampled data value counts across a configurable integer
9557 value range with configurable value precision within the range. Value precision
9558 is expressed as the number of significant digits in the value recording, and
9559 provides control over value quantization behavior across the value range and
9560 the subsequent value resolution at any given level.")
9561 (license license:public-domain)))
9562
9563 (define-public java-cofoja
9564 (package
9565 (name "java-cofoja")
9566 (version "1.3")
9567 (source (origin
9568 (method git-fetch)
9569 (uri (git-reference
9570 (url "https://github.com/nhatminhle/cofoja")
9571 (commit (string-append "v" version))))
9572 (file-name (string-append "java-cofoja-" version "-checkout"))
9573 (sha256
9574 (base32
9575 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
9576 (build-system ant-build-system)
9577 (arguments
9578 `(#:build-target "dist"
9579 #:test-target "test"
9580 #:jdk ,icedtea-8
9581 #:make-flags
9582 (list "-Ddist.dir=dist")
9583 #:modules ((guix build ant-build-system)
9584 (guix build java-utils)
9585 (guix build utils)
9586 (srfi srfi-1)
9587 (ice-9 match))
9588 #:phases
9589 (modify-phases %standard-phases
9590 ;; The bulid system ignores the class path the ant-build-system sets
9591 ;; up and instead expects to find all dependencies in the "lib"
9592 ;; directory.
9593 (add-after 'unpack 'create-libdir
9594 (lambda* (#:key inputs #:allow-other-keys)
9595 (mkdir-p "lib")
9596 (for-each
9597 (lambda (file)
9598 (let ((target (string-append "lib/" (basename file))))
9599 (unless (file-exists? target)
9600 (symlink file target))))
9601 (append-map (match-lambda
9602 ((label . dir)
9603 (find-files dir "\\.jar$")))
9604 inputs))
9605 #t))
9606 (replace 'install (install-jars "dist")))))
9607 (inputs
9608 `(("java-asm" ,java-asm)))
9609 (native-inputs
9610 `(("java-junit" ,java-junit)))
9611 (home-page "https://github.com/nhatminhle/cofoja")
9612 (synopsis "Contracts for Java")
9613 (description "Contracts for Java, or Cofoja for short, is a contract
9614 programming framework and test tool for Java, which uses annotation processing
9615 and bytecode instrumentation to provide run-time checking. (In particular,
9616 this is not a static analysis tool.)")
9617 (license license:lgpl3+)))
9618
9619 (define-public java-aopalliance
9620 (package
9621 (name "java-aopalliance")
9622 (version "1.0")
9623 (source (origin
9624 (method git-fetch)
9625 ;; Note: this git repository is not official, but contains the
9626 ;; source code that is in the CVS repository. Downloading the
9627 ;; tarball from sourceforge is undeterministic, and the cvs download
9628 ;; fails.
9629 (uri (git-reference
9630 (url "https://github.com/hoverruan/aopalliance")
9631 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
9632 (file-name (string-append name "-" version))
9633 (sha256
9634 (base32
9635 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
9636 (build-system ant-build-system)
9637 (arguments
9638 `(#:jar-name "java-aopalliance.jar"
9639 #:jdk ,icedtea-8
9640 #:tests? #f; no tests
9641 #:source-dir "aopalliance/src/main"
9642 #:modules ((guix build ant-build-system)
9643 (guix build utils)
9644 (guix build maven pom)
9645 (guix build java-utils)
9646 (sxml simple))
9647 #:phases
9648 (modify-phases %standard-phases
9649 (add-before 'install 'create-pom
9650 (lambda _
9651 (with-output-to-file "pom.xml"
9652 (lambda _
9653 (sxml->xml
9654 `((project
9655 (modelVersion "4.0.0")
9656 (name "aopalliance")
9657 (groupId "aopalliance")
9658 (artifactId "aopalliance")
9659 (version "1.0"))))))
9660 #t))
9661 (replace 'install
9662 (install-from-pom "pom.xml")))))
9663 (home-page "http://aopalliance.sourceforge.net")
9664 (synopsis "Aspect-Oriented Programming")
9665 (description "The AOP Alliance project is a joint project between several
9666 software engineering people who are interested in Aspect-Oriented Programming
9667 (AOP) and Java.")
9668 (license license:public-domain)))
9669
9670 (define-public java-javax-inject
9671 (package
9672 (name "java-javax-inject")
9673 (version "1")
9674 (source (origin
9675 (method git-fetch)
9676 (uri (git-reference
9677 (url "https://github.com/javax-inject/javax-inject")
9678 (commit version)))
9679 (file-name (git-file-name name version))
9680 (sha256
9681 (base32
9682 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
9683 (build-system ant-build-system)
9684 (arguments
9685 `(#:jar-name "java-javax-inject.jar"
9686 #:tests? #f; no tests
9687 #:phases
9688 (modify-phases %standard-phases
9689 (replace 'install
9690 (install-from-pom "pom.xml")))))
9691 (home-page "https://github.com/javax-inject/javax-inject")
9692 (synopsis "JSR-330: Dependency Injection for Java")
9693 (description "This package specifies a means for obtaining objects in such
9694 a way as to maximize reusability, testability and maintainability compared to
9695 traditional approaches such as constructors, factories, and service locators
9696 (e.g., JNDI). This process, known as dependency injection, is beneficial to
9697 most nontrivial applications.
9698
9699 Many types depend on other types. For example, a @var{Stopwatch} might depend
9700 on a @var{TimeSource}. The types on which a type depends are known as its
9701 dependencies. The process of finding an instance of a dependency to use at run
9702 time is known as resolving the dependency. If no such instance can be found,
9703 the dependency is said to be unsatisfied, and the application is broken.")
9704 (license license:asl2.0)))
9705
9706 (define-public java-guice
9707 (package
9708 (name "java-guice")
9709 (version "4.1")
9710 (source (origin
9711 (method git-fetch)
9712 (uri (git-reference
9713 (url "https://github.com/google/guice")
9714 (commit version)))
9715 (file-name (git-file-name name version))
9716 (modules '((guix build utils)))
9717 (snippet
9718 `(begin
9719 (for-each delete-file (find-files "." ".*.jar")) #t))
9720 (sha256
9721 (base32
9722 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
9723 (build-system ant-build-system)
9724 (arguments
9725 `(#:jar-name "java-guice.jar"
9726 #:jdk ,icedtea-8
9727 #:tests? #f; FIXME: tests are not in a java sub directory
9728 #:source-dir "core/src"
9729 #:phases
9730 (modify-phases %standard-phases
9731 (add-after 'unpack 'make-files-writable
9732 (lambda _
9733 (for-each make-file-writable (find-files "."))
9734 #t))
9735 (replace 'install
9736 (install-from-pom "core/pom.xml")))))
9737 (propagated-inputs
9738 `(("java-aopalliance" ,java-aopalliance)
9739 ("java-asm" ,java-asm)
9740 ("java-cglib" ,java-cglib)
9741 ("java-guava" ,java-guava)
9742 ("java-javax-inject" ,java-javax-inject)
9743 ("java-guice-parent-pom" ,java-guice-parent-pom)))
9744 (home-page "https://github.com/google/guice")
9745 (synopsis "Lightweight dependency injection framework")
9746 (description "Guice is a lightweight dependency injection framework for
9747 Java 6 and above.")
9748 (license license:asl2.0)))
9749
9750 (define-public java-guice-servlet
9751 (package
9752 (inherit java-guice)
9753 (name "java-guice-servlet")
9754 (arguments
9755 `(#:jar-name "guice-servlet.jar"
9756 #:source-dir "extensions/servlet/src/"
9757 #:jdk ,icedtea-8
9758 #:tests? #f ; FIXME: not in a java subdir
9759 #:phases
9760 (modify-phases %standard-phases
9761 (add-after 'unpack 'make-files-writable
9762 (lambda _
9763 (for-each make-file-writable (find-files "."))
9764 #t)))))
9765 (inputs
9766 `(("guice" ,java-guice)
9767 ("servlet" ,java-classpathx-servletapi)
9768 ,@(package-inputs java-guice)))))
9769
9770 (define java-guice-parent-pom
9771 (package
9772 (inherit java-guice)
9773 (name "java-guice-parent-pom")
9774 (arguments
9775 `(#:tests? #f
9776 #:phases
9777 (modify-phases %standard-phases
9778 (delete 'configure)
9779 (delete 'build)
9780 (add-after 'install 'install-extensions
9781 (install-pom-file "extensions/pom.xml"))
9782 (replace 'install
9783 (install-pom-file "pom.xml")))))
9784 (propagated-inputs
9785 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
9786
9787 (define java-google-parent-pom-5
9788 (package
9789 (name "java-google-parent-pom")
9790 (version "5")
9791 (source (origin
9792 (method git-fetch)
9793 (uri (git-reference
9794 (url "https://github.com/google/google-maven-parents")
9795 (commit (string-append "google-" version))))
9796 (file-name (git-file-name name version))
9797 (sha256
9798 (base32
9799 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
9800 (build-system ant-build-system)
9801 (arguments
9802 `(#:tests? #f
9803 #:phases
9804 (modify-phases %standard-phases
9805 (delete 'configure)
9806 (delete 'build)
9807 (replace 'install
9808 (install-pom-file "pom.xml")))))
9809 (home-page "https://github.com/google/google-maven-parents")
9810 (synopsis "Google parent pom")
9811 (description "This package contains the Maven parent POM for other Google
9812 Java projects.")
9813 (license license:asl2.0)))
9814
9815 (define-public java-assertj
9816 (package
9817 (name "java-assertj")
9818 (version "3.8.0")
9819 (source (origin
9820 (method git-fetch)
9821 (uri (git-reference
9822 (url "https://github.com/joel-costigliola/assertj-core")
9823 (commit (string-append "assertj-core-" version))))
9824 (file-name (git-file-name name version))
9825 (sha256
9826 (base32
9827 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
9828 (build-system ant-build-system)
9829 (arguments
9830 `(#:jar-name "java-assertj.jar"
9831 #:jdk ,icedtea-8
9832 #:source-dir "src/main/java"
9833 #:tests? #f)); depends on tng-junit which depends on assertj
9834 (inputs
9835 `(("cglib" ,java-cglib)
9836 ("junit" ,java-junit)
9837 ("hamcrest" ,java-hamcrest-core)))
9838 (native-inputs
9839 `(("mockito" ,java-mockito-1)))
9840 (home-page "https://joel-costigliola.github.io/assertj/index.html")
9841 (synopsis "Fluent assertions for java")
9842 (description "AssertJ core is a Java library that provides a fluent
9843 interface for writing assertions. Its main goal is to improve test code
9844 readability and make maintenance of tests easier.")
9845 (license license:asl2.0)))
9846
9847 (define-public java-jboss-javassist
9848 (package
9849 (name "java-jboss-javassist")
9850 (version "3.21.0")
9851 (source (origin
9852 (method git-fetch)
9853 (uri (git-reference
9854 (url "https://github.com/jboss-javassist/javassist")
9855 (commit
9856 (string-append "rel_"
9857 (string-map
9858 (lambda (x) (if (eq? x #\.) #\_ x)) version)
9859 "_ga"))))
9860 (file-name (git-file-name name version))
9861 (sha256
9862 (base32
9863 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
9864 (modules '((guix build utils)))
9865 (snippet
9866 '(begin
9867 (delete-file "javassist.jar")))))
9868 (build-system ant-build-system)
9869 (arguments
9870 `(#:jar-name "java-jboss-javassist.jar"
9871 #:jdk ,icedtea-8
9872 #:source-dir "src/main"
9873 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
9874 #:phases
9875 (modify-phases %standard-phases
9876 (add-after 'unpack 'make-files-writable
9877 (lambda _
9878 (for-each make-file-writable (find-files "."))
9879 #t)))))
9880 (native-inputs
9881 `(("junit" ,java-junit)))
9882 (home-page "https://github.com/jboss-javassist/javassist")
9883 (synopsis "Java bytecode engineering toolkit")
9884 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
9885 manipulation simple. It is a class library for editing bytecodes in Java; it
9886 enables Java programs to define a new class at runtime and to modify a class
9887 file when the JVM loads it.")
9888 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
9889
9890 (define-public java-jcommander
9891 (package
9892 (name "java-jcommander")
9893 (version "1.71")
9894 (source (origin
9895 (method git-fetch)
9896 (uri (git-reference
9897 (url "https://github.com/cbeust/jcommander")
9898 (commit version)))
9899 (file-name (git-file-name name version))
9900 (sha256
9901 (base32
9902 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
9903 (build-system ant-build-system)
9904 (arguments
9905 `(#:jar-name "java-jcommander.jar"
9906 #:jdk ,icedtea-8
9907 #:tests? #f; requires testng which depends on jcommander
9908 #:source-dir "src/main/java"))
9909 (home-page "https://jcommander.org")
9910 (synopsis "Command line parameters parser")
9911 (description "JCommander is a very small Java framework that makes it
9912 trivial to parse command line parameters. Parameters are declared with
9913 annotations.")
9914 (license license:asl2.0)))
9915
9916 (define-public java-bsh
9917 (package
9918 (name "java-bsh")
9919 (version "2.0b6")
9920 (source (origin
9921 (method git-fetch)
9922 (uri (git-reference
9923 (url "https://github.com/beanshell/beanshell")
9924 (commit version)))
9925 (file-name (git-file-name name version))
9926 (sha256
9927 (base32
9928 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
9929 (modules '((guix build utils)))
9930 (snippet
9931 '(begin
9932 ;; Delete bundled third-party jar archives.
9933 (for-each delete-file (find-files "." ".*.jar$"))
9934 (for-each (lambda (file) (chmod file #o644))
9935 (find-files "." "."))
9936 #t))))
9937 (build-system ant-build-system)
9938 (arguments
9939 `(#:build-target "jarall"
9940 #:test-target "junit-tests-all"
9941 #:phases
9942 (modify-phases %standard-phases
9943 (add-before 'install 'fix-pom
9944 (lambda _
9945 (substitute* "pom.xml"
9946 (("org.apache-extras.beanshell") "org.beanshell"))
9947 #t))
9948 (replace 'install
9949 (install-from-pom "pom.xml")))))
9950 (inputs
9951 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
9952 ("java-commons-bsf" ,java-commons-bsf)))
9953 (native-inputs
9954 `(("java-junit" ,java-junit)
9955 ("javacc" ,javacc-3)))
9956 (home-page "http://beanshell.org/")
9957 (synopsis "Lightweight Scripting for Java")
9958 (description "BeanShell is a small, free, embeddable Java source
9959 interpreter with object scripting language features, written in Java.
9960 BeanShell dynamically executes standard Java syntax and extends it with common
9961 scripting conveniences such as loose types, commands, and method closures like
9962 those in Perl and JavaScript.")
9963 (license license:asl2.0)))
9964
9965 (define-public java-fest-util
9966 (package
9967 (name "java-fest-util")
9968 (version "1.2.5")
9969 (source (origin
9970 (method git-fetch)
9971 (uri (git-reference
9972 (url "https://github.com/alexruiz/fest-util/")
9973 (commit (string-append "fest-util-" version))))
9974 (file-name (git-file-name name version))
9975 (sha256
9976 (base32
9977 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
9978 (build-system ant-build-system)
9979 (arguments
9980 `(#:jar-name "java-fest-util.jar"
9981 #:source-dir "src/main/java"))
9982 (native-inputs
9983 `(("junit" ,java-junit)
9984 ("hamcrest" ,java-hamcrest-core)))
9985 (home-page "https://github.com/alexruiz/fest-util")
9986 (synopsis "FEST common utilities")
9987 (description "Common utilities used in all FEST module.")
9988 (license license:asl2.0)))
9989
9990 (define-public java-fest-test
9991 (package
9992 (name "java-fest-test")
9993 (version "2.1.0")
9994 (source (origin
9995 (method git-fetch)
9996 (uri (git-reference
9997 (url "https://github.com/alexruiz/fest-test/")
9998 (commit (string-append "fest-test-" version))))
9999 (file-name (git-file-name name version))
10000 (sha256
10001 (base32
10002 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10003 (build-system ant-build-system)
10004 (arguments
10005 `(#:jar-name "java-fest-test.jar"
10006 #:source-dir "src/main/java"
10007 #:tests? #f)); no tests
10008 (inputs
10009 `(("junit" ,java-junit)))
10010 (home-page "https://github.com/alexruiz/fest-test")
10011 (synopsis "Common FEST testing infrastructure")
10012 (description "Fest-test contains the common FEST testing infrastructure.")
10013 (license license:asl2.0)))
10014
10015 (define-public java-fest-assert
10016 (package
10017 (name "java-fest-assert")
10018 (version "2.0M10")
10019 (source (origin
10020 (method git-fetch)
10021 (uri (git-reference
10022 (url "https://github.com/alexruiz/fest-assert-2.x/")
10023 (commit (string-append "fest-assert-core-" version))))
10024 (file-name (git-file-name name version))
10025 (sha256
10026 (base32
10027 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10028 (build-system ant-build-system)
10029 (arguments
10030 `(#:jar-name "java-fest-assert.jar"
10031 #:source-dir "src/main/java"
10032 #:test-exclude
10033 (list
10034 "**/Abstract*.java"
10035 "**/*BaseTest.java"
10036 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10037 "**/MessageFormatter_format_Test.java"
10038 "**/internal/*/*_assert*_Test.java")))
10039 (inputs
10040 `(("java-fest-util" ,java-fest-util)))
10041 (native-inputs
10042 `(("java-junit" ,java-junit)
10043 ("java-fest-test" ,java-fest-test)
10044 ("java-hamcrest-core" ,java-hamcrest-core)
10045 ("java-mockito" ,java-mockito-1)
10046 ("java-cglib" ,java-cglib)
10047 ("java-objenesis" ,java-objenesis)
10048 ("java-asm" ,java-asm)))
10049 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10050 (synopsis "FEST fluent assertions")
10051 (description "FEST-Assert provides a fluent interface for assertions.")
10052 (license license:asl2.0)))
10053
10054 (define-public java-testng
10055 (package
10056 (name "java-testng")
10057 (version "6.14.3")
10058 (source (origin
10059 (method git-fetch)
10060 (uri (git-reference
10061 (url "https://github.com/cbeust/testng")
10062 (commit version)))
10063 (file-name (string-append name "-" version "-checkout"))
10064 (sha256
10065 (base32
10066 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10067 (build-system ant-build-system)
10068 (arguments
10069 `(#:jdk ,icedtea-8; java.util.function
10070 #:jar-name "java-testng.jar"
10071 #:source-dir "src/main/java"
10072 #:phases
10073 (modify-phases %standard-phases
10074 ;; FIXME: I don't know why these tests fail
10075 (add-after 'unpack 'delete-failing-tests
10076 (lambda _
10077 (substitute* "src/test/resources/testng.xml"
10078 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10079 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10080 #t))
10081 ;; We don't have groovy
10082 (add-after 'unpack 'delete-groovy-tests
10083 (lambda _
10084 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10085 (substitute* "src/test/resources/testng.xml"
10086 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10087 #t))
10088 (add-before 'build 'copy-resources
10089 (lambda _
10090 (copy-recursively "src/main/resources" "build/classes")
10091 #t))
10092 (add-before 'check 'copy-test-resources
10093 (lambda _
10094 (copy-recursively "src/test/resources" "build/test-classes")
10095 #t))
10096 (replace 'check
10097 (lambda _
10098 (invoke "ant" "compile-tests")
10099 ;; we don't have groovy
10100 (substitute* "src/test/resources/testng.xml"
10101 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10102 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10103 ":build/classes"
10104 ":build/test-classes")
10105 "-Dtest.resources.dir=src/test/resources"
10106 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10107 (propagated-inputs
10108 `(("junit" ,java-junit)
10109 ("java-jsr305" ,java-jsr305)
10110 ("java-bsh" ,java-bsh)
10111 ("java-jcommander" ,java-jcommander)
10112 ("java-guice" ,java-guice)
10113 ("snakeyaml" ,java-snakeyaml)))
10114 (native-inputs
10115 `(("guava" ,java-guava)
10116 ("java-javax-inject" ,java-javax-inject)
10117 ("java-hamcrest" ,java-hamcrest-all)
10118 ("java-assertj" ,java-assertj)
10119 ("java-mockito" ,java-mockito-1)
10120 ("cglib" ,java-cglib)
10121 ("asm" ,java-asm)
10122 ("aopalliance" ,java-aopalliance)))
10123 (home-page "https://testng.org")
10124 (synopsis "Testing framework")
10125 (description "TestNG is a testing framework inspired from JUnit and NUnit
10126 but introducing some new functionalities that make it more powerful and easier
10127 to use.")
10128 (license license:asl2.0)))
10129
10130 (define-public java-jnacl
10131 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10132 (revision "2"))
10133 (package
10134 (name "java-jnacl")
10135 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10136 (source (origin
10137 (method git-fetch)
10138 (uri (git-reference
10139 (url "https://github.com/neilalexander/jnacl")
10140 (commit commit)))
10141 (file-name (git-file-name name version))
10142 (sha256
10143 (base32
10144 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10145 (build-system ant-build-system)
10146 (arguments
10147 `(#:jar-name "jnacl.jar"
10148 #:source-dir "src/main/java"
10149 #:jdk ,icedtea-8
10150 #:phases
10151 (modify-phases %standard-phases
10152 (add-before 'build 'fix-tests
10153 (lambda _
10154 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10155 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10156 (("assertions.Assertions") "assertions.api.Assertions"))
10157 #t))
10158 (replace 'check
10159 (lambda _
10160 (invoke "ant" "compile-tests")
10161 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10162 ":build/classes"
10163 ":build/test-classes")
10164 "org.testng.TestNG" "-testclass"
10165 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10166 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10167 ":build/classes"
10168 ":build/test-classes")
10169 "org.testng.TestNG" "-testclass"
10170 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10171 (native-inputs
10172 `(("java-testng" ,java-testng)
10173 ("java-fest-util" ,java-fest-util)
10174 ("java-fest-assert" ,java-fest-assert)))
10175 (home-page "https://github.com/neilalexander/jnacl")
10176 (synopsis "Java implementation of NaCl")
10177 (description "Pure Java implementation of the NaCl: Networking and
10178 Cryptography library.")
10179 (license license:bsd-2))))
10180
10181 (define-public java-mvel2
10182 (package
10183 (name "java-mvel2")
10184 (version "2.3.1")
10185 (source (origin
10186 (method url-fetch)
10187 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10188 version ".Final.tar.gz"))
10189 (sha256
10190 (base32
10191 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10192 (build-system ant-build-system)
10193 (arguments
10194 `(#:jar-name "mvel2.jar"
10195 #:source-dir "src/main/java"
10196 #:test-exclude
10197 (list "**/Abstract*.java"
10198 ;; Base class with no tests
10199 "**/MVELThreadTest.java")
10200 #:phases
10201 (modify-phases %standard-phases
10202 (add-after 'install 'install-bin
10203 (lambda* (#:key outputs #:allow-other-keys)
10204 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10205 (mkdir-p bin)
10206 (with-output-to-file (string-append bin "/mvel2")
10207 (lambda _
10208 (display
10209 (string-append
10210 "#!" (which "bash") "\n"
10211 "if [ \"$#\" -ne \"2\" ]; then\n"
10212 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10213 "exit\n"
10214 "fi\n"
10215 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10216 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10217 " org.mvel2.sh.Main $1"))))
10218 (chmod (string-append bin "/mvel2") #o755))
10219 #t)))))
10220 (native-inputs
10221 `(("junit" ,java-junit)
10222 ("hamcrest" ,java-hamcrest-core)))
10223 (home-page "https://github.com/mvel/mvel")
10224 (synopsis "MVFLEX Expression Language")
10225 (description "MVEL has largely been inspired by Java syntax, but has some
10226 fundamental differences aimed at making it more efficient as an expression
10227 language, such as operators that directly support collection, array and string
10228 matching, as well as regular expressions. MVEL is used to evaluate expressions
10229 written using Java syntax.
10230
10231 In addition to the expression language, MVEL serves as a templating language for
10232 configuration and string construction.")
10233 (license license:asl2.0)))
10234
10235 (define-public java-commons-jexl-2
10236 (package
10237 (name "java-commons-jexl")
10238 (version "2.1.1")
10239 (source (origin
10240 (method url-fetch)
10241 (uri (string-append "mirror://apache/commons/jexl/source/"
10242 "commons-jexl-" version "-src.tar.gz"))
10243 (sha256
10244 (base32
10245 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10246 (build-system ant-build-system)
10247 (arguments
10248 `(#:jar-name "commons-jexl-2.jar"
10249 #:jdk ,icedtea-8
10250 #:source-dir "src/main/java"
10251 #:phases
10252 (modify-phases %standard-phases
10253 (add-before 'check 'disable-broken-tests
10254 (lambda* (#:key inputs #:allow-other-keys)
10255 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10256 (substitute* "ArithmeticTest.java"
10257 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10258 (("asserter.assertExpression\\(\"imanull") "//"))
10259 ;; This test fails with "ambiguous method invocation"
10260 (delete-file "CacheTest.java")
10261 ;; This test doesn't have access to the temp directory
10262 (substitute* "ClassCreatorTest.java"
10263 (("java.io.tmpdir") "user.dir"))
10264 ;; This test fails in trying to detect whether it can run.
10265 (substitute* "ClassCreator.java"
10266 (("boolean canRun =.*") "boolean canRun = false;\n"))
10267 ;; ...and these tests depend on it.
10268 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10269 (delete-file "scripting/JexlScriptEngineTest.java"))
10270 #t))
10271 (add-before 'build 'run-javacc
10272 (lambda _
10273 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10274 (invoke "java" "jjtree" "Parser.jjt")
10275 (invoke "java" "javacc" "Parser.jj"))
10276 #t)))))
10277 (inputs
10278 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10279 (native-inputs
10280 `(("java-junit" ,java-junit)
10281 ("java-hamcrest-core" ,java-hamcrest-core)
10282 ("javacc" ,javacc-4)))
10283 (home-page "https://commons.apache.org/proper/commons-jexl/")
10284 (synopsis "Java Expression Language ")
10285 (description "JEXL is a library intended to facilitate the implementation
10286 of dynamic and scripting features in applications and frameworks written in
10287 Java. JEXL implements an Expression Language based on some extensions to the
10288 JSTL Expression Language supporting most of the constructs seen in
10289 shell-script or ECMAScript. Its goal is to expose scripting features usable
10290 by technical operatives or consultants working with enterprise platforms.")
10291 (license license:asl2.0)))
10292
10293 (define-public java-lz4
10294 (package
10295 (name "java-lz4")
10296 (version "1.4.0")
10297 (source (origin
10298 (method git-fetch)
10299 (uri (git-reference
10300 (url "https://github.com/lz4/lz4-java")
10301 (commit version)))
10302 (file-name (git-file-name name version))
10303 (sha256
10304 (base32
10305 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
10306 (build-system ant-build-system)
10307 (arguments
10308 `(#:jar-name "lz4.jar"
10309 #:jdk ,icedtea-8
10310 #:source-dir "src/java:src/java-unsafe"
10311 #:tests? #f; FIXME: requires more dependencies
10312 #:phases
10313 (modify-phases %standard-phases
10314 (add-after 'unpack 'make-files-writable
10315 (lambda _
10316 (for-each make-file-writable (find-files "."))
10317 #t))
10318 (add-before 'configure 'generate-source
10319 (lambda _
10320 (with-directory-excursion "src/build/source_templates"
10321 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
10322 #t)))))
10323 (native-inputs
10324 `(("mvel" ,java-mvel2)))
10325 (home-page "https://jpountz.github.io/lz4-java")
10326 (synopsis "Compression algorithm")
10327 (description "LZ4 - Java is a Java port of the popular lz4 compression
10328 algorithms and xxHash hashing algorithm.")
10329 (license license:asl2.0)))
10330
10331 (define-public java-bouncycastle
10332 (package
10333 (name "java-bouncycastle")
10334 (version "1.60")
10335 (source (origin
10336 (method git-fetch)
10337 (uri (git-reference
10338 (url "http://git.bouncycastle.org/repositories/bc-java")
10339 ;(url "https://github.com/bcgit/bc-java")
10340 (commit (string-append "r1rv" (substring version 2 4)))))
10341 (file-name (git-file-name name version))
10342 (sha256
10343 (base32
10344 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
10345 (modules '((guix build utils)))
10346 (snippet
10347 '(begin
10348 (for-each delete-file
10349 (find-files "." "\\.jar$"))
10350 #t))))
10351 (build-system ant-build-system)
10352 (arguments
10353 `(#:jdk ,icedtea-8
10354 #:tests? #f
10355 #:phases
10356 (modify-phases %standard-phases
10357 (replace 'build
10358 (lambda _
10359 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
10360 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
10361 ;; FIXME: the tests freeze.
10362 ;; (replace 'check
10363 ;; (lambda _
10364 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
10365 (replace 'install
10366 (install-jars "build/artifacts/jdk1.5/jars")))))
10367 (inputs
10368 `(("java-javax-mail" ,java-javax-mail)))
10369 (native-inputs
10370 `(("unzip" ,unzip)
10371 ("junit" ,java-junit)
10372 ("java-native-access" ,java-native-access)
10373 ("java-native-access-platform" ,java-native-access-platform)))
10374 (home-page "https://www.bouncycastle.org")
10375 (synopsis "Cryptographic library")
10376 (description "Bouncy Castle is a cryptographic library for the Java
10377 programming language.")
10378 (license license:expat)))
10379
10380 (define-public java-lmax-disruptor
10381 (package
10382 (name "java-lmax-disruptor")
10383 (version "3.3.7")
10384 (source (origin
10385 (method url-fetch)
10386 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
10387 "archive/" version ".tar.gz"))
10388 (file-name (string-append name "-" version ".tar.gz"))
10389 (sha256
10390 (base32
10391 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
10392 (build-system ant-build-system)
10393 (arguments
10394 `(#:jar-name "java-lmax-disruptor.jar"
10395 #:jdk ,icedtea-8
10396 #:tests? #f)); tests hang
10397 (inputs
10398 `(("junit" ,java-junit)
10399 ("java-hdrhistogram" ,java-hdrhistogram)
10400 ("java-jmock" ,java-jmock)
10401 ("java-jmock-legacy" ,java-jmock-legacy)
10402 ("java-jmock-junit4" ,java-jmock-junit4)
10403 ("java-hamcrest-all" ,java-hamcrest-all)))
10404 (native-inputs
10405 `(("cglib" ,java-cglib)
10406 ("objenesis" ,java-objenesis)
10407 ("asm" ,java-asm)))
10408 (home-page "https://www.lmax.com/disruptor")
10409 (synopsis "High performance inter-thread communication")
10410 (description "LMAX Disruptor is a software pattern and software component
10411 for high performance inter-thread communication that avoids the need for
10412 message queues or resource locking.")
10413 (license license:asl2.0)))
10414
10415 (define-public java-commons-bcel
10416 (package
10417 (name "java-commons-bcel")
10418 (version "6.1")
10419 (source (origin
10420 (method url-fetch)
10421 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
10422 version "-src.tar.gz"))
10423 (sha256
10424 (base32
10425 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
10426 (build-system ant-build-system)
10427 (arguments
10428 `(#:jar-name "bcel.jar"
10429 #:jdk ,icedtea-8
10430 #:source-dir "src/main/java"
10431 #:test-dir "src/test/java"
10432 ;; FIXME: Tests require the unpackaged jna.
10433 #:tests? #f))
10434 (home-page "https://commons.apache.org/proper/commons-bcel/")
10435 (synopsis "Byte code engineering library")
10436 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
10437 intended to give users a convenient way to analyze, create, and
10438 manipulate (binary) Java class files. Classes are represented by objects
10439 which contain all the symbolic information of the given class: methods, fields
10440 and byte code instructions, in particular.
10441
10442 Such objects can be read from an existing file, be transformed by a
10443 program (e.g. a class loader at run-time) and written to a file again. An
10444 even more interesting application is the creation of classes from scratch at
10445 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
10446 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
10447 of Java @code{.class} files.")
10448 (license license:asl2.0)))
10449
10450 (define-public java-xerial-core
10451 (package
10452 (name "java-xerial-core")
10453 (version "2.1")
10454 (source (origin
10455 (method url-fetch)
10456 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
10457 version ".tar.gz"))
10458 (file-name (string-append name "-" version ".tar.gz"))
10459 (sha256
10460 (base32
10461 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
10462 (build-system ant-build-system)
10463 (arguments
10464 `(#:jar-name "xerial-core.jar"
10465 #:source-dir "xerial-core/src/main/java"
10466 #:test-dir "xerial-core/src/test"
10467 #:phases
10468 (modify-phases %standard-phases
10469 (add-before 'build 'copy-resources
10470 (lambda _
10471 (copy-recursively "xerial-core/src/main/resources"
10472 "build/classes")
10473 #t)))))
10474 (native-inputs
10475 `(("junit" ,java-junit)
10476 ("hamcrest" ,java-hamcrest-core)))
10477 (home-page "https://github.com/xerial/xerial-java")
10478 (synopsis "Data management libraries for Java")
10479 (description "Xerial is a set of data management libraries for the Java
10480 programming language. The ultimate goal of the Xerial project is to manage
10481 everything as database, including class objects, text format data, data
10482 streams, etc.")
10483 (license license:asl2.0)))
10484
10485 (define-public java-powermock-reflect
10486 (package
10487 (name "java-powermock-reflect")
10488 (version "1.7.3")
10489 (source (origin
10490 (method url-fetch)
10491 (uri (string-append "https://github.com/powermock/powermock/"
10492 "archive/powermock-" version ".tar.gz"))
10493 (file-name (string-append name "-" version ".tar.gz"))
10494 (sha256
10495 (base32
10496 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
10497 (patches
10498 (search-patches "java-powermock-fix-java-files.patch"))))
10499 (build-system ant-build-system)
10500 (arguments
10501 `(#:jar-name "java-powermock-reflect.jar"
10502 #:jdk ,icedtea-8
10503 #:source-dir "powermock-reflect/src/main/java"
10504 #:test-dir "powermock-reflect/src/test"))
10505 (inputs
10506 `(("java-objenesis" ,java-objenesis)))
10507 (native-inputs
10508 `(("junit" ,java-junit)
10509 ("cglib" ,java-cglib)
10510 ("asm" ,java-asm)
10511 ("hamcrest" ,java-hamcrest-core)
10512 ("assertj" ,java-assertj)))
10513 (home-page "https://github.com/powermock/powermock")
10514 (synopsis "Mock library extension framework")
10515 (description "PowerMock is a framework that extends other mock libraries
10516 such as EasyMock with more powerful capabilities. PowerMock uses a custom
10517 classloader and bytecode manipulation to enable mocking of static methods,
10518 constructors, final classes and methods, private methods, removal of static
10519 initializers and more. By using a custom classloader no changes need to be
10520 done to the IDE or continuous integration servers which simplifies adoption.")
10521 (license license:asl2.0)))
10522
10523 (define-public java-powermock-core
10524 (package
10525 (inherit java-powermock-reflect)
10526 (name "java-powermock-core")
10527 (arguments
10528 `(#:jar-name "java-powermock-core.jar"
10529 #:source-dir "powermock-core/src/main/java"
10530 #:test-dir "powermock-core/src/test"
10531 #:tests? #f; requires powermock-api
10532 #:jdk ,icedtea-8
10533 #:phases
10534 (modify-phases %standard-phases
10535 (add-before 'build 'copy-resources
10536 (lambda _
10537 (copy-recursively "powermock-core/src/main/resources"
10538 "build/classes")
10539 #t)))))
10540 (inputs
10541 `(("reflect" ,java-powermock-reflect)
10542 ("javassist" ,java-jboss-javassist)))
10543 (native-inputs
10544 `(("junit" ,java-junit)
10545 ("assertj" ,java-assertj)
10546 ("mockito" ,java-mockito-1)))))
10547
10548 (define-public java-powermock-api-support
10549 (package
10550 (inherit java-powermock-reflect)
10551 (name "java-powermock-api-support")
10552 (build-system ant-build-system)
10553 (arguments
10554 `(#:jar-name "java-powermock-api-support.jar"
10555 #:jdk ,icedtea-8
10556 #:source-dir "powermock-api/powermock-api-support/src/main/java"
10557 #:tests? #f)); no tests
10558 (inputs
10559 `(("core" ,java-powermock-core)
10560 ("reflect" ,java-powermock-reflect)))))
10561
10562 (define-public java-powermock-modules-junit4-common
10563 (package
10564 (inherit java-powermock-reflect)
10565 (name "java-powermock-modules-junit4-common")
10566 (build-system ant-build-system)
10567 (arguments
10568 `(#:jar-name "java-powermock-modules-junit4-common.jar"
10569 #:jdk ,icedtea-8
10570 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
10571 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
10572 (inputs
10573 `(("core" ,java-powermock-core)
10574 ("easymock" ,java-easymock)
10575 ("reflect" ,java-powermock-reflect)
10576 ("hamcrest" ,java-hamcrest-core)
10577 ("cglib" ,java-cglib)))))
10578
10579 (define-public java-powermock-modules-junit4
10580 (package
10581 (inherit java-powermock-reflect)
10582 (name "java-powermock-modules-junit4")
10583 (build-system ant-build-system)
10584 (arguments
10585 `(#:jar-name "java-powermock-modules-junit4.jar"
10586 #:jdk ,icedtea-8
10587 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
10588 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
10589 #:phases
10590 (modify-phases %standard-phases
10591 (add-before 'build 'fix-junit-detection
10592 (lambda _
10593 ;; Our junit version is 4.12-SNAPSHOT
10594 (substitute* (find-files "powermock-modules/powermock-module-junit4"
10595 "PowerMockJUnit4MethodValidator.java")
10596 (("4.12") "4.12-SNAPSHOT"))
10597 #t)))))
10598 (inputs
10599 `(("core" ,java-powermock-core)
10600 ("reflect" ,java-powermock-reflect)
10601 ("common" ,java-powermock-modules-junit4-common)
10602 ("cglib" ,java-cglib)))
10603 (native-inputs
10604 `(("easymock" ,java-easymock)
10605 ("hamcrest" ,java-hamcrest-core)
10606 ("objenesis" ,java-objenesis)
10607 ("asm" ,java-asm)
10608 ("junit" ,java-junit)))))
10609
10610 (define-public java-powermock-api-easymock
10611 (package
10612 (inherit java-powermock-reflect)
10613 (name "java-powermock-api-easymock")
10614 (build-system ant-build-system)
10615 (arguments
10616 `(#:jar-name "java-powermock-api-easymock.jar"
10617 #:jdk ,icedtea-8
10618 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
10619 #:tests? #f; no tests
10620 #:phases
10621 (modify-phases %standard-phases
10622 (add-before 'build 'fix-file
10623 (lambda _
10624 ;; FIXME: This looks wrong, but it fixes a build error.
10625 (with-directory-excursion "powermock-api/powermock-api-easymock"
10626 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
10627 (("classLoader instanceof MockClassLoader") "false")
10628 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
10629 #t)))))
10630 (inputs
10631 `(("core" ,java-powermock-core)
10632 ("easymock" ,java-easymock)
10633 ("reflect" ,java-powermock-reflect)
10634 ("support" ,java-powermock-api-support)
10635 ("cglib" ,java-cglib)))))
10636
10637 (define-public java-jboss-jms-api-spec
10638 (package
10639 (name "java-jboss-jms-api-spec")
10640 (version "2.0")
10641 (source (origin
10642 (method url-fetch)
10643 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
10644 "archive/jboss-jms-api_" version
10645 "_spec-1.0.1.Final.tar.gz"))
10646 (sha256
10647 (base32
10648 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
10649 (build-system ant-build-system)
10650 (arguments
10651 `(#:jar-name "java-jboss-jms-api_spec.jar"
10652 #:jdk ,icedtea-8
10653 #:source-dir "."
10654 #:tests? #f)); no tests
10655 (home-page "https://github.com/jboss/jboss-jms-api_spec")
10656 (synopsis "Java Message Service API specification")
10657 (description "Java Message Service (JMS) API is used to send messages
10658 messages between two or more clients. It is a messaging standard that allows
10659 application components to create, send, receive, and read messages.")
10660 ; either gpl2 only with GPL Classpath Exception, or cddl.
10661 (license (list license:gpl2 license:cddl1.0))))
10662
10663 (define-public java-mail
10664 (package
10665 (name "java-mail")
10666 (version "1.6.0")
10667 (source (origin
10668 (method url-fetch)
10669 (uri (string-append "https://github.com/javaee/javamail/archive/"
10670 "JAVAMAIL-1_6_0.tar.gz"))
10671 (sha256
10672 (base32
10673 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
10674 (build-system ant-build-system)
10675 (arguments
10676 `(#:jar-name "java-mail.jar"
10677 #:jdk ,icedtea-8
10678 #:source-dir "mail/src/main/java"
10679 #:test-dir "mail/src/test"
10680 #:test-exclude
10681 (list "**/CollectorFormatterTest.java"
10682 "**/CompactFormatterTest.java"
10683 "**/DurationFilterTest.java"
10684 "**/MailHandlerTest.java"
10685 "**/GetLocalAddressTest.java"
10686 ;; FIXME: both end with:
10687 ;; java.lang.ClassNotFoundException:
10688 ;; javax.mail.internet.MimeMultipartParseTest
10689 "**/MimeMultipartParseTest.java"
10690 "**/SearchTermSerializationTest.java")
10691 #:phases
10692 (modify-phases %standard-phases
10693 (add-before 'configure 'move-version.java
10694 (lambda _
10695 (copy-file "mail/src/main/resources/javax/mail/Version.java"
10696 "mail/src/main/java/javax/mail/Version.java")
10697 #t))
10698 (add-before 'build 'copy-resources
10699 (lambda _
10700 (copy-recursively "mail/src/main/resources/META-INF"
10701 "build/classes/META-INF")
10702 #t)))))
10703 (native-inputs
10704 `(("junit" ,java-junit)
10705 ("hamcrest" ,java-hamcrest-core)))
10706 (home-page "https://javaee.github.io/javamail/")
10707 (synopsis "Mail-related functionnalities in Java")
10708 (description "The JavaMail API provides a platform-independent and
10709 protocol-independent framework to build mail and messaging applications.")
10710 ;; General Public License Version 2 only ("GPL") or the Common Development
10711 ;; and Distribution License("CDDL")
10712 (license (list license:cddl1.1
10713 license:gpl2)))); with classpath exception
10714
10715 (define-public java-jeromq
10716 (package
10717 (name "java-jeromq")
10718 (version "0.4.3")
10719 (source (origin
10720 (method git-fetch)
10721 (uri (git-reference
10722 (url "https://github.com/zeromq/jeromq")
10723 (commit (string-append "v" version))))
10724 (file-name (string-append name "-" version "-checkout"))
10725 (sha256
10726 (base32
10727 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
10728 (patches (search-patches "java-jeromq-fix-tests.patch"))))
10729 (build-system ant-build-system)
10730 (arguments
10731 `(#:jar-name "java-jeromq.jar"
10732 #:source-dir "src/main/java"
10733 #:jdk ,icedtea-8
10734 #:test-exclude
10735 (list
10736 "**/Abstract*.java"
10737 ;; Requires network
10738 "**/ZBeaconTest.java"
10739 ;; Failures
10740 "**/DealerSpecTest.java"
10741 "**/CustomDecoderTest.java"
10742 "**/CustomEncoderTest.java"
10743 "**/ConnectRidTest.java"
10744 "**/ReqSpecTest.java"
10745 "**/PushPullSpecTest.java"
10746 "**/PubSubHwmTest.java"
10747 "**/RouterSpecTest.java"
10748 "**/ProxyTest.java")))
10749 (inputs
10750 `(("java-jnacl" ,java-jnacl)))
10751 (native-inputs
10752 `(("java-hamcrest-core" ,java-hamcrest-core)
10753 ("junit" ,java-junit)))
10754 (home-page "http://zeromq.org/bindings:java")
10755 (synopsis "Java binding for 0MQ")
10756 (description "Jeromq provides the java bindings for 0MQ.")
10757 (license license:mpl2.0)))
10758
10759 (define-public java-kafka-clients
10760 (package
10761 (name "java-kafka-clients")
10762 (version "1.0.0")
10763 (source (origin
10764 (method url-fetch)
10765 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
10766 version "-src.tgz"))
10767 (sha256
10768 (base32
10769 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
10770 (build-system ant-build-system)
10771 (arguments
10772 `(#:jar-name "java-kafka-clients.jar"
10773 #:jdk ,icedtea-8
10774 #:source-dir "clients/src/main/java"
10775 #:test-dir "clients/src/test"
10776 #:test-exclude
10777 (list
10778 ;; This file does not contain a class
10779 "**/IntegrationTest.java"
10780 ;; Requires network
10781 "**/ClientUtilsTest.java"
10782 ;; End with errors that seem related to our powermock
10783 "**/KafkaProducerTest.java"
10784 "**/BufferPoolTest.java")))
10785 (inputs
10786 `(("java-slf4j-api" ,java-slf4j-api)
10787 ("java-lz4" ,java-lz4)))
10788 (native-inputs
10789 `(("junit" ,java-junit)
10790 ("hamcrest" ,java-hamcrest-all)
10791 ("objenesis" ,java-objenesis)
10792 ("asm" ,java-asm)
10793 ("cglib" ,java-cglib)
10794 ("javassist" ,java-jboss-javassist)
10795 ("snappy" ,java-snappy)
10796 ("easymock" ,java-easymock)
10797 ("powermock" ,java-powermock-core)
10798 ("powermock-easymock" ,java-powermock-api-easymock)
10799 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
10800 ("powermock-junit4" ,java-powermock-modules-junit4)
10801 ("powermock-support" ,java-powermock-api-support)
10802 ("java-bouncycastle" ,java-bouncycastle)))
10803 (home-page "https://kafka.apache.org")
10804 (synopsis "Distributed streaming platform")
10805 (description "Kafka is a distributed streaming platform, which means:
10806 @itemize
10807 @item it can publish and subscribe to streams of records;
10808 @item it can store streams of records in a fault-tolerant way;
10809 @item it can process streams of records as they occur.
10810 @end itemize")
10811 ;; Either cddl or gpl2 only.
10812 (license (list license:cddl1.1; actually cddl1.1
10813 license:gpl2)))); with classpath exception
10814
10815 (define-public java-jdom
10816 (package
10817 (name "java-jdom")
10818 (version "1.1.3")
10819 (source (origin
10820 (method url-fetch)
10821 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
10822 version ".tar.gz"))
10823 (sha256
10824 (base32
10825 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
10826 (build-system ant-build-system)
10827 (arguments
10828 `(#:build-target "package"
10829 #:tests? #f; tests are run as part of the build process
10830 #:phases
10831 (modify-phases %standard-phases
10832 (replace 'install
10833 (install-jars "build")))))
10834 (home-page "http://jdom.org/")
10835 (synopsis "Access, manipulate, and output XML data")
10836 (description "Java-based solution for accessing, manipulating, and
10837 outputting XML data from Java code.")
10838 (license license:bsd-4)))
10839
10840 (define-public java-geronimo-xbean-reflect
10841 (package
10842 (name "java-geronimo-xbean-reflect")
10843 (version "4.5")
10844 (source (origin
10845 (method svn-fetch)
10846 (uri (svn-reference
10847 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
10848 (revision 1807396)))
10849 (file-name (string-append name "-" version))
10850 (sha256
10851 (base32
10852 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
10853 (build-system ant-build-system)
10854 (arguments
10855 `(#:jar-name "geronimo-xbean-reflect.jar"
10856 #:source-dir "xbean-reflect/src/main/java"
10857 #:test-dir "xbean-reflect/src/test"
10858 #:jdk ,icedtea-8
10859 #:test-exclude
10860 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
10861 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
10862 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
10863 #:phases
10864 (modify-phases %standard-phases
10865 (add-before 'build 'fix-source
10866 (lambda _
10867 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
10868 ;; org.apache.xbean.asm6 is actually repackaged java-asm
10869 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
10870 (("org.apache.xbean.asm5") "org.objectweb.asm"))
10871 #t)))
10872 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
10873 (inputs
10874 `(("asm" ,java-asm)
10875 ("log4j" ,java-log4j-api)
10876 ("log4j-1.2" ,java-log4j-1.2-api)
10877 ("log4j-core" ,java-log4j-core)
10878 ("logging" ,java-commons-logging-minimal)))
10879 (propagated-inputs
10880 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
10881 (native-inputs
10882 `(("junit" ,java-junit)))
10883 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
10884 (synopsis "Dependency injection helper")
10885 (description "Xbean-reflect provides very flexible ways to create objects
10886 and graphs of objects for dependency injection frameworks")
10887 (license license:asl2.0)))
10888
10889 (define java-geronimo-genesis-2.1
10890 (package
10891 (name "java-geronimo-genesis")
10892 (version "2.1")
10893 (source (origin
10894 (method svn-fetch)
10895 (uri (svn-reference
10896 (url (string-append "https://svn.apache.org/repos/asf/"
10897 "geronimo/genesis/tags/genesis-"
10898 version))
10899 (revision 1807396)))
10900 (file-name (string-append name "-" version "-source"))
10901 (sha256
10902 (base32
10903 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
10904 (build-system ant-build-system)
10905 (arguments
10906 `(#:tests? #f
10907 #:phases
10908 (modify-phases %standard-phases
10909 (delete 'configure)
10910 (delete 'build)
10911 (replace 'install
10912 (install-pom-file "pom.xml"))
10913 (add-after 'install 'install-enforcer-rules
10914 (install-pom-file "genesis-enforcer-rules/pom.xml"))
10915 (add-after 'install 'install-flava
10916 (install-pom-file "genesis-default-flava/pom.xml"))
10917 (add-after 'install 'install-packaging
10918 (install-pom-file "genesis-packaging/pom.xml"))
10919 (add-after 'install-flava 'install-flava-java4
10920 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
10921 (add-after 'install-flava 'install-flava-java5
10922 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
10923 (add-after 'install-flava 'install-flava-java6
10924 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
10925 (propagated-inputs
10926 `(("apache-parent-pom" ,apache-parent-pom-13)))
10927 (home-page "https://geronimo.apache.org")
10928 (synopsis "Collection of maven POM files for the Geronimo project")
10929 (description "Apache Geronimo is a server runtime. This package contains
10930 only pom files used by other components in the Geronimo project.")
10931 (license license:asl2.0)))
10932
10933 (define java-geronimo-parent-pom
10934 (package
10935 (inherit java-geronimo-xbean-reflect)
10936 (name "java-geronimo-parent-pom")
10937 (arguments
10938 `(#:tests? #f
10939 #:phases
10940 (modify-phases %standard-phases
10941 (delete 'configure)
10942 (delete 'build)
10943 (replace 'install
10944 (install-pom-file "pom.xml")))))
10945 (propagated-inputs
10946 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
10947
10948 (define-public java-geronimo-xbean-bundleutils
10949 (package
10950 (inherit java-geronimo-xbean-reflect)
10951 (name "java-geronimo-xbean-bundleutils")
10952 (arguments
10953 `(#:jar-name "geronimo-xbean-bundleutils.jar"
10954 #:source-dir "xbean-bundleutils/src/main/java"
10955 #:test-dir "xbean-bundleutils/src/test"
10956 #:phases
10957 (modify-phases %standard-phases
10958 (add-before 'build 'fix-java
10959 (lambda _
10960 ;; We use a more recent version of osgi, so this file requires
10961 ;; more interface method implementations.
10962 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
10963 (("import org.osgi.framework.ServiceRegistration;")
10964 "import org.osgi.framework.ServiceRegistration;
10965 import org.osgi.framework.ServiceFactory;
10966 import java.util.Collection;
10967 import org.osgi.framework.ServiceObjects;")
10968 (("public Bundle getBundle\\(\\)")
10969 "@Override
10970 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
10971 throw new UnsupportedOperationException();
10972 }
10973 @Override
10974 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
10975 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
10976 throw new UnsupportedOperationException();
10977 }
10978 public Bundle getBundle()"))
10979 #t)))))
10980 (inputs
10981 `(("java-slf4j" ,java-slf4j-api)
10982 ("java-asm" ,java-asm)
10983 ("java-osgi-framework" ,java-osgi-framework)
10984 ("java-eclipse-osgi" ,java-eclipse-osgi)
10985 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
10986
10987 (define-public java-geronimo-xbean-asm-util
10988 (package
10989 (inherit java-geronimo-xbean-reflect)
10990 (name "java-geronimo-xbean-asm-util")
10991 (arguments
10992 `(#:jar-name "geronimo-xbean-asm-util.jar"
10993 #:source-dir "xbean-asm-util/src/main/java"
10994 #:tests? #f)); no tests
10995 (inputs
10996 `(("java-asm" ,java-asm)))
10997 (native-inputs '())))
10998
10999 (define-public java-geronimo-xbean-finder
11000 (package
11001 (inherit java-geronimo-xbean-reflect)
11002 (name "java-geronimo-xbean-finder")
11003 (arguments
11004 `(#:jar-name "geronimo-xbean-finder.jar"
11005 #:source-dir "xbean-finder/src/main/java"
11006 #:test-dir "xbean-finder/src/test"))
11007 (inputs
11008 `(("java-slf4j-api" ,java-slf4j-api)
11009 ("java-asm" ,java-asm)
11010 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11011 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11012 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11013 ("java-osgi-framework" ,java-osgi-framework)))
11014 (native-inputs
11015 `(("java-junit" ,java-junit)
11016 ("java-hamcrest-core" ,java-hamcrest-core)))))
11017
11018 (define-public java-gson
11019 (package
11020 (name "java-gson")
11021 (version "2.8.2")
11022 (source (origin
11023 (method url-fetch)
11024 (uri (string-append "https://github.com/google/gson/archive/"
11025 "gson-parent-" version ".tar.gz"))
11026 (sha256
11027 (base32
11028 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11029 (build-system ant-build-system)
11030 (arguments
11031 `(#:jar-name "gson.jar"
11032 #:source-dir "gson/src/main/java"
11033 #:test-dir "gson/src/test"))
11034 (native-inputs
11035 `(("java-junit" ,java-junit)
11036 ("java-hamcrest-core" ,java-hamcrest-core)))
11037 (home-page "https://github.com/google/gson")
11038 (synopsis "Java serialization/deserialization library from/to JSON")
11039 (description "Gson is a Java library that can be used to convert Java
11040 Objects into their JSON representation. It can also be used to convert a JSON
11041 string to an equivalent Java object. Gson can work with arbitrary Java objects
11042 including pre-existing objects that you do not have source-code of.")
11043 (license license:asl2.0)))
11044
11045 (define-public java-hawtjni
11046 (package
11047 (name "java-hawtjni")
11048 (version "1.15")
11049 (source (origin
11050 (method url-fetch)
11051 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11052 "hawtjni-project-" version ".tar.gz"))
11053 (sha256
11054 (base32
11055 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11056 (build-system ant-build-system)
11057 (arguments
11058 `(#:jar-name "hawtjni.jar"
11059 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11060 #:tests? #f; no tests
11061 #:phases
11062 (modify-phases %standard-phases
11063 (add-before 'build 'build-native
11064 (lambda* (#:key inputs #:allow-other-keys)
11065 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11066 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11067 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11068 "-fPIC" "-O2" include)
11069 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11070 "-fPIC" "-O2" include)
11071 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11072 "hawtjni.o" "hawtjni-callback.o")))
11073 #t))
11074 (add-after 'install 'install-native
11075 (lambda* (#:key outputs #:allow-other-keys)
11076 (let* ((out (assoc-ref outputs "out"))
11077 (lib (string-append out "/lib"))
11078 (inc (string-append out "/include")))
11079 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11080 (install-file "libhawtjni.so" lib)
11081 (install-file "hawtjni.h" inc)))
11082 #t))
11083 (add-before 'install 'install-parent
11084 (install-pom-file "pom.xml"))
11085 (replace 'install
11086 (install-from-pom "hawtjni-runtime/pom.xml")))))
11087 (inputs
11088 `(("java-commons-cli" ,java-commons-cli)
11089 ("java-asm" ,java-asm)
11090 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11091 (home-page "https://fusesource.github.io/hawtjni/")
11092 (synopsis "JNI code generator")
11093 (description "HawtJNI is a code generator that produces the JNI code needed
11094 to implement Java native methods. It is based on the jnigen code generator
11095 that is part of the SWT Tools project.")
11096 (license license:asl2.0)))
11097
11098 (define-public java-jansi-native
11099 (package
11100 (name "java-jansi-native")
11101 (version "1.7")
11102 (source (origin
11103 (method url-fetch)
11104 (uri (string-append "https://github.com/fusesource/jansi-native/"
11105 "archive/jansi-native-" version ".tar.gz"))
11106 (sha256
11107 (base32
11108 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11109 (build-system ant-build-system)
11110 (arguments
11111 `(#:jar-name "jansi-native.jar"
11112 #:source-dir "src/main/java"
11113 #:tests? #f; no tests
11114 #:phases
11115 (modify-phases %standard-phases
11116 (add-before 'build 'build-native
11117 (lambda* (#:key inputs #:allow-other-keys)
11118 ;; there are more required files for windows in windows/
11119 (with-directory-excursion "src/main/native-package/src"
11120 (substitute* "jansi_ttyname.c"
11121 (("#include \"jansi_.*") ""))
11122 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11123 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11124 "/include")
11125 (string-append "-I" (assoc-ref inputs "jdk")
11126 "/include/linux")
11127 "-fPIC" "-O2")
11128 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11129 (add-before 'build 'install-native
11130 (lambda _
11131 (let ((dir (string-append "build/classes/META-INF/native/"
11132 ,(match (%current-system)
11133 ((or "i686-linux" "armhf-linux")
11134 "linux32")
11135 ((or "x86_64-linux" "aarch64-linux"
11136 "mips64el-linux")
11137 "linux64")
11138 (_ "unknown-kernel")))))
11139 (install-file "src/main/native-package/src/libjansi.so" dir))
11140 #t))
11141 (add-after 'install 'install-native
11142 (lambda* (#:key outputs #:allow-other-keys)
11143 (install-file "src/main/native-package/src/jansi.h"
11144 (string-append (assoc-ref outputs "out") "/include"))
11145 #t))
11146 (add-before 'install 'fix-pom
11147 (lambda _
11148 ;; pom contains variables to complete name, but we don't support that
11149 (substitute* "pom.xml"
11150 (("\\$\\{platform\\}") "native"))
11151 #t))
11152 (replace 'install
11153 (install-from-pom "pom.xml")))))
11154 (propagated-inputs
11155 `(("java-hawtjni" ,java-hawtjni)))
11156 (home-page "https://fusesource.github.io/jansi/")
11157 (synopsis "Native library for jansi")
11158 (description "This package provides the native library for jansi, a small
11159 Java library that allows you to use ANSI escape sequences to format your
11160 console output.")
11161 (license license:asl2.0)))
11162
11163 (define-public java-jansi
11164 (package
11165 (name "java-jansi")
11166 (version "1.16")
11167 (source (origin
11168 (method url-fetch)
11169 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11170 "jansi-project-" version ".tar.gz"))
11171 (sha256
11172 (base32
11173 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11174 (build-system ant-build-system)
11175 (arguments
11176 `(#:jar-name "jansi.jar"
11177 #:source-dir "jansi/src/main/java"
11178 #:test-dir "jansi/src/test"
11179 #:phases
11180 (modify-phases %standard-phases
11181 (add-after 'check 'clear-term
11182 (lambda _
11183 (invoke "echo" "-e" "\\e[0m")))
11184 (add-before 'install 'install-parent
11185 (install-pom-file "pom.xml"))
11186 (add-before 'install 'fix-pom
11187 (lambda _
11188 ;; pom adds jansi native versions for different platforms, but we
11189 ;; only need one, so use native instead
11190 (substitute* "jansi/pom.xml"
11191 (("windows32") "native")
11192 (("windows64") "native")
11193 (("osx") "native")
11194 (("linux32") "native")
11195 (("linux64") "native")
11196 (("freebsd32") "native")
11197 (("freebsd64") "native"))
11198 #t))
11199 (replace 'install
11200 (install-from-pom "jansi/pom.xml")))))
11201 (propagated-inputs
11202 `(("java-jansi-native" ,java-jansi-native)))
11203 (native-inputs
11204 `(("java-junit" ,java-junit)
11205 ("java-hamcrest-core" ,java-hamcrest-core)))
11206 (home-page "https://fusesource.github.io/jansi/")
11207 (synopsis "Portable ANSI escape sequences")
11208 (description "Jansi is a Java library that allows you to use ANSI escape
11209 sequences to format your console output which works on every platform.")
11210 (license license:asl2.0)))
11211
11212 (define-public java-jboss-el-api-spec
11213 (package
11214 (name "java-jboss-el-api-spec")
11215 (version "3.0")
11216 (source (origin
11217 (method url-fetch)
11218 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11219 "archive/jboss-el-api_" version
11220 "_spec-1.0.7.Final.tar.gz"))
11221 (sha256
11222 (base32
11223 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11224 (build-system ant-build-system)
11225 (arguments
11226 `(#:jar-name "java-jboss-el-api_spec.jar"
11227 #:modules ((guix build ant-build-system)
11228 (guix build utils)
11229 (guix build maven pom)
11230 (guix build java-utils)
11231 (sxml simple))
11232 #:phases
11233 (modify-phases %standard-phases
11234 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11235 ;; instead, which implements the same thing. We override the pom file
11236 ;; to "rename" the package so it can be found by maven.
11237 (add-before 'install 'override-pom
11238 (lambda _
11239 (delete-file "pom.xml")
11240 (with-output-to-file "pom.xml"
11241 (lambda _
11242 (sxml->xml
11243 `(project
11244 (modelVersion "4.0.0")
11245 (name "el-api")
11246 (groupId "javax.el")
11247 (artifactId "javax.el-api")
11248 (version "3.0")))))
11249 #t))
11250 (replace 'install
11251 (install-from-pom "pom.xml")))))
11252 (inputs
11253 `(("java-junit" ,java-junit)))
11254 (home-page "https://github.com/jboss/jboss-el-api_spec")
11255 (synopsis "JSR-341 expression language 3.0 API")
11256 (description "This package contains an implementation of the JSR-341
11257 specification for the expression language 3.0. It implements an expression
11258 language inspired by ECMAScript and XPath. This language is used with
11259 JavaServer Pages (JSP).")
11260 ;; Either GPL2 only or CDDL.
11261 (license (list license:gpl2 license:cddl1.1))))
11262
11263 (define-public java-jboss-interceptors-api-spec
11264 (package
11265 (name "java-jboss-interceptors-api-spec")
11266 (version "1.2")
11267 (source (origin
11268 (method url-fetch)
11269 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11270 "archive/jboss-interceptors-api_" version
11271 "_spec-1.0.0.Final.tar.gz"))
11272 (sha256
11273 (base32
11274 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11275 (build-system ant-build-system)
11276 (arguments
11277 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11278 #:jdk ,icedtea-8
11279 #:source-dir "."
11280 #:tests? #f; no tests
11281 #:modules ((guix build ant-build-system)
11282 (guix build utils)
11283 (guix build maven pom)
11284 (guix build java-utils)
11285 (sxml simple))
11286 #:phases
11287 (modify-phases %standard-phases
11288 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11289 ;; so we use this package instead, which implements the same thing.
11290 ;; We override the pom file to "rename" the package so it can be found
11291 ;; by maven.
11292 (add-before 'install 'override-pom
11293 (lambda _
11294 (delete-file "pom.xml")
11295 (with-output-to-file "pom.xml"
11296 (lambda _
11297 (sxml->xml
11298 `(project
11299 (modelVersion "4.0.0")
11300 (name "interceptor-api")
11301 (groupId "javax.interceptor")
11302 (artifactId "javax.interceptor-api")
11303 (version "3.0")))))
11304 #t))
11305 (replace 'install
11306 (install-from-pom "pom.xml")))))
11307 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
11308 (synopsis "Interceptors 1.2 API classes from JSR 318")
11309 (description "Java-jboss-interceptors-api-spec implements the Interceptors
11310 API. Interceptors are used to interpose on business method invocations and
11311 specific events.")
11312 ;; Either GPL2 only or CDDL.
11313 (license (list license:gpl2 license:cddl1.1))))
11314
11315 (define-public java-cdi-api
11316 (package
11317 (name "java-cdi-api")
11318 (version "2.0")
11319 (source (origin
11320 (method url-fetch)
11321 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
11322 version ".tar.gz"))
11323 (file-name (string-append name "-" version ".tar.gz"))
11324 (sha256
11325 (base32
11326 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
11327 (build-system ant-build-system)
11328 (arguments
11329 `(#:source-dir "api/src/main/java"
11330 #:jar-name "java-cdi-api.jar"
11331 #:test-dir "api/src/test"
11332 #:jdk ,icedtea-8
11333 #:tests? #f; Tests fail because we don't have a CDI provider yet
11334 #:phases
11335 (modify-phases %standard-phases
11336 (replace 'install
11337 (install-from-pom "api/pom.xml")))))
11338 (propagated-inputs
11339 `(("java-javax-inject" ,java-javax-inject)
11340 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
11341 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
11342 ("java-weld-parent-pom" ,java-weld-parent-pom)))
11343 (native-inputs
11344 `(("java-testng" ,java-testng)
11345 ("java-hamcrest-core" ,java-hamcrest-core)))
11346 (home-page "http://cdi-spec.org/")
11347 (synopsis "Contexts and Dependency Injection APIs")
11348 (description "Java-cdi-api contains the required APIs for Contexts and
11349 Dependency Injection (CDI).")
11350 (license license:asl2.0)))
11351
11352 (define-public java-joda-convert
11353 (package
11354 (name "java-joda-convert")
11355 (version "1.9.2")
11356 (source (origin
11357 (method url-fetch)
11358 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
11359 version ".tar.gz"))
11360 (file-name (string-append name "-" version ".tar.gz"))
11361 (sha256
11362 (base32
11363 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
11364 (build-system ant-build-system)
11365 (arguments
11366 `(#:jar-name (string-append ,name "-" ,version ".jar")
11367 #:source-dir "src/main/java"
11368 #:test-include (list "**/Test*.java")
11369 ;; Contains only interfaces and base classes (no test)
11370 #:test-exclude (list "**/test*/**.java")))
11371 (inputs
11372 `(("java-guava" ,java-guava)))
11373 (native-inputs
11374 `(("java-junit" ,java-junit)
11375 ("java-hamcrest-core" ,java-hamcrest-core)))
11376 (home-page "https://www.joda.org/joda-convert/")
11377 (synopsis "Conversion between Objects and Strings")
11378 (description "Joda-Convert provides a small set of classes to aid
11379 conversion between Objects and Strings. It is not intended to tackle the
11380 wider problem of Object to Object transformation.")
11381 (license license:asl2.0)))
11382
11383 (define-public java-joda-time
11384 (package
11385 (name "java-joda-time")
11386 (version "2.9.9")
11387 (source (origin
11388 (method url-fetch)
11389 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
11390 version ".tar.gz"))
11391 (file-name (string-append name "-" version ".tar.gz"))
11392 (sha256
11393 (base32
11394 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
11395 (build-system ant-build-system)
11396 (arguments
11397 `(#:jar-name "java-joda-time.jar"
11398 #:source-dir "src/main/java"
11399 #:test-include (list "**/Test*.java")
11400 ;; There is no runnable test in these files
11401 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
11402 #:phases
11403 (modify-phases %standard-phases
11404 (add-after 'build 'build-resources
11405 (lambda _
11406 (mkdir-p "build/classes/org/joda/time/tz/data")
11407 (mkdir-p "build/classes/org/joda/time/format")
11408 ;; This will produce the following exception:
11409 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
11410 ;; which is normal, because it doesn't exist yet. It still generates
11411 ;; the same file as in the binary one can find on maven.
11412 (invoke "java" "-cp"
11413 (string-append "build/classes:" (getenv "CLASSPATH"))
11414 "org.joda.time.tz.ZoneInfoCompiler"
11415 "-src" "src/main/java/org/joda/time/tz/src"
11416 "-dst" "build/classes/org/joda/time/tz/data"
11417 "africa" "antarctica" "asia" "australasia"
11418 "europe" "northamerica" "southamerica"
11419 "pacificnew" "etcetera" "backward" "systemv")
11420 (for-each (lambda (f)
11421 (copy-file f (string-append
11422 "build/classes/org/joda/time/format/"
11423 (basename f))))
11424 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
11425 #t))
11426 (add-before 'install 'regenerate-jar
11427 (lambda _
11428 ;; We need to regenerate the jar file to add generated data.
11429 (delete-file "build/jar/java-joda-time.jar")
11430 (invoke "ant" "jar")))
11431 (add-before 'check 'copy-test-resources
11432 (lambda _
11433 (mkdir-p "build/test-classes/org/joda/time/tz/data")
11434 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
11435 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
11436 (copy-recursively "src/test/resources" "build/test-classes")
11437 #t)))))
11438 (inputs
11439 `(("java-joda-convert" ,java-joda-convert)))
11440 (native-inputs
11441 `(("java-junit" ,java-junit)
11442 ("java-hamcrest-core" ,java-hamcrest-core)
11443 ("tzdata" ,tzdata)))
11444 (home-page "https://www.joda.org/joda-time/")
11445 (synopsis "Replacement for the Java date and time classes")
11446 (description "Joda-Time is a replacement for the Java date and time
11447 classes prior to Java SE 8.")
11448 (license license:asl2.0)))
11449
11450 (define-public java-xerces
11451 (package
11452 (name "java-xerces")
11453 (version "2.12.1")
11454 (source
11455 (origin
11456 (method url-fetch)
11457 (uri (string-append "mirror://apache/xerces/j/source/"
11458 "Xerces-J-src." version ".tar.gz"))
11459 (sha256
11460 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
11461 (patches (search-patches
11462 "java-xerces-xjavac_taskdef.patch"
11463 "java-xerces-build_dont_unzip.patch"
11464 "java-xerces-bootclasspath.patch"))))
11465 (build-system ant-build-system)
11466 (arguments
11467 `(#:tests? #f;; Test files are not present
11468 #:test-target "test"
11469 #:jdk ,icedtea-8
11470 #:phases
11471 (modify-phases %standard-phases
11472 (add-after 'unpack 'create-build.properties
11473 (lambda* (#:key inputs #:allow-other-keys)
11474 (let ((jaxp (assoc-ref inputs "java-jaxp"))
11475 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
11476 (with-output-to-file "build.properties"
11477 (lambda _
11478 (format #t
11479 "jar.jaxp = ~a/share/java/jaxp.jar~@
11480 jar.apis-ext = ~a/share/java/jaxp.jar~@
11481 jar.resolver = ~a/share/java/xml-resolver.jar~%"
11482 jaxp jaxp resolver)))
11483 ;; Make xerces use our version of jaxp in tests
11484 (substitute* "build.xml"
11485 (("xml-apis.jar")
11486 (string-append jaxp "/share/java/jaxp.jar"))
11487 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
11488 "${jar.apis}")))
11489 #t))
11490 (replace 'install (install-jars "build")))))
11491 (inputs
11492 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
11493 ("java-jaxp" ,java-jaxp)))
11494 (home-page "https://xerces.apache.org/xerces2-j/")
11495 (synopsis "Validating XML parser for Java with DOM level 3 support")
11496 (description "The Xerces2 Java parser is the reference implementation of
11497 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
11498 processor.
11499
11500 Xerces2-J supports the following standards and APIs:
11501
11502 @itemize
11503 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
11504 @item Namespaces in XML Recommendation
11505 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
11506 Range Recommendations
11507 @item Simple API for XML (SAX) 2.0.1 Core and Extension
11508 @item Java APIs for XML Processing (JAXP) 1.2.01
11509 @item XML Schema 1.0 Structures and Datatypes Recommendations
11510 @item Experimental implementation of the Document Object Model (DOM) Level 3
11511 Core and Load/Save Working Drafts
11512 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
11513 Candidate Recommendation
11514 @end itemize
11515
11516 Xerces is now able to parse documents written according to the XML 1.1
11517 Candidate Recommendation, except that it does not yet provide an option to
11518 enable normalization checking as described in section 2.13 of this
11519 specification. It also handles namespaces according to the XML Namespaces 1.1
11520 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
11521 the DOM level 3 load/save API's are in use.")
11522 (license license:asl2.0)))
11523
11524 (define-public java-jakarta-regexp
11525 (package
11526 (name "java-jakarta-regexp")
11527 (version "1.5")
11528 (source
11529 (origin
11530 (method url-fetch)
11531 (uri (string-append
11532 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
11533 version ".tar.gz"))
11534 (sha256
11535 (base32
11536 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
11537 (build-system ant-build-system)
11538 (arguments
11539 `(#:test-target "test"
11540 #:phases
11541 (modify-phases %standard-phases
11542 (replace 'install
11543 (lambda* (#:key outputs #:allow-other-keys)
11544 (let* ((out (assoc-ref outputs "out"))
11545 (out-share (string-append out "/share/java")))
11546 (mkdir-p out-share)
11547 (for-each (lambda (name)
11548 (install-file name out-share))
11549 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
11550 #t))))))
11551 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
11552 (synopsis "Regular expression parser generator for Java.")
11553 (description "@code{jakarta-regexp} is an old regular expression parser
11554 generator for Java.")
11555 (license license:asl2.0)))
11556
11557 (define-public java-jline
11558 (package
11559 (name "java-jline")
11560 (version "1.0")
11561 (source (origin
11562 (method url-fetch)
11563 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
11564 version ".tar.gz"))
11565 (sha256
11566 (base32
11567 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
11568 (build-system ant-build-system)
11569 (arguments
11570 `(#:jar-name "jline.jar"
11571 #:source-dir "src/main/java"
11572 #:test-dir "src/test"
11573 #:phases
11574 (modify-phases %standard-phases
11575 (add-before 'build 'copy-resources
11576 (lambda _
11577 (copy-recursively "src/main/resources" "build/classes")
11578 #t)))))
11579 (native-inputs
11580 `(("java-junit" ,java-junit)))
11581 (home-page "https://jline.github.io")
11582 (synopsis "Console input handling library")
11583 (description "JLine is a Java library for handling console input. It is
11584 similar in functionality to BSD editline and GNU readline but with additional
11585 features that bring it on par with the Z shell line editor.")
11586 (license license:bsd-3)))
11587
11588 (define-public java-jline-2
11589 (package
11590 (inherit java-jline)
11591 (version "2.14.5")
11592 (source (origin
11593 (method url-fetch)
11594 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
11595 version ".tar.gz"))
11596 (sha256
11597 (base32
11598 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
11599 (arguments
11600 `(#:jdk ,icedtea-8
11601 ,@(package-arguments java-jline)))
11602 (inputs
11603 `(("java-jansi" ,java-jansi)
11604 ("java-jansi-native" ,java-jansi-native)))
11605 (native-inputs
11606 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
11607 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
11608 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
11609 ("java-powermock-api-support" ,java-powermock-api-support)
11610 ("java-powermock-core" ,java-powermock-core)
11611 ("java-powermock-reflect" ,java-powermock-reflect)
11612 ("java-easymock" ,java-easymock)
11613 ("java-jboss-javassist" ,java-jboss-javassist)
11614 ("java-objenesis" ,java-objenesis)
11615 ("java-asm" ,java-asm)
11616 ("java-hamcrest-core" ,java-hamcrest-core)
11617 ("java-cglib" ,java-cglib)
11618 ("java-junit" ,java-junit)
11619 ("java-hawtjni" ,java-hawtjni)))))
11620
11621 (define-public java-xmlunit
11622 (package
11623 (name "java-xmlunit")
11624 (version "2.5.1")
11625 (source (origin
11626 (method url-fetch)
11627 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
11628 version ".tar.gz"))
11629 (file-name (string-append name "-" version ".tar.gz"))
11630 (sha256
11631 (base32
11632 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
11633 (build-system ant-build-system)
11634 (arguments
11635 `(#:jar-name "java-xmlunit.jar"
11636 #:source-dir "xmlunit-core/src/main/java"
11637 #:test-dir "xmlunit-core/src/test"
11638 #:phases
11639 (modify-phases %standard-phases
11640 (add-before 'check 'copy-test-resources
11641 (lambda* (#:key inputs #:allow-other-keys)
11642 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
11643 #t)))))
11644 (native-inputs
11645 `(("java-junit" ,java-junit)
11646 ("java-mockito-1" ,java-mockito-1)
11647 ("java-hamcrest-all" ,java-hamcrest-all)
11648 ("java-objenesis" ,java-objenesis)
11649 ("java-asm" ,java-asm)
11650 ("java-cglib" ,java-cglib)
11651 ("resources"
11652 ,(origin
11653 (method git-fetch)
11654 (uri (git-reference
11655 (url "https://github.com/xmlunit/test-resources")
11656 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
11657 (file-name "java-xmlunit-test-resources")
11658 (sha256
11659 (base32
11660 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
11661 (home-page "https://www.xmlunit.org/")
11662 (synopsis "XML output testing")
11663 (description "XMLUnit provides you with the tools to verify the XML you
11664 emit is the one you want to create. It provides helpers to validate against
11665 an XML Schema, assert the values of XPath queries or compare XML documents
11666 against expected outcomes.")
11667 (license license:asl2.0)))
11668
11669 (define-public java-xmlunit-legacy
11670 (package
11671 (inherit java-xmlunit)
11672 (name "java-xmlunit-legacy")
11673 (arguments
11674 `(#:jar-name "java-xmlunit-legacy.jar"
11675 #:source-dir "xmlunit-legacy/src/main/java"
11676 #:test-dir "xmlunit-legacy/src/test"))
11677 (inputs
11678 `(("java-xmlunit" ,java-xmlunit)
11679 ("java-junit" ,java-junit)))
11680 (native-inputs
11681 `(("java-mockito-1" ,java-mockito-1)))))
11682
11683 (define-public java-xmlunit-matchers
11684 (package
11685 (inherit java-xmlunit)
11686 (name "java-xmlunit-matchers")
11687 (arguments
11688 `(#:jar-name "java-xmlunit-matchers.jar"
11689 #:source-dir "xmlunit-matchers/src/main/java"
11690 #:test-dir "xmlunit-matchers/src/test"
11691 #:test-exclude
11692 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
11693 (list "**/ValidationMatcherTest.java")
11694 #:phases
11695 (modify-phases %standard-phases
11696 (add-before 'build 'copy-test-class
11697 (lambda _
11698 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
11699 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
11700 #t))
11701 (add-before 'build 'fix-test-resources-path
11702 (lambda _
11703 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
11704 (("../test-resources") "test-resources"))
11705 #t))
11706 (add-before 'check 'copy-test-resources
11707 (lambda* (#:key inputs #:allow-other-keys)
11708 (copy-recursively (assoc-ref inputs "resources") "test-resources")
11709 #t)))))
11710 (inputs
11711 `(("java-xmlunit" ,java-xmlunit)
11712 ("java-junit" ,java-junit)))))
11713
11714 (define-public java-openchart2
11715 (package
11716 (name "java-openchart2")
11717 (version "1.4.3")
11718 (source (origin
11719 (method url-fetch)
11720 (uri (string-append "http://download.approximatrix.com/openchart2/"
11721 "openchart2-" version ".source.zip"))
11722 (sha256
11723 (base32
11724 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
11725 (build-system ant-build-system)
11726 (arguments
11727 `(#:test-target "test"
11728 #:phases
11729 (modify-phases %standard-phases
11730 (add-after 'unpack 'fix-junit-errors
11731 (lambda _
11732 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
11733 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
11734 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
11735 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
11736 "model/DefaultChartDataModelConstraintsTest.java"
11737 "model/MultiScatterDataModelConstraintsTest.java"
11738 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
11739 (("(assertEquals[^;]+);" before _)
11740 (string-append (string-drop-right before 2) ", 1E-6);"))))
11741 #t))
11742 (replace 'install (install-jars ".")))))
11743 (native-inputs
11744 `(("unzip" ,unzip)
11745 ("java-junit" ,java-junit)
11746 ("java-hamcrest-core" ,java-hamcrest-core)))
11747 (home-page "https://approximatrix.com/products/openchart2/")
11748 (synopsis "Simple plotting for Java")
11749 (description "Openchart2 provides a simple, yet powerful, interface for
11750 Java programmers to create two-dimensional charts and plots. The library
11751 features an assortment of graph styles, including advanced scatter plots, bar
11752 graphs, and pie charts.")
11753 (license license:lgpl2.1+)))
11754
11755 (define-public java-commons-httpclient
11756 (package
11757 (name "java-commons-httpclient")
11758 (version "3.1")
11759 (source (origin
11760 (method url-fetch)
11761 (uri (string-append "mirror://apache/httpcomponents/"
11762 "commons-httpclient/source/commons-httpclient-"
11763 version "-src.tar.gz"))
11764 (sha256
11765 (base32
11766 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
11767 (build-system ant-build-system)
11768 (arguments
11769 `(#:build-target "compile"
11770 #:test-target "test"
11771 #:tests? #f; requires junit-textui (junit 3)
11772 #:phases
11773 (modify-phases %standard-phases
11774 (add-before 'build 'fix-accent
11775 (lambda _
11776 (for-each (lambda (file)
11777 (with-fluids ((%default-port-encoding "ISO-8859-1"))
11778 (substitute* file
11779 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
11780 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
11781 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
11782 "src/test/org/apache/commons/httpclient/TestHttps.java"
11783 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
11784 #t))
11785 (replace 'install
11786 (lambda* (#:key outputs #:allow-other-keys)
11787 (invoke "ant" "dist"
11788 (string-append "-Ddist.home=" (assoc-ref outputs "out")
11789 "/share/java"))
11790 #t)))))
11791 (propagated-inputs
11792 `(("java-commons-logging" ,java-commons-logging-minimal)
11793 ("java-commons-codec" ,java-commons-codec)))
11794 (home-page "https://hc.apache.org")
11795 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
11796 (description "This package contains an HTTP/1.1 compliant HTTP agent
11797 implementation. It also provides reusable components for client-side
11798 authentication, HTTP state management, and HTTP connection management.")
11799 (license license:asl2.0)))
11800
11801 (define-public java-commons-vfs
11802 (package
11803 (name "java-commons-vfs")
11804 (version "2.2")
11805 (source (origin
11806 (method url-fetch)
11807 (uri (string-append "mirror://apache/commons/vfs/source/"
11808 "commons-vfs2-distribution-" version "-src.tar.gz"))
11809 (file-name (string-append name "-" version ".tar.gz"))
11810 (sha256
11811 (base32
11812 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
11813 (modules '((guix build utils)))
11814 (snippet
11815 '(begin
11816 (for-each delete-file
11817 (find-files "." "\\.jar$"))
11818 #t))))
11819 (build-system ant-build-system)
11820 (arguments
11821 `(#:jar-name "commons-vfs.jar"
11822 #:source-dir "commons-vfs2/src/main/java"
11823 #:test-dir "commons-vfs2/src/test"
11824 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
11825 #:tests? #f
11826 #:phases
11827 (modify-phases %standard-phases
11828 (add-before 'build 'remove-hadoop-and-webdav
11829 ; Remove these files as they are not required and depend on difficult
11830 ; packages.
11831 (lambda _
11832 (for-each delete-file-recursively
11833 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
11834 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
11835 #t)))))
11836 (inputs
11837 `(("java-commons-collections4" ,java-commons-collections4)
11838 ("java-commons-compress" ,java-commons-compress)
11839 ("java-commons-httpclient" ,java-commons-httpclient)
11840 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
11841 ("java-commons-net" ,java-commons-net)
11842 ("java-jsch" ,java-jsch)))
11843 (home-page "https://commons.apache.org/proper/commons-vfs/")
11844 (synopsis "Java file system library")
11845 (description "Commons VFS provides a single API for accessing various
11846 different file systems. It presents a uniform view of the files from various
11847 different sources, such as the files on local disk, on an HTTP server, or
11848 inside a Zip archive.")
11849 (license license:asl2.0)))
11850
11851 (define-public java-jakarta-oro
11852 (package
11853 (name "java-jakarta-oro")
11854 (version "2.0.8")
11855 (source (origin
11856 (method url-fetch)
11857 (uri (string-append "mirror://apache/jakarta/oro/"
11858 "jakarta-oro-" version ".tar.gz"))
11859 (sha256
11860 (base32
11861 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
11862 (modules '((guix build utils)))
11863 (snippet
11864 `(begin
11865 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
11866 #t))))
11867 (build-system ant-build-system)
11868 (arguments
11869 `(#:build-target "package"
11870 #:tests? #f; tests are run as part of the build process
11871 #:phases
11872 (modify-phases %standard-phases
11873 (replace 'install
11874 (install-jars ,(string-append "jakarta-oro-" version))))))
11875 (home-page "https://jakarta.apache.org/oro/")
11876 (synopsis "Text-processing for Java")
11877 (description "The Jakarta-ORO Java classes are a set of text-processing
11878 Java classes that provide Perl5 compatible regular expressions, AWK-like
11879 regular expressions, glob expressions, and utility classes for performing
11880 substitutions, splits, filtering filenames, etc. This library is the successor
11881 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
11882 from ORO, Inc.")
11883 (license license:asl1.1)))
11884
11885 (define-public java-native-access
11886 (package
11887 (name "java-native-access")
11888 (version "4.5.1")
11889 (source (origin
11890 (method url-fetch)
11891 (uri (string-append "https://github.com/java-native-access/jna/"
11892 "archive/" version ".tar.gz"))
11893 (file-name (string-append name "-" version ".tar.gz"))
11894 (sha256
11895 (base32
11896 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
11897 (modules '((guix build utils)))
11898 (snippet
11899 `(begin
11900 (for-each delete-file (find-files "." ".*.jar"))
11901 (delete-file-recursively "native/libffi")
11902 (delete-file-recursively "dist")
11903 #t))))
11904 (build-system ant-build-system)
11905 (arguments
11906 `(#:tests? #f; FIXME: tests require reflections.jar
11907 #:test-target "test"
11908 #:make-flags (list "-Ddynlink.native=true")
11909 #:phases
11910 (modify-phases %standard-phases
11911 (add-before 'build 'fix-build.xml
11912 (lambda* (#:key inputs #:allow-other-keys)
11913 (substitute* "build.xml"
11914 ;; Since we removed the bundled ant.jar, give the correct path
11915 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
11916 ;; We removed generated native libraries. We can only rebuild one
11917 ;; so don't fail if we can't find a native library for another architecture.
11918 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
11919 ;; Copy test dependencies
11920 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
11921 "lib/junit.jar")
11922 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
11923 "jar$"))
11924 "lib/hamcrest-core.jar")
11925 ;; FIXME: once reflections.jar is built, copy it to lib/test.
11926 #t))
11927 (add-before 'build 'build-native
11928 (lambda _
11929 (invoke "ant" "-Ddynlink.native=true" "native")
11930 #t))
11931 (replace 'install
11932 (install-jars "build")))))
11933 (inputs
11934 `(("libffi" ,libffi)
11935 ("libx11" ,libx11)
11936 ("libxt" ,libxt)))
11937 (native-inputs
11938 `(("java-junit" ,java-junit)
11939 ("java-hamcrest-core" ,java-hamcrest-core)))
11940 (home-page "https://github.com/java-native-access/jna")
11941 (synopsis "Access to native shared libraries from Java")
11942 (description "JNA provides Java programs easy access to native shared
11943 libraries without writing anything but Java code - no JNI or native code is
11944 required. JNA allows you to call directly into native functions using natural
11945 Java method invocation.")
11946 ;; Java Native Access project (JNA) is dual-licensed under 2
11947 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
11948 (license (list
11949 license:asl2.0
11950 license:lgpl2.1+))))
11951
11952 (define-public java-native-access-platform
11953 (package
11954 (inherit java-native-access)
11955 (name "java-native-access-platform")
11956 (arguments
11957 `(#:test-target "test"
11958 #:tests? #f; require jna-test.jar
11959 #:phases
11960 (modify-phases %standard-phases
11961 (add-before 'build 'chdir
11962 (lambda _
11963 (chdir "contrib/platform")
11964 #t))
11965 (add-after 'chdir 'fix-ant
11966 (lambda* (#:key inputs #:allow-other-keys)
11967 (substitute* "nbproject/project.properties"
11968 (("../../build/jna.jar")
11969 (string-append (assoc-ref inputs "java-native-access")
11970 "/share/java/jna.jar"))
11971 (("../../lib/hamcrest-core-.*.jar")
11972 (car (find-files (assoc-ref inputs "java-hamcrest-core")
11973 "jar$")))
11974 (("../../lib/junit.jar")
11975 (car (find-files (assoc-ref inputs "java-junit")
11976 "jar$"))))
11977 #t))
11978 (replace 'install
11979 (install-jars "dist")))))
11980 (inputs
11981 `(("java-native-access" ,java-native-access)))
11982 (synopsis "Cross-platform mappings for jna")
11983 (description "java-native-access-platfrom has cross-platform mappings
11984 and mappings for a number of commonly used platform functions, including a
11985 large number of Win32 mappings as well as a set of utility classes that
11986 simplify native access.")))
11987
11988 (define-public java-jsch-agentproxy-core
11989 (package
11990 (name "java-jsch-agentproxy-core")
11991 (version "0.0.8")
11992 (source (origin
11993 (method url-fetch)
11994 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
11995 version ".tar.gz"))
11996 (file-name (string-append name "-" version ".tar.gz"))
11997 (sha256
11998 (base32
11999 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12000 (build-system ant-build-system)
12001 (arguments
12002 `(#:jar-name "jsch-agentproxy-core.jar"
12003 #:source-dir "jsch-agent-proxy-core/src/main/java"
12004 #:tests? #f)); no tests
12005 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12006 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12007 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12008 and Pageant included Putty. It will be easily integrated into JSch, and users
12009 will be allowed to use these programs for authentication.")
12010 (license license:bsd-3)))
12011
12012 (define-public java-jsch-agentproxy-sshagent
12013 (package
12014 (inherit java-jsch-agentproxy-core)
12015 (name "java-jsch-agentproxy-sshagent")
12016 (arguments
12017 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12018 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12019 #:tests? #f)); no tests
12020 (inputs
12021 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12022 (synopsis "Proxy to ssh-agent")
12023 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12024 and Pageant included in Putty. This component contains the code for a proxy to
12025 ssh-agent.")))
12026
12027 (define-public java-jsch-agentproxy-usocket-jna
12028 (package
12029 (inherit java-jsch-agentproxy-core)
12030 (name "java-jsch-agentproxy-usocket-jna")
12031 (arguments
12032 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12033 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12034 #:tests? #f)); no tests
12035 (inputs
12036 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12037 ("java-native-access" ,java-native-access)))
12038 (synopsis "USocketFactory implementation using JNA")
12039 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12040 and Pageant included in Putty. This component contains an implementation of
12041 USocketFactory using @dfn{JNA} (Java Native Access).")))
12042
12043 (define-public java-jsch-agentproxy-pageant
12044 (package
12045 (inherit java-jsch-agentproxy-core)
12046 (name "java-jsch-agentproxy-pageant")
12047 (arguments
12048 `(#:jar-name "jsch-agentproxy-pageant.jar"
12049 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12050 #:tests? #f)); no tests
12051 (inputs
12052 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12053 ("java-native-access" ,java-native-access)
12054 ("java-native-access-platform" ,java-native-access-platform)))
12055 (synopsis "Proxy to pageant")
12056 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12057 and Pageant included in Putty. This component contains the code for a proxy to
12058 pageant.")))
12059
12060 (define-public java-jsch-agentproxy-usocket-nc
12061 (package
12062 (inherit java-jsch-agentproxy-core)
12063 (name "java-jsch-agentproxy-usocket-nc")
12064 (arguments
12065 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12066 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12067 #:tests? #f)); no tests
12068 (inputs
12069 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12070 (synopsis "USocketFactory implementation using netcat")
12071 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12072 and Pageant included in Putty. This component contains an implementation of
12073 USocketFactory using netcat.")))
12074
12075 (define-public java-jsch-agentproxy-connector-factory
12076 (package
12077 (inherit java-jsch-agentproxy-core)
12078 (name "java-jsch-agentproxy-connector-factory")
12079 (arguments
12080 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12081 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12082 #:tests? #f)); no tests
12083 (inputs
12084 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12085 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12086 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12087 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12088 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12089 (synopsis "Connector factory for jsch agent proxy")
12090 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12091 and Pageant included in Putty. This component contains a connector factory.")))
12092
12093 (define-public java-jsch-agentproxy-jsch
12094 (package
12095 (inherit java-jsch-agentproxy-core)
12096 (name "java-jsch-agentproxy-jsch")
12097 (arguments
12098 `(#:jar-name "jsch-agentproxy-jsch.jar"
12099 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12100 #:tests? #f)); no tests
12101 (inputs
12102 `(("java-jsch" ,java-jsch)
12103 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12104 (synopsis "JSch integration library for agentproxy")
12105 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12106 and Pageant included in Putty. This component contains a library to use
12107 jsch-agent-proxy with JSch.")))
12108
12109 (define-public java-apache-ivy
12110 (package
12111 (name "java-apache-ivy")
12112 (version "2.4.0")
12113 (source (origin
12114 (method url-fetch)
12115 (uri (string-append "mirror://apache//ant/ivy/" version
12116 "/apache-ivy-" version "-src.tar.gz"))
12117 (sha256
12118 (base32
12119 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12120 (patches
12121 (search-patches
12122 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12123 (build-system ant-build-system)
12124 (arguments
12125 `(#:jar-name "ivy.jar"
12126 #:tests? #f
12127 #:phases
12128 (modify-phases %standard-phases
12129 (add-before 'build 'remove-example
12130 (lambda _
12131 (delete-file-recursively "src/example")
12132 #t))
12133 (add-before 'build 'copy-resources
12134 (lambda _
12135 (with-directory-excursion "src/java"
12136 (for-each (lambda (file)
12137 (install-file file (string-append "../../build/classes/" (dirname file))))
12138 (append
12139 (find-files "." ".*.css")
12140 (find-files "." ".*.ent")
12141 (find-files "." ".*.html")
12142 (find-files "." ".*.properties")
12143 (find-files "." ".*.xsd")
12144 (find-files "." ".*.xsl")
12145 (find-files "." ".*.xml"))))
12146 #t))
12147 (add-before 'build 'fix-vfs
12148 (lambda _
12149 (substitute*
12150 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12151 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12152 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12153 #t))
12154 (add-before 'install 'copy-manifest
12155 (lambda _
12156 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12157 #t))
12158 (add-before 'install 'repack
12159 (lambda _
12160 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12161 "-C" "build/classes" ".")))
12162 (add-after 'install 'install-bin
12163 (lambda* (#:key outputs #:allow-other-keys)
12164 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12165 (ivy (string-append bin "/ivy"))
12166 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12167 (mkdir-p bin)
12168 (with-output-to-file ivy
12169 (lambda _
12170 (display (string-append
12171 "#!" (which "sh") "\n"
12172 "if [[ -z $CLASSPATH ]]; then\n"
12173 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12174 "else\n"
12175 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12176 "fi\n"
12177 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12178 (chmod ivy #o755)
12179 #t))))))
12180 (inputs
12181 `(("java-bouncycastle" ,java-bouncycastle)
12182 ("java-commons-cli" ,java-commons-cli)
12183 ("java-commons-collections" ,java-commons-collections)
12184 ("java-commons-httpclient" ,java-commons-httpclient)
12185 ("java-commons-lang" ,java-commons-lang)
12186 ("java-commons-vfs" ,java-commons-vfs)
12187 ("java-jakarta-oro" ,java-jakarta-oro)
12188 ("java-jsch" ,java-jsch)
12189 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12190 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12191 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12192 ("java-junit" ,java-junit)))
12193 (home-page "https://ant.apache.org/ivy")
12194 (synopsis "Dependency manager for the Java programming language")
12195 (description "Ivy is a tool for managing (recording, tracking, resolving
12196 and reporting) project dependencies. It is characterized by the following:
12197
12198 @itemize
12199 @item flexibility and configurability - Ivy is essentially process agnostic
12200 and is not tied to any methodology or structure. Instead it provides the
12201 necessary flexibility and configurability to be adapted to a broad range
12202 of dependency management and build processes.
12203 @item tight integration with Apache Ant - while available as a standalone tool,
12204 Ivy works particularly well with Apache Ant providing a number of
12205 powerful Ant tasks ranging from dependency resolution to dependency
12206 reporting and publication.
12207 @end itemize")
12208 (license license:asl2.0)))
12209
12210 (define-public java-eclipse-sisu-inject
12211 (package
12212 (name "java-eclipse-sisu-inject")
12213 (version "0.3.4")
12214 (source (origin
12215 (method git-fetch)
12216 (uri (git-reference
12217 (url "https://github.com/eclipse/sisu.inject/")
12218 (commit (string-append "releases/" version))))
12219 (file-name (git-file-name name version))
12220 (sha256
12221 (base32
12222 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12223 (build-system ant-build-system)
12224 (arguments
12225 `(#:jar-name "eclipse-sisu-inject.jar"
12226 #:source-dir "org.eclipse.sisu.inject/src"
12227 #:tests? #f; no tests
12228 #:phases
12229 (modify-phases %standard-phases
12230 (replace 'install
12231 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12232 (propagated-inputs
12233 `(("java-guice" ,java-guice)
12234 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12235 (inputs
12236 `(("java-guice-servlet" ,java-guice-servlet)
12237 ("java-javax-inject" ,java-javax-inject)
12238 ("java-javaee-servletapi" ,java-javaee-servletapi)
12239 ("java-junit" ,java-junit)
12240 ("java-slf4j-api" ,java-slf4j-api)
12241 ("java-jsr305" ,java-jsr305)
12242 ("java-jsr250" ,java-jsr250)
12243 ("java-cdi-api" ,java-cdi-api)
12244 ("java-osgi-framework" ,java-osgi-framework)
12245 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12246 ("java-testng" ,java-testng)))
12247 (home-page "https://www.eclipse.org/sisu/")
12248 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12249 (description "Sisu is a modular JSR330-based container that supports
12250 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12251 Google-Guice to perform dependency injection and provide the core JSR330
12252 support, but removes the need to write explicit bindings in Guice modules.
12253 Integration with other containers via the Eclipse Extension Registry and the
12254 OSGi Service Registry is a goal of this project.")
12255 (license license:epl1.0)))
12256
12257 (define java-sisu-inject-parent-pom
12258 (package
12259 (inherit java-eclipse-sisu-inject)
12260 (name "java-sisu-inject-parent-pom")
12261 (arguments
12262 `(#:tests? #f
12263 #:phases
12264 (modify-phases %standard-phases
12265 (delete 'configure)
12266 (delete 'build)
12267 (replace 'install
12268 (install-pom-file "pom.xml")))))
12269 (propagated-inputs '())))
12270
12271 (define-public java-eclipse-sisu-plexus
12272 (package
12273 (name "java-eclipse-sisu-plexus")
12274 (version "0.3.4")
12275 (source (origin
12276 (method git-fetch)
12277 (uri (git-reference
12278 (url "https://github.com/eclipse/sisu.plexus")
12279 (commit (string-append "releases/" version))))
12280 (file-name (git-file-name name version))
12281 (sha256
12282 (base32
12283 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
12284 (modules '((guix build utils)))
12285 (snippet
12286 '(begin
12287 (for-each delete-file (find-files "." ".*.jar"))
12288 (rename-file "org.eclipse.sisu.plexus.tests/src"
12289 "org.eclipse.sisu.plexus.tests/java")
12290 #t))))
12291 (build-system ant-build-system)
12292 (arguments
12293 `(#:jar-name "eclipse-sisu-plexus.jar"
12294 #:source-dir "org.eclipse.sisu.plexus/src"
12295 #:test-dir "org.eclipse.sisu.plexus.tests"
12296 #:test-exclude
12297 (list
12298 ;; This test fails probably because we can't generate the necessary
12299 ;; meta-inf files.
12300 "**/PlexusLoggingTest.*"
12301 ;; FIXME: This test fails because of some injection error
12302 "**/PlexusRequirementTest.*")
12303 #:jdk ,icedtea-8
12304 #:phases
12305 (modify-phases %standard-phases
12306 (add-before 'build 'copy-resources
12307 (lambda _
12308 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
12309 "build/classes/META-INF/plexus")
12310 #t))
12311 (add-before 'check 'build-test-jar
12312 (lambda _
12313 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
12314 (mkdir "build")
12315 (with-directory-excursion "java"
12316 (apply invoke "javac" "-cp"
12317 (string-append (getenv "CLASSPATH")
12318 ":../../../../../build/classes")
12319 (find-files "." ".*.java"))
12320 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
12321 (find-files "." ".*.jar")))
12322 (mkdir-p "build/META-INF/plexus")
12323 (copy-file "resources/META-INF/plexus/components.xml"
12324 "build/META-INF/plexus/components.xml")
12325 (with-directory-excursion "build"
12326 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
12327 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
12328 (copy-recursively "META-INF" "../build/test-classes/META-INF")
12329 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
12330 (("resources/component-jar")
12331 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
12332 #t))
12333 (replace 'install
12334 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
12335 (propagated-inputs
12336 `(("java-plexus-classworlds" ,java-plexus-classworlds)
12337 ("java-plexus-utils" ,java-plexus-utils)
12338 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
12339 ("java-cdi-api" ,java-cdi-api)
12340 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
12341 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
12342 (inputs
12343 `(("java-osgi-framework" ,java-osgi-framework)
12344 ("java-slf4j-api" ,java-slf4j-api)
12345 ("java-javax-inject" ,java-javax-inject)
12346 ("java-guice" ,java-guice)
12347 ("java-guava" ,java-guava)
12348 ("java-aopalliance" ,java-aopalliance)
12349 ("java-asm" ,java-asm)
12350 ("java-cglib" ,java-cglib)))
12351 (native-inputs
12352 `(("java-junit" ,java-junit)))
12353 (home-page "https://www.eclipse.org/sisu/")
12354 (synopsis "Plexus support for the sisu container")
12355 (description "Sisu is a modular JSR330-based container that supports
12356 classpath scanning, auto-binding, and dynamic auto-wiring. This package
12357 adds Plexus support to the Sisu-Inject container.")
12358 (license license:epl1.0)))
12359
12360 (define java-sisu-plexus-parent-pom
12361 (package
12362 (inherit java-eclipse-sisu-plexus)
12363 (name "java-sisu-plexus-parent-pom")
12364 (arguments
12365 `(#:tests? #f
12366 #:phases
12367 (modify-phases %standard-phases
12368 (delete 'configure)
12369 (delete 'build)
12370 (replace 'install
12371 (install-pom-file "pom.xml")))))
12372 (propagated-inputs
12373 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
12374
12375 (define-public java-commons-compiler
12376 (package
12377 (name "java-commons-compiler")
12378 (version "3.0.8")
12379 (source (origin
12380 (method git-fetch)
12381 (uri (git-reference
12382 (url "https://github.com/janino-compiler/janino")
12383 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
12384 (file-name (string-append name "-" version))
12385 (sha256
12386 (base32
12387 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
12388 (modules '((guix build utils)))
12389 (snippet
12390 '(begin
12391 (for-each delete-file
12392 (find-files "." "\\.jar$"))
12393 #t))))
12394 (build-system ant-build-system)
12395 (arguments
12396 `(#:jar-name "commons-compiler.jar"
12397 #:source-dir "commons-compiler/src/main"
12398 #:tests? #f)); no tests
12399 (home-page "https://github.com/janino-compiler/janino")
12400 (synopsis "Java compiler")
12401 (description "Commons-compiler contains an API for janino, including the
12402 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
12403 and @code{ISimpleCompiler} interfaces.")
12404 (license license:bsd-3)))
12405
12406 (define-public java-janino
12407 (package
12408 (inherit java-commons-compiler)
12409 (name "java-janino")
12410 (arguments
12411 `(#:jar-name "janino.jar"
12412 #:source-dir "src/main/java"
12413 #:phases
12414 (modify-phases %standard-phases
12415 (add-before 'configure 'chdir
12416 (lambda _
12417 (chdir "janino")
12418 #t)))))
12419 (inputs
12420 `(("java-commons-compiler" ,java-commons-compiler)))
12421 (native-inputs
12422 `(("java-junit" ,java-junit)
12423 ("java-hamcrest-core" ,java-hamcrest-core)))
12424 (description "Janino is a Java compiler. Janino can compile a set of
12425 source files to a set of class files like @code{javac}, but also compile a
12426 Java expression, block, class body or source file in memory, load the bytecode
12427 and execute it directly in the same JVM. @code{janino} can also be used for
12428 static code analysis or code manipulation.")))
12429
12430 (define-public java-logback-core
12431 (package
12432 (name "java-logback-core")
12433 (version "1.2.3")
12434 (source (origin
12435 (method url-fetch)
12436 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
12437 version ".tar.gz"))
12438 (file-name (string-append name "-" version ".tar.gz"))
12439 (sha256
12440 (base32
12441 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
12442 (modules '((guix build utils)))
12443 (snippet
12444 '(begin
12445 (delete-file-recursively "logback-access/lib")
12446 #t))))
12447 (build-system ant-build-system)
12448 (arguments
12449 `(#:jar-name "logback.jar"
12450 #:source-dir "src/main/java"
12451 #:test-dir "src/test"
12452 #:test-exclude
12453 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
12454 ;; which creates FastClasses
12455 (list "**/AllCoreTest.*"
12456 "**/AutoFlushingObjectWriterTest.*"
12457 "**/PackageTest.*"
12458 "**/ResilientOutputStreamTest.*"
12459 ;; And we still don't want to run abstract classes
12460 "**/Abstract*.*")
12461 #:phases
12462 (modify-phases %standard-phases
12463 (add-before 'configure 'chdir
12464 (lambda _
12465 (chdir "logback-core")
12466 #t)))))
12467 (inputs
12468 `(("java-javax-mail" ,java-javax-mail)
12469 ("servlet" ,java-javaee-servletapi)
12470 ("java-commons-compiler" ,java-commons-compiler)
12471 ("java-janino" ,java-janino)))
12472 (native-inputs
12473 `(("java-junit" ,java-junit)
12474 ("java-hamcrest-core" ,java-hamcrest-core)
12475 ("java-mockito-1" ,java-mockito-1)
12476 ("java-cglib" ,java-cglib)
12477 ("java-asm" ,java-asm)
12478 ("java-objenesis" ,java-objenesis)
12479 ("java-joda-time" ,java-joda-time)))
12480 (home-page "https://logback.qos.ch")
12481 (synopsis "Logging for java")
12482 (description "Logback is intended as a successor to the popular log4j project.
12483 This module lays the groundwork for the other two modules.")
12484 ;; Either epl1.0 or lgpl2.1
12485 (license (list license:epl1.0
12486 license:lgpl2.1))))
12487
12488 (define-public java-logback-classic
12489 (package
12490 (inherit java-logback-core)
12491 (name "java-logback-classic")
12492 (arguments
12493 `(#:jar-name "logback-classic.jar"
12494 #:source-dir "src/main/java"
12495 #:test-dir "src/test"
12496 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
12497 #:jdk ,icedtea-8
12498 #:phases
12499 (modify-phases %standard-phases
12500 (add-before 'configure 'chdir
12501 (lambda _
12502 (chdir "logback-classic")
12503 #t))
12504 (replace 'build
12505 (lambda* (#:key inputs #:allow-other-keys)
12506 (mkdir-p "build/classes")
12507 (setenv "CLASSPATH"
12508 (string-join
12509 (apply append (map (lambda (input)
12510 (find-files (assoc-ref inputs input)
12511 ".*.jar"))
12512 '("java-logback-core" "java-slf4j-api"
12513 "java-commons-compiler" "servlet"
12514 "groovy")))
12515 ":"))
12516 (apply invoke "groovyc" "-d" "build/classes" "-j"
12517 (find-files "src/main/" ".*\\.(groovy|java)$"))
12518 (invoke "ant" "jar")
12519 #t)))))
12520 (inputs
12521 `(("java-logback-core" ,java-logback-core)
12522 ("java-slf4j-api" ,java-slf4j-api)
12523 ,@(package-inputs java-logback-core)))
12524 (native-inputs
12525 `(("groovy" ,groovy)))
12526 (description "Logback is intended as a successor to the popular log4j project.
12527 This module can be assimilated to a significantly improved version of log4j.
12528 Moreover, @code{logback-classic} natively implements the slf4j API so that you
12529 can readily switch back and forth between logback and other logging frameworks
12530 such as log4j or @code{java.util.logging} (JUL).")))
12531
12532 (define-public java-jgit
12533 (package
12534 (name "java-jgit")
12535 (version "4.7.0.201704051617-r")
12536 (source (origin
12537 (method url-fetch)
12538 (uri (string-append "https://repo1.maven.org/maven2/"
12539 "org/eclipse/jgit/org.eclipse.jgit/"
12540 version "/org.eclipse.jgit-"
12541 version "-sources.jar"))
12542 (sha256
12543 (base32
12544 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
12545 (build-system ant-build-system)
12546 (arguments
12547 `(#:tests? #f ; There are no tests to run.
12548 #:jar-name "jgit.jar"
12549 ;; JGit must be built with a JDK supporting Java 8.
12550 #:jdk ,icedtea-8
12551 ;; Target our older default JDK.
12552 #:make-flags (list "-Dtarget=1.7")
12553 #:phases
12554 (modify-phases %standard-phases
12555 ;; The jar file generated by the default build.xml does not include
12556 ;; the text properties files, so we need to add them.
12557 (add-after 'build 'add-properties
12558 (lambda* (#:key jar-name #:allow-other-keys)
12559 (with-directory-excursion "src"
12560 (apply invoke "jar" "-uf"
12561 (string-append "../build/jar/" jar-name)
12562 (find-files "." "\\.properties$")))
12563 #t)))))
12564 (inputs
12565 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
12566 ("java-javaewah" ,java-javaewah)
12567 ("java-jsch" ,java-jsch)
12568 ("java-slf4j-api" ,java-slf4j-api)))
12569 (home-page "https://eclipse.org/jgit/")
12570 (synopsis "Java library implementing the Git version control system")
12571 (description "JGit is a lightweight, pure Java library implementing the
12572 Git version control system, providing repository access routines, support for
12573 network protocols, and core version control algorithms.")
12574 (license license:edl1.0)))
12575
12576 ;; For axoloti. This package can still be built with icedtea-7, which is
12577 ;; currently used as the default JDK.
12578 (define-public java-jgit-4.2
12579 (package (inherit java-jgit)
12580 (version "4.2.0.201601211800-r")
12581 (source (origin
12582 (method url-fetch)
12583 (uri (string-append "https://repo1.maven.org/maven2/"
12584 "org/eclipse/jgit/org.eclipse.jgit/"
12585 version "/org.eclipse.jgit-"
12586 version "-sources.jar"))
12587 (sha256
12588 (base32
12589 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
12590 (build-system ant-build-system)
12591 (arguments
12592 (substitute-keyword-arguments (package-arguments java-jgit)
12593 ;; Build for default JDK.
12594 ((#:jdk _) icedtea-7)
12595 ((#:phases phases)
12596 `(modify-phases ,phases
12597 (add-after 'unpack 'use-latest-javaewah-API
12598 (lambda _
12599 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
12600 (("wordinbits") "WORD_IN_BITS"))
12601 #t))))))
12602 (inputs
12603 `(("java-javaewah" ,java-javaewah)
12604 ("java-jsch" ,java-jsch)
12605 ("java-slf4j-api" ,java-slf4j-api)))))
12606
12607 (define-public abcl
12608 (package
12609 (name "abcl")
12610 (version "1.6.0")
12611 (source
12612 (origin
12613 (method url-fetch)
12614 (uri (string-append "https://abcl.org/releases/"
12615 version "/abcl-src-" version ".tar.gz"))
12616 (sha256
12617 (base32
12618 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
12619 (patches
12620 (search-patches
12621 "abcl-fix-build-xml.patch"))))
12622 (build-system ant-build-system)
12623 (native-inputs
12624 `(("java-junit" ,java-junit)))
12625 (arguments
12626 `(#:build-target "abcl.jar"
12627 #:test-target "abcl.test"
12628 #:phases
12629 (modify-phases %standard-phases
12630 (replace 'install
12631 (lambda* (#:key outputs #:allow-other-keys)
12632 (let ((share (string-append (assoc-ref outputs "out")
12633 "/share/java/"))
12634 (bin (string-append (assoc-ref outputs "out")
12635 "/bin/")))
12636 (mkdir-p share)
12637 (install-file "dist/abcl.jar" share)
12638 (install-file "dist/abcl-contrib.jar" share)
12639 (mkdir-p bin)
12640 (with-output-to-file (string-append bin "abcl")
12641 (lambda _
12642 (let ((classpath (string-append
12643 share "abcl.jar"
12644 ":"
12645 share "abcl-contrib.jar")))
12646 (display (string-append
12647 "#!" (which "sh") "\n"
12648 "if [[ -z $CLASSPATH ]]; then\n"
12649 " cp=\"" classpath "\"\n"
12650 "else\n"
12651 " cp=\"" classpath ":$CLASSPATH\"\n"
12652 "fi\n"
12653 "exec " (which "java")
12654 " -cp $cp org.armedbear.lisp.Main $@\n")))))
12655 (chmod (string-append bin "abcl") #o755)
12656 #t))))))
12657 (home-page "https://abcl.org/")
12658 (synopsis "Common Lisp Implementation on the JVM")
12659 (description
12660 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
12661 Lisp language featuring both an interpreter and a compiler, running in the
12662 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
12663 in any Java application. Additionally, it can be used to implement (parts of)
12664 the application using Java to Lisp integration APIs.")
12665 (license (list license:gpl2+
12666 ;; named-readtables is released under 3 clause BSD
12667 license:bsd-3
12668 ;; jfli is released under CPL 1.0
12669 license:cpl1.0))))
12670
12671 (define-public java-jsonp-api
12672 (package
12673 (name "java-jsonp-api")
12674 (version "1.1.6")
12675 (source (origin
12676 (method git-fetch)
12677 (uri (git-reference
12678 (url "https://github.com/eclipse-ee4j/jsonp")
12679 (commit (string-append "1.1-" version "-RELEASE"))))
12680 (file-name (git-file-name name version))
12681 (sha256
12682 (base32
12683 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
12684 (build-system ant-build-system)
12685 (arguments
12686 `(#:jar-name "jsonp-api.jar"
12687 #:tests? #f
12688 #:source-dir "api/src/main/java"
12689 #:test-dir "api/src/test"))
12690 (home-page "https://eclipse-ee4j.github.io/jsonp/")
12691 (synopsis "JSON Processing in Java")
12692 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
12693 parse, generate, transform and query) JSON messages. It produces and
12694 consumes JSON text in a streaming fashion (similar to StAX API for XML)
12695 and allows building a Java object model for JSON text using API classes
12696 (similar to DOM API for XML).")
12697 ;; either gpl2 only with classpath exception, or epl2.0.
12698 (license (list license:gpl2
12699 license:epl2.0))))
12700
12701 (define-public java-jsonp-impl
12702 (package
12703 (inherit java-jsonp-api)
12704 (name "java-jsonp-impl")
12705 (arguments
12706 `(#:jar-name "jsonp-impl.jar"
12707 #:tests? #f
12708 #:source-dir "impl/src/main/java"
12709 #:test-dir "impl/src/test"
12710 #:phases
12711 (modify-phases %standard-phases
12712 (add-before 'build 'copy-resources
12713 (lambda _
12714 (copy-recursively
12715 "impl/src/main/resources/"
12716 "build/classes")
12717 #t)))))
12718 (propagated-inputs
12719 `(("java-jsonp-api" ,java-jsonp-api)))
12720 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
12721 parse, generate, transform and query) JSON messages. This package contains
12722 a reference implementation of that API.")))
12723
12724 (define-public java-xmp
12725 (package
12726 (name "java-xmp")
12727 (version "5.1.3")
12728 (source (origin
12729 (method url-fetch)
12730 (uri (string-append "http://download.macromedia.com/pub/developer"
12731 "/xmp/sdk/XMPCoreJava-" version ".zip"))
12732 (sha256
12733 (base32
12734 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
12735 (build-system ant-build-system)
12736 (arguments
12737 `(#:build-target "build"
12738 #:tests? #f; no tests
12739 #:phases
12740 (modify-phases %standard-phases
12741 (add-after 'unpack 'chdir
12742 (lambda _
12743 (chdir "XMPCore")
12744 #t))
12745 (add-before 'build 'fix-timestamp
12746 (lambda _
12747 (substitute* "build.xml"
12748 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
12749 #t))
12750 (replace 'install
12751 (install-jars "."))
12752 (add-after 'install 'install-doc
12753 (lambda* (#:key outputs #:allow-other-keys)
12754 (copy-recursively
12755 "docs"
12756 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
12757 #t)))))
12758 (native-inputs
12759 `(("unzip" ,unzip)))
12760 (home-page "https://www.adobe.com/devnet/xmp.html")
12761 (synopsis "Extensible Metadat Platform (XMP) support in Java")
12762 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
12763 technology that allows you to embed data about a file, known as metadata,
12764 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
12765 library and the API is similar.")
12766 (license license:bsd-3)))
12767
12768 (define-public java-metadata-extractor
12769 (package
12770 (name "java-metadata-extractor")
12771 (version "2.11.0")
12772 (source (origin
12773 (method git-fetch)
12774 (uri (git-reference
12775 (url "https://github.com/drewnoakes/metadata-extractor")
12776 (commit version)))
12777 (file-name (git-file-name name version))
12778 (sha256
12779 (base32
12780 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
12781 (build-system ant-build-system)
12782 (arguments
12783 `(#:jar-name "metadata-extractor.jar"
12784 #:source-dir "Source"
12785 #:test-dir "Tests"
12786 #:phases
12787 (modify-phases %standard-phases
12788 (add-before 'check 'fix-test-dir
12789 (lambda _
12790 (substitute* "build.xml"
12791 (("/java\">") "\">"))
12792 #t)))))
12793 (propagated-inputs
12794 `(("java-xmp" ,java-xmp)))
12795 (native-inputs
12796 `(("java-hamcrest-core" ,java-hamcrest-core)
12797 ("java-junit" ,java-junit)))
12798 (home-page "https://github.com/drewnoakes/metadata-extractor")
12799 (synopsis "Extract metadata from image and video files")
12800 (description "Metadata-extractor is a straightforward Java library for
12801 reading metadata from image files. It is able to read metadata in Exif,
12802 IPTC, XMP, ICC and more formats.")
12803 (license license:asl2.0)))
12804
12805 (define-public java-svg-salamander
12806 (package
12807 (name "java-svg-salamander")
12808 (version "1.1.2")
12809 (source (origin
12810 (method git-fetch)
12811 (uri (git-reference
12812 (url "https://github.com/blackears/svgSalamander")
12813 (commit (string-append "v" version))))
12814 (file-name (git-file-name name version))
12815 (sha256
12816 (base32
12817 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
12818 (modules '((guix build utils)))
12819 (snippet
12820 '(begin
12821 (for-each delete-file (find-files "." ".*.jar"))
12822 #t))
12823 (patches
12824 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
12825 (build-system ant-build-system)
12826 (arguments
12827 `(#:tests? #f; no tests
12828 #:phases
12829 (modify-phases %standard-phases
12830 (add-after 'unpack 'chdir
12831 (lambda _
12832 (chdir "svg-core")
12833 #t))
12834 (add-before 'build 'copy-jars
12835 (lambda* (#:key inputs #:allow-other-keys)
12836 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
12837 "../libraries/javacc.jar")
12838 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
12839 "../libraries/ant.jar")
12840 #t))
12841 (replace 'install
12842 (install-jars "dist")))))
12843 (native-inputs
12844 `(("javacc" ,javacc)))
12845 (home-page "https://github.com/blackears/svgSalamander")
12846 (synopsis "SVG engine for Java")
12847 (description "SVG Salamander is an SVG engine for Java that's designed
12848 to be small, fast, and allow programmers to use it with a minimum of fuss.
12849 It's in particular targeted for making it easy to integrate SVG into Java
12850 games and making it much easier for artists to design 2D game content - from
12851 rich interactive menus to charts and graphcs to complex animations.")
12852 (license license:bsd-2)))
12853
12854 (define-public java-jboss-transaction-api-spec
12855 (package
12856 (name "java-jboss-transaction-api-spec")
12857 (version "1.2+1.1.1")
12858 (source (origin
12859 (method git-fetch)
12860 (uri (git-reference
12861 (url "https://github.com/jboss/jboss-transaction-api_spec")
12862 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
12863 (file-name (git-file-name name version))
12864 (sha256
12865 (base32
12866 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
12867 (build-system ant-build-system)
12868 (arguments
12869 `(#:jar-name "java-jboss-transaction-api_spec.jar"
12870 #:source-dir "src/main/java"
12871 #:tests? #f)); no tests
12872 (inputs
12873 `(("java-cdi-api" ,java-cdi-api)
12874 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
12875 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
12876 (synopsis "Generic transaction management API in Java")
12877 (description "Java-jboss-transaction-api-spec implements the Transactions
12878 API. A transaction is a unit of work containing one or more operations
12879 involving one or more shared resources having ACID (Atomicity, Consistency,
12880 Isolation and Durability) properties.")
12881 ;; either gpl2 only with classpath exception or cddl.
12882 (license (list license:gpl2 license:cddl1.0))))
12883
12884 (define-public java-picocli
12885 (package
12886 (name "java-picocli")
12887 (version "4.3.2")
12888 (source (origin
12889 (method git-fetch)
12890 (uri (git-reference
12891 (url "https://github.com/remkop/picocli")
12892 (commit (string-append "v" version))))
12893 (file-name (git-file-name name version))
12894 (sha256
12895 (base32
12896 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
12897 (build-system ant-build-system)
12898 (arguments
12899 `(#:jar-name "picocli.jar"
12900 #:source-dir "src/main/java"
12901 ;; Tests require missing dependencies (junitparams, system-rules)
12902 #:tests? #f))
12903 (home-page "https://picocli.info")
12904 (synopsis "REPL for the JVM")
12905 (description "Picocli is a framework for building command line applications
12906 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
12907 in Java, usable from Groovy, Kotlin, Scala, etc.")
12908 (license license:asl2.0)))
12909
12910 (define-public java-jetbrains-annotations
12911 (package
12912 (name "java-jetbrains-annotations")
12913 (version "19.0.0")
12914 (source (origin
12915 (method git-fetch)
12916 (uri (git-reference
12917 (url "https://github.com/JetBrains/java-annotations")
12918 (commit version)))
12919 (file-name (git-file-name name version))
12920 (sha256
12921 (base32
12922 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
12923 (build-system ant-build-system)
12924 (arguments
12925 `(#:jar-name "jetbrains-annotations.jar"
12926 #:source-dir "common/src/main/java:java8/src/main/java"
12927 #:tests? #f)); no tests
12928 (home-page "https://github.com/JetBrains/java-annotations")
12929 (synopsis "Annotations for Java and other JVM languages")
12930 (description "This package contains a set of Java annotations which can be
12931 used in JVM-based languages. They serve as an additional documentation and
12932 can be interpreted by IDEs and static analysis tools to improve code analysis.")
12933 (license license:expat)))