projects/guix·blob version-1.0.0 · refs

11049 lines · 463.6 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <[email protected]>
3;;; Copyright © 2016 Leo Famulari <[email protected]>
4;;; Copyright © 2016, 2017 Roel Janssen <[email protected]>
5;;; Copyright © 2017 Carlo Zancanaro <[email protected]>
6;;; Copyright © 2017, 2018 Julien Lepiller <[email protected]>
7;;; Copyright © 2017 Thomas Danckaert <[email protected]>
8;;; Copyright © 2016, 2017, 2018 Alex Vong <[email protected]>
9;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2018 Gábor Boskovits <[email protected]>
11;;; Copyright © 2018 Chris Marusich <[email protected]>
12;;; Copyright © 2018 Efraim Flashner <[email protected]>
13;;;
14;;; This file is part of GNU Guix.
15;;;
16;;; GNU Guix is free software; you can redistribute it and/or modify it
17;;; under the terms of the GNU General Public License as published by
18;;; the Free Software Foundation; either version 3 of the License, or (at
19;;; your option) any later version.
20;;;
21;;; GNU Guix is distributed in the hope that it will be useful, but
22;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;;; GNU General Public License for more details.
25;;;
26;;; You should have received a copy of the GNU General Public License
27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29(define-module (gnu packages java)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix hg-download)
34 #:use-module (guix git-download)
35 #:use-module (guix svn-download)
36 #:use-module (guix utils)
37 #:use-module (guix build-system ant)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system trivial)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages certs)
46 #:use-module (gnu packages cpio)
47 #:use-module (gnu packages cups)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages elf)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages gawk)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages gcc)
54 #:use-module (gnu packages gl)
55 #:use-module (gnu packages ghostscript) ;lcms
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages groovy)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages guile)
60 #:use-module (gnu packages icu4c)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages java-compression)
63 #:use-module (gnu packages libffi)
64 #:use-module (gnu packages linux) ;alsa
65 #:use-module (gnu packages maths)
66 #:use-module (gnu packages nss)
67 #:use-module (gnu packages onc-rpc)
68 #:use-module (gnu packages web)
69 #:use-module (gnu packages wget)
70 #:use-module (gnu packages pkg-config)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages popt)
73 #:use-module (gnu packages kerberos)
74 #:use-module (gnu packages xml)
75 #:use-module (gnu packages xorg)
76 #:use-module (gnu packages texinfo)
77 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
78 #:use-module (srfi srfi-11)
79 #:use-module (ice-9 match))
80
81
82;;;
83;;; Java bootstrap toolchain.
84;;;
85
86;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
87;; use it to build a simple version of GNU Classpath, the Java standard
88;; library. We chose version 0.93 because it is the last version that can be
89;; built with Jikes. With Jikes and this version of GNU Classpath we can
90;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
91;; the last version of JamVM that works with a version of GNU classpath that
92;; does not require ECJ. These three packages make up the bootstrap JDK.
93
94;; This is sufficient to build an older version of Ant, which is needed to
95;; build an older version of ECJ, an incremental Java compiler, both of which
96;; are written in Java.
97;;
98;; ECJ is needed to build the latest release (0.99) and the development
99;; version of GNU Classpath. The development version of GNU Classpath has
100;; much more support for Java 1.6 than the latest release, but we need to
101;; build 0.99 first to get a working version of javah. ECJ, the development
102;; version of GNU Classpath, and the latest version of JamVM make up the
103;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
104;; build framework. We then build the more recent JDKs Icedtea 2.x and
105;; Icedtea 3.x.
106
107(define jikes
108 (package
109 (name "jikes")
110 (version "1.22")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
114 version "/jikes-" version ".tar.bz2"))
115 (sha256
116 (base32
117 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
118 (build-system gnu-build-system)
119 (home-page "http://jikes.sourceforge.net/")
120 (synopsis "Compiler for the Java language")
121 (description "Jikes is a compiler that translates Java source files as
122defined in The Java Language Specification into the bytecoded instruction set
123and binary format defined in The Java Virtual Machine Specification.")
124 (license license:ibmpl1.0)))
125
126;; This is the last version of GNU Classpath that can be built without ECJ.
127(define classpath-bootstrap
128 (package
129 (name "classpath")
130 (version "0.93")
131 (source (origin
132 (method url-fetch)
133 (uri (string-append "mirror://gnu/classpath/classpath-"
134 version ".tar.gz"))
135 (sha256
136 (base32
137 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
138 (patches (search-patches "classpath-aarch64-support.patch"))))
139 (build-system gnu-build-system)
140 (arguments
141 `(#:configure-flags
142 (list (string-append "JAVAC="
143 (assoc-ref %build-inputs "jikes")
144 "/bin/jikes")
145 "--disable-Werror"
146 "--disable-gmp"
147 "--disable-gtk-peer"
148 "--disable-gconf-peer"
149 "--disable-plugin"
150 "--disable-dssi"
151 "--disable-alsa"
152 "--disable-gjdoc")
153 #:phases
154 (modify-phases %standard-phases
155 (add-after 'install 'install-data
156 (lambda _ (invoke "make" "install-data"))))))
157 (native-inputs
158 `(("jikes" ,jikes)
159 ("fastjar" ,fastjar)
160 ("libltdl" ,libltdl)
161 ("pkg-config" ,pkg-config)))
162 (home-page "https://www.gnu.org/software/classpath/")
163 (synopsis "Essential libraries for Java")
164 (description "GNU Classpath is a project to create core class libraries
165for use with runtimes, compilers and tools for the Java programming
166language.")
167 ;; GPLv2 or later, with special linking exception.
168 (license license:gpl2+)))
169
170;; This is the last version of JamVM that works with a version of GNU
171;; classpath that does not require ECJ.
172(define jamvm-1-bootstrap
173 (package
174 (name "jamvm")
175 (version "1.5.1")
176 (source (origin
177 (method url-fetch)
178 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
179 "JamVM%20" version "/jamvm-"
180 version ".tar.gz"))
181 (patches (search-patches "jamvm-arm.patch"))
182 (sha256
183 (base32
184 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
185 (build-system gnu-build-system)
186 (arguments
187 `(#:configure-flags
188 (list (string-append "--with-classpath-install-dir="
189 (assoc-ref %build-inputs "classpath")))))
190 (inputs
191 `(("classpath" ,classpath-bootstrap)
192 ("jikes" ,jikes)
193 ("zlib" ,zlib)))
194 (home-page "http://jamvm.sourceforge.net/")
195 (synopsis "Small Java Virtual Machine")
196 (description "JamVM is a Java Virtual Machine conforming to the JVM
197specification edition 2 (blue book). It is extremely small. However, unlike
198other small VMs it supports the full spec, including object finalisation and
199JNI.")
200 (license license:gpl2+)))
201
202(define ant-bootstrap
203 (package
204 (name "ant-bootstrap")
205 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
206 ;; are not supported. The 1.8.x series is the last to use only features
207 ;; supported by Jikes.
208 (version "1.8.4")
209 (source (origin
210 (method url-fetch)
211 (uri (string-append "http://archive.apache.org/dist/"
212 "ant/source/apache-ant-"
213 version "-src.tar.bz2"))
214 (sha256
215 (base32
216 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
217 (build-system gnu-build-system)
218 (arguments
219 `(#:imported-modules ((guix build syscalls)
220 ,@%gnu-build-system-modules)
221 #:modules ((srfi srfi-1)
222 (guix build gnu-build-system)
223 (guix build utils)
224 (guix build syscalls))
225 #:tests? #f ; no "check" target
226 #:phases
227 (modify-phases %standard-phases
228 (delete 'bootstrap)
229 (delete 'configure)
230 (replace 'build
231 (lambda* (#:key inputs #:allow-other-keys)
232 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
233 (setenv "JAVACMD"
234 (string-append (assoc-ref inputs "jamvm")
235 "/bin/jamvm"))
236 (setenv "JAVAC"
237 (string-append (assoc-ref inputs "jikes")
238 "/bin/jikes"))
239 (setenv "CLASSPATH"
240 (string-append (assoc-ref inputs "jamvm")
241 "/lib/rt.jar"))
242
243 ;; Ant complains if this file doesn't exist.
244 (setenv "HOME" "/tmp")
245 (with-output-to-file "/tmp/.ant.properties"
246 (lambda _ (display "")))
247
248 ;; Use jikes instead of javac for <javac ...> tags in build.xml
249 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
250
251 ;; jikes produces lots of warnings, but they are not very
252 ;; interesting, so we silence them.
253 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
254
255 ;; Without these JamVM options the build may freeze.
256 (substitute* "bootstrap.sh"
257 (("^\"\\$\\{JAVACMD\\}\" " m)
258 ,@(if (string-prefix? "armhf" (or (%current-system)
259 (%current-target-system)))
260 `((string-append m "-Xnocompact "))
261 `((string-append m "-Xnocompact -Xnoinlining ")))))
262
263 ;; Disable tests because we are bootstrapping and thus don't have
264 ;; any of the dependencies required to build and run the tests.
265 (substitute* "build.xml"
266 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
267 (invoke "bash" "bootstrap.sh"
268 (string-append "-Ddist.dir="
269 (assoc-ref %outputs "out")))))
270 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
271 (lambda* (#:key outputs #:allow-other-keys)
272 (define (repack-archive jar)
273 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
274 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
275 (with-directory-excursion dir
276 (invoke "unzip" jar))
277 (delete-file jar)
278 ;; XXX: copied from (gnu build install)
279 (for-each (lambda (file)
280 (let ((s (lstat file)))
281 (unless (eq? (stat:type s) 'symlink)
282 (utime file 0 0 0 0))))
283 (find-files dir #:directories? #t))
284 ;; It is important that the manifest appears first.
285 (with-directory-excursion dir
286 (let* ((files (find-files "." ".*" #:directories? #t))
287 ;; To ensure that the reference scanner can
288 ;; detect all store references in the jars
289 ;; we disable compression with the "-0" option.
290 (command (if (file-exists? manifest)
291 `("zip" "-0" "-X" ,jar ,manifest
292 ,@files)
293 `("zip" "-0" "-X" ,jar ,@files))))
294 (apply invoke command)))))
295 (for-each repack-archive
296 (find-files
297 (string-append (assoc-ref %outputs "out") "/lib")
298 "\\.jar$"))
299 #t))
300 (delete 'install))))
301 (native-inputs
302 `(("jikes" ,jikes)
303 ("jamvm" ,jamvm-1-bootstrap)
304 ("unzip" ,unzip)
305 ("zip" ,zip)))
306 (home-page "http://ant.apache.org")
307 (synopsis "Build tool for Java")
308 (description
309 "Ant is a platform-independent build tool for Java. It is similar to
310make but is implemented using the Java language, requires the Java platform,
311and is best suited to building Java projects. Ant uses XML to describe the
312build process and its dependencies, whereas Make uses Makefile format.")
313 (license license:asl2.0)))
314
315;; Version 3.2.2 is the last version without a dependency on a full-fledged
316;; compiler for Java 1.5.
317(define ecj-bootstrap
318 (package
319 (name "ecj-bootstrap")
320 (version "3.2.2")
321 (source (origin
322 (method url-fetch)
323 (uri (string-append "http://archive.eclipse.org/eclipse/"
324 "downloads/drops/R-" version
325 "-200702121330/ecjsrc.zip"))
326 (sha256
327 (base32
328 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
329 ;; It would be so much easier if we could use the ant-build-system, but we
330 ;; cannot as we don't have ant at this point. We use ecj for
331 ;; bootstrapping the JDK.
332 (build-system gnu-build-system)
333 (arguments
334 `(#:modules ((guix build gnu-build-system)
335 (guix build utils)
336 (srfi srfi-1))
337 #:tests? #f ; there are no tests
338 #:phases
339 (modify-phases %standard-phases
340 (replace 'configure
341 (lambda* (#:key inputs #:allow-other-keys)
342 (setenv "CLASSPATH"
343 (string-join
344 (cons (string-append (assoc-ref inputs "jamvm")
345 "/lib/rt.jar")
346 (find-files (string-append
347 (assoc-ref inputs "ant-bootstrap")
348 "/lib")
349 "\\.jar$"))
350 ":"))
351 #t))
352 (replace 'build
353 (lambda* (#:key inputs #:allow-other-keys)
354 ;; The unpack phase enters the "org" directory by mistake.
355 (chdir "..")
356
357 ;; Create a simple manifest to make ecj executable.
358 (with-output-to-file "manifest"
359 (lambda _
360 (display "Manifest-Version: 1.0
361Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
362
363 ;; Compile it all!
364 (and (apply invoke "jikes"
365 (find-files "." "\\.java$"))
366 (invoke "fastjar" "cvfm"
367 "ecj-bootstrap.jar" "manifest" "."))))
368 (replace 'install
369 (lambda* (#:key outputs #:allow-other-keys)
370 (let ((share (string-append (assoc-ref outputs "out")
371 "/share/java/")))
372 (mkdir-p share)
373 (install-file "ecj-bootstrap.jar" share)
374 #t))))))
375 (native-inputs
376 `(("ant-bootstrap" ,ant-bootstrap)
377 ("unzip" ,unzip)
378 ("jikes" ,jikes)
379 ("jamvm" ,jamvm-1-bootstrap)
380 ("fastjar" ,fastjar)))
381 (home-page "https://eclipse.org")
382 (synopsis "Eclipse Java development tools core batch compiler")
383 (description "This package provides the Eclipse Java core batch compiler
384for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
385requirement for all GNU Classpath releases after version 0.93.")
386 (license license:epl1.0)))
387
388(define ecj-javac-wrapper
389 (package (inherit ecj-bootstrap)
390 (name "ecj-javac-wrapper")
391 (source #f)
392 (build-system trivial-build-system)
393 (arguments
394 `(#:modules ((guix build utils))
395 #:builder
396 (begin
397 (use-modules (guix build utils))
398 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
399 (target (string-append bin "/javac"))
400 (guile (string-append (assoc-ref %build-inputs "guile")
401 "/bin/guile"))
402 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
403 "/share/java/ecj-bootstrap.jar"))
404 (java (string-append (assoc-ref %build-inputs "jamvm")
405 "/bin/jamvm"))
406 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
407 "/share/classpath")))
408 (string-append jvmlib "/glibj.zip:"
409 jvmlib "/tools.zip"))))
410 (mkdir-p bin)
411 (with-output-to-file target
412 (lambda _
413 (format #t "#!~a --no-auto-compile\n!#\n" guile)
414 (write
415 `(begin (use-modules (ice-9 match)
416 (ice-9 receive)
417 (ice-9 hash-table)
418 (srfi srfi-1)
419 (srfi srfi-26))
420 (define defaults
421 '(("-bootclasspath" ,bootcp)
422 ("-source" "1.5")
423 ("-target" "1.5")
424 ("-cp" ".")))
425 (define (main args)
426 (let ((classpath (getenv "CLASSPATH")))
427 (setenv "CLASSPATH"
428 (string-join (list ,ecj
429 ,(string-append (assoc-ref %build-inputs "jamvm")
430 "/lib/rt.jar")
431 (or classpath ""))
432 ":")))
433 (receive (vm-args other-args)
434 ;; Separate VM arguments from arguments to ECJ.
435 (partition (cut string-prefix? "-J" <>)
436 (fold (lambda (default acc)
437 (if (member (first default) acc)
438 acc (append default acc)))
439 args defaults))
440 (apply system* ,java
441 (append
442 ;; Remove "-J" prefix
443 (map (cut string-drop <> 2) vm-args)
444 '("org.eclipse.jdt.internal.compiler.batch.Main")
445 (cons "-nowarn" other-args)))))
446 ;; Entry point
447 (let ((args (cdr (command-line))))
448 (if (null? args)
449 (format (current-error-port) "javac: no arguments given!\n")
450 (main args)))))))
451 (chmod target #o755)
452 #t))))
453 (native-inputs
454 `(("guile" ,guile-2.2)
455 ("ecj-bootstrap" ,ecj-bootstrap)
456 ("jamvm" ,jamvm-1-bootstrap)
457 ("classpath" ,classpath-bootstrap)))
458 (description "This package provides a wrapper around the @dfn{Eclipse
459compiler for Java} (ecj) with a command line interface that is compatible with
460the standard javac executable.")))
461
462;; The classpath-bootstrap was built without a virtual machine, so it does not
463;; provide a wrapper for javah. We cannot build the development version of
464;; Classpath without javah.
465(define classpath-0.99
466 (package (inherit classpath-bootstrap)
467 (version "0.99")
468 (source (origin
469 (method url-fetch)
470 (uri (string-append "mirror://gnu/classpath/classpath-"
471 version ".tar.gz"))
472 (sha256
473 (base32
474 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
475 (patches (search-patches "classpath-aarch64-support.patch"))))
476 (arguments
477 `(#:configure-flags
478 (list (string-append "--with-ecj-jar="
479 (assoc-ref %build-inputs "ecj-bootstrap")
480 "/share/java/ecj-bootstrap.jar")
481 (string-append "JAVAC="
482 (assoc-ref %build-inputs "ecj-javac-wrapper")
483 "/bin/javac")
484 (string-append "JAVA="
485 (assoc-ref %build-inputs "jamvm")
486 "/bin/jamvm")
487 "GCJ_JAVAC_TRUE=no"
488 "ac_cv_prog_java_works=yes" ; trust me
489 "--disable-Werror"
490 "--disable-gmp"
491 "--disable-gtk-peer"
492 "--disable-gconf-peer"
493 "--disable-plugin"
494 "--disable-dssi"
495 "--disable-alsa"
496 "--disable-gjdoc")
497 #:phases
498 (modify-phases %standard-phases
499 (add-after 'install 'install-data
500 (lambda _ (invoke "make" "install-data"))))))
501 (native-inputs
502 `(("ecj-bootstrap" ,ecj-bootstrap)
503 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
504 ("fastjar" ,fastjar)
505 ("jamvm" ,jamvm-1-bootstrap)
506 ("classpath" ,classpath-bootstrap)
507 ("libltdl" ,libltdl)
508 ("pkg-config" ,pkg-config)))))
509
510;; We need this because classpath-bootstrap does not provide all of the tools
511;; we need to build classpath-devel.
512(define classpath-jamvm-wrappers
513 (package (inherit classpath-0.99)
514 (name "classpath-jamvm-wrappers")
515 (source #f)
516 (build-system trivial-build-system)
517 (arguments
518 `(#:modules ((guix build utils))
519 #:builder
520 (begin
521 (use-modules (guix build utils))
522 (let* ((bash (assoc-ref %build-inputs "bash"))
523 (jamvm (assoc-ref %build-inputs "jamvm"))
524 (classpath (assoc-ref %build-inputs "classpath"))
525 (bin (string-append (assoc-ref %outputs "out")
526 "/bin/")))
527 (mkdir-p bin)
528 (for-each (lambda (tool)
529 (with-output-to-file (string-append bin tool)
530 (lambda _
531 ,@(if (string-prefix? "armhf" (or (%current-system)
532 (%current-target-system)))
533 `((format #t "#!~a/bin/sh
534~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
535gnu.classpath.tools.~a.~a $@"
536 bash jamvm classpath tool
537 (if (string=? "native2ascii" tool)
538 "Native2ASCII" "Main")))
539 `((format #t "#!~a/bin/sh
540~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
541gnu.classpath.tools.~a.~a $@"
542 bash jamvm classpath tool
543 (if (string=? "native2ascii" tool)
544 "Native2ASCII" "Main"))))))
545 (chmod (string-append bin tool) #o755))
546 (list "javah"
547 "rmic"
548 "rmid"
549 "orbd"
550 "rmiregistry"
551 "native2ascii"))
552 #t))))
553 (native-inputs
554 `(("bash" ,bash)
555 ("jamvm" ,jamvm-1-bootstrap)
556 ("classpath" ,classpath-0.99)))
557 (inputs '())
558 (synopsis "Executables from GNU Classpath")
559 (description "This package provides wrappers around the tools provided by
560the GNU Classpath library. They are executed by the JamVM virtual
561machine.")))
562
563;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
564;; then Classpath has gained much more support for Java 1.6.
565(define-public classpath-devel
566 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
567 (revision "1"))
568 (package (inherit classpath-bootstrap)
569 (version (string-append "0.99-" revision "." (string-take commit 9)))
570 (source (origin
571 (method git-fetch)
572 (uri (git-reference
573 (url "https://git.savannah.gnu.org/git/classpath.git")
574 (commit commit)))
575 (file-name (string-append "classpath-" version "-checkout"))
576 (sha256
577 (base32
578 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
579 (arguments
580 `(#:make-flags
581 ;; Ensure that the initial heap size is smaller than the maximum
582 ;; size. By default only Xmx is set, which can lead to invalid
583 ;; memory settings on some machines with a lot of memory.
584 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
585 #:configure-flags
586 (list (string-append "--with-ecj-jar="
587 (assoc-ref %build-inputs "ecj-bootstrap")
588 "/share/java/ecj-bootstrap.jar")
589 (string-append "--with-javac="
590 (assoc-ref %build-inputs "ecj-javac-wrapper")
591 "/bin/javac")
592 (string-append "JAVA="
593 (assoc-ref %build-inputs "jamvm")
594 "/bin/jamvm")
595 "GCJ_JAVAC_TRUE=no"
596 "ac_cv_prog_java_works=yes" ; trust me
597 "--disable-Werror"
598 "--disable-gmp"
599 "--disable-gtk-peer"
600 "--disable-gconf-peer"
601 "--disable-plugin"
602 "--disable-dssi"
603 "--disable-alsa"
604 "--disable-gjdoc")
605 #:phases
606 (modify-phases %standard-phases
607 ;; XXX The bootstrap phase executes autogen.sh, which fails after
608 ;; complaining about the lack of gettext.
609 (replace 'bootstrap
610 (lambda _ (invoke "autoreconf" "-vif")))
611 (add-after 'unpack 'remove-unsupported-annotations
612 (lambda _
613 (substitute* (find-files "java" "\\.java$")
614 (("@Override") ""))
615 #t))
616 (add-after 'install 'install-data
617 (lambda _ (invoke "make" "install-data"))))))
618 (native-inputs
619 `(("autoconf" ,autoconf)
620 ("automake" ,automake)
621 ("libtool" ,libtool)
622 ("gettext" ,gettext-minimal)
623 ("texinfo" ,texinfo)
624 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
625 ("ecj-bootstrap" ,ecj-bootstrap)
626 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
627 ("fastjar" ,fastjar)
628 ("jamvm" ,jamvm-1-bootstrap)
629 ("libltdl" ,libltdl)
630 ("pkg-config" ,pkg-config))))))
631
632(define jamvm
633 (package (inherit jamvm-1-bootstrap)
634 (version "2.0.0")
635 (source (origin
636 (method url-fetch)
637 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
638 "JamVM%20" version "/jamvm-"
639 version ".tar.gz"))
640 (sha256
641 (base32
642 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
643 (build-system gnu-build-system)
644 (arguments
645 `(#:configure-flags
646 (list (string-append "--with-classpath-install-dir="
647 (assoc-ref %build-inputs "classpath")))))
648 (inputs
649 `(("classpath" ,classpath-devel)
650 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
651 ("zlib" ,zlib)))))
652
653(define ecj-javac-wrapper-final
654 (package (inherit ecj-javac-wrapper)
655 (native-inputs
656 `(("guile" ,guile-2.2)
657 ("ecj-bootstrap" ,ecj-bootstrap)
658 ("jamvm" ,jamvm)
659 ("classpath" ,classpath-devel)))))
660
661;; The bootstrap JDK consisting of jamvm, classpath-devel,
662;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
663;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
664;; which uses Java 6 only.
665(define-public icedtea-6
666 (package
667 (name "icedtea")
668 (version "1.13.13")
669 (source (origin
670 (method url-fetch)
671 (uri (string-append
672 "http://icedtea.wildebeest.org/download/source/icedtea6-"
673 version ".tar.xz"))
674 (sha256
675 (base32
676 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
677 (modules '((guix build utils)))
678 (snippet
679 '(begin
680 (substitute* "Makefile.in"
681 ;; do not leak information about the build host
682 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
683 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
684 #t))))
685 (build-system gnu-build-system)
686 (outputs '("out" ; Java Runtime Environment
687 "jdk" ; Java Development Kit
688 "doc")) ; all documentation
689 (arguments
690 `(;; There are many failing tests and many are known to fail upstream.
691 #:tests? #f
692
693 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
694 ;; gremlin) doesn't support it yet, so skip this phase.
695 #:validate-runpath? #f
696
697 #:modules ((guix build utils)
698 (guix build gnu-build-system)
699 (srfi srfi-19))
700
701 #:configure-flags
702 `("--enable-bootstrap"
703 "--enable-nss"
704 "--without-rhino"
705 "--with-parallel-jobs"
706 "--disable-downloading"
707 "--disable-tests"
708 ,(string-append "--with-ecj="
709 (assoc-ref %build-inputs "ecj")
710 "/share/java/ecj-bootstrap.jar")
711 ,(string-append "--with-jar="
712 (assoc-ref %build-inputs "fastjar")
713 "/bin/fastjar")
714 ,(string-append "--with-jdk-home="
715 (assoc-ref %build-inputs "classpath"))
716 ,(string-append "--with-java="
717 (assoc-ref %build-inputs "jamvm")
718 "/bin/jamvm"))
719 #:phases
720 (modify-phases %standard-phases
721 (replace 'unpack
722 (lambda* (#:key source inputs #:allow-other-keys)
723 (invoke "tar" "xvf" source)
724 (chdir (string-append "icedtea6-" ,version))
725 (mkdir "openjdk")
726 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
727 ;; The convenient OpenJDK source bundle is no longer
728 ;; available for download, so we have to take the sources
729 ;; from the Mercurial repositories and change the Makefile
730 ;; to avoid tests for the OpenJDK zip archive.
731 (with-directory-excursion "openjdk"
732 (for-each (lambda (part)
733 (mkdir part)
734 (copy-recursively
735 (assoc-ref inputs
736 (string-append part "-src"))
737 part))
738 '("jdk" "corba"
739 "langtools" "jaxp" "jaxws")))
740 (with-directory-excursion "openjdk"
741 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
742 (rename-file "hg-checkout" "hotspot"))
743 (substitute* "Makefile.in"
744 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
745 "echo \"trust me\";")
746 ;; The contents of the bootstrap directory must be
747 ;; writeable but when copying from the store they are
748 ;; not.
749 (("mkdir -p lib/rt" line)
750 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
751 (invoke "chmod" "-R" "u+w" "openjdk")))
752 (add-after 'unpack 'use-classpath
753 (lambda* (#:key inputs #:allow-other-keys)
754 (let ((jvmlib (assoc-ref inputs "classpath"))
755 (jamvm (assoc-ref inputs "jamvm")))
756 ;; Classpath does not provide rt.jar.
757 (substitute* "Makefile.in"
758 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
759 (string-append jvmlib "/share/classpath/glibj.zip")))
760 ;; Make sure we can find all classes.
761 (setenv "CLASSPATH"
762 (string-append jvmlib "/share/classpath/glibj.zip:"
763 jvmlib "/share/classpath/tools.zip:"
764 jamvm "/lib/rt.jar"))
765 (setenv "JAVACFLAGS"
766 (string-append "-cp "
767 jvmlib "/share/classpath/glibj.zip:"
768 jvmlib "/share/classpath/tools.zip")))
769 #t))
770 (add-after 'unpack 'patch-patches
771 (lambda _
772 ;; shebang in patches so that they apply cleanly
773 (substitute* '("patches/jtreg-jrunscript.patch"
774 "patches/hotspot/hs23/drop_unlicensed_test.patch")
775 (("#!/bin/sh") (string-append "#!" (which "sh"))))
776 #t))
777 (add-after 'unpack 'patch-paths
778 (lambda* (#:key inputs #:allow-other-keys)
779 ;; buildtree.make generates shell scripts, so we need to replace
780 ;; the generated shebang
781 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
782 (("/bin/sh") (which "bash")))
783
784 (let ((corebin (string-append
785 (assoc-ref inputs "coreutils") "/bin/"))
786 (binbin (string-append
787 (assoc-ref inputs "binutils") "/bin/"))
788 (grepbin (string-append
789 (assoc-ref inputs "grep") "/bin/")))
790 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
791 "openjdk/corba/make/common/shared/Defs-linux.gmk")
792 (("UNIXCOMMAND_PATH = /bin/")
793 (string-append "UNIXCOMMAND_PATH = " corebin))
794 (("USRBIN_PATH = /usr/bin/")
795 (string-append "USRBIN_PATH = " corebin))
796 (("DEVTOOLS_PATH *= */usr/bin/")
797 (string-append "DEVTOOLS_PATH = " corebin))
798 (("COMPILER_PATH *= */usr/bin/")
799 (string-append "COMPILER_PATH = "
800 (assoc-ref inputs "gcc") "/bin/"))
801 (("DEF_OBJCOPY *=.*objcopy")
802 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
803
804 ;; fix path to alsa header
805 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
806 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
807 (string-append "ALSA_INCLUDE="
808 (assoc-ref inputs "alsa-lib")
809 "/include/alsa/version.h")))
810
811 ;; fix hard-coded utility paths
812 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
813 "openjdk/corba/make/common/shared/Defs-utils.gmk")
814 (("ECHO *=.*echo")
815 (string-append "ECHO = " (which "echo")))
816 (("^GREP *=.*grep")
817 (string-append "GREP = " (which "grep")))
818 (("EGREP *=.*egrep")
819 (string-append "EGREP = " (which "egrep")))
820 (("CPIO *=.*cpio")
821 (string-append "CPIO = " (which "cpio")))
822 (("READELF *=.*readelf")
823 (string-append "READELF = " (which "readelf")))
824 (("^ *AR *=.*ar")
825 (string-append "AR = " (which "ar")))
826 (("^ *TAR *=.*tar")
827 (string-append "TAR = " (which "tar")))
828 (("AS *=.*as")
829 (string-append "AS = " (which "as")))
830 (("LD *=.*ld")
831 (string-append "LD = " (which "ld")))
832 (("STRIP *=.*strip")
833 (string-append "STRIP = " (which "strip")))
834 (("NM *=.*nm")
835 (string-append "NM = " (which "nm")))
836 (("^SH *=.*sh")
837 (string-append "SH = " (which "bash")))
838 (("^FIND *=.*find")
839 (string-append "FIND = " (which "find")))
840 (("LDD *=.*ldd")
841 (string-append "LDD = " (which "ldd")))
842 (("NAWK *=.*(n|g)awk")
843 (string-append "NAWK = " (which "gawk")))
844 (("XARGS *=.*xargs")
845 (string-append "XARGS = " (which "xargs")))
846 (("UNZIP *=.*unzip")
847 (string-append "UNZIP = " (which "unzip")))
848 (("ZIPEXE *=.*zip")
849 (string-append "ZIPEXE = " (which "zip")))
850 (("SED *=.*sed")
851 (string-append "SED = " (which "sed"))))
852
853 ;; Some of these timestamps cause problems as they are more than
854 ;; 10 years ago, failing the build process.
855 (substitute*
856 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
857 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
858 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
859 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
860 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
861 #t)))
862 (add-before 'configure 'set-additional-paths
863 (lambda* (#:key inputs #:allow-other-keys)
864 (setenv "CPATH"
865 (string-append (assoc-ref inputs "libxrender")
866 "/include/X11/extensions" ":"
867 (assoc-ref inputs "libxtst")
868 "/include/X11/extensions" ":"
869 (assoc-ref inputs "libxinerama")
870 "/include/X11/extensions" ":"
871 (or (getenv "CPATH") "")))
872 (setenv "ALT_CUPS_HEADERS_PATH"
873 (string-append (assoc-ref inputs "cups")
874 "/include"))
875 (setenv "ALT_FREETYPE_HEADERS_PATH"
876 (string-append (assoc-ref inputs "freetype")
877 "/include"))
878 (setenv "ALT_FREETYPE_LIB_PATH"
879 (string-append (assoc-ref inputs "freetype")
880 "/lib"))
881 #t))
882 (replace 'install
883 (lambda* (#:key outputs #:allow-other-keys)
884 (let ((doc (string-append (assoc-ref outputs "doc")
885 "/share/doc/icedtea"))
886 (jre (assoc-ref outputs "out"))
887 (jdk (assoc-ref outputs "jdk")))
888 (copy-recursively "openjdk.build/docs" doc)
889 (copy-recursively "openjdk.build/j2re-image" jre)
890 (copy-recursively "openjdk.build/j2sdk-image" jdk))
891 #t)))))
892 (native-inputs
893 `(("ant" ,ant-bootstrap)
894 ("alsa-lib" ,alsa-lib)
895 ("attr" ,attr)
896 ("classpath" ,classpath-devel)
897 ("coreutils" ,coreutils)
898 ("cpio" ,cpio)
899 ("cups" ,cups)
900 ("ecj" ,ecj-bootstrap)
901 ("ecj-javac" ,ecj-javac-wrapper-final)
902 ("fastjar" ,fastjar)
903 ("fontconfig" ,fontconfig)
904 ("freetype" ,freetype)
905 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
906 ("gtk" ,gtk+-2)
907 ("gawk" ,gawk)
908 ("giflib" ,giflib)
909 ("grep" ,grep)
910 ("jamvm" ,jamvm)
911 ("lcms" ,lcms)
912 ("libjpeg" ,libjpeg)
913 ("libnsl" ,libnsl)
914 ("libpng" ,libpng)
915 ("libtool" ,libtool)
916 ("libx11" ,libx11)
917 ("libxcomposite" ,libxcomposite)
918 ("libxi" ,libxi)
919 ("libxinerama" ,libxinerama)
920 ("libxrender" ,libxrender)
921 ("libxslt" ,libxslt) ;for xsltproc
922 ("libxt" ,libxt)
923 ("libxtst" ,libxtst)
924 ("mit-krb5" ,mit-krb5)
925 ("nss" ,nss)
926 ("nss-certs" ,nss-certs)
927 ("perl" ,perl)
928 ("pkg-config" ,pkg-config)
929 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
930 ("unzip" ,unzip)
931 ("wget" ,wget)
932 ("which" ,which)
933 ("zip" ,zip)
934 ("zlib" ,zlib)
935 ("openjdk-src"
936 ,(origin
937 (method hg-fetch)
938 (uri (hg-reference
939 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
940 (changeset "jdk6-b41")))
941 (sha256
942 (base32
943 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
944 ("jdk-src"
945 ,(origin
946 (method hg-fetch)
947 (uri (hg-reference
948 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
949 (changeset "jdk6-b41")))
950 (sha256
951 (base32
952 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
953 ("hotspot-src"
954 ,(origin
955 (method hg-fetch)
956 (uri (hg-reference
957 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
958 (changeset "jdk6-b41")))
959 (sha256
960 (base32
961 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
962 (patches
963 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
964 ("corba-src"
965 ,(origin
966 (method hg-fetch)
967 (uri (hg-reference
968 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
969 (changeset "jdk6-b41")))
970 (sha256
971 (base32
972 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
973 ("langtools-src"
974 ,(origin
975 (method hg-fetch)
976 (uri (hg-reference
977 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
978 (changeset "jdk6-b41")))
979 (sha256
980 (base32
981 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
982 ("jaxp-src"
983 ,(origin
984 (method hg-fetch)
985 (uri (hg-reference
986 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
987 (changeset "jdk6-b41")))
988 (sha256
989 (base32
990 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
991 ("jaxws-src"
992 ,(origin
993 (method hg-fetch)
994 (uri (hg-reference
995 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
996 (changeset "jdk6-b41")))
997 (sha256
998 (base32
999 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1000 (home-page "http://icedtea.classpath.org")
1001 (synopsis "Java development kit")
1002 (description
1003 "This package provides the OpenJDK built with the IcedTea build harness.
1004This version of the OpenJDK is no longer maintained and is only used for
1005bootstrapping purposes.")
1006 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1007 ;; same license as both GNU Classpath and OpenJDK.
1008 (license license:gpl2+)))
1009
1010(define-public icedtea-7
1011 (let* ((version "2.6.13")
1012 (drop (lambda (name hash)
1013 (origin
1014 (method url-fetch)
1015 (uri (string-append
1016 "http://icedtea.classpath.org/download/drops"
1017 "/icedtea7/" version "/" name ".tar.bz2"))
1018 (sha256 (base32 hash))))))
1019 (package
1020 (name "icedtea")
1021 (version version)
1022 (source (origin
1023 (method url-fetch)
1024 (uri (string-append
1025 "http://icedtea.wildebeest.org/download/source/icedtea-"
1026 version ".tar.xz"))
1027 (sha256
1028 (base32
1029 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1030 (modules '((guix build utils)))
1031 (snippet
1032 '(begin
1033 (substitute* "Makefile.in"
1034 ;; do not leak information about the build host
1035 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1036 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1037 #t))))
1038 (build-system gnu-build-system)
1039 (outputs '("out" ; Java Runtime Environment
1040 "jdk" ; Java Development Kit
1041 "doc")) ; all documentation
1042 (arguments
1043 `(;; There are many test failures. Some are known to
1044 ;; fail upstream, others relate to not having an X
1045 ;; server running at test time, yet others are a
1046 ;; complete mystery to me.
1047
1048 ;; hotspot: passed: 241; failed: 45; error: 2
1049 ;; langtools: passed: 1,934; failed: 26
1050 ;; jdk: unknown
1051 #:tests? #f
1052
1053 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1054 ;; gremlin) doesn't support it yet, so skip this phase.
1055 #:validate-runpath? #f
1056
1057 ;; Apparently, the C locale is needed for some of the tests.
1058 #:locale "C"
1059
1060 #:modules ((guix build utils)
1061 (guix build gnu-build-system)
1062 (ice-9 match)
1063 (ice-9 popen)
1064 (srfi srfi-19)
1065 (srfi srfi-26))
1066
1067 #:configure-flags
1068 ;; TODO: package pcsc and sctp, and add to inputs
1069 `("--disable-system-pcsc"
1070 "--disable-system-sctp"
1071 "--enable-bootstrap"
1072 "--enable-nss"
1073 "--without-rhino"
1074 "--disable-downloading"
1075 "--disable-tests" ;they are run in the check phase instead
1076 "--with-openjdk-src-dir=./openjdk.src"
1077 ,(string-append "--with-jdk-home="
1078 (assoc-ref %build-inputs "jdk")))
1079
1080 #:phases
1081 (modify-phases %standard-phases
1082 (replace 'unpack
1083 (lambda* (#:key source inputs #:allow-other-keys)
1084 (let ((target (string-append "icedtea-" ,version))
1085 (unpack (lambda* (name #:optional dir)
1086 (let ((dir (or dir
1087 (string-drop-right name 5))))
1088 (mkdir dir)
1089 (invoke "tar" "xvf"
1090 (assoc-ref inputs name)
1091 "-C" dir
1092 "--strip-components=1")))))
1093 (mkdir target)
1094 (invoke "tar" "xvf" source
1095 "-C" target "--strip-components=1")
1096 (chdir target)
1097 (unpack "openjdk-src" "openjdk.src")
1098 (with-directory-excursion "openjdk.src"
1099 (for-each unpack
1100 (filter (cut string-suffix? "-drop" <>)
1101 (map (match-lambda
1102 ((name . _) name))
1103 inputs))))
1104 #t)))
1105 (add-after 'unpack 'fix-x11-extension-include-path
1106 (lambda* (#:key inputs #:allow-other-keys)
1107 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1108 (((string-append "\\$\\(firstword \\$\\(wildcard "
1109 "\\$\\(OPENWIN_HOME\\)"
1110 "/include/X11/extensions\\).*$"))
1111 (string-append (assoc-ref inputs "libxrender")
1112 "/include/X11/extensions"
1113 " -I" (assoc-ref inputs "libxtst")
1114 "/include/X11/extensions"
1115 " -I" (assoc-ref inputs "libxinerama")
1116 "/include/X11/extensions"))
1117 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1118 #t))
1119 (add-after 'unpack 'patch-paths
1120 (lambda _
1121 ;; buildtree.make generates shell scripts, so we need to replace
1122 ;; the generated shebang
1123 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1124 (("/bin/sh") (which "bash")))
1125
1126 (let ((corebin (string-append
1127 (assoc-ref %build-inputs "coreutils") "/bin/"))
1128 (binbin (string-append
1129 (assoc-ref %build-inputs "binutils") "/bin/"))
1130 (grepbin (string-append
1131 (assoc-ref %build-inputs "grep") "/bin/")))
1132 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1133 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1134 (("UNIXCOMMAND_PATH = /bin/")
1135 (string-append "UNIXCOMMAND_PATH = " corebin))
1136 (("USRBIN_PATH = /usr/bin/")
1137 (string-append "USRBIN_PATH = " corebin))
1138 (("DEVTOOLS_PATH *= */usr/bin/")
1139 (string-append "DEVTOOLS_PATH = " corebin))
1140 (("COMPILER_PATH *= */usr/bin/")
1141 (string-append "COMPILER_PATH = "
1142 (assoc-ref %build-inputs "gcc") "/bin/"))
1143 (("DEF_OBJCOPY *=.*objcopy")
1144 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1145
1146 ;; fix path to alsa header
1147 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1148 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1149 (string-append "ALSA_INCLUDE="
1150 (assoc-ref %build-inputs "alsa-lib")
1151 "/include/alsa/version.h")))
1152
1153 ;; fix hard-coded utility paths
1154 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1155 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1156 (("ECHO *=.*echo")
1157 (string-append "ECHO = " (which "echo")))
1158 (("^GREP *=.*grep")
1159 (string-append "GREP = " (which "grep")))
1160 (("EGREP *=.*egrep")
1161 (string-append "EGREP = " (which "egrep")))
1162 (("CPIO *=.*cpio")
1163 (string-append "CPIO = " (which "cpio")))
1164 (("READELF *=.*readelf")
1165 (string-append "READELF = " (which "readelf")))
1166 (("^ *AR *=.*ar")
1167 (string-append "AR = " (which "ar")))
1168 (("^ *TAR *=.*tar")
1169 (string-append "TAR = " (which "tar")))
1170 (("AS *=.*as")
1171 (string-append "AS = " (which "as")))
1172 (("LD *=.*ld")
1173 (string-append "LD = " (which "ld")))
1174 (("STRIP *=.*strip")
1175 (string-append "STRIP = " (which "strip")))
1176 (("NM *=.*nm")
1177 (string-append "NM = " (which "nm")))
1178 (("^SH *=.*sh")
1179 (string-append "SH = " (which "bash")))
1180 (("^FIND *=.*find")
1181 (string-append "FIND = " (which "find")))
1182 (("LDD *=.*ldd")
1183 (string-append "LDD = " (which "ldd")))
1184 (("NAWK *=.*(n|g)awk")
1185 (string-append "NAWK = " (which "gawk")))
1186 (("XARGS *=.*xargs")
1187 (string-append "XARGS = " (which "xargs")))
1188 (("UNZIP *=.*unzip")
1189 (string-append "UNZIP = " (which "unzip")))
1190 (("ZIPEXE *=.*zip")
1191 (string-append "ZIPEXE = " (which "zip")))
1192 (("SED *=.*sed")
1193 (string-append "SED = " (which "sed"))))
1194
1195 ;; Some of these timestamps cause problems as they are more than
1196 ;; 10 years ago, failing the build process.
1197 (substitute*
1198 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1199 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1200 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1201 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1202 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1203 #t))
1204 (add-before 'configure 'set-additional-paths
1205 (lambda* (#:key inputs #:allow-other-keys)
1206 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1207 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1208 (string-append "ALSA_INCLUDE="
1209 (assoc-ref inputs "alsa-lib")
1210 "/include/alsa/version.h")))
1211 (setenv "CC" "gcc")
1212 (setenv "CPATH"
1213 (string-append (assoc-ref inputs "libxcomposite")
1214 "/include/X11/extensions" ":"
1215 (assoc-ref inputs "libxrender")
1216 "/include/X11/extensions" ":"
1217 (assoc-ref inputs "libxtst")
1218 "/include/X11/extensions" ":"
1219 (assoc-ref inputs "libxinerama")
1220 "/include/X11/extensions" ":"
1221 (or (getenv "CPATH") "")))
1222 (setenv "ALT_OBJCOPY" (which "objcopy"))
1223 (setenv "ALT_CUPS_HEADERS_PATH"
1224 (string-append (assoc-ref inputs "cups")
1225 "/include"))
1226 (setenv "ALT_FREETYPE_HEADERS_PATH"
1227 (string-append (assoc-ref inputs "freetype")
1228 "/include"))
1229 (setenv "ALT_FREETYPE_LIB_PATH"
1230 (string-append (assoc-ref inputs "freetype")
1231 "/lib"))
1232 #t))
1233 (add-before 'check 'fix-test-framework
1234 (lambda _
1235 ;; Fix PATH in test environment
1236 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1237 (("PATH=/bin:/usr/bin")
1238 (string-append "PATH=" (getenv "PATH"))))
1239 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1240 (("/usr/bin/env") (which "env")))
1241 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1242 (("/bin/rm") (which "rm"))
1243 (("/bin/cp") (which "cp"))
1244 (("/bin/mv") (which "mv")))
1245 #t))
1246 (add-before 'check 'fix-hotspot-tests
1247 (lambda _
1248 (with-directory-excursion "openjdk.src/hotspot/test/"
1249 (substitute* "jprt.config"
1250 (("PATH=\"\\$\\{path4sdk\\}\"")
1251 (string-append "PATH=" (getenv "PATH")))
1252 (("make=/usr/bin/make")
1253 (string-append "make=" (which "make"))))
1254 (substitute* '("runtime/6626217/Test6626217.sh"
1255 "runtime/7110720/Test7110720.sh")
1256 (("/bin/rm") (which "rm"))
1257 (("/bin/cp") (which "cp"))
1258 (("/bin/mv") (which "mv"))))
1259 #t))
1260 (add-before 'check 'fix-jdk-tests
1261 (lambda _
1262 (with-directory-excursion "openjdk.src/jdk/test/"
1263 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1264 (("/bin/pwd") (which "pwd")))
1265 (substitute* "com/sun/jdi/ShellScaffold.sh"
1266 (("/bin/kill") (which "kill")))
1267 (substitute* "start-Xvfb.sh"
1268 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1269 (("/usr/bin/nohup") (which "nohup")))
1270 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1271 (("/bin/rm") (which "rm")))
1272 (substitute* "tools/launcher/MultipleJRE.sh"
1273 (("echo \"#!/bin/sh\"")
1274 (string-append "echo \"#!" (which "rm") "\""))
1275 (("/usr/bin/zip") (which "zip")))
1276 (substitute* "com/sun/jdi/OnThrowTest.java"
1277 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1278 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1279 (("/usr/bin/uptime") (which "uptime")))
1280 (substitute* "java/lang/ProcessBuilder/Basic.java"
1281 (("/usr/bin/env") (which "env"))
1282 (("/bin/false") (which "false"))
1283 (("/bin/true") (which "true"))
1284 (("/bin/cp") (which "cp"))
1285 (("/bin/sh") (which "sh")))
1286 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1287 (("/bin/sh") (which "sh")))
1288 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1289 (("/usr/bin/perl") (which "perl"))
1290 (("/bin/ps") (which "ps"))
1291 (("/bin/true") (which "true")))
1292 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1293 (("/usr/bin/tee") (which "tee")))
1294 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1295 (("/bin/true") (which "true")))
1296 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1297 (("/bin/cat") (which "cat")))
1298 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1299 (("/bin/sh") (which "sh"))
1300 (("/bin/true") (which "true"))
1301 (("/bin/kill") (which "kill")))
1302 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1303 (("/usr/bin/echo") (which "echo")))
1304 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1305 (("/usr/bin/cat") (which "cat")))
1306 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1307 (("/bin/cat") (which "cat"))
1308 (("/bin/sleep") (which "sleep"))
1309 (("/bin/sh") (which "sh")))
1310 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1311 (("/bin/cat") (which "cat")))
1312 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1313 (("/bin/chmod") (which "chmod")))
1314 (substitute* "java/util/zip/ZipFile/Assortment.java"
1315 (("/bin/sh") (which "sh"))))
1316 #t))
1317 (replace 'check
1318 (lambda _
1319 ;; The "make check-*" targets always return zero, so we need to
1320 ;; check for errors in the associated log files to determine
1321 ;; whether any tests have failed.
1322 (use-modules (ice-9 rdelim))
1323 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1324 (checker (lambda (port)
1325 (let loop ()
1326 (let ((line (read-line port)))
1327 (cond
1328 ((eof-object? line) #t)
1329 ((regexp-exec error-pattern line)
1330 (error "test failed"))
1331 (else (loop)))))))
1332 (run-test (lambda (test)
1333 (invoke "make" test)
1334 (call-with-input-file
1335 (string-append "test/" test ".log")
1336 checker))))
1337 (when #f ; skip tests
1338 (run-test "check-hotspot")
1339 (run-test "check-langtools")
1340 (run-test "check-jdk"))
1341 #t)))
1342 (replace 'install
1343 (lambda* (#:key outputs #:allow-other-keys)
1344 (let ((doc (string-append (assoc-ref outputs "doc")
1345 "/share/doc/icedtea"))
1346 (jre (assoc-ref outputs "out"))
1347 (jdk (assoc-ref outputs "jdk")))
1348 (copy-recursively "openjdk.build/docs" doc)
1349 (copy-recursively "openjdk.build/j2re-image" jre)
1350 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1351 #t))
1352 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1353 ;; But that shared object is located in the server/ folder, so it
1354 ;; cannot be found. This phase creates a symbolic link in the
1355 ;; lib/amd64 folder so that the other libraries can find it.
1356 ;;
1357 ;; See:
1358 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1359 ;;
1360 ;; FIXME: Find the bug in the build system, so that this symlink is
1361 ;; not needed.
1362 (add-after 'install 'install-libjvm
1363 (lambda* (#:key inputs outputs #:allow-other-keys)
1364 (let* ((lib-path (string-append (assoc-ref outputs "out")
1365 "/lib/amd64")))
1366 (symlink (string-append lib-path "/server/libjvm.so")
1367 (string-append lib-path "/libjvm.so")))
1368 #t))
1369 ;; By default IcedTea only generates an empty keystore. In order to
1370 ;; be able to use certificates in Java programs we need to generate a
1371 ;; keystore from a set of certificates. For convenience we use the
1372 ;; certificates from the nss-certs package.
1373 (add-after 'install 'install-keystore
1374 (lambda* (#:key inputs outputs #:allow-other-keys)
1375 (let* ((keystore "cacerts")
1376 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1377 "/etc/ssl/certs"))
1378 (keytool (string-append (assoc-ref outputs "jdk")
1379 "/bin/keytool")))
1380 (define (extract-cert file target)
1381 (call-with-input-file file
1382 (lambda (in)
1383 (call-with-output-file target
1384 (lambda (out)
1385 (let loop ((line (read-line in 'concat))
1386 (copying? #f))
1387 (cond
1388 ((eof-object? line) #t)
1389 ((string-prefix? "-----BEGIN" line)
1390 (display line out)
1391 (loop (read-line in 'concat) #t))
1392 ((string-prefix? "-----END" line)
1393 (display line out)
1394 #t)
1395 (else
1396 (when copying? (display line out))
1397 (loop (read-line in 'concat) copying?)))))))))
1398 (define (import-cert cert)
1399 (format #t "Importing certificate ~a\n" (basename cert))
1400 (let ((temp "tmpcert"))
1401 (extract-cert cert temp)
1402 (let ((port (open-pipe* OPEN_WRITE keytool
1403 "-import"
1404 "-alias" (basename cert)
1405 "-keystore" keystore
1406 "-storepass" "changeit"
1407 "-file" temp)))
1408 (display "yes\n" port)
1409 (when (not (zero? (status:exit-val (close-pipe port))))
1410 (format #t "failed to import ~a\n" cert)))
1411 (delete-file temp)))
1412
1413 ;; This is necessary because the certificate directory contains
1414 ;; files with non-ASCII characters in their names.
1415 (setlocale LC_ALL "en_US.utf8")
1416 (setenv "LC_ALL" "en_US.utf8")
1417
1418 (for-each import-cert (find-files certs-dir "\\.pem$"))
1419 (mkdir-p (string-append (assoc-ref outputs "out")
1420 "/lib/security"))
1421 (mkdir-p (string-append (assoc-ref outputs "jdk")
1422 "/jre/lib/security"))
1423
1424 ;; The cacerts files we are going to overwrite are chmod'ed as
1425 ;; read-only (444) in icedtea-8 (which derives from this
1426 ;; package). We have to change this so we can overwrite them.
1427 (chmod (string-append (assoc-ref outputs "out")
1428 "/lib/security/" keystore) #o644)
1429 (chmod (string-append (assoc-ref outputs "jdk")
1430 "/jre/lib/security/" keystore) #o644)
1431
1432 (install-file keystore
1433 (string-append (assoc-ref outputs "out")
1434 "/lib/security"))
1435 (install-file keystore
1436 (string-append (assoc-ref outputs "jdk")
1437 "/jre/lib/security"))
1438 #t))))))
1439 (native-inputs
1440 `(("openjdk-src"
1441 ,(drop "openjdk"
1442 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1443 ("corba-drop"
1444 ,(drop "corba"
1445 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1446 ("jaxp-drop"
1447 ,(drop "jaxp"
1448 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1449 ("jaxws-drop"
1450 ,(drop "jaxws"
1451 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1452 ("jdk-drop"
1453 ,(drop "jdk"
1454 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1455 ("langtools-drop"
1456 ,(drop "langtools"
1457 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1458 ("hotspot-drop"
1459 ,(origin
1460 (method url-fetch)
1461 (uri (string-append
1462 "http://icedtea.classpath.org/downloads/drops"
1463 "/icedtea7/" version "/hotspot.tar.bz2"))
1464 (sha256
1465 (base32
1466 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1467 (patches (search-patches
1468 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1469 ("ant" ,ant-bootstrap)
1470 ("attr" ,attr)
1471 ("coreutils" ,coreutils)
1472 ("diffutils" ,diffutils) ;for tests
1473 ("gawk" ,gawk)
1474 ("grep" ,grep)
1475 ("libtool" ,libtool)
1476 ("pkg-config" ,pkg-config)
1477 ("wget" ,wget)
1478 ("which" ,which)
1479 ("cpio" ,cpio)
1480 ("zip" ,zip)
1481 ("unzip" ,unzip)
1482 ("fastjar" ,fastjar)
1483 ("libxslt" ,libxslt) ;for xsltproc
1484 ("nss-certs" ,nss-certs)
1485 ("perl" ,perl)
1486 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1487 ("jdk" ,icedtea-6 "jdk")))
1488 (inputs
1489 `(("alsa-lib" ,alsa-lib)
1490 ("cups" ,cups)
1491 ("libx11" ,libx11)
1492 ("libxcomposite" ,libxcomposite)
1493 ("libxt" ,libxt)
1494 ("libxtst" ,libxtst)
1495 ("libxi" ,libxi)
1496 ("libxinerama" ,libxinerama)
1497 ("libxrender" ,libxrender)
1498 ("libjpeg" ,libjpeg)
1499 ("libpng" ,libpng)
1500 ("mit-krb5" ,mit-krb5)
1501 ("nss" ,nss)
1502 ("giflib" ,giflib)
1503 ("fontconfig" ,fontconfig)
1504 ("freetype" ,freetype)
1505 ("lcms" ,lcms)
1506 ("zlib" ,zlib)
1507 ("gtk" ,gtk+-2)))
1508 (home-page "http://icedtea.classpath.org")
1509 (synopsis "Java development kit")
1510 (description
1511 "This package provides the Java development kit OpenJDK built with the
1512IcedTea build harness.")
1513 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1514 ;; same license as both GNU Classpath and OpenJDK.
1515 (license license:gpl2+))))
1516
1517(define-public icedtea-8
1518 (let* ((version "3.7.0")
1519 (drop (lambda (name hash)
1520 (origin
1521 (method url-fetch)
1522 (uri (string-append
1523 "http://icedtea.classpath.org/download/drops"
1524 "/icedtea8/" version "/" name ".tar.xz"))
1525 (sha256 (base32 hash))))))
1526 (package (inherit icedtea-7)
1527 (version "3.7.0")
1528 (source (origin
1529 (method url-fetch)
1530 (uri (string-append
1531 "http://icedtea.wildebeest.org/download/source/icedtea-"
1532 version ".tar.xz"))
1533 (sha256
1534 (base32
1535 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1536 (modules '((guix build utils)))
1537 (snippet
1538 '(begin
1539 (substitute* '("configure"
1540 "acinclude.m4")
1541 ;; Do not embed build time
1542 (("(DIST_ID=\"Custom build).*$" _ prefix)
1543 (string-append prefix "\"\n"))
1544 ;; Do not leak information about the build host
1545 (("DIST_NAME=\"\\$build_os\"")
1546 "DIST_NAME=\"guix\""))
1547 #t))))
1548 (arguments
1549 `(#:imported-modules
1550 ((guix build ant-build-system)
1551 (guix build syscalls)
1552 ,@%gnu-build-system-modules)
1553 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1554 ((#:modules modules)
1555 `((guix build utils)
1556 (guix build gnu-build-system)
1557 ((guix build ant-build-system) #:prefix ant:)
1558 (ice-9 match)
1559 (ice-9 popen)
1560 (srfi srfi-19)
1561 (srfi srfi-26)))
1562 ((#:configure-flags flags)
1563 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1564 `( ;;"--disable-bootstrap"
1565 "--enable-bootstrap"
1566 "--enable-nss"
1567 "--disable-downloading"
1568 "--disable-system-pcsc"
1569 "--disable-system-sctp"
1570 "--disable-tests" ;they are run in the check phase instead
1571 "--with-openjdk-src-dir=./openjdk.src"
1572 ,(string-append "--with-jdk-home=" jdk))))
1573 ((#:phases phases)
1574 `(modify-phases ,phases
1575 (delete 'fix-x11-extension-include-path)
1576 (delete 'patch-paths)
1577 (delete 'set-additional-paths)
1578 (delete 'patch-patches)
1579 ;; Prevent the keytool from recording the current time when
1580 ;; adding certificates at build time.
1581 (add-after 'unpack 'patch-keystore
1582 (lambda _
1583 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1584 (("date = new Date\\(\\);")
1585 "\
1586date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1587new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1588new Date();"))
1589 #t))
1590 (add-after 'unpack 'patch-jni-libs
1591 ;; Hardcode dynamically loaded libraries.
1592 (lambda _
1593 (let* ((library-path (search-path-as-string->list
1594 (getenv "LIBRARY_PATH")))
1595 (find-library (lambda (name)
1596 (search-path
1597 library-path
1598 (string-append "lib" name ".so")))))
1599 (for-each
1600 (lambda (file)
1601 (catch 'decoding-error
1602 (lambda ()
1603 (substitute* file
1604 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1605 _ name version)
1606 (format #f "\"~a\"" (find-library name)))
1607 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1608 (format #f "\"~a\"" (find-library name)))))
1609 (lambda _
1610 ;; Those are safe to skip.
1611 (format (current-error-port)
1612 "warning: failed to substitute: ~a~%"
1613 file))))
1614 (find-files "openjdk.src/jdk/src/solaris/native"
1615 "\\.c|\\.h"))
1616 #t)))
1617 (replace 'install
1618 (lambda* (#:key outputs #:allow-other-keys)
1619 (let ((doc (string-append (assoc-ref outputs "doc")
1620 "/share/doc/icedtea"))
1621 (jre (assoc-ref outputs "out"))
1622 (jdk (assoc-ref outputs "jdk")))
1623 (copy-recursively "openjdk.build/docs" doc)
1624 (copy-recursively "openjdk.build/images/j2re-image" jre)
1625 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1626 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1627 ;; support via NSS.
1628 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1629 (string-append jre "/lib/security/nss.cfg"))
1630 #t)))
1631 (add-after 'install 'strip-jar-timestamps
1632 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1633 (native-inputs
1634 `(("jdk" ,icedtea-7 "jdk")
1635 ("openjdk-src"
1636 ,(drop "openjdk"
1637 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1638 ("aarch32-drop"
1639 ,(drop "aarch32"
1640 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1641 ("corba-drop"
1642 ,(drop "corba"
1643 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1644 ("jaxp-drop"
1645 ,(drop "jaxp"
1646 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1647 ("jaxws-drop"
1648 ,(drop "jaxws"
1649 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1650 ("jdk-drop"
1651 ,(drop "jdk"
1652 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1653 ("langtools-drop"
1654 ,(drop "langtools"
1655 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1656 ("hotspot-drop"
1657 ,(origin
1658 (method url-fetch)
1659 (uri (string-append
1660 "http://icedtea.classpath.org/download/drops"
1661 "/icedtea8/" version "/hotspot.tar.xz"))
1662 (sha256
1663 (base32
1664 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1665 (patches (search-patches
1666 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1667 ("nashorn-drop"
1668 ,(drop "nashorn"
1669 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1670 ("shenandoah-drop"
1671 ,(drop "shenandoah"
1672 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1673 ,@(fold alist-delete (package-native-inputs icedtea-7)
1674 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1675 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1676
1677(define-public openjdk9
1678 (package
1679 (name "openjdk")
1680 (version "9.181")
1681 (source (origin
1682 (method url-fetch)
1683 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1684 (file-name (string-append name "-" version ".tar.bz2"))
1685 (sha256
1686 (base32
1687 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1688 (modules '((guix build utils)))
1689 (snippet
1690 `(begin
1691 (for-each delete-file (find-files "." ".*.bin$"))
1692 (for-each delete-file (find-files "." ".*.exe$"))
1693 (for-each delete-file (find-files "." ".*.jar$"))
1694 #t))))
1695 (build-system gnu-build-system)
1696 (outputs '("out" "jdk" "doc"))
1697 (arguments
1698 `(#:tests? #f; require jtreg
1699 #:imported-modules
1700 ((guix build syscalls)
1701 ,@%gnu-build-system-modules)
1702 #:phases
1703 (modify-phases %standard-phases
1704 (add-after 'patch-source-shebangs 'fix-java-shebangs
1705 (lambda _
1706 ;; This file was "fixed" by patch-source-shebangs, but it requires
1707 ;; this exact first line.
1708 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1709 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1710 #t))
1711 (replace 'configure
1712 (lambda* (#:key inputs outputs #:allow-other-keys)
1713 ;; TODO: unbundle libpng and lcms
1714 (invoke "bash" "./configure"
1715 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1716 "--disable-freetype-bundling"
1717 "--disable-warnings-as-errors"
1718 "--disable-hotspot-gtest"
1719 "--with-giflib=system"
1720 "--with-libjpeg=system"
1721 (string-append "--prefix=" (assoc-ref outputs "out")))
1722 #t))
1723 (replace 'build
1724 (lambda _
1725 (with-output-to-file ".src-rev"
1726 (lambda _
1727 (display ,version)))
1728 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1729 (invoke "make" "all")
1730 #t))
1731 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1732 ;; But that shared object is located in the server/ folder, so it
1733 ;; cannot be found. This phase creates a symbolic link in the
1734 ;; lib/ folder so that the other libraries can find it.
1735 ;;
1736 ;; See:
1737 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1738 ;;
1739 ;; FIXME: Find the bug in the build system, so that this symlink is
1740 ;; not needed.
1741 (add-after 'install 'install-libjvm
1742 (lambda* (#:key inputs outputs #:allow-other-keys)
1743 (let* ((lib-out (string-append (assoc-ref outputs "out")
1744 "/lib"))
1745 (lib-jdk (string-append (assoc-ref outputs "jdk")
1746 "/lib")))
1747 (symlink (string-append lib-jdk "/server/libjvm.so")
1748 (string-append lib-jdk "/libjvm.so"))
1749 (symlink (string-append lib-out "/server/libjvm.so")
1750 (string-append lib-out "/libjvm.so")))
1751 #t))
1752 (replace 'install
1753 (lambda* (#:key outputs #:allow-other-keys)
1754 (let ((out (assoc-ref outputs "out"))
1755 (jdk (assoc-ref outputs "jdk"))
1756 (doc (assoc-ref outputs "doc"))
1757 (images (car (find-files "build" ".*-server-release"
1758 #:directories? #t))))
1759 (copy-recursively (string-append images "/images/jdk") jdk)
1760 (copy-recursively (string-append images "/images/jre") out)
1761 (copy-recursively (string-append images "/images/docs") doc))
1762 #t))
1763 (add-after 'install 'strip-zip-timestamps
1764 (lambda* (#:key outputs #:allow-other-keys)
1765 (use-modules (guix build syscalls))
1766 (for-each (lambda (zip)
1767 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1768 (with-directory-excursion dir
1769 (invoke "unzip" zip))
1770 (delete-file zip)
1771 (for-each (lambda (file)
1772 (let ((s (lstat file)))
1773 (unless (eq? (stat:type s) 'symlink)
1774 (format #t "reset ~a~%" file)
1775 (utime file 0 0 0 0))))
1776 (find-files dir #:directories? #t))
1777 (with-directory-excursion dir
1778 (let ((files (find-files "." ".*" #:directories? #t)))
1779 (apply invoke "zip" "-0" "-X" zip files)))))
1780 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1781 #t)))))
1782 (inputs
1783 `(("alsa-lib" ,alsa-lib)
1784 ("cups" ,cups)
1785 ("fontconfig" ,fontconfig)
1786 ("freetype" ,freetype)
1787 ("giflib" ,giflib)
1788 ("lcms" ,lcms)
1789 ("libelf" ,libelf)
1790 ("libjpeg" ,libjpeg)
1791 ("libice" ,libice)
1792 ("libpng" ,libpng)
1793 ("libx11" ,libx11)
1794 ("libxcomposite" ,libxcomposite)
1795 ("libxi" ,libxi)
1796 ("libxinerama" ,libxinerama)
1797 ("libxrender" ,libxrender)
1798 ("libxt" ,libxt)
1799 ("libxtst" ,libxtst)))
1800 (native-inputs
1801 `(("icedtea-8" ,icedtea-8)
1802 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1803 ("unzip" ,unzip)
1804 ("which" ,which)
1805 ("zip" ,zip)))
1806 (home-page "https://openjdk.java.net/projects/jdk9/")
1807 (synopsis "Java development kit")
1808 (description
1809 "This package provides the Java development kit OpenJDK.")
1810 (license license:gpl2+)))
1811
1812(define-public openjdk10
1813 (package
1814 (inherit openjdk9)
1815 (name "openjdk")
1816 (version "10.46")
1817 (source (origin
1818 (method url-fetch)
1819 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1820 (file-name (string-append name "-" version ".tar.bz2"))
1821 (sha256
1822 (base32
1823 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1824 (patches (search-patches
1825 "openjdk-10-idlj-reproducibility.patch"))
1826 (modules '((guix build utils)))
1827 (snippet
1828 `(begin
1829 (for-each delete-file (find-files "." ".*.bin$"))
1830 (for-each delete-file (find-files "." ".*.exe$"))
1831 (for-each delete-file (find-files "." ".*.jar$"))
1832 #t))))
1833 (arguments
1834 (substitute-keyword-arguments (package-arguments openjdk9)
1835 ((#:phases phases)
1836 `(modify-phases ,phases
1837 (replace 'fix-java-shebangs
1838 (lambda _
1839 ;; This file was "fixed" by patch-source-shebangs, but it requires
1840 ;; this exact first line.
1841 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1842 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1843 #t))
1844 (replace 'configure
1845 (lambda* (#:key inputs outputs #:allow-other-keys)
1846 (invoke "bash" "./configure"
1847 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1848 "--disable-freetype-bundling"
1849 "--disable-warnings-as-errors"
1850 "--disable-hotspot-gtest"
1851 "--with-giflib=system"
1852 "--with-libjpeg=system"
1853 "--with-native-debug-symbols=zipped"
1854 (string-append "--prefix=" (assoc-ref outputs "out")))
1855 #t))))))
1856 (native-inputs
1857 `(("openjdk9" ,openjdk9)
1858 ("openjdk9:jdk" ,openjdk9 "jdk")
1859 ("unzip" ,unzip)
1860 ("which" ,which)
1861 ("zip" ,zip)))))
1862
1863(define-public openjdk11
1864 (package
1865 (name "openjdk")
1866 (version "11.28")
1867 (source (origin
1868 (method url-fetch)
1869 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1870 (file-name (string-append name "-" version ".tar.bz2"))
1871 (sha256
1872 (base32
1873 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1874 (modules '((guix build utils)))
1875 (snippet
1876 `(begin
1877 (for-each delete-file (find-files "." ".*.bin$"))
1878 (for-each delete-file (find-files "." ".*.exe$"))
1879 (for-each delete-file (find-files "." ".*.jar$"))
1880 #t))))
1881 (build-system gnu-build-system)
1882 (outputs '("out" "jdk" "doc"))
1883 (arguments
1884 `(#:imported-modules
1885 ((guix build syscalls)
1886 (ice-9 binary-ports)
1887 (rnrs bytevectors)
1888 ,@%gnu-build-system-modules)
1889 #:tests? #f; requires jtreg
1890 ;; TODO package jtreg
1891 ;; disable parallel builds, as the openjdk build system does not like -j
1892 #:parallel-build? #f
1893 #:parallel-tests? #f
1894 ;; reenable parallel builds and tests by adding the flags manually
1895 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1896 #:configure-flags
1897 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1898 "--disable-warnings-as-errors"
1899 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1900 "--with-native-debug-symbols=zipped"
1901 ;; do not use the bundled libraries
1902 "--with-giflib=system"
1903 "--with-lcms=system"
1904 "--with-libjpeg=system"
1905 "--with-libpng=system"
1906 ;; allow the build system to locate the system freetype
1907 ,(string-append "--with-freetype-include="
1908 (assoc-ref %build-inputs "freetype") "/include")
1909 ,(string-append "--with-freetype-lib="
1910 (assoc-ref %build-inputs "freetype") "/lib"))
1911 ;; TODO
1912 #:phases
1913 (modify-phases %standard-phases
1914 (add-after 'patch-source-shebangs 'fix-java-shebangs
1915 (lambda _
1916 ;; This file was "fixed" by patch-source-shebangs, but it requires
1917 ;; this exact first line.
1918 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1919 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1920 #t))
1921 (replace 'build
1922 (lambda _
1923 (with-output-to-file ".src-rev"
1924 (lambda _
1925 (display ,version)))
1926 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1927 (invoke "make" "all")
1928 #t))
1929 ;; jdk 11 does not build jre by default any more
1930 ;; building it anyways
1931 ;; for further information see:
1932 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
1933 (add-after 'build 'build-jre
1934 (lambda _
1935 (invoke "make" "legacy-jre-image")
1936 #t))
1937 (replace 'install
1938 (lambda* (#:key outputs #:allow-other-keys)
1939 (let ((out (assoc-ref outputs "out"))
1940 (jdk (assoc-ref outputs "jdk"))
1941 (doc (assoc-ref outputs "doc"))
1942 (images (car (find-files "build" ".*-server-release"
1943 #:directories? #t))))
1944 (copy-recursively (string-append images "/images/jdk") jdk)
1945 (copy-recursively (string-append images "/images/jre") out)
1946 (copy-recursively (string-append images "/images/docs") doc))
1947 #t))
1948 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1949 ;; But that shared object is located in the server/ folder, so it
1950 ;; cannot be found. This phase creates a symbolic link in the
1951 ;; lib/ folder so that the other libraries can find it.
1952 ;;
1953 ;; See:
1954 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1955 ;;
1956 ;; FIXME: Find the bug in the build system, so that this symlink is
1957 ;; not needed.
1958 (add-after 'install 'install-libjvm
1959 (lambda* (#:key inputs outputs #:allow-other-keys)
1960 (let* ((lib-out (string-append (assoc-ref outputs "out")
1961 "/lib"))
1962 (lib-jdk (string-append (assoc-ref outputs "jdk")
1963 "/lib")))
1964 (symlink (string-append lib-jdk "/server/libjvm.so")
1965 (string-append lib-jdk "/libjvm.so"))
1966 (symlink (string-append lib-out "/server/libjvm.so")
1967 (string-append lib-out "/libjvm.so")))
1968 #t))
1969 (add-after 'install 'strip-character-data-timestamps
1970 (lambda* (#:key outputs #:allow-other-keys)
1971 (use-modules (guix build syscalls))
1972 (let ((archive (string-append
1973 (assoc-ref outputs "jdk") "/lib/src.zip"))
1974 (dir (mkdtemp! "zip-contents.XXXXXX")))
1975 (with-directory-excursion dir
1976 (invoke "unzip" archive))
1977 (delete-file archive)
1978 (with-directory-excursion dir
1979 (let ((char-data-files (find-files "." "CharacterData.*")))
1980 (for-each (lambda (file)
1981 (substitute* file
1982 (((string-append "This file was generated "
1983 "AUTOMATICALLY from a template "
1984 "file.*"))
1985 (string-append "This file was generated "
1986 "AUTOMATICALLY from a template "
1987 "file"))))
1988 char-data-files)))
1989 (with-directory-excursion dir
1990 (let ((files (find-files "." ".*" #:directories? #t)))
1991 (apply invoke "zip" "-0" "-X" archive files))))))
1992 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
1993 (lambda* (#:key outputs #:allow-other-keys)
1994 (use-modules (guix build syscalls)
1995 (ice-9 binary-ports)
1996 (rnrs bytevectors))
1997 (letrec ((repack-archive
1998 (lambda (archive)
1999 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2000 (with-directory-excursion dir
2001 (invoke "unzip" archive))
2002 (delete-file archive)
2003 (for-each (compose repack-archive canonicalize-path)
2004 (find-files dir "(ct.sym|.*.jar)$"))
2005 (let ((reset-file-timestamp
2006 (lambda (file)
2007 (let ((s (lstat file)))
2008 (unless (eq? (stat:type s) 'symlink)
2009 (format #t "reset ~a~%" file)
2010 (utime file 0 0 0 0))))))
2011 (for-each reset-file-timestamp
2012 (find-files dir #:directories? #t)))
2013 (with-directory-excursion dir
2014 (let ((files (find-files "." ".*" #:directories? #t)))
2015 (apply invoke "zip" "-0" "-X" archive files)))))))
2016 (for-each repack-archive
2017 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2018 (for-each repack-archive
2019 (find-files (assoc-ref outputs "jdk")
2020 ".*.(zip|jar|diz)$"))
2021 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2022 (let ((repack-jmod
2023 (lambda (file-name)
2024 (call-with-input-file file-name
2025 (lambda (file)
2026 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2027 (if (equal? (get-bytevector-n
2028 file (bytevector-length header))
2029 header)
2030 (let* ((header-length (bytevector-length header))
2031 (temp-file (mkstemp!
2032 (string-copy
2033 "temp-file.XXXXXX")))
2034 (temp-filename (port-filename temp-file))
2035 (content-length
2036 (- (stat:size (stat file))
2037 header-length)))
2038 (sendfile temp-file file content-length header-length)
2039 (delete-file file-name)
2040 (close-port temp-file)
2041 (repack-archive (canonicalize-path temp-filename))
2042 (call-with-output-file file-name
2043 (lambda (file)
2044 (put-bytevector file header)
2045 (call-with-input-file temp-filename
2046 (lambda (temp-file)
2047 (sendfile
2048 file temp-file
2049 (stat:size (stat temp-file)) 0)))))))))))))
2050 (for-each repack-jmod
2051 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2052 #t)))
2053 (add-after 'install 'remove-timestamp-from-api-summary
2054 (lambda* (#:key outputs #:allow-other-keys)
2055 (substitute* (string-append (assoc-ref outputs "doc")
2056 "/api/overview-summary.html")
2057 (("Generated by javadoc \\(11-internal\\).*$")
2058 "Generated by javadoc (11-internal) -->\n"))
2059 #t)))))
2060 (inputs
2061 `(("alsa-lib" ,alsa-lib)
2062 ("cups" ,cups)
2063 ("fontconfig" ,fontconfig)
2064 ("freetype" ,freetype)
2065 ("giflib" ,giflib)
2066 ("lcms" ,lcms)
2067 ("libjpeg" ,libjpeg)
2068 ("libpng" ,libpng)
2069 ("libx11" ,libx11)
2070 ("libxext" ,libxext)
2071 ("libxrender" ,libxrender)
2072 ("libxt" ,libxt)
2073 ("libxtst" ,libxtst)))
2074 (native-inputs
2075 `(("autoconf" ,autoconf)
2076 ("openjdk10" ,openjdk10)
2077 ("openjdk10:jdk" ,openjdk10 "jdk")
2078 ("pkg-config" ,pkg-config)
2079 ("unzip" ,unzip)
2080 ("which" ,which)
2081 ("zip" ,zip)))
2082 (home-page "https://openjdk.java.net/projects/jdk/11/")
2083 (synopsis "Java development kit")
2084 (description
2085 "This package provides the Java development kit OpenJDK.")
2086 (license license:gpl2+)))
2087
2088(define-public icedtea icedtea-8)
2089
2090
2091(define-public ant/java8
2092 (package (inherit ant-bootstrap)
2093 (name "ant")
2094 (version "1.10.1")
2095 (source (origin
2096 (method url-fetch)
2097 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2098 version "-src.tar.gz"))
2099 (sha256
2100 (base32
2101 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2102 (modules '((guix build utils)))
2103 (snippet
2104 '(begin
2105 (for-each delete-file
2106 (find-files "lib/optional" "\\.jar$"))
2107 #t))))
2108 (arguments
2109 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2110 ((#:phases phases)
2111 `(modify-phases ,phases
2112 (add-after 'unpack 'remove-scripts
2113 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2114 ;; wrappers.
2115 (lambda _
2116 (for-each delete-file
2117 (find-files "src/script"
2118 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2119 #t))
2120 (replace 'build
2121 (lambda* (#:key inputs outputs #:allow-other-keys)
2122 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2123
2124 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2125 ;; Ant to build. This is necessary in addition to disabling the
2126 ;; "check" phase, because the dependency on "test-jar" would always
2127 ;; result in the tests to be run.
2128 (substitute* "build.xml"
2129 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2130 (invoke "bash" "bootstrap.sh"
2131 (string-append "-Ddist.dir="
2132 (assoc-ref outputs "out")))))))))
2133 (native-inputs
2134 `(("jdk" ,icedtea-8 "jdk")
2135 ("zip" ,zip)
2136 ("unzip" ,unzip)))))
2137
2138;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2139;; requires Java 8.
2140(define-public ant
2141 (package (inherit ant/java8)
2142 (version "1.9.9")
2143 (source (origin
2144 (method url-fetch)
2145 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2146 version "-src.tar.gz"))
2147 (sha256
2148 (base32
2149 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2150 (native-inputs
2151 `(("jdk" ,icedtea-7 "jdk")
2152 ("zip" ,zip)
2153 ("unzip" ,unzip)))))
2154
2155(define-public ant-apache-bcel
2156 (package
2157 (inherit ant/java8)
2158 (name "ant-apache-bcel")
2159 (arguments
2160 (substitute-keyword-arguments (package-arguments ant/java8)
2161 ((#:phases phases)
2162 `(modify-phases ,phases
2163 (add-after 'unpack 'link-bcel
2164 (lambda* (#:key inputs #:allow-other-keys)
2165 (for-each (lambda (file)
2166 (symlink file
2167 (string-append "lib/optional/"
2168 (basename file))))
2169 (find-files (assoc-ref inputs "java-commons-bcel")
2170 "\\.jar$"))
2171 #t))
2172 (add-after 'build 'install
2173 (lambda* (#:key outputs #:allow-other-keys)
2174 (let* ((out (assoc-ref outputs "out"))
2175 (share (string-append out "/share/java"))
2176 (bin (string-append out "/bin"))
2177 (lib (string-append out "/lib")))
2178 (mkdir-p share)
2179 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2180 (delete-file-recursively bin)
2181 (delete-file-recursively lib)
2182 #t)))))))
2183 (inputs
2184 `(("java-commons-bcel" ,java-commons-bcel)
2185 ,@(package-inputs ant/java8)))))
2186
2187(define-public ant-junit
2188 (package
2189 (inherit ant/java8)
2190 (name "ant-junit")
2191 (arguments
2192 (substitute-keyword-arguments (package-arguments ant/java8)
2193 ((#:phases phases)
2194 `(modify-phases ,phases
2195 (add-after 'unpack 'link-junit
2196 (lambda* (#:key inputs #:allow-other-keys)
2197 (for-each (lambda (file)
2198 (symlink file
2199 (string-append "lib/optional/"
2200 (basename file))))
2201 (find-files (assoc-ref inputs "java-junit")
2202 "\\.jar$"))
2203 #t))
2204 (add-after 'build 'install
2205 (lambda* (#:key outputs #:allow-other-keys)
2206 (let* ((out (assoc-ref outputs "out"))
2207 (share (string-append out "/share/java"))
2208 (bin (string-append out "/bin"))
2209 (lib (string-append out "/lib")))
2210 (mkdir-p share)
2211 (install-file (string-append lib "/ant-junit.jar") share)
2212 (delete-file-recursively bin)
2213 (delete-file-recursively lib)
2214 #t)))))))
2215 (inputs
2216 `(("java-junit" ,java-junit)
2217 ,@(package-inputs ant/java8)))))
2218
2219(define-public javacc-4
2220 (package
2221 (name "javacc")
2222 (version "4.1")
2223 (source (origin
2224 (method git-fetch)
2225 (uri (git-reference
2226 (url "https://github.com/javacc/javacc.git")
2227 (commit "release_41")))
2228 (file-name (string-append "javacc-" version "-checkout"))
2229 (sha256
2230 (base32
2231 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2232 (modules '((guix build utils)))
2233 ;; delete bundled jars
2234 (snippet '(begin (delete-file-recursively "lib") #t))))
2235 (build-system ant-build-system)
2236 ;; Tests fail with
2237 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2238 ;; JAVACODE failed
2239 (arguments
2240 `(#:tests? #f
2241 #:phases
2242 (modify-phases %standard-phases
2243 ;; Delete tests to avoid build failure (we don't run them anyway).
2244 (add-after 'unpack 'delete-tests
2245 (lambda _
2246 (for-each delete-file
2247 '("src/org/javacc/JavaCCTestCase.java"
2248 "src/org/javacc/parser/ExpansionTest.java"
2249 "src/org/javacc/parser/OptionsTest.java"
2250 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2251 (for-each delete-file-recursively
2252 '("src/org/javacc/parser/test"
2253 "src/org/javacc/jjdoc/test"))
2254 #t))
2255 (replace 'install (install-jars "bin/lib")))))
2256 (home-page "https://javacc.org/")
2257 (synopsis "Java parser generator")
2258 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2259generator for use with Java applications. A parser generator is a tool that
2260reads a grammar specification and converts it to a Java program that can
2261recognize matches to the grammar. In addition to the parser generator itself,
2262JavaCC provides other standard capabilities related to parser generation such
2263as tree building (via a tool called JJTree included with JavaCC), actions,
2264debugging, etc.")
2265 (license license:bsd-3)))
2266
2267(define-public javacc
2268 (package
2269 (inherit javacc-4)
2270 (version "7.0.4")
2271 (source
2272 (origin
2273 (method git-fetch)
2274 (uri (git-reference
2275 (url "https://github.com/javacc/javacc.git")
2276 (commit version)))
2277 (file-name (git-file-name "javacc" version))
2278 (sha256
2279 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2280 (modules '((guix build utils)))
2281 ;; Delete bundled jars.
2282 (snippet '(begin (for-each delete-file-recursively
2283 '("bootstrap" "lib"))
2284 #t))))
2285 (arguments
2286 `(#:make-flags ; bootstrap from javacc-4
2287 (list (string-append "-Dbootstrap-jar="
2288 (assoc-ref %build-inputs "javacc")
2289 "/share/java/javacc.jar"))
2290 #:test-target "test"
2291 #:phases
2292 (modify-phases %standard-phases
2293 (replace 'install (install-jars "target")))))
2294 (native-inputs
2295 `(("javacc" ,javacc-4)))))
2296
2297;; This is the last 3.x release of ECJ
2298(define-public java-ecj-3
2299 (package
2300 (name "java-ecj")
2301 (version "3.8.2")
2302 (source (origin
2303 (method url-fetch)
2304 (uri (string-append "http://archive.eclipse.org/eclipse/"
2305 "downloads/drops/R-" version
2306 "-201301310800/ecjsrc-" version ".jar"))
2307 (sha256
2308 (base32
2309 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2310 (build-system ant-build-system)
2311 (arguments
2312 `(#:tests? #f ; none included
2313 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2314 #:make-flags (list "-f" "src/build.xml")
2315 #:build-target "build"
2316 #:phases
2317 (modify-phases %standard-phases
2318 (add-after 'unpack 'fix-manifest
2319 (lambda _
2320 ;; Record the main class to make ecj executable.
2321 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2322 (lambda (in out)
2323 (display "Manifest-Version: 1.0
2324Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2325 out)))
2326 #t))
2327 (replace 'install (install-jars ".")))))
2328 (home-page "https://eclipse.org")
2329 (synopsis "Eclipse Java development tools core batch compiler")
2330 (description "This package provides the Eclipse Java core batch compiler.")
2331 (license license:epl1.0)))
2332
2333;; This is needed for java-cisd-args4j
2334(define-public java-ecj-3.5
2335 (package (inherit java-ecj-3)
2336 (version "3.5.1")
2337 (source (origin
2338 (method url-fetch/zipbomb)
2339 (uri (string-append "http://archive.eclipse.org/eclipse/"
2340 "downloads/drops/R-" version
2341 "-200909170800/ecjsrc-" version ".zip"))
2342 (sha256
2343 (base32
2344 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2345 (build-system ant-build-system)
2346 (arguments
2347 `(#:tests? #f ; none included
2348 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2349 #:build-target "build"
2350 #:phases
2351 (modify-phases %standard-phases
2352 (add-after 'unpack 'fix-manifest
2353 (lambda _
2354 ;; Record the main class to make ecj executable.
2355 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2356 (lambda (in out)
2357 (dump-port in out)
2358 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2359 out)))
2360 #t))
2361 (replace 'install (install-jars ".")))))
2362 (native-inputs
2363 `(("unzip" ,unzip)))))
2364
2365(define-public java-cisd-base
2366 (let ((revision 38938)
2367 (base-version "14.12.0"))
2368 (package
2369 (name "java-cisd-base")
2370 (version (string-append base-version "-" (number->string revision)))
2371 (source (origin
2372 (method svn-fetch)
2373 (uri (svn-reference
2374 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2375 "base/tags/release/"
2376 (version-major+minor base-version)
2377 ".x/" base-version "/base/"))
2378 (revision revision)))
2379 (file-name (string-append "java-cisd-base-" version "-checkout"))
2380 (sha256
2381 (base32
2382 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2383 (modules '((guix build utils)))
2384 (snippet
2385 '(begin
2386 ;; Delete included gradle jar
2387 (delete-file-recursively "gradle/wrapper")
2388 ;; Delete pre-built native libraries
2389 (delete-file-recursively "libs")
2390 #t))))
2391 (build-system ant-build-system)
2392 (arguments
2393 `(#:make-flags '("-file" "build/build.xml")
2394 #:test-target "jar-test"
2395 #:jdk ,icedtea-8
2396 #:phases
2397 (modify-phases %standard-phases
2398 (add-after 'unpack 'unpack-build-resources
2399 (lambda* (#:key inputs #:allow-other-keys)
2400 (copy-recursively (assoc-ref inputs "build-resources")
2401 "../build_resources")
2402 #t))
2403 (add-after 'unpack-build-resources 'fix-dependencies
2404 (lambda* (#:key inputs #:allow-other-keys)
2405 (substitute* "build/build.xml"
2406 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2407 (string-append (assoc-ref inputs "java-testng")
2408 "/share/java/java-testng.jar"))
2409 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2410 (string-append (assoc-ref inputs "java-commons-lang")
2411 "/share/java/commons-lang-"
2412 ,(package-version java-commons-lang) ".jar"))
2413 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2414 (string-append (assoc-ref inputs "java-commons-io")
2415 "/share/java/commons-io-"
2416 ,(package-version java-commons-io)
2417 "-SNAPSHOT.jar"))
2418 ;; Remove dependency on svn
2419 (("<build-info.*") "")
2420 (("\\$\\{revision.number\\}")
2421 ,(number->string revision))
2422 (("\\$\\{version.number\\}") ,base-version))
2423 ;; Remove dependency on classycle
2424 (substitute* "../build_resources/ant/build-common.xml"
2425 (("<taskdef name=\"dependency-checker.*") "")
2426 (("classname=\"classycle.*") "")
2427 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2428 #t))
2429 ;; A few tests fail because of the lack of a proper /etc/groups and
2430 ;; /etc/passwd file in the build container.
2431 (add-after 'unpack 'disable-broken-tests
2432 (lambda _
2433 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2434 (("Unix.isOperational\\(\\)") "false"))
2435 #t))
2436 ;; These decorators are almost useless and pull in an unpackaged
2437 ;; dependency.
2438 (add-after 'unpack 'remove-useless-decorators
2439 (lambda _
2440 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2441 (("@Private") "")
2442 (("import ch.rinn.restrictions.Private;") ""))
2443 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2444 (("@Friend.*") "")
2445 (("import ch.rinn.restrictions.Friend;") ""))
2446 #t))
2447 (add-before 'configure 'build-native-code
2448 (lambda* (#:key inputs #:allow-other-keys)
2449 (let ((jdk (assoc-ref inputs "jdk"))
2450 (dir ,(match (%current-system)
2451 ("i686-linux"
2452 "i386-Linux")
2453 ((or "armhf-linux" "aarch64-linux")
2454 "arm-Linux")
2455 ((or "x86_64-linux")
2456 "amd64-Linux")
2457 (_ "unknown-Linux"))))
2458 (with-directory-excursion "source/c"
2459 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2460 (string-append "-I" jdk "/include")
2461 (string-append "-I" jdk "/include/linux")
2462 "-o" "libunix.so")
2463 (invoke "gcc" "-shared" "-O3" "-fPIC"
2464 "-DMACHINE_BYTE_ORDER=1"
2465 "copyCommon.c"
2466 "copyByteChar.c"
2467 "copyByteDouble.c"
2468 "copyByteFloat.c"
2469 "copyByteInt.c"
2470 "copyByteLong.c"
2471 "copyByteShort.c"
2472 (string-append "-I" jdk "/include")
2473 (string-append "-I" jdk "/include/linux")
2474 "-o" "libnativedata.so"))
2475 (install-file "source/c/libunix.so"
2476 (string-append "libs/native/unix/" dir))
2477 (install-file "source/c/libnativedata.so"
2478 (string-append "libs/native/nativedata/" dir))
2479 #t)))
2480 ;; In the "check" phase we only build the test executable.
2481 (add-after 'check 'run-tests
2482 (lambda _
2483 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2484 (delete-file "targets/dist/sis-base-test.jar")
2485 #t))
2486 (replace 'install (install-jars "targets/dist")))))
2487 (native-inputs
2488 `(("jdk" ,icedtea-8)
2489 ("java-commons-lang" ,java-commons-lang)
2490 ("java-commons-io" ,java-commons-io)
2491 ("java-testng" ,java-testng)
2492 ("build-resources"
2493 ,(origin
2494 (method svn-fetch)
2495 (uri (svn-reference
2496 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2497 "base/tags/release/"
2498 (version-major+minor base-version)
2499 ".x/" base-version
2500 "/build_resources/"))
2501 (revision revision)))
2502 (sha256
2503 (base32
2504 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2505 (home-page "http://svnsis.ethz.ch")
2506 (synopsis "Utility classes for libraries from ETH Zurich")
2507 (description "This library supplies some utility classes needed for
2508libraries from the SIS division at ETH Zurich like jHDF5.")
2509 ;; The C sources are under a non-copyleft license, which looks like a
2510 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2511 (license (list license:asl2.0
2512 (license:non-copyleft "file://source/c/COPYING"))))))
2513
2514(define-public java-cisd-args4j
2515 (let ((revision 39162)
2516 (base-version "9.11.2"))
2517 (package
2518 (name "java-cisd-args4j")
2519 (version (string-append base-version "-" (number->string revision)))
2520 (source (origin
2521 (method svn-fetch)
2522 (uri (svn-reference
2523 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2524 "args4j/tags/release/"
2525 (version-major+minor base-version)
2526 ".x/" base-version "/args4j/"))
2527 (revision revision)))
2528 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2529 (sha256
2530 (base32
2531 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2532 (build-system ant-build-system)
2533 (arguments
2534 `(#:make-flags '("-file" "build/build.xml")
2535 #:tests? #f ; there are no tests
2536 ;; There are weird build failures with JDK8, such as: "The type
2537 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2538 ;; referenced from required .class files"
2539 #:jdk ,icedtea-7
2540 #:modules ((guix build ant-build-system)
2541 (guix build utils)
2542 (guix build java-utils)
2543 (sxml simple)
2544 (sxml transform)
2545 (sxml xpath))
2546 #:phases
2547 (modify-phases %standard-phases
2548 (add-after 'unpack 'unpack-build-resources
2549 (lambda* (#:key inputs #:allow-other-keys)
2550 (mkdir-p "../build_resources")
2551 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2552 "-C" "../build_resources"
2553 "--strip-components=1")
2554 (mkdir-p "../build_resources/lib")
2555 #t))
2556 (add-after 'unpack-build-resources 'fix-dependencies
2557 (lambda* (#:key inputs #:allow-other-keys)
2558 ;; FIXME: There should be a more convenient abstraction for
2559 ;; editing XML files.
2560 (with-directory-excursion "../build_resources/ant/"
2561 (chmod "build-common.xml" #o664)
2562 (call-with-output-file "build-common.xml.new"
2563 (lambda (port)
2564 (sxml->xml
2565 (pre-post-order
2566 (with-input-from-file "build-common.xml"
2567 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2568 `(;; Remove dependency on classycle and custom ant tasks
2569 (taskdef . ,(lambda (tag . kids)
2570 (let ((name ((sxpath '(name *text*)) kids)))
2571 (if (or (member "build-info" name)
2572 (member "dependency-checker" name)
2573 (member "build-java-subprojects" name)
2574 (member "project-classpath" name))
2575 '() ; skip
2576 `(,tag ,@kids)))))
2577 (typedef . ,(lambda (tag . kids)
2578 (let ((name ((sxpath '(name *text*)) kids)))
2579 (if (member "recursive-jar" name)
2580 '() ; skip
2581 `(,tag ,@kids)))))
2582 (build-java-subprojects . ,(lambda _ '()))
2583 ;; Ignore everything else
2584 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2585 (*text* . ,(lambda (_ txt) txt))))
2586 port)))
2587 (rename-file "build-common.xml.new" "build-common.xml"))
2588 (substitute* "build/build.xml"
2589 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2590 (string-append (assoc-ref inputs "java-cisd-base")
2591 "/share/java/sis-base.jar"))
2592 ;; Remove dependency on svn
2593 (("<build-info.*") "")
2594 (("\\$\\{revision.number\\}")
2595 ,(number->string revision))
2596 (("\\$\\{version.number\\}") ,base-version)
2597 ;; Don't use custom ant tasks.
2598 (("recursive-jar") "jar")
2599 (("<project-classpath.*") ""))
2600 #t))
2601 (replace 'install (install-jars "targets/dist")))))
2602 (inputs
2603 `(("java-cisd-base" ,java-cisd-base)))
2604 (native-inputs
2605 `(("ecj" ,java-ecj-3.5)
2606 ("build-resources"
2607 ,(origin
2608 (method svn-fetch)
2609 (uri (svn-reference
2610 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2611 "args4j/tags/release/"
2612 (version-major+minor base-version)
2613 ".x/" base-version
2614 "/build_resources/"))
2615 (revision revision)))
2616 (sha256
2617 (base32
2618 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2619 (modules '((guix build utils)))
2620 ;; Delete bundled pre-built jars.
2621 (snippet
2622 '(begin (delete-file-recursively "lib/") #t))))))
2623 (home-page "http://svnsis.ethz.ch")
2624 (synopsis "Command line parser library")
2625 (description "This package provides a parser for command line arguments.")
2626 (license license:asl2.0))))
2627
2628(define-public java-cisd-jhdf5
2629 (let ((revision 39162)
2630 (base-version "14.12.6"))
2631 (package
2632 (name "java-cisd-jhdf5")
2633 (version (string-append base-version "-" (number->string revision)))
2634 (source (origin
2635 (method svn-fetch)
2636 (uri (svn-reference
2637 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2638 "jhdf5/tags/release/"
2639 (version-major+minor base-version)
2640 ".x/" base-version "/jhdf5/"))
2641 (revision revision)))
2642 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2643 (sha256
2644 (base32
2645 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2646 (modules '((guix build utils)))
2647 (snippet
2648 '(begin
2649 ;; Delete included gradle jar
2650 (delete-file-recursively "gradle/wrapper")
2651 ;; Delete pre-built native libraries
2652 (delete-file-recursively "libs")
2653 #t))))
2654 (build-system ant-build-system)
2655 (arguments
2656 `(#:make-flags '("-file" "build/build.xml")
2657 #:build-target "jar-all"
2658 #:test-target "jar-test"
2659 #:jdk ,icedtea-8
2660 #:phases
2661 (modify-phases %standard-phases
2662 ;; FIXME: this build phase fails.
2663 (delete 'generate-jar-indices)
2664 ;; Don't erase results from the build phase when building tests.
2665 (add-after 'unpack 'separate-test-target-from-clean
2666 (lambda _
2667 (substitute* "build/build.xml"
2668 (("\"jar-test\" depends=\"clean, ")
2669 "\"jar-test\" depends=\""))
2670 #t))
2671 (add-after 'unpack 'unpack-build-resources
2672 (lambda* (#:key inputs #:allow-other-keys)
2673 (copy-recursively (assoc-ref inputs "build-resources")
2674 "../build_resources")
2675 (delete-file-recursively "../build_resources/lib/")
2676 (mkdir-p "../build_resources/lib")
2677 ;; Remove dependency on classycle
2678 (substitute* "../build_resources/ant/build-common.xml"
2679 (("<taskdef name=\"dependency-checker.*") "")
2680 (("classname=\"classycle.*") "")
2681 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2682 ;; Remove dependency on svn
2683 (substitute* "build/build.xml"
2684 (("<build-info.*") "")
2685 (("\\$\\{revision.number\\}")
2686 ,(number->string revision))
2687 (("\\$\\{version.number\\}") ,base-version))
2688 #t))
2689 (add-after 'unpack-build-resources 'fix-dependencies
2690 (lambda* (#:key inputs #:allow-other-keys)
2691 (substitute* "../build_resources/ant/build-common.xml"
2692 (("../libraries/testng/testng-jdk15.jar")
2693 (string-append (assoc-ref inputs "java-testng")
2694 "/share/java/java-testng.jar")))
2695 (substitute* "build/build.xml"
2696 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2697 (string-append (assoc-ref inputs "java-cisd-base")
2698 "/share/java/sis-base.jar"))
2699 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2700 (string-append (assoc-ref inputs "java-cisd-args4j")
2701 "/share/java/cisd-args4j.jar"))
2702 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2703 (string-append (assoc-ref inputs "java-commons-lang")
2704 "/share/java/commons-lang-"
2705 ,(package-version java-commons-lang) ".jar"))
2706 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2707 (string-append (assoc-ref inputs "java-commons-io")
2708 "/share/java/commons-io-"
2709 ,(package-version java-commons-io)
2710 "-SNAPSHOT.jar"))
2711 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2712 (string-append (assoc-ref inputs "java-testng")
2713 "/share/java/java-testng.jar"))
2714 (("\\$\\{lib\\}/junit4/junit.jar")
2715 (string-append (assoc-ref inputs "java-junit")
2716 "/share/java/junit.jar"))
2717 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2718 (string-append (assoc-ref inputs "java-hamcrest-core")
2719 "/share/java/hamcrest-core.jar")))
2720 ;; Remove dependency on ch.rinn.restrictions
2721 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2722 (substitute* '("BitSetConversionUtils.java"
2723 "HDF5Utils.java")
2724 (("import ch.rinn.restrictions.Private;") "")
2725 (("@Private") "")))
2726 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2727 (substitute* '("BitSetConversionTest.java"
2728 "h5ar/HDF5ArchiverTest.java")
2729 (("import ch.rinn.restrictions.Friend;") "")
2730 (("@Friend.*") ""))
2731 ;; Remove leftovers from removing @Friend
2732 (substitute* "h5ar/HDF5ArchiverTest.java"
2733 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2734 "")))
2735 #t))
2736 (add-before 'configure 'build-native-library
2737 (lambda* (#:key inputs #:allow-other-keys)
2738 (let ((jdk (assoc-ref inputs "jdk"))
2739 (hdf5 (assoc-ref inputs "hdf5"))
2740 (dir ,(match (%current-system)
2741 ("i686-linux"
2742 "i386-Linux")
2743 ((or "armhf-linux" "aarch64-linux")
2744 "arm-Linux")
2745 ((or "x86_64-linux")
2746 "amd64-Linux")
2747 (_ "unknown-Linux"))))
2748 (with-directory-excursion "source/c"
2749 (apply invoke `("gcc" "-shared" "-O3"
2750 "-fPIC"
2751 "-Wl,--exclude-libs,ALL"
2752 ,@(find-files "jhdf5" "\\.c$")
2753 ,@(find-files "hdf-java" "\\.c$")
2754 ,(string-append "-I" hdf5 "/include")
2755 ,(string-append "-I" jdk "/include")
2756 ,(string-append "-I" jdk "/include/linux")
2757 ,(string-append hdf5 "/lib/libhdf5.a")
2758 "-o" "libjhdf5.so" "-lz")))
2759 (install-file "source/c/libjhdf5.so"
2760 (string-append "libs/native/jhdf5/" dir))
2761 #t)))
2762 ;; In the "check" phase we only build the test executable.
2763 (add-after 'check 'run-tests
2764 (lambda _
2765 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2766 (delete-file "targets/dist/sis-jhdf5-test.jar")
2767 #t))
2768 (replace 'install
2769 (install-jars "targets/dist")))))
2770 (inputs
2771 `(("java-cisd-base" ,java-cisd-base)
2772 ("java-cisd-args4j" ,java-cisd-args4j)
2773 ("java-commons-lang" ,java-commons-lang)
2774 ("java-commons-io" ,java-commons-io)
2775 ("hdf5" ,hdf5)
2776 ("zlib" ,zlib)))
2777 (native-inputs
2778 `(("jdk" ,icedtea-8)
2779 ("java-testng" ,java-testng)
2780 ("java-junit" ,java-junit)
2781 ("java-jmock" ,java-jmock)
2782 ("java-hamcrest-core" ,java-hamcrest-core)
2783 ("build-resources"
2784 ,(origin
2785 (method svn-fetch)
2786 (uri (svn-reference
2787 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2788 "jhdf5/tags/release/"
2789 (version-major+minor base-version)
2790 ".x/" base-version
2791 "/build_resources/"))
2792 (revision revision)))
2793 (sha256
2794 (base32
2795 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2796 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2797 (synopsis "Java binding for HDF5")
2798 (description "JHDF5 is a high-level API in Java for reading and writing
2799HDF5 files, building on the libraries provided by the HDF Group.")
2800 ;; The C sources are under a non-copyleft license, which looks like a
2801 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2802 (license (list license:asl2.0
2803 (license:non-copyleft "file://source/c/COPYING"))))))
2804
2805(define-public java-classpathx-servletapi
2806 (package
2807 (name "java-classpathx-servletapi")
2808 (version "3.0.1")
2809 (source (origin
2810 (method url-fetch)
2811 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2812 "servletapi-" version ".tar.gz"))
2813 (sha256
2814 (base32
2815 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2816 (build-system ant-build-system)
2817 (arguments
2818 `(#:tests? #f ; there is no test target
2819 #:build-target "compile"
2820 #:make-flags
2821 (list "-Dbuild.compiler=javac1.8"
2822 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2823 #:phases
2824 (modify-phases %standard-phases
2825 (replace 'install
2826 (lambda* (#:key make-flags #:allow-other-keys)
2827 (apply invoke `("ant" "dist" ,@make-flags)))))))
2828 (home-page "https://www.gnu.org/software/classpathx/")
2829 (synopsis "Java servlet API implementation")
2830 (description "This is the GNU servlet API distribution, part of the
2831ClasspathX project. It provides implementations of version 3.0 of the servlet
2832API and version 2.1 of the Java ServerPages API.")
2833 (license license:gpl3+)))
2834
2835(define-public java-javaee-servletapi
2836 (package
2837 (name "java-javaee-servletapi")
2838 (version "3.1.0")
2839 (source (origin
2840 (method url-fetch)
2841 (uri (string-append "https://github.com/javaee/servlet-spec/"
2842 "archive/" version ".zip"))
2843 (file-name (string-append name "-" version ".zip"))
2844 (sha256
2845 (base32
2846 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
2847 (build-system ant-build-system)
2848 (arguments
2849 `(#:jar-name "javax-servletapi.jar"
2850 ;; no tests
2851 #:tests? #f
2852 #:source-dir "src/main/java"))
2853 (native-inputs
2854 `(("unzip" ,unzip)))
2855 (home-page "https://javaee.github.io/servlet-spec/")
2856 (synopsis "Java servlet API")
2857 (description "Java Servlet is the foundation web specification in the
2858Java Enterprise Platform. Developers can build web applications using the
2859Servlet API to interact with the request/response workflow. This project
2860provides information on the continued development of the Java Servlet
2861specification.")
2862 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
2863 ;; Some files are licensed under ASL 2.0.
2864 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
2865
2866(define-public java-swt
2867 (package
2868 (name "java-swt")
2869 (version "4.7.1a")
2870 (source
2871 ;; The types of many variables and procedures differ in the sources
2872 ;; dependent on whether the target architecture is a 32-bit system or a
2873 ;; 64-bit system. Instead of patching the sources on demand in a build
2874 ;; phase we download either the 32-bit archive (which mostly uses "int"
2875 ;; types) or the 64-bit archive (which mostly uses "long" types).
2876 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2877 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2878 (file32 "x86")
2879 (file64 "x86_64"))
2880 (let-values (((hash file)
2881 (match (or (%current-target-system) (%current-system))
2882 ("x86_64-linux" (values hash64 file64))
2883 (_ (values hash32 file32)))))
2884 (origin
2885 (method url-fetch)
2886 (uri (string-append
2887 "http://download.eclipse.org/eclipse/downloads/drops4/"
2888 "R-" version "-201710090410/swt-" version
2889 "-gtk-linux-" file ".zip"))
2890 (sha256 (base32 hash))))))
2891 (build-system ant-build-system)
2892 (arguments
2893 `(#:jar-name "swt.jar"
2894 #:jdk ,icedtea-8
2895 #:tests? #f ; no "check" target
2896 #:phases
2897 (modify-phases %standard-phases
2898 (replace 'unpack
2899 (lambda* (#:key source #:allow-other-keys)
2900 (mkdir "swt")
2901 (invoke "unzip" source "-d" "swt")
2902 (chdir "swt")
2903 (mkdir "src")
2904 (invoke "unzip" "src.zip" "-d" "src")))
2905 ;; The classpath contains invalid icecat jars. Since we don't need
2906 ;; anything other than the JDK on the classpath, we can simply unset
2907 ;; it.
2908 (add-after 'configure 'unset-classpath
2909 (lambda _ (unsetenv "CLASSPATH") #t))
2910 (add-before 'build 'build-native
2911 (lambda* (#:key inputs outputs #:allow-other-keys)
2912 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2913 ;; Build shared libraries. Users of SWT have to set the system
2914 ;; property swt.library.path to the "lib" directory of this
2915 ;; package output.
2916 (mkdir-p lib)
2917 (setenv "OUTPUT_DIR" lib)
2918 (with-directory-excursion "src"
2919 (invoke "bash" "build.sh")))))
2920 (add-after 'install 'install-native
2921 (lambda* (#:key outputs #:allow-other-keys)
2922 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2923 (for-each (lambda (file)
2924 (install-file file lib))
2925 (find-files "." "\\.so$"))
2926 #t))))))
2927 (inputs
2928 `(("gtk" ,gtk+-2)
2929 ("libxtst" ,libxtst)
2930 ("libxt" ,libxt)
2931 ("mesa" ,mesa)
2932 ("glu" ,glu)))
2933 (native-inputs
2934 `(("pkg-config" ,pkg-config)
2935 ("unzip" ,unzip)))
2936 (home-page "https://www.eclipse.org/swt/")
2937 (synopsis "Widget toolkit for Java")
2938 (description
2939 "SWT is a widget toolkit for Java designed to provide efficient, portable
2940access to the user-interface facilities of the operating systems on which it
2941is implemented.")
2942 ;; SWT code is licensed under EPL1.0
2943 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2944 ;; Cairo bindings contain code under MPL1.1
2945 ;; XULRunner 1.9 bindings contain code under MPL2.0
2946 (license (list
2947 license:epl1.0
2948 license:mpl1.1
2949 license:mpl2.0
2950 license:lgpl2.1+))))
2951
2952(define-public java-xz
2953 (package
2954 (name "java-xz")
2955 (version "1.6")
2956 (source (origin
2957 (method url-fetch)
2958 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2959 (sha256
2960 (base32
2961 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2962 (build-system ant-build-system)
2963 (arguments
2964 `(#:tests? #f ; There are no tests to run.
2965 #:jar-name ,(string-append "xz-" version ".jar")
2966 #:phases
2967 (modify-phases %standard-phases
2968 ;; The unpack phase enters the "maven" directory by accident.
2969 (add-after 'unpack 'chdir
2970 (lambda _ (chdir "..") #t)))))
2971 (native-inputs
2972 `(("unzip" ,unzip)))
2973 (home-page "https://tukaani.org/xz/java.html")
2974 (synopsis "Implementation of XZ data compression in pure Java")
2975 (description "This library aims to be a complete implementation of XZ data
2976compression in pure Java. Single-threaded streamed compression and
2977decompression and random access decompression have been fully implemented.")
2978 (license license:public-domain)))
2979
2980;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2981;; of the latest release.
2982(define-public java-qdox-1.12
2983 (package
2984 (name "java-qdox")
2985 (version "1.12.1")
2986 (source (origin
2987 (method url-fetch)
2988 (uri (string-append "http://central.maven.org/maven2/"
2989 "com/thoughtworks/qdox/qdox/" version
2990 "/qdox-" version "-sources.jar"))
2991 (sha256
2992 (base32
2993 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2994 (build-system ant-build-system)
2995 (arguments
2996 `(;; Tests require junit
2997 #:tests? #f
2998 #:jar-name "qdox.jar"
2999 #:phases
3000 (modify-phases %standard-phases
3001 (replace 'unpack
3002 (lambda* (#:key source #:allow-other-keys)
3003 (mkdir "src")
3004 (with-directory-excursion "src"
3005 (invoke "jar" "-xf" source))))
3006 ;; At this point we don't have junit, so we must remove the API
3007 ;; tests.
3008 (add-after 'unpack 'delete-tests
3009 (lambda _
3010 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3011 #t)))))
3012 (home-page "http://qdox.codehaus.org/")
3013 (synopsis "Parse definitions from Java source files")
3014 (description
3015 "QDox is a high speed, small footprint parser for extracting
3016class/interface/method definitions from source files complete with JavaDoc
3017@code{@@tags}. It is designed to be used by active code generators or
3018documentation tools.")
3019 (license license:asl2.0)))
3020
3021(define-public java-jarjar
3022 (package
3023 (name "java-jarjar")
3024 (version "1.4")
3025 (source (origin
3026 (method url-fetch)
3027 (uri (string-append
3028 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3029 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3030 (sha256
3031 (base32
3032 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3033 (modules '((guix build utils)))
3034 (snippet
3035 '(begin
3036 ;; Delete bundled thirds-party jar archives.
3037 ;; TODO: unbundle maven-plugin-api.
3038 (delete-file "lib/asm-4.0.jar")
3039 (delete-file "lib/asm-commons-4.0.jar")
3040 (delete-file "lib/junit-4.8.1.jar")
3041 #t))))
3042 (build-system ant-build-system)
3043 (arguments
3044 `(;; Tests require junit, which ultimately depends on this package.
3045 #:tests? #f
3046 #:build-target "jar"
3047 #:phases
3048 (modify-phases %standard-phases
3049 (add-before 'build 'do-not-use-bundled-asm
3050 (lambda* (#:key inputs #:allow-other-keys)
3051 (substitute* "build.xml"
3052 (("<path id=\"path.build\">")
3053 (string-append "<path id=\"path.build\"><fileset dir=\""
3054 (assoc-ref inputs "java-asm-bootstrap")
3055 "/share/java\" includes=\"**/*.jar\"/>"))
3056 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3057 (("lib/asm-commons-4.0.jar")
3058 (string-append (assoc-ref inputs "java-asm-bootstrap")
3059 "/share/java/asm-6.0.jar"))
3060 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3061 (string-append "<include name=\"org/objectweb/asm/"
3062 "commons/Remap*.class\"/>"
3063 "<include name=\"org/objectweb/asm/*.class\"/>"
3064 "<include name=\"org/objectweb/asm/"
3065 "signature/*.class\"/>"
3066 "<include name=\"org/objectweb/asm/"
3067 "commons/SignatureRemapper.class\"/>")))
3068 #t))
3069 (replace 'install
3070 (lambda* (#:key outputs #:allow-other-keys)
3071 (let ((target (string-append (assoc-ref outputs "out")
3072 "/share/java")))
3073 (install-file (string-append "dist/jarjar-" ,version ".jar")
3074 target))
3075 #t)))))
3076 (inputs
3077 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3078 (native-inputs
3079 `(("unzip" ,unzip)))
3080 (home-page "https://code.google.com/archive/p/jarjar/")
3081 (synopsis "Repackage Java libraries")
3082 (description
3083 "Jar Jar Links is a utility that makes it easy to repackage Java
3084libraries and embed them into your own distribution. Jar Jar Links includes
3085an Ant task that extends the built-in @code{jar} task.")
3086 (license license:asl2.0)))
3087
3088(define-public java-hamcrest-core
3089 (package
3090 (name "java-hamcrest-core")
3091 (version "1.3")
3092 (source (origin
3093 (method url-fetch)
3094 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3095 "archive/hamcrest-java-" version ".tar.gz"))
3096 (sha256
3097 (base32
3098 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
3099 (modules '((guix build utils)))
3100 (snippet
3101 '(begin
3102 ;; Delete bundled thirds-party jar archives.
3103 (delete-file-recursively "lib")
3104 #t))))
3105 (build-system ant-build-system)
3106 (arguments
3107 `(#:tests? #f ; Tests require junit
3108 #:modules ((guix build ant-build-system)
3109 (guix build utils)
3110 (srfi srfi-1))
3111 #:make-flags (list (string-append "-Dversion=" ,version))
3112 #:test-target "unit-test"
3113 #:build-target "core"
3114 #:phases
3115 (modify-phases %standard-phases
3116 ;; Disable unit tests, because they require junit, which requires
3117 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3118 ;; attribute from the manifest for reproducibility.
3119 (add-before 'configure 'patch-build.xml
3120 (lambda _
3121 (substitute* "build.xml"
3122 (("unit-test, ") "")
3123 (("\\$\\{build.timestamp\\}") "guix"))
3124 #t))
3125 ;; Java's "getMethods()" returns methods in an unpredictable order.
3126 ;; To make the output of the generated code deterministic we must
3127 ;; sort the array of methods.
3128 (add-after 'unpack 'make-method-order-deterministic
3129 (lambda _
3130 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3131 (("import java\\.util\\.Iterator;" line)
3132 (string-append line "\n"
3133 "import java.util.Arrays; import java.util.Comparator;"))
3134 (("allMethods = cls\\.getMethods\\(\\);" line)
3135 (string-append "_" line
3136 "
3137private Method[] getSortedMethods() {
3138 Arrays.sort(_allMethods, new Comparator<Method>() {
3139 @Override
3140 public int compare(Method a, Method b) {
3141 return a.toString().compareTo(b.toString());
3142 }
3143 });
3144 return _allMethods;
3145}
3146
3147private Method[] allMethods = getSortedMethods();")))
3148 #t))
3149 (add-before 'build 'do-not-use-bundled-qdox
3150 (lambda* (#:key inputs #:allow-other-keys)
3151 (substitute* "build.xml"
3152 (("lib/generator/qdox-1.12.jar")
3153 (string-append (assoc-ref inputs "java-qdox-1.12")
3154 "/share/java/qdox.jar")))
3155 #t))
3156 ;; build.xml searches for .jar files in this directoy, which
3157 ;; we remove from the source archive.
3158 (add-before 'build 'create-dummy-directories
3159 (lambda _
3160 (mkdir-p "lib/integration")
3161 #t))
3162 (replace 'install
3163 (lambda* (#:key outputs #:allow-other-keys)
3164 (let* ((target (string-append (assoc-ref outputs "out")
3165 "/share/java/"))
3166 (version-suffix ,(string-append "-" version ".jar"))
3167 (install-without-version-suffix
3168 (lambda (jar)
3169 (copy-file jar
3170 (string-append target
3171 (basename jar version-suffix)
3172 ".jar")))))
3173 (mkdir-p target)
3174 (for-each
3175 install-without-version-suffix
3176 (find-files "build"
3177 (lambda (name _)
3178 (and (string-suffix? ".jar" name)
3179 (not (string-suffix? "-sources.jar" name)))))))
3180 #t)))))
3181 (native-inputs
3182 `(("java-qdox-1.12" ,java-qdox-1.12)
3183 ("java-jarjar" ,java-jarjar)))
3184 (home-page "http://hamcrest.org/")
3185 (synopsis "Library of matchers for building test expressions")
3186 (description
3187 "This package provides a library of matcher objects (also known as
3188constraints or predicates) allowing @code{match} rules to be defined
3189declaratively, to be used in other frameworks. Typical scenarios include
3190testing frameworks, mocking libraries and UI validation rules.")
3191 (license license:bsd-2)))
3192
3193(define-public java-junit
3194 (package
3195 (name "java-junit")
3196 (version "4.12")
3197 (source (origin
3198 (method url-fetch)
3199 (uri (string-append "https://github.com/junit-team/junit/"
3200 "archive/r" version ".tar.gz"))
3201 (file-name (string-append name "-" version ".tar.gz"))
3202 (sha256
3203 (base32
3204 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3205 (modules '((guix build utils)))
3206 (snippet
3207 '(begin
3208 ;; Delete bundled jar archives.
3209 (delete-file-recursively "lib")
3210 #t))))
3211 (build-system ant-build-system)
3212 (arguments
3213 `(#:tests? #f ; no tests
3214 #:jar-name "junit.jar"))
3215 (inputs
3216 `(("java-hamcrest-core" ,java-hamcrest-core)))
3217 (home-page "http://junit.org/")
3218 (synopsis "Test framework for Java")
3219 (description
3220 "JUnit is a simple framework to write repeatable tests for Java projects.
3221JUnit provides assertions for testing expected results, test fixtures for
3222sharing common test data, and test runners for running tests.")
3223 (license license:epl1.0)))
3224
3225(define-public java-plexus-utils
3226 (package
3227 (name "java-plexus-utils")
3228 (version "3.0.24")
3229 (source (origin
3230 (method url-fetch)
3231 (uri (string-append "https://github.com/codehaus-plexus/"
3232 "plexus-utils/archive/plexus-utils-"
3233 version ".tar.gz"))
3234 (sha256
3235 (base32
3236 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
3237 (build-system ant-build-system)
3238 ;; FIXME: The default build.xml does not include a target to install
3239 ;; javadoc files.
3240 (arguments
3241 `(#:jar-name "plexus-utils.jar"
3242 #:source-dir "src/main"
3243 #:phases
3244 (modify-phases %standard-phases
3245 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3246 (lambda _
3247 (substitute* "src/main/java/org/codehaus/plexus/util/\
3248cli/shell/BourneShell.java"
3249 (("/bin/sh") (which "sh"))
3250 (("/usr/") (getcwd)))
3251 #t))
3252 (add-after 'unpack 'fix-or-disable-broken-tests
3253 (lambda _
3254 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3255 (substitute* '("cli/CommandlineTest.java"
3256 "cli/shell/BourneShellTest.java")
3257 (("/bin/sh") (which "sh"))
3258 (("/bin/echo") (which "echo")))
3259
3260 ;; This test depends on MavenProjectStub, but we don't have
3261 ;; a package for Maven.
3262 (delete-file "introspection/ReflectionValueExtractorTest.java")
3263
3264 ;; FIXME: The command line tests fail, maybe because they use
3265 ;; absolute paths.
3266 (delete-file "cli/CommandlineTest.java"))
3267 #t)))))
3268 (native-inputs
3269 `(("java-junit" ,java-junit)))
3270 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3271 (synopsis "Common utilities for the Plexus framework")
3272 (description "This package provides various Java utility classes for the
3273Plexus framework to ease working with strings, files, command lines, XML and
3274more.")
3275 (license license:asl2.0)))
3276
3277(define-public java-plexus-interpolation
3278 (package
3279 (name "java-plexus-interpolation")
3280 (version "1.23")
3281 (source (origin
3282 (method url-fetch)
3283 (uri (string-append "https://github.com/codehaus-plexus/"
3284 "plexus-interpolation/archive/"
3285 "plexus-interpolation-" version ".tar.gz"))
3286 (sha256
3287 (base32
3288 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3289 (build-system ant-build-system)
3290 (arguments
3291 `(#:jar-name "plexus-interpolation.jar"
3292 #:source-dir "src/main"))
3293 (native-inputs
3294 `(("java-junit" ,java-junit)
3295 ("java-hamcrest-core" ,java-hamcrest-core)))
3296 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3297 (synopsis "Java components for interpolating ${} strings and the like")
3298 (description "Plexus interpolator is a modular, flexible interpolation
3299framework for the expression language style commonly seen in Maven, Plexus,
3300and other related projects.
3301
3302It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3303package within @code{plexus-utils}, but has been separated in order to allow
3304these two libraries to vary independently of one another.")
3305 (license license:asl2.0)))
3306
3307(define-public java-plexus-classworlds
3308 (package
3309 (name "java-plexus-classworlds")
3310 (version "2.5.2")
3311 (source (origin
3312 (method url-fetch)
3313 (uri (string-append "https://github.com/codehaus-plexus/"
3314 "plexus-classworlds/archive/plexus-classworlds-"
3315 version ".tar.gz"))
3316 (sha256
3317 (base32
3318 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3319 (build-system ant-build-system)
3320 (arguments
3321 `(#:jar-name "plexus-classworlds.jar"
3322 #:source-dir "src/main"
3323 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3324 (native-inputs
3325 `(("java-junit" ,java-junit)))
3326 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3327 (synopsis "Java class loader framework")
3328 (description "Plexus classworlds replaces the native @code{ClassLoader}
3329mechanism of Java. It is especially useful for dynamic loading of application
3330components.")
3331 (license license:asl2.0)))
3332
3333(define java-plexus-container-default-bootstrap
3334 (package
3335 (name "java-plexus-container-default-bootstrap")
3336 (version "1.7.1")
3337 (source (origin
3338 (method url-fetch)
3339 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3340 "/archive/plexus-containers-" version ".tar.gz"))
3341 (sha256
3342 (base32
3343 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3344 (build-system ant-build-system)
3345 (arguments
3346 `(#:jar-name "container-default.jar"
3347 #:source-dir "plexus-container-default/src/main/java"
3348 #:test-dir "plexus-container-default/src/test"
3349 #:jdk ,icedtea-8
3350 #:tests? #f; requires plexus-archiver, which depends on this package
3351 #:phases
3352 (modify-phases %standard-phases
3353 (add-before 'build 'copy-resources
3354 (lambda _
3355 (copy-recursively
3356 "plexus-container-default/src/main/resources/"
3357 "build/classes")
3358 #t)))))
3359 (inputs
3360 `(("worldclass" ,java-plexus-classworlds)
3361 ("xbean" ,java-geronimo-xbean-reflect)
3362 ("utils" ,java-plexus-utils)
3363 ("junit" ,java-junit)
3364 ("guava" ,java-guava)))
3365 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3366 (synopsis "Inversion-of-control container")
3367 (description "Plexus-default-container is Plexus' inversion-of-control
3368(@dfn{IoC}) container. It is composed of its public API and its default
3369implementation.")
3370 (license license:asl2.0)))
3371
3372(define-public java-plexus-io
3373 (package
3374 (name "java-plexus-io")
3375 (version "3.0.0")
3376 (source (origin
3377 (method url-fetch)
3378 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3379 "/archive/plexus-io-" version ".tar.gz"))
3380 (sha256
3381 (base32
3382 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3383 (build-system ant-build-system)
3384 (arguments
3385 `(#:jar-name "plexus-io.jar"
3386 #:source-dir "src/main/java"
3387 #:test-dir "src/test"
3388 #:jdk ,icedtea-8
3389 #:phases
3390 (modify-phases %standard-phases
3391 (add-before 'build 'copy-resources
3392 (lambda _
3393 (mkdir-p "build/classes/META-INF/plexus")
3394 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3395 "build/classes/META-INF/plexus/components.xml")
3396 #t)))))
3397 (inputs
3398 `(("utils" ,java-plexus-utils)
3399 ("commons-io" ,java-commons-io)
3400 ("java-jsr305" ,java-jsr305)))
3401 (native-inputs
3402 `(("junit" ,java-junit)
3403 ("hamcrest" ,java-hamcrest-core)
3404 ("guava" ,java-guava)
3405 ("classworlds" ,java-plexus-classworlds)
3406 ("xbean" ,java-geronimo-xbean-reflect)
3407 ("container-default" ,java-plexus-container-default-bootstrap)))
3408 (home-page "https://github.com/codehaus-plexus/plexus-io")
3409 (synopsis "I/O plexus components")
3410 (description "Plexus IO is a set of plexus components, which are designed
3411for use in I/O operations. This implementation using plexus components allows
3412reusing it in maven.")
3413 (license license:asl2.0)))
3414
3415(define-public java-plexus-archiver
3416 (package
3417 (name "java-plexus-archiver")
3418 (version "3.5")
3419 (source (origin
3420 (method url-fetch)
3421 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3422 "/archive/plexus-archiver-" version ".tar.gz"))
3423 (sha256
3424 (base32
3425 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
3426 (build-system ant-build-system)
3427 (arguments
3428 `(#:jar-name "plexus-archiver.jar"
3429 #:source-dir "src/main/java"
3430 #:jdk ,icedtea-8
3431 #:test-dir "src/test"
3432 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3433 #:phases
3434 (modify-phases %standard-phases
3435 (add-before 'check 'remove-failing
3436 (lambda _
3437 ;; Requires an older version of plexus container
3438 (delete-file
3439 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3440 #t))
3441 (add-before 'build 'copy-resources
3442 (lambda _
3443 (mkdir-p "build/classes/META-INF/plexus")
3444 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3445 "build/classes/META-INF/plexus/components.xml")
3446 #t)))))
3447 (inputs
3448 `(("utils" ,java-plexus-utils)
3449 ("commons-io" ,java-commons-io)
3450 ("snappy" ,java-iq80-snappy)
3451 ("io" ,java-plexus-io)
3452 ("compress" ,java-commons-compress)
3453 ("container-default" ,java-plexus-container-default-bootstrap)
3454 ("snappy" ,java-snappy)
3455 ("java-jsr305" ,java-jsr305)))
3456 (native-inputs
3457 `(("junit" ,java-junit)
3458 ("classworld" ,java-plexus-classworlds)
3459 ("xbean" ,java-geronimo-xbean-reflect)
3460 ("xz" ,java-tukaani-xz)
3461 ("guava" ,java-guava)))
3462 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3463 (synopsis "Archiver component of the Plexus project")
3464 (description "Plexus-archiver contains a component to deal with project
3465archives (jar).")
3466 (license license:asl2.0)))
3467
3468(define-public java-plexus-container-default
3469 (package
3470 (inherit java-plexus-container-default-bootstrap)
3471 (name "java-plexus-container-default")
3472 (arguments
3473 `(#:jar-name "container-default.jar"
3474 #:source-dir "plexus-container-default/src/main/java"
3475 #:test-dir "plexus-container-default/src/test"
3476 #:test-exclude (list ;"**/*Test.java"
3477 "**/Abstract*.java"
3478 ;; Requires plexus-hierarchy
3479 "**/PlexusHierarchyTest.java"
3480 ;; Failures
3481 "**/ComponentRealmCompositionTest.java"
3482 "**/PlexusContainerTest.java")
3483 #:jdk ,icedtea-8
3484 #:phases
3485 (modify-phases %standard-phases
3486 (add-before 'build 'copy-resources
3487 (lambda _
3488 (copy-recursively
3489 "plexus-container-default/src/main/resources/"
3490 "build/classes")
3491 #t))
3492 (add-before 'check 'fix-paths
3493 (lambda _
3494 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3495 (substitute*
3496 (string-append
3497 dir "/plexus/component/composition/"
3498 "ComponentRealmCompositionTest.java")
3499 (("src/test") "plexus-container-default/src/test"))
3500 #t))))))
3501 (inputs
3502 `(("worldclass" ,java-plexus-classworlds)
3503 ("xbean" ,java-geronimo-xbean-reflect)
3504 ("utils" ,java-plexus-utils)
3505 ("junit" ,java-junit)
3506 ("guava" ,java-guava)))
3507 (native-inputs
3508 `(("archiver" ,java-plexus-archiver)
3509 ("hamcrest" ,java-hamcrest-core)))))
3510
3511(define-public java-plexus-component-annotations
3512 (package
3513 (inherit java-plexus-container-default)
3514 (name "java-plexus-component-annotations")
3515 (arguments
3516 `(#:jar-name "plexus-component-annotations.jar"
3517 #:source-dir "plexus-component-annotations/src/main/java"
3518 #:tests? #f)); no tests
3519 (inputs '())
3520 (native-inputs '())
3521 (synopsis "Plexus descriptors generator")
3522 (description "This package is a Maven plugin to generate Plexus descriptors
3523from source tags and class annotations.")))
3524
3525(define-public java-plexus-cipher
3526 (package
3527 (name "java-plexus-cipher")
3528 (version "1.7")
3529 (source (origin
3530 (method url-fetch)
3531 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3532 "/archive/plexus-cipher-" version ".tar.gz"))
3533 (sha256
3534 (base32
3535 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3536 (build-system ant-build-system)
3537 (arguments
3538 `(#:jar-name "plexus-cipher.jar"
3539 #:source-dir "src/main/java"
3540 #:jdk ,icedtea-8
3541 #:tests? #f; FIXME: requires sisu-inject-bean
3542 #:phases
3543 (modify-phases %standard-phases
3544 (add-before 'build 'copy-resources
3545 (lambda _
3546 (copy-recursively "src/main/resources" "build/classes")
3547 (mkdir-p "build/classes/META-INF/sisu")
3548 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3549 (lambda _
3550 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3551 #t)))))
3552 (inputs
3553 `(("java-cdi-api" ,java-cdi-api)
3554 ("java-javax-inject" ,java-javax-inject)))
3555 (home-page "https://github.com/sonatype/plexus-cipher")
3556 (synopsis "Encryption/decryption Component")
3557 (description "Plexus-cipher contains a component to deal with encryption
3558and decryption.")
3559 (license license:asl2.0)))
3560
3561(define-public java-plexus-compiler-api
3562 (package
3563 (name "java-plexus-compiler-api")
3564 (version "2.8.4")
3565 (source (origin
3566 (method url-fetch)
3567 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3568 "/archive/plexus-compiler-" version ".tar.gz"))
3569 (sha256
3570 (base32
3571 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3572 (build-system ant-build-system)
3573 (arguments
3574 `(#:jar-name "plexus-compiler-api.jar"
3575 #:source-dir "plexus-compiler-api/src/main/java"
3576 #:jdk ,icedtea-8
3577 #:test-dir "plexus-compiler-api/src/test"))
3578 (inputs
3579 `(("java-plexus-container-default" ,java-plexus-container-default)
3580 ("java-plexus-util" ,java-plexus-utils)))
3581 (native-inputs
3582 `(("java-junit" ,java-junit)))
3583 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3584 (synopsis "Plexus Compilers component's API to manipulate compilers")
3585 (description "This package contains the API used by components to manipulate
3586compilers.")
3587 (license (list license:asl2.0
3588 license:expat))))
3589
3590(define-public java-plexus-compiler-javac
3591 (package
3592 (inherit java-plexus-compiler-api)
3593 (name "java-plexus-compiler-javac")
3594 (arguments
3595 `(#:jar-name "plexus-compiler-javac.jar"
3596 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3597 #:jdk ,icedtea-8
3598 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3599 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3600 (inputs
3601 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3602 ("java-plexus-utils" ,java-plexus-utils)
3603 ("java-plexus-container-default" ,java-plexus-container-default)))
3604 (native-inputs
3605 `(("java-junit" ,java-junit)))
3606 (synopsis "Javac Compiler support for Plexus Compiler component")
3607 (description "This package contains the Javac Compiler support for Plexus
3608Compiler component.")))
3609
3610(define-public java-plexus-sec-dispatcher
3611 (package
3612 (name "java-plexus-sec-dispatcher")
3613 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3614 (source (origin
3615 ;; This project doesn't tag releases or publish tarballs, so we take
3616 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3617 (method url-fetch)
3618 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3619 "archive/7db8f88048.tar.gz"))
3620 (sha256
3621 (base32
3622 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3623 (file-name (string-append name "-" version ".tar.gz"))))
3624 (arguments
3625 `(#:jar-name "plexus-sec-dispatcher.jar"
3626 #:source-dir "src/main/java"
3627 #:jdk ,icedtea-8
3628 #:phases
3629 (modify-phases %standard-phases
3630 (add-before 'build 'generate-models
3631 (lambda* (#:key inputs #:allow-other-keys)
3632 (define (modello-single-mode file version mode)
3633 (invoke "java"
3634 "org.codehaus.modello.ModelloCli"
3635 file mode "src/main/java" version
3636 "false" "true"))
3637 (let ((file "src/main/mdo/settings-security.mdo"))
3638 (modello-single-mode file "1.0.0" "java")
3639 (modello-single-mode file "1.0.0" "xpp3-reader")
3640 (modello-single-mode file "1.0.0" "xpp3-writer"))
3641 #t))
3642 (add-before 'build 'generate-components.xml
3643 (lambda _
3644 (mkdir-p "build/classes/META-INF/plexus")
3645 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3646 (lambda _
3647 (display
3648 "<component-set>\n
3649 <components>\n
3650 <component>\n
3651 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3652 <role-hint>default</role-hint>\n
3653 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3654 <description></description>\n
3655 <requirements>\n
3656 <requirement>\n
3657 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3658 <field-name>_cipher</field-name>\n
3659 </requirement>\n
3660 <requirement>\n
3661 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3662 <field-name>_decryptors</field-name>\n
3663 </requirement>\n
3664 </requirements>\n
3665 <configuration>\n
3666 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3667 </configuration>\n
3668 </component>\n
3669 </components>\n
3670</component-set>\n")))
3671 #t))
3672 (add-before 'check 'fix-paths
3673 (lambda _
3674 (copy-recursively "src/test/resources" "target")
3675 #t)))))
3676 (inputs
3677 `(("java-plexus-cipher" ,java-plexus-cipher)))
3678 (native-inputs
3679 `(("java-modello-core" ,java-modello-core)
3680 ;; for modello:
3681 ("java-plexus-container-default" ,java-plexus-container-default)
3682 ("java-plexus-classworlds" ,java-plexus-classworlds)
3683 ("java-plexus-utils" ,java-plexus-utils)
3684 ("java-guava" ,java-guava)
3685 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3686 ("java-sisu-build-api" ,java-sisu-build-api)
3687 ;; modello plugins:
3688 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3689 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3690 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3691 ;; for tests
3692 ("java-junit" ,java-junit)))
3693 (build-system ant-build-system)
3694 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3695 (synopsis "Plexus Security Dispatcher Component")
3696 (description "This package is the Plexus Security Dispatcher Component.
3697This component decrypts a string passed to it.")
3698 (license license:asl2.0)))
3699
3700(define-public java-plexus-cli
3701 (package
3702 (name "java-plexus-cli")
3703 (version "1.7")
3704 (source (origin
3705 (method git-fetch)
3706 (uri (git-reference
3707 (url "https://github.com/sonatype/plexus-cli")
3708 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3709 (file-name (string-append name "-" version))
3710 (sha256
3711 (base32
3712 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3713 (build-system ant-build-system)
3714 (arguments
3715 `(#:jar-name "plexus-cli.jar"
3716 #:source-dir "src/main/java"
3717 #:jdk ,icedtea-8
3718 #:test-dir "src/test"))
3719 (inputs
3720 `(("java-commons-cli" ,java-commons-cli)
3721 ("java-plexus-container-default" ,java-plexus-container-default)
3722 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3723 (native-inputs
3724 `(("java-plexus-utils" ,java-plexus-utils)
3725 ("java-junit" ,java-junit)
3726 ("java-guava" ,java-guava)))
3727 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3728 (synopsis "CLI building library for plexus")
3729 (description "This package is a library to help creating CLI around
3730Plexus components.")
3731 (license license:asl2.0)))
3732
3733(define-public java-sisu-build-api
3734 (package
3735 (name "java-sisu-build-api")
3736 (version "0.0.7")
3737 (source (origin
3738 (method url-fetch)
3739 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3740 "archive/plexus-build-api-" version ".tar.gz"))
3741 (sha256
3742 (base32
3743 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3744 (build-system ant-build-system)
3745 (arguments
3746 `(#:jar-name "sisu-build-api.jar"
3747 #:source-dir "src/main/java"
3748 #:jdk ,icedtea-8
3749 #:tests? #f; FIXME: how to run the tests?
3750 #:phases
3751 (modify-phases %standard-phases
3752 (add-before 'build 'copy-resources
3753 (lambda _
3754 (copy-recursively "src/main/resources" "build/classes")
3755 (substitute* (find-files "build/classes")
3756 (("\\$\\{project.version\\}") ,version))
3757 #t))
3758 (add-before 'build 'generate-plexus-compontent
3759 (lambda _
3760 (mkdir-p "build/classes/META-INF/plexus")
3761 ;; This file is required for plexus to inject this package.
3762 ;; FIXME: how is it generated?
3763 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3764 (lambda _
3765 (display
3766 "<component-set>\n
3767 <components>\n
3768 <component>\n
3769 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3770 <role-hint>default</role-hint>\n
3771 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3772 <description>Filesystem based non-incremental build context implementation\n
3773which behaves as if all files were just created.</description>\n
3774 </component>\n
3775 </components>\n
3776</component-set>\n")))
3777 #t)))))
3778 (inputs
3779 `(("java-plexus-utils" ,java-plexus-utils)
3780 ("java-plexus-container-default" ,java-plexus-container-default)))
3781 (home-page "https://github.com/sonatype/sisu-build-api/")
3782 (synopsis "Base build API for maven")
3783 (description "This package contains the base build API for maven and
3784a default implementation of it. This API is about scanning files in a
3785project and determining what files need to be rebuilt.")
3786 (license license:asl2.0)))
3787
3788(define-public java-modello-core
3789 (package
3790 (name "java-modello-core")
3791 (version "1.9.1")
3792 (source (origin
3793 (method url-fetch)
3794 (uri (string-append "https://github.com/codehaus-plexus/modello"
3795 "/archive/modello-" version ".tar.gz"))
3796 (sha256
3797 (base32
3798 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3799 (build-system ant-build-system)
3800 (arguments
3801 `(#:jar-name "modello-core.jar"
3802 #:source-dir "modello-core/src/main/java"
3803 #:test-dir "modello-core/src/test"
3804 #:main-class "org.codehaus.modello.ModelloCli"
3805 #:jdk ,icedtea-8
3806 #:phases
3807 (modify-phases %standard-phases
3808 (add-before 'build 'copy-resources
3809 (lambda _
3810 (mkdir-p "build/classes/META-INF/plexus")
3811 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3812 "build/classes/META-INF/plexus/components.xml")
3813 #t))
3814 (add-before 'check 'fix-tests
3815 (lambda _
3816 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3817 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3818 "modello/core/io/ModelReaderTest.java")
3819 (("src/test") "modello-core/src/test")))
3820 #t)))))
3821 (inputs
3822 `(("java-plexus-utils" ,java-plexus-utils)
3823 ("java-plexus-container-default" ,java-plexus-container-default)
3824 ("java-sisu-build-api" ,java-sisu-build-api)))
3825 (native-inputs
3826 `(("java-junit" ,java-junit)
3827 ("java-plexus-classworlds" ,java-plexus-classworlds)
3828 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3829 ("java-guava" ,java-guava)))
3830 (home-page "http://codehaus-plexus.github.io/modello/")
3831 (synopsis "Framework for code generation from a simple model")
3832 (description "Modello is a framework for code generation from a simple model.
3833
3834Modello generates code from a simple model format: based on a plugin
3835architecture, various types of code and descriptors can be generated from the
3836single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3837XSD and documentation.")
3838 (license (list
3839 license:expat
3840 ;; Although this package uses only files licensed under expat,
3841 ;; other parts of the source are licensed under different
3842 ;; licenses. We include them to be inherited by other packages.
3843 license:asl2.0
3844 ;; Some files in modello-plugin-java are licensed under a
3845 ;; 5-clause BSD license.
3846 (license:non-copyleft
3847 (string-append "file:///modello-plugins/modello-plugin-java/"
3848 "src/main/java/org/codehaus/modello/plugin/"
3849 "java/javasource/JNaming.java"))))))
3850
3851(define-public java-modello-plugins-java
3852 (package
3853 (inherit java-modello-core)
3854 (name "java-modello-plugins-java")
3855 (arguments
3856 `(#:jar-name "modello-plugins-java.jar"
3857 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3858 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3859 #:jdk ,icedtea-8
3860 #:tests? #f; requires maven-model, which depends on this package
3861 #:phases
3862 (modify-phases %standard-phases
3863 (add-before 'build 'copy-resources
3864 (lambda _
3865 (mkdir-p "build/classes")
3866 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3867 "build/classes")
3868 #t)))))
3869 (inputs
3870 `(("java-modello-core" ,java-modello-core)
3871 ,@(package-inputs java-modello-core)))
3872 (synopsis "Modello Java Plugin")
3873 (description "Modello Java Plugin generates Java objects for the model.")))
3874
3875(define-public java-modello-plugins-xml
3876 (package
3877 (inherit java-modello-core)
3878 (name "java-modello-plugins-xml")
3879 (arguments
3880 `(#:jar-name "modello-plugins-xml.jar"
3881 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3882 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3883 #:jdk ,icedtea-8
3884 #:phases
3885 (modify-phases %standard-phases
3886 (add-before 'build 'copy-resources
3887 (lambda _
3888 (mkdir-p "build/classes")
3889 (copy-recursively
3890 "modello-plugins/modello-plugin-xml/src/main/resources"
3891 "build/classes")
3892 #t))
3893 (add-before 'check 'fix-paths
3894 (lambda _
3895 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3896 (substitute*
3897 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3898 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
3899 #t)))))
3900 (inputs
3901 `(("java-modello-core" ,java-modello-core)
3902 ("java-modello-plugins-java" ,java-modello-plugins-java)
3903 ,@(package-inputs java-modello-core)))
3904 (synopsis "Modello XML Plugin")
3905 (description "Modello XML Plugin contains shared code for every plugins
3906working on XML representation of the model.")))
3907
3908(define-public java-modello-test
3909 (package
3910 (inherit java-modello-core)
3911 (name "java-modello-test")
3912 (arguments
3913 `(#:jar-name "modello-test.jar"
3914 #:source-dir "modello-test/src/main/java"
3915 #:tests? #f; no tests
3916 #:jdk ,icedtea-8))
3917 (inputs
3918 `(("java-plexus-utils" ,java-plexus-utils)
3919 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3920 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3921 ("java-plexus-container-default" ,java-plexus-container-default)))
3922 (synopsis "Modello test package")
3923 (description "The modello test package contains the basis to create
3924Modello generator unit-tests, including sample models and xml files to test
3925every feature for every plugin.")))
3926
3927(define-public java-modello-plugins-xpp3
3928 (package
3929 (inherit java-modello-core)
3930 (name "java-modello-plugins-xpp3")
3931 (arguments
3932 `(#:jar-name "modello-plugins-xpp3.jar"
3933 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3934 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3935 ;; One of the test dependencies is maven-model which depends on this package.
3936 #:tests? #f
3937 #:jdk ,icedtea-8
3938 #:phases
3939 (modify-phases %standard-phases
3940 (add-before 'build 'copy-resources
3941 (lambda _
3942 (mkdir-p "build/classes")
3943 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3944 "build/classes")
3945 #t)))))
3946 (inputs
3947 `(("java-modello-core" ,java-modello-core)
3948 ("java-modello-plugins-java" ,java-modello-plugins-java)
3949 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3950 ,@(package-inputs java-modello-core)))
3951 (native-inputs
3952 `(("java-xmlunit" ,java-xmlunit)
3953 ("java-modello-test" ,java-modello-test)
3954 ,@(package-native-inputs java-modello-core)))
3955 (synopsis "Modello XPP3 Plugin")
3956 (description "The modello XPP3 plugin generates XML readers and writers based
3957on the XPP3 API (XML Pull Parser).")))
3958
3959(define-public java-asm
3960 (package
3961 (name "java-asm")
3962 (version "6.0")
3963 (source (origin
3964 (method url-fetch)
3965 (uri (string-append "http://download.forge.ow2.org/asm/"
3966 "asm-" version ".tar.gz"))
3967 (sha256
3968 (base32
3969 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3970 (build-system ant-build-system)
3971 (propagated-inputs
3972 `(("java-aqute-bndlib" ,java-aqute-bndlib)
3973 ("java-aqute-libg" ,java-aqute-libg)))
3974 (arguments
3975 `(#:build-target "compile"
3976 ;; The tests require an old version of Janino, which no longer compiles
3977 ;; with the JDK7.
3978 #:tests? #f
3979 #:make-flags
3980 (list
3981 ;; We don't need these extra ant tasks, but the build system asks us to
3982 ;; provide a path anyway.
3983 "-Dobjectweb.ant.tasks.path=dummy-path"
3984 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3985 ;; used during the build automatically by ant-build-system, but
3986 ;; java-asm's build.xml fails unless we provide something here.
3987 "-Dbiz.aQute.bnd.path=dummy-path")
3988 #:phases
3989 (modify-phases %standard-phases
3990 (add-before 'install 'build-jars
3991 (lambda* (#:key make-flags #:allow-other-keys)
3992 ;; We cannot use the "jar" target because it depends on a couple
3993 ;; of unpackaged, complicated tools.
3994 (mkdir "dist")
3995 (invoke "jar"
3996 "-cf" (string-append "dist/asm-" ,version ".jar")
3997 "-C" "output/build/tmp" ".")))
3998 (replace 'install
3999 (install-jars "dist")))))
4000 (native-inputs
4001 `(("java-junit" ,java-junit)))
4002 (home-page "http://asm.ow2.org/")
4003 (synopsis "Very small and fast Java bytecode manipulation framework")
4004 (description "ASM is an all purpose Java bytecode manipulation and
4005analysis framework. It can be used to modify existing classes or dynamically
4006generate classes, directly in binary form. The provided common
4007transformations and analysis algorithms allow to easily assemble custom
4008complex transformations and code analysis tools.")
4009 (license license:bsd-3)))
4010
4011(define java-asm-bootstrap
4012 (package
4013 (inherit java-asm)
4014 (name "java-asm-bootstrap")
4015 (arguments
4016 (substitute-keyword-arguments (package-arguments java-asm)
4017 ((#:tests? _) #f)))
4018 (native-inputs `())
4019 (propagated-inputs
4020 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4021 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4022 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4023 (delete `("java-aqute-libg" ,java-aqute-libg)
4024 (package-inputs java-asm)))))))
4025
4026(define-public java-cglib
4027 (package
4028 (name "java-cglib")
4029 (version "3.2.4")
4030 (source
4031 (origin
4032 (method git-fetch)
4033 (uri (git-reference
4034 (url "https://github.com/cglib/cglib.git")
4035 (commit (string-append
4036 "RELEASE_"
4037 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4038 version)))))
4039 (file-name (git-file-name name version))
4040 (sha256
4041 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4042 (build-system ant-build-system)
4043 (arguments
4044 `(;; FIXME: tests fail because junit runs
4045 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4046 ;; to describe a test at all.
4047 #:tests? #f
4048 #:jar-name "cglib.jar"
4049 #:phases
4050 (modify-phases %standard-phases
4051 (add-after 'unpack 'chdir
4052 (lambda _ (chdir "cglib") #t)))))
4053 (inputs
4054 `(("java-asm" ,java-asm)
4055 ("java-junit" ,java-junit)))
4056 (home-page "https://github.com/cglib/cglib/")
4057 (synopsis "Java byte code generation library")
4058 (description "The byte code generation library CGLIB is a high level API
4059to generate and transform Java byte code.")
4060 (license license:asl2.0)))
4061
4062(define-public java-objenesis
4063 (package
4064 (name "java-objenesis")
4065 (version "2.5.1")
4066 (source (origin
4067 (method url-fetch)
4068 (uri (string-append "https://github.com/easymock/objenesis/"
4069 "archive/" version ".tar.gz"))
4070 (file-name (string-append "objenesis-" version ".tar.gz"))
4071 (sha256
4072 (base32
4073 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4074 (build-system ant-build-system)
4075 (arguments
4076 `(#:jar-name "objenesis.jar"
4077 #:source-dir "main/src/"
4078 #:test-dir "main/src/test/"))
4079 (native-inputs
4080 `(("java-junit" ,java-junit)
4081 ("java-hamcrest-core" ,java-hamcrest-core)))
4082 (home-page "http://objenesis.org/")
4083 (synopsis "Bypass the constructor when creating an object")
4084 (description "Objenesis is a small Java library that serves one purpose:
4085to instantiate a new object of a particular class. It is common to see
4086restrictions in libraries stating that classes must require a default
4087constructor. Objenesis aims to overcome these restrictions by bypassing the
4088constructor on object instantiation.")
4089 (license license:asl2.0)))
4090
4091(define-public java-easymock
4092 (package
4093 (name "java-easymock")
4094 (version "3.4")
4095 (source (origin
4096 (method url-fetch)
4097 (uri (string-append "https://github.com/easymock/easymock/"
4098 "archive/easymock-" version ".tar.gz"))
4099 (sha256
4100 (base32
4101 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4102 (build-system ant-build-system)
4103 (arguments
4104 `(#:jar-name "easymock.jar"
4105 #:source-dir "core/src/main"
4106 #:test-dir "core/src/test"
4107 #:phases
4108 (modify-phases %standard-phases
4109 ;; FIXME: Android support requires the following packages to be
4110 ;; available: com.google.dexmaker.stock.ProxyBuilder
4111 (add-after 'unpack 'delete-android-support
4112 (lambda _
4113 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4114 (substitute* "MocksControl.java"
4115 (("AndroidSupport.isAndroid\\(\\)") "false")
4116 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4117 (delete-file "AndroidClassProxyFactory.java"))
4118 #t))
4119 (add-after 'unpack 'delete-broken-tests
4120 (lambda _
4121 (with-directory-excursion "core/src/test/java/org/easymock"
4122 ;; This test depends on dexmaker.
4123 (delete-file "tests2/ClassExtensionHelperTest.java")
4124
4125 ;; This is not a test.
4126 (delete-file "tests/BaseEasyMockRunnerTest.java")
4127
4128 ;; This test should be executed with a different runner...
4129 (delete-file "tests2/EasyMockAnnotationsTest.java")
4130 ;; ...but deleting it means that we also have to delete these
4131 ;; dependent files.
4132 (delete-file "tests2/EasyMockRunnerTest.java")
4133 (delete-file "tests2/EasyMockRuleTest.java")
4134
4135 ;; This test fails because the file "easymock.properties" does
4136 ;; not exist.
4137 (delete-file "tests2/EasyMockPropertiesTest.java"))
4138 #t)))))
4139 (inputs
4140 `(("java-asm" ,java-asm)
4141 ("java-cglib" ,java-cglib)
4142 ("java-objenesis" ,java-objenesis)))
4143 (native-inputs
4144 `(("java-junit" ,java-junit)
4145 ("java-hamcrest-core" ,java-hamcrest-core)))
4146 (home-page "http://easymock.org")
4147 (synopsis "Java library providing mock objects for unit tests")
4148 (description "EasyMock is a Java library that provides an easy way to use
4149mock objects in unit testing.")
4150 (license license:asl2.0)))
4151
4152(define-public java-jmock-1
4153 (package
4154 (name "java-jmock")
4155 (version "1.2.0")
4156 (source (origin
4157 (method url-fetch)
4158 (uri (string-append "https://github.com/jmock-developers/"
4159 "jmock-library/archive/" version ".tar.gz"))
4160 (file-name (string-append "jmock-" version ".tar.gz"))
4161 (sha256
4162 (base32
4163 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4164 (build-system ant-build-system)
4165 (arguments
4166 `(#:build-target "jars"
4167 #:test-target "run.tests"
4168 #:phases
4169 (modify-phases %standard-phases
4170 (replace 'install (install-jars "build")))))
4171 (home-page "http://www.jmock.org")
4172 (synopsis "Mock object library for test-driven development")
4173 (description "JMock is a library that supports test-driven development of
4174Java code with mock objects. Mock objects help you design and test the
4175interactions between the objects in your programs.
4176
4177The jMock library
4178
4179@itemize
4180@item makes it quick and easy to define mock objects
4181@item lets you precisely specify the interactions between
4182 your objects, reducing the brittleness of your tests
4183@item plugs into your favourite test framework
4184@item is easy to extend.
4185@end itemize\n")
4186 (license license:bsd-3)))
4187
4188(define-public java-jmock
4189 (package
4190 (inherit java-jmock-1)
4191 (name "java-jmock")
4192 (version "2.8.2")
4193 (source (origin
4194 (method url-fetch)
4195 (uri (string-append "https://github.com/jmock-developers/"
4196 "jmock-library/archive/" version ".tar.gz"))
4197 (file-name (string-append name "-" version ".tar.gz"))
4198 (sha256
4199 (base32
4200 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4201 (inputs
4202 `(("java-hamcrest-all" ,java-hamcrest-all)
4203 ("java-asm" ,java-asm)
4204 ("java-bsh" ,java-bsh)
4205 ("java-junit" ,java-junit)))
4206 (native-inputs
4207 `(("cglib" ,java-cglib)))
4208 (arguments
4209 `(#:jar-name "java-jmock.jar"
4210 #:source-dir "jmock/src/main/java"
4211 #:test-dir "jmock/src/test"))))
4212
4213(define-public java-jmock-junit4
4214 (package
4215 (inherit java-jmock)
4216 (name "java-jmock-junit4")
4217 (arguments
4218 `(#:jar-name "java-jmock-junit4.jar"
4219 #:source-dir "jmock-junit4/src/main/java"
4220 #:test-dir "jmock-junit4/src/test"))
4221 (inputs
4222 `(("java-hamcrest-all" ,java-hamcrest-all)
4223 ("java-asm" ,java-asm)
4224 ("java-bsh" ,java-bsh)
4225 ("java-jmock" ,java-jmock)
4226 ("java-jumit" ,java-junit)))))
4227
4228(define-public java-jmock-legacy
4229 (package
4230 (inherit java-jmock)
4231 (name "java-jmock-legacy")
4232 (arguments
4233 `(#:jar-name "java-jmock-legacy.jar"
4234 #:source-dir "jmock-legacy/src/main/java"
4235 #:test-dir "jmock-legacy/src/test"
4236 #:phases
4237 (modify-phases %standard-phases
4238 (add-before 'check 'copy-tests
4239 (lambda _
4240 ;; This file is a dependancy of some tests
4241 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4242 (copy-file (string-append "jmock/src/test/java/" file)
4243 (string-append "jmock-legacy/src/test/java/" file))
4244 #t))))))
4245 (inputs
4246 `(("java-hamcrest-all" ,java-hamcrest-all)
4247 ("java-objenesis" ,java-objenesis)
4248 ("java-cglib" ,java-cglib)
4249 ("java-jmock" ,java-jmock)
4250 ("java-asm" ,java-asm)
4251 ("java-bsh" ,java-bsh)
4252 ("java-junit" ,java-junit)))
4253 (native-inputs
4254 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4255
4256(define-public java-hamcrest-all
4257 (package (inherit java-hamcrest-core)
4258 (name "java-hamcrest-all")
4259 (arguments
4260 `(#:jdk ,icedtea-8
4261 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4262 ((#:build-target _) "bigjar")
4263 ((#:phases phases)
4264 `(modify-phases ,phases
4265 ;; Some build targets override the classpath, so we need to patch
4266 ;; the build.xml to ensure that required dependencies are on the
4267 ;; classpath.
4268 (add-after 'unpack 'patch-classpath-for-integration
4269 (lambda* (#:key inputs #:allow-other-keys)
4270 (substitute* "build.xml"
4271 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4272 (string-join
4273 (cons line
4274 (append
4275 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4276 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4277 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4278 ";"))
4279 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4280 (string-append (assoc-ref inputs "java-hamcrest-core")
4281 "/share/java/hamcrest-core.jar")))
4282 #t)))))))
4283 (inputs
4284 `(("java-junit" ,java-junit)
4285 ("java-jmock" ,java-jmock-1)
4286 ;; This is necessary because of what seems to be a race condition.
4287 ;; This package would sometimes fail to build because hamcrest-core.jar
4288 ;; could not be found, even though it is built as part of this package.
4289 ;; Adding java-hamcrest-core appears to fix this problem. See
4290 ;; https://debbugs.gnu.org/31390 for more information.
4291 ("java-hamcrest-core" ,java-hamcrest-core)
4292 ("java-easymock" ,java-easymock)
4293 ,@(package-inputs java-hamcrest-core)))))
4294
4295(define-public java-jopt-simple
4296 (package
4297 (name "java-jopt-simple")
4298 (version "5.0.3")
4299 (source (origin
4300 (method url-fetch)
4301 (uri (string-append "http://repo1.maven.org/maven2/"
4302 "net/sf/jopt-simple/jopt-simple/"
4303 version "/jopt-simple-"
4304 version "-sources.jar"))
4305 (sha256
4306 (base32
4307 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4308 (build-system ant-build-system)
4309 (arguments
4310 `(#:tests? #f ; there are no tests
4311 #:jar-name "jopt-simple.jar"))
4312 (home-page "https://pholser.github.io/jopt-simple/")
4313 (synopsis "Java library for parsing command line options")
4314 (description "JOpt Simple is a Java library for parsing command line
4315options, such as those you might pass to an invocation of @code{javac}. In
4316the interest of striving for simplicity, as closely as possible JOpt Simple
4317attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4318GNU @code{getopt_long}. It also aims to make option parser configuration and
4319retrieval of options and their arguments simple and expressive, without being
4320overly clever.")
4321 (license license:expat)))
4322
4323(define-public java-commons-math3
4324 (package
4325 (name "java-commons-math3")
4326 (version "3.6.1")
4327 (source (origin
4328 (method url-fetch)
4329 (uri (string-append "mirror://apache/commons/math/source/"
4330 "commons-math3-" version "-src.tar.gz"))
4331 (sha256
4332 (base32
4333 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4334 (build-system ant-build-system)
4335 (arguments
4336 `(#:build-target "jar"
4337 #:test-target "test"
4338 #:make-flags
4339 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4340 (junit (assoc-ref %build-inputs "java-junit")))
4341 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4342 (string-append "-Dhamcrest.jar=" hamcrest
4343 "/share/java/hamcrest-core.jar")))
4344 #:phases
4345 (modify-phases %standard-phases
4346 ;; We want to build the jar in the build phase and run the tests
4347 ;; later in a separate phase.
4348 (add-after 'unpack 'untangle-targets
4349 (lambda _
4350 (substitute* "build.xml"
4351 (("name=\"jar\" depends=\"test\"")
4352 "name=\"jar\" depends=\"compile\""))
4353 #t))
4354 ;; There is no install target.
4355 (replace 'install
4356 (install-jars "target")))))
4357 (native-inputs
4358 `(("java-junit" ,java-junit)
4359 ("java-hamcrest-core" ,java-hamcrest-core)))
4360 (home-page "http://commons.apache.org/math/")
4361 (synopsis "Apache Commons mathematics library")
4362 (description "Commons Math is a library of lightweight, self-contained
4363mathematics and statistics components addressing the most common problems not
4364available in the Java programming language or Commons Lang.")
4365 (license license:asl2.0)))
4366
4367(define-public java-jmh
4368 (package
4369 (name "java-jmh")
4370 (version "1.17.5")
4371 (source (origin
4372 (method hg-fetch)
4373 (uri (hg-reference
4374 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4375 (changeset version)))
4376 (file-name (string-append name "-" version "-checkout"))
4377 (sha256
4378 (base32
4379 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4380 (build-system ant-build-system)
4381 (arguments
4382 `(#:jar-name "jmh-core.jar"
4383 #:source-dir "jmh-core/src/main"
4384 #:test-dir "jmh-core/src/test"
4385 #:phases
4386 (modify-phases %standard-phases
4387 ;; This seems to be a bug in the JDK. It may not be necessary in
4388 ;; future versions of the JDK.
4389 (add-after 'unpack 'fix-bug
4390 (lambda _
4391 (with-directory-excursion
4392 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4393 (substitute* '("IntegerValueConverter.java"
4394 "ThreadsValueConverter.java")
4395 (("public Class<Integer> valueType")
4396 "public Class<? extends Integer> valueType")))
4397 #t)))))
4398 (inputs
4399 `(("java-jopt-simple" ,java-jopt-simple)
4400 ("java-commons-math3" ,java-commons-math3)))
4401 (native-inputs
4402 `(("java-junit" ,java-junit)
4403 ("java-hamcrest-core" ,java-hamcrest-core)))
4404 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4405 (synopsis "Benchmark harness for the JVM")
4406 (description "JMH is a Java harness for building, running, and analysing
4407nano/micro/milli/macro benchmarks written in Java and other languages
4408targeting the JVM.")
4409 ;; GPLv2 only
4410 (license license:gpl2)))
4411
4412(define-public java-commons-collections4
4413 (package
4414 (name "java-commons-collections4")
4415 (version "4.1")
4416 (source (origin
4417 (method url-fetch)
4418 (uri (string-append "mirror://apache/commons/collections/source/"
4419 "commons-collections4-" version "-src.tar.gz"))
4420 (sha256
4421 (base32
4422 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4423 (build-system ant-build-system)
4424 (arguments
4425 `(#:test-target "test"
4426 #:make-flags
4427 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4428 (junit (assoc-ref %build-inputs "java-junit"))
4429 (easymock (assoc-ref %build-inputs "java-easymock")))
4430 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4431 (string-append "-Dhamcrest.jar=" hamcrest
4432 "/share/java/hamcrest-core.jar")
4433 (string-append "-Deasymock.jar=" easymock
4434 "/share/java/easymock.jar")))
4435 #:phases
4436 (modify-phases %standard-phases
4437 (replace 'install
4438 (install-jars "target")))))
4439 (native-inputs
4440 `(("java-junit" ,java-junit)
4441 ("java-hamcrest-core" ,java-hamcrest-core)
4442 ("java-easymock" ,java-easymock)))
4443 (home-page "http://commons.apache.org/collections/")
4444 (synopsis "Collections framework")
4445 (description "The Java Collections Framework is the recognised standard
4446for collection handling in Java. Commons-Collections seek to build upon the
4447JDK classes by providing new interfaces, implementations and utilities. There
4448are many features, including:
4449
4450@itemize
4451@item @code{Bag} interface for collections that have a number of copies of
4452 each object
4453@item @code{BidiMap} interface for maps that can be looked up from value to
4454 key as well and key to value
4455@item @code{MapIterator} interface to provide simple and quick iteration over
4456 maps
4457@item Transforming decorators that alter each object as it is added to the
4458 collection
4459@item Composite collections that make multiple collections look like one
4460@item Ordered maps and sets that retain the order elements are added in,
4461 including an LRU based map
4462@item Reference map that allows keys and/or values to be garbage collected
4463 under close control
4464@item Many comparator implementations
4465@item Many iterator implementations
4466@item Adapter classes from array and enumerations to collections
4467@item Utilities to test or create typical set-theory properties of collections
4468 such as union, intersection, and closure.
4469@end itemize\n")
4470 (license license:asl2.0)))
4471
4472(define-public java-commons-collections
4473 (package
4474 (inherit java-commons-collections4)
4475 (name "java-commons-collections")
4476 (version "3.2.2")
4477 (source (origin
4478 (method url-fetch)
4479 (uri (string-append "mirror://apache/commons/collections/source/"
4480 "commons-collections-" version "-src.tar.gz"))
4481 (sha256
4482 (base32
4483 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4484 (patches
4485 (search-patches "java-commons-collections-fix-java8.patch"))))
4486 (arguments
4487 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4488 ((#:phases phases)
4489 `(modify-phases ,phases
4490 ;; The manifest is required by the build procedure
4491 (add-before 'build 'add-manifest
4492 (lambda _
4493 (mkdir-p "build/conf")
4494 (call-with-output-file "build/conf/MANIFEST.MF"
4495 (lambda (file)
4496 (format file "Manifest-Version: 1.0\n")))
4497 #t))
4498 (replace 'install
4499 (install-jars "build"))))))))
4500
4501(define java-commons-collections-test-classes
4502 (package
4503 (inherit java-commons-collections)
4504 (arguments
4505 `(#:jar-name "commons-collections-test-classes.jar"
4506 #:source-dir "src/test"
4507 #:tests? #f))
4508 (inputs
4509 `(("collection" ,java-commons-collections)))))
4510
4511(define-public java-commons-beanutils
4512 (package
4513 (name "java-commons-beanutils")
4514 (version "1.9.3")
4515 (source (origin
4516 (method url-fetch)
4517 (uri (string-append "mirror://apache/commons/beanutils/source/"
4518 "commons-beanutils-" version "-src.tar.gz"))
4519 (sha256
4520 (base32
4521 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4522 (build-system ant-build-system)
4523 (arguments
4524 `(#:test-target "test"
4525 #:tests? #f
4526 #:phases
4527 (modify-phases %standard-phases
4528 (replace 'install
4529 (lambda* (#:key outputs #:allow-other-keys)
4530 (rename-file (string-append "dist/commons-beanutils-" ,version
4531 "-SNAPSHOT.jar")
4532 "commons-beanutils.jar")
4533 (install-file "commons-beanutils.jar"
4534 (string-append (assoc-ref outputs "out") "/share/java/"))
4535 #t)))))
4536 (inputs
4537 `(("logging" ,java-commons-logging-minimal)
4538 ("collections" ,java-commons-collections)))
4539 (native-inputs
4540 `(("junit" ,java-junit)
4541 ("collections-test" ,java-commons-collections-test-classes)))
4542 (home-page "http://commons.apache.org/beanutils/")
4543 (synopsis "Dynamically set or get properties in Java")
4544 (description "BeanUtils provides a simplified interface to reflection and
4545introspection to set or get dynamically determined properties through their
4546setter and getter method.")
4547 (license license:asl2.0)))
4548
4549(define-public java-commons-io
4550 (package
4551 (name "java-commons-io")
4552 (version "2.5")
4553 (source
4554 (origin
4555 (method url-fetch)
4556 (uri (string-append "mirror://apache/commons/io/source/"
4557 "commons-io-" version "-src.tar.gz"))
4558 (sha256
4559 (base32
4560 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4561 (build-system ant-build-system)
4562 (outputs '("out" "doc"))
4563 (arguments
4564 `(#:test-target "test"
4565 #:make-flags
4566 (list (string-append "-Djunit.jar="
4567 (assoc-ref %build-inputs "java-junit")
4568 "/share/java/junit.jar"))
4569 #:phases
4570 (modify-phases %standard-phases
4571 (add-after 'build 'build-javadoc ant-build-javadoc)
4572 (replace 'install (install-jars "target"))
4573 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4574 (native-inputs
4575 `(("java-junit" ,java-junit)
4576 ("java-hamcrest-core" ,java-hamcrest-core)))
4577 (home-page "http://commons.apache.org/io/")
4578 (synopsis "Common useful IO related classes")
4579 (description "Commons-IO contains utility classes, stream implementations,
4580file filters and endian classes.")
4581 (license license:asl2.0)))
4582
4583(define-public java-commons-exec-1.1
4584 (package
4585 (name "java-commons-exec")
4586 (version "1.1")
4587 (source
4588 (origin
4589 (method url-fetch)
4590 (uri (string-append "mirror://apache/commons/exec/source/"
4591 "commons-exec-" version "-src.tar.gz"))
4592 (sha256
4593 (base32
4594 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4595 (build-system ant-build-system)
4596 (arguments
4597 `(#:test-target "test"
4598 #:make-flags
4599 (list (string-append "-Dmaven.junit.jar="
4600 (assoc-ref %build-inputs "java-junit")
4601 "/share/java/junit.jar"))
4602 #:phases
4603 (modify-phases %standard-phases
4604 (add-before 'build 'delete-network-tests
4605 (lambda _
4606 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4607 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4608 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4609 #t))
4610 ;; The "build" phase automatically tests.
4611 (delete 'check)
4612 (replace 'install (install-jars "target")))))
4613 (native-inputs
4614 `(("java-junit" ,java-junit)))
4615 (home-page "http://commons.apache.org/proper/commons-exec/")
4616 (synopsis "Common program execution related classes")
4617 (description "Commons-Exec simplifies executing external processes.")
4618 (license license:asl2.0)))
4619
4620(define-public java-commons-exec
4621 (package
4622 (inherit java-commons-exec-1.1)
4623 (version "1.3")
4624 (source
4625 (origin
4626 (method url-fetch)
4627 (uri (string-append "mirror://apache/commons/exec/source/"
4628 "commons-exec-" version "-src.tar.gz"))
4629 (sha256
4630 (base32
4631 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4632 (arguments
4633 `(#:test-target "test"
4634 #:make-flags
4635 (list (string-append "-Dmaven.junit.jar="
4636 (assoc-ref %build-inputs "java-junit")
4637 "/share/java/junit.jar")
4638 "-Dmaven.compiler.source=1.7"
4639 "-Dmaven.compiler.target=1.7")
4640 #:phases
4641 (modify-phases %standard-phases
4642 (add-before 'build 'delete-network-tests
4643 (lambda* (#:key inputs #:allow-other-keys)
4644 ;; This test hangs indefinitely.
4645 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4646 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4647 (("ping -c 10 127.0.0.1") "sleep 10"))
4648 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4649 (("/bin/ls") "ls"))
4650 (call-with-output-file "src/test/scripts/ping.sh"
4651 (lambda (port)
4652 (format port "#!~a/bin/sh\nsleep $1\n"
4653 (assoc-ref inputs "bash"))))
4654 #t))
4655 ;; The "build" phase automatically tests.
4656 (delete 'check)
4657 (replace 'install (install-jars "target")))))
4658 (native-inputs
4659 `(("java-junit" ,java-junit)
4660 ("java-hamcrest-core" ,java-hamcrest-core)))))
4661
4662(define-public java-commons-lang
4663 (package
4664 (name "java-commons-lang")
4665 (version "2.6")
4666 (source
4667 (origin
4668 (method url-fetch)
4669 (uri (string-append "mirror://apache/commons/lang/source/"
4670 "commons-lang-" version "-src.tar.gz"))
4671 (sha256
4672 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4673 (build-system ant-build-system)
4674 (outputs '("out" "doc"))
4675 (arguments
4676 `(#:test-target "test"
4677 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4678 #:phases
4679 (modify-phases %standard-phases
4680 (add-after 'build 'build-javadoc ant-build-javadoc)
4681 (add-before 'check 'disable-failing-test
4682 (lambda _
4683 ;; Disable a failing test
4684 (substitute* "src/test/java/org/apache/commons/lang/\
4685time/FastDateFormatTest.java"
4686 (("public void testFormat\\(\\)")
4687 "public void disabled_testFormat()"))
4688 #t))
4689 (replace 'install (install-jars "target"))
4690 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4691 (native-inputs
4692 `(("java-junit" ,java-junit)))
4693 (home-page "http://commons.apache.org/lang/")
4694 (synopsis "Extension of the java.lang package")
4695 (description "The Commons Lang components contains a set of Java classes
4696that provide helper methods for standard Java classes, especially those found
4697in the @code{java.lang} package in the Sun JDK. The following classes are
4698included:
4699
4700@itemize
4701@item StringUtils - Helper for @code{java.lang.String}.
4702@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4703 of characters such as @code{[a-z]} and @code{[abcdez]}.
4704@item RandomStringUtils - Helper for creating randomised strings.
4705@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4706@item NumberRange - A range of numbers with an upper and lower bound.
4707@item ObjectUtils - Helper for @code{java.lang.Object}.
4708@item SerializationUtils - Helper for serializing objects.
4709@item SystemUtils - Utility class defining the Java system properties.
4710@item NestedException package - A sub-package for the creation of nested
4711 exceptions.
4712@item Enum package - A sub-package for the creation of enumerated types.
4713@item Builder package - A sub-package for the creation of @code{equals},
4714 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4715@end itemize\n")
4716 (license license:asl2.0)))
4717
4718(define-public java-commons-lang3
4719 (package
4720 (name "java-commons-lang3")
4721 (version "3.4")
4722 (source
4723 (origin
4724 (method url-fetch)
4725 (uri (string-append "mirror://apache/commons/lang/source/"
4726 "commons-lang3-" version "-src.tar.gz"))
4727 (sha256
4728 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4729 (build-system ant-build-system)
4730 (outputs '("out" "doc"))
4731 (arguments
4732 `(#:test-target "test"
4733 #:make-flags
4734 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4735 (junit (assoc-ref %build-inputs "java-junit"))
4736 (easymock (assoc-ref %build-inputs "java-easymock"))
4737 (io (assoc-ref %build-inputs "java-commons-io")))
4738 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4739 (string-append "-Dhamcrest.jar=" hamcrest
4740 "/share/java/hamcrest-all.jar")
4741 (string-append "-Dcommons-io.jar=" io
4742 "/share/java/commons-io-"
4743 ,(package-version java-commons-io)
4744 "-SNAPSHOT.jar")
4745 (string-append "-Deasymock.jar=" easymock
4746 "/share/java/easymock.jar")))
4747 #:phases
4748 (modify-phases %standard-phases
4749 (add-after 'build 'build-javadoc ant-build-javadoc)
4750 (replace 'install (install-jars "target"))
4751 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4752 (native-inputs
4753 `(("java-junit" ,java-junit)
4754 ("java-commons-io" ,java-commons-io)
4755 ("java-hamcrest-all" ,java-hamcrest-all)
4756 ("java-easymock" ,java-easymock)))
4757 (home-page "http://commons.apache.org/lang/")
4758 (synopsis "Extension of the java.lang package")
4759 (description "The Commons Lang components contains a set of Java classes
4760that provide helper methods for standard Java classes, especially those found
4761in the @code{java.lang} package. The following classes are included:
4762
4763@itemize
4764@item StringUtils - Helper for @code{java.lang.String}.
4765@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4766 characters such as @code{[a-z]} and @code{[abcdez]}.
4767@item RandomStringUtils - Helper for creating randomised strings.
4768@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4769@item NumberRange - A range of numbers with an upper and lower bound.
4770@item ObjectUtils - Helper for @code{java.lang.Object}.
4771@item SerializationUtils - Helper for serializing objects.
4772@item SystemUtils - Utility class defining the Java system properties.
4773@item NestedException package - A sub-package for the creation of nested
4774 exceptions.
4775@item Enum package - A sub-package for the creation of enumerated types.
4776@item Builder package - A sub-package for the creation of @code{equals},
4777 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4778@end itemize\n")
4779 (license license:asl2.0)))
4780
4781(define-public java-commons-bsf
4782 (package
4783 (name "java-commons-bsf")
4784 (version "2.4.0")
4785 (source (origin
4786 (method url-fetch)
4787 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4788 version ".tar.gz"))
4789 (sha256
4790 (base32
4791 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4792 (modules '((guix build utils)))
4793 (snippet
4794 '(begin
4795 (for-each delete-file
4796 (find-files "." "\\.jar$"))
4797 #t))))
4798 (build-system ant-build-system)
4799 (arguments
4800 `(#:build-target "jar"
4801 #:tests? #f; No test file
4802 #:modules ((guix build ant-build-system)
4803 (guix build utils)
4804 (guix build java-utils)
4805 (sxml simple))
4806 #:phases
4807 (modify-phases %standard-phases
4808 (add-before 'build 'create-properties
4809 (lambda _
4810 ;; This file is missing from the distribution
4811 (call-with-output-file "build-properties.xml"
4812 (lambda (port)
4813 (sxml->xml
4814 `(project (@ (basedir ".") (name "build-properties") (default ""))
4815 (property (@ (name "project.name") (value "bsf")))
4816 (property (@ (name "source.level") (value "1.5")))
4817 (property (@ (name "build.lib") (value "build/jar")))
4818 (property (@ (name "src.dir") (value "src")))
4819 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4820 (property (@ (name "build.tests") (value "build/test-classes")))
4821 (property (@ (name "build.dest") (value "build/classes"))))
4822 port)))
4823 #t))
4824 (replace 'install (install-jars "build")))))
4825 (native-inputs
4826 `(("java-junit" ,java-junit)))
4827 (inputs
4828 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4829 (home-page "https://commons.apache.org/proper/commons-bsf")
4830 (synopsis "Bean Scripting Framework")
4831 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4832which provides scripting language support within Java applications, and access
4833to Java objects and methods from scripting languages. BSF allows one to write
4834JSPs in languages other than Java while providing access to the Java class
4835library. In addition, BSF permits any Java application to be implemented in
4836part (or dynamically extended) by a language that is embedded within it. This
4837is achieved by providing an API that permits calling scripting language engines
4838from within Java, as well as an object registry that exposes Java objects to
4839these scripting language engines.")
4840 (license license:asl2.0)))
4841
4842(define-public java-commons-jxpath
4843 (package
4844 (name "java-commons-jxpath")
4845 (version "1.3")
4846 (source (origin
4847 (method url-fetch)
4848 (uri (string-append "mirror://apache/commons/jxpath/source/"
4849 "commons-jxpath-" version "-src.tar.gz"))
4850 (sha256
4851 (base32
4852 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4853 (build-system ant-build-system)
4854 (arguments
4855 `(#:jar-name "commons-jxpath.jar"
4856 ;; tests require more dependencies, including mockrunner which depends on old software
4857 #:tests? #f
4858 #:source-dir "src/java"))
4859 (inputs
4860 `(("servlet" ,java-classpathx-servletapi)
4861 ("java-jdom" ,java-jdom)
4862 ("java-commons-beanutils" ,java-commons-beanutils)))
4863 (native-inputs
4864 `(("java-junit" ,java-junit)))
4865 (home-page "http://commons.apache.org/jxpath/")
4866 (synopsis "Simple interpreter of an expression language called XPath.")
4867 (description "The org.apache.commons.jxpath package defines a simple
4868interpreter of an expression language called XPath. JXPath applies XPath
4869expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4870contexts, DOM etc, including mixtures thereof.")
4871 (license license:asl2.0)))
4872
4873(define-public java-jsr250
4874 (package
4875 (name "java-jsr250")
4876 (version "1.3")
4877 (source (origin
4878 (method url-fetch)
4879 (uri (string-append "https://repo1.maven.org/maven2/"
4880 "javax/annotation/javax.annotation-api/"
4881 version "/javax.annotation-api-"
4882 version "-sources.jar"))
4883 (sha256
4884 (base32
4885 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4886 (build-system ant-build-system)
4887 (arguments
4888 `(#:tests? #f ; no tests included
4889 #:jdk ,icedtea-8
4890 #:jar-name "jsr250.jar"))
4891 (home-page "https://jcp.org/en/jsr/detail?id=250")
4892 (synopsis "Security-related annotations")
4893 (description "This package provides annotations for security. It provides
4894packages in the @code{javax.annotation} and @code{javax.annotation.security}
4895namespaces.")
4896 ;; either cddl or gpl2 only, with classpath exception
4897 (license (list license:cddl1.0
4898 license:gpl2))))
4899
4900(define-public java-jsr305
4901 (package
4902 (name "java-jsr305")
4903 (version "3.0.1")
4904 (source (origin
4905 (method url-fetch)
4906 (uri (string-append "https://repo1.maven.org/maven2/"
4907 "com/google/code/findbugs/"
4908 "jsr305/" version "/jsr305-"
4909 version "-sources.jar"))
4910 (sha256
4911 (base32
4912 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4913 (build-system ant-build-system)
4914 (arguments
4915 `(#:tests? #f ; no tests included
4916 #:jar-name "jsr305.jar"))
4917 (home-page "http://findbugs.sourceforge.net/")
4918 (synopsis "Annotations for the static analyzer called findbugs")
4919 (description "This package provides annotations for the findbugs package.
4920It provides packages in the @code{javax.annotations} namespace.")
4921 (license license:asl2.0)))
4922
4923(define-public java-guava
4924 (package
4925 (name "java-guava")
4926 ;; This is the last release of Guava that can be built with Java 7.
4927 (version "20.0")
4928 (source (origin
4929 (method url-fetch)
4930 (uri (string-append "https://github.com/google/guava/"
4931 "releases/download/v" version
4932 "/guava-" version "-sources.jar"))
4933 (sha256
4934 (base32
4935 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4936 (build-system ant-build-system)
4937 (arguments
4938 `(#:tests? #f ; no tests included
4939 #:jar-name "guava.jar"
4940 #:phases
4941 (modify-phases %standard-phases
4942 (add-after 'unpack 'trim-sources
4943 (lambda _
4944 (with-directory-excursion "src/com/google/common"
4945 ;; Remove annotations to avoid extra dependencies:
4946 ;; * "j2objc" annotations are used when converting Java to
4947 ;; Objective C;
4948 ;; * "errorprone" annotations catch common Java mistakes at
4949 ;; compile time;
4950 ;; * "IgnoreJRERequirement" is used for Android.
4951 (substitute* (find-files "." "\\.java$")
4952 (("import com.google.j2objc.*") "")
4953 (("import com.google.errorprone.annotation.*") "")
4954 (("import org.codehaus.mojo.animal_sniffer.*") "")
4955 (("@CanIgnoreReturnValue") "")
4956 (("@LazyInit") "")
4957 (("@WeakOuter") "")
4958 (("@RetainedWith") "")
4959 (("@Weak") "")
4960 (("@ForOverride") "")
4961 (("@J2ObjCIncompatible") "")
4962 (("@IgnoreJRERequirement") "")))
4963 #t)))))
4964 (inputs
4965 `(("java-jsr305" ,java-jsr305)))
4966 (home-page "https://github.com/google/guava")
4967 (synopsis "Google core libraries for Java")
4968 (description "Guava is a set of core libraries that includes new
4969collection types (such as multimap and multiset), immutable collections, a
4970graph library, functional types, an in-memory cache, and APIs/utilities for
4971concurrency, I/O, hashing, primitives, reflection, string processing, and much
4972more!")
4973 (license license:asl2.0)))
4974
4975;; The java-commons-logging package provides adapters to many different
4976;; logging frameworks. To avoid an excessive dependency graph we try to build
4977;; it with only a minimal set of adapters.
4978(define-public java-commons-logging-minimal
4979 (package
4980 (name "java-commons-logging-minimal")
4981 (version "1.2")
4982 (source (origin
4983 (method url-fetch)
4984 (uri (string-append "mirror://apache/commons/logging/source/"
4985 "commons-logging-" version "-src.tar.gz"))
4986 (sha256
4987 (base32
4988 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4989 (build-system ant-build-system)
4990 (arguments
4991 `(#:tests? #f ; avoid dependency on logging frameworks
4992 #:jar-name "commons-logging-minimal.jar"
4993 #:phases
4994 (modify-phases %standard-phases
4995 (add-after 'unpack 'delete-adapters-and-tests
4996 (lambda _
4997 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4998 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4999 ;; is used by applications; SimpleLog is the only actually usable
5000 ;; implementation that does not depend on another logging
5001 ;; framework.
5002 (for-each
5003 (lambda (file)
5004 (delete-file (string-append
5005 "src/main/java/org/apache/commons/logging/impl/" file)))
5006 (list "Jdk13LumberjackLogger.java"
5007 "WeakHashtable.java"
5008 "Log4JLogger.java"
5009 "ServletContextCleaner.java"
5010 "Jdk14Logger.java"
5011 "AvalonLogger.java"
5012 "LogKitLogger.java"))
5013 (delete-file-recursively "src/test")
5014 #t)))))
5015 (home-page "http://commons.apache.org/logging/")
5016 (synopsis "Common API for logging implementations")
5017 (description "The Logging package is a thin bridge between different
5018logging implementations. A library that uses the commons-logging API can be
5019used with any logging implementation at runtime.")
5020 (license license:asl2.0)))
5021
5022;; This is the last release of the 1.x series.
5023(define-public java-mockito-1
5024 (package
5025 (name "java-mockito")
5026 (version "1.10.19")
5027 (source (origin
5028 (method url-fetch)
5029 (uri (string-append "http://repo1.maven.org/maven2/"
5030 "org/mockito/mockito-core/" version
5031 "/mockito-core-" version "-sources.jar"))
5032 (sha256
5033 (base32
5034 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5035 (build-system ant-build-system)
5036 (arguments
5037 `(#:jar-name "mockito.jar"
5038 #:tests? #f ; no tests included
5039 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5040 ;; patches in build phases.
5041 #:phases
5042 (modify-phases %standard-phases
5043 ;; Mockito was developed against a different version of hamcrest,
5044 ;; which does not require matcher implementations to provide an
5045 ;; implementation of the "describeMismatch" method. We add this
5046 ;; simple definition to pass the build with our version of hamcrest.
5047 (add-after 'unpack 'fix-hamcrest-build-error
5048 (lambda _
5049 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5050 (("public Matcher getActualMatcher\\(\\) .*" line)
5051 (string-append "
5052 public void describeMismatch(Object item, Description description) {
5053 actualMatcher.describeMismatch(item, description);
5054 }"
5055 line)))
5056 #t))
5057 ;; Mockito bundles cglib. We have a cglib package, so let's use
5058 ;; that instead.
5059 (add-after 'unpack 'use-system-libraries
5060 (lambda _
5061 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5062 (substitute* '("CGLIBHacker.java"
5063 "CglibMockMaker.java"
5064 "ClassImposterizer.java"
5065 "DelegatingMockitoMethodProxy.java"
5066 "MethodInterceptorFilter.java"
5067 "MockitoNamingPolicy.java"
5068 "SerializableMockitoMethodProxy.java"
5069 "SerializableNoOp.java")
5070 (("import org.mockito.cglib") "import net.sf.cglib")))
5071 #t)))))
5072 (inputs
5073 `(("java-junit" ,java-junit)
5074 ("java-objenesis" ,java-objenesis)
5075 ("java-cglib" ,java-cglib)
5076 ("java-hamcrest-core" ,java-hamcrest-core)))
5077 (home-page "http://mockito.org")
5078 (synopsis "Mockito is a mock library for Java")
5079 (description "Mockito is a mocking library for Java which lets you write
5080tests with a clean and simple API. It generates mocks using reflection, and
5081it records all mock invocations, including methods arguments.")
5082 (license license:asl2.0)))
5083
5084(define-public java-httpcomponents-httpcore
5085 (package
5086 (name "java-httpcomponents-httpcore")
5087 (version "4.4.6")
5088 (source (origin
5089 (method url-fetch)
5090 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5091 "source/httpcomponents-core-"
5092 version "-src.tar.gz"))
5093 (sha256
5094 (base32
5095 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5096 (build-system ant-build-system)
5097 (arguments
5098 `(#:jar-name "httpcomponents-httpcore.jar"
5099 #:phases
5100 (modify-phases %standard-phases
5101 (add-after 'unpack 'chdir
5102 (lambda _ (chdir "httpcore") #t)))))
5103 (inputs
5104 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5105 ("java-commons-lang3" ,java-commons-lang3)))
5106 (native-inputs
5107 `(("java-junit" ,java-junit)
5108 ("java-mockito" ,java-mockito-1)))
5109 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5110 (synopsis "Low level HTTP transport components")
5111 (description "HttpCore is a set of low level HTTP transport components
5112that can be used to build custom client and server side HTTP services with a
5113minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5114on the classic Java I/O and non-blocking, event driven I/O model based on Java
5115NIO.
5116
5117This package provides the blocking I/O model library.")
5118 (license license:asl2.0)))
5119
5120(define-public java-httpcomponents-httpcore-nio
5121 (package (inherit java-httpcomponents-httpcore)
5122 (name "java-httpcomponents-httpcore-nio")
5123 (arguments
5124 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5125 #:phases
5126 (modify-phases %standard-phases
5127 (add-after 'unpack 'chdir
5128 (lambda _ (chdir "httpcore-nio") #t)))))
5129 (inputs
5130 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5131 ("java-hamcrest-core" ,java-hamcrest-core)
5132 ,@(package-inputs java-httpcomponents-httpcore)))
5133 (description "HttpCore is a set of low level HTTP transport components
5134that can be used to build custom client and server side HTTP services with a
5135minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5136on the classic Java I/O and non-blocking, event driven I/O model based on Java
5137NIO.
5138
5139This package provides the non-blocking I/O model library based on Java
5140NIO.")))
5141
5142(define-public java-httpcomponents-httpcore-ab
5143 (package (inherit java-httpcomponents-httpcore)
5144 (name "java-httpcomponents-httpcore-ab")
5145 (arguments
5146 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5147 #:phases
5148 (modify-phases %standard-phases
5149 (add-after 'unpack 'chdir
5150 (lambda _ (chdir "httpcore-ab") #t)))))
5151 (inputs
5152 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5153 ("java-commons-cli" ,java-commons-cli)
5154 ("java-hamcrest-core" ,java-hamcrest-core)
5155 ,@(package-inputs java-httpcomponents-httpcore)))
5156 (synopsis "Apache HttpCore benchmarking tool")
5157 (description "This package provides the HttpCore benchmarking tool. It is
5158an Apache AB clone based on HttpCore.")))
5159
5160(define-public java-httpcomponents-httpclient
5161 (package
5162 (name "java-httpcomponents-httpclient")
5163 (version "4.5.3")
5164 (source (origin
5165 (method url-fetch)
5166 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5167 "source/httpcomponents-client-"
5168 version "-src.tar.gz"))
5169 (sha256
5170 (base32
5171 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5172 (build-system ant-build-system)
5173 (arguments
5174 `(#:jar-name "httpcomponents-httpclient.jar"
5175 #:phases
5176 (modify-phases %standard-phases
5177 (add-after 'unpack 'chdir
5178 (lambda _ (chdir "httpclient") #t)))))
5179 (inputs
5180 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5181 ("java-commons-codec" ,java-commons-codec)
5182 ("java-hamcrest-core" ,java-hamcrest-core)
5183 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5184 ("java-mockito" ,java-mockito-1)
5185 ("java-junit" ,java-junit)))
5186 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5187 (synopsis "HTTP client library for Java")
5188 (description "Although the @code{java.net} package provides basic
5189functionality for accessing resources via HTTP, it doesn't provide the full
5190flexibility or functionality needed by many applications. @code{HttpClient}
5191seeks to fill this void by providing an efficient, up-to-date, and
5192feature-rich package implementing the client side of the most recent HTTP
5193standards and recommendations.")
5194 (license license:asl2.0)))
5195
5196(define-public java-httpcomponents-httpmime
5197 (package (inherit java-httpcomponents-httpclient)
5198 (name "java-httpcomponents-httpmime")
5199 (arguments
5200 `(#:jar-name "httpcomponents-httpmime.jar"
5201 #:phases
5202 (modify-phases %standard-phases
5203 (add-after 'unpack 'chdir
5204 (lambda _ (chdir "httpmime") #t)))))
5205 (inputs
5206 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5207 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5208 ("java-junit" ,java-junit)
5209 ("java-hamcrest-core" ,java-hamcrest-core)))))
5210
5211(define-public java-commons-net
5212 (package
5213 (name "java-commons-net")
5214 (version "3.6")
5215 (source (origin
5216 (method url-fetch)
5217 (uri (string-append "mirror://apache/commons/net/source/"
5218 "commons-net-" version "-src.tar.gz"))
5219 (sha256
5220 (base32
5221 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5222 (build-system ant-build-system)
5223 (arguments
5224 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5225 ;; should be "resources/examples/examples.properties"), but gets "null"
5226 ;; instead.
5227 #:tests? #f
5228 #:jar-name "commons-net.jar"))
5229 (native-inputs
5230 `(("java-junit" ,java-junit)
5231 ("java-hamcrest-core" ,java-hamcrest-core)))
5232 (home-page "http://commons.apache.org/net/")
5233 (synopsis "Client library for many basic Internet protocols")
5234 (description "The Apache Commons Net library implements the client side of
5235many basic Internet protocols. The purpose of the library is to provide
5236fundamental protocol access, not higher-level abstractions.")
5237 (license license:asl2.0)))
5238
5239(define-public java-jsch
5240 (package
5241 (name "java-jsch")
5242 (version "0.1.55")
5243 (source (origin
5244 (method url-fetch)
5245 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5246 version "/jsch-" version ".zip"))
5247 (sha256
5248 (base32
5249 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5250 (build-system ant-build-system)
5251 (arguments
5252 `(#:build-target "dist"
5253 #:tests? #f ; no tests included
5254 #:phases
5255 (modify-phases %standard-phases
5256 (replace 'install (install-jars "dist")))))
5257 (native-inputs
5258 `(("unzip" ,unzip)))
5259 (home-page "http://www.jcraft.com/jsch/")
5260 (synopsis "Pure Java implementation of SSH2")
5261 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5262to connect to an SSH server and use port forwarding, X11 forwarding, file
5263transfer, etc., and you can integrate its functionality into your own Java
5264programs.")
5265 (license license:bsd-3)))
5266
5267(define-public java-commons-compress
5268 (package
5269 (name "java-commons-compress")
5270 (version "1.13")
5271 (source (origin
5272 (method url-fetch)
5273 (uri (string-append "mirror://apache/commons/compress/source/"
5274 "commons-compress-" version "-src.tar.gz"))
5275 (sha256
5276 (base32
5277 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5278 (build-system ant-build-system)
5279 (arguments
5280 `(#:jar-name "commons-compress.jar"
5281 #:phases
5282 (modify-phases %standard-phases
5283 (add-after 'unpack 'delete-bad-tests
5284 (lambda _
5285 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5286 ;; FIXME: These tests really should not fail. Maybe they are
5287 ;; indicative of problems with our Java packaging work.
5288
5289 ;; This test fails with a null pointer exception.
5290 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5291 ;; This test fails to open test resources.
5292 (delete-file "archivers/zip/ExplodeSupportTest.java")
5293
5294 ;; FIXME: This test adds a dependency on powermock, which is hard to
5295 ;; package at this point.
5296 ;; https://github.com/powermock/powermock
5297 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5298 #t)))))
5299 (inputs
5300 `(("java-junit" ,java-junit)
5301 ("java-hamcrest-core" ,java-hamcrest-core)
5302 ("java-mockito" ,java-mockito-1)
5303 ("java-xz" ,java-xz)))
5304 (home-page "https://commons.apache.org/proper/commons-compress/")
5305 (synopsis "Java library for working with compressed files")
5306 (description "The Apache Commons Compress library defines an API for
5307working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5308Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5309 (license license:asl2.0)))
5310
5311(define-public java-commons-csv
5312 (package
5313 (name "java-commons-csv")
5314 (version "1.4")
5315 (source (origin
5316 (method url-fetch)
5317 (uri (string-append "mirror://apache/commons/csv/source/"
5318 "commons-csv-" version "-src.tar.gz"))
5319 (sha256
5320 (base32
5321 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5322 (build-system ant-build-system)
5323 (arguments
5324 `(#:jar-name "commons-csv.jar"
5325 #:source-dir "src/main/java"
5326 #:tests? #f)); FIXME: requires java-h2
5327 (inputs
5328 `(("java-hamcrest-core" ,java-hamcrest-core)
5329 ("java-commons-io" ,java-commons-io)
5330 ("java-commons-lang3" ,java-commons-lang3)
5331 ("junit" ,java-junit)))
5332 (home-page "https://commons.apache.org/proper/commons-csv/")
5333 (synopsis "Read and write CSV documents")
5334 (description "Commons CSV reads and writes files in variations of the Comma
5335Separated Value (CSV) format. The most common CSV formats are predefined in the
5336CSVFormat class:
5337
5338@itemize
5339@item Microsoft Excel
5340@item Informix UNLOAD
5341@item Informix UNLOAD CSV
5342@item MySQL
5343@item RFC 4180
5344@item TDF
5345@end itemize
5346
5347Custom formats can be created using a fluent style API.")
5348 (license license:asl2.0)))
5349
5350(define-public java-osgi-annotation
5351 (package
5352 (name "java-osgi-annotation")
5353 (version "6.0.0")
5354 (source (origin
5355 (method url-fetch)
5356 (uri (string-append "https://repo1.maven.org/maven2/"
5357 "org/osgi/org.osgi.annotation/" version "/"
5358 "org.osgi.annotation-" version "-sources.jar"))
5359 (sha256
5360 (base32
5361 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5362 (build-system ant-build-system)
5363 (arguments
5364 `(#:tests? #f ; no tests
5365 #:jar-name "osgi-annotation.jar"))
5366 (home-page "https://www.osgi.org")
5367 (synopsis "Annotation module of OSGi framework")
5368 (description
5369 "OSGi, for Open Services Gateway initiative framework, is a module system
5370and service platform for the Java programming language. This package contains
5371the OSGi annotation module, providing additional services to help dynamic
5372components.")
5373 (license license:asl2.0)))
5374
5375(define-public java-osgi-core
5376 (package
5377 (name "java-osgi-core")
5378 (version "6.0.0")
5379 (source (origin
5380 (method url-fetch)
5381 (uri (string-append "https://repo1.maven.org/maven2/"
5382 "org/osgi/org.osgi.core/" version "/"
5383 "org.osgi.core-" version "-sources.jar"))
5384 (sha256
5385 (base32
5386 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5387 (build-system ant-build-system)
5388 (arguments
5389 `(#:tests? #f ; no tests
5390 #:jar-name "osgi-core.jar"))
5391 (inputs
5392 `(("java-osgi-annotation" ,java-osgi-annotation)))
5393 (home-page "https://www.osgi.org")
5394 (synopsis "Core module of OSGi framework")
5395 (description
5396 "OSGi, for Open Services Gateway initiative framework, is a module system
5397and service platform for the Java programming language. This package contains
5398the OSGi Core module.")
5399 (license license:asl2.0)))
5400
5401(define-public java-osgi-service-event
5402 (package
5403 (name "java-osgi-service-event")
5404 (version "1.3.1")
5405 (source (origin
5406 (method url-fetch)
5407 (uri (string-append "https://repo1.maven.org/maven2/"
5408 "org/osgi/org.osgi.service.event/"
5409 version "/org.osgi.service.event-"
5410 version "-sources.jar"))
5411 (sha256
5412 (base32
5413 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5414 (build-system ant-build-system)
5415 (arguments
5416 `(#:tests? #f ; no tests
5417 #:jar-name "osgi-service-event.jar"))
5418 (inputs
5419 `(("java-osgi-annotation" ,java-osgi-annotation)
5420 ("java-osgi-core" ,java-osgi-core)))
5421 (home-page "https://www.osgi.org")
5422 (synopsis "OSGi service event module")
5423 (description
5424 "OSGi, for Open Services Gateway initiative framework, is a module system
5425and service platform for the Java programming language. This package contains
5426the OSGi @code{org.osgi.service.event} module.")
5427 (license license:asl2.0)))
5428
5429(define-public java-eclipse-osgi
5430 (package
5431 (name "java-eclipse-osgi")
5432 (version "3.11.3")
5433 (source (origin
5434 (method url-fetch)
5435 (uri (string-append "https://repo1.maven.org/maven2/"
5436 "org/eclipse/platform/org.eclipse.osgi/"
5437 version "/org.eclipse.osgi-"
5438 version "-sources.jar"))
5439 (sha256
5440 (base32
5441 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5442 (build-system ant-build-system)
5443 (arguments
5444 `(#:tests? #f ; no tests included
5445 #:jar-name "eclipse-equinox-osgi.jar"))
5446 (inputs
5447 `(("java-osgi-annotation" ,java-osgi-annotation)))
5448 (home-page "http://www.eclipse.org/equinox/")
5449 (synopsis "Eclipse Equinox OSGi framework")
5450 (description "This package provides an implementation of the OSGi Core
5451specification.")
5452 (license license:epl1.0)))
5453
5454(define-public java-eclipse-equinox-common
5455 (package
5456 (name "java-eclipse-equinox-common")
5457 (version "3.10.200")
5458 (source (origin
5459 (method url-fetch)
5460 (uri (string-append "https://repo1.maven.org/maven2/"
5461 "org/eclipse/platform/org.eclipse.equinox.common/"
5462 version "/org.eclipse.equinox.common-"
5463 version "-sources.jar"))
5464 (sha256
5465 (base32
5466 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5467 (build-system ant-build-system)
5468 (arguments
5469 `(#:tests? #f ; no tests included
5470 #:jar-name "eclipse-equinox-common.jar"))
5471 (inputs
5472 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5473 (home-page "http://www.eclipse.org/equinox/")
5474 (synopsis "Common Eclipse runtime")
5475 (description "This package provides the common Eclipse runtime.")
5476 (license license:epl1.0)))
5477
5478(define-public java-eclipse-core-jobs
5479 (package
5480 (name "java-eclipse-core-jobs")
5481 (version "3.8.0")
5482 (source (origin
5483 (method url-fetch)
5484 (uri (string-append "https://repo1.maven.org/maven2/"
5485 "org/eclipse/platform/org.eclipse.core.jobs/"
5486 version "/org.eclipse.core.jobs-"
5487 version "-sources.jar"))
5488 (sha256
5489 (base32
5490 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5491 (build-system ant-build-system)
5492 (arguments
5493 `(#:tests? #f ; no tests included
5494 #:jar-name "eclipse-core-jobs.jar"))
5495 (inputs
5496 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5497 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5498 (home-page "http://www.eclipse.org/equinox/")
5499 (synopsis "Eclipse jobs mechanism")
5500 (description "This package provides the Eclipse jobs mechanism.")
5501 (license license:epl1.0)))
5502
5503(define-public java-eclipse-equinox-registry
5504 (package
5505 (name "java-eclipse-equinox-registry")
5506 (version "3.6.100")
5507 (source (origin
5508 (method url-fetch)
5509 (uri (string-append "https://repo1.maven.org/maven2/"
5510 "org/eclipse/platform/org.eclipse.equinox.registry/"
5511 version "/org.eclipse.equinox.registry-"
5512 version "-sources.jar"))
5513 (sha256
5514 (base32
5515 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5516 (build-system ant-build-system)
5517 (arguments
5518 `(#:tests? #f ; no tests included
5519 #:jar-name "eclipse-equinox-registry.jar"))
5520 (inputs
5521 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5522 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5523 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5524 (home-page "http://www.eclipse.org/equinox/")
5525 (synopsis "Eclipse extension registry support")
5526 (description "This package provides support for the Eclipse extension
5527registry.")
5528 (license license:epl1.0)))
5529
5530(define-public java-eclipse-equinox-app
5531 (package
5532 (name "java-eclipse-equinox-app")
5533 (version "1.3.400")
5534 (source (origin
5535 (method url-fetch)
5536 (uri (string-append "https://repo1.maven.org/maven2/"
5537 "org/eclipse/platform/org.eclipse.equinox.app/"
5538 version "/org.eclipse.equinox.app-"
5539 version "-sources.jar"))
5540 (sha256
5541 (base32
5542 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5543 (build-system ant-build-system)
5544 (arguments
5545 `(#:tests? #f ; no tests included
5546 #:jar-name "eclipse-equinox-app.jar"))
5547 (inputs
5548 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5549 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5550 ("java-eclipse-osgi" ,java-eclipse-osgi)
5551 ("java-osgi-service-event" ,java-osgi-service-event)))
5552 (home-page "http://www.eclipse.org/equinox/")
5553 (synopsis "Equinox application container")
5554 (description "This package provides the Equinox application container for
5555Eclipse.")
5556 (license license:epl1.0)))
5557
5558(define-public java-eclipse-equinox-preferences
5559 (package
5560 (name "java-eclipse-equinox-preferences")
5561 (version "3.6.1")
5562 (source (origin
5563 (method url-fetch)
5564 (uri (string-append "https://repo1.maven.org/maven2/"
5565 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5566 version "/org.eclipse.equinox.preferences-"
5567 version "-sources.jar"))
5568 (sha256
5569 (base32
5570 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5571 (build-system ant-build-system)
5572 (arguments
5573 `(#:tests? #f ; no tests included
5574 #:jar-name "eclipse-equinox-preferences.jar"))
5575 (inputs
5576 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5577 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5578 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5579 (home-page "http://www.eclipse.org/equinox/")
5580 (synopsis "Eclipse preferences mechanism")
5581 (description "This package provides the Eclipse preferences mechanism with
5582the module @code{org.eclipse.equinox.preferences}.")
5583 (license license:epl1.0)))
5584
5585(define-public java-eclipse-core-contenttype
5586 (package
5587 (name "java-eclipse-core-contenttype")
5588 (version "3.5.100")
5589 (source (origin
5590 (method url-fetch)
5591 (uri (string-append "https://repo1.maven.org/maven2/"
5592 "org/eclipse/platform/org.eclipse.core.contenttype/"
5593 version "/org.eclipse.core.contenttype-"
5594 version "-sources.jar"))
5595 (sha256
5596 (base32
5597 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5598 (build-system ant-build-system)
5599 (arguments
5600 `(#:tests? #f ; no tests included
5601 #:jar-name "eclipse-core-contenttype.jar"))
5602 (inputs
5603 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5604 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5605 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5606 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5607 (home-page "http://www.eclipse.org/")
5608 (synopsis "Eclipse content mechanism")
5609 (description "This package provides the Eclipse content mechanism in the
5610@code{org.eclipse.core.contenttype} module.")
5611 (license license:epl1.0)))
5612
5613(define-public java-eclipse-core-runtime
5614 (package
5615 (name "java-eclipse-core-runtime")
5616 (version "3.15.100")
5617 (source (origin
5618 (method url-fetch)
5619 (uri (string-append "https://repo1.maven.org/maven2/"
5620 "org/eclipse/platform/org.eclipse.core.runtime/"
5621 version "/org.eclipse.core.runtime-"
5622 version "-sources.jar"))
5623 (sha256
5624 (base32
5625 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
5626 (build-system ant-build-system)
5627 (arguments
5628 `(#:tests? #f ; no tests included
5629 #:jar-name "eclipse-core-runtime.jar"))
5630 (inputs
5631 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5632 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5633 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5634 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5635 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5636 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5637 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5638 (home-page "https://www.eclipse.org/")
5639 (synopsis "Eclipse core runtime")
5640 (description "This package provides the Eclipse core runtime with the
5641module @code{org.eclipse.core.runtime}.")
5642 (license license:epl1.0)))
5643
5644(define-public java-eclipse-core-filesystem
5645 (package
5646 (name "java-eclipse-core-filesystem")
5647 (version "1.6.1")
5648 (source (origin
5649 (method url-fetch)
5650 (uri (string-append "https://repo1.maven.org/maven2/"
5651 "org/eclipse/platform/org.eclipse.core.filesystem/"
5652 version "/org.eclipse.core.filesystem-"
5653 version "-sources.jar"))
5654 (sha256
5655 (base32
5656 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5657 (build-system ant-build-system)
5658 (arguments
5659 `(#:tests? #f ; no tests included
5660 #:jar-name "eclipse-core-filesystem.jar"))
5661 (inputs
5662 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5663 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5664 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5665 (home-page "https://www.eclipse.org/")
5666 (synopsis "Eclipse core file system")
5667 (description "This package provides the Eclipse core file system with the
5668module @code{org.eclipse.core.filesystem}.")
5669 (license license:epl1.0)))
5670
5671(define-public java-eclipse-core-expressions
5672 (package
5673 (name "java-eclipse-core-expressions")
5674 (version "3.5.100")
5675 (source (origin
5676 (method url-fetch)
5677 (uri (string-append "https://repo1.maven.org/maven2/"
5678 "org/eclipse/platform/org.eclipse.core.expressions/"
5679 version "/org.eclipse.core.expressions-"
5680 version "-sources.jar"))
5681 (sha256
5682 (base32
5683 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5684 (build-system ant-build-system)
5685 (arguments
5686 `(#:tests? #f ; no tests included
5687 #:jar-name "eclipse-core-expressions.jar"))
5688 (inputs
5689 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5690 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5691 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5692 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5693 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5694 (home-page "https://www.eclipse.org/")
5695 (synopsis "Eclipse core expression language")
5696 (description "This package provides the Eclipse core expression language
5697with the @code{org.eclipse.core.expressions} module.")
5698 (license license:epl1.0)))
5699
5700(define-public java-eclipse-core-variables
5701 (package
5702 (name "java-eclipse-core-variables")
5703 (version "3.3.0")
5704 (source (origin
5705 (method url-fetch)
5706 (uri (string-append "https://repo1.maven.org/maven2/"
5707 "org/eclipse/platform/org.eclipse.core.variables/"
5708 version "/org.eclipse.core.variables-"
5709 version "-sources.jar"))
5710 (sha256
5711 (base32
5712 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5713 (build-system ant-build-system)
5714 (arguments
5715 `(#:tests? #f ; no tests included
5716 #:jar-name "eclipse-core-variables.jar"))
5717 (inputs
5718 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5719 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5720 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5721 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5722 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5723 (home-page "https://www.eclipse.org/platform")
5724 (synopsis "Eclipse core variables")
5725 (description "This package provides the Eclipse core variables module
5726@code{org.eclipse.core.variables}.")
5727 (license license:epl1.0)))
5728
5729(define-public java-eclipse-ant-core
5730 (package
5731 (name "java-eclipse-ant-core")
5732 (version "3.4.100")
5733 (source (origin
5734 (method url-fetch)
5735 (uri (string-append "https://repo1.maven.org/maven2/"
5736 "org/eclipse/platform/org.eclipse.ant.core/"
5737 version "/org.eclipse.ant.core-"
5738 version "-sources.jar"))
5739 (sha256
5740 (base32
5741 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5742 (build-system ant-build-system)
5743 (arguments
5744 `(#:tests? #f ; no tests included
5745 #:jar-name "eclipse-ant-core.jar"))
5746 (inputs
5747 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5748 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5749 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5750 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5751 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5752 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5753 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5754 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5755 (home-page "https://www.eclipse.org/platform")
5756 (synopsis "Ant build tool core libraries")
5757 (description "This package provides the ant build tool core libraries with
5758the module @code{org.eclipse.ant.core}.")
5759 (license license:epl1.0)))
5760
5761(define-public java-eclipse-core-resources
5762 (package
5763 (name "java-eclipse-core-resources")
5764 (version "3.13.200")
5765 (source (origin
5766 (method url-fetch)
5767 (uri (string-append "https://repo1.maven.org/maven2/"
5768 "org/eclipse/platform/org.eclipse.core.resources/"
5769 version "/org.eclipse.core.resources-"
5770 version "-sources.jar"))
5771 (sha256
5772 (base32
5773 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
5774 (build-system ant-build-system)
5775 (arguments
5776 `(#:tests? #f ; no tests included
5777 #:jar-name "eclipse-core-resources.jar"))
5778 (inputs
5779 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5780 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5781 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5782 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5783 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5784 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5785 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5786 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5787 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5788 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5789 (home-page "https://www.eclipse.org/")
5790 (synopsis "Eclipse core resource management")
5791 (description "This package provides the Eclipse core resource management
5792module @code{org.eclipse.core.resources}.")
5793 (license license:epl1.0)))
5794
5795(define-public java-eclipse-compare-core
5796 (package
5797 (name "java-eclipse-compare-core")
5798 (version "3.6.0")
5799 (source (origin
5800 (method url-fetch)
5801 (uri (string-append "https://repo1.maven.org/maven2/"
5802 "org/eclipse/platform/org.eclipse.compare.core/"
5803 version "/org.eclipse.compare.core-"
5804 version "-sources.jar"))
5805 (sha256
5806 (base32
5807 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5808 (build-system ant-build-system)
5809 (arguments
5810 `(#:tests? #f ; no tests included
5811 #:jar-name "eclipse-compare-core.jar"))
5812 (inputs
5813 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5814 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5815 ("java-eclipse-osgi" ,java-eclipse-osgi)
5816 ("java-icu4j" ,java-icu4j)))
5817 (home-page "https://www.eclipse.org/")
5818 (synopsis "Eclipse core compare support")
5819 (description "This package provides the Eclipse core compare support
5820module @code{org.eclipse.compare.core}.")
5821 (license license:epl1.0)))
5822
5823(define-public java-eclipse-team-core
5824 (package
5825 (name "java-eclipse-team-core")
5826 (version "3.8.0")
5827 (source (origin
5828 (method url-fetch)
5829 (uri (string-append "https://repo1.maven.org/maven2/"
5830 "org/eclipse/platform/org.eclipse.team.core/"
5831 version "/org.eclipse.team.core-"
5832 version "-sources.jar"))
5833 (sha256
5834 (base32
5835 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5836 (build-system ant-build-system)
5837 (arguments
5838 `(#:tests? #f ; no tests included
5839 #:jar-name "eclipse-team-core.jar"))
5840 (inputs
5841 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5842 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5843 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5844 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5845 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5846 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5847 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5848 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5849 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5850 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5851 (home-page "https://www.eclipse.org/platform")
5852 (synopsis "Eclipse team support core")
5853 (description "This package provides the Eclipse team support core module
5854@code{org.eclipse.team.core}.")
5855 (license license:epl1.0)))
5856
5857(define-public java-eclipse-core-commands
5858 (package
5859 (name "java-eclipse-core-commands")
5860 (version "3.8.1")
5861 (source (origin
5862 (method url-fetch)
5863 (uri (string-append "https://repo1.maven.org/maven2/"
5864 "org/eclipse/platform/org.eclipse.core.commands/"
5865 version "/org.eclipse.core.commands-"
5866 version "-sources.jar"))
5867 (sha256
5868 (base32
5869 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5870 (build-system ant-build-system)
5871 (arguments
5872 `(#:tests? #f ; no tests included
5873 #:jar-name "eclipse-core-commands.jar"))
5874 (inputs
5875 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5876 (home-page "https://www.eclipse.org/platform")
5877 (synopsis "Eclipse core commands")
5878 (description "This package provides Eclipse core commands in the module
5879@code{org.eclipse.core.commands}.")
5880 (license license:epl1.0)))
5881
5882(define-public java-eclipse-text
5883 (package
5884 (name "java-eclipse-text")
5885 (version "3.6.0")
5886 (source (origin
5887 (method url-fetch)
5888 (uri (string-append "https://repo1.maven.org/maven2/"
5889 "org/eclipse/platform/org.eclipse.text/"
5890 version "/org.eclipse.text-"
5891 version "-sources.jar"))
5892 (sha256
5893 (base32
5894 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5895 (build-system ant-build-system)
5896 (arguments
5897 `(#:tests? #f ; no tests included
5898 #:jar-name "eclipse-text.jar"
5899 #:phases
5900 (modify-phases %standard-phases
5901 ;; When creating a new category we must make sure that the new list
5902 ;; matches List<Position>. By default it seems to be too generic
5903 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5904 ;; Without this we get this error:
5905 ;;
5906 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5907 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5908 ;; [javac] fPositions.put(category, new ArrayList<>());
5909 ;; [javac] ^
5910 ;; [javac] required: String,List<Position>
5911 ;; [javac] found: String,ArrayList<Object>
5912 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5913 ;; to List<Position> by method invocation conversion
5914 ;; [javac] where K,V are type-variables:
5915 ;; [javac] K extends Object declared in interface Map
5916 ;; [javac] V extends Object declared in interface Map
5917 ;;
5918 ;; I don't know if this is a good fix. I suspect it is not, but it
5919 ;; seems to work.
5920 (add-after 'unpack 'fix-compilation-error
5921 (lambda _
5922 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5923 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5924 "Positions.put(category, new ArrayList<Position>());"))
5925 #t)))))
5926 (inputs
5927 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5928 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5929 ("java-icu4j" ,java-icu4j)))
5930 (home-page "http://www.eclipse.org/platform")
5931 (synopsis "Eclipse text library")
5932 (description "Platform Text is part of the Platform UI project and
5933provides the basic building blocks for text and text editors within Eclipse
5934and contributes the Eclipse default text editor.")
5935 (license license:epl1.0)))
5936
5937(define-public java-eclipse-jdt-core
5938 (package
5939 (name "java-eclipse-jdt-core")
5940 (version "3.16.0")
5941 (source (origin
5942 (method url-fetch)
5943 (uri (string-append "https://repo1.maven.org/maven2/"
5944 "org/eclipse/jdt/org.eclipse.jdt.core/"
5945 version "/org.eclipse.jdt.core-"
5946 version "-sources.jar"))
5947 (sha256
5948 (base32
5949 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
5950 (build-system ant-build-system)
5951 (arguments
5952 `(#:tests? #f ; no tests included
5953 #:jar-name "eclipse-jdt-core.jar"
5954 #:phases
5955 (modify-phases %standard-phases
5956 (add-after 'unpack 'move-sources
5957 (lambda _
5958 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
5959 (for-each (lambda (file)
5960 (install-file file (string-append "../" (dirname file))))
5961 (find-files "." ".*")))
5962 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
5963 #t))
5964 (add-before 'build 'copy-resources
5965 (lambda _
5966 (with-directory-excursion "src"
5967 (for-each (lambda (file)
5968 (install-file file (string-append "../build/classes/" (dirname file))))
5969 (find-files "." ".*.(props|properties|rsc)")))
5970 #t)))))
5971 (inputs
5972 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5973 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5974 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5975 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5976 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5977 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5978 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5979 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5980 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5981 ("java-eclipse-osgi" ,java-eclipse-osgi)
5982 ("java-eclipse-text" ,java-eclipse-text)))
5983 (home-page "https://www.eclipse.org/jdt")
5984 (synopsis "Java development tools core libraries")
5985 (description "This package provides the core libraries of the Eclipse Java
5986development tools.")
5987 (license license:epl1.0)))
5988
5989(define-public java-eclipse-jdt-compiler-apt
5990 (package
5991 (name "java-eclipse-jdt-compiler-apt")
5992 (version "1.3.400")
5993 (source (origin
5994 (method url-fetch)
5995 (uri (string-append "https://repo1.maven.org/maven2/"
5996 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
5997 version "/org.eclipse.jdt.compiler.apt-"
5998 version "-sources.jar"))
5999 (sha256
6000 (base32
6001 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6002 (build-system ant-build-system)
6003 (arguments
6004 `(#:tests? #f ; no tests included
6005 #:jar-name "eclipse-jdt-compiler-apt.jar"
6006 #:jdk ,openjdk11))
6007 (inputs
6008 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6009 (home-page "https://www.eclipse.org/jdt/apt/")
6010 (synopsis "Annotation processing tool")
6011 (description "APT stands for Annotation Processing Tool. APT provides a
6012means for generating files and compiling new Java classes based on annotations
6013found in your source code.")
6014 (license license:epl2.0)))
6015
6016(define-public java-javax-mail
6017 (package
6018 (name "java-javax-mail")
6019 (version "1.5.6")
6020 (source (origin
6021 (method url-fetch)
6022 (uri (string-append "https://repo1.maven.org/maven2/"
6023 "com/sun/mail/javax.mail/"
6024 version "/javax.mail-"
6025 version "-sources.jar"))
6026 (sha256
6027 (base32
6028 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6029 (build-system ant-build-system)
6030 (arguments
6031 `(#:tests? #f ; no tests
6032 #:jar-name "javax-mail.jar"))
6033 (home-page "https://javamail.java.net")
6034 (synopsis "Reference implementation of the JavaMail API")
6035 (description
6036 "This package provides versions of the JavaMail API implementation, IMAP,
6037SMTP, and POP3 service providers, some examples, and documentation for the
6038JavaMail API.")
6039 ;; GPLv2 only with "classpath exception".
6040 (license license:gpl2)))
6041
6042(define-public java-log4j-api
6043 (package
6044 (name "java-log4j-api")
6045 (version "2.4.1")
6046 (source (origin
6047 (method url-fetch)
6048 (uri (string-append "mirror://apache/logging/log4j/" version
6049 "/apache-log4j-" version "-src.tar.gz"))
6050 (sha256
6051 (base32
6052 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6053 (build-system ant-build-system)
6054 (arguments
6055 `(#:tests? #f ; tests require unpackaged software
6056 #:jar-name "log4j-api.jar"
6057 #:make-flags
6058 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6059 "/share/java"))
6060 #:phases
6061 (modify-phases %standard-phases
6062 (add-after 'unpack 'enter-dir
6063 (lambda _ (chdir "log4j-api") #t))
6064 ;; FIXME: The tests require additional software that has not been
6065 ;; packaged yet, such as
6066 ;; * org.apache.maven
6067 ;; * org.apache.felix
6068 (add-after 'enter-dir 'delete-tests
6069 (lambda _ (delete-file-recursively "src/test") #t)))))
6070 (inputs
6071 `(("java-osgi-core" ,java-osgi-core)
6072 ("java-hamcrest-core" ,java-hamcrest-core)
6073 ("java-junit" ,java-junit)))
6074 (home-page "http://logging.apache.org/log4j/2.x/")
6075 (synopsis "API module of the Log4j logging framework for Java")
6076 (description
6077 "This package provides the API module of the Log4j logging framework for
6078Java.")
6079 (license license:asl2.0)))
6080
6081(define-public java-log4j-core
6082 (package
6083 (inherit java-log4j-api)
6084 (name "java-log4j-core")
6085 (inputs
6086 `(("java-osgi-core" ,java-osgi-core)
6087 ("java-hamcrest-core" ,java-hamcrest-core)
6088 ("java-log4j-api" ,java-log4j-api)
6089 ("java-mail" ,java-mail)
6090 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6091 ("java-lmax-disruptor" ,java-lmax-disruptor)
6092 ("java-kafka" ,java-kafka-clients)
6093 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6094 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6095 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6096 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6097 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6098 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6099 ("java-commons-compress" ,java-commons-compress)
6100 ("java-commons-csv" ,java-commons-csv)
6101 ("java-jeromq" ,java-jeromq)
6102 ("java-junit" ,java-junit)))
6103 (native-inputs
6104 `(("hamcrest" ,java-hamcrest-all)
6105 ("java-commons-io" ,java-commons-io)
6106 ("java-commons-lang3" ,java-commons-lang3)
6107 ("slf4j" ,java-slf4j-api)))
6108 (arguments
6109 `(#:tests? #f ; tests require more dependencies
6110 #:test-dir "src/test"
6111 #:source-dir "src/main/java"
6112 #:jar-name "log4j-core.jar"
6113 #:jdk ,icedtea-8
6114 #:make-flags
6115 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6116 "/share/java"))
6117 #:phases
6118 (modify-phases %standard-phases
6119 (add-after 'unpack 'enter-dir
6120 (lambda _ (chdir "log4j-core") #t)))))
6121 (synopsis "Core component of the Log4j framework")
6122 (description "This package provides the core component of the Log4j
6123logging framework for Java.")))
6124
6125(define-public java-log4j-1.2-api
6126 (package
6127 (inherit java-log4j-api)
6128 (name "java-log4j-1.2-api")
6129 (arguments
6130 `(#:jar-name "java-log4j-1.2-api.jar"
6131 #:source-dir "log4j-1.2-api/src/main/java"
6132 #:jdk ,icedtea-8
6133 ;; Tests require maven-model (and other maven subprojects), which is a
6134 ;; cyclic dependency.
6135 #:tests? #f))
6136 (inputs
6137 `(("log4j-api" ,java-log4j-api)
6138 ("log4j-core" ,java-log4j-core)
6139 ("osgi-core" ,java-osgi-core)
6140 ("eclipse-osgi" ,java-eclipse-osgi)
6141 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6142
6143(define-public java-commons-cli
6144 (package
6145 (name "java-commons-cli")
6146 (version "1.4")
6147 (source (origin
6148 (method url-fetch)
6149 (uri (string-append "mirror://apache/commons/cli/source/"
6150 "commons-cli-" version "-src.tar.gz"))
6151 (sha256
6152 (base32
6153 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6154 (build-system ant-build-system)
6155 ;; TODO: javadoc
6156 (arguments
6157 `(#:jar-name "commons-cli.jar"))
6158 (native-inputs
6159 `(("java-junit" ,java-junit)
6160 ("java-hamcrest-core" ,java-hamcrest-core)))
6161 (home-page "http://commons.apache.org/cli/")
6162 (synopsis "Command line arguments and options parsing library")
6163 (description "The Apache Commons CLI library provides an API for parsing
6164command line options passed to programs. It is also able to print help
6165messages detailing the options available for a command line tool.
6166
6167Commons CLI supports different types of options:
6168
6169@itemize
6170@item POSIX like options (ie. tar -zxvf foo.tar.gz)
6171@item GNU like long options (ie. du --human-readable --max-depth=1)
6172@item Java like properties (ie. java -Djava.awt.headless=true Foo)
6173@item Short options with value attached (ie. gcc -O2 foo.c)
6174@item long options with single hyphen (ie. ant -projecthelp)
6175@end itemize
6176
6177This is a part of the Apache Commons Project.")
6178 (license license:asl2.0)))
6179
6180(define-public java-commons-codec
6181 (package
6182 (name "java-commons-codec")
6183 (version "1.10")
6184 (source (origin
6185 (method url-fetch)
6186 (uri (string-append "mirror://apache/commons/codec/source/"
6187 "commons-codec-" version "-src.tar.gz"))
6188 (sha256
6189 (base32
6190 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6191 (build-system ant-build-system)
6192 (outputs '("out" "doc"))
6193 (arguments
6194 `(#:test-target "test"
6195 #:make-flags
6196 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6197 (junit (assoc-ref %build-inputs "java-junit")))
6198 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6199 (string-append "-Dhamcrest.jar=" hamcrest
6200 "/share/java/hamcrest-core.jar")
6201 ;; Do not append version to jar.
6202 "-Dfinal.name=commons-codec"))
6203 #:phases
6204 (modify-phases %standard-phases
6205 (add-after 'build 'build-javadoc ant-build-javadoc)
6206 (replace 'install (install-jars "dist"))
6207 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6208 (native-inputs
6209 `(("java-junit" ,java-junit)
6210 ("java-hamcrest-core" ,java-hamcrest-core)))
6211 (home-page "http://commons.apache.org/codec/")
6212 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6213 (description "The codec package contains simple encoder and decoders for
6214various formats such as Base64 and Hexadecimal. In addition to these widely
6215used encoders and decoders, the codec package also maintains a collection of
6216phonetic encoding utilities.
6217
6218This is a part of the Apache Commons Project.")
6219 (license license:asl2.0)))
6220
6221(define-public java-commons-daemon
6222 (package
6223 (name "java-commons-daemon")
6224 (version "1.0.15")
6225 (source (origin
6226 (method url-fetch)
6227 (uri (string-append "mirror://apache/commons/daemon/source/"
6228 "commons-daemon-" version "-src.tar.gz"))
6229 (sha256
6230 (base32
6231 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
6232 (build-system ant-build-system)
6233 (arguments
6234 `(#:test-target "test"
6235 #:phases
6236 (modify-phases %standard-phases
6237 (add-after 'build 'build-javadoc ant-build-javadoc)
6238 (replace 'install (install-jars "dist"))
6239 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6240 (native-inputs
6241 `(("java-junit" ,java-junit)))
6242 (home-page "http://commons.apache.org/daemon/")
6243 (synopsis "Library to launch Java applications as daemons")
6244 (description "The Daemon package from Apache Commons can be used to
6245implement Java applications which can be launched as daemons. For example the
6246program will be notified about a shutdown so that it can perform cleanup tasks
6247before its process of execution is destroyed by the operation system.
6248
6249This package contains the Java library. You will also need the actual binary
6250for your architecture which is provided by the jsvc package.
6251
6252This is a part of the Apache Commons Project.")
6253 (license license:asl2.0)))
6254
6255(define-public java-javaewah
6256 (package
6257 (name "java-javaewah")
6258 (version "1.1.6")
6259 (source (origin
6260 (method url-fetch)
6261 (uri (string-append "https://github.com/lemire/javaewah/"
6262 "archive/JavaEWAH-" version ".tar.gz"))
6263 (sha256
6264 (base32
6265 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6266 (build-system ant-build-system)
6267 (arguments `(#:jar-name "javaewah.jar"))
6268 (inputs
6269 `(("java-junit" ,java-junit)
6270 ("java-hamcrest-core" ,java-hamcrest-core)))
6271 (home-page "https://github.com/lemire/javaewah")
6272 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6273 (description "This is a word-aligned compressed variant of the Java
6274@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6275compression scheme. It can be used to implement bitmap indexes.
6276
6277The goal of word-aligned compression is not to achieve the best compression,
6278but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6279cycles, maybe at the expense of storage. However, the EWAH scheme is always
6280more efficient storage-wise than an uncompressed bitmap (as implemented in the
6281@code{BitSet} class by Sun).")
6282 ;; GPL2.0 derivates are explicitly allowed.
6283 (license license:asl2.0)))
6284
6285(define-public java-slf4j-api
6286 (package
6287 (name "java-slf4j-api")
6288 (version "1.7.25")
6289 (source (origin
6290 (method url-fetch)
6291 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6292 version ".tar.gz"))
6293 (sha256
6294 (base32
6295 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6296 (modules '((guix build utils)))
6297 ;; Delete bundled jars.
6298 (snippet
6299 '(begin
6300 (for-each delete-file (find-files "." "\\.jar$"))
6301 #t))))
6302 (build-system ant-build-system)
6303 (arguments
6304 `(#:jar-name "slf4j-api.jar"
6305 #:source-dir "slf4j-api/src/main"
6306 #:test-dir "slf4j-api/src/test"
6307 #:phases
6308 (modify-phases %standard-phases
6309 (add-after 'build 'regenerate-jar
6310 (lambda _
6311 ;; pom.xml ignores these files in the jar creation process. If we don't,
6312 ;; we get the error "This code should have never made it into slf4j-api.jar"
6313 (delete-file-recursively "build/classes/org/slf4j/impl")
6314 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6315 "build/classes" ".")))
6316 (add-before 'check 'dont-test-abstract-classes
6317 (lambda _
6318 ;; abstract classes are not meant to be run with junit
6319 (substitute* "build.xml"
6320 (("<include name=\"\\*\\*/\\*Test.java\" />")
6321 (string-append "<include name=\"**/*Test.java\" />"
6322 "<exclude name=\"**/MultithreadedInitializationTest"
6323 ".java\" />")))
6324 #t)))))
6325 (inputs
6326 `(("java-junit" ,java-junit)
6327 ("java-hamcrest-core" ,java-hamcrest-core)))
6328 (home-page "https://www.slf4j.org/")
6329 (synopsis "Simple logging facade for Java")
6330 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6331simple facade or abstraction for various logging
6332frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6333allowing the end user to plug in the desired logging framework at deployment
6334time.")
6335 (license license:expat)))
6336
6337(define java-slf4j-api-bootstrap
6338 (package
6339 (inherit java-slf4j-api)
6340 (name "java-slf4j-api-bootstrap")
6341 (inputs `())
6342 (arguments
6343 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6344 ((#:tests? _ #f) #f)))))
6345
6346(define-public java-slf4j-simple
6347 (package
6348 (name "java-slf4j-simple")
6349 (version "1.7.25")
6350 (source (package-source java-slf4j-api))
6351 (build-system ant-build-system)
6352 (arguments
6353 `(#:jar-name "slf4j-simple.jar"
6354 #:source-dir "slf4j-simple/src/main"
6355 #:test-dir "slf4j-simple/src/test"
6356 #:phases
6357 (modify-phases %standard-phases
6358 ;; The tests need some test classes from slf4j-api
6359 (add-before 'check 'build-slf4j-api-test-helpers
6360 (lambda _
6361 ;; Add current dir to CLASSPATH ...
6362 (setenv "CLASSPATH"
6363 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6364 ;; ... and build test helper classes here:
6365 (apply invoke
6366 `("javac" "-d" "."
6367 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6368 (inputs
6369 `(("java-junit" ,java-junit)
6370 ("java-hamcrest-core" ,java-hamcrest-core)
6371 ("java-slf4j-api" ,java-slf4j-api)))
6372 (home-page "https://www.slf4j.org/")
6373 (synopsis "Simple implementation of simple logging facade for Java")
6374 (description "SLF4J binding for the Simple implementation, which outputs
6375all events to System.err. Only messages of level INFO and higher are
6376printed.")
6377 (license license:expat)))
6378
6379(define-public antlr2
6380 (package
6381 (name "antlr2")
6382 (version "2.7.7")
6383 (source (origin
6384 (method url-fetch)
6385 (uri (string-append "http://www.antlr2.org/download/antlr-"
6386 version ".tar.gz"))
6387 (sha256
6388 (base32
6389 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6390 (modules '((guix build utils)))
6391 (snippet
6392 '(begin
6393 (delete-file "antlr.jar")
6394 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6395 (("#include <map>")
6396 (string-append
6397 "#include <map>\n"
6398 "#define EOF (-1)\n"
6399 "#include <strings.h>")))
6400 (substitute* "configure"
6401 (("/bin/sh") "sh"))
6402 #t))))
6403 (build-system gnu-build-system)
6404 (arguments
6405 `(#:tests? #f ; no test target
6406 #:imported-modules ((guix build ant-build-system)
6407 (guix build syscalls)
6408 ,@%gnu-build-system-modules)
6409 #:modules (((guix build ant-build-system) #:prefix ant:)
6410 (guix build gnu-build-system)
6411 (guix build utils))
6412 #:phases
6413 (modify-phases %standard-phases
6414 (add-after 'install 'strip-jar-timestamps
6415 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6416 (add-before 'configure 'fix-timestamp
6417 (lambda _
6418 (substitute* "configure"
6419 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6420 #t))
6421 (add-after 'configure 'fix-bin-ls
6422 (lambda _
6423 (substitute* (find-files "." "Makefile")
6424 (("/bin/ls") "ls"))
6425 #t)))))
6426 (native-inputs
6427 `(("which" ,which)
6428 ("zip" ,zip)
6429 ("java" ,icedtea "jdk")))
6430 (inputs
6431 `(("java" ,icedtea)))
6432 (home-page "http://www.antlr2.org")
6433 (synopsis "Framework for constructing recognizers, compilers, and translators")
6434 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6435is a language tool that provides a framework for constructing recognizers,
6436compilers, and translators from grammatical descriptions containing Java, C#,
6437C++, or Python actions. ANTLR provides excellent support for tree construction,
6438tree walking, and translation.")
6439 (license license:public-domain)))
6440
6441(define-public java-stringtemplate-3
6442 (package
6443 (name "java-stringtemplate")
6444 (version "3.2.1")
6445 (source (origin
6446 (method url-fetch)
6447 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6448 "gh-pages/download/stringtemplate-"
6449 version ".tar.gz"))
6450 (sha256
6451 (base32
6452 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6453 (build-system ant-build-system)
6454 (arguments
6455 `(#:jar-name (string-append ,name "-" ,version ".jar")
6456 #:test-dir "test"
6457 #:modules ((guix build ant-build-system)
6458 (guix build utils)
6459 (srfi srfi-1))
6460 #:phases
6461 (modify-phases %standard-phases
6462 (add-before 'check 'fix-tests
6463 (lambda _
6464 (substitute* "build.xml"
6465 (("\\$\\{test.home\\}/java")
6466 "${test.home}/org"))
6467 #t))
6468 (add-before 'build 'generate-grammar
6469 (lambda _
6470 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6471 (for-each (lambda (file)
6472 (format #t "~a\n" file)
6473 (invoke "antlr" file))
6474 '("template.g" "angle.bracket.template.g" "action.g"
6475 "eval.g" "group.g" "interface.g")))
6476 #t)))))
6477 (native-inputs
6478 `(("antlr" ,antlr2)
6479 ("java-junit" ,java-junit)))
6480 (home-page "http://www.stringtemplate.org")
6481 (synopsis "Template engine to generate formatted text output")
6482 (description "StringTemplate is a java template engine (with ports for C#,
6483Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6484or any other formatted text output. StringTemplate is particularly good at
6485code generators, multiple site skins, and internationalization / localization.
6486StringTemplate also powers ANTLR.")
6487 (license license:bsd-3)))
6488
6489;; antlr3 is partially written using antlr3 grammar files. It also depends on
6490;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6491;; files and uses antlr3 at runtime. The latest version requires a recent version
6492;; of antlr3 at runtime.
6493;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6494;; This version of ST4 is sufficient for the latest antlr3.
6495;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6496;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6497;; against the latest ST4.
6498;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6499;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6500;; only grammar files with the antlr2 syntax.
6501;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6502
6503(define-public java-stringtemplate
6504 (package (inherit java-stringtemplate-3)
6505 (name "java-stringtemplate")
6506 (version "4.0.8")
6507 (source (origin
6508 (method url-fetch)
6509 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6510 version ".tar.gz"))
6511 (file-name (string-append name "-" version ".tar.gz"))
6512 (sha256
6513 (base32
6514 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6515 (build-system ant-build-system)
6516 (arguments
6517 `(#:jar-name (string-append ,name "-" ,version ".jar")
6518 #:tests? #f ; FIXME: tests fail for unknown reasons
6519 #:test-dir "test"
6520 #:modules ((guix build ant-build-system)
6521 (guix build utils)
6522 (srfi srfi-1))
6523 #:phases
6524 (modify-phases %standard-phases
6525 (add-before 'check 'fix-test-target
6526 (lambda _
6527 (substitute* "build.xml"
6528 (("\\$\\{test.home\\}/java") "${test.home}/")
6529 (("\\*Test.java") "Test*.java"))
6530 #t))
6531 (add-before 'build 'generate-grammar
6532 (lambda _
6533 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6534 (for-each (lambda (file)
6535 (format #t "~a\n" file)
6536 (invoke "antlr3" file))
6537 '("STParser.g" "Group.g" "CodeGenerator.g")))
6538 #t)))))
6539 (inputs
6540 `(("antlr3" ,antlr3-bootstrap)
6541 ("antlr2" ,antlr2)
6542 ("java-stringtemplate" ,java-stringtemplate-3)
6543 ("java-junit" ,java-junit)))))
6544
6545(define java-stringtemplate-4.0.6
6546 (package (inherit java-stringtemplate)
6547 (name "java-stringtemplate")
6548 (version "4.0.6")
6549 (source (origin
6550 (method url-fetch)
6551 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6552 version ".tar.gz"))
6553 (file-name (string-append name "-" version ".tar.gz"))
6554 (sha256
6555 (base32
6556 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6557 (inputs
6558 `(("antlr3" ,antlr3-3.3)
6559 ("antlr2" ,antlr2)
6560 ("java-stringtemplate" ,java-stringtemplate-3)))))
6561
6562(define-public antlr3
6563 (package
6564 (name "antlr3")
6565 (version "3.5.2")
6566 (source (origin
6567 (method url-fetch)
6568 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6569 version ".tar.gz"))
6570 (file-name (string-append name "-" version ".tar.gz"))
6571 (sha256
6572 (base32
6573 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6574 (build-system ant-build-system)
6575 (arguments
6576 `(#:jar-name (string-append ,name "-" ,version ".jar")
6577 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6578 #:tests? #f
6579 #:phases
6580 (modify-phases %standard-phases
6581 (add-after 'install 'bin-install
6582 (lambda* (#:key inputs outputs #:allow-other-keys)
6583 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6584 (bin (string-append (assoc-ref outputs "out") "/bin")))
6585 (mkdir-p bin)
6586 (with-output-to-file (string-append bin "/antlr3")
6587 (lambda _
6588 (display
6589 (string-append "#!" (which "sh") "\n"
6590 "java -cp " jar "/" ,name "-" ,version ".jar:"
6591 (string-concatenate
6592 (find-files (assoc-ref inputs "stringtemplate")
6593 ".*\\.jar"))
6594 ":"
6595 (string-concatenate
6596 (find-files (assoc-ref inputs "stringtemplate4")
6597 ".*\\.jar"))
6598 ":"
6599 (string-concatenate
6600 (find-files (string-append
6601 (assoc-ref inputs "antlr")
6602 "/lib")
6603 ".*\\.jar"))
6604 " org.antlr.Tool $*"))))
6605 (chmod (string-append bin "/antlr3") #o755))
6606 #t))
6607 (add-before 'build 'generate-grammar
6608 (lambda _
6609 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6610 (for-each (lambda (file)
6611 (display file)
6612 (newline)
6613 (invoke "antlr3" file))
6614 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6615 "AssignTokenTypesWalker.g"
6616 "ActionTranslator.g" "TreeToNFAConverter.g"
6617 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6618 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6619 (substitute* "ANTLRParser.java"
6620 (("public Object getTree") "public GrammarAST getTree"))
6621 (substitute* "ANTLRv3Parser.java"
6622 (("public Object getTree") "public CommonTree getTree"))
6623 (chdir "../../../../../java")
6624 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6625 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6626import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6627 (substitute* "org/antlr/tool/ErrorManager.java"
6628 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6629 (chdir "../../../..")
6630 #t))
6631 (add-before 'build 'fix-build-xml
6632 (lambda _
6633 (substitute* "build.xml"
6634 (("<exec") "<copy todir=\"${classes.dir}\">
6635<fileset dir=\"tool/src/main/resources\">
6636<include name=\"**/*.stg\"/>
6637<include name=\"**/*.st\"/>
6638<include name=\"**/*.sti\"/>
6639<include name=\"**/STLexer.tokens\"/>
6640</fileset>
6641</copy><exec"))
6642 #t)))))
6643 (native-inputs
6644 `(("antlr" ,antlr2)
6645 ("antlr3" ,antlr3-bootstrap)))
6646 (inputs
6647 `(("junit" ,java-junit)
6648 ("stringtemplate" ,java-stringtemplate-3)
6649 ("stringtemplate4" ,java-stringtemplate)))
6650 (propagated-inputs
6651 `(("stringtemplate" ,java-stringtemplate-3)
6652 ("antlr" ,antlr2)
6653 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6654 (home-page "http://www.antlr3.org")
6655 (synopsis "Framework for constructing recognizers, compilers, and translators")
6656 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6657is a language tool that provides a framework for constructing recognizers,
6658compilers, and translators from grammatical descriptions containing Java, C#,
6659C++, or Python actions. ANTLR provides excellent support for tree construction,
6660tree walking, and translation.")
6661 (license license:bsd-3)))
6662
6663(define antlr3-bootstrap
6664 (package
6665 (inherit antlr3)
6666 (name "antlr3-bootstrap")
6667 (native-inputs
6668 `(("antlr" ,antlr2)
6669 ("antlr3" ,antlr3-3.3)))
6670 (inputs
6671 `(("junit" ,java-junit)))))
6672
6673(define antlr3-3.3
6674 (package
6675 (inherit antlr3)
6676 (name "antlr3")
6677 (version "3.3")
6678 (source (origin
6679 (method url-fetch)
6680 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6681 "gh-pages/download/antlr-"
6682 version ".tar.gz"))
6683 (sha256
6684 (base32
6685 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6686 (patches
6687 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6688 (arguments
6689 `(#:jar-name (string-append ,name "-" ,version ".jar")
6690 #:source-dir (string-join '("tool/src/main/java"
6691 "runtime/Java/src/main/java"
6692 "tool/src/main/antlr2"
6693 "tool/src/main/antlr3")
6694 ":")
6695 #:tests? #f ; FIXME: tests seem to require maven plugin
6696 #:modules ((guix build ant-build-system)
6697 (guix build utils)
6698 (srfi srfi-1))
6699 #:phases
6700 (modify-phases %standard-phases
6701 (add-after 'install 'bin-install
6702 (lambda* (#:key inputs outputs #:allow-other-keys)
6703 (let* ((out (assoc-ref outputs "out"))
6704 (jar (string-append out "/share/java"))
6705 (bin (string-append out "/bin")))
6706 (mkdir-p bin)
6707 (with-output-to-file (string-append bin "/antlr3")
6708 (lambda _
6709 (display
6710 (string-append
6711 "#!" (which "sh") "\n"
6712 "java -cp " jar "/antlr3-3.3.jar:"
6713 (string-join
6714 (append (find-files (assoc-ref inputs "java-stringtemplate")
6715 ".*\\.jar$")
6716 (find-files (string-append (assoc-ref inputs "antlr")
6717 "/lib")
6718 ".*\\.jar$"))
6719 ":")
6720 " org.antlr.Tool $*"))))
6721 (chmod (string-append bin "/antlr3") #o755)
6722 #t)))
6723 (add-before 'build 'generate-grammar
6724 (lambda _
6725 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6726 (("import org.antlr.grammar.v2.\\*;")
6727 "import org.antlr.grammar.v2.*;\n
6728import org.antlr.grammar.v2.TreeToNFAConverter;\n
6729import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6730import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6731 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6732 (for-each (lambda (file)
6733 (format #t "~a\n" file)
6734 (invoke "antlr" file))
6735 '("antlr.g" "antlr.print.g" "assign.types.g"
6736 "buildnfa.g" "codegen.g" "define.g")))
6737 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6738 (for-each (lambda (file)
6739 (format #t "~a\n" file)
6740 (invoke "antlr3" file))
6741 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6742 "ANTLRv3Tree.g")))
6743 #t))
6744 (add-before 'build 'fix-build-xml
6745 (lambda _
6746 (substitute* "build.xml"
6747 (("<exec") "<copy todir=\"${classes.dir}\">
6748<fileset dir=\"tool/src/main/resources\">
6749<include name=\"**/*.stg\"/>
6750<include name=\"**/*.st\"/>
6751<include name=\"**/*.sti\"/>
6752<include name=\"**/STLexer.tokens\"/>
6753</fileset>
6754</copy><exec"))
6755 #t)))))
6756 (native-inputs
6757 `(("antlr" ,antlr2)
6758 ("antlr3" ,antlr3-3.1)))
6759 (inputs
6760 `(("junit" ,java-junit)))
6761 (propagated-inputs
6762 `(("java-stringtemplate" ,java-stringtemplate-3)
6763 ("antlr" ,antlr2)
6764 ("antlr3" ,antlr3-3.1)))))
6765
6766(define antlr3-3.1
6767 (package
6768 (inherit antlr3)
6769 (version "3.1")
6770 (source (origin
6771 (method url-fetch)
6772 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6773 "gh-pages/download/antlr-"
6774 version ".tar.gz"))
6775 (sha256
6776 (base32
6777 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6778 (patches
6779 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6780 (arguments
6781 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6782 #:source-dir "src:runtime/Java/src"
6783 #:tests? #f
6784 #:phases
6785 (modify-phases %standard-phases
6786 (add-after 'install 'bin-install
6787 (lambda* (#:key inputs outputs #:allow-other-keys)
6788 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6789 (bin (string-append (assoc-ref outputs "out") "/bin")))
6790 (mkdir-p bin)
6791 (with-output-to-file (string-append bin "/antlr3")
6792 (lambda _
6793 (display
6794 (string-append "#!" (which "sh") "\n"
6795 "java -cp " jar "/antlr3-3.1.jar:"
6796 (string-concatenate
6797 (find-files (assoc-ref inputs "stringtemplate")
6798 ".*\\.jar"))
6799 ":"
6800 (string-concatenate
6801 (find-files (string-append
6802 (assoc-ref inputs "antlr")
6803 "/lib")
6804 ".*\\.jar"))
6805 " org.antlr.Tool $*"))))
6806 (chmod (string-append bin "/antlr3") #o755))
6807 #t))
6808 (add-before 'build 'generate-grammar
6809 (lambda _
6810 (let ((dir "src/org/antlr/tool/"))
6811 (for-each (lambda (file)
6812 (display file)
6813 (newline)
6814 (invoke "antlr" "-o" dir (string-append dir file)))
6815 '("antlr.g" "antlr.print.g" "assign.types.g"
6816 "buildnfa.g" "define.g")))
6817 (format #t "codegen.g\n")
6818 (invoke "antlr" "-o" "src/org/antlr/codegen"
6819 "src/org/antlr/codegen/codegen.g")
6820 #t))
6821 (add-before 'build 'fix-build-xml
6822 (lambda _
6823 (substitute* "build.xml"
6824 (("<exec") "<copy todir=\"${classes.dir}\">
6825<fileset dir=\"src\">
6826<include name=\"**/*.stg\"/>
6827<include name=\"**/*.st\"/>
6828<include name=\"**/*.sti\"/>
6829<include name=\"**/STLexer.tokens\"/>
6830</fileset>
6831</copy><exec"))
6832 #t)))))
6833 (native-inputs
6834 `(("antlr" ,antlr2)))
6835 (inputs
6836 `(("junit" ,java-junit)))
6837 (propagated-inputs
6838 `(("stringtemplate" ,java-stringtemplate-3)))))
6839
6840(define-public java-commons-cli-1.2
6841 ;; This is a bootstrap dependency for Maven2.
6842 (package
6843 (inherit java-commons-cli)
6844 (version "1.2")
6845 (source (origin
6846 (method url-fetch)
6847 (uri (string-append "mirror://apache/commons/cli/source/"
6848 "commons-cli-" version "-src.tar.gz"))
6849 (sha256
6850 (base32
6851 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6852 (arguments
6853 `(#:jar-name "commons-cli.jar"
6854 #:phases
6855 (modify-phases %standard-phases
6856 (add-before 'check 'fix-build-xml
6857 (lambda* (#:key inputs #:allow-other-keys)
6858 (substitute* "build.xml"
6859 (("dir=\"\\$\\{test.home\\}/java\"")
6860 "dir=\"${test.home}\""))
6861 #t)))))
6862 (native-inputs
6863 `(("java-junit" ,java-junit)))))
6864
6865(define-public java-microemulator-cldc
6866 (package
6867 (name "java-microemulator-cldc")
6868 (version "2.0.4")
6869 (source (origin
6870 (method url-fetch)
6871 (uri (string-append "https://github.com/barteo/microemu/archive/"
6872 "microemulator_"
6873 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6874 version)
6875 ".tar.gz"))
6876 (file-name (string-append name "-" version ".tar.gz"))
6877 (sha256
6878 (base32
6879 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6880 (build-system ant-build-system)
6881 (arguments
6882 `(#:jar-name "microemulator-cldc.jar"
6883 #:source-dir "microemu-cldc/src/main/java"
6884 #:tests? #f)); Requires even older software
6885 (home-page "https://github.com/barteo/microemu")
6886 (synopsis "J2ME CLDC emulator")
6887 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6888Emulator. It allows to demonstrate MIDlet based applications in web browser
6889applet and can be run as a standalone java application.")
6890 (license (list license:asl2.0
6891 ;; or altenatively:
6892 license:lgpl2.1+))))
6893
6894(define-public java-datanucleus-javax-persistence
6895 (package
6896 (name "java-datanucleus-javax-persistence")
6897 (version "2.2.0")
6898 (source (origin
6899 (method url-fetch)
6900 (uri (string-append "https://github.com/datanucleus/"
6901 "javax.persistence/archive/javax.persistence-"
6902 version "-release.tar.gz"))
6903 (sha256
6904 (base32
6905 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6906 (build-system ant-build-system)
6907 (arguments
6908 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6909 #:jdk ,icedtea-8
6910 #:source-dir "src/main/java"
6911 #:tests? #f)); no tests
6912 (home-page "https://github.com/datanucleus/javax.persistence")
6913 (synopsis "JPA API")
6914 (description "This package contains a clean definition of JPA API intended
6915for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6916jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6917used to generate this API.")
6918 (license (list license:edl1.0 license:epl1.0))))
6919
6920(define-public java-osgi-cmpn
6921 (package
6922 (name "java-osgi-cmpn")
6923 (version "6.0.0")
6924 (source (origin
6925 (method url-fetch)
6926 (uri (string-append "http://central.maven.org/maven2/"
6927 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6928 version "-sources.jar"))
6929 (sha256
6930 (base32
6931 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6932 (build-system ant-build-system)
6933 (arguments
6934 `(#:jar-name "osgi-cmpn.jar"
6935 #:tests? #f)); no tests
6936 (inputs
6937 `(("annotation" ,java-osgi-annotation)
6938 ("core" ,java-osgi-core)
6939 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6940 ("microemulator" ,java-microemulator-cldc)
6941 ("servlet" ,java-classpathx-servletapi)))
6942 (home-page "https://www.osgi.org")
6943 (synopsis "Compendium specification module of OSGi framework")
6944 (description
6945 "OSGi, for Open Services Gateway initiative framework, is a module system
6946and service platform for the Java programming language. This package contains
6947the compendium specification module, providing interfaces and classes for use
6948in compiling bundles.")
6949 (license license:asl2.0)))
6950
6951(define-public java-osgi-service-component-annotations
6952 (package
6953 (name "java-osgi-service-component-annotations")
6954 (version "1.3.0")
6955 (source (origin
6956 (method url-fetch)
6957 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6958 "org.osgi.service.component.annotations/"
6959 version "/org.osgi.service.component.annotations-"
6960 version "-sources.jar"))
6961 (sha256
6962 (base32
6963 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6964 (build-system ant-build-system)
6965 (arguments
6966 `(#:jar-name "osgi-service-component-annotations.jar"
6967 #:tests? #f)); no tests
6968 (inputs
6969 `(("annotation" ,java-osgi-annotation)))
6970 (home-page "https://www.osgi.org")
6971 (synopsis "Support annotations for osgi-service-component")
6972 (description
6973 "OSGi, for Open Services Gateway initiative framework, is a module system
6974and service platform for the Java programming language. This package contains
6975the support annotations for osgi-service-component.")
6976 (license license:asl2.0)))
6977
6978(define-public java-osgi-dto
6979 (package
6980 (name "java-osgi-dto")
6981 (version "1.0.0")
6982 (source (origin
6983 (method url-fetch)
6984 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6985 "org.osgi.dto/" version "/org.osgi.dto-"
6986 version "-sources.jar"))
6987 (sha256
6988 (base32
6989 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6990 (build-system ant-build-system)
6991 (arguments
6992 `(#:jar-name "osgi-dto.jar"
6993 #:tests? #f)); no tests
6994 (inputs
6995 `(("annotation" ,java-osgi-annotation)))
6996 (home-page "https://www.osgi.org")
6997 (synopsis "Data Transfer Objects")
6998 (description
6999 "OSGi, for Open Services Gateway initiative framework, is a module system
7000and service platform for the Java programming language. This package contains
7001the Data Transfer Objects. It is easily serializable having only public fields
7002of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7003Map and array aggregates may also be used. The aggregates must only hold
7004objects of the listed types or aggregates.")
7005 (license license:asl2.0)))
7006
7007(define-public java-osgi-resource
7008 (package
7009 (name "java-osgi-resource")
7010 (version "1.0.0")
7011 (source (origin
7012 (method url-fetch)
7013 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7014 "org.osgi.resource/"
7015 version "/org.osgi.resource-"
7016 version "-sources.jar"))
7017 (sha256
7018 (base32
7019 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7020 (build-system ant-build-system)
7021 (arguments
7022 `(#:jar-name "osgi-resource.jar"
7023 #:tests? #f)); no tests
7024 (inputs
7025 `(("annotation" ,java-osgi-annotation)
7026 ("dto" ,java-osgi-dto)))
7027 (home-page "https://www.osgi.org")
7028 (synopsis "OSGI Resource")
7029 (description
7030 "OSGi, for Open Services Gateway initiative framework, is a module system
7031and service platform for the Java programming language. This package contains
7032the definition of common types in osgi packages.")
7033 (license license:asl2.0)))
7034
7035(define-public java-osgi-namespace-contract
7036 (package
7037 (name "java-osgi-namespace-contract")
7038 (version "1.0.0")
7039 (source (origin
7040 (method url-fetch)
7041 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7042 "org.osgi.namespace.contract/"
7043 version "/org.osgi.namespace.contract-"
7044 version "-sources.jar"))
7045 (sha256
7046 (base32
7047 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7048 (build-system ant-build-system)
7049 (inputs
7050 `(("resource" ,java-osgi-resource)
7051 ("annotation" ,java-osgi-annotation)))
7052 (arguments
7053 `(#:jar-name "osgi-namespace-contract.jar"
7054 #:tests? #f)); no tests
7055 (home-page "https://www.osgi.org")
7056 (synopsis "Contract Capability and Requirement Namespace")
7057 (description
7058 "OSGi, for Open Services Gateway initiative framework, is a module system
7059and service platform for the Java programming language. This package contains
7060the names for the attributes and directives for a namespace with contracts.")
7061 (license license:asl2.0)))
7062
7063(define-public java-osgi-namespace-extender
7064 (package
7065 (name "java-osgi-namespace-extender")
7066 (version "1.0.1")
7067 (source (origin
7068 (method url-fetch)
7069 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7070 "org.osgi.namespace.extender/"
7071 version "/org.osgi.namespace.extender-"
7072 version "-sources.jar"))
7073 (sha256
7074 (base32
7075 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7076 (build-system ant-build-system)
7077 (inputs
7078 `(("resource" ,java-osgi-resource)
7079 ("annotation" ,java-osgi-annotation)))
7080 (arguments
7081 `(#:jar-name "osgi-namespace-extendent.jar"
7082 #:tests? #f)); no tests
7083 (home-page "https://www.osgi.org")
7084 (synopsis "Extender Capability and Requirement Namespace")
7085 (description
7086 "OSGi, for Open Services Gateway initiative framework, is a module system
7087and service platform for the Java programming language. This package contains
7088the names for the attributes and directives for an extender namespace.")
7089 (license license:asl2.0)))
7090
7091(define-public java-osgi-namespace-service
7092 (package
7093 (name "java-osgi-namespace-service")
7094 (version "1.0.0")
7095 (source (origin
7096 (method url-fetch)
7097 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7098 "org.osgi.namespace.service/"
7099 version "/org.osgi.namespace.service-"
7100 version "-sources.jar"))
7101 (sha256
7102 (base32
7103 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7104 (build-system ant-build-system)
7105 (inputs
7106 `(("resource" ,java-osgi-resource)
7107 ("annotation" ,java-osgi-annotation)))
7108 (arguments
7109 `(#:jar-name "osgi-namespace-service.jar"
7110 #:tests? #f)); no tests
7111 (home-page "https://www.osgi.org")
7112 (synopsis "Service Capability and Requirement Namespace")
7113 (description
7114 "OSGi, for Open Services Gateway initiative framework, is a module system
7115and service platform for the Java programming language. This package contains
7116the names for the attributes and directives for a service namespace.")
7117 (license license:asl2.0)))
7118
7119(define-public java-osgi-util-function
7120 (package
7121 (name "java-osgi-util-function")
7122 (version "1.0.0")
7123 (source (origin
7124 (method url-fetch)
7125 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7126 "org.osgi.util.function/"
7127 version "/org.osgi.util.function-"
7128 version "-sources.jar"))
7129 (sha256
7130 (base32
7131 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7132 (build-system ant-build-system)
7133 (arguments
7134 `(#:jar-name "osgi-util-function.jar"
7135 #:tests? #f)); no tests
7136 (inputs
7137 `(("annotation" ,java-osgi-annotation)))
7138 (home-page "https://www.osgi.org")
7139 (synopsis "OSGI Util Function")
7140 (description
7141 "OSGi, for Open Services Gateway initiative framework, is a module system
7142and service platform for the Java programming language. This package contains
7143an interface for a function that accepts a single argument and produces a result.")
7144 (license license:asl2.0)))
7145
7146(define-public java-osgi-util-promise
7147 (package
7148 (name "java-osgi-util-promise")
7149 (version "1.0.0")
7150 (source (origin
7151 (method url-fetch)
7152 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7153 "org.osgi.util.promise/"
7154 version "/org.osgi.util.promise-"
7155 version "-sources.jar"))
7156 (sha256
7157 (base32
7158 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7159 (build-system ant-build-system)
7160 (arguments
7161 `(#:jar-name "osgi-util-promise.jar"
7162 #:tests? #f)); no tests
7163 (inputs
7164 `(("annotation" ,java-osgi-annotation)
7165 ("function" ,java-osgi-util-function)))
7166 (home-page "https://www.osgi.org")
7167 (synopsis "Promise of a value")
7168 (description
7169 "OSGi, for Open Services Gateway initiative framework, is a module system
7170and service platform for the Java programming language. This package contains
7171an interface and utilitary classes for promises. A Promise represents a future
7172value. It handles the interactions for asynchronous processing.")
7173 (license license:asl2.0)))
7174
7175(define-public java-osgi-service-metatype-annotations
7176 (package
7177 (name "java-osgi-service-metatype-annotations")
7178 (version "1.3.0")
7179 (source (origin
7180 (method url-fetch)
7181 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7182 "org.osgi.service.metatype.annotations/"
7183 version "/org.osgi.service.metatype.annotations-"
7184 version "-sources.jar"))
7185 (sha256
7186 (base32
7187 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7188 (build-system ant-build-system)
7189 (arguments
7190 `(#:jar-name "osgi-service-metatype-annotations.jar"
7191 #:tests? #f)); no tests
7192 (inputs
7193 `(("annotation" ,java-osgi-annotation)))
7194 (home-page "https://www.osgi.org")
7195 (synopsis "Support annotations for metatype")
7196 (description
7197 "OSGi, for Open Services Gateway initiative framework, is a module system
7198and service platform for the Java programming language. This package contains
7199the support annotations for metatype.")
7200 (license license:asl2.0)))
7201
7202(define-public java-osgi-service-repository
7203 (package
7204 (name "java-osgi-service-repository")
7205 (version "1.1.0")
7206 (source (origin
7207 (method url-fetch)
7208 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7209 "org.osgi.service.repository/"
7210 version "/org.osgi.service.repository-"
7211 version "-sources.jar"))
7212 (sha256
7213 (base32
7214 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7215 (build-system ant-build-system)
7216 (arguments
7217 `(#:jar-name "osgi-service-repository.jar"
7218 #:tests? #f)); no tests
7219 (inputs
7220 `(("annotation" ,java-osgi-annotation)
7221 ("promise" ,java-osgi-util-promise)
7222 ("resource" ,java-osgi-resource)))
7223 (home-page "https://www.osgi.org")
7224 (synopsis "OSGI service repository")
7225 (description
7226 "OSGi, for Open Services Gateway initiative framework, is a module system
7227and service platform for the Java programming language. This package contains
7228a repository service that contains resources.")
7229 (license license:asl2.0)))
7230
7231(define-public java-osgi-framework
7232 (package
7233 (name "java-osgi-framework")
7234 (version "1.8.0")
7235 (source (origin
7236 (method url-fetch)
7237 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7238 "org.osgi.framework/" version "/org.osgi.framework-"
7239 version "-sources.jar"))
7240 (sha256
7241 (base32
7242 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7243 (build-system ant-build-system)
7244 (arguments
7245 `(#:jar-name "osgi-framework.jar"
7246 #:tests? #f)); no tests
7247 (inputs
7248 `(("annotation" ,java-osgi-annotation)
7249 ("resource" ,java-osgi-resource)
7250 ("dto" ,java-osgi-dto)))
7251 (home-page "https://www.osgi.org")
7252 (synopsis "OSGi framework")
7253 (description
7254 "OSGi, for Open Services Gateway initiative framework, is a module system
7255and service platform for the Java programming language.")
7256 (license license:asl2.0)))
7257
7258(define-public java-osgi-service-log
7259 (package
7260 (name "java-osgi-service-log")
7261 (version "1.3.0")
7262 (source (origin
7263 (method url-fetch)
7264 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7265 "org.osgi.service.log/"
7266 version "/org.osgi.service.log-"
7267 version "-sources.jar"))
7268 (sha256
7269 (base32
7270 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7271 (build-system ant-build-system)
7272 (arguments
7273 `(#:jar-name "osgi-service-log.jar"
7274 #:tests? #f)); no tests
7275 (inputs
7276 `(("java-osgi-framework" ,java-osgi-framework)))
7277 (home-page "https://www.osgi.org")
7278 (synopsis "Provides methods for bundles to write messages to the log")
7279 (description
7280 "OSGi, for Open Services Gateway initiative framework, is a module system
7281and service platform for the Java programming language. This package contains
7282the log service.")
7283 (license license:asl2.0)))
7284
7285(define-public java-osgi-service-jdbc
7286 (package
7287 (name "java-osgi-service-jdbc")
7288 (version "1.0.0")
7289 (source (origin
7290 (method url-fetch)
7291 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7292 "org.osgi.service.jdbc/"
7293 version "/org.osgi.service.jdbc-"
7294 version "-sources.jar"))
7295 (sha256
7296 (base32
7297 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7298 (build-system ant-build-system)
7299 (arguments
7300 `(#:jar-name "osgi-service-jdbc.jar"
7301 #:tests? #f)); no tests
7302 (home-page "https://www.osgi.org")
7303 (synopsis "Factory for JDBC connection factories")
7304 (description
7305 "OSGi, for Open Services Gateway initiative framework, is a module system
7306and service platform for the Java programming language. This package contains
7307a factory for JDBC connection factories. There are 3 preferred connection
7308factories for getting JDBC connections:
7309
7310@itemize
7311@item @code{javax.sql.DataSource};
7312@item @code{javax.sql.ConnectionPoolDataSource};
7313@item @code{javax.sql.XADataSource}.
7314@end itemize")
7315 (license license:asl2.0)))
7316
7317(define-public java-osgi-service-resolver
7318 (package
7319 (name "java-osgi-service-resolver")
7320 (version "1.0.1")
7321 (source (origin
7322 (method url-fetch)
7323 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7324 "org.osgi.service.resolver/"
7325 version "/org.osgi.service.resolver-"
7326 version "-sources.jar"))
7327 (sha256
7328 (base32
7329 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7330 (build-system ant-build-system)
7331 (arguments
7332 `(#:jar-name "osgi-service-resolver.jar"
7333 #:tests? #f)); no tests
7334 (inputs
7335 `(("annotation" ,java-osgi-annotation)
7336 ("resource" ,java-osgi-resource)))
7337 (home-page "https://www.osgi.org")
7338 (synopsis "OSGI Resolver service")
7339 (description
7340 "OSGi, for Open Services Gateway initiative framework, is a module system
7341and service platform for the Java programming language. This package contains
7342a resolver service that resolves the specified resources in the context supplied
7343by the caller.")
7344 (license license:asl2.0)))
7345
7346(define-public java-osgi-util-tracker
7347 (package
7348 (name "java-osgi-util-tracker")
7349 (version "1.5.1")
7350 (source (origin
7351 (method url-fetch)
7352 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7353 "org.osgi.util.tracker/"
7354 version "/org.osgi.util.tracker-"
7355 version "-sources.jar"))
7356 (sha256
7357 (base32
7358 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7359 (build-system ant-build-system)
7360 (arguments
7361 `(#:jar-name "osgi-util-tracker.jar"
7362 #:tests? #f)); no tests
7363 (inputs
7364 `(("framework" ,java-osgi-framework)
7365 ("annotation" ,java-osgi-annotation)))
7366 (home-page "https://www.osgi.org")
7367 (synopsis "Bundle tracking")
7368 (description
7369 "OSGi, for Open Services Gateway initiative framework, is a module system
7370and service platform for the Java programming language. This package contains
7371bundle tracking utility classes.")
7372 (license license:asl2.0)))
7373
7374(define-public java-osgi-service-cm
7375 (package
7376 (name "java-osgi-service-cm")
7377 (version "1.5.0")
7378 (source (origin
7379 (method url-fetch)
7380 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7381 "org.osgi.service.cm/"
7382 version "/org.osgi.service.cm-"
7383 version "-sources.jar"))
7384 (sha256
7385 (base32
7386 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7387 (build-system ant-build-system)
7388 (arguments
7389 `(#:jar-name "osgi-service-cm.jar"
7390 #:tests? #f)); no tests
7391 (inputs
7392 `(("framework" ,java-osgi-framework)
7393 ("annotation" ,java-osgi-annotation)))
7394 (home-page "https://www.osgi.org")
7395 (synopsis "OSGI Configuration Management")
7396 (description
7397 "OSGi, for Open Services Gateway initiative framework, is a module system
7398and service platform for the Java programming language. This package contains
7399utility classes for the configuration of services.")
7400 (license license:asl2.0)))
7401
7402(define-public java-osgi-service-packageadmin
7403 (package
7404 (name "java-osgi-service-packageadmin")
7405 (version "1.2.0")
7406 (source (origin
7407 (method url-fetch)
7408 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7409 "org.osgi.service.packageadmin/"
7410 version "/org.osgi.service.packageadmin-"
7411 version "-sources.jar"))
7412 (sha256
7413 (base32
7414 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7415 (build-system ant-build-system)
7416 (arguments
7417 `(#:jar-name "osgi-service-packageadmin.jar"
7418 #:tests? #f)); no tests
7419 (inputs
7420 `(("framework" ,java-osgi-framework)))
7421 (home-page "https://www.osgi.org")
7422 (synopsis "OSGI Package Administration")
7423 (description
7424 "OSGi, for Open Services Gateway initiative framework, is a module system
7425and service platform for the Java programming language. This package contains
7426the packageadmin service.")
7427 (license license:asl2.0)))
7428
7429(define-public java-ops4j-base-lang
7430 (package
7431 (name "java-ops4j-base-lang")
7432 (version "1.5.0")
7433 (source (origin
7434 (method url-fetch)
7435 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7436 "archive/base-" version ".tar.gz"))
7437 (sha256
7438 (base32
7439 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7440 (build-system ant-build-system)
7441 (arguments
7442 `(#:jar-name "java-ops4j-base-lang.jar"
7443 #:source-dir "ops4j-base-lang/src/main/java"
7444 #:tests? #f; no tests
7445 #:phases
7446 (modify-phases %standard-phases
7447 (add-before 'build 'add-test-file
7448 (lambda _
7449 ;; That file is required by a test in ops4j-pax-exam-core-spi
7450 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7451 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7452 (lambda _
7453 (display
7454 (string-append
7455 "version=" ,version "\n"
7456 "groupId=org.ops4j.base"
7457 "artifactId=ops4j-base-lang\n"))))
7458 #t)))))
7459 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7460 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7461 (description "OPS4J stands for Open Participation Software for Java. This
7462package contains utilities and extensions related to @code{java.lang}.")
7463 (license license:asl2.0)))
7464
7465(define-public java-ops4j-base-monitors
7466 (package
7467 (inherit java-ops4j-base-lang)
7468 (name "java-ops4j-base-monitors")
7469 (arguments
7470 `(#:jar-name "java-ops4j-base-monitors.jar"
7471 #:source-dir "ops4j-base-monitors/src/main/java"
7472 #:tests? #f)); no tests
7473 (inputs
7474 `(("lang" ,java-ops4j-base-lang)))
7475 (description "OPS4J stands for Open Participation Software for Java. This
7476package contains utilities and extensions related to monitoring.")))
7477
7478(define-public java-ops4j-base-io
7479 (package
7480 (inherit java-ops4j-base-lang)
7481 (name "java-ops4j-base-io")
7482 (arguments
7483 `(#:jar-name "java-ops4j-base-io.jar"
7484 #:source-dir "ops4j-base-io/src/main/java"
7485 #:test-dir "ops4j-base-io/src/test"
7486 #:test-exclude
7487 (list "**/ListerTest.java")))
7488 (inputs
7489 `(("lang" ,java-ops4j-base-monitors)
7490 ("lang" ,java-ops4j-base-lang)))
7491 (native-inputs
7492 `(("junit" ,java-junit)
7493 ("hamcrest" ,java-hamcrest-core)))
7494 (description "OPS4J stands for Open Participation Software for Java. This
7495package contains utilities and extensions related to handling streams and files.")))
7496
7497(define-public java-ops4j-base-util
7498 (package
7499 (inherit java-ops4j-base-lang)
7500 (name "java-ops4j-base-util")
7501 (arguments
7502 `(#:jar-name "java-ops4j-base-util.jar"
7503 #:source-dir "ops4j-base-util/src/main/java"
7504 #:test-dir "ops4j-base-util/src/test"))
7505 (inputs
7506 `(("lang" ,java-ops4j-base-lang)))
7507 (native-inputs
7508 `(("junit" ,java-junit)))
7509 (description "OPS4J stands for Open Participation Software for Java. This
7510package contains utilities and extensions related to environment, i18n and
7511mime types.")))
7512
7513(define-public java-ops4j-base-util-property
7514 (package
7515 (inherit java-ops4j-base-lang)
7516 (name "java-ops4j-base-util-property")
7517 (arguments
7518 `(#:jar-name "java-ops4j-base-util-property.jar"
7519 #:source-dir "ops4j-base-util-property/src/main/java"
7520 #:tests? #f)); no tests
7521 (inputs
7522 `(("lang" ,java-ops4j-base-lang)
7523 ("util" ,java-ops4j-base-util)))
7524 (description "OPS4J stands for Open Participation Software for Java. This
7525package contains utilities and extensions related to resolving properties from
7526different sources.")))
7527
7528(define-public java-ops4j-base-store
7529 (package
7530 (inherit java-ops4j-base-lang)
7531 (name "java-ops4j-base-store")
7532 (arguments
7533 `(#:jar-name "java-ops4j-base-store.jar"
7534 #:source-dir "ops4j-base-store/src/main/java"
7535 #:tests? #f)); no tests
7536 (inputs
7537 `(("lang" ,java-ops4j-base-lang)
7538 ("slf4j" ,java-slf4j-api)
7539 ("io" ,java-ops4j-base-io)))
7540 (description "OPS4J stands for Open Participation Software for Java. This
7541package contains utilities for storing and retrieving data from an
7542@code{InputStream}.")))
7543
7544(define-public java-ops4j-base-spi
7545 (package
7546 (inherit java-ops4j-base-lang)
7547 (name "java-ops4j-base-spi")
7548 (arguments
7549 `(#:jar-name "java-ops4j-base-spi.jar"
7550 #:source-dir "ops4j-base-spi/src/main/java"
7551 #:test-dir "ops4j-base-spi/src/test"))
7552 (native-inputs
7553 `(("junit" ,java-junit)
7554 ("hamcrest" ,java-hamcrest-core)))
7555 (description "OPS4J stands for Open Participation Software for Java. This
7556package contains utilities for obtaining services via the Java SE 6
7557@code{ServiceLoader}.")))
7558
7559(define-public java-aqute-bnd-annotation
7560 (package
7561 (name "java-aqute-bnd-annotation")
7562 (version "3.5.0")
7563 (source (origin
7564 (method url-fetch)
7565 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7566 version ".REL.tar.gz"))
7567 (file-name (string-append name "-" version ".tar.gz"))
7568 (sha256
7569 (base32
7570 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7571 (build-system ant-build-system)
7572 (arguments
7573 `(#:jar-name "java-aqute-bnd-annotation.jar"
7574 #:source-dir "biz.aQute.bnd.annotation/src"
7575 #:tests? #f)); empty test dir
7576 (home-page "http://bnd.bndtools.org/")
7577 (synopsis "Tools for OSGi")
7578 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7579headers based on analyzing the class code, it verifies the project settings,
7580it manages project dependencies, gives diffs jars, and much more.")
7581 (license license:asl2.0)))
7582
7583(define-public java-aqute-libg
7584 (package
7585 (inherit java-aqute-bnd-annotation)
7586 (name "java-aqute-libg")
7587 (arguments
7588 `(#:jar-name "java-aqute-libg.jar"
7589 ;; The build fails when source/target more recent than 1.7. This
7590 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7591 ;;
7592 ;; It is closed as won't fix. There is no way to change the source
7593 ;; so that it works on 1.8, and still works on 1.6, the upstream
7594 ;; target. It work fine on 1.7, so we use 1.7.
7595 #:make-flags (list "-Dant.build.javac.source=1.7"
7596 "-Dant.build.javac.target=1.7")
7597 #:phases
7598 (modify-phases %standard-phases
7599 (add-before 'configure 'chdir
7600 ;; Change to aQute.libg directory, so that the relative
7601 ;; paths in the tests aren't broken.
7602 (lambda _
7603 (chdir "aQute.libg")
7604 #t))
7605 (add-before 'check 'create-test-directory
7606 ;; Copy the test directory to test/java, since that's where
7607 ;; ant-build-system's default project in build.xml expects to find
7608 ;; the test classes. Leave a copy in the original place to not
7609 ;; break paths in tests.
7610 (lambda _
7611 (mkdir "src/test")
7612 (copy-recursively "test" "src/test/java")
7613 #t)))))
7614 (inputs
7615 `(("slf4j" ,java-slf4j-api)
7616 ("osgi-annot" ,java-osgi-annotation)
7617 ("java-osgi-cmpn" ,java-osgi-cmpn)
7618 ("osgi" ,java-osgi-core)))
7619 (native-inputs
7620 `(("hamcrest" ,java-hamcrest-core)
7621 ("java-junit" ,java-junit)))))
7622
7623(define java-aqute-libg-bootstrap
7624 (package
7625 (inherit java-aqute-libg)
7626 (name "java-aqute-libg-bootstrap")
7627 (arguments
7628 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7629 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7630 ((#:tests? _ #f) #f)))
7631 (inputs
7632 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7633 ,@(delete `("slf4j" ,java-slf4j-api)
7634 (package-inputs java-aqute-libg))))
7635 (native-inputs '())))
7636
7637(define-public java-aqute-bndlib
7638 (package
7639 (inherit java-aqute-bnd-annotation)
7640 (name "java-aqute-bndlib")
7641 (arguments
7642 `(#:jar-name "java-bndlib.jar"
7643 #:source-dir "biz.aQute.bndlib/src"
7644 #:tests? #f)); no tests
7645 (inputs
7646 `(("slf4j" ,java-slf4j-api)
7647 ("osgi-annot" ,java-osgi-annotation)
7648 ("java-aqute-libg" ,java-aqute-libg)
7649 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7650 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7651 ("java-osgi-service-repository" ,java-osgi-service-repository)
7652 ("java-osgi-service-log" ,java-osgi-service-log)
7653 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7654 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7655 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7656 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7657 ("promise" ,java-osgi-util-promise)
7658 ("osgi" ,java-osgi-core)))))
7659
7660(define java-aqute-bndlib-bootstrap
7661 (package
7662 (inherit java-aqute-bndlib)
7663 (name "java-aqute-bndlib-bootstrap")
7664 (inputs
7665 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7666 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7667 ,@(delete `("slf4j" ,java-slf4j-api)
7668 (delete `("java-aqute-libg" ,java-aqute-libg)
7669 (package-inputs java-aqute-bndlib)))))))
7670
7671(define-public java-ops4j-pax-tinybundles
7672 (package
7673 (name "java-ops4j-pax-tinybundles")
7674 (version "2.1.1")
7675 (source (origin
7676 (method url-fetch)
7677 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7678 "archive/tinybundles-" version ".tar.gz"))
7679 (sha256
7680 (base32
7681 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7682 (arguments
7683 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7684 #:source-dir "src/main/java"
7685 #:test-exclude
7686 ;; Abstract base classes for other tests
7687 (list "**/BndTest.java" "**/CoreTest.java")
7688 #:phases
7689 (modify-phases %standard-phases
7690 (add-before 'check 'fix-version
7691 (lambda _
7692 ;; This test has a reference to an old version of bndlib we are not
7693 ;; packaging. It uses the version referenced in pom.xml. We replace
7694 ;; it with our own version.
7695 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7696 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7697 ,(package-version java-aqute-bndlib)))
7698 #t)))))
7699 (inputs
7700 `(("lang" ,java-ops4j-base-lang)
7701 ("io" ,java-ops4j-base-io)
7702 ("store" ,java-ops4j-base-store)
7703 ("slf4j" ,java-slf4j-api)
7704 ("libg" ,java-aqute-libg)
7705 ("bndlib" ,java-aqute-bndlib)))
7706 (native-inputs
7707 `(("junit" ,java-junit)
7708 ("hamcrest" ,java-hamcrest-core)
7709 ("log4j" ,java-log4j-api)
7710 ("bndannotation" ,java-aqute-bnd-annotation)
7711 ("framework" ,java-osgi-framework)))
7712 (build-system ant-build-system)
7713 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7714 (synopsis "Java APIs to create OSGi related artifacts")
7715 (description "Tinybundles is all about creating OSGi related artifacts like
7716Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7717to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7718other hand, this library can be a foundation of real end user tools that need
7719to create those artifacts.")
7720 (license license:asl2.0)))
7721
7722(define-public java-ops4j-pax-exam-core
7723 (package
7724 (name "java-ops4j-pax-exam-core")
7725 (version "4.11.0")
7726 (source (origin
7727 (method url-fetch)
7728 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7729 "archive/exam-reactor-" version ".tar.gz"))
7730 (sha256
7731 (base32
7732 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7733 (arguments
7734 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7735 #:source-dir "core/pax-exam/src/main/java"
7736 #:test-dir "core/pax-exam/src/test"))
7737 (inputs
7738 `(("slf4j" ,java-slf4j-api)
7739 ("lang" ,java-ops4j-base-lang)
7740 ("io" ,java-ops4j-base-io)
7741 ("util-property" ,java-ops4j-base-util-property)
7742 ("util-store" ,java-ops4j-base-store)
7743 ("java-osgi-core" ,java-osgi-core)))
7744 (native-inputs
7745 `(("junit" ,java-junit)
7746 ("hamcrest" ,java-hamcrest-core)))
7747 (build-system ant-build-system)
7748 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7749 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7750 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7751the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7752the system under test at the same time.")
7753 (license license:asl2.0)))
7754
7755(define-public java-ops4j-pax-exam-core-spi
7756 (package
7757 (inherit java-ops4j-pax-exam-core)
7758 (name "java-ops4j-pax-exam-core-spi")
7759 (arguments
7760 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7761 #:source-dir "src/main/java"
7762 #:test-exclude
7763 (list
7764 ;; Abstract base class, not a test
7765 "**/BaseStagedReactorTest.java"
7766 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7767 "**/WarBuilderTest.java")
7768 #:phases
7769 (modify-phases %standard-phases
7770 (add-before 'configure 'chdir
7771 (lambda _
7772 ;; Tests assume we are in this directory
7773 (chdir "core/pax-exam-spi")
7774 #t))
7775 (add-before 'check 'fix-tests
7776 (lambda _
7777 ;; One test checks that this file is present.
7778 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7779 (with-output-to-file
7780 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7781 (lambda _
7782 (display
7783 (string-append "artifactId = pax-exam-spi\n"
7784 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7785 ;; Maven puts compilation results in the target directory, while we
7786 ;; put them in the build directory.
7787 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7788 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7789 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7790 (("target") "build"))
7791 ;; One test is expected to fail, but it doesn't throw the expected exception
7792 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7793 (("AssertionError") "IllegalArgumentException"))
7794 #t)))))
7795 (inputs
7796 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7797 ("lang" ,java-ops4j-base-lang)
7798 ("monitors" ,java-ops4j-base-monitors)
7799 ("store" ,java-ops4j-base-store)
7800 ("io" ,java-ops4j-base-io)
7801 ("spi" ,java-ops4j-base-spi)
7802 ("osgi" ,java-osgi-core)
7803 ("slf4j" ,java-slf4j-api)
7804 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7805 (native-inputs
7806 `(("mockito" ,java-mockito-1)
7807 ("junit" ,java-junit)
7808 ("hamcrest" ,java-hamcrest-core)
7809 ("cglib" ,java-cglib)
7810 ("objenesis" ,java-objenesis)
7811 ("asm" ,java-asm)))))
7812
7813(define-public java-ops4j-pax-exam-core-junit
7814 (package
7815 (inherit java-ops4j-pax-exam-core)
7816 (name "java-ops4j-pax-exam-core-junit")
7817 (arguments
7818 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7819 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7820 #:tests? #f)); no tests
7821 (inputs
7822 `(("junit" ,java-junit)
7823 ("slf4j" ,java-slf4j-api)
7824 ("core" ,java-ops4j-pax-exam-core)
7825 ("spi" ,java-ops4j-pax-exam-core-spi)))
7826 (native-inputs '())))
7827
7828(define-public java-fasterxml-jackson-annotations
7829 (package
7830 (name "java-fasterxml-jackson-annotations")
7831 (version "2.9.4")
7832 (source (origin
7833 (method url-fetch)
7834 (uri (string-append "https://github.com/FasterXML/"
7835 "jackson-annotations/archive/"
7836 "jackson-annotations-" version ".tar.gz"))
7837 (sha256
7838 (base32
7839 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7840 (build-system ant-build-system)
7841 (arguments
7842 `(#:jar-name "jackson-annotations.jar"
7843 #:source-dir "src/main/java"
7844 #:test-dir "src/test"))
7845 (native-inputs
7846 `(("junit" ,java-junit)))
7847 (home-page "https://github.com/FasterXML/jackson-annotations")
7848 (synopsis "General purpose annotations for the Jackson Data Processor")
7849 (description "This package contains general purpose annotations for the
7850Jackson Data Processor, used on value and handler types. The only annotations
7851not included are ones that require dependency to the Databind package.")
7852 (license license:asl2.0)))
7853
7854(define-public java-fasterxml-jackson-core
7855 (package
7856 (name "java-fasterxml-jackson-core")
7857 (version "2.9.4")
7858 (source (origin
7859 (method url-fetch)
7860 (uri (string-append "https://github.com/FasterXML/"
7861 "jackson-core/archive/"
7862 "jackson-core-" version ".tar.gz"))
7863 (sha256
7864 (base32
7865 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7866 (build-system ant-build-system)
7867 (arguments
7868 `(#:jar-name "jackson-core.jar"
7869 #:source-dir "src/main/java"
7870 #:test-dir "src/test"
7871 #:test-exclude
7872 (list
7873 ;; Expected failure. pom.xml excludes these
7874 "**/failing/**"
7875 ;; Base classes that have no constructor for junit
7876 "**/BaseTest.java"
7877 "**/ConcurrencyReadTest.java"
7878 "**/ManualCharAccessTest.java"
7879 "**/ManualCharAccessTest.java"
7880 "**/TrailingCommasTest.java"
7881 "**/AsyncMissingValuesInObjectTest.java"
7882 "**/AsyncMissingValuesInArrayTest.java")
7883 #:phases
7884 (modify-phases %standard-phases
7885 (add-before 'configure 'generate-PackageVersion.java
7886 (lambda _
7887 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7888 (in (string-append out ".in")))
7889 (copy-file in out)
7890 (substitute* out
7891 (("@package@") "com.fasterxml.jackson.core.json")
7892 (("@projectversion@") ,version)
7893 (("@projectgroupid@") "com.fasterxml.jackson.core")
7894 (("@projectartifactid@") "jackson-core")))
7895 #t))
7896 (add-before 'build 'copy-resources
7897 (lambda _
7898 (copy-recursively "src/main/resources"
7899 "build/classes")
7900 #t))
7901 (add-before 'check 'copy-test-resources
7902 (lambda _
7903 (copy-recursively "src/test/resources"
7904 "build/test-classes")
7905 #t)))))
7906 (native-inputs
7907 `(("junit" ,java-junit)
7908 ("hamcrest" ,java-hamcrest-core)))
7909 (home-page "https://github.com/FasterXML/jackson-core")
7910 (synopsis "")
7911 (description "")
7912 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7913
7914(define-public java-fasterxml-jackson-databind
7915 (package
7916 (name "java-fasterxml-jackson-databind")
7917 (version "2.9.4")
7918 (source (origin
7919 (method url-fetch)
7920 (uri (string-append "https://github.com/FasterXML/"
7921 "jackson-databind/archive/"
7922 "jackson-databind-" version ".tar.gz"))
7923 (sha256
7924 (base32
7925 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7926 (build-system ant-build-system)
7927 (arguments
7928 `(#:jar-name "jackson-databind.jar"
7929 #:source-dir "src/main/java"
7930 #:tests? #f; requires javax.measures for which I can't find a free implementation
7931 #:phases
7932 (modify-phases %standard-phases
7933 (add-before 'configure 'generate-PackageVersion.java
7934 (lambda _
7935 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7936 (in (string-append out ".in")))
7937 (copy-file in out)
7938 (substitute* out
7939 (("@package@") "com.fasterxml.jackson.databind.cfg")
7940 (("@projectversion@") ,version)
7941 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7942 (("@projectartifactid@") "jackson-databind")))
7943 #t))
7944 (add-before 'build 'copy-resources
7945 (lambda _
7946 (copy-recursively "src/main/resources" "build/classes")
7947 #t)))))
7948 (inputs
7949 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7950 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7951 (home-page "https://github.com/FasterXML/jackson-databind")
7952 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7953 (description "This package contains the general-purpose data-binding
7954functionality and tree-model for Jackson Data Processor. It builds on core
7955streaming parser/generator package, and uses Jackson Annotations for
7956configuration.")
7957 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7958
7959(define-public java-fasterxml-jackson-modules-base-jaxb
7960 (package
7961 (name "java-fasterxml-jackson-modules-base-jaxb")
7962 (version "2.9.4")
7963 (source (origin
7964 (method url-fetch)
7965 (uri (string-append "https://github.com/FasterXML/"
7966 "jackson-modules-base/archive/"
7967 "jackson-modules-base-" version ".tar.gz"))
7968 (sha256
7969 (base32
7970 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7971 (build-system ant-build-system)
7972 (arguments
7973 `(#:jar-name "jackson-modules-base-jaxb.jar"
7974 #:source-dir "jaxb/src/main/java"
7975 #:test-dir "jaxb/src/test"
7976 #:test-exclude
7977 ;; Base class for tests
7978 (list "**/BaseJaxbTest.java")
7979 #:phases
7980 (modify-phases %standard-phases
7981 (add-before 'configure 'generate-PackageVersion.java
7982 (lambda _
7983 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7984 "jackson/module/jaxb/PackageVersion.java"))
7985 (in (string-append out ".in")))
7986 (copy-file in out)
7987 (substitute* out
7988 (("@package@") "com.fasterxml.jackson.module.jaxb")
7989 (("@projectversion@") ,version)
7990 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7991 (("@projectartifactid@") "jackson-module-jaxb")))
7992 #t))
7993 (add-before 'build 'copy-resources
7994 (lambda _
7995 (copy-recursively "jaxb/src/main/resources" "build/classes")
7996 #t)))))
7997 (inputs
7998 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7999 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8000 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8001 (native-inputs
8002 `(("java-junit" ,java-junit)))
8003 (home-page "https://github.com/FasterXML/jackson-modules-base")
8004 (synopsis "Jaxb annotations jackson module")
8005 (description "This package is the jaxb annotations module for jackson.")
8006 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8007
8008(define-public java-fasterxml-jackson-modules-base-mrbean
8009 (package
8010 (name "java-fasterxml-jackson-modules-base-mrbean")
8011 (version "2.9.4")
8012 (source (origin
8013 (method url-fetch)
8014 (uri (string-append "https://github.com/FasterXML/"
8015 "jackson-modules-base/archive/"
8016 "jackson-modules-base-" version ".tar.gz"))
8017 (sha256
8018 (base32
8019 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8020 (build-system ant-build-system)
8021 (arguments
8022 `(#:jar-name "jackson-modules-base-mrbean.jar"
8023 #:source-dir "mrbean/src/main/java"
8024 #:test-dir "mrbean/src/test"
8025 #:test-exclude
8026 ;; Base class for tests
8027 (list "**/BaseTest.java")
8028 #:phases
8029 (modify-phases %standard-phases
8030 (add-before 'configure 'generate-PackageVersion.java
8031 (lambda _
8032 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8033 "jackson/module/mrbean/PackageVersion.java"))
8034 (in (string-append out ".in")))
8035 (copy-file in out)
8036 (substitute* out
8037 (("@package@") "com.fasterxml.jackson.module.mrbean")
8038 (("@projectversion@") ,version)
8039 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8040 (("@projectartifactid@") "jackson-module-mrbean")))
8041 #t)))))
8042 (inputs
8043 `(("java-asm" ,java-asm)
8044 ("java-fasterxml-jackson-annotations"
8045 ,java-fasterxml-jackson-annotations)
8046 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8047 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8048 (native-inputs
8049 `(("java-junit" ,java-junit)))
8050 (home-page "https://github.com/FasterXML/jackson-modules-base")
8051 (synopsis "POJO type materialization for Java")
8052 (description "This package implements POJO type materialization.
8053Databinders can construct implementation classes for Java interfaces as part
8054of deserialization.")
8055 (license license:asl2.0)))
8056
8057(define-public java-snakeyaml
8058 (package
8059 (name "java-snakeyaml")
8060 (version "1.18")
8061 (source (origin
8062 (method url-fetch)
8063 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8064 version ".tar.gz"))
8065 (file-name (string-append name "-" version ".tar.gz"))
8066 (sha256
8067 (base32
8068 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8069 (build-system ant-build-system)
8070 (arguments
8071 `(#:jar-name "java-snakeyaml.jar"
8072 #:source-dir "src/main/java"
8073 ;; Tests require velocity, a cyclic dependency, and
8074 ;; java-spring-framework-context which is not packaged.
8075 #:tests? #f))
8076 (home-page "https://bitbucket.org/asomov/snakeyaml")
8077 (synopsis "YAML processor")
8078 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8079 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8080
8081(define-public java-fasterxml-jackson-dataformat-yaml
8082 (package
8083 (name "java-fasterxml-jackson-dataformat-yaml")
8084 (version "2.9.4")
8085 (source (origin
8086 (method url-fetch)
8087 (uri (string-append "https://github.com/FasterXML/"
8088 "jackson-dataformats-text/archive/"
8089 "jackson-dataformats-text-" version ".tar.gz"))
8090 (sha256
8091 (base32
8092 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8093 (build-system ant-build-system)
8094 (arguments
8095 `(#:jar-name "jackson-dataformat-yaml.jar"
8096 #:source-dir "yaml/src/main/java"
8097 #:test-dir "yaml/src/test"
8098 #:test-exclude (list "**/failing/**.java")
8099 #:phases
8100 (modify-phases %standard-phases
8101 (add-before 'configure 'generate-PackageVersion.java
8102 (lambda _
8103 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8104 (in (string-append out ".in")))
8105 (copy-file in out)
8106 (substitute* out
8107 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8108 (("@projectversion@") ,version)
8109 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8110 (("@projectartifactid@") "jackson-dataformat-yaml")))
8111 #t)))))
8112 (inputs
8113 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8114 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8115 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8116 ("java-snakeyaml" ,java-snakeyaml)))
8117 (native-inputs
8118 `(("junit" ,java-junit)
8119 ("hamcrest" ,java-hamcrest-core)
8120 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8121 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8122 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8123 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8124 (synopsis "Yaml backend for Jackson")
8125 (description "Dataformat backends are used to support format alternatives
8126to JSON, supported by default. This is done by sub-classing Jackson core
8127abstractions.")
8128 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8129
8130(define-public java-stax2-api
8131 (package
8132 (name "java-stax2-api")
8133 (version "4.0.0")
8134 (source (origin
8135 (method url-fetch)
8136 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8137 "stax2-api-" version ".tar.gz"))
8138 (sha256
8139 (base32
8140 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8141 (build-system ant-build-system)
8142 (arguments
8143 `(#:jar-name "java-stax2-api.jar"
8144 #:source-dir "src/main/java"
8145 #:tests? #f)); no tests
8146 (home-page "https://github.com/FasterXML/stax2-api")
8147 (synopsis "Stax2 API")
8148 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8149significant new functionalities, such as full-featured bi-direction validation
8150interface and high-performance Typed Access API.")
8151 (license license:bsd-2)))
8152
8153(define-public java-woodstox-core
8154 (package
8155 (name "java-woodstox-core")
8156 (version "5.0.3")
8157 (source (origin
8158 (method url-fetch)
8159 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8160 "woodstox-core-" version ".tar.gz"))
8161 (sha256
8162 (base32
8163 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8164 (build-system ant-build-system)
8165 (arguments
8166 `(#:jar-name "woodstox.jar"
8167 #:test-exclude
8168 (list "**/Base*.java" "failing/**")
8169 #:phases
8170 (modify-phases %standard-phases
8171 (add-before 'build 'remove-msv-dep
8172 (lambda _
8173 ;; we don't need osgi, and it depends on msv
8174 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8175 ;; msv's latest release is from 2011 and we don't need it
8176 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8177 (delete-file-recursively "src/test/java/wstxtest/osgi")
8178 (delete-file-recursively "src/test/java/wstxtest/msv")
8179 #t))
8180 (add-before 'build 'copy-resources
8181 (lambda _
8182 (copy-recursively "src/main/resources" "build/classes")
8183 #t)))))
8184 (inputs
8185 `(("stax2" ,java-stax2-api)))
8186 (native-inputs
8187 `(("junit" ,java-junit)))
8188 (home-page "https://github.com/FasterXML/woodstox")
8189 (synopsis "Stax XML API implementation")
8190 (description "Woodstox is a stax XML API implementation.")
8191 (license license:asl2.0)))
8192
8193(define-public java-fasterxml-jackson-dataformat-xml
8194 (package
8195 (name "java-fasterxml-jackson-dataformat-xml")
8196 (version "2.9.4")
8197 (source (origin
8198 (method url-fetch)
8199 (uri (string-append "https://github.com/FasterXML/"
8200 "jackson-dataformat-xml/archive/"
8201 "jackson-dataformat-xml-" version ".tar.gz"))
8202 (sha256
8203 (base32
8204 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8205 (build-system ant-build-system)
8206 (arguments
8207 `(#:jar-name "jackson-dataformat-xml.jar"
8208 #:source-dir "src/main/java"
8209 #:test-exclude
8210 (list "**/failing/**")
8211 #:phases
8212 (modify-phases %standard-phases
8213 (add-before 'configure 'generate-PackageVersion.java
8214 (lambda _
8215 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8216 (in (string-append out ".in")))
8217 (copy-file in out)
8218 (newline)
8219 (substitute* out
8220 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8221 (("@projectversion@") ,version)
8222 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8223 (("@projectartifactid@") "jackson-dataformat-xml")))
8224 #t))
8225 (add-before 'build 'copy-resources
8226 (lambda _
8227 (copy-recursively "src/main/resources" "build/classes")
8228 #t)))))
8229 (inputs
8230 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8231 ("jackson-core" ,java-fasterxml-jackson-core)
8232 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8233 ("jackson-databind" ,java-fasterxml-jackson-databind)
8234 ("stax2-api" ,java-stax2-api)
8235 ("woodstox" ,java-woodstox-core)))
8236 (native-inputs
8237 `(("junit" ,java-junit)
8238 ("hamcrest" ,java-hamcrest-core)))
8239 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8240 (synopsis "Read and write XML")
8241 (description "This package contains Jackson extension component for reading
8242and writing XML encoded data.
8243
8244Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8245approach (that is, no support is added for \"Schema-first\" approach). Support
8246for JAXB annotations is provided by JAXB annotation module; this module
8247provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8248@code{JsonFactory}) as well as small number of higher level overrides needed to
8249make data-binding work.")
8250 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8251
8252(define-public java-hdrhistogram
8253 (package
8254 (name "java-hdrhistogram")
8255 (version "2.1.9")
8256 (source (origin
8257 (method url-fetch)
8258 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8259 "archive/HdrHistogram-" version ".tar.gz"))
8260 (sha256
8261 (base32
8262 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8263 (build-system ant-build-system)
8264 (arguments
8265 `(#:jar-name "java-hdrhistogram.jar"
8266 #:source-dir "src/main/java"
8267 #:phases
8268 (modify-phases %standard-phases
8269 (add-before 'configure 'set-version
8270 (lambda _
8271 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8272 (template (string-append version-java ".template")))
8273 (copy-file template version-java)
8274 (substitute* version-java
8275 (("\\$VERSION\\$") ,version)
8276 (("\\$BUILD_TIME\\$") "0"))
8277 #t))))))
8278 (native-inputs
8279 `(("junit" ,java-junit)
8280 ("hamcrest" ,java-hamcrest-core)))
8281 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8282 (synopsis "High dynamic range histogram")
8283 (description "Hdrhistogram allows to create histograms that support
8284recording and analyzing sampled data value counts across a configurable integer
8285value range with configurable value precision within the range. Value precision
8286is expressed as the number of significant digits in the value recording, and
8287provides control over value quantization behavior across the value range and
8288the subsequent value resolution at any given level.")
8289 (license license:public-domain)))
8290
8291(define-public java-cofoja
8292 (package
8293 (name "java-cofoja")
8294 (version "1.3")
8295 (source (origin
8296 (method git-fetch)
8297 (uri (git-reference
8298 (url "https://github.com/nhatminhle/cofoja.git")
8299 (commit (string-append "v" version))))
8300 (file-name (string-append "java-cofoja-" version "-checkout"))
8301 (sha256
8302 (base32
8303 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8304 (build-system ant-build-system)
8305 (arguments
8306 `(#:build-target "dist"
8307 #:test-target "test"
8308 #:jdk ,icedtea-8
8309 #:make-flags
8310 (list "-Ddist.dir=dist")
8311 #:modules ((guix build ant-build-system)
8312 (guix build java-utils)
8313 (guix build utils)
8314 (srfi srfi-1)
8315 (ice-9 match))
8316 #:phases
8317 (modify-phases %standard-phases
8318 ;; The bulid system ignores the class path the ant-build-system sets
8319 ;; up and instead expects to find all dependencies in the "lib"
8320 ;; directory.
8321 (add-after 'unpack 'create-libdir
8322 (lambda* (#:key inputs #:allow-other-keys)
8323 (mkdir-p "lib")
8324 (for-each
8325 (lambda (file)
8326 (let ((target (string-append "lib/" (basename file))))
8327 (unless (file-exists? target)
8328 (symlink file target))))
8329 (append-map (match-lambda
8330 ((label . dir)
8331 (find-files dir "\\.jar$")))
8332 inputs))
8333 #t))
8334 (replace 'install (install-jars "dist")))))
8335 (inputs
8336 `(("java-asm" ,java-asm)))
8337 (native-inputs
8338 `(("java-junit" ,java-junit)))
8339 (home-page "https://github.com/nhatminhle/cofoja")
8340 (synopsis "Contracts for Java")
8341 (description "Contracts for Java, or Cofoja for short, is a contract
8342programming framework and test tool for Java, which uses annotation processing
8343and bytecode instrumentation to provide run-time checking. (In particular,
8344this is not a static analysis tool.)")
8345 (license license:lgpl3+)))
8346
8347(define-public java-aopalliance
8348 (package
8349 (name "java-aopalliance")
8350 (version "1.0")
8351 (source (origin
8352 (method git-fetch)
8353 ;; Note: this git repository is not official, but contains the
8354 ;; source code that is in the CVS repository. Downloading the
8355 ;; tarball from sourceforge is undeterministic, and the cvs download
8356 ;; fails.
8357 (uri (git-reference
8358 (url "https://github.com/hoverruan/aopalliance")
8359 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8360 (file-name (string-append name "-" version))
8361 (sha256
8362 (base32
8363 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8364 (build-system ant-build-system)
8365 (arguments
8366 `(#:jar-name "java-aopalliance.jar"
8367 #:jdk ,icedtea-8
8368 #:tests? #f; no tests
8369 #:source-dir "aopalliance/src/main"))
8370 (home-page "http://aopalliance.sourceforge.net")
8371 (synopsis "Aspect-Oriented Programming")
8372 (description "The AOP Alliance project is a joint project between several
8373software engineering people who are interested in Aspect-Oriented Programming
8374(AOP) and Java.")
8375 (license license:public-domain)))
8376
8377(define-public java-javax-inject
8378 (package
8379 (name "java-javax-inject")
8380 (version "tck-1")
8381 (source (origin
8382 (method url-fetch)
8383 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8384 "archive/javax.inject-" version ".tar.gz"))
8385 (sha256
8386 (base32
8387 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8388 (build-system ant-build-system)
8389 (arguments
8390 `(#:jar-name "java-javax-inject.jar"
8391 #:jdk ,icedtea-8
8392 #:tests? #f)); no tests
8393 (home-page "http://github.com/javax-inject/javax-inject")
8394 (synopsis "JSR-330: Dependency Injection for Java")
8395 (description "This package specifies a means for obtaining objects in such
8396a way as to maximize reusability, testability and maintainability compared to
8397traditional approaches such as constructors, factories, and service locators
8398(e.g., JNDI). This process, known as dependency injection, is beneficial to
8399most nontrivial applications.
8400
8401Many types depend on other types. For example, a @var{Stopwatch} might depend
8402on a @var{TimeSource}. The types on which a type depends are known as its
8403dependencies. The process of finding an instance of a dependency to use at run
8404time is known as resolving the dependency. If no such instance can be found,
8405the dependency is said to be unsatisfied, and the application is broken.")
8406 (license license:asl2.0)))
8407
8408(define-public java-guice
8409 (package
8410 (name "java-guice")
8411 (version "4.1")
8412 (source (origin
8413 (method url-fetch)
8414 (uri (string-append "https://github.com/google/guice/archive/"
8415 version ".tar.gz"))
8416 (file-name (string-append name "-" version ".tar.gz"))
8417 (modules '((guix build utils)))
8418 (snippet
8419 `(begin
8420 (for-each delete-file (find-files "." ".*.jar"))))
8421 (sha256
8422 (base32
8423 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8424 (build-system ant-build-system)
8425 (arguments
8426 `(#:jar-name "java-guice.jar"
8427 #:jdk ,icedtea-8
8428 #:tests? #f; FIXME: tests are not in a java sub directory
8429 #:source-dir "core/src"))
8430 (inputs
8431 `(("guava" ,java-guava)
8432 ("java-cglib" ,java-cglib)
8433 ("java-aopalliance" ,java-aopalliance)
8434 ("java-javax-inject" ,java-javax-inject)
8435 ("java-asm" ,java-asm)))
8436 (home-page "https://github.com/google/guice")
8437 (synopsis "Lightweight dependency injection framework")
8438 (description "Guice is a lightweight dependency injection framework fo
8439Java 6 and above.")
8440 (license license:asl2.0)))
8441
8442(define-public java-guice-servlet
8443 (package
8444 (inherit java-guice)
8445 (name "java-guice-servlet")
8446 (arguments
8447 `(#:jar-name "guice-servlet.jar"
8448 #:source-dir "extensions/servlet/src/"
8449 #:jdk ,icedtea-8
8450 #:tests? #f)); FIXME: not in a java subdir
8451 (inputs
8452 `(("guice" ,java-guice)
8453 ("servlet" ,java-classpathx-servletapi)
8454 ,@(package-inputs java-guice)))))
8455
8456(define-public java-assertj
8457 (package
8458 (name "java-assertj")
8459 (version "3.8.0")
8460 (source (origin
8461 (method url-fetch)
8462 (uri (string-append "https://github.com/joel-costigliola/"
8463 "assertj-core/archive/"
8464 "assertj-core-" version ".tar.gz"))
8465 (sha256
8466 (base32
8467 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8468 (build-system ant-build-system)
8469 (arguments
8470 `(#:jar-name "java-assertj.jar"
8471 #:jdk ,icedtea-8
8472 #:source-dir "src/main/java"
8473 #:tests? #f)); depends on tng-junit which depends on assertj
8474 (inputs
8475 `(("cglib" ,java-cglib)
8476 ("junit" ,java-junit)
8477 ("hamcrest" ,java-hamcrest-core)))
8478 (native-inputs
8479 `(("mockito" ,java-mockito-1)))
8480 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8481 (synopsis "Fluent assertions for java")
8482 (description "AssertJ core is a Java library that provides a fluent
8483interface for writing assertions. Its main goal is to improve test code
8484readability and make maintenance of tests easier.")
8485 (license license:asl2.0)))
8486
8487(define-public java-jboss-javassist
8488 (package
8489 (name "java-jboss-javassist")
8490 (version "3.21.0")
8491 (source (origin
8492 (method url-fetch)
8493 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8494 "archive/rel_"
8495 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8496 "_ga.tar.gz"))
8497 (sha256
8498 (base32
8499 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8500 (build-system ant-build-system)
8501 (arguments
8502 `(#:jar-name "java-jboss-javassist.jar"
8503 #:jdk ,icedtea-8
8504 #:source-dir "src/main"
8505 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8506 #:phases
8507 (modify-phases %standard-phases
8508 (add-before 'configure 'remove-binary
8509 (lambda _
8510 (delete-file "javassist.jar")
8511 #t)))))
8512 (native-inputs
8513 `(("junit" ,java-junit)))
8514 (home-page "https://github.com/jboss-javassist/javassist")
8515 (synopsis "Java bytecode engineering toolkit")
8516 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8517manipulation simple. It is a class library for editing bytecodes in Java; it
8518enables Java programs to define a new class at runtime and to modify a class
8519file when the JVM loads it.")
8520 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8521
8522(define-public java-jcommander
8523 (package
8524 (name "java-jcommander")
8525 (version "1.71")
8526 (source (origin
8527 (method url-fetch)
8528 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8529 version ".tar.gz"))
8530 (file-name (string-append name "-" version ".tar.gz"))
8531 (sha256
8532 (base32
8533 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8534 (build-system ant-build-system)
8535 (arguments
8536 `(#:jar-name "java-jcommander.jar"
8537 #:jdk ,icedtea-8
8538 #:tests? #f; requires testng which depends on jcommander
8539 #:source-dir "src/main/java"))
8540 (home-page "http://jcommander.org")
8541 (synopsis "Command line parameters parser")
8542 (description "JCommander is a very small Java framework that makes it
8543trivial to parse command line parameters. Parameters are declared with
8544annotations.")
8545 (license license:asl2.0)))
8546
8547(define-public java-bsh
8548 (package
8549 (name "java-bsh")
8550 (version "2.0b6")
8551 (source (origin
8552 (method url-fetch)
8553 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8554 version ".tar.gz"))
8555 (file-name (string-append name "-" version ".tar.gz"))
8556 (sha256
8557 (base32
8558 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8559 (build-system ant-build-system)
8560 (arguments
8561 `(#:build-target "jarall"
8562 #:test-target "junit-tests-all"
8563 #:phases
8564 (modify-phases %standard-phases
8565 (replace 'install
8566 (lambda* (#:key outputs #:allow-other-keys)
8567 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8568 (mkdir-p share)
8569 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8570 #t))))))
8571 (home-page "http://beanshell.org/")
8572 (synopsis "Lightweight Scripting for Java")
8573 (description "BeanShell is a small, free, embeddable Java source
8574interpreter with object scripting language features, written in Java.
8575BeanShell dynamically executes standard Java syntax and extends it with common
8576scripting conveniences such as loose types, commands, and method closures like
8577those in Perl and JavaScript.")
8578 (license license:asl2.0)))
8579
8580(define-public java-fest-util
8581 (package
8582 (name "java-fest-util")
8583 (version "1.2.5")
8584 (source (origin
8585 (method url-fetch)
8586 (uri (string-append "https://github.com/alexruiz/fest-util/"
8587 "archive/fest-util-" version ".tar.gz"))
8588 (sha256
8589 (base32
8590 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8591 (build-system ant-build-system)
8592 (arguments
8593 `(#:jar-name "java-fest-util.jar"
8594 #:source-dir "src/main/java"))
8595 (native-inputs
8596 `(("junit" ,java-junit)
8597 ("hamcrest" ,java-hamcrest-core)))
8598 (home-page "https://github.com/alexruiz/fest-util")
8599 (synopsis "FEST common utilities")
8600 (description "Common utilities used in all FEST module.")
8601 (license license:asl2.0)))
8602
8603(define-public java-fest-test
8604 (package
8605 (name "java-fest-test")
8606 (version "2.1.0")
8607 (source (origin
8608 (method url-fetch)
8609 (uri (string-append "https://github.com/alexruiz/fest-test/"
8610 "archive/fest-test-" version ".tar.gz"))
8611 (sha256
8612 (base32
8613 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8614 (build-system ant-build-system)
8615 (arguments
8616 `(#:jar-name "java-fest-test.jar"
8617 #:source-dir "src/main/java"
8618 #:tests? #f)); no tests
8619 (inputs
8620 `(("junit" ,java-junit)))
8621 (home-page "https://github.com/alexruiz/fest-test")
8622 (synopsis "Common FEST testing infrastructure")
8623 (description "Fest-test contains the common FEST testing infrastructure.")
8624 (license license:asl2.0)))
8625
8626(define-public java-fest-assert
8627 (package
8628 (name "java-fest-assert")
8629 (version "2.0M10")
8630 (source (origin
8631 (method url-fetch)
8632 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8633 "archive/fest-assert-core-" version ".tar.gz"))
8634 (sha256
8635 (base32
8636 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8637 (build-system ant-build-system)
8638 (arguments
8639 `(#:jar-name "java-fest-assert.jar"
8640 #:source-dir "src/main/java"
8641 #:test-exclude
8642 (list
8643 "**/Abstract*.java"
8644 "**/*BaseTest.java"
8645 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8646 "**/MessageFormatter_format_Test.java"
8647 "**/internal/*/*_assert*_Test.java")))
8648 (inputs
8649 `(("java-fest-util" ,java-fest-util)))
8650 (native-inputs
8651 `(("java-junit" ,java-junit)
8652 ("java-fest-test" ,java-fest-test)
8653 ("java-hamcrest-core" ,java-hamcrest-core)
8654 ("java-mockito" ,java-mockito-1)
8655 ("java-cglib" ,java-cglib)
8656 ("java-objenesis" ,java-objenesis)
8657 ("java-asm" ,java-asm)))
8658 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8659 (synopsis "FEST fluent assertions")
8660 (description "FEST-Assert provides a fluent interface for assertions.")
8661 (license license:asl2.0)))
8662
8663(define-public java-testng
8664 (package
8665 (name "java-testng")
8666 (version "6.14.3")
8667 (source (origin
8668 (method git-fetch)
8669 (uri (git-reference
8670 (url "https://github.com/cbeust/testng.git")
8671 (commit version)))
8672 (file-name (string-append name "-" version "-checkout"))
8673 (sha256
8674 (base32
8675 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8676 (build-system ant-build-system)
8677 (arguments
8678 `(#:jdk ,icedtea-8; java.util.function
8679 #:jar-name "java-testng.jar"
8680 #:source-dir "src/main/java"
8681 #:phases
8682 (modify-phases %standard-phases
8683 ;; FIXME: I don't know why these tests fail
8684 (add-after 'unpack 'delete-failing-tests
8685 (lambda _
8686 (substitute* "src/test/resources/testng.xml"
8687 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8688 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8689 #t))
8690 ;; We don't have groovy
8691 (add-after 'unpack 'delete-groovy-tests
8692 (lambda _
8693 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8694 (substitute* "src/test/resources/testng.xml"
8695 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8696 #t))
8697 (add-before 'build 'copy-resources
8698 (lambda _
8699 (copy-recursively "src/main/resources" "build/classes")
8700 #t))
8701 (add-before 'check 'copy-test-resources
8702 (lambda _
8703 (copy-recursively "src/test/resources" "build/test-classes")
8704 #t))
8705 (replace 'check
8706 (lambda _
8707 (invoke "ant" "compile-tests")
8708 ;; we don't have groovy
8709 (substitute* "src/test/resources/testng.xml"
8710 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8711 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8712 ":build/classes"
8713 ":build/test-classes")
8714 "-Dtest.resources.dir=src/test/resources"
8715 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8716 (propagated-inputs
8717 `(("junit" ,java-junit)
8718 ("java-jsr305" ,java-jsr305)
8719 ("java-bsh" ,java-bsh)
8720 ("java-jcommander" ,java-jcommander)
8721 ("java-guice" ,java-guice)
8722 ("snakeyaml" ,java-snakeyaml)))
8723 (native-inputs
8724 `(("guava" ,java-guava)
8725 ("java-javax-inject" ,java-javax-inject)
8726 ("java-hamcrest" ,java-hamcrest-all)
8727 ("java-assertj" ,java-assertj)
8728 ("java-mockito" ,java-mockito-1)
8729 ("cglib" ,java-cglib)
8730 ("asm" ,java-asm)
8731 ("aopalliance" ,java-aopalliance)))
8732 (home-page "http://testng.org")
8733 (synopsis "Testing framework")
8734 (description "TestNG is a testing framework inspired from JUnit and NUnit
8735but introducing some new functionalities that make it more powerful and easier
8736to use.")
8737 (license license:asl2.0)))
8738
8739(define-public java-jnacl
8740 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8741 (revision "2"))
8742 (package
8743 (name "java-jnacl")
8744 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8745 (source (origin
8746 (method git-fetch)
8747 (uri (git-reference
8748 (url "https://github.com/neilalexander/jnacl.git")
8749 (commit commit)))
8750 (file-name (git-file-name name version))
8751 (sha256
8752 (base32
8753 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8754 (build-system ant-build-system)
8755 (arguments
8756 `(#:jar-name "jnacl.jar"
8757 #:source-dir "src/main/java"
8758 #:jdk ,icedtea-8
8759 #:phases
8760 (modify-phases %standard-phases
8761 (add-before 'build 'fix-tests
8762 (lambda _
8763 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8764 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8765 (("assertions.Assertions") "assertions.api.Assertions"))
8766 #t))
8767 (replace 'check
8768 (lambda _
8769 (invoke "ant" "compile-tests")
8770 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8771 ":build/classes"
8772 ":build/test-classes")
8773 "org.testng.TestNG" "-testclass"
8774 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8775 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8776 ":build/classes"
8777 ":build/test-classes")
8778 "org.testng.TestNG" "-testclass"
8779 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
8780 (native-inputs
8781 `(("java-testng" ,java-testng)
8782 ("java-fest-util" ,java-fest-util)
8783 ("java-fest-assert" ,java-fest-assert)))
8784 (home-page "https://github.com/neilalexander/jnacl")
8785 (synopsis "Java implementation of NaCl")
8786 (description "Pure Java implementation of the NaCl: Networking and
8787Cryptography library.")
8788 (license license:bsd-2))))
8789
8790(define-public java-mvel2
8791 (package
8792 (name "java-mvel2")
8793 (version "2.3.1")
8794 (source (origin
8795 (method url-fetch)
8796 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8797 version ".Final.tar.gz"))
8798 (sha256
8799 (base32
8800 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8801 (build-system ant-build-system)
8802 (arguments
8803 `(#:jar-name "mvel2.jar"
8804 #:source-dir "src/main/java"
8805 #:test-exclude
8806 (list "**/Abstract*.java"
8807 ;; Base class with no tests
8808 "**/MVELThreadTest.java")
8809 #:phases
8810 (modify-phases %standard-phases
8811 (add-after 'install 'install-bin
8812 (lambda* (#:key outputs #:allow-other-keys)
8813 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8814 (mkdir-p bin)
8815 (with-output-to-file (string-append bin "/mvel2")
8816 (lambda _
8817 (display
8818 (string-append
8819 "#!" (which "bash") "\n"
8820 "if [ \"$#\" -ne \"2\" ]; then\n"
8821 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8822 "exit\n"
8823 "fi\n"
8824 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8825 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8826 " org.mvel2.sh.Main $1"))))
8827 (chmod (string-append bin "/mvel2") #o755))
8828 #t)))))
8829 (native-inputs
8830 `(("junit" ,java-junit)
8831 ("hamcrest" ,java-hamcrest-core)))
8832 (home-page "https://github.com/mvel/mvel")
8833 (synopsis "MVFLEX Expression Language")
8834 (description "MVEL has largely been inspired by Java syntax, but has some
8835fundamental differences aimed at making it more efficient as an expression
8836language, such as operators that directly support collection, array and string
8837matching, as well as regular expressions. MVEL is used to evaluate expressions
8838written using Java syntax.
8839
8840In addition to the expression language, MVEL serves as a templating language for
8841configuration and string construction.")
8842 (license license:asl2.0)))
8843
8844(define-public java-commons-jexl-2
8845 (package
8846 (name "java-commons-jexl")
8847 (version "2.1.1")
8848 (source (origin
8849 (method url-fetch)
8850 (uri (string-append "mirror://apache/commons/jexl/source/"
8851 "commons-jexl-" version "-src.tar.gz"))
8852 (sha256
8853 (base32
8854 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8855 (build-system ant-build-system)
8856 (arguments
8857 `(#:jar-name "commons-jexl-2.jar"
8858 #:jdk ,icedtea-8
8859 #:source-dir "src/main/java"
8860 #:phases
8861 (modify-phases %standard-phases
8862 (add-before 'check 'disable-broken-tests
8863 (lambda* (#:key inputs #:allow-other-keys)
8864 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8865 (substitute* "ArithmeticTest.java"
8866 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8867 (("asserter.assertExpression\\(\"imanull") "//"))
8868 ;; This test fails with "ambiguous method invocation"
8869 (delete-file "CacheTest.java")
8870 ;; This test doesn't have access to the temp directory
8871 (substitute* "ClassCreatorTest.java"
8872 (("java.io.tmpdir") "user.dir"))
8873 ;; This test fails in trying to detect whether it can run.
8874 (substitute* "ClassCreator.java"
8875 (("boolean canRun =.*") "boolean canRun = false;\n"))
8876 ;; ...and these tests depend on it.
8877 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8878 (delete-file "scripting/JexlScriptEngineTest.java"))
8879 #t))
8880 (add-before 'build 'run-javacc
8881 (lambda _
8882 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
8883 (invoke "java" "jjtree" "Parser.jjt")
8884 (invoke "java" "javacc" "Parser.jj"))
8885 #t)))))
8886 (inputs
8887 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8888 (native-inputs
8889 `(("java-junit" ,java-junit)
8890 ("java-hamcrest-core" ,java-hamcrest-core)
8891 ("javacc" ,javacc-4)))
8892 (home-page "https://commons.apache.org/proper/commons-jexl/")
8893 (synopsis "Java Expression Language ")
8894 (description "JEXL is a library intended to facilitate the implementation
8895of dynamic and scripting features in applications and frameworks written in
8896Java. JEXL implements an Expression Language based on some extensions to the
8897JSTL Expression Language supporting most of the constructs seen in
8898shell-script or ECMAScript. Its goal is to expose scripting features usable
8899by technical operatives or consultants working with enterprise platforms.")
8900 (license license:asl2.0)))
8901
8902(define-public java-lz4
8903 (package
8904 (name "java-lz4")
8905 (version "1.4.0")
8906 (source (origin
8907 (method url-fetch)
8908 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8909 version ".tar.gz"))
8910 (file-name (string-append name "-" version ".tar.gz"))
8911 (sha256
8912 (base32
8913 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8914 (build-system ant-build-system)
8915 (arguments
8916 `(#:jar-name "lz4.jar"
8917 #:jdk ,icedtea-8
8918 #:source-dir "src/java:src/java-unsafe"
8919 #:tests? #f; FIXME: requires more dependencies
8920 #:phases
8921 (modify-phases %standard-phases
8922 (add-before 'configure 'generate-source
8923 (lambda _
8924 (with-directory-excursion "src/build/source_templates"
8925 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8926 #t)))))
8927 (native-inputs
8928 `(("mvel" ,java-mvel2)))
8929 (home-page "https://jpountz.github.io/lz4-java")
8930 (synopsis "Compression algorithm")
8931 (description "LZ4 - Java is a Java port of the popular lz4 compression
8932algorithms and xxHash hashing algorithm.")
8933 (license license:asl2.0)))
8934
8935(define-public java-bouncycastle
8936 (package
8937 (name "java-bouncycastle")
8938 (version "1.60")
8939 (source (origin
8940 (method url-fetch)
8941 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
8942 (substring version 0 1) "v"
8943 (substring version 2 4) ".tar.gz"))
8944 (sha256
8945 (base32
8946 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
8947 (modules '((guix build utils)))
8948 (snippet
8949 '(begin
8950 (for-each delete-file
8951 (find-files "." "\\.jar$"))
8952 #t))))
8953 (build-system ant-build-system)
8954 (arguments
8955 `(#:jdk ,icedtea-8
8956 #:tests? #f
8957 #:phases
8958 (modify-phases %standard-phases
8959 (replace 'build
8960 (lambda _
8961 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
8962 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
8963 ;; FIXME: the tests freeze.
8964 ;; (replace 'check
8965 ;; (lambda _
8966 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
8967 (replace 'install
8968 (install-jars "build/artifacts/jdk1.5/jars")))))
8969 (inputs
8970 `(("java-javax-mail" ,java-javax-mail)))
8971 (native-inputs
8972 `(("unzip" ,unzip)
8973 ("junit" ,java-junit)
8974 ("java-native-access" ,java-native-access)
8975 ("java-native-access-platform" ,java-native-access-platform)))
8976 (home-page "https://www.bouncycastle.org")
8977 (synopsis "Cryptographic library")
8978 (description "Bouncy Castle is a cryptographic library for the Java
8979programming language.")
8980 (license license:expat)))
8981
8982(define-public java-lmax-disruptor
8983 (package
8984 (name "java-lmax-disruptor")
8985 (version "3.3.7")
8986 (source (origin
8987 (method url-fetch)
8988 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8989 "archive/" version ".tar.gz"))
8990 (file-name (string-append name "-" version ".tar.gz"))
8991 (sha256
8992 (base32
8993 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8994 (build-system ant-build-system)
8995 (arguments
8996 `(#:jar-name "java-lmax-disruptor.jar"
8997 #:jdk ,icedtea-8
8998 #:tests? #f)); tests hang
8999 (inputs
9000 `(("junit" ,java-junit)
9001 ("java-hdrhistogram" ,java-hdrhistogram)
9002 ("java-jmock" ,java-jmock)
9003 ("java-jmock-legacy" ,java-jmock-legacy)
9004 ("java-jmock-junit4" ,java-jmock-junit4)
9005 ("java-hamcrest-all" ,java-hamcrest-all)))
9006 (native-inputs
9007 `(("cglib" ,java-cglib)
9008 ("objenesis" ,java-objenesis)
9009 ("asm" ,java-asm)))
9010 (home-page "https://www.lmax.com/disruptor")
9011 (synopsis "High performance inter-thread communication")
9012 (description "LMAX Disruptor is a software pattern and software component
9013for high performance inter-thread communication that avoids the need for
9014message queues or resource locking.")
9015 (license license:asl2.0)))
9016
9017(define-public java-commons-bcel
9018 (package
9019 (name "java-commons-bcel")
9020 (version "6.1")
9021 (source (origin
9022 (method url-fetch)
9023 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9024 version "-src.tar.gz"))
9025 (sha256
9026 (base32
9027 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9028 (build-system ant-build-system)
9029 (arguments
9030 `(#:jar-name "bcel.jar"
9031 #:jdk ,icedtea-8
9032 #:source-dir "src/main/java"
9033 #:test-dir "src/test/java"
9034 ;; FIXME: Tests require the unpackaged jna.
9035 #:tests? #f))
9036 (home-page "https://commons.apache.org/proper/commons-bcel/")
9037 (synopsis "Byte code engineering library")
9038 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9039intended to give users a convenient way to analyze, create, and
9040manipulate (binary) Java class files. Classes are represented by objects
9041which contain all the symbolic information of the given class: methods, fields
9042and byte code instructions, in particular.
9043
9044Such objects can be read from an existing file, be transformed by a
9045program (e.g. a class loader at run-time) and written to a file again. An
9046even more interesting application is the creation of classes from scratch at
9047run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9048if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9049of Java @code{.class} files.")
9050 (license license:asl2.0)))
9051
9052(define-public java-xerial-core
9053 (package
9054 (name "java-xerial-core")
9055 (version "2.1")
9056 (source (origin
9057 (method url-fetch)
9058 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9059 version ".tar.gz"))
9060 (file-name (string-append name "-" version ".tar.gz"))
9061 (sha256
9062 (base32
9063 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9064 (build-system ant-build-system)
9065 (arguments
9066 `(#:jar-name "xerial-core.jar"
9067 #:source-dir "xerial-core/src/main/java"
9068 #:test-dir "xerial-core/src/test"
9069 #:phases
9070 (modify-phases %standard-phases
9071 (add-before 'build 'copy-resources
9072 (lambda _
9073 (copy-recursively "xerial-core/src/main/resources"
9074 "build/classes")
9075 #t)))))
9076 (native-inputs
9077 `(("junit" ,java-junit)
9078 ("hamcrest" ,java-hamcrest-core)))
9079 (home-page "https://github.com/xerial/xerial-java")
9080 (synopsis "Data management libraries for Java")
9081 (description "Xerial is a set of data management libraries for the Java
9082programming language. The ultimate goal of the Xerial project is to manage
9083everything as database, including class objects, text format data, data
9084streams, etc.")
9085 (license license:asl2.0)))
9086
9087(define-public java-powermock-reflect
9088 (package
9089 (name "java-powermock-reflect")
9090 (version "1.7.3")
9091 (source (origin
9092 (method url-fetch)
9093 (uri (string-append "https://github.com/powermock/powermock/"
9094 "archive/powermock-" version ".tar.gz"))
9095 (file-name (string-append name "-" version ".tar.gz"))
9096 (sha256
9097 (base32
9098 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9099 (patches
9100 (search-patches "java-powermock-fix-java-files.patch"))))
9101 (build-system ant-build-system)
9102 (arguments
9103 `(#:jar-name "java-powermock-reflect.jar"
9104 #:jdk ,icedtea-8
9105 #:source-dir "powermock-reflect/src/main/java"
9106 #:test-dir "powermock-reflect/src/test"))
9107 (inputs
9108 `(("java-objenesis" ,java-objenesis)))
9109 (native-inputs
9110 `(("junit" ,java-junit)
9111 ("cglib" ,java-cglib)
9112 ("asm" ,java-asm)
9113 ("hamcrest" ,java-hamcrest-core)
9114 ("assertj" ,java-assertj)))
9115 (home-page "https://github.com/powermock/powermock")
9116 (synopsis "Mock library extension framework")
9117 (description "PowerMock is a framework that extends other mock libraries
9118such as EasyMock with more powerful capabilities. PowerMock uses a custom
9119classloader and bytecode manipulation to enable mocking of static methods,
9120constructors, final classes and methods, private methods, removal of static
9121initializers and more. By using a custom classloader no changes need to be
9122done to the IDE or continuous integration servers which simplifies adoption.")
9123 (license license:asl2.0)))
9124
9125(define-public java-powermock-core
9126 (package
9127 (inherit java-powermock-reflect)
9128 (name "java-powermock-core")
9129 (arguments
9130 `(#:jar-name "java-powermock-core.jar"
9131 #:source-dir "powermock-core/src/main/java"
9132 #:test-dir "powermock-core/src/test"
9133 #:tests? #f; requires powermock-api
9134 #:jdk ,icedtea-8
9135 #:phases
9136 (modify-phases %standard-phases
9137 (add-before 'build 'copy-resources
9138 (lambda _
9139 (copy-recursively "powermock-core/src/main/resources"
9140 "build/classes")
9141 #t)))))
9142 (inputs
9143 `(("reflect" ,java-powermock-reflect)
9144 ("javassist" ,java-jboss-javassist)))
9145 (native-inputs
9146 `(("junit" ,java-junit)
9147 ("assertj" ,java-assertj)
9148 ("mockito" ,java-mockito-1)))))
9149
9150(define-public java-powermock-api-support
9151 (package
9152 (inherit java-powermock-reflect)
9153 (name "java-powermock-api-support")
9154 (build-system ant-build-system)
9155 (arguments
9156 `(#:jar-name "java-powermock-api-support.jar"
9157 #:jdk ,icedtea-8
9158 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9159 #:tests? #f)); no tests
9160 (inputs
9161 `(("core" ,java-powermock-core)
9162 ("reflect" ,java-powermock-reflect)))))
9163
9164(define-public java-powermock-modules-junit4-common
9165 (package
9166 (inherit java-powermock-reflect)
9167 (name "java-powermock-modules-junit4-common")
9168 (build-system ant-build-system)
9169 (arguments
9170 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9171 #:jdk ,icedtea-8
9172 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9173 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9174 (inputs
9175 `(("core" ,java-powermock-core)
9176 ("easymock" ,java-easymock)
9177 ("reflect" ,java-powermock-reflect)
9178 ("hamcrest" ,java-hamcrest-core)
9179 ("cglib" ,java-cglib)))))
9180
9181(define-public java-powermock-modules-junit4
9182 (package
9183 (inherit java-powermock-reflect)
9184 (name "java-powermock-modules-junit4")
9185 (build-system ant-build-system)
9186 (arguments
9187 `(#:jar-name "java-powermock-modules-junit4.jar"
9188 #:jdk ,icedtea-8
9189 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9190 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9191 #:phases
9192 (modify-phases %standard-phases
9193 (add-before 'build 'fix-junit-detection
9194 (lambda _
9195 ;; Our junit version is 4.12-SNAPSHOT
9196 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9197 "PowerMockJUnit4MethodValidator.java")
9198 (("4.12") "4.12-SNAPSHOT"))
9199 #t)))))
9200 (inputs
9201 `(("core" ,java-powermock-core)
9202 ("reflect" ,java-powermock-reflect)
9203 ("common" ,java-powermock-modules-junit4-common)
9204 ("cglib" ,java-cglib)))
9205 (native-inputs
9206 `(("easymock" ,java-easymock)
9207 ("hamcrest" ,java-hamcrest-core)
9208 ("objenesis" ,java-objenesis)
9209 ("asm" ,java-asm)
9210 ("junit" ,java-junit)))))
9211
9212(define-public java-powermock-api-easymock
9213 (package
9214 (inherit java-powermock-reflect)
9215 (name "java-powermock-api-easymock")
9216 (build-system ant-build-system)
9217 (arguments
9218 `(#:jar-name "java-powermock-api-easymock.jar"
9219 #:jdk ,icedtea-8
9220 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9221 #:tests? #f; no tests
9222 #:phases
9223 (modify-phases %standard-phases
9224 (add-before 'build 'fix-file
9225 (lambda _
9226 ;; FIXME: This looks wrong, but it fixes a build error.
9227 (with-directory-excursion "powermock-api/powermock-api-easymock"
9228 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9229 (("classLoader instanceof MockClassLoader") "false")
9230 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9231 #t)))))
9232 (inputs
9233 `(("core" ,java-powermock-core)
9234 ("easymock" ,java-easymock)
9235 ("reflect" ,java-powermock-reflect)
9236 ("support" ,java-powermock-api-support)
9237 ("cglib" ,java-cglib)))))
9238
9239(define-public java-jboss-jms-api-spec
9240 (package
9241 (name "java-jboss-jms-api-spec")
9242 (version "2.0")
9243 (source (origin
9244 (method url-fetch)
9245 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9246 "archive/jboss-jms-api_" version
9247 "_spec-1.0.1.Final.tar.gz"))
9248 (sha256
9249 (base32
9250 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9251 (build-system ant-build-system)
9252 (arguments
9253 `(#:jar-name "java-jboss-jms-api_spec.jar"
9254 #:jdk ,icedtea-8
9255 #:source-dir "."
9256 #:tests? #f)); no tests
9257 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9258 (synopsis "Java Message Service API specification")
9259 (description "Java Message Service (JMS) API is used to send messages
9260messages between two or more clients. It is a messaging standard that allows
9261application components to create, send, receive, and read messages.")
9262 ; either gpl2 only with GPL Classpath Exception, or cddl.
9263 (license (list license:gpl2 license:cddl1.0))))
9264
9265(define-public java-mail
9266 (package
9267 (name "java-mail")
9268 (version "1.6.0")
9269 (source (origin
9270 (method url-fetch)
9271 (uri (string-append "https://github.com/javaee/javamail/archive/"
9272 "JAVAMAIL-1_6_0.tar.gz"))
9273 (sha256
9274 (base32
9275 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9276 (build-system ant-build-system)
9277 (arguments
9278 `(#:jar-name "java-mail.jar"
9279 #:jdk ,icedtea-8
9280 #:source-dir "mail/src/main/java"
9281 #:test-dir "mail/src/test"
9282 #:test-exclude
9283 (list "**/CollectorFormatterTest.java"
9284 "**/CompactFormatterTest.java"
9285 "**/DurationFilterTest.java"
9286 "**/MailHandlerTest.java"
9287 "**/GetLocalAddressTest.java"
9288 ;; FIXME: both end with:
9289 ;; java.lang.ClassNotFoundException:
9290 ;; javax.mail.internet.MimeMultipartParseTest
9291 "**/MimeMultipartParseTest.java"
9292 "**/SearchTermSerializationTest.java")
9293 #:phases
9294 (modify-phases %standard-phases
9295 (add-before 'configure 'move-version.java
9296 (lambda _
9297 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9298 "mail/src/main/java/javax/mail/Version.java")
9299 #t))
9300 (add-before 'build 'copy-resources
9301 (lambda _
9302 (copy-recursively "mail/src/main/resources/META-INF"
9303 "build/classes/META-INF")
9304 #t)))))
9305 (native-inputs
9306 `(("junit" ,java-junit)
9307 ("hamcrest" ,java-hamcrest-core)))
9308 (home-page "https://javaee.github.io/javamail/")
9309 (synopsis "Mail-related functionnalities in Java")
9310 (description "The JavaMail API provides a platform-independent and
9311protocol-independent framework to build mail and messaging applications.")
9312 ;; General Public License Version 2 only ("GPL") or the Common Development
9313 ;; and Distribution License("CDDL")
9314 (license (list license:cddl1.1
9315 license:gpl2)))); with classpath exception
9316
9317(define-public java-jeromq
9318 (package
9319 (name "java-jeromq")
9320 (version "0.4.3")
9321 (source (origin
9322 (method git-fetch)
9323 (uri (git-reference
9324 (url "https://github.com/zeromq/jeromq.git")
9325 (commit (string-append "v" version))))
9326 (file-name (string-append name "-" version "-checkout"))
9327 (sha256
9328 (base32
9329 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9330 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9331 (build-system ant-build-system)
9332 (arguments
9333 `(#:jar-name "java-jeromq.jar"
9334 #:source-dir "src/main/java"
9335 #:jdk ,icedtea-8
9336 #:test-exclude
9337 (list
9338 "**/Abstract*.java"
9339 ;; Requires network
9340 "**/ZBeaconTest.java"
9341 ;; Failures
9342 "**/DealerSpecTest.java"
9343 "**/CustomDecoderTest.java"
9344 "**/CustomEncoderTest.java"
9345 "**/ConnectRidTest.java"
9346 "**/ReqSpecTest.java"
9347 "**/PushPullSpecTest.java"
9348 "**/PubSubHwmTest.java"
9349 "**/RouterSpecTest.java"
9350 "**/ProxyTest.java")))
9351 (inputs
9352 `(("java-jnacl" ,java-jnacl)))
9353 (native-inputs
9354 `(("java-hamcrest-core" ,java-hamcrest-core)
9355 ("junit" ,java-junit)))
9356 (home-page "http://zeromq.org/bindings:java")
9357 (synopsis "Java binding for 0MQ")
9358 (description "Jeromq provides the java bindings for 0MQ.")
9359 (license license:mpl2.0)))
9360
9361(define-public java-kafka-clients
9362 (package
9363 (name "java-kafka-clients")
9364 (version "1.0.0")
9365 (source (origin
9366 (method url-fetch)
9367 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9368 version "-src.tgz"))
9369 (sha256
9370 (base32
9371 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9372 (build-system ant-build-system)
9373 (arguments
9374 `(#:jar-name "java-kafka-clients.jar"
9375 #:jdk ,icedtea-8
9376 #:source-dir "clients/src/main/java"
9377 #:test-dir "clients/src/test"
9378 #:test-exclude
9379 (list
9380 ;; This file does not contain a class
9381 "**/IntegrationTest.java"
9382 ;; Requires network
9383 "**/ClientUtilsTest.java"
9384 ;; End with errors that seem related to our powermock
9385 "**/KafkaProducerTest.java"
9386 "**/BufferPoolTest.java")))
9387 (inputs
9388 `(("java-slf4j-api" ,java-slf4j-api)
9389 ("java-lz4" ,java-lz4)))
9390 (native-inputs
9391 `(("junit" ,java-junit)
9392 ("hamcrest" ,java-hamcrest-all)
9393 ("objenesis" ,java-objenesis)
9394 ("asm" ,java-asm)
9395 ("cglib" ,java-cglib)
9396 ("javassist" ,java-jboss-javassist)
9397 ("snappy" ,java-snappy)
9398 ("easymock" ,java-easymock)
9399 ("powermock" ,java-powermock-core)
9400 ("powermock-easymock" ,java-powermock-api-easymock)
9401 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9402 ("powermock-junit4" ,java-powermock-modules-junit4)
9403 ("powermock-support" ,java-powermock-api-support)
9404 ("java-bouncycastle" ,java-bouncycastle)))
9405 (home-page "https://kafka.apache.org")
9406 (synopsis "Distributed streaming platform")
9407 (description "Kafka is a distributed streaming platform, which means:
9408@itemize
9409@item it can publish and subscribe to streams of records;
9410@item it can store streams of records in a fault-tolerant way;
9411@item it can process streams of records as they occur.
9412@end itemize")
9413 ;; Either cddl or gpl2 only.
9414 (license (list license:cddl1.1; actually cddl1.1
9415 license:gpl2)))); with classpath exception
9416
9417(define-public java-jdom
9418 (package
9419 (name "java-jdom")
9420 (version "1.1.3")
9421 (source (origin
9422 (method url-fetch)
9423 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9424 version ".tar.gz"))
9425 (sha256
9426 (base32
9427 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9428 (build-system ant-build-system)
9429 (arguments
9430 `(#:build-target "package"
9431 #:tests? #f; tests are run as part of the build process
9432 #:phases
9433 (modify-phases %standard-phases
9434 (replace 'install
9435 (install-jars "build")))))
9436 (home-page "http://jdom.org/")
9437 (synopsis "Access, manipulate, and output XML data")
9438 (description "Java-based solution for accessing, manipulating, and
9439outputting XML data from Java code.")
9440 (license license:bsd-4)))
9441
9442(define-public java-geronimo-xbean-reflect
9443 (package
9444 (name "java-geronimo-xbean-reflect")
9445 (version "4.5")
9446 (source (origin
9447 (method svn-fetch)
9448 (uri (svn-reference
9449 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9450 (revision 1807396)))
9451 (file-name (string-append name "-" version))
9452 (sha256
9453 (base32
9454 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9455 (build-system ant-build-system)
9456 (arguments
9457 `(#:jar-name "geronimo-xbean-reflect.jar"
9458 #:source-dir "xbean-reflect/src/main/java"
9459 #:test-dir "xbean-reflect/src/test"
9460 #:jdk ,icedtea-8
9461 #:test-exclude
9462 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9463 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9464 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9465 #:phases
9466 (modify-phases %standard-phases
9467 (add-before 'build 'fix-source
9468 (lambda _
9469 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9470 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9471 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9472 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9473 #t))))))
9474 (inputs
9475 `(("asm" ,java-asm)
9476 ("log4j" ,java-log4j-api)
9477 ("log4j-1.2" ,java-log4j-1.2-api)
9478 ("log4j-core" ,java-log4j-core)
9479 ("logging" ,java-commons-logging-minimal)))
9480 (native-inputs
9481 `(("junit" ,java-junit)))
9482 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9483 (synopsis "Dependency injection helper")
9484 (description "Xbean-reflect provides very flexible ways to create objects
9485and graphs of objects for dependency injection frameworks")
9486 (license license:asl2.0)))
9487
9488(define-public java-geronimo-xbean-bundleutils
9489 (package
9490 (inherit java-geronimo-xbean-reflect)
9491 (name "java-geronimo-xbean-bundleutils")
9492 (arguments
9493 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9494 #:source-dir "xbean-bundleutils/src/main/java"
9495 #:test-dir "xbean-bundleutils/src/test"
9496 #:phases
9497 (modify-phases %standard-phases
9498 (add-before 'build 'fix-java
9499 (lambda _
9500 ;; We use a more recent version of osgi, so this file requires
9501 ;; more interface method implementations.
9502 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9503 (("import org.osgi.framework.ServiceRegistration;")
9504 "import org.osgi.framework.ServiceRegistration;
9505import org.osgi.framework.ServiceFactory;
9506import java.util.Collection;
9507import org.osgi.framework.ServiceObjects;")
9508 (("public Bundle getBundle\\(\\)")
9509 "@Override
9510public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9511 throw new UnsupportedOperationException();
9512}
9513@Override
9514public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9515 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9516 throw new UnsupportedOperationException();
9517}
9518public Bundle getBundle()"))
9519 #t)))))
9520 (inputs
9521 `(("java-slf4j" ,java-slf4j-api)
9522 ("java-asm" ,java-asm)
9523 ("java-osgi-framework" ,java-osgi-framework)
9524 ("java-eclipse-osgi" ,java-eclipse-osgi)
9525 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9526
9527(define-public java-geronimo-xbean-asm-util
9528 (package
9529 (inherit java-geronimo-xbean-reflect)
9530 (name "java-geronimo-xbean-asm-util")
9531 (arguments
9532 `(#:jar-name "geronimo-xbean-asm-util.jar"
9533 #:source-dir "xbean-asm-util/src/main/java"
9534 #:tests? #f)); no tests
9535 (inputs
9536 `(("java-asm" ,java-asm)))
9537 (native-inputs '())))
9538
9539(define-public java-geronimo-xbean-finder
9540 (package
9541 (inherit java-geronimo-xbean-reflect)
9542 (name "java-geronimo-xbean-finder")
9543 (arguments
9544 `(#:jar-name "geronimo-xbean-finder.jar"
9545 #:source-dir "xbean-finder/src/main/java"
9546 #:test-dir "xbean-finder/src/test"))
9547 (inputs
9548 `(("java-slf4j-api" ,java-slf4j-api)
9549 ("java-asm" ,java-asm)
9550 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9551 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9552 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9553 ("java-osgi-framework" ,java-osgi-framework)))
9554 (native-inputs
9555 `(("java-junit" ,java-junit)
9556 ("java-hamcrest-core" ,java-hamcrest-core)))))
9557
9558(define-public java-gson
9559 (package
9560 (name "java-gson")
9561 (version "2.8.2")
9562 (source (origin
9563 (method url-fetch)
9564 (uri (string-append "https://github.com/google/gson/archive/"
9565 "gson-parent-" version ".tar.gz"))
9566 (sha256
9567 (base32
9568 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9569 (build-system ant-build-system)
9570 (arguments
9571 `(#:jar-name "gson.jar"
9572 #:source-dir "gson/src/main/java"
9573 #:test-dir "gson/src/test"))
9574 (native-inputs
9575 `(("java-junit" ,java-junit)
9576 ("java-hamcrest-core" ,java-hamcrest-core)))
9577 (home-page "https://github.com/google/gson")
9578 (synopsis "Java serialization/deserialization library from/to JSON")
9579 (description "Gson is a Java library that can be used to convert Java
9580Objects into their JSON representation. It can also be used to convert a JSON
9581string to an equivalent Java object. Gson can work with arbitrary Java objects
9582including pre-existing objects that you do not have source-code of.")
9583 (license license:asl2.0)))
9584
9585(define-public java-hawtjni
9586 (package
9587 (name "java-hawtjni")
9588 (version "1.15")
9589 (source (origin
9590 (method url-fetch)
9591 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9592 "hawtjni-project-" version ".tar.gz"))
9593 (sha256
9594 (base32
9595 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9596 (build-system ant-build-system)
9597 (arguments
9598 `(#:jar-name "hawtjni.jar"
9599 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9600 #:tests? #f; no tests
9601 #:phases
9602 (modify-phases %standard-phases
9603 (add-before 'build 'build-native
9604 (lambda* (#:key inputs #:allow-other-keys)
9605 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9606 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9607 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9608 "-fPIC" "-O2" include)
9609 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9610 "-fPIC" "-O2" include)
9611 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9612 "hawtjni.o" "hawtjni-callback.o")))
9613 #t))
9614 (add-after 'install 'install-native
9615 (lambda* (#:key outputs #:allow-other-keys)
9616 (let* ((out (assoc-ref outputs "out"))
9617 (lib (string-append out "/lib"))
9618 (inc (string-append out "/include")))
9619 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9620 (install-file "libhawtjni.so" lib)
9621 (install-file "hawtjni.h" inc)))
9622 #t)))))
9623 (inputs
9624 `(("java-commons-cli" ,java-commons-cli)
9625 ("java-asm" ,java-asm)
9626 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9627 (home-page "https://fusesource.github.io/hawtjni/")
9628 (synopsis "JNI code generator")
9629 (description "HawtJNI is a code generator that produces the JNI code needed
9630to implement Java native methods. It is based on the jnigen code generator
9631that is part of the SWT Tools project.")
9632 (license license:asl2.0)))
9633
9634(define-public java-jansi-native
9635 (package
9636 (name "java-jansi-native")
9637 (version "1.7")
9638 (source (origin
9639 (method url-fetch)
9640 (uri (string-append "https://github.com/fusesource/jansi-native/"
9641 "archive/jansi-native-" version ".tar.gz"))
9642 (sha256
9643 (base32
9644 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9645 (build-system ant-build-system)
9646 (arguments
9647 `(#:jar-name "jansi-native.jar"
9648 #:source-dir "src/main/java"
9649 #:tests? #f; no tests
9650 #:phases
9651 (modify-phases %standard-phases
9652 (add-before 'build 'build-native
9653 (lambda* (#:key inputs #:allow-other-keys)
9654 ;; there are more required files for windows in windows/
9655 (with-directory-excursion "src/main/native-package/src"
9656 (substitute* "jansi_ttyname.c"
9657 (("#include \"jansi_.*") ""))
9658 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9659 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9660 "/include")
9661 (string-append "-I" (assoc-ref inputs "jdk")
9662 "/include/linux")
9663 "-fPIC" "-O2")
9664 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9665 (add-before 'build 'install-native
9666 (lambda _
9667 (let ((dir (string-append "build/classes/META-INF/native/"
9668 ,(match (%current-system)
9669 ((or "i686-linux" "armhf-linux")
9670 "linux32")
9671 ((or "x86_64-linux" "aarch64-linux"
9672 "mips64el-linux")
9673 "linux64")))))
9674 (install-file "src/main/native-package/src/libjansi.so" dir))
9675 #t))
9676 (add-after 'install 'install-native
9677 (lambda* (#:key outputs #:allow-other-keys)
9678 (install-file "src/main/native-package/src/jansi.h"
9679 (string-append (assoc-ref outputs "out") "/include"))
9680 #t)))))
9681 (inputs
9682 `(("java-hawtjni" ,java-hawtjni)))
9683 (home-page "https://fusesource.github.io/jansi/")
9684 (synopsis "Native library for jansi")
9685 (description "This package provides the native library for jansi, a small
9686Java library that allows you to use ANSI escape sequences to format your
9687console output.")
9688 (license license:asl2.0)))
9689
9690(define-public java-jansi
9691 (package
9692 (name "java-jansi")
9693 (version "1.16")
9694 (source (origin
9695 (method url-fetch)
9696 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9697 "jansi-project-" version ".tar.gz"))
9698 (sha256
9699 (base32
9700 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9701 (build-system ant-build-system)
9702 (arguments
9703 `(#:jar-name "jansi.jar"
9704 #:source-dir "jansi/src/main/java"
9705 #:test-dir "jansi/src/test"
9706 #:phases
9707 (modify-phases %standard-phases
9708 (add-after 'check 'clear-term
9709 (lambda _
9710 (invoke "echo" "-e" "\\e[0m"))))))
9711 (inputs
9712 `(("java-jansi-native" ,java-jansi-native)))
9713 (native-inputs
9714 `(("java-junit" ,java-junit)
9715 ("java-hamcrest-core" ,java-hamcrest-core)))
9716 (home-page "https://fusesource.github.io/jansi/")
9717 (synopsis "Portable ANSI escape sequences")
9718 (description "Jansi is a Java library that allows you to use ANSI escape
9719sequences to format your console output which works on every platform.")
9720 (license license:asl2.0)))
9721
9722(define-public java-jboss-el-api-spec
9723 (package
9724 (name "java-jboss-el-api-spec")
9725 (version "3.0")
9726 (source (origin
9727 (method url-fetch)
9728 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9729 "archive/jboss-el-api_" version
9730 "_spec-1.0.7.Final.tar.gz"))
9731 (sha256
9732 (base32
9733 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9734 (build-system ant-build-system)
9735 (arguments
9736 `(#:jar-name "java-jboss-el-api_spec.jar"
9737 #:jdk ,icedtea-8))
9738 (inputs
9739 `(("java-junit" ,java-junit)))
9740 (home-page "https://github.com/jboss/jboss-el-api_spec")
9741 (synopsis "JSR-341 expression language 3.0 API")
9742 (description "This package contains an implementation of the JSR-341
9743specification for the expression language 3.0. It implements an expression
9744language inspired by ECMAScript and XPath. This language is used with
9745JavaServer Pages (JSP).")
9746 ;; Either GPL2 only or CDDL.
9747 (license (list license:gpl2 license:cddl1.1))))
9748
9749(define-public java-jboss-interceptors-api-spec
9750 (package
9751 (name "java-jboss-interceptors-api-spec")
9752 (version "1.2")
9753 (source (origin
9754 (method url-fetch)
9755 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9756 "archive/jboss-interceptors-api_" version
9757 "_spec-1.0.0.Final.tar.gz"))
9758 (sha256
9759 (base32
9760 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9761 (build-system ant-build-system)
9762 (arguments
9763 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9764 #:jdk ,icedtea-8
9765 #:source-dir "."
9766 #:tests? #f)); no tests
9767 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9768 (synopsis "Interceptors 1.2 API classes from JSR 318")
9769 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9770API. Interceptors are used to interpose on business method invocations and
9771specific events.")
9772 ;; Either GPL2 only or CDDL.
9773 (license (list license:gpl2 license:cddl1.1))))
9774
9775(define-public java-cdi-api
9776 (package
9777 (name "java-cdi-api")
9778 (version "2.0")
9779 (source (origin
9780 (method url-fetch)
9781 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9782 version ".tar.gz"))
9783 (file-name (string-append name "-" version ".tar.gz"))
9784 (sha256
9785 (base32
9786 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9787 (build-system ant-build-system)
9788 (arguments
9789 `(#:source-dir "api/src/main/java"
9790 #:jar-name "java-cdi-api.jar"
9791 #:test-dir "api/src/test"
9792 #:jdk ,icedtea-8
9793 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9794 (inputs
9795 `(("java-javax-inject" ,java-javax-inject)
9796 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9797 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9798 (native-inputs
9799 `(("java-testng" ,java-testng)
9800 ("java-hamcrest-core" ,java-hamcrest-core)))
9801 (home-page "http://cdi-spec.org/")
9802 (synopsis "Contexts and Dependency Injection APIs")
9803 (description "Java-cdi-api contains the required APIs for Contexts and
9804Dependency Injection (CDI).")
9805 (license license:asl2.0)))
9806
9807(define-public java-joda-convert
9808 (package
9809 (name "java-joda-convert")
9810 (version "1.9.2")
9811 (source (origin
9812 (method url-fetch)
9813 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9814 version ".tar.gz"))
9815 (file-name (string-append name "-" version ".tar.gz"))
9816 (sha256
9817 (base32
9818 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9819 (build-system ant-build-system)
9820 (arguments
9821 `(#:jar-name (string-append ,name "-" ,version ".jar")
9822 #:source-dir "src/main/java"
9823 #:test-include (list "**/Test*.java")
9824 ;; Contains only interfaces and base classes (no test)
9825 #:test-exclude (list "**/test*/**.java")))
9826 (inputs
9827 `(("java-guava" ,java-guava)))
9828 (native-inputs
9829 `(("java-junit" ,java-junit)
9830 ("java-hamcrest-core" ,java-hamcrest-core)))
9831 (home-page "http://www.joda.org/joda-convert/")
9832 (synopsis "Conversion between Objects and Strings")
9833 (description "Joda-Convert provides a small set of classes to aid
9834conversion between Objects and Strings. It is not intended to tackle the
9835wider problem of Object to Object transformation.")
9836 (license license:asl2.0)))
9837
9838(define-public java-joda-time
9839 (package
9840 (name "java-joda-time")
9841 (version "2.9.9")
9842 (source (origin
9843 (method url-fetch)
9844 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9845 version ".tar.gz"))
9846 (file-name (string-append name "-" version ".tar.gz"))
9847 (sha256
9848 (base32
9849 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9850 (build-system ant-build-system)
9851 (arguments
9852 `(#:jar-name "java-joda-time.jar"
9853 #:source-dir "src/main/java"
9854 #:test-include (list "**/Test*.java")
9855 ;; There is no runnable test in these files
9856 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9857 #:phases
9858 (modify-phases %standard-phases
9859 (add-after 'build 'build-resources
9860 (lambda _
9861 (mkdir-p "build/classes/org/joda/time/tz/data")
9862 (mkdir-p "build/classes/org/joda/time/format")
9863 ;; This will produce the following exception:
9864 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9865 ;; which is normal, because it doesn't exist yet. It still generates
9866 ;; the same file as in the binary one can find on maven.
9867 (invoke "java" "-cp"
9868 (string-append "build/classes:" (getenv "CLASSPATH"))
9869 "org.joda.time.tz.ZoneInfoCompiler"
9870 "-src" "src/main/java/org/joda/time/tz/src"
9871 "-dst" "build/classes/org/joda/time/tz/data"
9872 "africa" "antarctica" "asia" "australasia"
9873 "europe" "northamerica" "southamerica"
9874 "pacificnew" "etcetera" "backward" "systemv")
9875 (for-each (lambda (f)
9876 (copy-file f (string-append
9877 "build/classes/org/joda/time/format/"
9878 (basename f))))
9879 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9880 #t))
9881 (add-before 'install 'regenerate-jar
9882 (lambda _
9883 ;; We need to regenerate the jar file to add generated data.
9884 (delete-file "build/jar/java-joda-time.jar")
9885 (invoke "ant" "jar")))
9886 (add-before 'check 'copy-test-resources
9887 (lambda _
9888 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9889 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9890 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9891 (copy-recursively "src/test/resources" "build/test-classes")
9892 #t)))))
9893 (inputs
9894 `(("java-joda-convert" ,java-joda-convert)))
9895 (native-inputs
9896 `(("java-junit" ,java-junit)
9897 ("java-hamcrest-core" ,java-hamcrest-core)
9898 ("tzdata" ,tzdata)))
9899 (home-page "http://www.joda.org/joda-time/")
9900 (synopsis "Replacement for the Java date and time classes")
9901 (description "Joda-Time is a replacement for the Java date and time
9902classes prior to Java SE 8.")
9903 (license license:asl2.0)))
9904
9905(define-public java-xerces
9906 (package
9907 (name "java-xerces")
9908 (version "2.11.0")
9909 (source
9910 (origin
9911 (method url-fetch)
9912 (uri (string-append "mirror://apache/xerces/j/source/"
9913 "Xerces-J-src." version ".tar.gz"))
9914 (sha256
9915 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9916 (patches (search-patches
9917 "java-xerces-xjavac_taskdef.patch"
9918 "java-xerces-build_dont_unzip.patch"
9919 "java-xerces-bootclasspath.patch"))))
9920 (build-system ant-build-system)
9921 (arguments
9922 `(#:tests? #f;; Test files are not present
9923 #:test-target "test"
9924 #:jdk ,icedtea-8
9925 #:phases
9926 (modify-phases %standard-phases
9927 (add-after 'unpack 'create-build.properties
9928 (lambda* (#:key inputs #:allow-other-keys)
9929 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9930 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9931 (with-output-to-file "build.properties"
9932 (lambda _
9933 (format #t
9934 "jar.jaxp = ~a/share/java/jaxp.jar~@
9935 jar.apis-ext = ~a/share/java/jaxp.jar~@
9936 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9937 jaxp jaxp resolver)))
9938 ;; Make xerces use our version of jaxp in tests
9939 (substitute* "build.xml"
9940 (("xml-apis.jar")
9941 (string-append jaxp "/share/java/jaxp.jar"))
9942 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9943 "${jar.apis}")))
9944 #t))
9945 (replace 'install (install-jars "build")))))
9946 (inputs
9947 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9948 ("java-jaxp" ,java-jaxp)))
9949 (home-page "https://xerces.apache.org/xerces2-j/")
9950 (synopsis "Validating XML parser for Java with DOM level 3 support")
9951 (description "The Xerces2 Java parser is the reference implementation of
9952XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9953processor.
9954
9955Xerces2-J supports the following standards and APIs:
9956
9957@itemize
9958@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9959@item Namespaces in XML Recommendation
9960@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9961 Range Recommendations
9962@item Simple API for XML (SAX) 2.0.1 Core and Extension
9963@item Java APIs for XML Processing (JAXP) 1.2.01
9964@item XML Schema 1.0 Structures and Datatypes Recommendations
9965@item Experimental implementation of the Document Object Model (DOM) Level 3
9966 Core and Load/Save Working Drafts
9967@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9968 Candidate Recommendation
9969@end itemize
9970
9971Xerces is now able to parse documents written according to the XML 1.1
9972Candidate Recommendation, except that it does not yet provide an option to
9973enable normalization checking as described in section 2.13 of this
9974specification. It also handles namespaces according to the XML Namespaces 1.1
9975Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9976the DOM level 3 load/save API's are in use.")
9977 (license license:asl2.0)))
9978
9979(define-public java-jakarta-regexp
9980 (package
9981 (name "java-jakarta-regexp")
9982 (version "1.5")
9983 (source
9984 (origin
9985 (method url-fetch)
9986 (uri (string-append
9987 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
9988 version ".tar.gz"))
9989 (sha256
9990 (base32
9991 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
9992 (build-system ant-build-system)
9993 (arguments
9994 `(#:test-target "test"
9995 #:phases
9996 (modify-phases %standard-phases
9997 (replace 'install
9998 (lambda* (#:key outputs #:allow-other-keys)
9999 (let* ((out (assoc-ref outputs "out"))
10000 (out-share (string-append out "/share/java")))
10001 (mkdir-p out-share)
10002 (for-each (lambda (name)
10003 (install-file name out-share))
10004 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10005 #t))))))
10006 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10007 (synopsis "Regular expression parser generator for Java.")
10008 (description "@code{jakarta-regexp} is an old regular expression parser
10009generator for Java.")
10010 (license license:asl2.0)))
10011
10012(define-public java-jline
10013 (package
10014 (name "java-jline")
10015 (version "1.0")
10016 (source (origin
10017 (method url-fetch)
10018 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10019 version ".tar.gz"))
10020 (sha256
10021 (base32
10022 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10023 (build-system ant-build-system)
10024 (arguments
10025 `(#:jar-name "jline.jar"
10026 #:source-dir "src/main/java"
10027 #:test-dir "src/test"
10028 #:phases
10029 (modify-phases %standard-phases
10030 (add-before 'build 'copy-resources
10031 (lambda _
10032 (copy-recursively "src/main/resources" "build/classes")
10033 #t)))))
10034 (native-inputs
10035 `(("java-junit" ,java-junit)))
10036 (home-page "https://jline.github.io")
10037 (synopsis "Console input handling library")
10038 (description "JLine is a Java library for handling console input. It is
10039similar in functionality to BSD editline and GNU readline but with additional
10040features that bring it on par with the Z shell line editor.")
10041 (license license:bsd-3)))
10042
10043(define-public java-jline-2
10044 (package
10045 (inherit java-jline)
10046 (version "2.14.5")
10047 (source (origin
10048 (method url-fetch)
10049 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10050 version ".tar.gz"))
10051 (sha256
10052 (base32
10053 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10054 (arguments
10055 `(#:jdk ,icedtea-8
10056 ,@(package-arguments java-jline)))
10057 (inputs
10058 `(("java-jansi" ,java-jansi)
10059 ("java-jansi-native" ,java-jansi-native)))
10060 (native-inputs
10061 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10062 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10063 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10064 ("java-powermock-api-support" ,java-powermock-api-support)
10065 ("java-powermock-core" ,java-powermock-core)
10066 ("java-powermock-reflect" ,java-powermock-reflect)
10067 ("java-easymock" ,java-easymock)
10068 ("java-jboss-javassist" ,java-jboss-javassist)
10069 ("java-objenesis" ,java-objenesis)
10070 ("java-asm" ,java-asm)
10071 ("java-hamcrest-core" ,java-hamcrest-core)
10072 ("java-cglib" ,java-cglib)
10073 ("java-junit" ,java-junit)
10074 ("java-hawtjni" ,java-hawtjni)))))
10075
10076(define-public java-xmlunit
10077 (package
10078 (name "java-xmlunit")
10079 (version "2.5.1")
10080 (source (origin
10081 (method url-fetch)
10082 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10083 version ".tar.gz"))
10084 (file-name (string-append name "-" version ".tar.gz"))
10085 (sha256
10086 (base32
10087 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10088 (build-system ant-build-system)
10089 (arguments
10090 `(#:jar-name "java-xmlunit.jar"
10091 #:source-dir "xmlunit-core/src/main/java"
10092 #:test-dir "xmlunit-core/src/test"
10093 #:phases
10094 (modify-phases %standard-phases
10095 (add-before 'check 'copy-test-resources
10096 (lambda* (#:key inputs #:allow-other-keys)
10097 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10098 #t)))))
10099 (native-inputs
10100 `(("java-junit" ,java-junit)
10101 ("java-mockito-1" ,java-mockito-1)
10102 ("java-hamcrest-all" ,java-hamcrest-all)
10103 ("java-objenesis" ,java-objenesis)
10104 ("java-asm" ,java-asm)
10105 ("java-cglib" ,java-cglib)
10106 ("resources"
10107 ,(origin
10108 (method git-fetch)
10109 (uri (git-reference
10110 (url "https://github.com/xmlunit/test-resources.git")
10111 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10112 (file-name "java-xmlunit-test-resources")
10113 (sha256
10114 (base32
10115 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10116 (home-page "http://www.xmlunit.org/")
10117 (synopsis "XML output testing")
10118 (description "XMLUnit provides you with the tools to verify the XML you
10119emit is the one you want to create. It provides helpers to validate against
10120an XML Schema, assert the values of XPath queries or compare XML documents
10121against expected outcomes.")
10122 (license license:asl2.0)))
10123
10124(define-public java-xmlunit-legacy
10125 (package
10126 (inherit java-xmlunit)
10127 (name "java-xmlunit-legacy")
10128 (arguments
10129 `(#:jar-name "java-xmlunit-legacy.jar"
10130 #:source-dir "xmlunit-legacy/src/main/java"
10131 #:test-dir "xmlunit-legacy/src/test"))
10132 (inputs
10133 `(("java-xmlunit" ,java-xmlunit)
10134 ("java-junit" ,java-junit)))
10135 (native-inputs
10136 `(("java-mockito-1" ,java-mockito-1)))))
10137
10138(define-public java-xmlunit-matchers
10139 (package
10140 (inherit java-xmlunit)
10141 (name "java-xmlunit-matchers")
10142 (arguments
10143 `(#:jar-name "java-xmlunit-matchers.jar"
10144 #:source-dir "xmlunit-matchers/src/main/java"
10145 #:test-dir "xmlunit-matchers/src/test"
10146 #:test-exclude
10147 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10148 (list "**/ValidationMatcherTest.java")
10149 #:phases
10150 (modify-phases %standard-phases
10151 (add-before 'build 'copy-test-class
10152 (lambda _
10153 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10154 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10155 #t))
10156 (add-before 'build 'fix-test-resources-path
10157 (lambda _
10158 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10159 (("../test-resources") "test-resources"))
10160 #t))
10161 (add-before 'check 'copy-test-resources
10162 (lambda* (#:key inputs #:allow-other-keys)
10163 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10164 #t)))))
10165 (inputs
10166 `(("java-xmlunit" ,java-xmlunit)
10167 ("java-junit" ,java-junit)))))
10168
10169(define-public java-openchart2
10170 (package
10171 (name "java-openchart2")
10172 (version "1.4.3")
10173 (source (origin
10174 (method url-fetch)
10175 (uri (string-append "http://download.approximatrix.com/openchart2/"
10176 "openchart2-" version ".source.zip"))
10177 (sha256
10178 (base32
10179 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10180 (build-system ant-build-system)
10181 (arguments
10182 `(#:test-target "test"
10183 #:phases
10184 (modify-phases %standard-phases
10185 (add-after 'unpack 'fix-junit-errors
10186 (lambda _
10187 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10188 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10189 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10190 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10191 "model/DefaultChartDataModelConstraintsTest.java"
10192 "model/MultiScatterDataModelConstraintsTest.java"
10193 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10194 (("(assertEquals[^;]+);" before _)
10195 (string-append (string-drop-right before 2) ", 1E-6);"))))
10196 #t))
10197 (replace 'install (install-jars ".")))))
10198 (native-inputs
10199 `(("unzip" ,unzip)
10200 ("java-junit" ,java-junit)
10201 ("java-hamcrest-core" ,java-hamcrest-core)))
10202 (home-page "http://approximatrix.com/products/openchart2/")
10203 (synopsis "Simple plotting for Java")
10204 (description "Openchart2 provides a simple, yet powerful, interface for
10205Java programmers to create two-dimensional charts and plots. The library
10206features an assortment of graph styles, including advanced scatter plots, bar
10207graphs, and pie charts.")
10208 (license license:lgpl2.1+)))
10209
10210(define-public java-commons-httpclient
10211 (package
10212 (name "java-commons-httpclient")
10213 (version "3.1")
10214 (source (origin
10215 (method url-fetch)
10216 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10217 "commons-httpclient/source/commons-httpclient-"
10218 version "-src.tar.gz"))
10219 (sha256
10220 (base32
10221 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10222 (build-system ant-build-system)
10223 (arguments
10224 `(#:build-target "compile"
10225 #:test-target "test"
10226 #:tests? #f; requires junit-textui (junit 3)
10227 #:phases
10228 (modify-phases %standard-phases
10229 (add-before 'build 'fix-accent
10230 (lambda _
10231 (for-each (lambda (file)
10232 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10233 (substitute* file
10234 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10235 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10236 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10237 "src/test/org/apache/commons/httpclient/TestHttps.java"
10238 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10239 #t))
10240 (replace 'install
10241 (lambda* (#:key outputs #:allow-other-keys)
10242 (invoke "ant" "dist"
10243 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10244 "/share/java"))
10245 #t)))))
10246 (propagated-inputs
10247 `(("java-commons-logging" ,java-commons-logging-minimal)
10248 ("java-commons-codec" ,java-commons-codec)))
10249 (home-page "https://hc.apache.org")
10250 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10251 (description "This package contains an HTTP/1.1 compliant HTTP agent
10252implementation. It also provides reusable components for client-side
10253authentication, HTTP state management, and HTTP connection management.")
10254 (license license:asl2.0)))
10255
10256(define-public java-commons-vfs
10257 (package
10258 (name "java-commons-vfs")
10259 (version "2.2")
10260 (source (origin
10261 (method url-fetch)
10262 (uri (string-append "mirror://apache/commons/vfs/source/"
10263 "commons-vfs2-distribution-" version "-src.tar.gz"))
10264 (file-name (string-append name "-" version ".tar.gz"))
10265 (sha256
10266 (base32
10267 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10268 (modules '((guix build utils)))
10269 (snippet
10270 '(begin
10271 (for-each delete-file
10272 (find-files "." "\\.jar$"))
10273 #t))))
10274 (build-system ant-build-system)
10275 (arguments
10276 `(#:jar-name "commons-vfs.jar"
10277 #:source-dir "commons-vfs2/src/main/java"
10278 #:test-dir "commons-vfs2/src/test"
10279 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10280 #:tests? #f
10281 #:phases
10282 (modify-phases %standard-phases
10283 (add-before 'build 'remove-hadoop-and-webdav
10284 ; Remove these files as they are not required and depend on difficult
10285 ; packages.
10286 (lambda _
10287 (for-each delete-file-recursively
10288 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10289 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10290 #t)))))
10291 (inputs
10292 `(("java-commons-collections4" ,java-commons-collections4)
10293 ("java-commons-compress" ,java-commons-compress)
10294 ("java-commons-httpclient" ,java-commons-httpclient)
10295 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10296 ("java-commons-net" ,java-commons-net)
10297 ("java-jsch" ,java-jsch)))
10298 (home-page "http://commons.apache.org/proper/commons-vfs/")
10299 (synopsis "Java file system library")
10300 (description "Commons VFS provides a single API for accessing various
10301different file systems. It presents a uniform view of the files from various
10302different sources, such as the files on local disk, on an HTTP server, or
10303inside a Zip archive.")
10304 (license license:asl2.0)))
10305
10306(define-public java-jakarta-oro
10307 (package
10308 (name "java-jakarta-oro")
10309 (version "2.0.8")
10310 (source (origin
10311 (method url-fetch)
10312 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10313 "jakarta-oro-" version ".tar.gz"))
10314 (sha256
10315 (base32
10316 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10317 (modules '((guix build utils)))
10318 (snippet
10319 `(begin
10320 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10321 #t))))
10322 (build-system ant-build-system)
10323 (arguments
10324 `(#:build-target "package"
10325 #:tests? #f; tests are run as part of the build process
10326 #:phases
10327 (modify-phases %standard-phases
10328 (replace 'install
10329 (install-jars ,(string-append "jakarta-oro-" version))))))
10330 (home-page "https://jakarta.apache.org/oro/")
10331 (synopsis "Text-processing for Java")
10332 (description "The Jakarta-ORO Java classes are a set of text-processing
10333Java classes that provide Perl5 compatible regular expressions, AWK-like
10334regular expressions, glob expressions, and utility classes for performing
10335substitutions, splits, filtering filenames, etc. This library is the successor
10336of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10337from ORO, Inc.")
10338 (license license:asl1.1)))
10339
10340(define-public java-native-access
10341 (package
10342 (name "java-native-access")
10343 (version "4.5.1")
10344 (source (origin
10345 (method url-fetch)
10346 (uri (string-append "https://github.com/java-native-access/jna/"
10347 "archive/" version ".tar.gz"))
10348 (file-name (string-append name "-" version ".tar.gz"))
10349 (sha256
10350 (base32
10351 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10352 (modules '((guix build utils)))
10353 (snippet
10354 `(begin
10355 (for-each delete-file (find-files "." ".*.jar"))
10356 (delete-file-recursively "native/libffi")
10357 (delete-file-recursively "dist")
10358 #t))))
10359 (build-system ant-build-system)
10360 (arguments
10361 `(#:tests? #f; FIXME: tests require reflections.jar
10362 #:test-target "test"
10363 #:make-flags (list "-Ddynlink.native=true")
10364 #:phases
10365 (modify-phases %standard-phases
10366 (add-before 'build 'fix-build.xml
10367 (lambda* (#:key inputs #:allow-other-keys)
10368 (substitute* "build.xml"
10369 ;; Since we removed the bundled ant.jar, give the correct path
10370 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10371 ;; We removed generated native libraries. We can only rebuild one
10372 ;; so don't fail if we can't find a native library for another architecture.
10373 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10374 ;; Copy test dependencies
10375 (copy-file (string-append (assoc-ref inputs "java-junit")
10376 "/share/java/junit.jar")
10377 "lib/junit.jar")
10378 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10379 "/share/java/hamcrest-core.jar")
10380 "lib/hamcrest-core.jar")
10381 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10382 #t))
10383 (add-before 'build 'build-native
10384 (lambda _
10385 (invoke "ant" "-Ddynlink.native=true" "native")
10386 #t))
10387 (replace 'install
10388 (install-jars "build")))))
10389 (inputs
10390 `(("libffi" ,libffi)
10391 ("libx11" ,libx11)
10392 ("libxt" ,libxt)))
10393 (native-inputs
10394 `(("java-junit" ,java-junit)
10395 ("java-hamcrest-core" ,java-hamcrest-core)))
10396 (home-page "https://github.com/java-native-access/jna")
10397 (synopsis "Access to native shared libraries from Java")
10398 (description "JNA provides Java programs easy access to native shared
10399libraries without writing anything but Java code - no JNI or native code is
10400required. JNA allows you to call directly into native functions using natural
10401Java method invocation.")
10402 ;; Java Native Access project (JNA) is dual-licensed under 2
10403 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10404 (license (list
10405 license:asl2.0
10406 license:lgpl2.1+))))
10407
10408(define-public java-native-access-platform
10409 (package
10410 (inherit java-native-access)
10411 (name "java-native-access-platform")
10412 (arguments
10413 `(#:test-target "test"
10414 #:tests? #f; require jna-test.jar
10415 #:phases
10416 (modify-phases %standard-phases
10417 (add-before 'build 'chdir
10418 (lambda _
10419 (chdir "contrib/platform")
10420 #t))
10421 (add-after 'chdir 'fix-ant
10422 (lambda* (#:key inputs #:allow-other-keys)
10423 (substitute* "nbproject/project.properties"
10424 (("../../build/jna.jar")
10425 (string-append (assoc-ref inputs "java-native-access")
10426 "/share/java/jna.jar"))
10427 (("../../lib/hamcrest-core-.*.jar")
10428 (string-append (assoc-ref inputs "java-hamcrest-core")
10429 "/share/java/hamcrest-core.jar"))
10430 (("../../lib/junit.jar")
10431 (string-append (assoc-ref inputs "java-junit")
10432 "/share/java/junit.jar")))
10433 #t))
10434 (replace 'install
10435 (install-jars "dist")))))
10436 (inputs
10437 `(("java-native-access" ,java-native-access)))
10438 (synopsis "Cross-platform mappings for jna")
10439 (description "java-native-access-platfrom has cross-platform mappings
10440and mappings for a number of commonly used platform functions, including a
10441large number of Win32 mappings as well as a set of utility classes that
10442simplify native access.")))
10443
10444(define-public java-jsch-agentproxy-core
10445 (package
10446 (name "java-jsch-agentproxy-core")
10447 (version "0.0.8")
10448 (source (origin
10449 (method url-fetch)
10450 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10451 version ".tar.gz"))
10452 (file-name (string-append name "-" version ".tar.gz"))
10453 (sha256
10454 (base32
10455 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10456 (build-system ant-build-system)
10457 (arguments
10458 `(#:jar-name "jsch-agentproxy-core.jar"
10459 #:source-dir "jsch-agent-proxy-core/src/main/java"
10460 #:tests? #f)); no tests
10461 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10462 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10463 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10464and Pageant included Putty. It will be easily integrated into JSch, and users
10465will be allowed to use these programs for authentication.")
10466 (license license:bsd-3)))
10467
10468(define-public java-jsch-agentproxy-sshagent
10469 (package
10470 (inherit java-jsch-agentproxy-core)
10471 (name "java-jsch-agentproxy-sshagent")
10472 (arguments
10473 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10474 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10475 #:tests? #f)); no tests
10476 (inputs
10477 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10478 (synopsis "Proxy to ssh-agent")
10479 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10480and Pageant included in Putty. This component contains the code for a proxy to
10481ssh-agent.")))
10482
10483(define-public java-jsch-agentproxy-usocket-jna
10484 (package
10485 (inherit java-jsch-agentproxy-core)
10486 (name "java-jsch-agentproxy-usocket-jna")
10487 (arguments
10488 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10489 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10490 #:tests? #f)); no tests
10491 (inputs
10492 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10493 ("java-native-access" ,java-native-access)))
10494 (synopsis "USocketFactory implementation using JNA")
10495 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10496and Pageant included in Putty. This component contains an implementation of
10497USocketFactory using @dfn{JNA} (Java Native Access).")))
10498
10499(define-public java-jsch-agentproxy-pageant
10500 (package
10501 (inherit java-jsch-agentproxy-core)
10502 (name "java-jsch-agentproxy-pageant")
10503 (arguments
10504 `(#:jar-name "jsch-agentproxy-pageant.jar"
10505 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10506 #:tests? #f)); no tests
10507 (inputs
10508 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10509 ("java-native-access" ,java-native-access)
10510 ("java-native-access-platform" ,java-native-access-platform)))
10511 (synopsis "Proxy to pageant")
10512 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10513and Pageant included in Putty. This component contains the code for a proxy to
10514pageant.")))
10515
10516(define-public java-jsch-agentproxy-usocket-nc
10517 (package
10518 (inherit java-jsch-agentproxy-core)
10519 (name "java-jsch-agentproxy-usocket-nc")
10520 (arguments
10521 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10522 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10523 #:tests? #f)); no tests
10524 (inputs
10525 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10526 (synopsis "USocketFactory implementation using netcat")
10527 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10528and Pageant included in Putty. This component contains an implementation of
10529USocketFactory using netcat.")))
10530
10531(define-public java-jsch-agentproxy-connector-factory
10532 (package
10533 (inherit java-jsch-agentproxy-core)
10534 (name "java-jsch-agentproxy-connector-factory")
10535 (arguments
10536 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10537 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10538 #:tests? #f)); no tests
10539 (inputs
10540 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10541 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10542 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10543 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10544 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10545 (synopsis "Connector factory for jsch agent proxy")
10546 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10547and Pageant included in Putty. This component contains a connector factory.")))
10548
10549(define-public java-jsch-agentproxy-jsch
10550 (package
10551 (inherit java-jsch-agentproxy-core)
10552 (name "java-jsch-agentproxy-jsch")
10553 (arguments
10554 `(#:jar-name "jsch-agentproxy-jsch.jar"
10555 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10556 #:tests? #f)); no tests
10557 (inputs
10558 `(("java-jsch" ,java-jsch)
10559 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10560 (synopsis "JSch integration library for agentproxy")
10561 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10562and Pageant included in Putty. This component contains a library to use
10563jsch-agent-proxy with JSch.")))
10564
10565(define-public java-apache-ivy
10566 (package
10567 (name "java-apache-ivy")
10568 (version "2.4.0")
10569 (source (origin
10570 (method url-fetch)
10571 (uri (string-append "mirror://apache//ant/ivy/" version
10572 "/apache-ivy-" version "-src.tar.gz"))
10573 (sha256
10574 (base32
10575 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10576 (patches
10577 (search-patches
10578 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10579 (build-system ant-build-system)
10580 (arguments
10581 `(#:jar-name "ivy.jar"
10582 #:tests? #f
10583 #:phases
10584 (modify-phases %standard-phases
10585 (add-before 'build 'remove-example
10586 (lambda _
10587 (delete-file-recursively "src/example")
10588 #t))
10589 (add-before 'build 'copy-resources
10590 (lambda _
10591 (with-directory-excursion "src/java"
10592 (for-each (lambda (file)
10593 (install-file file (string-append "../../build/classes/" (dirname file))))
10594 (append
10595 (find-files "." ".*.css")
10596 (find-files "." ".*.ent")
10597 (find-files "." ".*.html")
10598 (find-files "." ".*.properties")
10599 (find-files "." ".*.xsd")
10600 (find-files "." ".*.xsl")
10601 (find-files "." ".*.xml"))))
10602 #t))
10603 (add-before 'build 'fix-vfs
10604 (lambda _
10605 (substitute*
10606 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10607 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10608 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10609 #t))
10610 (add-before 'install 'copy-manifest
10611 (lambda _
10612 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10613 #t))
10614 (add-before 'install 'repack
10615 (lambda _
10616 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10617 "-C" "build/classes" ".")))
10618 (add-after 'install 'install-bin
10619 (lambda* (#:key outputs #:allow-other-keys)
10620 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10621 (ivy (string-append bin "/ivy"))
10622 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10623 (mkdir-p bin)
10624 (with-output-to-file ivy
10625 (lambda _
10626 (display (string-append
10627 "#!" (which "sh") "\n"
10628 "if [[ -z $CLASSPATH ]]; then\n"
10629 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10630 "else\n"
10631 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10632 "fi\n"
10633 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10634 (chmod ivy #o755)
10635 #t))))))
10636 (inputs
10637 `(("java-bouncycastle" ,java-bouncycastle)
10638 ("java-commons-cli" ,java-commons-cli)
10639 ("java-commons-collections" ,java-commons-collections)
10640 ("java-commons-httpclient" ,java-commons-httpclient)
10641 ("java-commons-lang" ,java-commons-lang)
10642 ("java-commons-vfs" ,java-commons-vfs)
10643 ("java-jakarta-oro" ,java-jakarta-oro)
10644 ("java-jsch" ,java-jsch)
10645 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10646 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10647 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10648 ("java-junit" ,java-junit)))
10649 (home-page "https://ant.apache.org/ivy")
10650 (synopsis "Dependency manager for the Java programming language")
10651 (description "Ivy is a tool for managing (recording, tracking, resolving
10652and reporting) project dependencies. It is characterized by the following:
10653
10654@itemize
10655@item flexibility and configurability - Ivy is essentially process agnostic
10656 and is not tied to any methodology or structure. Instead it provides the
10657 necessary flexibility and configurability to be adapted to a broad range
10658 of dependency management and build processes.
10659@item tight integration with Apache Ant - while available as a standalone tool,
10660 Ivy works particularly well with Apache Ant providing a number of
10661 powerful Ant tasks ranging from dependency resolution to dependency
10662 reporting and publication.
10663@end itemize")
10664 (license license:asl2.0)))
10665
10666(define-public java-eclipse-sisu-inject
10667 (package
10668 (name "java-eclipse-sisu-inject")
10669 (version "0.3.3")
10670 (source (origin
10671 (method git-fetch)
10672 (uri (git-reference
10673 (url "https://github.com/eclipse/sisu.inject/")
10674 (commit "releases/0.3.3")))
10675 (file-name (git-file-name name version))
10676 (sha256
10677 (base32
10678 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
10679 (build-system ant-build-system)
10680 (arguments
10681 `(#:jar-name "eclipse-sisu-inject.jar"
10682 #:source-dir "org.eclipse.sisu.inject/src"
10683 #:jdk ,icedtea-8
10684 #:tests? #f)); no tests
10685 (inputs
10686 `(("java-guice" ,java-guice)
10687 ("java-guice-servlet" ,java-guice-servlet)
10688 ("java-javax-inject" ,java-javax-inject)
10689 ("java-javaee-servletapi" ,java-javaee-servletapi)
10690 ("java-junit" ,java-junit)
10691 ("java-slf4j-api" ,java-slf4j-api)
10692 ("java-jsr305" ,java-jsr305)
10693 ("java-jsr250" ,java-jsr250)
10694 ("java-cdi-api" ,java-cdi-api)
10695 ("java-osgi-framework" ,java-osgi-framework)
10696 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10697 ("java-testng" ,java-testng)))
10698 (home-page "https://www.eclipse.org/sisu/")
10699 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10700 (description "Sisu is a modular JSR330-based container that supports
10701classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10702Google-Guice to perform dependency injection and provide the core JSR330
10703support, but removes the need to write explicit bindings in Guice modules.
10704Integration with other containers via the Eclipse Extension Registry and the
10705OSGi Service Registry is a goal of this project.")
10706 (license license:epl1.0)))
10707
10708(define-public java-eclipse-sisu-plexus
10709 (package
10710 (name "java-eclipse-sisu-plexus")
10711 (version "0.3.3")
10712 (source (origin
10713 (method url-fetch)
10714 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10715 "archive/releases/" version ".tar.gz"))
10716 (sha256
10717 (base32
10718 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10719 (modules '((guix build utils)))
10720 (snippet
10721 '(begin
10722 (for-each delete-file (find-files "." ".*.jar"))
10723 (rename-file "org.eclipse.sisu.plexus.tests/src"
10724 "org.eclipse.sisu.plexus.tests/java")
10725 #t))))
10726 (build-system ant-build-system)
10727 (arguments
10728 `(#:jar-name "eclipse-sisu-plexus.jar"
10729 #:source-dir "org.eclipse.sisu.plexus/src"
10730 #:test-dir "org.eclipse.sisu.plexus.tests"
10731 #:test-exclude
10732 (list
10733 ;; This test fails probably because we can't generate the necessary
10734 ;; meta-inf files.
10735 "**/PlexusLoggingTest.*"
10736 ;; FIXME: This test fails because of some injection error
10737 "**/PlexusRequirementTest.*")
10738 #:jdk ,icedtea-8
10739 #:phases
10740 (modify-phases %standard-phases
10741 (add-before 'build 'copy-resources
10742 (lambda _
10743 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10744 "build/classes/META-INF/plexus")
10745 #t))
10746 (add-before 'check 'build-test-jar
10747 (lambda _
10748 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10749 (mkdir "build")
10750 (with-directory-excursion "java"
10751 (apply invoke "javac" "-cp"
10752 (string-append (getenv "CLASSPATH")
10753 ":../../../../../build/classes")
10754 (find-files "." ".*.java"))
10755 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10756 (find-files "." ".*.jar")))
10757 (mkdir-p "build/META-INF/plexus")
10758 (copy-file "resources/META-INF/plexus/components.xml"
10759 "build/META-INF/plexus/components.xml")
10760 (with-directory-excursion "build"
10761 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10762 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10763 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10764 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10765 (("resources/component-jar")
10766 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10767 #t)))))
10768 (inputs
10769 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10770 ("java-plexus-util" ,java-plexus-utils)
10771 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10772 ("java-osgi-framework" ,java-osgi-framework)
10773 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10774 ("java-guice" ,java-guice)
10775 ("java-javax-inject" ,java-javax-inject)
10776 ("java-slf4j-api" ,java-slf4j-api)
10777 ("java-junit" ,java-junit)))
10778 (native-inputs
10779 `(("java-guava" ,java-guava)
10780 ("java-aopalliance" ,java-aopalliance)
10781 ("java-cglib" ,java-cglib)
10782 ("java-asm" ,java-asm)))
10783 (home-page "https://www.eclipse.org/sisu/")
10784 (synopsis "Plexus support for the sisu container")
10785 (description "Sisu is a modular JSR330-based container that supports
10786classpath scanning, auto-binding, and dynamic auto-wiring. This package
10787adds Plexus support to the Sisu-Inject container.")
10788 (license license:epl1.0)))
10789
10790(define-public java-commons-compiler
10791 (package
10792 (name "java-commons-compiler")
10793 (version "3.0.8")
10794 (source (origin
10795 (method git-fetch)
10796 (uri (git-reference
10797 (url "https://github.com/janino-compiler/janino")
10798 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10799 (file-name (string-append name "-" version))
10800 (sha256
10801 (base32
10802 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10803 (modules '((guix build utils)))
10804 (snippet
10805 '(begin
10806 (for-each delete-file
10807 (find-files "." "\\.jar$"))
10808 #t))))
10809 (build-system ant-build-system)
10810 (arguments
10811 `(#:jar-name "commons-compiler.jar"
10812 #:source-dir "commons-compiler/src/main"
10813 #:tests? #f)); no tests
10814 (home-page "https://github.com/janino-compiler/janino")
10815 (synopsis "Java compiler")
10816 (description "Commons-compiler contains an API for janino, including the
10817@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10818and @code{ISimpleCompiler} interfaces.")
10819 (license license:bsd-3)))
10820
10821(define-public java-janino
10822 (package
10823 (inherit java-commons-compiler)
10824 (name "java-janino")
10825 (arguments
10826 `(#:jar-name "janino.jar"
10827 #:source-dir "src/main/java"
10828 #:phases
10829 (modify-phases %standard-phases
10830 (add-before 'configure 'chdir
10831 (lambda _
10832 (chdir "janino")
10833 #t)))))
10834 (inputs
10835 `(("java-commons-compiler" ,java-commons-compiler)))
10836 (native-inputs
10837 `(("java-junit" ,java-junit)
10838 ("java-hamcrest-core" ,java-hamcrest-core)))
10839 (description "Janino is a Java compiler. Janino can compile a set of
10840source files to a set of class files like @code{javac}, but also compile a
10841Java expression, block, class body or source file in memory, load the bytecode
10842and execute it directly in the same JVM. @code{janino} can also be used for
10843static code analysis or code manipulation.")))
10844
10845(define-public java-logback-core
10846 (package
10847 (name "java-logback-core")
10848 (version "1.2.3")
10849 (source (origin
10850 (method url-fetch)
10851 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10852 version ".tar.gz"))
10853 (file-name (string-append name "-" version ".tar.gz"))
10854 (sha256
10855 (base32
10856 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10857 (modules '((guix build utils)))
10858 (snippet
10859 '(begin
10860 (delete-file-recursively "logback-access/lib")
10861 #t))))
10862 (build-system ant-build-system)
10863 (arguments
10864 `(#:jar-name "logback.jar"
10865 #:source-dir "src/main/java"
10866 #:test-dir "src/test"
10867 #:test-exclude
10868 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10869 ;; which creates FastClasses
10870 (list "**/AllCoreTest.*"
10871 "**/AutoFlushingObjectWriterTest.*"
10872 "**/PackageTest.*"
10873 "**/ResilientOutputStreamTest.*"
10874 ;; And we still don't want to run abstract classes
10875 "**/Abstract*.*")
10876 #:phases
10877 (modify-phases %standard-phases
10878 (add-before 'configure 'chdir
10879 (lambda _
10880 (chdir "logback-core")
10881 #t)))))
10882 (inputs
10883 `(("java-javax-mail" ,java-javax-mail)
10884 ("servlet" ,java-javaee-servletapi)
10885 ("java-commons-compiler" ,java-commons-compiler)
10886 ("java-janino" ,java-janino)))
10887 (native-inputs
10888 `(("java-junit" ,java-junit)
10889 ("java-hamcrest-core" ,java-hamcrest-core)
10890 ("java-mockito-1" ,java-mockito-1)
10891 ("java-cglib" ,java-cglib)
10892 ("java-asm" ,java-asm)
10893 ("java-objenesis" ,java-objenesis)
10894 ("java-joda-time" ,java-joda-time)))
10895 (home-page "https://logback.qos.ch")
10896 (synopsis "Logging for java")
10897 (description "Logback is intended as a successor to the popular log4j project.
10898This module lays the groundwork for the other two modules.")
10899 ;; Either epl1.0 or lgpl2.1
10900 (license (list license:epl1.0
10901 license:lgpl2.1))))
10902
10903(define-public java-logback-classic
10904 (package
10905 (inherit java-logback-core)
10906 (name "java-logback-classic")
10907 (arguments
10908 `(#:jar-name "logback-classic.jar"
10909 #:source-dir "src/main/java"
10910 #:test-dir "src/test"
10911 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10912 #:jdk ,icedtea-8
10913 #:phases
10914 (modify-phases %standard-phases
10915 (add-before 'configure 'chdir
10916 (lambda _
10917 (chdir "logback-classic")
10918 #t))
10919 (replace 'build
10920 (lambda* (#:key inputs #:allow-other-keys)
10921 (mkdir-p "build/classes")
10922 (setenv "CLASSPATH"
10923 (string-join
10924 (apply append (map (lambda (input)
10925 (find-files (assoc-ref inputs input)
10926 ".*.jar"))
10927 '("java-logback-core" "java-slf4j-api"
10928 "java-commons-compiler" "servlet"
10929 "groovy")))
10930 ":"))
10931 (apply invoke "groovyc" "-d" "build/classes" "-j"
10932 (find-files "src/main/" ".*\\.(groovy|java)$"))
10933 (invoke "ant" "jar")
10934 #t)))))
10935 (inputs
10936 `(("java-logback-core" ,java-logback-core)
10937 ("java-slf4j-api" ,java-slf4j-api)
10938 ,@(package-inputs java-logback-core)))
10939 (native-inputs
10940 `(("groovy" ,groovy)))
10941 (description "Logback is intended as a successor to the popular log4j project.
10942This module can be assimilated to a significantly improved version of log4j.
10943Moreover, @code{logback-classic} natively implements the slf4j API so that you
10944can readily switch back and forth between logback and other logging frameworks
10945such as log4j or @code{java.util.logging} (JUL).")))
10946
10947(define-public java-qdox
10948 (package
10949 (name "java-qdox")
10950 ; Newer version exists, but this version is required by java-plexus-component-metadata
10951 (version "2.0-M2")
10952 (source (origin
10953 (method url-fetch)
10954 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10955 ;; Older releases at https://github.com/codehaus/qdox/
10956 ;; Note: The release at maven is pre-generated. The release at
10957 ;; github requires jflex.
10958 (uri (string-append "http://central.maven.org/maven2/"
10959 "com/thoughtworks/qdox/qdox/" version
10960 "/qdox-" version "-sources.jar"))
10961 (sha256
10962 (base32
10963 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10964 (build-system ant-build-system)
10965 (arguments
10966 `(#:jar-name "qdox.jar"
10967 #:tests? #f)); no tests
10968 (home-page "http://qdox.codehaus.org/")
10969 (synopsis "Parse definitions from Java source files")
10970 (description "QDox is a high speed, small footprint parser for extracting
10971class/interface/method definitions from source files complete with JavaDoc
10972@code{@@tags}. It is designed to be used by active code generators or
10973documentation tools.")
10974 (license license:asl2.0)))
10975
10976(define-public java-jgit
10977 (package
10978 (name "java-jgit")
10979 (version "4.7.0.201704051617-r")
10980 (source (origin
10981 (method url-fetch)
10982 (uri (string-append "https://repo1.maven.org/maven2/"
10983 "org/eclipse/jgit/org.eclipse.jgit/"
10984 version "/org.eclipse.jgit-"
10985 version "-sources.jar"))
10986 (sha256
10987 (base32
10988 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
10989 (build-system ant-build-system)
10990 (arguments
10991 `(#:tests? #f ; There are no tests to run.
10992 #:jar-name "jgit.jar"
10993 ;; JGit must be built with a JDK supporting Java 8.
10994 #:jdk ,icedtea-8
10995 ;; Target our older default JDK.
10996 #:make-flags (list "-Dtarget=1.7")
10997 #:phases
10998 (modify-phases %standard-phases
10999 ;; The jar file generated by the default build.xml does not include
11000 ;; the text properties files, so we need to add them.
11001 (add-after 'build 'add-properties
11002 (lambda* (#:key jar-name #:allow-other-keys)
11003 (with-directory-excursion "src"
11004 (apply invoke "jar" "-uf"
11005 (string-append "../build/jar/" jar-name)
11006 (find-files "." "\\.properties$")))
11007 #t)))))
11008 (inputs
11009 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11010 ("java-javaewah" ,java-javaewah)
11011 ("java-jsch" ,java-jsch)
11012 ("java-slf4j-api" ,java-slf4j-api)))
11013 (home-page "https://eclipse.org/jgit/")
11014 (synopsis "Java library implementing the Git version control system")
11015 (description "JGit is a lightweight, pure Java library implementing the
11016Git version control system, providing repository access routines, support for
11017network protocols, and core version control algorithms.")
11018 (license license:edl1.0)))
11019
11020;; For axoloti. This package can still be built with icedtea-7, which is
11021;; currently used as the default JDK.
11022(define-public java-jgit-4.2
11023 (package (inherit java-jgit)
11024 (version "4.2.0.201601211800-r")
11025 (source (origin
11026 (method url-fetch)
11027 (uri (string-append "https://repo1.maven.org/maven2/"
11028 "org/eclipse/jgit/org.eclipse.jgit/"
11029 version "/org.eclipse.jgit-"
11030 version "-sources.jar"))
11031 (sha256
11032 (base32
11033 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11034 (build-system ant-build-system)
11035 (arguments
11036 (substitute-keyword-arguments (package-arguments java-jgit)
11037 ;; Build for default JDK.
11038 ((#:jdk _) icedtea-7)
11039 ((#:phases phases)
11040 `(modify-phases ,phases
11041 (add-after 'unpack 'use-latest-javaewah-API
11042 (lambda _
11043 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11044 (("wordinbits") "WORD_IN_BITS"))
11045 #t))))))
11046 (inputs
11047 `(("java-javaewah" ,java-javaewah)
11048 ("java-jsch" ,java-jsch)
11049 ("java-slf4j-api" ,java-slf4j-api)))))