projects/guix·blob wip-ipfs2 · refs

10620 lines · 444.9 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2016, 2017, 2018 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 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 fontutils)
50 #:use-module (gnu packages gawk)
51 #:use-module (gnu packages gettext)
52 #:use-module (gnu packages gcc)
53 #:use-module (gnu packages gl)
54 #:use-module (gnu packages gnuzilla) ;nss
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 libffi)
63 #:use-module (gnu packages linux) ;alsa
64 #:use-module (gnu packages maths)
65 #:use-module (gnu packages onc-rpc)
66 #:use-module (gnu packages web)
67 #:use-module (gnu packages wget)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages perl)
70 #:use-module (gnu packages popt)
71 #:use-module (gnu packages kerberos)
72 #:use-module (gnu packages xml)
73 #:use-module (gnu packages xorg)
74 #:use-module (gnu packages texinfo)
75 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
76 #:use-module (srfi srfi-11)
77 #:use-module (ice-9 match))
78
79
80;;;
81;;; Java bootstrap toolchain.
82;;;
83
84;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
85;; use it to build a simple version of GNU Classpath, the Java standard
86;; library. We chose version 0.93 because it is the last version that can be
87;; built with Jikes. With Jikes and this version of GNU Classpath we can
88;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
89;; the last version of JamVM that works with a version of GNU classpath that
90;; does not require ECJ. These three packages make up the bootstrap JDK.
91
92;; This is sufficient to build an older version of Ant, which is needed to
93;; build an older version of ECJ, an incremental Java compiler, both of which
94;; are written in Java.
95;;
96;; ECJ is needed to build the latest release (0.99) and the development
97;; version of GNU Classpath. The development version of GNU Classpath has
98;; much more support for Java 1.6 than the latest release, but we need to
99;; build 0.99 first to get a working version of javah. ECJ, the development
100;; version of GNU Classpath, and the latest version of JamVM make up the
101;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
102;; build framework. We then build the more recent JDKs Icedtea 2.x and
103;; Icedtea 3.x.
104
105(define jikes
106 (package
107 (name "jikes")
108 (version "1.22")
109 (source (origin
110 (method url-fetch)
111 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
112 version "/jikes-" version ".tar.bz2"))
113 (sha256
114 (base32
115 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
116 (build-system gnu-build-system)
117 (home-page "http://jikes.sourceforge.net/")
118 (synopsis "Compiler for the Java language")
119 (description "Jikes is a compiler that translates Java source files as
120defined in The Java Language Specification into the bytecoded instruction set
121and binary format defined in The Java Virtual Machine Specification.")
122 (license license:ibmpl1.0)))
123
124;; This is the last version of GNU Classpath that can be built without ECJ.
125(define classpath-bootstrap
126 (package
127 (name "classpath")
128 (version "0.93")
129 (source (origin
130 (method url-fetch)
131 (uri (string-append "mirror://gnu/classpath/classpath-"
132 version ".tar.gz"))
133 (sha256
134 (base32
135 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
136 (patches (search-patches "classpath-aarch64-support.patch"))))
137 (build-system gnu-build-system)
138 (arguments
139 `(#:configure-flags
140 (list (string-append "JAVAC="
141 (assoc-ref %build-inputs "jikes")
142 "/bin/jikes")
143 "--disable-Werror"
144 "--disable-gmp"
145 "--disable-gtk-peer"
146 "--disable-gconf-peer"
147 "--disable-plugin"
148 "--disable-dssi"
149 "--disable-alsa"
150 "--disable-gjdoc")
151 #:phases
152 (modify-phases %standard-phases
153 (add-after 'install 'install-data
154 (lambda _ (invoke "make" "install-data"))))))
155 (native-inputs
156 `(("jikes" ,jikes)
157 ("fastjar" ,fastjar)
158 ("libltdl" ,libltdl)
159 ("pkg-config" ,pkg-config)))
160 (home-page "https://www.gnu.org/software/classpath/")
161 (synopsis "Essential libraries for Java")
162 (description "GNU Classpath is a project to create core class libraries
163for use with runtimes, compilers and tools for the Java programming
164language.")
165 ;; GPLv2 or later, with special linking exception.
166 (license license:gpl2+)))
167
168;; This is the last version of JamVM that works with a version of GNU
169;; classpath that does not require ECJ.
170(define jamvm-1-bootstrap
171 (package
172 (name "jamvm")
173 (version "1.5.1")
174 (source (origin
175 (method url-fetch)
176 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
177 "JamVM%20" version "/jamvm-"
178 version ".tar.gz"))
179 (patches (search-patches "jamvm-arm.patch"))
180 (sha256
181 (base32
182 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
183 (build-system gnu-build-system)
184 (arguments
185 `(#:configure-flags
186 (list (string-append "--with-classpath-install-dir="
187 (assoc-ref %build-inputs "classpath")))))
188 (inputs
189 `(("classpath" ,classpath-bootstrap)
190 ("jikes" ,jikes)
191 ("zlib" ,zlib)))
192 (home-page "http://jamvm.sourceforge.net/")
193 (synopsis "Small Java Virtual Machine")
194 (description "JamVM is a Java Virtual Machine conforming to the JVM
195specification edition 2 (blue book). It is extremely small. However, unlike
196other small VMs it supports the full spec, including object finalisation and
197JNI.")
198 (license license:gpl2+)))
199
200(define ant-bootstrap
201 (package
202 (name "ant-bootstrap")
203 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
204 ;; are not supported. The 1.8.x series is the last to use only features
205 ;; supported by Jikes.
206 (version "1.8.4")
207 (source (origin
208 (method url-fetch)
209 (uri (string-append "http://archive.apache.org/dist/"
210 "ant/source/apache-ant-"
211 version "-src.tar.bz2"))
212 (sha256
213 (base32
214 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
215 (build-system gnu-build-system)
216 (arguments
217 `(#:imported-modules ((guix build syscalls)
218 ,@%gnu-build-system-modules)
219 #:modules ((srfi srfi-1)
220 (guix build gnu-build-system)
221 (guix build utils)
222 (guix build syscalls))
223 #:tests? #f ; no "check" target
224 #:phases
225 (modify-phases %standard-phases
226 (delete 'bootstrap)
227 (delete 'configure)
228 (replace 'build
229 (lambda* (#:key inputs #:allow-other-keys)
230 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
231 (setenv "JAVACMD"
232 (string-append (assoc-ref inputs "jamvm")
233 "/bin/jamvm"))
234 (setenv "JAVAC"
235 (string-append (assoc-ref inputs "jikes")
236 "/bin/jikes"))
237 (setenv "CLASSPATH"
238 (string-append (assoc-ref inputs "jamvm")
239 "/lib/rt.jar"))
240
241 ;; Ant complains if this file doesn't exist.
242 (setenv "HOME" "/tmp")
243 (with-output-to-file "/tmp/.ant.properties"
244 (lambda _ (display "")))
245
246 ;; Use jikes instead of javac for <javac ...> tags in build.xml
247 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
248
249 ;; jikes produces lots of warnings, but they are not very
250 ;; interesting, so we silence them.
251 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
252
253 ;; Without these JamVM options the build may freeze.
254 (substitute* "bootstrap.sh"
255 (("^\"\\$\\{JAVACMD\\}\" " m)
256 ,@(if (string-prefix? "armhf" (or (%current-system)
257 (%current-target-system)))
258 `((string-append m "-Xnocompact "))
259 `((string-append m "-Xnocompact -Xnoinlining ")))))
260
261 ;; Disable tests because we are bootstrapping and thus don't have
262 ;; any of the dependencies required to build and run the tests.
263 (substitute* "build.xml"
264 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
265 (invoke "bash" "bootstrap.sh"
266 (string-append "-Ddist.dir="
267 (assoc-ref %outputs "out")))))
268 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
269 (lambda* (#:key outputs #:allow-other-keys)
270 (define (repack-archive jar)
271 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
272 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
273 (with-directory-excursion dir
274 (invoke "unzip" jar))
275 (delete-file jar)
276 ;; XXX: copied from (gnu build install)
277 (for-each (lambda (file)
278 (let ((s (lstat file)))
279 (unless (eq? (stat:type s) 'symlink)
280 (utime file 0 0 0 0))))
281 (find-files dir #:directories? #t))
282 ;; It is important that the manifest appears first.
283 (with-directory-excursion dir
284 (let* ((files (find-files "." ".*" #:directories? #t))
285 ;; To ensure that the reference scanner can
286 ;; detect all store references in the jars
287 ;; we disable compression with the "-0" option.
288 (command (if (file-exists? manifest)
289 `("zip" "-0" "-X" ,jar ,manifest
290 ,@files)
291 `("zip" "-0" "-X" ,jar ,@files))))
292 (apply invoke command)))))
293 (for-each repack-archive
294 (find-files
295 (string-append (assoc-ref %outputs "out") "/lib")
296 "\\.jar$"))
297 #t))
298 (delete 'install))))
299 (native-inputs
300 `(("jikes" ,jikes)
301 ("jamvm" ,jamvm-1-bootstrap)
302 ("unzip" ,unzip)
303 ("zip", zip)))
304 (home-page "http://ant.apache.org")
305 (synopsis "Build tool for Java")
306 (description
307 "Ant is a platform-independent build tool for Java. It is similar to
308make but is implemented using the Java language, requires the Java platform,
309and is best suited to building Java projects. Ant uses XML to describe the
310build process and its dependencies, whereas Make uses Makefile format.")
311 (license license:asl2.0)))
312
313;; Version 3.2.2 is the last version without a dependency on a full-fledged
314;; compiler for Java 1.5.
315(define ecj-bootstrap
316 (package
317 (name "ecj-bootstrap")
318 (version "3.2.2")
319 (source (origin
320 (method url-fetch)
321 (uri (string-append "http://archive.eclipse.org/eclipse/"
322 "downloads/drops/R-" version
323 "-200702121330/ecjsrc.zip"))
324 (sha256
325 (base32
326 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
327 ;; It would be so much easier if we could use the ant-build-system, but we
328 ;; cannot as we don't have ant at this point. We use ecj for
329 ;; bootstrapping the JDK.
330 (build-system gnu-build-system)
331 (arguments
332 `(#:modules ((guix build gnu-build-system)
333 (guix build utils)
334 (srfi srfi-1))
335 #:tests? #f ; there are no tests
336 #:phases
337 (modify-phases %standard-phases
338 (replace 'configure
339 (lambda* (#:key inputs #:allow-other-keys)
340 (setenv "CLASSPATH"
341 (string-join
342 (cons (string-append (assoc-ref inputs "jamvm")
343 "/lib/rt.jar")
344 (find-files (string-append
345 (assoc-ref inputs "ant-bootstrap")
346 "/lib")
347 "\\.jar$"))
348 ":"))
349 #t))
350 (replace 'build
351 (lambda* (#:key inputs #:allow-other-keys)
352 ;; The unpack phase enters the "org" directory by mistake.
353 (chdir "..")
354
355 ;; Create a simple manifest to make ecj executable.
356 (with-output-to-file "manifest"
357 (lambda _
358 (display "Manifest-Version: 1.0
359Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
360
361 ;; Compile it all!
362 (and (apply invoke "jikes"
363 (find-files "." "\\.java$"))
364 (invoke "fastjar" "cvfm"
365 "ecj-bootstrap.jar" "manifest" "."))))
366 (replace 'install
367 (lambda* (#:key outputs #:allow-other-keys)
368 (let ((share (string-append (assoc-ref outputs "out")
369 "/share/java/")))
370 (mkdir-p share)
371 (install-file "ecj-bootstrap.jar" share)
372 #t))))))
373 (native-inputs
374 `(("ant-bootstrap" ,ant-bootstrap)
375 ("unzip" ,unzip)
376 ("jikes" ,jikes)
377 ("jamvm" ,jamvm-1-bootstrap)
378 ("fastjar" ,fastjar)))
379 (home-page "https://eclipse.org")
380 (synopsis "Eclipse Java development tools core batch compiler")
381 (description "This package provides the Eclipse Java core batch compiler
382for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
383requirement for all GNU Classpath releases after version 0.93.")
384 (license license:epl1.0)))
385
386(define ecj-javac-wrapper
387 (package (inherit ecj-bootstrap)
388 (name "ecj-javac-wrapper")
389 (source #f)
390 (build-system trivial-build-system)
391 (arguments
392 `(#:modules ((guix build utils))
393 #:builder
394 (begin
395 (use-modules (guix build utils))
396 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
397 (target (string-append bin "/javac"))
398 (guile (string-append (assoc-ref %build-inputs "guile")
399 "/bin/guile"))
400 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
401 "/share/java/ecj-bootstrap.jar"))
402 (java (string-append (assoc-ref %build-inputs "jamvm")
403 "/bin/jamvm"))
404 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
405 "/share/classpath")))
406 (string-append jvmlib "/glibj.zip:"
407 jvmlib "/tools.zip"))))
408 (mkdir-p bin)
409 (with-output-to-file target
410 (lambda _
411 (format #t "#!~a --no-auto-compile\n!#\n" guile)
412 (write
413 `(begin (use-modules (ice-9 match)
414 (ice-9 receive)
415 (ice-9 hash-table)
416 (srfi srfi-1)
417 (srfi srfi-26))
418 (define defaults
419 '(("-bootclasspath" ,bootcp)
420 ("-source" "1.5")
421 ("-target" "1.5")
422 ("-cp" ".")))
423 (define (main args)
424 (let ((classpath (getenv "CLASSPATH")))
425 (setenv "CLASSPATH"
426 (string-join (list ,ecj
427 ,(string-append (assoc-ref %build-inputs "jamvm")
428 "/lib/rt.jar")
429 (or classpath ""))
430 ":")))
431 (receive (vm-args other-args)
432 ;; Separate VM arguments from arguments to ECJ.
433 (partition (cut string-prefix? "-J" <>)
434 (fold (lambda (default acc)
435 (if (member (first default) acc)
436 acc (append default acc)))
437 args defaults))
438 (apply system* ,java
439 (append
440 ;; Remove "-J" prefix
441 (map (cut string-drop <> 2) vm-args)
442 '("org.eclipse.jdt.internal.compiler.batch.Main")
443 (cons "-nowarn" other-args)))))
444 ;; Entry point
445 (let ((args (cdr (command-line))))
446 (if (null? args)
447 (format (current-error-port) "javac: no arguments given!\n")
448 (main args)))))))
449 (chmod target #o755)
450 #t))))
451 (native-inputs
452 `(("guile" ,guile-2.2)
453 ("ecj-bootstrap" ,ecj-bootstrap)
454 ("jamvm" ,jamvm-1-bootstrap)
455 ("classpath" ,classpath-bootstrap)))
456 (description "This package provides a wrapper around the @dfn{Eclipse
457compiler for Java} (ecj) with a command line interface that is compatible with
458the standard javac executable.")))
459
460;; The classpath-bootstrap was built without a virtual machine, so it does not
461;; provide a wrapper for javah. We cannot build the development version of
462;; Classpath without javah.
463(define classpath-0.99
464 (package (inherit classpath-bootstrap)
465 (version "0.99")
466 (source (origin
467 (method url-fetch)
468 (uri (string-append "mirror://gnu/classpath/classpath-"
469 version ".tar.gz"))
470 (sha256
471 (base32
472 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
473 (patches (search-patches "classpath-aarch64-support.patch"))))
474 (arguments
475 `(#:configure-flags
476 (list (string-append "--with-ecj-jar="
477 (assoc-ref %build-inputs "ecj-bootstrap")
478 "/share/java/ecj-bootstrap.jar")
479 (string-append "JAVAC="
480 (assoc-ref %build-inputs "ecj-javac-wrapper")
481 "/bin/javac")
482 (string-append "JAVA="
483 (assoc-ref %build-inputs "jamvm")
484 "/bin/jamvm")
485 "GCJ_JAVAC_TRUE=no"
486 "ac_cv_prog_java_works=yes" ; trust me
487 "--disable-Werror"
488 "--disable-gmp"
489 "--disable-gtk-peer"
490 "--disable-gconf-peer"
491 "--disable-plugin"
492 "--disable-dssi"
493 "--disable-alsa"
494 "--disable-gjdoc")
495 #:phases
496 (modify-phases %standard-phases
497 (add-after 'install 'install-data
498 (lambda _ (invoke "make" "install-data"))))))
499 (native-inputs
500 `(("ecj-bootstrap" ,ecj-bootstrap)
501 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
502 ("fastjar" ,fastjar)
503 ("jamvm" ,jamvm-1-bootstrap)
504 ("classpath" ,classpath-bootstrap)
505 ("libltdl" ,libltdl)
506 ("pkg-config" ,pkg-config)))))
507
508;; We need this because classpath-bootstrap does not provide all of the tools
509;; we need to build classpath-devel.
510(define classpath-jamvm-wrappers
511 (package (inherit classpath-0.99)
512 (name "classpath-jamvm-wrappers")
513 (source #f)
514 (build-system trivial-build-system)
515 (arguments
516 `(#:modules ((guix build utils))
517 #:builder
518 (begin
519 (use-modules (guix build utils))
520 (let* ((bash (assoc-ref %build-inputs "bash"))
521 (jamvm (assoc-ref %build-inputs "jamvm"))
522 (classpath (assoc-ref %build-inputs "classpath"))
523 (bin (string-append (assoc-ref %outputs "out")
524 "/bin/")))
525 (mkdir-p bin)
526 (for-each (lambda (tool)
527 (with-output-to-file (string-append bin tool)
528 (lambda _
529 ,@(if (string-prefix? "armhf" (or (%current-system)
530 (%current-target-system)))
531 `((format #t "#!~a/bin/sh
532~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
533gnu.classpath.tools.~a.~a $@"
534 bash jamvm classpath tool
535 (if (string=? "native2ascii" tool)
536 "Native2ASCII" "Main")))
537 `((format #t "#!~a/bin/sh
538~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
539gnu.classpath.tools.~a.~a $@"
540 bash jamvm classpath tool
541 (if (string=? "native2ascii" tool)
542 "Native2ASCII" "Main"))))))
543 (chmod (string-append bin tool) #o755))
544 (list "javah"
545 "rmic"
546 "rmid"
547 "orbd"
548 "rmiregistry"
549 "native2ascii"))
550 #t))))
551 (native-inputs
552 `(("bash" ,bash)
553 ("jamvm" ,jamvm-1-bootstrap)
554 ("classpath" ,classpath-0.99)))
555 (inputs '())
556 (synopsis "Executables from GNU Classpath")
557 (description "This package provides wrappers around the tools provided by
558the GNU Classpath library. They are executed by the JamVM virtual
559machine.")))
560
561;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
562;; then Classpath has gained much more support for Java 1.6.
563(define-public classpath-devel
564 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
565 (revision "1"))
566 (package (inherit classpath-bootstrap)
567 (version (string-append "0.99-" revision "." (string-take commit 9)))
568 (source (origin
569 (method git-fetch)
570 (uri (git-reference
571 (url "https://git.savannah.gnu.org/git/classpath.git")
572 (commit commit)))
573 (file-name (string-append "classpath-" version "-checkout"))
574 (sha256
575 (base32
576 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
577 (arguments
578 `(#:make-flags
579 ;; Ensure that the initial heap size is smaller than the maximum
580 ;; size. By default only Xmx is set, which can lead to invalid
581 ;; memory settings on some machines with a lot of memory.
582 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
583 #:configure-flags
584 (list (string-append "--with-ecj-jar="
585 (assoc-ref %build-inputs "ecj-bootstrap")
586 "/share/java/ecj-bootstrap.jar")
587 (string-append "--with-javac="
588 (assoc-ref %build-inputs "ecj-javac-wrapper")
589 "/bin/javac")
590 (string-append "JAVA="
591 (assoc-ref %build-inputs "jamvm")
592 "/bin/jamvm")
593 "GCJ_JAVAC_TRUE=no"
594 "ac_cv_prog_java_works=yes" ; trust me
595 "--disable-Werror"
596 "--disable-gmp"
597 "--disable-gtk-peer"
598 "--disable-gconf-peer"
599 "--disable-plugin"
600 "--disable-dssi"
601 "--disable-alsa"
602 "--disable-gjdoc")
603 #:phases
604 (modify-phases %standard-phases
605 ;; XXX The bootstrap phase executes autogen.sh, which fails after
606 ;; complaining about the lack of gettext.
607 (replace 'bootstrap
608 (lambda _ (invoke "autoreconf" "-vif")))
609 (add-after 'unpack 'remove-unsupported-annotations
610 (lambda _
611 (substitute* (find-files "java" "\\.java$")
612 (("@Override") ""))
613 #t))
614 (add-after 'install 'install-data
615 (lambda _ (invoke "make" "install-data"))))))
616 (native-inputs
617 `(("autoconf" ,autoconf)
618 ("automake" ,automake)
619 ("libtool" ,libtool)
620 ("gettext" ,gettext-minimal)
621 ("texinfo" ,texinfo)
622 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
623 ("ecj-bootstrap" ,ecj-bootstrap)
624 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
625 ("fastjar" ,fastjar)
626 ("jamvm" ,jamvm-1-bootstrap)
627 ("libltdl" ,libltdl)
628 ("pkg-config" ,pkg-config))))))
629
630(define jamvm
631 (package (inherit jamvm-1-bootstrap)
632 (version "2.0.0")
633 (source (origin
634 (method url-fetch)
635 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
636 "JamVM%20" version "/jamvm-"
637 version ".tar.gz"))
638 (sha256
639 (base32
640 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
641 (build-system gnu-build-system)
642 (arguments
643 `(#:configure-flags
644 (list (string-append "--with-classpath-install-dir="
645 (assoc-ref %build-inputs "classpath")))))
646 (inputs
647 `(("classpath" ,classpath-devel)
648 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
649 ("zlib" ,zlib)))))
650
651(define ecj-javac-wrapper-final
652 (package (inherit ecj-javac-wrapper)
653 (native-inputs
654 `(("guile" ,guile-2.2)
655 ("ecj-bootstrap" ,ecj-bootstrap)
656 ("jamvm" ,jamvm)
657 ("classpath" ,classpath-devel)))))
658
659;; The bootstrap JDK consisting of jamvm, classpath-devel,
660;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
661;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
662;; which uses Java 6 only.
663(define-public icedtea-6
664 (package
665 (name "icedtea")
666 (version "1.13.13")
667 (source (origin
668 (method url-fetch)
669 (uri (string-append
670 "http://icedtea.wildebeest.org/download/source/icedtea6-"
671 version ".tar.xz"))
672 (sha256
673 (base32
674 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
675 (modules '((guix build utils)))
676 (snippet
677 '(begin
678 (substitute* "Makefile.in"
679 ;; do not leak information about the build host
680 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
681 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
682 #t))))
683 (build-system gnu-build-system)
684 (outputs '("out" ; Java Runtime Environment
685 "jdk" ; Java Development Kit
686 "doc")) ; all documentation
687 (arguments
688 `(;; There are many failing tests and many are known to fail upstream.
689 #:tests? #f
690
691 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
692 ;; gremlin) doesn't support it yet, so skip this phase.
693 #:validate-runpath? #f
694
695 #:modules ((guix build utils)
696 (guix build gnu-build-system)
697 (srfi srfi-19))
698
699 #:configure-flags
700 `("--enable-bootstrap"
701 "--enable-nss"
702 "--without-rhino"
703 "--with-parallel-jobs"
704 "--disable-downloading"
705 "--disable-tests"
706 ,(string-append "--with-ecj="
707 (assoc-ref %build-inputs "ecj")
708 "/share/java/ecj-bootstrap.jar")
709 ,(string-append "--with-jar="
710 (assoc-ref %build-inputs "fastjar")
711 "/bin/fastjar")
712 ,(string-append "--with-jdk-home="
713 (assoc-ref %build-inputs "classpath"))
714 ,(string-append "--with-java="
715 (assoc-ref %build-inputs "jamvm")
716 "/bin/jamvm"))
717 #:phases
718 (modify-phases %standard-phases
719 (replace 'unpack
720 (lambda* (#:key source inputs #:allow-other-keys)
721 (invoke "tar" "xvf" source)
722 (chdir (string-append "icedtea6-" ,version))
723 (mkdir "openjdk")
724 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
725 ;; The convenient OpenJDK source bundle is no longer
726 ;; available for download, so we have to take the sources
727 ;; from the Mercurial repositories and change the Makefile
728 ;; to avoid tests for the OpenJDK zip archive.
729 (with-directory-excursion "openjdk"
730 (for-each (lambda (part)
731 (mkdir part)
732 (copy-recursively
733 (assoc-ref inputs
734 (string-append part "-src"))
735 part))
736 '("jdk" "corba"
737 "langtools" "jaxp" "jaxws")))
738 (with-directory-excursion "openjdk"
739 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
740 (rename-file "hg-checkout" "hotspot"))
741 (substitute* "Makefile.in"
742 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
743 "echo \"trust me\";")
744 ;; The contents of the bootstrap directory must be
745 ;; writeable but when copying from the store they are
746 ;; not.
747 (("mkdir -p lib/rt" line)
748 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
749 (invoke "chmod" "-R" "u+w" "openjdk")))
750 (add-after 'unpack 'use-classpath
751 (lambda* (#:key inputs #:allow-other-keys)
752 (let ((jvmlib (assoc-ref inputs "classpath"))
753 (jamvm (assoc-ref inputs "jamvm")))
754 ;; Classpath does not provide rt.jar.
755 (substitute* "Makefile.in"
756 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
757 (string-append jvmlib "/share/classpath/glibj.zip")))
758 ;; Make sure we can find all classes.
759 (setenv "CLASSPATH"
760 (string-append jvmlib "/share/classpath/glibj.zip:"
761 jvmlib "/share/classpath/tools.zip:"
762 jamvm "/lib/rt.jar"))
763 (setenv "JAVACFLAGS"
764 (string-append "-cp "
765 jvmlib "/share/classpath/glibj.zip:"
766 jvmlib "/share/classpath/tools.zip")))
767 #t))
768 (add-after 'unpack 'patch-patches
769 (lambda _
770 ;; shebang in patches so that they apply cleanly
771 (substitute* '("patches/jtreg-jrunscript.patch"
772 "patches/hotspot/hs23/drop_unlicensed_test.patch")
773 (("#!/bin/sh") (string-append "#!" (which "sh"))))
774 #t))
775 (add-after 'unpack 'patch-paths
776 (lambda* (#:key inputs #:allow-other-keys)
777 ;; buildtree.make generates shell scripts, so we need to replace
778 ;; the generated shebang
779 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
780 (("/bin/sh") (which "bash")))
781
782 (let ((corebin (string-append
783 (assoc-ref inputs "coreutils") "/bin/"))
784 (binbin (string-append
785 (assoc-ref inputs "binutils") "/bin/"))
786 (grepbin (string-append
787 (assoc-ref inputs "grep") "/bin/")))
788 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
789 "openjdk/corba/make/common/shared/Defs-linux.gmk")
790 (("UNIXCOMMAND_PATH = /bin/")
791 (string-append "UNIXCOMMAND_PATH = " corebin))
792 (("USRBIN_PATH = /usr/bin/")
793 (string-append "USRBIN_PATH = " corebin))
794 (("DEVTOOLS_PATH *= */usr/bin/")
795 (string-append "DEVTOOLS_PATH = " corebin))
796 (("COMPILER_PATH *= */usr/bin/")
797 (string-append "COMPILER_PATH = "
798 (assoc-ref inputs "gcc") "/bin/"))
799 (("DEF_OBJCOPY *=.*objcopy")
800 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
801
802 ;; fix path to alsa header
803 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
804 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
805 (string-append "ALSA_INCLUDE="
806 (assoc-ref inputs "alsa-lib")
807 "/include/alsa/version.h")))
808
809 ;; fix hard-coded utility paths
810 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
811 "openjdk/corba/make/common/shared/Defs-utils.gmk")
812 (("ECHO *=.*echo")
813 (string-append "ECHO = " (which "echo")))
814 (("^GREP *=.*grep")
815 (string-append "GREP = " (which "grep")))
816 (("EGREP *=.*egrep")
817 (string-append "EGREP = " (which "egrep")))
818 (("CPIO *=.*cpio")
819 (string-append "CPIO = " (which "cpio")))
820 (("READELF *=.*readelf")
821 (string-append "READELF = " (which "readelf")))
822 (("^ *AR *=.*ar")
823 (string-append "AR = " (which "ar")))
824 (("^ *TAR *=.*tar")
825 (string-append "TAR = " (which "tar")))
826 (("AS *=.*as")
827 (string-append "AS = " (which "as")))
828 (("LD *=.*ld")
829 (string-append "LD = " (which "ld")))
830 (("STRIP *=.*strip")
831 (string-append "STRIP = " (which "strip")))
832 (("NM *=.*nm")
833 (string-append "NM = " (which "nm")))
834 (("^SH *=.*sh")
835 (string-append "SH = " (which "bash")))
836 (("^FIND *=.*find")
837 (string-append "FIND = " (which "find")))
838 (("LDD *=.*ldd")
839 (string-append "LDD = " (which "ldd")))
840 (("NAWK *=.*(n|g)awk")
841 (string-append "NAWK = " (which "gawk")))
842 (("XARGS *=.*xargs")
843 (string-append "XARGS = " (which "xargs")))
844 (("UNZIP *=.*unzip")
845 (string-append "UNZIP = " (which "unzip")))
846 (("ZIPEXE *=.*zip")
847 (string-append "ZIPEXE = " (which "zip")))
848 (("SED *=.*sed")
849 (string-append "SED = " (which "sed"))))
850
851 ;; Some of these timestamps cause problems as they are more than
852 ;; 10 years ago, failing the build process.
853 (substitute*
854 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
855 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
856 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
857 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
858 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
859 #t)))
860 (add-before 'configure 'set-additional-paths
861 (lambda* (#:key inputs #:allow-other-keys)
862 (setenv "CPATH"
863 (string-append (assoc-ref inputs "libxrender")
864 "/include/X11/extensions" ":"
865 (assoc-ref inputs "libxtst")
866 "/include/X11/extensions" ":"
867 (assoc-ref inputs "libxinerama")
868 "/include/X11/extensions" ":"
869 (or (getenv "CPATH") "")))
870 (setenv "ALT_CUPS_HEADERS_PATH"
871 (string-append (assoc-ref inputs "cups")
872 "/include"))
873 (setenv "ALT_FREETYPE_HEADERS_PATH"
874 (string-append (assoc-ref inputs "freetype")
875 "/include"))
876 (setenv "ALT_FREETYPE_LIB_PATH"
877 (string-append (assoc-ref inputs "freetype")
878 "/lib"))
879 #t))
880 (replace 'install
881 (lambda* (#:key outputs #:allow-other-keys)
882 (let ((doc (string-append (assoc-ref outputs "doc")
883 "/share/doc/icedtea"))
884 (jre (assoc-ref outputs "out"))
885 (jdk (assoc-ref outputs "jdk")))
886 (copy-recursively "openjdk.build/docs" doc)
887 (copy-recursively "openjdk.build/j2re-image" jre)
888 (copy-recursively "openjdk.build/j2sdk-image" jdk))
889 #t)))))
890 (native-inputs
891 `(("ant" ,ant-bootstrap)
892 ("alsa-lib" ,alsa-lib)
893 ("attr" ,attr)
894 ("classpath" ,classpath-devel)
895 ("coreutils" ,coreutils)
896 ("cpio" ,cpio)
897 ("cups" ,cups)
898 ("ecj" ,ecj-bootstrap)
899 ("ecj-javac" ,ecj-javac-wrapper-final)
900 ("fastjar" ,fastjar)
901 ("fontconfig" ,fontconfig)
902 ("freetype" ,freetype)
903 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
904 ("gtk" ,gtk+-2)
905 ("gawk" ,gawk)
906 ("giflib" ,giflib)
907 ("grep" ,grep)
908 ("jamvm" ,jamvm)
909 ("lcms" ,lcms)
910 ("libjpeg" ,libjpeg)
911 ("libnsl" ,libnsl)
912 ("libpng" ,libpng)
913 ("libtool" ,libtool)
914 ("libx11" ,libx11)
915 ("libxcomposite" ,libxcomposite)
916 ("libxi" ,libxi)
917 ("libxinerama" ,libxinerama)
918 ("libxrender" ,libxrender)
919 ("libxslt" ,libxslt) ;for xsltproc
920 ("libxt" ,libxt)
921 ("libxtst" ,libxtst)
922 ("mit-krb5" ,mit-krb5)
923 ("nss" ,nss)
924 ("nss-certs" ,nss-certs)
925 ("perl" ,perl)
926 ("pkg-config" ,pkg-config)
927 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
928 ("unzip" ,unzip)
929 ("wget" ,wget)
930 ("which" ,which)
931 ("zip" ,zip)
932 ("zlib" ,zlib)
933 ("openjdk-src"
934 ,(origin
935 (method hg-fetch)
936 (uri (hg-reference
937 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
938 (changeset "jdk6-b41")))
939 (sha256
940 (base32
941 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
942 ("jdk-src"
943 ,(origin
944 (method hg-fetch)
945 (uri (hg-reference
946 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
947 (changeset "jdk6-b41")))
948 (sha256
949 (base32
950 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
951 ("hotspot-src"
952 ,(origin
953 (method hg-fetch)
954 (uri (hg-reference
955 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
956 (changeset "jdk6-b41")))
957 (sha256
958 (base32
959 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
960 (patches
961 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
962 ("corba-src"
963 ,(origin
964 (method hg-fetch)
965 (uri (hg-reference
966 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
967 (changeset "jdk6-b41")))
968 (sha256
969 (base32
970 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
971 ("langtools-src"
972 ,(origin
973 (method hg-fetch)
974 (uri (hg-reference
975 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
976 (changeset "jdk6-b41")))
977 (sha256
978 (base32
979 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
980 ("jaxp-src"
981 ,(origin
982 (method hg-fetch)
983 (uri (hg-reference
984 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
985 (changeset "jdk6-b41")))
986 (sha256
987 (base32
988 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
989 ("jaxws-src"
990 ,(origin
991 (method hg-fetch)
992 (uri (hg-reference
993 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
994 (changeset "jdk6-b41")))
995 (sha256
996 (base32
997 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
998 (home-page "http://icedtea.classpath.org")
999 (synopsis "Java development kit")
1000 (description
1001 "This package provides the OpenJDK built with the IcedTea build harness.
1002This version of the OpenJDK is no longer maintained and is only used for
1003bootstrapping purposes.")
1004 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1005 ;; same license as both GNU Classpath and OpenJDK.
1006 (license license:gpl2+)))
1007
1008(define-public icedtea-7
1009 (let* ((version "2.6.13")
1010 (drop (lambda (name hash)
1011 (origin
1012 (method url-fetch)
1013 (uri (string-append
1014 "http://icedtea.classpath.org/download/drops"
1015 "/icedtea7/" version "/" name ".tar.bz2"))
1016 (sha256 (base32 hash))))))
1017 (package
1018 (name "icedtea")
1019 (version version)
1020 (source (origin
1021 (method url-fetch)
1022 (uri (string-append
1023 "http://icedtea.wildebeest.org/download/source/icedtea-"
1024 version ".tar.xz"))
1025 (sha256
1026 (base32
1027 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1028 (modules '((guix build utils)))
1029 (snippet
1030 '(begin
1031 (substitute* "Makefile.in"
1032 ;; do not leak information about the build host
1033 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1034 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1035 #t))))
1036 (build-system gnu-build-system)
1037 (outputs '("out" ; Java Runtime Environment
1038 "jdk" ; Java Development Kit
1039 "doc")) ; all documentation
1040 (arguments
1041 `(;; There are many test failures. Some are known to
1042 ;; fail upstream, others relate to not having an X
1043 ;; server running at test time, yet others are a
1044 ;; complete mystery to me.
1045
1046 ;; hotspot: passed: 241; failed: 45; error: 2
1047 ;; langtools: passed: 1,934; failed: 26
1048 ;; jdk: unknown
1049 #:tests? #f
1050
1051 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1052 ;; gremlin) doesn't support it yet, so skip this phase.
1053 #:validate-runpath? #f
1054
1055 ;; Apparently, the C locale is needed for some of the tests.
1056 #:locale "C"
1057
1058 #:modules ((guix build utils)
1059 (guix build gnu-build-system)
1060 (ice-9 match)
1061 (ice-9 popen)
1062 (srfi srfi-19)
1063 (srfi srfi-26))
1064
1065 #:configure-flags
1066 ;; TODO: package pcsc and sctp, and add to inputs
1067 `("--disable-system-pcsc"
1068 "--disable-system-sctp"
1069 "--enable-bootstrap"
1070 "--enable-nss"
1071 "--without-rhino"
1072 "--disable-downloading"
1073 "--disable-tests" ;they are run in the check phase instead
1074 "--with-openjdk-src-dir=./openjdk.src"
1075 ,(string-append "--with-jdk-home="
1076 (assoc-ref %build-inputs "jdk")))
1077
1078 #:phases
1079 (modify-phases %standard-phases
1080 (replace 'unpack
1081 (lambda* (#:key source inputs #:allow-other-keys)
1082 (let ((target (string-append "icedtea-" ,version))
1083 (unpack (lambda* (name #:optional dir)
1084 (let ((dir (or dir
1085 (string-drop-right name 5))))
1086 (mkdir dir)
1087 (invoke "tar" "xvf"
1088 (assoc-ref inputs name)
1089 "-C" dir
1090 "--strip-components=1")))))
1091 (mkdir target)
1092 (invoke "tar" "xvf" source
1093 "-C" target "--strip-components=1")
1094 (chdir target)
1095 (unpack "openjdk-src" "openjdk.src")
1096 (with-directory-excursion "openjdk.src"
1097 (for-each unpack
1098 (filter (cut string-suffix? "-drop" <>)
1099 (map (match-lambda
1100 ((name . _) name))
1101 inputs))))
1102 #t)))
1103 (add-after 'unpack 'fix-x11-extension-include-path
1104 (lambda* (#:key inputs #:allow-other-keys)
1105 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1106 (((string-append "\\$\\(firstword \\$\\(wildcard "
1107 "\\$\\(OPENWIN_HOME\\)"
1108 "/include/X11/extensions\\).*$"))
1109 (string-append (assoc-ref inputs "libxrender")
1110 "/include/X11/extensions"
1111 " -I" (assoc-ref inputs "libxtst")
1112 "/include/X11/extensions"
1113 " -I" (assoc-ref inputs "libxinerama")
1114 "/include/X11/extensions"))
1115 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1116 #t))
1117 (add-after 'unpack 'patch-paths
1118 (lambda _
1119 ;; buildtree.make generates shell scripts, so we need to replace
1120 ;; the generated shebang
1121 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1122 (("/bin/sh") (which "bash")))
1123
1124 (let ((corebin (string-append
1125 (assoc-ref %build-inputs "coreutils") "/bin/"))
1126 (binbin (string-append
1127 (assoc-ref %build-inputs "binutils") "/bin/"))
1128 (grepbin (string-append
1129 (assoc-ref %build-inputs "grep") "/bin/")))
1130 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1131 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1132 (("UNIXCOMMAND_PATH = /bin/")
1133 (string-append "UNIXCOMMAND_PATH = " corebin))
1134 (("USRBIN_PATH = /usr/bin/")
1135 (string-append "USRBIN_PATH = " corebin))
1136 (("DEVTOOLS_PATH *= */usr/bin/")
1137 (string-append "DEVTOOLS_PATH = " corebin))
1138 (("COMPILER_PATH *= */usr/bin/")
1139 (string-append "COMPILER_PATH = "
1140 (assoc-ref %build-inputs "gcc") "/bin/"))
1141 (("DEF_OBJCOPY *=.*objcopy")
1142 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1143
1144 ;; fix path to alsa header
1145 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1146 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1147 (string-append "ALSA_INCLUDE="
1148 (assoc-ref %build-inputs "alsa-lib")
1149 "/include/alsa/version.h")))
1150
1151 ;; fix hard-coded utility paths
1152 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1153 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1154 (("ECHO *=.*echo")
1155 (string-append "ECHO = " (which "echo")))
1156 (("^GREP *=.*grep")
1157 (string-append "GREP = " (which "grep")))
1158 (("EGREP *=.*egrep")
1159 (string-append "EGREP = " (which "egrep")))
1160 (("CPIO *=.*cpio")
1161 (string-append "CPIO = " (which "cpio")))
1162 (("READELF *=.*readelf")
1163 (string-append "READELF = " (which "readelf")))
1164 (("^ *AR *=.*ar")
1165 (string-append "AR = " (which "ar")))
1166 (("^ *TAR *=.*tar")
1167 (string-append "TAR = " (which "tar")))
1168 (("AS *=.*as")
1169 (string-append "AS = " (which "as")))
1170 (("LD *=.*ld")
1171 (string-append "LD = " (which "ld")))
1172 (("STRIP *=.*strip")
1173 (string-append "STRIP = " (which "strip")))
1174 (("NM *=.*nm")
1175 (string-append "NM = " (which "nm")))
1176 (("^SH *=.*sh")
1177 (string-append "SH = " (which "bash")))
1178 (("^FIND *=.*find")
1179 (string-append "FIND = " (which "find")))
1180 (("LDD *=.*ldd")
1181 (string-append "LDD = " (which "ldd")))
1182 (("NAWK *=.*(n|g)awk")
1183 (string-append "NAWK = " (which "gawk")))
1184 (("XARGS *=.*xargs")
1185 (string-append "XARGS = " (which "xargs")))
1186 (("UNZIP *=.*unzip")
1187 (string-append "UNZIP = " (which "unzip")))
1188 (("ZIPEXE *=.*zip")
1189 (string-append "ZIPEXE = " (which "zip")))
1190 (("SED *=.*sed")
1191 (string-append "SED = " (which "sed"))))
1192
1193 ;; Some of these timestamps cause problems as they are more than
1194 ;; 10 years ago, failing the build process.
1195 (substitute*
1196 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1197 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1198 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1199 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1200 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1201 #t))
1202 (add-before 'configure 'set-additional-paths
1203 (lambda* (#:key inputs #:allow-other-keys)
1204 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1205 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1206 (string-append "ALSA_INCLUDE="
1207 (assoc-ref inputs "alsa-lib")
1208 "/include/alsa/version.h")))
1209 (setenv "CC" "gcc")
1210 (setenv "CPATH"
1211 (string-append (assoc-ref inputs "libxcomposite")
1212 "/include/X11/extensions" ":"
1213 (assoc-ref inputs "libxrender")
1214 "/include/X11/extensions" ":"
1215 (assoc-ref inputs "libxtst")
1216 "/include/X11/extensions" ":"
1217 (assoc-ref inputs "libxinerama")
1218 "/include/X11/extensions" ":"
1219 (or (getenv "CPATH") "")))
1220 (setenv "ALT_OBJCOPY" (which "objcopy"))
1221 (setenv "ALT_CUPS_HEADERS_PATH"
1222 (string-append (assoc-ref inputs "cups")
1223 "/include"))
1224 (setenv "ALT_FREETYPE_HEADERS_PATH"
1225 (string-append (assoc-ref inputs "freetype")
1226 "/include"))
1227 (setenv "ALT_FREETYPE_LIB_PATH"
1228 (string-append (assoc-ref inputs "freetype")
1229 "/lib"))
1230 #t))
1231 (add-before 'check 'fix-test-framework
1232 (lambda _
1233 ;; Fix PATH in test environment
1234 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1235 (("PATH=/bin:/usr/bin")
1236 (string-append "PATH=" (getenv "PATH"))))
1237 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1238 (("/usr/bin/env") (which "env")))
1239 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1240 (("/bin/rm") (which "rm"))
1241 (("/bin/cp") (which "cp"))
1242 (("/bin/mv") (which "mv")))
1243 #t))
1244 (add-before 'check 'fix-hotspot-tests
1245 (lambda _
1246 (with-directory-excursion "openjdk.src/hotspot/test/"
1247 (substitute* "jprt.config"
1248 (("PATH=\"\\$\\{path4sdk\\}\"")
1249 (string-append "PATH=" (getenv "PATH")))
1250 (("make=/usr/bin/make")
1251 (string-append "make=" (which "make"))))
1252 (substitute* '("runtime/6626217/Test6626217.sh"
1253 "runtime/7110720/Test7110720.sh")
1254 (("/bin/rm") (which "rm"))
1255 (("/bin/cp") (which "cp"))
1256 (("/bin/mv") (which "mv"))))
1257 #t))
1258 (add-before 'check 'fix-jdk-tests
1259 (lambda _
1260 (with-directory-excursion "openjdk.src/jdk/test/"
1261 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1262 (("/bin/pwd") (which "pwd")))
1263 (substitute* "com/sun/jdi/ShellScaffold.sh"
1264 (("/bin/kill") (which "kill")))
1265 (substitute* "start-Xvfb.sh"
1266 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1267 (("/usr/bin/nohup") (which "nohup")))
1268 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1269 (("/bin/rm") (which "rm")))
1270 (substitute* "tools/launcher/MultipleJRE.sh"
1271 (("echo \"#!/bin/sh\"")
1272 (string-append "echo \"#!" (which "rm") "\""))
1273 (("/usr/bin/zip") (which "zip")))
1274 (substitute* "com/sun/jdi/OnThrowTest.java"
1275 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1276 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1277 (("/usr/bin/uptime") (which "uptime")))
1278 (substitute* "java/lang/ProcessBuilder/Basic.java"
1279 (("/usr/bin/env") (which "env"))
1280 (("/bin/false") (which "false"))
1281 (("/bin/true") (which "true"))
1282 (("/bin/cp") (which "cp"))
1283 (("/bin/sh") (which "sh")))
1284 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1285 (("/bin/sh") (which "sh")))
1286 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1287 (("/usr/bin/perl") (which "perl"))
1288 (("/bin/ps") (which "ps"))
1289 (("/bin/true") (which "true")))
1290 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1291 (("/usr/bin/tee") (which "tee")))
1292 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1293 (("/bin/true") (which "true")))
1294 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1295 (("/bin/cat") (which "cat")))
1296 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1297 (("/bin/sh") (which "sh"))
1298 (("/bin/true") (which "true"))
1299 (("/bin/kill") (which "kill")))
1300 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1301 (("/usr/bin/echo") (which "echo")))
1302 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1303 (("/usr/bin/cat") (which "cat")))
1304 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1305 (("/bin/cat") (which "cat"))
1306 (("/bin/sleep") (which "sleep"))
1307 (("/bin/sh") (which "sh")))
1308 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1309 (("/bin/cat") (which "cat")))
1310 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1311 (("/bin/chmod") (which "chmod")))
1312 (substitute* "java/util/zip/ZipFile/Assortment.java"
1313 (("/bin/sh") (which "sh"))))
1314 #t))
1315 (replace 'check
1316 (lambda _
1317 ;; The "make check-*" targets always return zero, so we need to
1318 ;; check for errors in the associated log files to determine
1319 ;; whether any tests have failed.
1320 (use-modules (ice-9 rdelim))
1321 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1322 (checker (lambda (port)
1323 (let loop ()
1324 (let ((line (read-line port)))
1325 (cond
1326 ((eof-object? line) #t)
1327 ((regexp-exec error-pattern line)
1328 (error "test failed"))
1329 (else (loop)))))))
1330 (run-test (lambda (test)
1331 (invoke "make" test)
1332 (call-with-input-file
1333 (string-append "test/" test ".log")
1334 checker))))
1335 (when #f ; skip tests
1336 (run-test "check-hotspot")
1337 (run-test "check-langtools")
1338 (run-test "check-jdk"))
1339 #t)))
1340 (replace 'install
1341 (lambda* (#:key outputs #:allow-other-keys)
1342 (let ((doc (string-append (assoc-ref outputs "doc")
1343 "/share/doc/icedtea"))
1344 (jre (assoc-ref outputs "out"))
1345 (jdk (assoc-ref outputs "jdk")))
1346 (copy-recursively "openjdk.build/docs" doc)
1347 (copy-recursively "openjdk.build/j2re-image" jre)
1348 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1349 #t))
1350 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1351 ;; But that shared object is located in the server/ folder, so it
1352 ;; cannot be found. This phase creates a symbolic link in the
1353 ;; lib/amd64 folder so that the other libraries can find it.
1354 ;;
1355 ;; See:
1356 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1357 ;;
1358 ;; FIXME: Find the bug in the build system, so that this symlink is
1359 ;; not needed.
1360 (add-after 'install 'install-libjvm
1361 (lambda* (#:key inputs outputs #:allow-other-keys)
1362 (let* ((lib-path (string-append (assoc-ref outputs "out")
1363 "/lib/amd64")))
1364 (symlink (string-append lib-path "/server/libjvm.so")
1365 (string-append lib-path "/libjvm.so")))
1366 #t))
1367 ;; By default IcedTea only generates an empty keystore. In order to
1368 ;; be able to use certificates in Java programs we need to generate a
1369 ;; keystore from a set of certificates. For convenience we use the
1370 ;; certificates from the nss-certs package.
1371 (add-after 'install 'install-keystore
1372 (lambda* (#:key inputs outputs #:allow-other-keys)
1373 (let* ((keystore "cacerts")
1374 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1375 "/etc/ssl/certs"))
1376 (keytool (string-append (assoc-ref outputs "jdk")
1377 "/bin/keytool")))
1378 (define (extract-cert file target)
1379 (call-with-input-file file
1380 (lambda (in)
1381 (call-with-output-file target
1382 (lambda (out)
1383 (let loop ((line (read-line in 'concat))
1384 (copying? #f))
1385 (cond
1386 ((eof-object? line) #t)
1387 ((string-prefix? "-----BEGIN" line)
1388 (display line out)
1389 (loop (read-line in 'concat) #t))
1390 ((string-prefix? "-----END" line)
1391 (display line out)
1392 #t)
1393 (else
1394 (when copying? (display line out))
1395 (loop (read-line in 'concat) copying?)))))))))
1396 (define (import-cert cert)
1397 (format #t "Importing certificate ~a\n" (basename cert))
1398 (let ((temp "tmpcert"))
1399 (extract-cert cert temp)
1400 (let ((port (open-pipe* OPEN_WRITE keytool
1401 "-import"
1402 "-alias" (basename cert)
1403 "-keystore" keystore
1404 "-storepass" "changeit"
1405 "-file" temp)))
1406 (display "yes\n" port)
1407 (when (not (zero? (status:exit-val (close-pipe port))))
1408 (format #t "failed to import ~a\n" cert)))
1409 (delete-file temp)))
1410
1411 ;; This is necessary because the certificate directory contains
1412 ;; files with non-ASCII characters in their names.
1413 (setlocale LC_ALL "en_US.utf8")
1414 (setenv "LC_ALL" "en_US.utf8")
1415
1416 (for-each import-cert (find-files certs-dir "\\.pem$"))
1417 (mkdir-p (string-append (assoc-ref outputs "out")
1418 "/lib/security"))
1419 (mkdir-p (string-append (assoc-ref outputs "jdk")
1420 "/jre/lib/security"))
1421
1422 ;; The cacerts files we are going to overwrite are chmod'ed as
1423 ;; read-only (444) in icedtea-8 (which derives from this
1424 ;; package). We have to change this so we can overwrite them.
1425 (chmod (string-append (assoc-ref outputs "out")
1426 "/lib/security/" keystore) #o644)
1427 (chmod (string-append (assoc-ref outputs "jdk")
1428 "/jre/lib/security/" keystore) #o644)
1429
1430 (install-file keystore
1431 (string-append (assoc-ref outputs "out")
1432 "/lib/security"))
1433 (install-file keystore
1434 (string-append (assoc-ref outputs "jdk")
1435 "/jre/lib/security"))
1436 #t))))))
1437 (native-inputs
1438 `(("openjdk-src"
1439 ,(drop "openjdk"
1440 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1441 ("corba-drop"
1442 ,(drop "corba"
1443 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1444 ("jaxp-drop"
1445 ,(drop "jaxp"
1446 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1447 ("jaxws-drop"
1448 ,(drop "jaxws"
1449 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1450 ("jdk-drop"
1451 ,(drop "jdk"
1452 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1453 ("langtools-drop"
1454 ,(drop "langtools"
1455 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1456 ("hotspot-drop"
1457 ,(origin
1458 (method url-fetch)
1459 (uri (string-append
1460 "http://icedtea.classpath.org/downloads/drops"
1461 "/icedtea7/" version "/hotspot.tar.bz2"))
1462 (sha256
1463 (base32
1464 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1465 (patches (search-patches
1466 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1467 ("ant" ,ant-bootstrap)
1468 ("attr" ,attr)
1469 ("coreutils" ,coreutils)
1470 ("diffutils" ,diffutils) ;for tests
1471 ("gawk" ,gawk)
1472 ("grep" ,grep)
1473 ("libtool" ,libtool)
1474 ("pkg-config" ,pkg-config)
1475 ("wget" ,wget)
1476 ("which" ,which)
1477 ("cpio" ,cpio)
1478 ("zip" ,zip)
1479 ("unzip" ,unzip)
1480 ("fastjar" ,fastjar)
1481 ("libxslt" ,libxslt) ;for xsltproc
1482 ("nss-certs" ,nss-certs)
1483 ("perl" ,perl)
1484 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1485 ("jdk" ,icedtea-6 "jdk")))
1486 (inputs
1487 `(("alsa-lib" ,alsa-lib)
1488 ("cups" ,cups)
1489 ("libx11" ,libx11)
1490 ("libxcomposite" ,libxcomposite)
1491 ("libxt" ,libxt)
1492 ("libxtst" ,libxtst)
1493 ("libxi" ,libxi)
1494 ("libxinerama" ,libxinerama)
1495 ("libxrender" ,libxrender)
1496 ("libjpeg" ,libjpeg)
1497 ("libpng" ,libpng)
1498 ("mit-krb5" ,mit-krb5)
1499 ("nss" ,nss)
1500 ("giflib" ,giflib)
1501 ("fontconfig" ,fontconfig)
1502 ("freetype" ,freetype)
1503 ("lcms" ,lcms)
1504 ("zlib" ,zlib)
1505 ("gtk" ,gtk+-2)))
1506 (home-page "http://icedtea.classpath.org")
1507 (synopsis "Java development kit")
1508 (description
1509 "This package provides the Java development kit OpenJDK built with the
1510IcedTea build harness.")
1511 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1512 ;; same license as both GNU Classpath and OpenJDK.
1513 (license license:gpl2+))))
1514
1515(define-public icedtea-8
1516 (let* ((version "3.7.0")
1517 (drop (lambda (name hash)
1518 (origin
1519 (method url-fetch)
1520 (uri (string-append
1521 "http://icedtea.classpath.org/download/drops"
1522 "/icedtea8/" version "/" name ".tar.xz"))
1523 (sha256 (base32 hash))))))
1524 (package (inherit icedtea-7)
1525 (version "3.7.0")
1526 (source (origin
1527 (method url-fetch)
1528 (uri (string-append
1529 "http://icedtea.wildebeest.org/download/source/icedtea-"
1530 version ".tar.xz"))
1531 (sha256
1532 (base32
1533 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1534 (modules '((guix build utils)))
1535 (snippet
1536 '(begin
1537 (substitute* '("configure"
1538 "acinclude.m4")
1539 ;; Do not embed build time
1540 (("(DIST_ID=\"Custom build).*$" _ prefix)
1541 (string-append prefix "\"\n"))
1542 ;; Do not leak information about the build host
1543 (("DIST_NAME=\"\\$build_os\"")
1544 "DIST_NAME=\"guix\""))
1545 #t))))
1546 (arguments
1547 `(#:imported-modules
1548 ((guix build ant-build-system)
1549 (guix build syscalls)
1550 ,@%gnu-build-system-modules)
1551 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1552 ((#:modules modules)
1553 `((guix build utils)
1554 (guix build gnu-build-system)
1555 ((guix build ant-build-system) #:prefix ant:)
1556 (ice-9 match)
1557 (ice-9 popen)
1558 (srfi srfi-19)
1559 (srfi srfi-26)))
1560 ((#:configure-flags flags)
1561 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1562 `( ;;"--disable-bootstrap"
1563 "--enable-bootstrap"
1564 "--enable-nss"
1565 "--disable-downloading"
1566 "--disable-system-pcsc"
1567 "--disable-system-sctp"
1568 "--disable-tests" ;they are run in the check phase instead
1569 "--with-openjdk-src-dir=./openjdk.src"
1570 ,(string-append "--with-jdk-home=" jdk))))
1571 ((#:phases phases)
1572 `(modify-phases ,phases
1573 (delete 'fix-x11-extension-include-path)
1574 (delete 'patch-paths)
1575 (delete 'set-additional-paths)
1576 (delete 'patch-patches)
1577 ;; Prevent the keytool from recording the current time when
1578 ;; adding certificates at build time.
1579 (add-after 'unpack 'patch-keystore
1580 (lambda _
1581 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1582 (("date = new Date\\(\\);")
1583 "\
1584date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1585new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1586new Date();"))
1587 #t))
1588 (add-after 'unpack 'patch-jni-libs
1589 ;; Hardcode dynamically loaded libraries.
1590 (lambda _
1591 (let* ((library-path (search-path-as-string->list
1592 (getenv "LIBRARY_PATH")))
1593 (find-library (lambda (name)
1594 (search-path
1595 library-path
1596 (string-append "lib" name ".so")))))
1597 (for-each
1598 (lambda (file)
1599 (catch 'decoding-error
1600 (lambda ()
1601 (substitute* file
1602 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1603 _ name version)
1604 (format #f "\"~a\"" (find-library name)))
1605 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1606 (format #f "\"~a\"" (find-library name)))))
1607 (lambda _
1608 ;; Those are safe to skip.
1609 (format (current-error-port)
1610 "warning: failed to substitute: ~a~%"
1611 file))))
1612 (find-files "openjdk.src/jdk/src/solaris/native"
1613 "\\.c|\\.h"))
1614 #t)))
1615 (replace 'install
1616 (lambda* (#:key outputs #:allow-other-keys)
1617 (let ((doc (string-append (assoc-ref outputs "doc")
1618 "/share/doc/icedtea"))
1619 (jre (assoc-ref outputs "out"))
1620 (jdk (assoc-ref outputs "jdk")))
1621 (copy-recursively "openjdk.build/docs" doc)
1622 (copy-recursively "openjdk.build/images/j2re-image" jre)
1623 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1624 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1625 ;; support via NSS.
1626 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1627 (string-append jre "/lib/security/nss.cfg"))
1628 #t)))
1629 (add-after 'install 'strip-jar-timestamps
1630 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1631 (native-inputs
1632 `(("jdk" ,icedtea-7 "jdk")
1633 ("openjdk-src"
1634 ,(drop "openjdk"
1635 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1636 ("aarch32-drop"
1637 ,(drop "aarch32"
1638 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1639 ("corba-drop"
1640 ,(drop "corba"
1641 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1642 ("jaxp-drop"
1643 ,(drop "jaxp"
1644 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1645 ("jaxws-drop"
1646 ,(drop "jaxws"
1647 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1648 ("jdk-drop"
1649 ,(drop "jdk"
1650 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1651 ("langtools-drop"
1652 ,(drop "langtools"
1653 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1654 ("hotspot-drop"
1655 ,(origin
1656 (method url-fetch)
1657 (uri (string-append
1658 "http://icedtea.classpath.org/download/drops"
1659 "/icedtea8/" version "/hotspot.tar.xz"))
1660 (sha256
1661 (base32
1662 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1663 (patches (search-patches
1664 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1665 ("nashorn-drop"
1666 ,(drop "nashorn"
1667 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1668 ("shenandoah-drop"
1669 ,(drop "shenandoah"
1670 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1671 ,@(fold alist-delete (package-native-inputs icedtea-7)
1672 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1673 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1674
1675(define-public icedtea icedtea-8)
1676
1677
1678(define-public ant/java8
1679 (package (inherit ant-bootstrap)
1680 (name "ant")
1681 (version "1.10.1")
1682 (source (origin
1683 (method url-fetch)
1684 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1685 version "-src.tar.gz"))
1686 (sha256
1687 (base32
1688 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1689 (modules '((guix build utils)))
1690 (snippet
1691 '(begin
1692 (for-each delete-file
1693 (find-files "lib/optional" "\\.jar$"))
1694 #t))))
1695 (arguments
1696 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1697 ((#:phases phases)
1698 `(modify-phases ,phases
1699 (add-after 'unpack 'remove-scripts
1700 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1701 ;; wrappers.
1702 (lambda _
1703 (for-each delete-file
1704 (find-files "src/script"
1705 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1706 #t))
1707 (replace 'build
1708 (lambda* (#:key inputs outputs #:allow-other-keys)
1709 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1710
1711 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1712 ;; Ant to build. This is necessary in addition to disabling the
1713 ;; "check" phase, because the dependency on "test-jar" would always
1714 ;; result in the tests to be run.
1715 (substitute* "build.xml"
1716 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1717 (invoke "bash" "bootstrap.sh"
1718 (string-append "-Ddist.dir="
1719 (assoc-ref outputs "out")))))))))
1720 (native-inputs
1721 `(("jdk" ,icedtea-8 "jdk")
1722 ("zip" ,zip)
1723 ("unzip" ,unzip)))))
1724
1725;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1726;; requires Java 8.
1727(define-public ant
1728 (package (inherit ant/java8)
1729 (version "1.9.9")
1730 (source (origin
1731 (method url-fetch)
1732 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1733 version "-src.tar.gz"))
1734 (sha256
1735 (base32
1736 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1737 (native-inputs
1738 `(("jdk" ,icedtea-7 "jdk")
1739 ("zip" ,zip)
1740 ("unzip" ,unzip)))))
1741
1742(define-public ant-apache-bcel
1743 (package
1744 (inherit ant/java8)
1745 (name "ant-apache-bcel")
1746 (arguments
1747 (substitute-keyword-arguments (package-arguments ant/java8)
1748 ((#:phases phases)
1749 `(modify-phases ,phases
1750 (add-after 'unpack 'link-bcel
1751 (lambda* (#:key inputs #:allow-other-keys)
1752 (for-each (lambda (file)
1753 (symlink file
1754 (string-append "lib/optional/"
1755 (basename file))))
1756 (find-files (assoc-ref inputs "java-commons-bcel")
1757 "\\.jar$"))
1758 #t))
1759 (add-after 'build 'install
1760 (lambda* (#:key outputs #:allow-other-keys)
1761 (let* ((out (assoc-ref outputs "out"))
1762 (share (string-append out "/share/java"))
1763 (bin (string-append out "/bin"))
1764 (lib (string-append out "/lib")))
1765 (mkdir-p share)
1766 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1767 (delete-file-recursively bin)
1768 (delete-file-recursively lib)
1769 #t)))))))
1770 (inputs
1771 `(("java-commons-bcel" ,java-commons-bcel)
1772 ,@(package-inputs ant/java8)))))
1773
1774(define-public ant-junit
1775 (package
1776 (inherit ant/java8)
1777 (name "ant-junit")
1778 (arguments
1779 (substitute-keyword-arguments (package-arguments ant/java8)
1780 ((#:phases phases)
1781 `(modify-phases ,phases
1782 (add-after 'unpack 'link-junit
1783 (lambda* (#:key inputs #:allow-other-keys)
1784 (for-each (lambda (file)
1785 (symlink file
1786 (string-append "lib/optional/"
1787 (basename file))))
1788 (find-files (assoc-ref inputs "java-junit")
1789 "\\.jar$"))
1790 #t))
1791 (add-after 'build 'install
1792 (lambda* (#:key outputs #:allow-other-keys)
1793 (let* ((out (assoc-ref outputs "out"))
1794 (share (string-append out "/share/java"))
1795 (bin (string-append out "/bin"))
1796 (lib (string-append out "/lib")))
1797 (mkdir-p share)
1798 (install-file (string-append lib "/ant-junit.jar") share)
1799 (delete-file-recursively bin)
1800 (delete-file-recursively lib)
1801 #t)))))))
1802 (inputs
1803 `(("java-junit" ,java-junit)
1804 ,@(package-inputs ant/java8)))))
1805
1806(define-public clojure
1807 (let* ((remove-archives '(begin
1808 (for-each delete-file
1809 (find-files "." ".*\\.(jar|zip)"))
1810 #t))
1811 (submodule (lambda (prefix version hash)
1812 (origin
1813 (method url-fetch)
1814 (uri (string-append "https://github.com/clojure/"
1815 prefix version ".tar.gz"))
1816 (sha256 (base32 hash))
1817 (modules '((guix build utils)))
1818 (snippet remove-archives)))))
1819 (package
1820 (name "clojure")
1821 (version "1.9.0")
1822 (source
1823 (origin
1824 (method url-fetch)
1825 (uri
1826 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1827 version ".tar.gz"))
1828 (sha256
1829 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1830 (modules '((guix build utils)))
1831 (snippet remove-archives)))
1832 (build-system ant-build-system)
1833 (arguments
1834 `(#:modules ((guix build ant-build-system)
1835 (guix build utils)
1836 (ice-9 ftw)
1837 (ice-9 regex)
1838 (srfi srfi-1)
1839 (srfi srfi-26))
1840 #:test-target "test"
1841 #:phases
1842 (modify-phases %standard-phases
1843 (add-after 'unpack 'unpack-submodule-sources
1844 (lambda* (#:key inputs #:allow-other-keys)
1845 (for-each
1846 (lambda (name)
1847 (mkdir-p name)
1848 (with-directory-excursion name
1849 (invoke "tar"
1850 ;; Use xz for repacked tarball.
1851 "--xz"
1852 "--extract"
1853 "--verbose"
1854 "--file" (assoc-ref inputs name)
1855 "--strip-components=1"))
1856 (copy-recursively (string-append name "/src/main/clojure/")
1857 "src/clj/"))
1858 '("core-specs-alpha-src"
1859 "data-generators-src"
1860 "spec-alpha-src"
1861 "test-check-src"
1862 "test-generative-src"
1863 "tools-namespace-src"))
1864 #t))
1865 (add-after 'unpack 'fix-manifest-classpath
1866 (lambda _
1867 (substitute* "build.xml"
1868 (("<attribute name=\"Class-Path\" value=\".\"/>") ""))
1869 #t))
1870 ;; The javadoc target is not built by default.
1871 (add-after 'build 'build-doc
1872 (lambda _
1873 (invoke "ant" "javadoc")))
1874 ;; Needed since no install target is provided.
1875 (replace 'install
1876 (lambda* (#:key outputs #:allow-other-keys)
1877 (let ((java-dir (string-append (assoc-ref outputs "out")
1878 "/share/java/")))
1879 ;; Install versioned to avoid collisions.
1880 (install-file (string-append "clojure-" ,version ".jar")
1881 java-dir)
1882 #t)))
1883 ;; Needed since no install-doc target is provided.
1884 (add-after 'install 'install-doc
1885 (lambda* (#:key outputs #:allow-other-keys)
1886 (let ((doc-dir (string-append (assoc-ref outputs "out")
1887 "/share/doc/clojure-"
1888 ,version "/")))
1889 (copy-recursively "doc/clojure" doc-dir)
1890 (copy-recursively "target/javadoc/"
1891 (string-append doc-dir "javadoc/"))
1892 (for-each (cut install-file <> doc-dir)
1893 (filter (cut string-match
1894 ".*\\.(html|markdown|md|txt)"
1895 <>)
1896 (scandir "./")))
1897 #t))))))
1898 ;; The native-inputs below are needed to run the tests.
1899 (native-inputs
1900 `(("core-specs-alpha-src"
1901 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1902 "0.1.24"
1903 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1904 ("data-generators-src"
1905 ,(submodule "data.generators/archive/data.generators-"
1906 "0.1.2"
1907 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1908 ("spec-alpha-src"
1909 ,(submodule "spec.alpha/archive/spec.alpha-"
1910 "0.1.143"
1911 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1912 ("test-check-src"
1913 ,(submodule "test.check/archive/test.check-"
1914 "0.9.0"
1915 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1916 ("test-generative-src"
1917 ,(submodule "test.generative/archive/test.generative-"
1918 "0.5.2"
1919 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1920 ("tools-namespace-src"
1921 ,(submodule "tools.namespace/archive/tools.namespace-"
1922 "0.2.11"
1923 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1924 (home-page "https://clojure.org/")
1925 (synopsis "Lisp dialect running on the JVM")
1926 (description "Clojure is a dynamic, general-purpose programming language,
1927combining the approachability and interactive development of a scripting
1928language with an efficient and robust infrastructure for multithreaded
1929programming. Clojure is a compiled language, yet remains completely dynamic
1930– every feature supported by Clojure is supported at runtime. Clojure
1931provides easy access to the Java frameworks, with optional type hints and type
1932inference, to ensure that calls to Java can avoid reflection.
1933
1934Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1935and a powerful macro system. Clojure is predominantly a functional programming
1936language, and features a rich set of immutable, persistent data structures.
1937When mutable state is needed, Clojure offers a software transactional memory
1938system and reactive Agent system that ensure clean, correct, multithreaded
1939designs.")
1940 ;; Clojure is licensed under EPL1.0
1941 ;; ASM bytecode manipulation library is licensed under BSD-3
1942 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1943 ;; src/clj/repl.clj is licensed under CPL1.0
1944 ;;
1945 ;; See readme.html or readme.txt for details.
1946 (license (list license:epl1.0
1947 license:bsd-3
1948 license:asl2.0
1949 license:cpl1.0)))))
1950
1951(define-public javacc-4
1952 (package
1953 (name "javacc")
1954 (version "4.1")
1955 (source (origin
1956 (method git-fetch)
1957 (uri (git-reference
1958 (url "https://github.com/javacc/javacc.git")
1959 (commit "release_41")))
1960 (file-name (string-append "javacc-" version "-checkout"))
1961 (sha256
1962 (base32
1963 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
1964 (modules '((guix build utils)))
1965 ;; delete bundled jars
1966 (snippet '(begin (delete-file-recursively "lib") #t))))
1967 (build-system ant-build-system)
1968 ;; Tests fail with
1969 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
1970 ;; JAVACODE failed
1971 (arguments
1972 `(#:tests? #f
1973 #:phases
1974 (modify-phases %standard-phases
1975 ;; Delete tests to avoid build failure (we don't run them anyway).
1976 (add-after 'unpack 'delete-tests
1977 (lambda _
1978 (for-each delete-file
1979 '("src/org/javacc/JavaCCTestCase.java"
1980 "src/org/javacc/parser/ExpansionTest.java"
1981 "src/org/javacc/parser/OptionsTest.java"
1982 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
1983 (for-each delete-file-recursively
1984 '("src/org/javacc/parser/test"
1985 "src/org/javacc/jjdoc/test"))
1986 #t))
1987 (replace 'install (install-jars "bin/lib")))))
1988 (home-page "https://javacc.org/")
1989 (synopsis "Java parser generator")
1990 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1991generator for use with Java applications. A parser generator is a tool that
1992reads a grammar specification and converts it to a Java program that can
1993recognize matches to the grammar. In addition to the parser generator itself,
1994JavaCC provides other standard capabilities related to parser generation such
1995as tree building (via a tool called JJTree included with JavaCC), actions,
1996debugging, etc.")
1997 (license license:bsd-3)))
1998
1999(define-public javacc
2000 (package
2001 (inherit javacc-4)
2002 (version "7.0.3")
2003 (source (origin
2004 (method url-fetch)
2005 (uri (string-append "https://github.com/javacc/javacc/"
2006 "archive/" version ".tar.gz"))
2007 (file-name (string-append "javacc-" version ".tar.gz"))
2008 (sha256
2009 (base32
2010 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))
2011 (modules '((guix build utils)))
2012 ;; delete bundled jars
2013 (snippet '(begin (for-each delete-file-recursively
2014 '("bootstrap" "lib"))
2015 #t))))
2016 (arguments
2017 `(#:make-flags ; bootstrap from javacc-4
2018 (list (string-append "-Dbootstrap-jar="
2019 (assoc-ref %build-inputs "javacc")
2020 "/share/java/javacc.jar"))
2021 #:test-target "test"
2022 #:phases
2023 (modify-phases %standard-phases
2024 (replace 'install (install-jars "target")))))
2025 (native-inputs
2026 `(("javacc" ,javacc-4)))))
2027
2028;; This is the last 3.x release of ECJ
2029(define-public java-ecj-3
2030 (package
2031 (name "java-ecj")
2032 (version "3.8.2")
2033 (source (origin
2034 (method url-fetch)
2035 (uri (string-append "http://archive.eclipse.org/eclipse/"
2036 "downloads/drops/R-" version
2037 "-201301310800/ecjsrc-" version ".jar"))
2038 (sha256
2039 (base32
2040 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2041 (build-system ant-build-system)
2042 (arguments
2043 `(#:tests? #f ; none included
2044 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2045 #:make-flags (list "-f" "src/build.xml")
2046 #:build-target "build"
2047 #:phases
2048 (modify-phases %standard-phases
2049 (add-after 'unpack 'fix-manifest
2050 (lambda _
2051 ;; Record the main class to make ecj executable.
2052 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2053 (lambda (in out)
2054 (display "Manifest-Version: 1.0
2055Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2056 out)))
2057 #t))
2058 (replace 'install (install-jars ".")))))
2059 (home-page "https://eclipse.org")
2060 (synopsis "Eclipse Java development tools core batch compiler")
2061 (description "This package provides the Eclipse Java core batch compiler.")
2062 (license license:epl1.0)))
2063
2064;; This is needed for java-cisd-args4j
2065(define-public java-ecj-3.5
2066 (package (inherit java-ecj-3)
2067 (version "3.5.1")
2068 (source (origin
2069 (method url-fetch/zipbomb)
2070 (uri (string-append "http://archive.eclipse.org/eclipse/"
2071 "downloads/drops/R-" version
2072 "-200909170800/ecjsrc-" version ".zip"))
2073 (sha256
2074 (base32
2075 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2076 (build-system ant-build-system)
2077 (arguments
2078 `(#:tests? #f ; none included
2079 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2080 #:build-target "build"
2081 #:phases
2082 (modify-phases %standard-phases
2083 (add-after 'unpack 'fix-manifest
2084 (lambda _
2085 ;; Record the main class to make ecj executable.
2086 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2087 (lambda (in out)
2088 (dump-port in out)
2089 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2090 out)))
2091 #t))
2092 (replace 'install (install-jars ".")))))
2093 (native-inputs
2094 `(("unzip" ,unzip)))))
2095
2096(define-public java-cisd-base
2097 (let ((revision 38938)
2098 (base-version "14.12.0"))
2099 (package
2100 (name "java-cisd-base")
2101 (version (string-append base-version "-" (number->string revision)))
2102 (source (origin
2103 (method svn-fetch)
2104 (uri (svn-reference
2105 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2106 "base/tags/release/"
2107 (version-major+minor base-version)
2108 ".x/" base-version "/base/"))
2109 (revision revision)))
2110 (file-name (string-append "java-cisd-base-" version "-checkout"))
2111 (sha256
2112 (base32
2113 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2114 (modules '((guix build utils)))
2115 (snippet
2116 '(begin
2117 ;; Delete included gradle jar
2118 (delete-file-recursively "gradle/wrapper")
2119 ;; Delete pre-built native libraries
2120 (delete-file-recursively "libs")
2121 #t))))
2122 (build-system ant-build-system)
2123 (arguments
2124 `(#:make-flags '("-file" "build/build.xml")
2125 #:test-target "jar-test"
2126 #:jdk ,icedtea-8
2127 #:phases
2128 (modify-phases %standard-phases
2129 (add-after 'unpack 'unpack-build-resources
2130 (lambda* (#:key inputs #:allow-other-keys)
2131 (copy-recursively (assoc-ref inputs "build-resources")
2132 "../build_resources")
2133 #t))
2134 (add-after 'unpack-build-resources 'fix-dependencies
2135 (lambda* (#:key inputs #:allow-other-keys)
2136 (substitute* "build/build.xml"
2137 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2138 (string-append (assoc-ref inputs "java-testng")
2139 "/share/java/java-testng.jar"))
2140 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2141 (string-append (assoc-ref inputs "java-commons-lang")
2142 "/share/java/commons-lang-"
2143 ,(package-version java-commons-lang) ".jar"))
2144 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2145 (string-append (assoc-ref inputs "java-commons-io")
2146 "/share/java/commons-io-"
2147 ,(package-version java-commons-io)
2148 "-SNAPSHOT.jar"))
2149 ;; Remove dependency on svn
2150 (("<build-info.*") "")
2151 (("\\$\\{revision.number\\}")
2152 ,(number->string revision))
2153 (("\\$\\{version.number\\}") ,base-version))
2154 ;; Remove dependency on classycle
2155 (substitute* "../build_resources/ant/build-common.xml"
2156 (("<taskdef name=\"dependency-checker.*") "")
2157 (("classname=\"classycle.*") "")
2158 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2159 #t))
2160 ;; A few tests fail because of the lack of a proper /etc/groups and
2161 ;; /etc/passwd file in the build container.
2162 (add-after 'unpack 'disable-broken-tests
2163 (lambda _
2164 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2165 (("Unix.isOperational\\(\\)") "false"))
2166 #t))
2167 ;; These decorators are almost useless and pull in an unpackaged
2168 ;; dependency.
2169 (add-after 'unpack 'remove-useless-decorators
2170 (lambda _
2171 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2172 (("@Private") "")
2173 (("import ch.rinn.restrictions.Private;") ""))
2174 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2175 (("@Friend.*") "")
2176 (("import ch.rinn.restrictions.Friend;") ""))
2177 #t))
2178 (add-before 'configure 'build-native-code
2179 (lambda* (#:key inputs #:allow-other-keys)
2180 (let ((jdk (assoc-ref inputs "jdk"))
2181 (dir ,(match (%current-system)
2182 ("i686-linux"
2183 "i386-Linux")
2184 ((or "armhf-linux" "aarch64-linux")
2185 "arm-Linux")
2186 ((or "x86_64-linux")
2187 "amd64-Linux")
2188 (_ "unknown-Linux"))))
2189 (with-directory-excursion "source/c"
2190 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2191 (string-append "-I" jdk "/include")
2192 (string-append "-I" jdk "/include/linux")
2193 "-o" "libunix.so")
2194 (invoke "gcc" "-shared" "-O3" "-fPIC"
2195 "-DMACHINE_BYTE_ORDER=1"
2196 "copyCommon.c"
2197 "copyByteChar.c"
2198 "copyByteDouble.c"
2199 "copyByteFloat.c"
2200 "copyByteInt.c"
2201 "copyByteLong.c"
2202 "copyByteShort.c"
2203 (string-append "-I" jdk "/include")
2204 (string-append "-I" jdk "/include/linux")
2205 "-o" "libnativedata.so"))
2206 (install-file "source/c/libunix.so"
2207 (string-append "libs/native/unix/" dir))
2208 (install-file "source/c/libnativedata.so"
2209 (string-append "libs/native/nativedata/" dir))
2210 #t)))
2211 ;; In the "check" phase we only build the test executable.
2212 (add-after 'check 'run-tests
2213 (lambda _
2214 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2215 (delete-file "targets/dist/sis-base-test.jar")
2216 #t))
2217 (replace 'install (install-jars "targets/dist")))))
2218 (native-inputs
2219 `(("jdk" ,icedtea-8)
2220 ("java-commons-lang" ,java-commons-lang)
2221 ("java-commons-io" ,java-commons-io)
2222 ("java-testng" ,java-testng)
2223 ("build-resources"
2224 ,(origin
2225 (method svn-fetch)
2226 (uri (svn-reference
2227 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2228 "base/tags/release/"
2229 (version-major+minor base-version)
2230 ".x/" base-version
2231 "/build_resources/"))
2232 (revision revision)))
2233 (sha256
2234 (base32
2235 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2236 (home-page "http://svnsis.ethz.ch")
2237 (synopsis "Utility classes for libraries from ETH Zurich")
2238 (description "This library supplies some utility classes needed for
2239libraries from the SIS division at ETH Zurich like jHDF5.")
2240 ;; The C sources are under a non-copyleft license, which looks like a
2241 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2242 (license (list license:asl2.0
2243 (license:non-copyleft "file://source/c/COPYING"))))))
2244
2245(define-public java-cisd-args4j
2246 (let ((revision 39162)
2247 (base-version "9.11.2"))
2248 (package
2249 (name "java-cisd-args4j")
2250 (version (string-append base-version "-" (number->string revision)))
2251 (source (origin
2252 (method svn-fetch)
2253 (uri (svn-reference
2254 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2255 "args4j/tags/release/"
2256 (version-major+minor base-version)
2257 ".x/" base-version "/args4j/"))
2258 (revision revision)))
2259 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2260 (sha256
2261 (base32
2262 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2263 (build-system ant-build-system)
2264 (arguments
2265 `(#:make-flags '("-file" "build/build.xml")
2266 #:tests? #f ; there are no tests
2267 ;; There are weird build failures with JDK8, such as: "The type
2268 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2269 ;; referenced from required .class files"
2270 #:jdk ,icedtea-7
2271 #:modules ((guix build ant-build-system)
2272 (guix build utils)
2273 (guix build java-utils)
2274 (sxml simple)
2275 (sxml transform)
2276 (sxml xpath))
2277 #:phases
2278 (modify-phases %standard-phases
2279 (add-after 'unpack 'unpack-build-resources
2280 (lambda* (#:key inputs #:allow-other-keys)
2281 (mkdir-p "../build_resources")
2282 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2283 "-C" "../build_resources"
2284 "--strip-components=1")
2285 (mkdir-p "../build_resources/lib")
2286 #t))
2287 (add-after 'unpack-build-resources 'fix-dependencies
2288 (lambda* (#:key inputs #:allow-other-keys)
2289 ;; FIXME: There should be a more convenient abstraction for
2290 ;; editing XML files.
2291 (with-directory-excursion "../build_resources/ant/"
2292 (chmod "build-common.xml" #o664)
2293 (call-with-output-file "build-common.xml.new"
2294 (lambda (port)
2295 (sxml->xml
2296 (pre-post-order
2297 (with-input-from-file "build-common.xml"
2298 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2299 `(;; Remove dependency on classycle and custom ant tasks
2300 (taskdef . ,(lambda (tag . kids)
2301 (let ((name ((sxpath '(name *text*)) kids)))
2302 (if (or (member "build-info" name)
2303 (member "dependency-checker" name)
2304 (member "build-java-subprojects" name)
2305 (member "project-classpath" name))
2306 '() ; skip
2307 `(,tag ,@kids)))))
2308 (typedef . ,(lambda (tag . kids)
2309 (let ((name ((sxpath '(name *text*)) kids)))
2310 (if (member "recursive-jar" name)
2311 '() ; skip
2312 `(,tag ,@kids)))))
2313 (build-java-subprojects . ,(lambda _ '()))
2314 ;; Ignore everything else
2315 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2316 (*text* . ,(lambda (_ txt) txt))))
2317 port)))
2318 (rename-file "build-common.xml.new" "build-common.xml"))
2319 (substitute* "build/build.xml"
2320 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2321 (string-append (assoc-ref inputs "java-cisd-base")
2322 "/share/java/sis-base.jar"))
2323 ;; Remove dependency on svn
2324 (("<build-info.*") "")
2325 (("\\$\\{revision.number\\}")
2326 ,(number->string revision))
2327 (("\\$\\{version.number\\}") ,base-version)
2328 ;; Don't use custom ant tasks.
2329 (("recursive-jar") "jar")
2330 (("<project-classpath.*") ""))
2331 #t))
2332 (replace 'install (install-jars "targets/dist")))))
2333 (inputs
2334 `(("java-cisd-base" ,java-cisd-base)))
2335 (native-inputs
2336 `(("ecj" ,java-ecj-3.5)
2337 ("build-resources"
2338 ,(origin
2339 (method svn-fetch)
2340 (uri (svn-reference
2341 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2342 "args4j/tags/release/"
2343 (version-major+minor base-version)
2344 ".x/" base-version
2345 "/build_resources/"))
2346 (revision revision)))
2347 (sha256
2348 (base32
2349 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2350 (modules '((guix build utils)))
2351 ;; Delete bundled pre-built jars.
2352 (snippet
2353 '(begin (delete-file-recursively "lib/") #t))))))
2354 (home-page "http://svnsis.ethz.ch")
2355 (synopsis "Command line parser library")
2356 (description "This package provides a parser for command line arguments.")
2357 (license license:asl2.0))))
2358
2359(define-public java-cisd-jhdf5
2360 (let ((revision 39162)
2361 (base-version "14.12.6"))
2362 (package
2363 (name "java-cisd-jhdf5")
2364 (version (string-append base-version "-" (number->string revision)))
2365 (source (origin
2366 (method svn-fetch)
2367 (uri (svn-reference
2368 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2369 "jhdf5/tags/release/"
2370 (version-major+minor base-version)
2371 ".x/" base-version "/jhdf5/"))
2372 (revision revision)))
2373 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2374 (sha256
2375 (base32
2376 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2377 (modules '((guix build utils)))
2378 (snippet
2379 '(begin
2380 ;; Delete included gradle jar
2381 (delete-file-recursively "gradle/wrapper")
2382 ;; Delete pre-built native libraries
2383 (delete-file-recursively "libs")
2384 #t))))
2385 (build-system ant-build-system)
2386 (arguments
2387 `(#:make-flags '("-file" "build/build.xml")
2388 #:build-target "jar-all"
2389 #:test-target "jar-test"
2390 #:jdk ,icedtea-8
2391 #:phases
2392 (modify-phases %standard-phases
2393 ;; FIXME: this build phase fails.
2394 (delete 'generate-jar-indices)
2395 ;; Don't erase results from the build phase when building tests.
2396 (add-after 'unpack 'separate-test-target-from-clean
2397 (lambda _
2398 (substitute* "build/build.xml"
2399 (("\"jar-test\" depends=\"clean, ")
2400 "\"jar-test\" depends=\""))
2401 #t))
2402 (add-after 'unpack 'unpack-build-resources
2403 (lambda* (#:key inputs #:allow-other-keys)
2404 (copy-recursively (assoc-ref inputs "build-resources")
2405 "../build_resources")
2406 (delete-file-recursively "../build_resources/lib/")
2407 (mkdir-p "../build_resources/lib")
2408 ;; Remove dependency on classycle
2409 (substitute* "../build_resources/ant/build-common.xml"
2410 (("<taskdef name=\"dependency-checker.*") "")
2411 (("classname=\"classycle.*") "")
2412 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2413 ;; Remove dependency on svn
2414 (substitute* "build/build.xml"
2415 (("<build-info.*") "")
2416 (("\\$\\{revision.number\\}")
2417 ,(number->string revision))
2418 (("\\$\\{version.number\\}") ,base-version))
2419 #t))
2420 (add-after 'unpack-build-resources 'fix-dependencies
2421 (lambda* (#:key inputs #:allow-other-keys)
2422 (substitute* "../build_resources/ant/build-common.xml"
2423 (("../libraries/testng/testng-jdk15.jar")
2424 (string-append (assoc-ref inputs "java-testng")
2425 "/share/java/java-testng.jar")))
2426 (substitute* "build/build.xml"
2427 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2428 (string-append (assoc-ref inputs "java-cisd-base")
2429 "/share/java/sis-base.jar"))
2430 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2431 (string-append (assoc-ref inputs "java-cisd-args4j")
2432 "/share/java/cisd-args4j.jar"))
2433 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2434 (string-append (assoc-ref inputs "java-commons-lang")
2435 "/share/java/commons-lang-"
2436 ,(package-version java-commons-lang) ".jar"))
2437 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2438 (string-append (assoc-ref inputs "java-commons-io")
2439 "/share/java/commons-io-"
2440 ,(package-version java-commons-io)
2441 "-SNAPSHOT.jar"))
2442 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2443 (string-append (assoc-ref inputs "java-testng")
2444 "/share/java/java-testng.jar"))
2445 (("\\$\\{lib\\}/junit4/junit.jar")
2446 (string-append (assoc-ref inputs "java-junit")
2447 "/share/java/junit.jar"))
2448 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2449 (string-append (assoc-ref inputs "java-hamcrest-core")
2450 "/share/java/hamcrest-core.jar")))
2451 ;; Remove dependency on ch.rinn.restrictions
2452 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2453 (substitute* '("BitSetConversionUtils.java"
2454 "HDF5Utils.java")
2455 (("import ch.rinn.restrictions.Private;") "")
2456 (("@Private") "")))
2457 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2458 (substitute* '("BitSetConversionTest.java"
2459 "h5ar/HDF5ArchiverTest.java")
2460 (("import ch.rinn.restrictions.Friend;") "")
2461 (("@Friend.*") ""))
2462 ;; Remove leftovers from removing @Friend
2463 (substitute* "h5ar/HDF5ArchiverTest.java"
2464 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2465 "")))
2466 #t))
2467 (add-before 'configure 'build-native-library
2468 (lambda* (#:key inputs #:allow-other-keys)
2469 (let ((jdk (assoc-ref inputs "jdk"))
2470 (hdf5 (assoc-ref inputs "hdf5"))
2471 (dir ,(match (%current-system)
2472 ("i686-linux"
2473 "i386-Linux")
2474 ((or "armhf-linux" "aarch64-linux")
2475 "arm-Linux")
2476 ((or "x86_64-linux")
2477 "amd64-Linux")
2478 (_ "unknown-Linux"))))
2479 (with-directory-excursion "source/c"
2480 (apply invoke `("gcc" "-shared" "-O3"
2481 "-fPIC"
2482 "-Wl,--exclude-libs,ALL"
2483 ,@(find-files "jhdf5" "\\.c$")
2484 ,@(find-files "hdf-java" "\\.c$")
2485 ,(string-append "-I" hdf5 "/include")
2486 ,(string-append "-I" jdk "/include")
2487 ,(string-append "-I" jdk "/include/linux")
2488 ,(string-append hdf5 "/lib/libhdf5.a")
2489 "-o" "libjhdf5.so" "-lz")))
2490 (install-file "source/c/libjhdf5.so"
2491 (string-append "libs/native/jhdf5/" dir))
2492 #t)))
2493 ;; In the "check" phase we only build the test executable.
2494 (add-after 'check 'run-tests
2495 (lambda _
2496 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2497 (delete-file "targets/dist/sis-jhdf5-test.jar")
2498 #t))
2499 (replace 'install
2500 (install-jars "targets/dist")))))
2501 (inputs
2502 `(("java-cisd-base" ,java-cisd-base)
2503 ("java-cisd-args4j" ,java-cisd-args4j)
2504 ("java-commons-lang" ,java-commons-lang)
2505 ("java-commons-io" ,java-commons-io)
2506 ("hdf5" ,hdf5)
2507 ("zlib" ,zlib)))
2508 (native-inputs
2509 `(("jdk" ,icedtea-8)
2510 ("java-testng" ,java-testng)
2511 ("java-junit" ,java-junit)
2512 ("java-jmock" ,java-jmock)
2513 ("java-hamcrest-core" ,java-hamcrest-core)
2514 ("build-resources"
2515 ,(origin
2516 (method svn-fetch)
2517 (uri (svn-reference
2518 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2519 "jhdf5/tags/release/"
2520 (version-major+minor base-version)
2521 ".x/" base-version
2522 "/build_resources/"))
2523 (revision revision)))
2524 (sha256
2525 (base32
2526 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2527 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2528 (synopsis "Java binding for HDF5")
2529 (description "JHDF5 is a high-level API in Java for reading and writing
2530HDF5 files, building on the libraries provided by the HDF Group.")
2531 ;; The C sources are under a non-copyleft license, which looks like a
2532 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2533 (license (list license:asl2.0
2534 (license:non-copyleft "file://source/c/COPYING"))))))
2535
2536(define-public java-classpathx-servletapi
2537 (package
2538 (name "java-classpathx-servletapi")
2539 (version "3.0.1")
2540 (source (origin
2541 (method url-fetch)
2542 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2543 "servletapi-" version ".tar.gz"))
2544 (sha256
2545 (base32
2546 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2547 (build-system ant-build-system)
2548 (arguments
2549 `(#:tests? #f ; there is no test target
2550 #:build-target "compile"
2551 #:make-flags
2552 (list "-Dbuild.compiler=javac1.8"
2553 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2554 #:phases
2555 (modify-phases %standard-phases
2556 (replace 'install
2557 (lambda* (#:key make-flags #:allow-other-keys)
2558 (apply invoke `("ant" "dist" ,@make-flags)))))))
2559 (home-page "https://www.gnu.org/software/classpathx/")
2560 (synopsis "Java servlet API implementation")
2561 (description "This is the GNU servlet API distribution, part of the
2562ClasspathX project. It provides implementations of version 3.0 of the servlet
2563API and version 2.1 of the Java ServerPages API.")
2564 (license license:gpl3+)))
2565
2566(define-public java-javaee-servletapi
2567 (package
2568 (name "java-javaee-servletapi")
2569 (version "3.1.0")
2570 (source (origin
2571 (method url-fetch)
2572 (uri (string-append "https://github.com/javaee/servlet-spec/"
2573 "archive/" version ".zip"))
2574 (file-name (string-append name "-" version ".zip"))
2575 (sha256
2576 (base32
2577 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
2578 (build-system ant-build-system)
2579 (arguments
2580 `(#:jar-name "javax-servletapi.jar"
2581 ;; no tests
2582 #:tests? #f
2583 #:source-dir "src/main/java"))
2584 (native-inputs
2585 `(("unzip" ,unzip)))
2586 (home-page "https://javaee.github.io/servlet-spec/")
2587 (synopsis "Java servlet API")
2588 (description "Java Servlet is the foundation web specification in the
2589Java Enterprise Platform. Developers can build web applications using the
2590Servlet API to interact with the request/response workflow. This project
2591provides information on the continued development of the Java Servlet
2592specification.")
2593 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
2594 ;; Some files are licensed under ASL 2.0.
2595 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
2596
2597(define-public java-swt
2598 (package
2599 (name "java-swt")
2600 (version "4.7.1a")
2601 (source
2602 ;; The types of many variables and procedures differ in the sources
2603 ;; dependent on whether the target architecture is a 32-bit system or a
2604 ;; 64-bit system. Instead of patching the sources on demand in a build
2605 ;; phase we download either the 32-bit archive (which mostly uses "int"
2606 ;; types) or the 64-bit archive (which mostly uses "long" types).
2607 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2608 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2609 (file32 "x86")
2610 (file64 "x86_64"))
2611 (let-values (((hash file)
2612 (match (or (%current-target-system) (%current-system))
2613 ("x86_64-linux" (values hash64 file64))
2614 (_ (values hash32 file32)))))
2615 (origin
2616 (method url-fetch)
2617 (uri (string-append
2618 "http://download.eclipse.org/eclipse/downloads/drops4/"
2619 "R-" version "-201710090410/swt-" version
2620 "-gtk-linux-" file ".zip"))
2621 (sha256 (base32 hash))))))
2622 (build-system ant-build-system)
2623 (arguments
2624 `(#:jar-name "swt.jar"
2625 #:jdk ,icedtea-8
2626 #:tests? #f ; no "check" target
2627 #:phases
2628 (modify-phases %standard-phases
2629 (replace 'unpack
2630 (lambda* (#:key source #:allow-other-keys)
2631 (mkdir "swt")
2632 (invoke "unzip" source "-d" "swt")
2633 (chdir "swt")
2634 (mkdir "src")
2635 (invoke "unzip" "src.zip" "-d" "src")))
2636 ;; The classpath contains invalid icecat jars. Since we don't need
2637 ;; anything other than the JDK on the classpath, we can simply unset
2638 ;; it.
2639 (add-after 'configure 'unset-classpath
2640 (lambda _ (unsetenv "CLASSPATH") #t))
2641 (add-before 'build 'build-native
2642 (lambda* (#:key inputs outputs #:allow-other-keys)
2643 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2644 ;; Build shared libraries. Users of SWT have to set the system
2645 ;; property swt.library.path to the "lib" directory of this
2646 ;; package output.
2647 (mkdir-p lib)
2648 (setenv "OUTPUT_DIR" lib)
2649 (with-directory-excursion "src"
2650 (invoke "bash" "build.sh")))))
2651 (add-after 'install 'install-native
2652 (lambda* (#:key outputs #:allow-other-keys)
2653 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2654 (for-each (lambda (file)
2655 (install-file file lib))
2656 (find-files "." "\\.so$"))
2657 #t))))))
2658 (inputs
2659 `(("gtk" ,gtk+-2)
2660 ("libxtst" ,libxtst)
2661 ("libxt" ,libxt)
2662 ("mesa" ,mesa)
2663 ("glu" ,glu)))
2664 (native-inputs
2665 `(("pkg-config" ,pkg-config)
2666 ("unzip" ,unzip)))
2667 (home-page "https://www.eclipse.org/swt/")
2668 (synopsis "Widget toolkit for Java")
2669 (description
2670 "SWT is a widget toolkit for Java designed to provide efficient, portable
2671access to the user-interface facilities of the operating systems on which it
2672is implemented.")
2673 ;; SWT code is licensed under EPL1.0
2674 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2675 ;; Cairo bindings contain code under MPL1.1
2676 ;; XULRunner 1.9 bindings contain code under MPL2.0
2677 (license (list
2678 license:epl1.0
2679 license:mpl1.1
2680 license:mpl2.0
2681 license:lgpl2.1+))))
2682
2683(define-public java-xz
2684 (package
2685 (name "java-xz")
2686 (version "1.6")
2687 (source (origin
2688 (method url-fetch)
2689 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2690 (sha256
2691 (base32
2692 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2693 (build-system ant-build-system)
2694 (arguments
2695 `(#:tests? #f ; There are no tests to run.
2696 #:jar-name ,(string-append "xz-" version ".jar")
2697 #:phases
2698 (modify-phases %standard-phases
2699 ;; The unpack phase enters the "maven" directory by accident.
2700 (add-after 'unpack 'chdir
2701 (lambda _ (chdir "..") #t)))))
2702 (native-inputs
2703 `(("unzip" ,unzip)))
2704 (home-page "https://tukaani.org/xz/java.html")
2705 (synopsis "Implementation of XZ data compression in pure Java")
2706 (description "This library aims to be a complete implementation of XZ data
2707compression in pure Java. Single-threaded streamed compression and
2708decompression and random access decompression have been fully implemented.")
2709 (license license:public-domain)))
2710
2711;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2712;; of the latest release.
2713(define-public java-qdox-1.12
2714 (package
2715 (name "java-qdox")
2716 (version "1.12.1")
2717 (source (origin
2718 (method url-fetch)
2719 (uri (string-append "http://central.maven.org/maven2/"
2720 "com/thoughtworks/qdox/qdox/" version
2721 "/qdox-" version "-sources.jar"))
2722 (sha256
2723 (base32
2724 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2725 (build-system ant-build-system)
2726 (arguments
2727 `(;; Tests require junit
2728 #:tests? #f
2729 #:jar-name "qdox.jar"
2730 #:phases
2731 (modify-phases %standard-phases
2732 (replace 'unpack
2733 (lambda* (#:key source #:allow-other-keys)
2734 (mkdir "src")
2735 (with-directory-excursion "src"
2736 (invoke "jar" "-xf" source))))
2737 ;; At this point we don't have junit, so we must remove the API
2738 ;; tests.
2739 (add-after 'unpack 'delete-tests
2740 (lambda _
2741 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2742 #t)))))
2743 (home-page "http://qdox.codehaus.org/")
2744 (synopsis "Parse definitions from Java source files")
2745 (description
2746 "QDox is a high speed, small footprint parser for extracting
2747class/interface/method definitions from source files complete with JavaDoc
2748@code{@@tags}. It is designed to be used by active code generators or
2749documentation tools.")
2750 (license license:asl2.0)))
2751
2752(define-public java-jarjar
2753 (package
2754 (name "java-jarjar")
2755 (version "1.4")
2756 (source (origin
2757 (method url-fetch)
2758 (uri (string-append
2759 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2760 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2761 (sha256
2762 (base32
2763 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
2764 (modules '((guix build utils)))
2765 (snippet
2766 '(begin
2767 ;; Delete bundled thirds-party jar archives.
2768 ;; TODO: unbundle maven-plugin-api.
2769 (delete-file "lib/asm-4.0.jar")
2770 (delete-file "lib/asm-commons-4.0.jar")
2771 (delete-file "lib/junit-4.8.1.jar")
2772 #t))))
2773 (build-system ant-build-system)
2774 (arguments
2775 `(;; Tests require junit, which ultimately depends on this package.
2776 #:tests? #f
2777 #:build-target "jar"
2778 #:phases
2779 (modify-phases %standard-phases
2780 (add-before 'build 'do-not-use-bundled-asm
2781 (lambda* (#:key inputs #:allow-other-keys)
2782 (substitute* "build.xml"
2783 (("<path id=\"path.build\">")
2784 (string-append "<path id=\"path.build\"><fileset dir=\""
2785 (assoc-ref inputs "java-asm-bootstrap")
2786 "/share/java\" includes=\"**/*.jar\"/>"))
2787 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
2788 (("lib/asm-commons-4.0.jar")
2789 (string-append (assoc-ref inputs "java-asm-bootstrap")
2790 "/share/java/asm-6.0.jar"))
2791 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
2792 (string-append "<include name=\"org/objectweb/asm/"
2793 "commons/Remap*.class\"/>"
2794 "<include name=\"org/objectweb/asm/*.class\"/>"
2795 "<include name=\"org/objectweb/asm/"
2796 "signature/*.class\"/>"
2797 "<include name=\"org/objectweb/asm/"
2798 "commons/SignatureRemapper.class\"/>")))
2799 #t))
2800 (replace 'install
2801 (lambda* (#:key outputs #:allow-other-keys)
2802 (let ((target (string-append (assoc-ref outputs "out")
2803 "/share/java")))
2804 (install-file (string-append "dist/jarjar-" ,version ".jar")
2805 target))
2806 #t)))))
2807 (inputs
2808 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
2809 (native-inputs
2810 `(("unzip" ,unzip)))
2811 (home-page "https://code.google.com/archive/p/jarjar/")
2812 (synopsis "Repackage Java libraries")
2813 (description
2814 "Jar Jar Links is a utility that makes it easy to repackage Java
2815libraries and embed them into your own distribution. Jar Jar Links includes
2816an Ant task that extends the built-in @code{jar} task.")
2817 (license license:asl2.0)))
2818
2819(define-public java-hamcrest-core
2820 (package
2821 (name "java-hamcrest-core")
2822 (version "1.3")
2823 (source (origin
2824 (method url-fetch)
2825 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2826 "archive/hamcrest-java-" version ".tar.gz"))
2827 (sha256
2828 (base32
2829 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2830 (modules '((guix build utils)))
2831 (snippet
2832 '(begin
2833 ;; Delete bundled thirds-party jar archives.
2834 (delete-file-recursively "lib")
2835 #t))))
2836 (build-system ant-build-system)
2837 (arguments
2838 `(#:tests? #f ; Tests require junit
2839 #:modules ((guix build ant-build-system)
2840 (guix build utils)
2841 (srfi srfi-1))
2842 #:make-flags (list (string-append "-Dversion=" ,version))
2843 #:test-target "unit-test"
2844 #:build-target "core"
2845 #:phases
2846 (modify-phases %standard-phases
2847 ;; Disable unit tests, because they require junit, which requires
2848 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2849 ;; attribute from the manifest for reproducibility.
2850 (add-before 'configure 'patch-build.xml
2851 (lambda _
2852 (substitute* "build.xml"
2853 (("unit-test, ") "")
2854 (("\\$\\{build.timestamp\\}") "guix"))
2855 #t))
2856 ;; Java's "getMethods()" returns methods in an unpredictable order.
2857 ;; To make the output of the generated code deterministic we must
2858 ;; sort the array of methods.
2859 (add-after 'unpack 'make-method-order-deterministic
2860 (lambda _
2861 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2862 (("import java\\.util\\.Iterator;" line)
2863 (string-append line "\n"
2864 "import java.util.Arrays; import java.util.Comparator;"))
2865 (("allMethods = cls\\.getMethods\\(\\);" line)
2866 (string-append "_" line
2867 "
2868private Method[] getSortedMethods() {
2869 Arrays.sort(_allMethods, new Comparator<Method>() {
2870 @Override
2871 public int compare(Method a, Method b) {
2872 return a.toString().compareTo(b.toString());
2873 }
2874 });
2875 return _allMethods;
2876}
2877
2878private Method[] allMethods = getSortedMethods();")))
2879 #t))
2880 (add-before 'build 'do-not-use-bundled-qdox
2881 (lambda* (#:key inputs #:allow-other-keys)
2882 (substitute* "build.xml"
2883 (("lib/generator/qdox-1.12.jar")
2884 (string-append (assoc-ref inputs "java-qdox-1.12")
2885 "/share/java/qdox.jar")))
2886 #t))
2887 ;; build.xml searches for .jar files in this directoy, which
2888 ;; we remove from the source archive.
2889 (add-before 'build 'create-dummy-directories
2890 (lambda _
2891 (mkdir-p "lib/integration")
2892 #t))
2893 (replace 'install
2894 (lambda* (#:key outputs #:allow-other-keys)
2895 (let* ((target (string-append (assoc-ref outputs "out")
2896 "/share/java/"))
2897 (version-suffix ,(string-append "-" version ".jar"))
2898 (install-without-version-suffix
2899 (lambda (jar)
2900 (copy-file jar
2901 (string-append target
2902 (basename jar version-suffix)
2903 ".jar")))))
2904 (mkdir-p target)
2905 (for-each
2906 install-without-version-suffix
2907 (find-files "build"
2908 (lambda (name _)
2909 (and (string-suffix? ".jar" name)
2910 (not (string-suffix? "-sources.jar" name)))))))
2911 #t)))))
2912 (native-inputs
2913 `(("java-qdox-1.12" ,java-qdox-1.12)
2914 ("java-jarjar" ,java-jarjar)))
2915 (home-page "http://hamcrest.org/")
2916 (synopsis "Library of matchers for building test expressions")
2917 (description
2918 "This package provides a library of matcher objects (also known as
2919constraints or predicates) allowing @code{match} rules to be defined
2920declaratively, to be used in other frameworks. Typical scenarios include
2921testing frameworks, mocking libraries and UI validation rules.")
2922 (license license:bsd-2)))
2923
2924(define-public java-junit
2925 (package
2926 (name "java-junit")
2927 (version "4.12")
2928 (source (origin
2929 (method url-fetch)
2930 (uri (string-append "https://github.com/junit-team/junit/"
2931 "archive/r" version ".tar.gz"))
2932 (file-name (string-append name "-" version ".tar.gz"))
2933 (sha256
2934 (base32
2935 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2936 (modules '((guix build utils)))
2937 (snippet
2938 '(begin
2939 ;; Delete bundled jar archives.
2940 (delete-file-recursively "lib")
2941 #t))))
2942 (build-system ant-build-system)
2943 (arguments
2944 `(#:tests? #f ; no tests
2945 #:jar-name "junit.jar"))
2946 (inputs
2947 `(("java-hamcrest-core" ,java-hamcrest-core)))
2948 (home-page "http://junit.org/")
2949 (synopsis "Test framework for Java")
2950 (description
2951 "JUnit is a simple framework to write repeatable tests for Java projects.
2952JUnit provides assertions for testing expected results, test fixtures for
2953sharing common test data, and test runners for running tests.")
2954 (license license:epl1.0)))
2955
2956(define-public java-plexus-utils
2957 (package
2958 (name "java-plexus-utils")
2959 (version "3.0.24")
2960 (source (origin
2961 (method url-fetch)
2962 (uri (string-append "https://github.com/codehaus-plexus/"
2963 "plexus-utils/archive/plexus-utils-"
2964 version ".tar.gz"))
2965 (sha256
2966 (base32
2967 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2968 (build-system ant-build-system)
2969 ;; FIXME: The default build.xml does not include a target to install
2970 ;; javadoc files.
2971 (arguments
2972 `(#:jar-name "plexus-utils.jar"
2973 #:source-dir "src/main"
2974 #:phases
2975 (modify-phases %standard-phases
2976 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2977 (lambda _
2978 (substitute* "src/main/java/org/codehaus/plexus/util/\
2979cli/shell/BourneShell.java"
2980 (("/bin/sh") (which "sh"))
2981 (("/usr/") (getcwd)))
2982 #t))
2983 (add-after 'unpack 'fix-or-disable-broken-tests
2984 (lambda _
2985 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2986 (substitute* '("cli/CommandlineTest.java"
2987 "cli/shell/BourneShellTest.java")
2988 (("/bin/sh") (which "sh"))
2989 (("/bin/echo") (which "echo")))
2990
2991 ;; This test depends on MavenProjectStub, but we don't have
2992 ;; a package for Maven.
2993 (delete-file "introspection/ReflectionValueExtractorTest.java")
2994
2995 ;; FIXME: The command line tests fail, maybe because they use
2996 ;; absolute paths.
2997 (delete-file "cli/CommandlineTest.java"))
2998 #t)))))
2999 (native-inputs
3000 `(("java-junit" ,java-junit)))
3001 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3002 (synopsis "Common utilities for the Plexus framework")
3003 (description "This package provides various Java utility classes for the
3004Plexus framework to ease working with strings, files, command lines, XML and
3005more.")
3006 (license license:asl2.0)))
3007
3008(define-public java-plexus-interpolation
3009 (package
3010 (name "java-plexus-interpolation")
3011 (version "1.23")
3012 (source (origin
3013 (method url-fetch)
3014 (uri (string-append "https://github.com/codehaus-plexus/"
3015 "plexus-interpolation/archive/"
3016 "plexus-interpolation-" version ".tar.gz"))
3017 (sha256
3018 (base32
3019 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3020 (build-system ant-build-system)
3021 (arguments
3022 `(#:jar-name "plexus-interpolation.jar"
3023 #:source-dir "src/main"))
3024 (native-inputs
3025 `(("java-junit" ,java-junit)
3026 ("java-hamcrest-core" ,java-hamcrest-core)))
3027 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3028 (synopsis "Java components for interpolating ${} strings and the like")
3029 (description "Plexus interpolator is a modular, flexible interpolation
3030framework for the expression language style commonly seen in Maven, Plexus,
3031and other related projects.
3032
3033It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3034package within @code{plexus-utils}, but has been separated in order to allow
3035these two libraries to vary independently of one another.")
3036 (license license:asl2.0)))
3037
3038(define-public java-plexus-classworlds
3039 (package
3040 (name "java-plexus-classworlds")
3041 (version "2.5.2")
3042 (source (origin
3043 (method url-fetch)
3044 (uri (string-append "https://github.com/codehaus-plexus/"
3045 "plexus-classworlds/archive/plexus-classworlds-"
3046 version ".tar.gz"))
3047 (sha256
3048 (base32
3049 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3050 (build-system ant-build-system)
3051 (arguments
3052 `(#:jar-name "plexus-classworlds.jar"
3053 #:source-dir "src/main"
3054 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3055 (native-inputs
3056 `(("java-junit" ,java-junit)))
3057 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3058 (synopsis "Java class loader framework")
3059 (description "Plexus classworlds replaces the native @code{ClassLoader}
3060mechanism of Java. It is especially useful for dynamic loading of application
3061components.")
3062 (license license:asl2.0)))
3063
3064(define java-plexus-container-default-bootstrap
3065 (package
3066 (name "java-plexus-container-default-bootstrap")
3067 (version "1.7.1")
3068 (source (origin
3069 (method url-fetch)
3070 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3071 "/archive/plexus-containers-" version ".tar.gz"))
3072 (sha256
3073 (base32
3074 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3075 (build-system ant-build-system)
3076 (arguments
3077 `(#:jar-name "container-default.jar"
3078 #:source-dir "plexus-container-default/src/main/java"
3079 #:test-dir "plexus-container-default/src/test"
3080 #:jdk ,icedtea-8
3081 #:tests? #f; requires plexus-archiver, which depends on this package
3082 #:phases
3083 (modify-phases %standard-phases
3084 (add-before 'build 'copy-resources
3085 (lambda _
3086 (copy-recursively
3087 "plexus-container-default/src/main/resources/"
3088 "build/classes")
3089 #t)))))
3090 (inputs
3091 `(("worldclass" ,java-plexus-classworlds)
3092 ("xbean" ,java-geronimo-xbean-reflect)
3093 ("utils" ,java-plexus-utils)
3094 ("junit" ,java-junit)
3095 ("guava" ,java-guava)))
3096 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3097 (synopsis "Inversion-of-control container")
3098 (description "Plexus-default-container is Plexus' inversion-of-control
3099(@dfn{IoC}) container. It is composed of its public API and its default
3100implementation.")
3101 (license license:asl2.0)))
3102
3103(define-public java-plexus-io
3104 (package
3105 (name "java-plexus-io")
3106 (version "3.0.0")
3107 (source (origin
3108 (method url-fetch)
3109 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3110 "/archive/plexus-io-" version ".tar.gz"))
3111 (sha256
3112 (base32
3113 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3114 (build-system ant-build-system)
3115 (arguments
3116 `(#:jar-name "plexus-io.jar"
3117 #:source-dir "src/main/java"
3118 #:test-dir "src/test"
3119 #:jdk ,icedtea-8
3120 #:phases
3121 (modify-phases %standard-phases
3122 (add-before 'build 'copy-resources
3123 (lambda _
3124 (mkdir-p "build/classes/META-INF/plexus")
3125 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3126 "build/classes/META-INF/plexus/components.xml")
3127 #t)))))
3128 (inputs
3129 `(("utils" ,java-plexus-utils)
3130 ("commons-io" ,java-commons-io)
3131 ("java-jsr305" ,java-jsr305)))
3132 (native-inputs
3133 `(("junit" ,java-junit)
3134 ("hamcrest" ,java-hamcrest-core)
3135 ("guava" ,java-guava)
3136 ("classworlds" ,java-plexus-classworlds)
3137 ("xbean" ,java-geronimo-xbean-reflect)
3138 ("container-default" ,java-plexus-container-default-bootstrap)))
3139 (home-page "https://github.com/codehaus-plexus/plexus-io")
3140 (synopsis "I/O plexus components")
3141 (description "Plexus IO is a set of plexus components, which are designed
3142for use in I/O operations. This implementation using plexus components allows
3143reusing it in maven.")
3144 (license license:asl2.0)))
3145
3146(define-public java-plexus-archiver
3147 (package
3148 (name "java-plexus-archiver")
3149 (version "3.5")
3150 (source (origin
3151 (method url-fetch)
3152 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3153 "/archive/plexus-archiver-" version ".tar.gz"))
3154 (sha256
3155 (base32
3156 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
3157 (build-system ant-build-system)
3158 (arguments
3159 `(#:jar-name "plexus-archiver.jar"
3160 #:source-dir "src/main/java"
3161 #:jdk ,icedtea-8
3162 #:test-dir "src/test"
3163 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3164 #:phases
3165 (modify-phases %standard-phases
3166 (add-before 'check 'remove-failing
3167 (lambda _
3168 ;; Requires an older version of plexus container
3169 (delete-file
3170 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3171 #t))
3172 (add-before 'build 'copy-resources
3173 (lambda _
3174 (mkdir-p "build/classes/META-INF/plexus")
3175 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3176 "build/classes/META-INF/plexus/components.xml")
3177 #t)))))
3178 (inputs
3179 `(("utils" ,java-plexus-utils)
3180 ("commons-io" ,java-commons-io)
3181 ("snappy" ,java-iq80-snappy)
3182 ("io" ,java-plexus-io)
3183 ("compress" ,java-commons-compress)
3184 ("container-default" ,java-plexus-container-default-bootstrap)
3185 ("snappy" ,java-snappy)
3186 ("java-jsr305" ,java-jsr305)))
3187 (native-inputs
3188 `(("junit" ,java-junit)
3189 ("classworld" ,java-plexus-classworlds)
3190 ("xbean" ,java-geronimo-xbean-reflect)
3191 ("xz" ,java-tukaani-xz)
3192 ("guava" ,java-guava)))
3193 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3194 (synopsis "Archiver component of the Plexus project")
3195 (description "Plexus-archiver contains a component to deal with project
3196archives (jar).")
3197 (license license:asl2.0)))
3198
3199(define-public java-plexus-container-default
3200 (package
3201 (inherit java-plexus-container-default-bootstrap)
3202 (name "java-plexus-container-default")
3203 (arguments
3204 `(#:jar-name "container-default.jar"
3205 #:source-dir "plexus-container-default/src/main/java"
3206 #:test-dir "plexus-container-default/src/test"
3207 #:test-exclude (list ;"**/*Test.java"
3208 "**/Abstract*.java"
3209 ;; Requires plexus-hierarchy
3210 "**/PlexusHierarchyTest.java"
3211 ;; Failures
3212 "**/ComponentRealmCompositionTest.java"
3213 "**/PlexusContainerTest.java")
3214 #:jdk ,icedtea-8
3215 #:phases
3216 (modify-phases %standard-phases
3217 (add-before 'build 'copy-resources
3218 (lambda _
3219 (copy-recursively
3220 "plexus-container-default/src/main/resources/"
3221 "build/classes")
3222 #t))
3223 (add-before 'check 'fix-paths
3224 (lambda _
3225 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3226 (substitute*
3227 (string-append
3228 dir "/plexus/component/composition/"
3229 "ComponentRealmCompositionTest.java")
3230 (("src/test") "plexus-container-default/src/test"))
3231 #t))))))
3232 (inputs
3233 `(("worldclass" ,java-plexus-classworlds)
3234 ("xbean" ,java-geronimo-xbean-reflect)
3235 ("utils" ,java-plexus-utils)
3236 ("junit" ,java-junit)
3237 ("guava" ,java-guava)))
3238 (native-inputs
3239 `(("archiver" ,java-plexus-archiver)
3240 ("hamcrest" ,java-hamcrest-core)))))
3241
3242(define-public java-plexus-component-annotations
3243 (package
3244 (inherit java-plexus-container-default)
3245 (name "java-plexus-component-annotations")
3246 (arguments
3247 `(#:jar-name "plexus-component-annotations.jar"
3248 #:source-dir "plexus-component-annotations/src/main/java"
3249 #:tests? #f)); no tests
3250 (inputs '())
3251 (native-inputs '())
3252 (synopsis "Plexus descriptors generator")
3253 (description "This package is a Maven plugin to generate Plexus descriptors
3254from source tags and class annotations.")))
3255
3256(define-public java-plexus-cipher
3257 (package
3258 (name "java-plexus-cipher")
3259 (version "1.7")
3260 (source (origin
3261 (method url-fetch)
3262 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3263 "/archive/plexus-cipher-" version ".tar.gz"))
3264 (sha256
3265 (base32
3266 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3267 (build-system ant-build-system)
3268 (arguments
3269 `(#:jar-name "plexus-cipher.jar"
3270 #:source-dir "src/main/java"
3271 #:jdk ,icedtea-8
3272 #:tests? #f; FIXME: requires sisu-inject-bean
3273 #:phases
3274 (modify-phases %standard-phases
3275 (add-before 'build 'copy-resources
3276 (lambda _
3277 (copy-recursively "src/main/resources" "build/classes")
3278 (mkdir-p "build/classes/META-INF/sisu")
3279 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3280 (lambda _
3281 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3282 #t)))))
3283 (inputs
3284 `(("java-cdi-api" ,java-cdi-api)
3285 ("java-javax-inject" ,java-javax-inject)))
3286 (home-page "https://github.com/sonatype/plexus-cipher")
3287 (synopsis "Encryption/decryption Component")
3288 (description "Plexus-cipher contains a component to deal with encryption
3289and decryption.")
3290 (license license:asl2.0)))
3291
3292(define-public java-plexus-compiler-api
3293 (package
3294 (name "java-plexus-compiler-api")
3295 (version "2.8.4")
3296 (source (origin
3297 (method url-fetch)
3298 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3299 "/archive/plexus-compiler-" version ".tar.gz"))
3300 (sha256
3301 (base32
3302 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3303 (build-system ant-build-system)
3304 (arguments
3305 `(#:jar-name "plexus-compiler-api.jar"
3306 #:source-dir "plexus-compiler-api/src/main/java"
3307 #:jdk ,icedtea-8
3308 #:test-dir "plexus-compiler-api/src/test"))
3309 (inputs
3310 `(("java-plexus-container-default" ,java-plexus-container-default)
3311 ("java-plexus-util" ,java-plexus-utils)))
3312 (native-inputs
3313 `(("java-junit" ,java-junit)))
3314 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3315 (synopsis "Plexus Compilers component's API to manipulate compilers")
3316 (description "This package contains the API used by components to manipulate
3317compilers.")
3318 (license (list license:asl2.0
3319 license:expat))))
3320
3321(define-public java-plexus-compiler-javac
3322 (package
3323 (inherit java-plexus-compiler-api)
3324 (name "java-plexus-compiler-javac")
3325 (arguments
3326 `(#:jar-name "plexus-compiler-javac.jar"
3327 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3328 #:jdk ,icedtea-8
3329 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3330 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3331 (inputs
3332 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3333 ("java-plexus-utils" ,java-plexus-utils)
3334 ("java-plexus-container-default" ,java-plexus-container-default)))
3335 (native-inputs
3336 `(("java-junit" ,java-junit)))
3337 (synopsis "Javac Compiler support for Plexus Compiler component")
3338 (description "This package contains the Javac Compiler support for Plexus
3339Compiler component.")))
3340
3341(define-public java-plexus-sec-dispatcher
3342 (package
3343 (name "java-plexus-sec-dispatcher")
3344 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3345 (source (origin
3346 ;; This project doesn't tag releases or publish tarballs, so we take
3347 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3348 (method url-fetch)
3349 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3350 "archive/7db8f88048.tar.gz"))
3351 (sha256
3352 (base32
3353 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3354 (file-name (string-append name "-" version ".tar.gz"))))
3355 (arguments
3356 `(#:jar-name "plexus-sec-dispatcher.jar"
3357 #:source-dir "src/main/java"
3358 #:jdk ,icedtea-8
3359 #:phases
3360 (modify-phases %standard-phases
3361 (add-before 'build 'generate-models
3362 (lambda* (#:key inputs #:allow-other-keys)
3363 (define (modello-single-mode file version mode)
3364 (invoke "java"
3365 "org.codehaus.modello.ModelloCli"
3366 file mode "src/main/java" version
3367 "false" "true"))
3368 (let ((file "src/main/mdo/settings-security.mdo"))
3369 (modello-single-mode file "1.0.0" "java")
3370 (modello-single-mode file "1.0.0" "xpp3-reader")
3371 (modello-single-mode file "1.0.0" "xpp3-writer"))
3372 #t))
3373 (add-before 'build 'generate-components.xml
3374 (lambda _
3375 (mkdir-p "build/classes/META-INF/plexus")
3376 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3377 (lambda _
3378 (display
3379 "<component-set>\n
3380 <components>\n
3381 <component>\n
3382 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3383 <role-hint>default</role-hint>\n
3384 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3385 <description></description>\n
3386 <requirements>\n
3387 <requirement>\n
3388 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3389 <field-name>_cipher</field-name>\n
3390 </requirement>\n
3391 <requirement>\n
3392 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3393 <field-name>_decryptors</field-name>\n
3394 </requirement>\n
3395 </requirements>\n
3396 <configuration>\n
3397 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3398 </configuration>\n
3399 </component>\n
3400 </components>\n
3401</component-set>\n")))
3402 #t))
3403 (add-before 'check 'fix-paths
3404 (lambda _
3405 (copy-recursively "src/test/resources" "target")
3406 #t)))))
3407 (inputs
3408 `(("java-plexus-cipher" ,java-plexus-cipher)))
3409 (native-inputs
3410 `(("java-modello-core" ,java-modello-core)
3411 ;; for modello:
3412 ("java-plexus-container-default" ,java-plexus-container-default)
3413 ("java-plexus-classworlds" ,java-plexus-classworlds)
3414 ("java-plexus-utils" ,java-plexus-utils)
3415 ("java-guava" ,java-guava)
3416 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3417 ("java-sisu-build-api" ,java-sisu-build-api)
3418 ;; modello plugins:
3419 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3420 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3421 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3422 ;; for tests
3423 ("java-junit" ,java-junit)))
3424 (build-system ant-build-system)
3425 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3426 (synopsis "Plexus Security Dispatcher Component")
3427 (description "This package is the Plexus Security Dispatcher Component.
3428This component decrypts a string passed to it.")
3429 (license license:asl2.0)))
3430
3431(define-public java-plexus-cli
3432 (package
3433 (name "java-plexus-cli")
3434 (version "1.7")
3435 (source (origin
3436 (method git-fetch)
3437 (uri (git-reference
3438 (url "https://github.com/sonatype/plexus-cli")
3439 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3440 (file-name (string-append name "-" version))
3441 (sha256
3442 (base32
3443 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3444 (build-system ant-build-system)
3445 (arguments
3446 `(#:jar-name "plexus-cli.jar"
3447 #:source-dir "src/main/java"
3448 #:jdk ,icedtea-8
3449 #:test-dir "src/test"))
3450 (inputs
3451 `(("java-commons-cli" ,java-commons-cli)
3452 ("java-plexus-container-default" ,java-plexus-container-default)
3453 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3454 (native-inputs
3455 `(("java-plexus-utils" ,java-plexus-utils)
3456 ("java-junit" ,java-junit)
3457 ("java-guava" ,java-guava)))
3458 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3459 (synopsis "CLI building library for plexus")
3460 (description "This package is a library to help creating CLI around
3461Plexus components.")
3462 (license license:asl2.0)))
3463
3464(define-public java-sisu-build-api
3465 (package
3466 (name "java-sisu-build-api")
3467 (version "0.0.7")
3468 (source (origin
3469 (method url-fetch)
3470 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3471 "archive/plexus-build-api-" version ".tar.gz"))
3472 (sha256
3473 (base32
3474 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3475 (build-system ant-build-system)
3476 (arguments
3477 `(#:jar-name "sisu-build-api.jar"
3478 #:source-dir "src/main/java"
3479 #:jdk ,icedtea-8
3480 #:tests? #f; FIXME: how to run the tests?
3481 #:phases
3482 (modify-phases %standard-phases
3483 (add-before 'build 'copy-resources
3484 (lambda _
3485 (copy-recursively "src/main/resources" "build/classes")
3486 (substitute* (find-files "build/classes")
3487 (("\\$\\{project.version\\}") ,version))
3488 #t))
3489 (add-before 'build 'generate-plexus-compontent
3490 (lambda _
3491 (mkdir-p "build/classes/META-INF/plexus")
3492 ;; This file is required for plexus to inject this package.
3493 ;; FIXME: how is it generated?
3494 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3495 (lambda _
3496 (display
3497 "<component-set>\n
3498 <components>\n
3499 <component>\n
3500 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3501 <role-hint>default</role-hint>\n
3502 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3503 <description>Filesystem based non-incremental build context implementation\n
3504which behaves as if all files were just created.</description>\n
3505 </component>\n
3506 </components>\n
3507</component-set>\n")))
3508 #t)))))
3509 (inputs
3510 `(("java-plexus-utils" ,java-plexus-utils)
3511 ("java-plexus-container-default" ,java-plexus-container-default)))
3512 (home-page "https://github.com/sonatype/sisu-build-api/")
3513 (synopsis "Base build API for maven")
3514 (description "This package contains the base build API for maven and
3515a default implementation of it. This API is about scanning files in a
3516project and determining what files need to be rebuilt.")
3517 (license license:asl2.0)))
3518
3519(define-public java-modello-core
3520 (package
3521 (name "java-modello-core")
3522 (version "1.9.1")
3523 (source (origin
3524 (method url-fetch)
3525 (uri (string-append "https://github.com/codehaus-plexus/modello"
3526 "/archive/modello-" version ".tar.gz"))
3527 (sha256
3528 (base32
3529 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3530 (build-system ant-build-system)
3531 (arguments
3532 `(#:jar-name "modello-core.jar"
3533 #:source-dir "modello-core/src/main/java"
3534 #:test-dir "modello-core/src/test"
3535 #:main-class "org.codehaus.modello.ModelloCli"
3536 #:jdk ,icedtea-8
3537 #:phases
3538 (modify-phases %standard-phases
3539 (add-before 'build 'copy-resources
3540 (lambda _
3541 (mkdir-p "build/classes/META-INF/plexus")
3542 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3543 "build/classes/META-INF/plexus/components.xml")
3544 #t))
3545 (add-before 'check 'fix-tests
3546 (lambda _
3547 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3548 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3549 "modello/core/io/ModelReaderTest.java")
3550 (("src/test") "modello-core/src/test")))
3551 #t)))))
3552 (inputs
3553 `(("java-plexus-utils" ,java-plexus-utils)
3554 ("java-plexus-container-default" ,java-plexus-container-default)
3555 ("java-sisu-build-api" ,java-sisu-build-api)))
3556 (native-inputs
3557 `(("java-junit" ,java-junit)
3558 ("java-plexus-classworlds" ,java-plexus-classworlds)
3559 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3560 ("java-guava" ,java-guava)))
3561 (home-page "http://codehaus-plexus.github.io/modello/")
3562 (synopsis "Framework for code generation from a simple model")
3563 (description "Modello is a framework for code generation from a simple model.
3564
3565Modello generates code from a simple model format: based on a plugin
3566architecture, various types of code and descriptors can be generated from the
3567single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3568XSD and documentation.")
3569 (license (list
3570 license:expat
3571 ;; Although this package uses only files licensed under expat,
3572 ;; other parts of the source are licensed under different
3573 ;; licenses. We include them to be inherited by other packages.
3574 license:asl2.0
3575 ;; Some files in modello-plugin-java are licensed under a
3576 ;; 5-clause BSD license.
3577 (license:non-copyleft
3578 (string-append "file:///modello-plugins/modello-plugin-java/"
3579 "src/main/java/org/codehaus/modello/plugin/"
3580 "java/javasource/JNaming.java"))))))
3581
3582(define-public java-modello-plugins-java
3583 (package
3584 (inherit java-modello-core)
3585 (name "java-modello-plugins-java")
3586 (arguments
3587 `(#:jar-name "modello-plugins-java.jar"
3588 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3589 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3590 #:jdk ,icedtea-8
3591 #:tests? #f; requires maven-model, which depends on this package
3592 #:phases
3593 (modify-phases %standard-phases
3594 (add-before 'build 'copy-resources
3595 (lambda _
3596 (mkdir-p "build/classes")
3597 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3598 "build/classes")
3599 #t)))))
3600 (inputs
3601 `(("java-modello-core" ,java-modello-core)
3602 ,@(package-inputs java-modello-core)))
3603 (synopsis "Modello Java Plugin")
3604 (description "Modello Java Plugin generates Java objects for the model.")))
3605
3606(define-public java-modello-plugins-xml
3607 (package
3608 (inherit java-modello-core)
3609 (name "java-modello-plugins-xml")
3610 (arguments
3611 `(#:jar-name "modello-plugins-xml.jar"
3612 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3613 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3614 #:jdk ,icedtea-8
3615 #:phases
3616 (modify-phases %standard-phases
3617 (add-before 'build 'copy-resources
3618 (lambda _
3619 (mkdir-p "build/classes")
3620 (copy-recursively
3621 "modello-plugins/modello-plugin-xml/src/main/resources"
3622 "build/classes")
3623 #t))
3624 (add-before 'check 'fix-paths
3625 (lambda _
3626 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3627 (substitute*
3628 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3629 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
3630 #t)))))
3631 (inputs
3632 `(("java-modello-core" ,java-modello-core)
3633 ("java-modello-plugins-java" ,java-modello-plugins-java)
3634 ,@(package-inputs java-modello-core)))
3635 (synopsis "Modello XML Plugin")
3636 (description "Modello XML Plugin contains shared code for every plugins
3637working on XML representation of the model.")))
3638
3639(define-public java-modello-test
3640 (package
3641 (inherit java-modello-core)
3642 (name "java-modello-test")
3643 (arguments
3644 `(#:jar-name "modello-test.jar"
3645 #:source-dir "modello-test/src/main/java"
3646 #:tests? #f; no tests
3647 #:jdk ,icedtea-8))
3648 (inputs
3649 `(("java-plexus-utils" ,java-plexus-utils)
3650 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3651 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3652 ("java-plexus-container-default" ,java-plexus-container-default)))
3653 (synopsis "Modello test package")
3654 (description "The modello test package contains the basis to create
3655Modello generator unit-tests, including sample models and xml files to test
3656every feature for every plugin.")))
3657
3658(define-public java-modello-plugins-xpp3
3659 (package
3660 (inherit java-modello-core)
3661 (name "java-modello-plugins-xpp3")
3662 (arguments
3663 `(#:jar-name "modello-plugins-xpp3.jar"
3664 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3665 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3666 ;; One of the test dependencies is maven-model which depends on this package.
3667 #:tests? #f
3668 #:jdk ,icedtea-8
3669 #:phases
3670 (modify-phases %standard-phases
3671 (add-before 'build 'copy-resources
3672 (lambda _
3673 (mkdir-p "build/classes")
3674 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3675 "build/classes")
3676 #t)))))
3677 (inputs
3678 `(("java-modello-core" ,java-modello-core)
3679 ("java-modello-plugins-java" ,java-modello-plugins-java)
3680 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3681 ,@(package-inputs java-modello-core)))
3682 (native-inputs
3683 `(("java-xmlunit" ,java-xmlunit)
3684 ("java-modello-test" ,java-modello-test)
3685 ,@(package-native-inputs java-modello-core)))
3686 (synopsis "Modello XPP3 Plugin")
3687 (description "The modello XPP3 plugin generates XML readers and writers based
3688on the XPP3 API (XML Pull Parser).")))
3689
3690(define-public java-asm
3691 (package
3692 (name "java-asm")
3693 (version "6.0")
3694 (source (origin
3695 (method url-fetch)
3696 (uri (string-append "http://download.forge.ow2.org/asm/"
3697 "asm-" version ".tar.gz"))
3698 (sha256
3699 (base32
3700 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3701 (build-system ant-build-system)
3702 (propagated-inputs
3703 `(("java-aqute-bndlib" ,java-aqute-bndlib)
3704 ("java-aqute-libg" ,java-aqute-libg)))
3705 (arguments
3706 `(#:build-target "compile"
3707 ;; The tests require an old version of Janino, which no longer compiles
3708 ;; with the JDK7.
3709 #:tests? #f
3710 #:make-flags
3711 (list
3712 ;; We don't need these extra ant tasks, but the build system asks us to
3713 ;; provide a path anyway.
3714 "-Dobjectweb.ant.tasks.path=dummy-path"
3715 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3716 ;; used during the build automatically by ant-build-system, but
3717 ;; java-asm's build.xml fails unless we provide something here.
3718 "-Dbiz.aQute.bnd.path=dummy-path")
3719 #:phases
3720 (modify-phases %standard-phases
3721 (add-before 'install 'build-jars
3722 (lambda* (#:key make-flags #:allow-other-keys)
3723 ;; We cannot use the "jar" target because it depends on a couple
3724 ;; of unpackaged, complicated tools.
3725 (mkdir "dist")
3726 (invoke "jar"
3727 "-cf" (string-append "dist/asm-" ,version ".jar")
3728 "-C" "output/build/tmp" ".")))
3729 (replace 'install
3730 (install-jars "dist")))))
3731 (native-inputs
3732 `(("java-junit" ,java-junit)))
3733 (home-page "http://asm.ow2.org/")
3734 (synopsis "Very small and fast Java bytecode manipulation framework")
3735 (description "ASM is an all purpose Java bytecode manipulation and
3736analysis framework. It can be used to modify existing classes or dynamically
3737generate classes, directly in binary form. The provided common
3738transformations and analysis algorithms allow to easily assemble custom
3739complex transformations and code analysis tools.")
3740 (license license:bsd-3)))
3741
3742(define java-asm-bootstrap
3743 (package
3744 (inherit java-asm)
3745 (name "java-asm-bootstrap")
3746 (arguments
3747 (substitute-keyword-arguments (package-arguments java-asm)
3748 ((#:tests? _) #f)))
3749 (native-inputs `())
3750 (propagated-inputs
3751 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
3752 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
3753 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
3754 (delete `("java-aqute-libg" ,java-aqute-libg)
3755 (package-inputs java-asm)))))))
3756
3757(define-public java-cglib
3758 (package
3759 (name "java-cglib")
3760 (version "3.2.4")
3761 (source (origin
3762 (method url-fetch)
3763 (uri (string-append
3764 "https://github.com/cglib/cglib/archive/RELEASE_"
3765 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3766 ".tar.gz"))
3767 (file-name (string-append "cglib-" version ".tar.gz"))
3768 (sha256
3769 (base32
3770 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3771 (build-system ant-build-system)
3772 (arguments
3773 `(;; FIXME: tests fail because junit runs
3774 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3775 ;; to describe a test at all.
3776 #:tests? #f
3777 #:jar-name "cglib.jar"
3778 #:phases
3779 (modify-phases %standard-phases
3780 (add-after 'unpack 'chdir
3781 (lambda _ (chdir "cglib") #t)))))
3782 (inputs
3783 `(("java-asm" ,java-asm)
3784 ("java-junit" ,java-junit)))
3785 (home-page "https://github.com/cglib/cglib/")
3786 (synopsis "Java byte code generation library")
3787 (description "The byte code generation library CGLIB is a high level API
3788to generate and transform Java byte code.")
3789 (license license:asl2.0)))
3790
3791(define-public java-objenesis
3792 (package
3793 (name "java-objenesis")
3794 (version "2.5.1")
3795 (source (origin
3796 (method url-fetch)
3797 (uri (string-append "https://github.com/easymock/objenesis/"
3798 "archive/" version ".tar.gz"))
3799 (file-name (string-append "objenesis-" version ".tar.gz"))
3800 (sha256
3801 (base32
3802 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3803 (build-system ant-build-system)
3804 (arguments
3805 `(#:jar-name "objenesis.jar"
3806 #:source-dir "main/src/"
3807 #:test-dir "main/src/test/"))
3808 (native-inputs
3809 `(("java-junit" ,java-junit)
3810 ("java-hamcrest-core" ,java-hamcrest-core)))
3811 (home-page "http://objenesis.org/")
3812 (synopsis "Bypass the constructor when creating an object")
3813 (description "Objenesis is a small Java library that serves one purpose:
3814to instantiate a new object of a particular class. It is common to see
3815restrictions in libraries stating that classes must require a default
3816constructor. Objenesis aims to overcome these restrictions by bypassing the
3817constructor on object instantiation.")
3818 (license license:asl2.0)))
3819
3820(define-public java-easymock
3821 (package
3822 (name "java-easymock")
3823 (version "3.4")
3824 (source (origin
3825 (method url-fetch)
3826 (uri (string-append "https://github.com/easymock/easymock/"
3827 "archive/easymock-" version ".tar.gz"))
3828 (sha256
3829 (base32
3830 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3831 (build-system ant-build-system)
3832 (arguments
3833 `(#:jar-name "easymock.jar"
3834 #:source-dir "core/src/main"
3835 #:test-dir "core/src/test"
3836 #:phases
3837 (modify-phases %standard-phases
3838 ;; FIXME: Android support requires the following packages to be
3839 ;; available: com.google.dexmaker.stock.ProxyBuilder
3840 (add-after 'unpack 'delete-android-support
3841 (lambda _
3842 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3843 (substitute* "MocksControl.java"
3844 (("AndroidSupport.isAndroid\\(\\)") "false")
3845 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3846 (delete-file "AndroidClassProxyFactory.java"))
3847 #t))
3848 (add-after 'unpack 'delete-broken-tests
3849 (lambda _
3850 (with-directory-excursion "core/src/test/java/org/easymock"
3851 ;; This test depends on dexmaker.
3852 (delete-file "tests2/ClassExtensionHelperTest.java")
3853
3854 ;; This is not a test.
3855 (delete-file "tests/BaseEasyMockRunnerTest.java")
3856
3857 ;; This test should be executed with a different runner...
3858 (delete-file "tests2/EasyMockAnnotationsTest.java")
3859 ;; ...but deleting it means that we also have to delete these
3860 ;; dependent files.
3861 (delete-file "tests2/EasyMockRunnerTest.java")
3862 (delete-file "tests2/EasyMockRuleTest.java")
3863
3864 ;; This test fails because the file "easymock.properties" does
3865 ;; not exist.
3866 (delete-file "tests2/EasyMockPropertiesTest.java"))
3867 #t)))))
3868 (inputs
3869 `(("java-asm" ,java-asm)
3870 ("java-cglib" ,java-cglib)
3871 ("java-objenesis" ,java-objenesis)))
3872 (native-inputs
3873 `(("java-junit" ,java-junit)
3874 ("java-hamcrest-core" ,java-hamcrest-core)))
3875 (home-page "http://easymock.org")
3876 (synopsis "Java library providing mock objects for unit tests")
3877 (description "EasyMock is a Java library that provides an easy way to use
3878mock objects in unit testing.")
3879 (license license:asl2.0)))
3880
3881(define-public java-jmock-1
3882 (package
3883 (name "java-jmock")
3884 (version "1.2.0")
3885 (source (origin
3886 (method url-fetch)
3887 (uri (string-append "https://github.com/jmock-developers/"
3888 "jmock-library/archive/" version ".tar.gz"))
3889 (file-name (string-append "jmock-" version ".tar.gz"))
3890 (sha256
3891 (base32
3892 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3893 (build-system ant-build-system)
3894 (arguments
3895 `(#:build-target "jars"
3896 #:test-target "run.tests"
3897 #:phases
3898 (modify-phases %standard-phases
3899 (replace 'install (install-jars "build")))))
3900 (home-page "http://www.jmock.org")
3901 (synopsis "Mock object library for test-driven development")
3902 (description "JMock is a library that supports test-driven development of
3903Java code with mock objects. Mock objects help you design and test the
3904interactions between the objects in your programs.
3905
3906The jMock library
3907
3908@itemize
3909@item makes it quick and easy to define mock objects
3910@item lets you precisely specify the interactions between
3911 your objects, reducing the brittleness of your tests
3912@item plugs into your favourite test framework
3913@item is easy to extend.
3914@end itemize\n")
3915 (license license:bsd-3)))
3916
3917(define-public java-jmock
3918 (package
3919 (inherit java-jmock-1)
3920 (name "java-jmock")
3921 (version "2.8.2")
3922 (source (origin
3923 (method url-fetch)
3924 (uri (string-append "https://github.com/jmock-developers/"
3925 "jmock-library/archive/" version ".tar.gz"))
3926 (file-name (string-append name "-" version ".tar.gz"))
3927 (sha256
3928 (base32
3929 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3930 (inputs
3931 `(("java-hamcrest-all" ,java-hamcrest-all)
3932 ("java-asm" ,java-asm)
3933 ("java-bsh" ,java-bsh)
3934 ("java-junit" ,java-junit)))
3935 (native-inputs
3936 `(("cglib" ,java-cglib)))
3937 (arguments
3938 `(#:jar-name "java-jmock.jar"
3939 #:source-dir "jmock/src/main/java"
3940 #:test-dir "jmock/src/test"))))
3941
3942(define-public java-jmock-junit4
3943 (package
3944 (inherit java-jmock)
3945 (name "java-jmock-junit4")
3946 (arguments
3947 `(#:jar-name "java-jmock-junit4.jar"
3948 #:source-dir "jmock-junit4/src/main/java"
3949 #:test-dir "jmock-junit4/src/test"))
3950 (inputs
3951 `(("java-hamcrest-all" ,java-hamcrest-all)
3952 ("java-asm" ,java-asm)
3953 ("java-bsh" ,java-bsh)
3954 ("java-jmock" ,java-jmock)
3955 ("java-jumit" ,java-junit)))))
3956
3957(define-public java-jmock-legacy
3958 (package
3959 (inherit java-jmock)
3960 (name "java-jmock-legacy")
3961 (arguments
3962 `(#:jar-name "java-jmock-legacy.jar"
3963 #:source-dir "jmock-legacy/src/main/java"
3964 #:test-dir "jmock-legacy/src/test"
3965 #:phases
3966 (modify-phases %standard-phases
3967 (add-before 'check 'copy-tests
3968 (lambda _
3969 ;; This file is a dependancy of some tests
3970 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
3971 (copy-file (string-append "jmock/src/test/java/" file)
3972 (string-append "jmock-legacy/src/test/java/" file))
3973 #t))))))
3974 (inputs
3975 `(("java-hamcrest-all" ,java-hamcrest-all)
3976 ("java-objenesis" ,java-objenesis)
3977 ("java-cglib" ,java-cglib)
3978 ("java-jmock" ,java-jmock)
3979 ("java-asm" ,java-asm)
3980 ("java-bsh" ,java-bsh)
3981 ("java-junit" ,java-junit)))
3982 (native-inputs
3983 `(("java-jmock-junit4" ,java-jmock-junit4)))))
3984
3985(define-public java-hamcrest-all
3986 (package (inherit java-hamcrest-core)
3987 (name "java-hamcrest-all")
3988 (arguments
3989 `(#:jdk ,icedtea-8
3990 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
3991 ((#:build-target _) "bigjar")
3992 ((#:phases phases)
3993 `(modify-phases ,phases
3994 ;; Some build targets override the classpath, so we need to patch
3995 ;; the build.xml to ensure that required dependencies are on the
3996 ;; classpath.
3997 (add-after 'unpack 'patch-classpath-for-integration
3998 (lambda* (#:key inputs #:allow-other-keys)
3999 (substitute* "build.xml"
4000 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4001 (string-join
4002 (cons line
4003 (append
4004 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4005 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4006 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4007 ";"))
4008 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4009 (string-append (assoc-ref inputs "java-hamcrest-core")
4010 "/share/java/hamcrest-core.jar")))
4011 #t)))))))
4012 (inputs
4013 `(("java-junit" ,java-junit)
4014 ("java-jmock" ,java-jmock-1)
4015 ;; This is necessary because of what seems to be a race condition.
4016 ;; This package would sometimes fail to build because hamcrest-core.jar
4017 ;; could not be found, even though it is built as part of this package.
4018 ;; Adding java-hamcrest-core appears to fix this problem. See
4019 ;; https://debbugs.gnu.org/31390 for more information.
4020 ("java-hamcrest-core" ,java-hamcrest-core)
4021 ("java-easymock" ,java-easymock)
4022 ,@(package-inputs java-hamcrest-core)))))
4023
4024(define-public java-jopt-simple
4025 (package
4026 (name "java-jopt-simple")
4027 (version "5.0.3")
4028 (source (origin
4029 (method url-fetch)
4030 (uri (string-append "http://repo1.maven.org/maven2/"
4031 "net/sf/jopt-simple/jopt-simple/"
4032 version "/jopt-simple-"
4033 version "-sources.jar"))
4034 (sha256
4035 (base32
4036 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4037 (build-system ant-build-system)
4038 (arguments
4039 `(#:tests? #f ; there are no tests
4040 #:jar-name "jopt-simple.jar"))
4041 (home-page "https://pholser.github.io/jopt-simple/")
4042 (synopsis "Java library for parsing command line options")
4043 (description "JOpt Simple is a Java library for parsing command line
4044options, such as those you might pass to an invocation of @code{javac}. In
4045the interest of striving for simplicity, as closely as possible JOpt Simple
4046attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4047GNU @code{getopt_long}. It also aims to make option parser configuration and
4048retrieval of options and their arguments simple and expressive, without being
4049overly clever.")
4050 (license license:expat)))
4051
4052(define-public java-commons-math3
4053 (package
4054 (name "java-commons-math3")
4055 (version "3.6.1")
4056 (source (origin
4057 (method url-fetch)
4058 (uri (string-append "mirror://apache/commons/math/source/"
4059 "commons-math3-" version "-src.tar.gz"))
4060 (sha256
4061 (base32
4062 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4063 (build-system ant-build-system)
4064 (arguments
4065 `(#:build-target "jar"
4066 #:test-target "test"
4067 #:make-flags
4068 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4069 (junit (assoc-ref %build-inputs "java-junit")))
4070 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4071 (string-append "-Dhamcrest.jar=" hamcrest
4072 "/share/java/hamcrest-core.jar")))
4073 #:phases
4074 (modify-phases %standard-phases
4075 ;; We want to build the jar in the build phase and run the tests
4076 ;; later in a separate phase.
4077 (add-after 'unpack 'untangle-targets
4078 (lambda _
4079 (substitute* "build.xml"
4080 (("name=\"jar\" depends=\"test\"")
4081 "name=\"jar\" depends=\"compile\""))
4082 #t))
4083 ;; There is no install target.
4084 (replace 'install
4085 (install-jars "target")))))
4086 (native-inputs
4087 `(("java-junit" ,java-junit)
4088 ("java-hamcrest-core" ,java-hamcrest-core)))
4089 (home-page "http://commons.apache.org/math/")
4090 (synopsis "Apache Commons mathematics library")
4091 (description "Commons Math is a library of lightweight, self-contained
4092mathematics and statistics components addressing the most common problems not
4093available in the Java programming language or Commons Lang.")
4094 (license license:asl2.0)))
4095
4096(define-public java-jmh
4097 (package
4098 (name "java-jmh")
4099 (version "1.17.5")
4100 (source (origin
4101 (method hg-fetch)
4102 (uri (hg-reference
4103 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4104 (changeset version)))
4105 (file-name (string-append name "-" version "-checkout"))
4106 (sha256
4107 (base32
4108 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4109 (build-system ant-build-system)
4110 (arguments
4111 `(#:jar-name "jmh-core.jar"
4112 #:source-dir "jmh-core/src/main"
4113 #:test-dir "jmh-core/src/test"
4114 #:phases
4115 (modify-phases %standard-phases
4116 ;; This seems to be a bug in the JDK. It may not be necessary in
4117 ;; future versions of the JDK.
4118 (add-after 'unpack 'fix-bug
4119 (lambda _
4120 (with-directory-excursion
4121 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4122 (substitute* '("IntegerValueConverter.java"
4123 "ThreadsValueConverter.java")
4124 (("public Class<Integer> valueType")
4125 "public Class<? extends Integer> valueType")))
4126 #t)))))
4127 (inputs
4128 `(("java-jopt-simple" ,java-jopt-simple)
4129 ("java-commons-math3" ,java-commons-math3)))
4130 (native-inputs
4131 `(("java-junit" ,java-junit)
4132 ("java-hamcrest-core" ,java-hamcrest-core)))
4133 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4134 (synopsis "Benchmark harness for the JVM")
4135 (description "JMH is a Java harness for building, running, and analysing
4136nano/micro/milli/macro benchmarks written in Java and other languages
4137targeting the JVM.")
4138 ;; GPLv2 only
4139 (license license:gpl2)))
4140
4141(define-public java-commons-collections4
4142 (package
4143 (name "java-commons-collections4")
4144 (version "4.1")
4145 (source (origin
4146 (method url-fetch)
4147 (uri (string-append "mirror://apache/commons/collections/source/"
4148 "commons-collections4-" version "-src.tar.gz"))
4149 (sha256
4150 (base32
4151 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4152 (build-system ant-build-system)
4153 (arguments
4154 `(#:test-target "test"
4155 #:make-flags
4156 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4157 (junit (assoc-ref %build-inputs "java-junit"))
4158 (easymock (assoc-ref %build-inputs "java-easymock")))
4159 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4160 (string-append "-Dhamcrest.jar=" hamcrest
4161 "/share/java/hamcrest-core.jar")
4162 (string-append "-Deasymock.jar=" easymock
4163 "/share/java/easymock.jar")))
4164 #:phases
4165 (modify-phases %standard-phases
4166 (replace 'install
4167 (install-jars "target")))))
4168 (native-inputs
4169 `(("java-junit" ,java-junit)
4170 ("java-hamcrest-core" ,java-hamcrest-core)
4171 ("java-easymock" ,java-easymock)))
4172 (home-page "http://commons.apache.org/collections/")
4173 (synopsis "Collections framework")
4174 (description "The Java Collections Framework is the recognised standard
4175for collection handling in Java. Commons-Collections seek to build upon the
4176JDK classes by providing new interfaces, implementations and utilities. There
4177are many features, including:
4178
4179@itemize
4180@item @code{Bag} interface for collections that have a number of copies of
4181 each object
4182@item @code{BidiMap} interface for maps that can be looked up from value to
4183 key as well and key to value
4184@item @code{MapIterator} interface to provide simple and quick iteration over
4185 maps
4186@item Transforming decorators that alter each object as it is added to the
4187 collection
4188@item Composite collections that make multiple collections look like one
4189@item Ordered maps and sets that retain the order elements are added in,
4190 including an LRU based map
4191@item Reference map that allows keys and/or values to be garbage collected
4192 under close control
4193@item Many comparator implementations
4194@item Many iterator implementations
4195@item Adapter classes from array and enumerations to collections
4196@item Utilities to test or create typical set-theory properties of collections
4197 such as union, intersection, and closure.
4198@end itemize\n")
4199 (license license:asl2.0)))
4200
4201(define-public java-commons-collections
4202 (package
4203 (inherit java-commons-collections4)
4204 (name "java-commons-collections")
4205 (version "3.2.2")
4206 (source (origin
4207 (method url-fetch)
4208 (uri (string-append "mirror://apache/commons/collections/source/"
4209 "commons-collections-" version "-src.tar.gz"))
4210 (sha256
4211 (base32
4212 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4213 (patches
4214 (search-patches "java-commons-collections-fix-java8.patch"))))
4215 (arguments
4216 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4217 ((#:phases phases)
4218 `(modify-phases ,phases
4219 ;; The manifest is required by the build procedure
4220 (add-before 'build 'add-manifest
4221 (lambda _
4222 (mkdir-p "build/conf")
4223 (call-with-output-file "build/conf/MANIFEST.MF"
4224 (lambda (file)
4225 (format file "Manifest-Version: 1.0\n")))
4226 #t))
4227 (replace 'install
4228 (install-jars "build"))))))))
4229
4230(define java-commons-collections-test-classes
4231 (package
4232 (inherit java-commons-collections)
4233 (arguments
4234 `(#:jar-name "commons-collections-test-classes.jar"
4235 #:source-dir "src/test"
4236 #:tests? #f))
4237 (inputs
4238 `(("collection" ,java-commons-collections)))))
4239
4240(define-public java-commons-beanutils
4241 (package
4242 (name "java-commons-beanutils")
4243 (version "1.9.3")
4244 (source (origin
4245 (method url-fetch)
4246 (uri (string-append "mirror://apache/commons/beanutils/source/"
4247 "commons-beanutils-" version "-src.tar.gz"))
4248 (sha256
4249 (base32
4250 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4251 (build-system ant-build-system)
4252 (arguments
4253 `(#:test-target "test"
4254 #:tests? #f
4255 #:phases
4256 (modify-phases %standard-phases
4257 (replace 'install
4258 (lambda* (#:key outputs #:allow-other-keys)
4259 (rename-file (string-append "dist/commons-beanutils-" ,version
4260 "-SNAPSHOT.jar")
4261 "commons-beanutils.jar")
4262 (install-file "commons-beanutils.jar"
4263 (string-append (assoc-ref outputs "out") "/share/java/"))
4264 #t)))))
4265 (inputs
4266 `(("logging" ,java-commons-logging-minimal)
4267 ("collections" ,java-commons-collections)))
4268 (native-inputs
4269 `(("junit" ,java-junit)
4270 ("collections-test" ,java-commons-collections-test-classes)))
4271 (home-page "http://commons.apache.org/beanutils/")
4272 (synopsis "Dynamically set or get properties in Java")
4273 (description "BeanUtils provides a simplified interface to reflection and
4274introspection to set or get dynamically determined properties through their
4275setter and getter method.")
4276 (license license:asl2.0)))
4277
4278(define-public java-commons-io
4279 (package
4280 (name "java-commons-io")
4281 (version "2.5")
4282 (source
4283 (origin
4284 (method url-fetch)
4285 (uri (string-append "mirror://apache/commons/io/source/"
4286 "commons-io-" version "-src.tar.gz"))
4287 (sha256
4288 (base32
4289 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4290 (build-system ant-build-system)
4291 (outputs '("out" "doc"))
4292 (arguments
4293 `(#:test-target "test"
4294 #:make-flags
4295 (list (string-append "-Djunit.jar="
4296 (assoc-ref %build-inputs "java-junit")
4297 "/share/java/junit.jar"))
4298 #:phases
4299 (modify-phases %standard-phases
4300 (add-after 'build 'build-javadoc ant-build-javadoc)
4301 (replace 'install (install-jars "target"))
4302 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4303 (native-inputs
4304 `(("java-junit" ,java-junit)
4305 ("java-hamcrest-core" ,java-hamcrest-core)))
4306 (home-page "http://commons.apache.org/io/")
4307 (synopsis "Common useful IO related classes")
4308 (description "Commons-IO contains utility classes, stream implementations,
4309file filters and endian classes.")
4310 (license license:asl2.0)))
4311
4312(define-public java-commons-exec-1.1
4313 (package
4314 (name "java-commons-exec")
4315 (version "1.1")
4316 (source
4317 (origin
4318 (method url-fetch)
4319 (uri (string-append "mirror://apache/commons/exec/source/"
4320 "commons-exec-" version "-src.tar.gz"))
4321 (sha256
4322 (base32
4323 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4324 (build-system ant-build-system)
4325 (arguments
4326 `(#:test-target "test"
4327 #:make-flags
4328 (list (string-append "-Dmaven.junit.jar="
4329 (assoc-ref %build-inputs "java-junit")
4330 "/share/java/junit.jar"))
4331 #:phases
4332 (modify-phases %standard-phases
4333 (add-before 'build 'delete-network-tests
4334 (lambda _
4335 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4336 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4337 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4338 #t))
4339 ;; The "build" phase automatically tests.
4340 (delete 'check)
4341 (replace 'install (install-jars "target")))))
4342 (native-inputs
4343 `(("java-junit" ,java-junit)))
4344 (home-page "http://commons.apache.org/proper/commons-exec/")
4345 (synopsis "Common program execution related classes")
4346 (description "Commons-Exec simplifies executing external processes.")
4347 (license license:asl2.0)))
4348
4349(define-public java-commons-exec
4350 (package
4351 (inherit java-commons-exec-1.1)
4352 (version "1.3")
4353 (source
4354 (origin
4355 (method url-fetch)
4356 (uri (string-append "mirror://apache/commons/exec/source/"
4357 "commons-exec-" version "-src.tar.gz"))
4358 (sha256
4359 (base32
4360 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4361 (arguments
4362 `(#:test-target "test"
4363 #:make-flags
4364 (list (string-append "-Dmaven.junit.jar="
4365 (assoc-ref %build-inputs "java-junit")
4366 "/share/java/junit.jar")
4367 "-Dmaven.compiler.source=1.7"
4368 "-Dmaven.compiler.target=1.7")
4369 #:phases
4370 (modify-phases %standard-phases
4371 (add-before 'build 'delete-network-tests
4372 (lambda* (#:key inputs #:allow-other-keys)
4373 ;; This test hangs indefinitely.
4374 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4375 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4376 (("ping -c 10 127.0.0.1") "sleep 10"))
4377 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4378 (("/bin/ls") "ls"))
4379 (call-with-output-file "src/test/scripts/ping.sh"
4380 (lambda (port)
4381 (format port "#!~a/bin/sh\nsleep $1\n"
4382 (assoc-ref inputs "bash"))))
4383 #t))
4384 ;; The "build" phase automatically tests.
4385 (delete 'check)
4386 (replace 'install (install-jars "target")))))
4387 (native-inputs
4388 `(("java-junit" ,java-junit)
4389 ("java-hamcrest-core" ,java-hamcrest-core)))))
4390
4391(define-public java-commons-lang
4392 (package
4393 (name "java-commons-lang")
4394 (version "2.6")
4395 (source
4396 (origin
4397 (method url-fetch)
4398 (uri (string-append "mirror://apache/commons/lang/source/"
4399 "commons-lang-" version "-src.tar.gz"))
4400 (sha256
4401 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4402 (build-system ant-build-system)
4403 (outputs '("out" "doc"))
4404 (arguments
4405 `(#:test-target "test"
4406 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4407 #:phases
4408 (modify-phases %standard-phases
4409 (add-after 'build 'build-javadoc ant-build-javadoc)
4410 (add-before 'check 'disable-failing-test
4411 (lambda _
4412 ;; Disable a failing test
4413 (substitute* "src/test/java/org/apache/commons/lang/\
4414time/FastDateFormatTest.java"
4415 (("public void testFormat\\(\\)")
4416 "public void disabled_testFormat()"))
4417 #t))
4418 (replace 'install (install-jars "target"))
4419 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4420 (native-inputs
4421 `(("java-junit" ,java-junit)))
4422 (home-page "http://commons.apache.org/lang/")
4423 (synopsis "Extension of the java.lang package")
4424 (description "The Commons Lang components contains a set of Java classes
4425that provide helper methods for standard Java classes, especially those found
4426in the @code{java.lang} package in the Sun JDK. The following classes are
4427included:
4428
4429@itemize
4430@item StringUtils - Helper for @code{java.lang.String}.
4431@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4432 of characters such as @code{[a-z]} and @code{[abcdez]}.
4433@item RandomStringUtils - Helper for creating randomised strings.
4434@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4435@item NumberRange - A range of numbers with an upper and lower bound.
4436@item ObjectUtils - Helper for @code{java.lang.Object}.
4437@item SerializationUtils - Helper for serializing objects.
4438@item SystemUtils - Utility class defining the Java system properties.
4439@item NestedException package - A sub-package for the creation of nested
4440 exceptions.
4441@item Enum package - A sub-package for the creation of enumerated types.
4442@item Builder package - A sub-package for the creation of @code{equals},
4443 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4444@end itemize\n")
4445 (license license:asl2.0)))
4446
4447(define-public java-commons-lang3
4448 (package
4449 (name "java-commons-lang3")
4450 (version "3.4")
4451 (source
4452 (origin
4453 (method url-fetch)
4454 (uri (string-append "mirror://apache/commons/lang/source/"
4455 "commons-lang3-" version "-src.tar.gz"))
4456 (sha256
4457 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4458 (build-system ant-build-system)
4459 (outputs '("out" "doc"))
4460 (arguments
4461 `(#:test-target "test"
4462 #:make-flags
4463 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4464 (junit (assoc-ref %build-inputs "java-junit"))
4465 (easymock (assoc-ref %build-inputs "java-easymock"))
4466 (io (assoc-ref %build-inputs "java-commons-io")))
4467 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4468 (string-append "-Dhamcrest.jar=" hamcrest
4469 "/share/java/hamcrest-all.jar")
4470 (string-append "-Dcommons-io.jar=" io
4471 "/share/java/commons-io-"
4472 ,(package-version java-commons-io)
4473 "-SNAPSHOT.jar")
4474 (string-append "-Deasymock.jar=" easymock
4475 "/share/java/easymock.jar")))
4476 #:phases
4477 (modify-phases %standard-phases
4478 (add-after 'build 'build-javadoc ant-build-javadoc)
4479 (replace 'install (install-jars "target"))
4480 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4481 (native-inputs
4482 `(("java-junit" ,java-junit)
4483 ("java-commons-io" ,java-commons-io)
4484 ("java-hamcrest-all" ,java-hamcrest-all)
4485 ("java-easymock" ,java-easymock)))
4486 (home-page "http://commons.apache.org/lang/")
4487 (synopsis "Extension of the java.lang package")
4488 (description "The Commons Lang components contains a set of Java classes
4489that provide helper methods for standard Java classes, especially those found
4490in the @code{java.lang} package. The following classes are included:
4491
4492@itemize
4493@item StringUtils - Helper for @code{java.lang.String}.
4494@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4495 characters such as @code{[a-z]} and @code{[abcdez]}.
4496@item RandomStringUtils - Helper for creating randomised strings.
4497@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4498@item NumberRange - A range of numbers with an upper and lower bound.
4499@item ObjectUtils - Helper for @code{java.lang.Object}.
4500@item SerializationUtils - Helper for serializing objects.
4501@item SystemUtils - Utility class defining the Java system properties.
4502@item NestedException package - A sub-package for the creation of nested
4503 exceptions.
4504@item Enum package - A sub-package for the creation of enumerated types.
4505@item Builder package - A sub-package for the creation of @code{equals},
4506 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4507@end itemize\n")
4508 (license license:asl2.0)))
4509
4510(define-public java-commons-bsf
4511 (package
4512 (name "java-commons-bsf")
4513 (version "2.4.0")
4514 (source (origin
4515 (method url-fetch)
4516 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4517 version ".tar.gz"))
4518 (sha256
4519 (base32
4520 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4521 (modules '((guix build utils)))
4522 (snippet
4523 '(begin
4524 (for-each delete-file
4525 (find-files "." "\\.jar$"))
4526 #t))))
4527 (build-system ant-build-system)
4528 (arguments
4529 `(#:build-target "jar"
4530 #:tests? #f; No test file
4531 #:modules ((guix build ant-build-system)
4532 (guix build utils)
4533 (guix build java-utils)
4534 (sxml simple))
4535 #:phases
4536 (modify-phases %standard-phases
4537 (add-before 'build 'create-properties
4538 (lambda _
4539 ;; This file is missing from the distribution
4540 (call-with-output-file "build-properties.xml"
4541 (lambda (port)
4542 (sxml->xml
4543 `(project (@ (basedir ".") (name "build-properties") (default ""))
4544 (property (@ (name "project.name") (value "bsf")))
4545 (property (@ (name "source.level") (value "1.5")))
4546 (property (@ (name "build.lib") (value "build/jar")))
4547 (property (@ (name "src.dir") (value "src")))
4548 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4549 (property (@ (name "build.tests") (value "build/test-classes")))
4550 (property (@ (name "build.dest") (value "build/classes"))))
4551 port)))
4552 #t))
4553 (replace 'install (install-jars "build")))))
4554 (native-inputs
4555 `(("java-junit" ,java-junit)))
4556 (inputs
4557 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4558 (home-page "https://commons.apache.org/proper/commons-bsf")
4559 (synopsis "Bean Scripting Framework")
4560 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4561which provides scripting language support within Java applications, and access
4562to Java objects and methods from scripting languages. BSF allows one to write
4563JSPs in languages other than Java while providing access to the Java class
4564library. In addition, BSF permits any Java application to be implemented in
4565part (or dynamically extended) by a language that is embedded within it. This
4566is achieved by providing an API that permits calling scripting language engines
4567from within Java, as well as an object registry that exposes Java objects to
4568these scripting language engines.")
4569 (license license:asl2.0)))
4570
4571(define-public java-commons-jxpath
4572 (package
4573 (name "java-commons-jxpath")
4574 (version "1.3")
4575 (source (origin
4576 (method url-fetch)
4577 (uri (string-append "mirror://apache/commons/jxpath/source/"
4578 "commons-jxpath-" version "-src.tar.gz"))
4579 (sha256
4580 (base32
4581 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4582 (build-system ant-build-system)
4583 (arguments
4584 `(#:jar-name "commons-jxpath.jar"
4585 ;; tests require more dependencies, including mockrunner which depends on old software
4586 #:tests? #f
4587 #:source-dir "src/java"))
4588 (inputs
4589 `(("servlet" ,java-classpathx-servletapi)
4590 ("java-jdom" ,java-jdom)
4591 ("java-commons-beanutils" ,java-commons-beanutils)))
4592 (native-inputs
4593 `(("java-junit" ,java-junit)))
4594 (home-page "http://commons.apache.org/jxpath/")
4595 (synopsis "Simple interpreter of an expression language called XPath.")
4596 (description "The org.apache.commons.jxpath package defines a simple
4597interpreter of an expression language called XPath. JXPath applies XPath
4598expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4599contexts, DOM etc, including mixtures thereof.")
4600 (license license:asl2.0)))
4601
4602(define-public java-jsr250
4603 (package
4604 (name "java-jsr250")
4605 (version "1.3")
4606 (source (origin
4607 (method url-fetch)
4608 (uri (string-append "https://repo1.maven.org/maven2/"
4609 "javax/annotation/javax.annotation-api/"
4610 version "/javax.annotation-api-"
4611 version "-sources.jar"))
4612 (sha256
4613 (base32
4614 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4615 (build-system ant-build-system)
4616 (arguments
4617 `(#:tests? #f ; no tests included
4618 #:jdk ,icedtea-8
4619 #:jar-name "jsr250.jar"))
4620 (home-page "https://jcp.org/en/jsr/detail?id=250")
4621 (synopsis "Security-related annotations")
4622 (description "This package provides annotations for security. It provides
4623packages in the @code{javax.annotation} and @code{javax.annotation.security}
4624namespaces.")
4625 ;; either cddl or gpl2 only, with classpath exception
4626 (license (list license:cddl1.0
4627 license:gpl2))))
4628
4629(define-public java-jsr305
4630 (package
4631 (name "java-jsr305")
4632 (version "3.0.1")
4633 (source (origin
4634 (method url-fetch)
4635 (uri (string-append "https://repo1.maven.org/maven2/"
4636 "com/google/code/findbugs/"
4637 "jsr305/" version "/jsr305-"
4638 version "-sources.jar"))
4639 (sha256
4640 (base32
4641 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4642 (build-system ant-build-system)
4643 (arguments
4644 `(#:tests? #f ; no tests included
4645 #:jar-name "jsr305.jar"))
4646 (home-page "http://findbugs.sourceforge.net/")
4647 (synopsis "Annotations for the static analyzer called findbugs")
4648 (description "This package provides annotations for the findbugs package.
4649It provides packages in the @code{javax.annotations} namespace.")
4650 (license license:asl2.0)))
4651
4652(define-public java-guava
4653 (package
4654 (name "java-guava")
4655 ;; This is the last release of Guava that can be built with Java 7.
4656 (version "20.0")
4657 (source (origin
4658 (method url-fetch)
4659 (uri (string-append "https://github.com/google/guava/"
4660 "releases/download/v" version
4661 "/guava-" version "-sources.jar"))
4662 (sha256
4663 (base32
4664 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4665 (build-system ant-build-system)
4666 (arguments
4667 `(#:tests? #f ; no tests included
4668 #:jar-name "guava.jar"
4669 #:phases
4670 (modify-phases %standard-phases
4671 (add-after 'unpack 'trim-sources
4672 (lambda _
4673 (with-directory-excursion "src/com/google/common"
4674 ;; Remove annotations to avoid extra dependencies:
4675 ;; * "j2objc" annotations are used when converting Java to
4676 ;; Objective C;
4677 ;; * "errorprone" annotations catch common Java mistakes at
4678 ;; compile time;
4679 ;; * "IgnoreJRERequirement" is used for Android.
4680 (substitute* (find-files "." "\\.java$")
4681 (("import com.google.j2objc.*") "")
4682 (("import com.google.errorprone.annotation.*") "")
4683 (("import org.codehaus.mojo.animal_sniffer.*") "")
4684 (("@CanIgnoreReturnValue") "")
4685 (("@LazyInit") "")
4686 (("@WeakOuter") "")
4687 (("@RetainedWith") "")
4688 (("@Weak") "")
4689 (("@ForOverride") "")
4690 (("@J2ObjCIncompatible") "")
4691 (("@IgnoreJRERequirement") "")))
4692 #t)))))
4693 (inputs
4694 `(("java-jsr305" ,java-jsr305)))
4695 (home-page "https://github.com/google/guava")
4696 (synopsis "Google core libraries for Java")
4697 (description "Guava is a set of core libraries that includes new
4698collection types (such as multimap and multiset), immutable collections, a
4699graph library, functional types, an in-memory cache, and APIs/utilities for
4700concurrency, I/O, hashing, primitives, reflection, string processing, and much
4701more!")
4702 (license license:asl2.0)))
4703
4704;; The java-commons-logging package provides adapters to many different
4705;; logging frameworks. To avoid an excessive dependency graph we try to build
4706;; it with only a minimal set of adapters.
4707(define-public java-commons-logging-minimal
4708 (package
4709 (name "java-commons-logging-minimal")
4710 (version "1.2")
4711 (source (origin
4712 (method url-fetch)
4713 (uri (string-append "mirror://apache/commons/logging/source/"
4714 "commons-logging-" version "-src.tar.gz"))
4715 (sha256
4716 (base32
4717 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4718 (build-system ant-build-system)
4719 (arguments
4720 `(#:tests? #f ; avoid dependency on logging frameworks
4721 #:jar-name "commons-logging-minimal.jar"
4722 #:phases
4723 (modify-phases %standard-phases
4724 (add-after 'unpack 'delete-adapters-and-tests
4725 (lambda _
4726 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4727 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4728 ;; is used by applications; SimpleLog is the only actually usable
4729 ;; implementation that does not depend on another logging
4730 ;; framework.
4731 (for-each
4732 (lambda (file)
4733 (delete-file (string-append
4734 "src/main/java/org/apache/commons/logging/impl/" file)))
4735 (list "Jdk13LumberjackLogger.java"
4736 "WeakHashtable.java"
4737 "Log4JLogger.java"
4738 "ServletContextCleaner.java"
4739 "Jdk14Logger.java"
4740 "AvalonLogger.java"
4741 "LogKitLogger.java"))
4742 (delete-file-recursively "src/test")
4743 #t)))))
4744 (home-page "http://commons.apache.org/logging/")
4745 (synopsis "Common API for logging implementations")
4746 (description "The Logging package is a thin bridge between different
4747logging implementations. A library that uses the commons-logging API can be
4748used with any logging implementation at runtime.")
4749 (license license:asl2.0)))
4750
4751;; This is the last release of the 1.x series.
4752(define-public java-mockito-1
4753 (package
4754 (name "java-mockito")
4755 (version "1.10.19")
4756 (source (origin
4757 (method url-fetch)
4758 (uri (string-append "http://repo1.maven.org/maven2/"
4759 "org/mockito/mockito-core/" version
4760 "/mockito-core-" version "-sources.jar"))
4761 (sha256
4762 (base32
4763 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4764 (build-system ant-build-system)
4765 (arguments
4766 `(#:jar-name "mockito.jar"
4767 #:tests? #f ; no tests included
4768 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4769 ;; patches in build phases.
4770 #:phases
4771 (modify-phases %standard-phases
4772 ;; Mockito was developed against a different version of hamcrest,
4773 ;; which does not require matcher implementations to provide an
4774 ;; implementation of the "describeMismatch" method. We add this
4775 ;; simple definition to pass the build with our version of hamcrest.
4776 (add-after 'unpack 'fix-hamcrest-build-error
4777 (lambda _
4778 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4779 (("public Matcher getActualMatcher\\(\\) .*" line)
4780 (string-append "
4781 public void describeMismatch(Object item, Description description) {
4782 actualMatcher.describeMismatch(item, description);
4783 }"
4784 line)))
4785 #t))
4786 ;; Mockito bundles cglib. We have a cglib package, so let's use
4787 ;; that instead.
4788 (add-after 'unpack 'use-system-libraries
4789 (lambda _
4790 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4791 (substitute* '("CGLIBHacker.java"
4792 "CglibMockMaker.java"
4793 "ClassImposterizer.java"
4794 "DelegatingMockitoMethodProxy.java"
4795 "MethodInterceptorFilter.java"
4796 "MockitoNamingPolicy.java"
4797 "SerializableMockitoMethodProxy.java"
4798 "SerializableNoOp.java")
4799 (("import org.mockito.cglib") "import net.sf.cglib")))
4800 #t)))))
4801 (inputs
4802 `(("java-junit" ,java-junit)
4803 ("java-objenesis" ,java-objenesis)
4804 ("java-cglib" ,java-cglib)
4805 ("java-hamcrest-core" ,java-hamcrest-core)))
4806 (home-page "http://mockito.org")
4807 (synopsis "Mockito is a mock library for Java")
4808 (description "Mockito is a mocking library for Java which lets you write
4809tests with a clean and simple API. It generates mocks using reflection, and
4810it records all mock invocations, including methods arguments.")
4811 (license license:asl2.0)))
4812
4813(define-public java-httpcomponents-httpcore
4814 (package
4815 (name "java-httpcomponents-httpcore")
4816 (version "4.4.6")
4817 (source (origin
4818 (method url-fetch)
4819 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4820 "source/httpcomponents-core-"
4821 version "-src.tar.gz"))
4822 (sha256
4823 (base32
4824 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4825 (build-system ant-build-system)
4826 (arguments
4827 `(#:jar-name "httpcomponents-httpcore.jar"
4828 #:phases
4829 (modify-phases %standard-phases
4830 (add-after 'unpack 'chdir
4831 (lambda _ (chdir "httpcore") #t)))))
4832 (inputs
4833 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4834 ("java-commons-lang3" ,java-commons-lang3)))
4835 (native-inputs
4836 `(("java-junit" ,java-junit)
4837 ("java-mockito" ,java-mockito-1)))
4838 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4839 (synopsis "Low level HTTP transport components")
4840 (description "HttpCore is a set of low level HTTP transport components
4841that can be used to build custom client and server side HTTP services with a
4842minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4843on the classic Java I/O and non-blocking, event driven I/O model based on Java
4844NIO.
4845
4846This package provides the blocking I/O model library.")
4847 (license license:asl2.0)))
4848
4849(define-public java-httpcomponents-httpcore-nio
4850 (package (inherit java-httpcomponents-httpcore)
4851 (name "java-httpcomponents-httpcore-nio")
4852 (arguments
4853 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4854 #:phases
4855 (modify-phases %standard-phases
4856 (add-after 'unpack 'chdir
4857 (lambda _ (chdir "httpcore-nio") #t)))))
4858 (inputs
4859 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4860 ("java-hamcrest-core" ,java-hamcrest-core)
4861 ,@(package-inputs java-httpcomponents-httpcore)))
4862 (description "HttpCore is a set of low level HTTP transport components
4863that can be used to build custom client and server side HTTP services with a
4864minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4865on the classic Java I/O and non-blocking, event driven I/O model based on Java
4866NIO.
4867
4868This package provides the non-blocking I/O model library based on Java
4869NIO.")))
4870
4871(define-public java-httpcomponents-httpcore-ab
4872 (package (inherit java-httpcomponents-httpcore)
4873 (name "java-httpcomponents-httpcore-ab")
4874 (arguments
4875 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4876 #:phases
4877 (modify-phases %standard-phases
4878 (add-after 'unpack 'chdir
4879 (lambda _ (chdir "httpcore-ab") #t)))))
4880 (inputs
4881 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4882 ("java-commons-cli" ,java-commons-cli)
4883 ("java-hamcrest-core" ,java-hamcrest-core)
4884 ,@(package-inputs java-httpcomponents-httpcore)))
4885 (synopsis "Apache HttpCore benchmarking tool")
4886 (description "This package provides the HttpCore benchmarking tool. It is
4887an Apache AB clone based on HttpCore.")))
4888
4889(define-public java-httpcomponents-httpclient
4890 (package
4891 (name "java-httpcomponents-httpclient")
4892 (version "4.5.3")
4893 (source (origin
4894 (method url-fetch)
4895 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4896 "source/httpcomponents-client-"
4897 version "-src.tar.gz"))
4898 (sha256
4899 (base32
4900 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4901 (build-system ant-build-system)
4902 (arguments
4903 `(#:jar-name "httpcomponents-httpclient.jar"
4904 #:phases
4905 (modify-phases %standard-phases
4906 (add-after 'unpack 'chdir
4907 (lambda _ (chdir "httpclient") #t)))))
4908 (inputs
4909 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4910 ("java-commons-codec" ,java-commons-codec)
4911 ("java-hamcrest-core" ,java-hamcrest-core)
4912 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4913 ("java-mockito" ,java-mockito-1)
4914 ("java-junit" ,java-junit)))
4915 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4916 (synopsis "HTTP client library for Java")
4917 (description "Although the @code{java.net} package provides basic
4918functionality for accessing resources via HTTP, it doesn't provide the full
4919flexibility or functionality needed by many applications. @code{HttpClient}
4920seeks to fill this void by providing an efficient, up-to-date, and
4921feature-rich package implementing the client side of the most recent HTTP
4922standards and recommendations.")
4923 (license license:asl2.0)))
4924
4925(define-public java-httpcomponents-httpmime
4926 (package (inherit java-httpcomponents-httpclient)
4927 (name "java-httpcomponents-httpmime")
4928 (arguments
4929 `(#:jar-name "httpcomponents-httpmime.jar"
4930 #:phases
4931 (modify-phases %standard-phases
4932 (add-after 'unpack 'chdir
4933 (lambda _ (chdir "httpmime") #t)))))
4934 (inputs
4935 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4936 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4937 ("java-junit" ,java-junit)
4938 ("java-hamcrest-core" ,java-hamcrest-core)))))
4939
4940(define-public java-commons-net
4941 (package
4942 (name "java-commons-net")
4943 (version "3.6")
4944 (source (origin
4945 (method url-fetch)
4946 (uri (string-append "mirror://apache/commons/net/source/"
4947 "commons-net-" version "-src.tar.gz"))
4948 (sha256
4949 (base32
4950 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4951 (build-system ant-build-system)
4952 (arguments
4953 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4954 ;; should be "resources/examples/examples.properties"), but gets "null"
4955 ;; instead.
4956 #:tests? #f
4957 #:jar-name "commons-net.jar"))
4958 (native-inputs
4959 `(("java-junit" ,java-junit)
4960 ("java-hamcrest-core" ,java-hamcrest-core)))
4961 (home-page "http://commons.apache.org/net/")
4962 (synopsis "Client library for many basic Internet protocols")
4963 (description "The Apache Commons Net library implements the client side of
4964many basic Internet protocols. The purpose of the library is to provide
4965fundamental protocol access, not higher-level abstractions.")
4966 (license license:asl2.0)))
4967
4968(define-public java-jsch
4969 (package
4970 (name "java-jsch")
4971 (version "0.1.54")
4972 (source (origin
4973 (method url-fetch)
4974 (uri (string-append "mirror://sourceforge/jsch/jsch/"
4975 version "/jsch-" version ".zip"))
4976 (sha256
4977 (base32
4978 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
4979 (build-system ant-build-system)
4980 (arguments
4981 `(#:build-target "dist"
4982 #:tests? #f ; no tests included
4983 #:phases
4984 (modify-phases %standard-phases
4985 (replace 'install (install-jars "dist")))))
4986 (native-inputs
4987 `(("unzip" ,unzip)))
4988 (home-page "http://www.jcraft.com/jsch/")
4989 (synopsis "Pure Java implementation of SSH2")
4990 (description "JSch is a pure Java implementation of SSH2. JSch allows you
4991to connect to an SSH server and use port forwarding, X11 forwarding, file
4992transfer, etc., and you can integrate its functionality into your own Java
4993programs.")
4994 (license license:bsd-3)))
4995
4996(define-public java-commons-compress
4997 (package
4998 (name "java-commons-compress")
4999 (version "1.13")
5000 (source (origin
5001 (method url-fetch)
5002 (uri (string-append "mirror://apache/commons/compress/source/"
5003 "commons-compress-" version "-src.tar.gz"))
5004 (sha256
5005 (base32
5006 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5007 (build-system ant-build-system)
5008 (arguments
5009 `(#:jar-name "commons-compress.jar"
5010 #:phases
5011 (modify-phases %standard-phases
5012 (add-after 'unpack 'delete-bad-tests
5013 (lambda _
5014 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5015 ;; FIXME: These tests really should not fail. Maybe they are
5016 ;; indicative of problems with our Java packaging work.
5017
5018 ;; This test fails with a null pointer exception.
5019 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5020 ;; This test fails to open test resources.
5021 (delete-file "archivers/zip/ExplodeSupportTest.java")
5022
5023 ;; FIXME: This test adds a dependency on powermock, which is hard to
5024 ;; package at this point.
5025 ;; https://github.com/powermock/powermock
5026 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5027 #t)))))
5028 (inputs
5029 `(("java-junit" ,java-junit)
5030 ("java-hamcrest-core" ,java-hamcrest-core)
5031 ("java-mockito" ,java-mockito-1)
5032 ("java-xz" ,java-xz)))
5033 (home-page "https://commons.apache.org/proper/commons-compress/")
5034 (synopsis "Java library for working with compressed files")
5035 (description "The Apache Commons Compress library defines an API for
5036working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5037Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5038 (license license:asl2.0)))
5039
5040(define-public java-commons-csv
5041 (package
5042 (name "java-commons-csv")
5043 (version "1.4")
5044 (source (origin
5045 (method url-fetch)
5046 (uri (string-append "mirror://apache/commons/csv/source/"
5047 "commons-csv-" version "-src.tar.gz"))
5048 (sha256
5049 (base32
5050 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5051 (build-system ant-build-system)
5052 (arguments
5053 `(#:jar-name "commons-csv.jar"
5054 #:source-dir "src/main/java"
5055 #:tests? #f)); FIXME: requires java-h2
5056 (inputs
5057 `(("java-hamcrest-core" ,java-hamcrest-core)
5058 ("java-commons-io" ,java-commons-io)
5059 ("java-commons-lang3" ,java-commons-lang3)
5060 ("junit" ,java-junit)))
5061 (home-page "https://commons.apache.org/proper/commons-csv/")
5062 (synopsis "Read and write CSV documents")
5063 (description "Commons CSV reads and writes files in variations of the Comma
5064Separated Value (CSV) format. The most common CSV formats are predefined in the
5065CSVFormat class:
5066
5067@itemize
5068@item Microsoft Excel
5069@item Informix UNLOAD
5070@item Informix UNLOAD CSV
5071@item MySQL
5072@item RFC 4180
5073@item TDF
5074@end itemize
5075
5076Custom formats can be created using a fluent style API.")
5077 (license license:asl2.0)))
5078
5079(define-public java-osgi-annotation
5080 (package
5081 (name "java-osgi-annotation")
5082 (version "6.0.0")
5083 (source (origin
5084 (method url-fetch)
5085 (uri (string-append "https://repo1.maven.org/maven2/"
5086 "org/osgi/org.osgi.annotation/" version "/"
5087 "org.osgi.annotation-" version "-sources.jar"))
5088 (sha256
5089 (base32
5090 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5091 (build-system ant-build-system)
5092 (arguments
5093 `(#:tests? #f ; no tests
5094 #:jar-name "osgi-annotation.jar"))
5095 (home-page "https://www.osgi.org")
5096 (synopsis "Annotation module of OSGi framework")
5097 (description
5098 "OSGi, for Open Services Gateway initiative framework, is a module system
5099and service platform for the Java programming language. This package contains
5100the OSGi annotation module, providing additional services to help dynamic
5101components.")
5102 (license license:asl2.0)))
5103
5104(define-public java-osgi-core
5105 (package
5106 (name "java-osgi-core")
5107 (version "6.0.0")
5108 (source (origin
5109 (method url-fetch)
5110 (uri (string-append "https://repo1.maven.org/maven2/"
5111 "org/osgi/org.osgi.core/" version "/"
5112 "org.osgi.core-" version "-sources.jar"))
5113 (sha256
5114 (base32
5115 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5116 (build-system ant-build-system)
5117 (arguments
5118 `(#:tests? #f ; no tests
5119 #:jar-name "osgi-core.jar"))
5120 (inputs
5121 `(("java-osgi-annotation" ,java-osgi-annotation)))
5122 (home-page "https://www.osgi.org")
5123 (synopsis "Core module of OSGi framework")
5124 (description
5125 "OSGi, for Open Services Gateway initiative framework, is a module system
5126and service platform for the Java programming language. This package contains
5127the OSGi Core module.")
5128 (license license:asl2.0)))
5129
5130(define-public java-osgi-service-event
5131 (package
5132 (name "java-osgi-service-event")
5133 (version "1.3.1")
5134 (source (origin
5135 (method url-fetch)
5136 (uri (string-append "https://repo1.maven.org/maven2/"
5137 "org/osgi/org.osgi.service.event/"
5138 version "/org.osgi.service.event-"
5139 version "-sources.jar"))
5140 (sha256
5141 (base32
5142 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5143 (build-system ant-build-system)
5144 (arguments
5145 `(#:tests? #f ; no tests
5146 #:jar-name "osgi-service-event.jar"))
5147 (inputs
5148 `(("java-osgi-annotation" ,java-osgi-annotation)
5149 ("java-osgi-core" ,java-osgi-core)))
5150 (home-page "https://www.osgi.org")
5151 (synopsis "OSGi service event module")
5152 (description
5153 "OSGi, for Open Services Gateway initiative framework, is a module system
5154and service platform for the Java programming language. This package contains
5155the OSGi @code{org.osgi.service.event} module.")
5156 (license license:asl2.0)))
5157
5158(define-public java-eclipse-osgi
5159 (package
5160 (name "java-eclipse-osgi")
5161 (version "3.11.3")
5162 (source (origin
5163 (method url-fetch)
5164 (uri (string-append "https://repo1.maven.org/maven2/"
5165 "org/eclipse/platform/org.eclipse.osgi/"
5166 version "/org.eclipse.osgi-"
5167 version "-sources.jar"))
5168 (sha256
5169 (base32
5170 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5171 (build-system ant-build-system)
5172 (arguments
5173 `(#:tests? #f ; no tests included
5174 #:jar-name "eclipse-equinox-osgi.jar"))
5175 (inputs
5176 `(("java-osgi-annotation" ,java-osgi-annotation)))
5177 (home-page "http://www.eclipse.org/equinox/")
5178 (synopsis "Eclipse Equinox OSGi framework")
5179 (description "This package provides an implementation of the OSGi Core
5180specification.")
5181 (license license:epl1.0)))
5182
5183(define-public java-eclipse-equinox-common
5184 (package
5185 (name "java-eclipse-equinox-common")
5186 (version "3.8.0")
5187 (source (origin
5188 (method url-fetch)
5189 (uri (string-append "https://repo1.maven.org/maven2/"
5190 "org/eclipse/platform/org.eclipse.equinox.common/"
5191 version "/org.eclipse.equinox.common-"
5192 version "-sources.jar"))
5193 (sha256
5194 (base32
5195 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
5196 (build-system ant-build-system)
5197 (arguments
5198 `(#:tests? #f ; no tests included
5199 #:jar-name "eclipse-equinox-common.jar"))
5200 (inputs
5201 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5202 (home-page "http://www.eclipse.org/equinox/")
5203 (synopsis "Common Eclipse runtime")
5204 (description "This package provides the common Eclipse runtime.")
5205 (license license:epl1.0)))
5206
5207(define-public java-eclipse-core-jobs
5208 (package
5209 (name "java-eclipse-core-jobs")
5210 (version "3.8.0")
5211 (source (origin
5212 (method url-fetch)
5213 (uri (string-append "https://repo1.maven.org/maven2/"
5214 "org/eclipse/platform/org.eclipse.core.jobs/"
5215 version "/org.eclipse.core.jobs-"
5216 version "-sources.jar"))
5217 (sha256
5218 (base32
5219 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5220 (build-system ant-build-system)
5221 (arguments
5222 `(#:tests? #f ; no tests included
5223 #:jar-name "eclipse-core-jobs.jar"))
5224 (inputs
5225 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5226 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5227 (home-page "http://www.eclipse.org/equinox/")
5228 (synopsis "Eclipse jobs mechanism")
5229 (description "This package provides the Eclipse jobs mechanism.")
5230 (license license:epl1.0)))
5231
5232(define-public java-eclipse-equinox-registry
5233 (package
5234 (name "java-eclipse-equinox-registry")
5235 (version "3.6.100")
5236 (source (origin
5237 (method url-fetch)
5238 (uri (string-append "https://repo1.maven.org/maven2/"
5239 "org/eclipse/platform/org.eclipse.equinox.registry/"
5240 version "/org.eclipse.equinox.registry-"
5241 version "-sources.jar"))
5242 (sha256
5243 (base32
5244 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5245 (build-system ant-build-system)
5246 (arguments
5247 `(#:tests? #f ; no tests included
5248 #:jar-name "eclipse-equinox-registry.jar"))
5249 (inputs
5250 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5251 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5252 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5253 (home-page "http://www.eclipse.org/equinox/")
5254 (synopsis "Eclipse extension registry support")
5255 (description "This package provides support for the Eclipse extension
5256registry.")
5257 (license license:epl1.0)))
5258
5259(define-public java-eclipse-equinox-app
5260 (package
5261 (name "java-eclipse-equinox-app")
5262 (version "1.3.400")
5263 (source (origin
5264 (method url-fetch)
5265 (uri (string-append "https://repo1.maven.org/maven2/"
5266 "org/eclipse/platform/org.eclipse.equinox.app/"
5267 version "/org.eclipse.equinox.app-"
5268 version "-sources.jar"))
5269 (sha256
5270 (base32
5271 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5272 (build-system ant-build-system)
5273 (arguments
5274 `(#:tests? #f ; no tests included
5275 #:jar-name "eclipse-equinox-app.jar"))
5276 (inputs
5277 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5278 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5279 ("java-eclipse-osgi" ,java-eclipse-osgi)
5280 ("java-osgi-service-event" ,java-osgi-service-event)))
5281 (home-page "http://www.eclipse.org/equinox/")
5282 (synopsis "Equinox application container")
5283 (description "This package provides the Equinox application container for
5284Eclipse.")
5285 (license license:epl1.0)))
5286
5287(define-public java-eclipse-equinox-preferences
5288 (package
5289 (name "java-eclipse-equinox-preferences")
5290 (version "3.6.1")
5291 (source (origin
5292 (method url-fetch)
5293 (uri (string-append "https://repo1.maven.org/maven2/"
5294 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5295 version "/org.eclipse.equinox.preferences-"
5296 version "-sources.jar"))
5297 (sha256
5298 (base32
5299 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5300 (build-system ant-build-system)
5301 (arguments
5302 `(#:tests? #f ; no tests included
5303 #:jar-name "eclipse-equinox-preferences.jar"))
5304 (inputs
5305 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5306 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5307 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5308 (home-page "http://www.eclipse.org/equinox/")
5309 (synopsis "Eclipse preferences mechanism")
5310 (description "This package provides the Eclipse preferences mechanism with
5311the module @code{org.eclipse.equinox.preferences}.")
5312 (license license:epl1.0)))
5313
5314(define-public java-eclipse-core-contenttype
5315 (package
5316 (name "java-eclipse-core-contenttype")
5317 (version "3.5.100")
5318 (source (origin
5319 (method url-fetch)
5320 (uri (string-append "https://repo1.maven.org/maven2/"
5321 "org/eclipse/platform/org.eclipse.core.contenttype/"
5322 version "/org.eclipse.core.contenttype-"
5323 version "-sources.jar"))
5324 (sha256
5325 (base32
5326 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5327 (build-system ant-build-system)
5328 (arguments
5329 `(#:tests? #f ; no tests included
5330 #:jar-name "eclipse-core-contenttype.jar"))
5331 (inputs
5332 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5333 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5334 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5335 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5336 (home-page "http://www.eclipse.org/")
5337 (synopsis "Eclipse content mechanism")
5338 (description "This package provides the Eclipse content mechanism in the
5339@code{org.eclipse.core.contenttype} module.")
5340 (license license:epl1.0)))
5341
5342(define-public java-eclipse-core-runtime
5343 (package
5344 (name "java-eclipse-core-runtime")
5345 (version "3.12.0")
5346 (source (origin
5347 (method url-fetch)
5348 (uri (string-append "https://repo1.maven.org/maven2/"
5349 "org/eclipse/platform/org.eclipse.core.runtime/"
5350 version "/org.eclipse.core.runtime-"
5351 version "-sources.jar"))
5352 (sha256
5353 (base32
5354 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5355 (build-system ant-build-system)
5356 (arguments
5357 `(#:tests? #f ; no tests included
5358 #:jar-name "eclipse-core-runtime.jar"))
5359 (inputs
5360 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5361 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5362 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5363 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5364 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5365 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5366 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5367 (home-page "https://www.eclipse.org/")
5368 (synopsis "Eclipse core runtime")
5369 (description "This package provides the Eclipse core runtime with the
5370module @code{org.eclipse.core.runtime}.")
5371 (license license:epl1.0)))
5372
5373(define-public java-eclipse-core-filesystem
5374 (package
5375 (name "java-eclipse-core-filesystem")
5376 (version "1.6.1")
5377 (source (origin
5378 (method url-fetch)
5379 (uri (string-append "https://repo1.maven.org/maven2/"
5380 "org/eclipse/platform/org.eclipse.core.filesystem/"
5381 version "/org.eclipse.core.filesystem-"
5382 version "-sources.jar"))
5383 (sha256
5384 (base32
5385 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5386 (build-system ant-build-system)
5387 (arguments
5388 `(#:tests? #f ; no tests included
5389 #:jar-name "eclipse-core-filesystem.jar"))
5390 (inputs
5391 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5392 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5393 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5394 (home-page "https://www.eclipse.org/")
5395 (synopsis "Eclipse core file system")
5396 (description "This package provides the Eclipse core file system with the
5397module @code{org.eclipse.core.filesystem}.")
5398 (license license:epl1.0)))
5399
5400(define-public java-eclipse-core-expressions
5401 (package
5402 (name "java-eclipse-core-expressions")
5403 (version "3.5.100")
5404 (source (origin
5405 (method url-fetch)
5406 (uri (string-append "https://repo1.maven.org/maven2/"
5407 "org/eclipse/platform/org.eclipse.core.expressions/"
5408 version "/org.eclipse.core.expressions-"
5409 version "-sources.jar"))
5410 (sha256
5411 (base32
5412 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5413 (build-system ant-build-system)
5414 (arguments
5415 `(#:tests? #f ; no tests included
5416 #:jar-name "eclipse-core-expressions.jar"))
5417 (inputs
5418 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5419 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5420 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5421 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5422 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5423 (home-page "https://www.eclipse.org/")
5424 (synopsis "Eclipse core expression language")
5425 (description "This package provides the Eclipse core expression language
5426with the @code{org.eclipse.core.expressions} module.")
5427 (license license:epl1.0)))
5428
5429(define-public java-eclipse-core-variables
5430 (package
5431 (name "java-eclipse-core-variables")
5432 (version "3.3.0")
5433 (source (origin
5434 (method url-fetch)
5435 (uri (string-append "https://repo1.maven.org/maven2/"
5436 "org/eclipse/platform/org.eclipse.core.variables/"
5437 version "/org.eclipse.core.variables-"
5438 version "-sources.jar"))
5439 (sha256
5440 (base32
5441 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5442 (build-system ant-build-system)
5443 (arguments
5444 `(#:tests? #f ; no tests included
5445 #:jar-name "eclipse-core-variables.jar"))
5446 (inputs
5447 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5448 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5449 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5450 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5451 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5452 (home-page "https://www.eclipse.org/platform")
5453 (synopsis "Eclipse core variables")
5454 (description "This package provides the Eclipse core variables module
5455@code{org.eclipse.core.variables}.")
5456 (license license:epl1.0)))
5457
5458(define-public java-eclipse-ant-core
5459 (package
5460 (name "java-eclipse-ant-core")
5461 (version "3.4.100")
5462 (source (origin
5463 (method url-fetch)
5464 (uri (string-append "https://repo1.maven.org/maven2/"
5465 "org/eclipse/platform/org.eclipse.ant.core/"
5466 version "/org.eclipse.ant.core-"
5467 version "-sources.jar"))
5468 (sha256
5469 (base32
5470 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5471 (build-system ant-build-system)
5472 (arguments
5473 `(#:tests? #f ; no tests included
5474 #:jar-name "eclipse-ant-core.jar"))
5475 (inputs
5476 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5477 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5478 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5479 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5480 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5481 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5482 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5483 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5484 (home-page "https://www.eclipse.org/platform")
5485 (synopsis "Ant build tool core libraries")
5486 (description "This package provides the ant build tool core libraries with
5487the module @code{org.eclipse.ant.core}.")
5488 (license license:epl1.0)))
5489
5490(define-public java-eclipse-core-resources
5491 (package
5492 (name "java-eclipse-core-resources")
5493 (version "3.11.1")
5494 (source (origin
5495 (method url-fetch)
5496 (uri (string-append "https://repo1.maven.org/maven2/"
5497 "org/eclipse/platform/org.eclipse.core.resources/"
5498 version "/org.eclipse.core.resources-"
5499 version "-sources.jar"))
5500 (sha256
5501 (base32
5502 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5503 (build-system ant-build-system)
5504 (arguments
5505 `(#:tests? #f ; no tests included
5506 #:jar-name "eclipse-core-resources.jar"))
5507 (inputs
5508 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5509 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5510 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5511 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5512 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5513 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5514 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5515 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5516 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5517 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5518 (home-page "https://www.eclipse.org/")
5519 (synopsis "Eclipse core resource management")
5520 (description "This package provides the Eclipse core resource management
5521module @code{org.eclipse.core.resources}.")
5522 (license license:epl1.0)))
5523
5524(define-public java-eclipse-compare-core
5525 (package
5526 (name "java-eclipse-compare-core")
5527 (version "3.6.0")
5528 (source (origin
5529 (method url-fetch)
5530 (uri (string-append "https://repo1.maven.org/maven2/"
5531 "org/eclipse/platform/org.eclipse.compare.core/"
5532 version "/org.eclipse.compare.core-"
5533 version "-sources.jar"))
5534 (sha256
5535 (base32
5536 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5537 (build-system ant-build-system)
5538 (arguments
5539 `(#:tests? #f ; no tests included
5540 #:jar-name "eclipse-compare-core.jar"))
5541 (inputs
5542 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5543 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5544 ("java-eclipse-osgi" ,java-eclipse-osgi)
5545 ("java-icu4j" ,java-icu4j)))
5546 (home-page "https://www.eclipse.org/")
5547 (synopsis "Eclipse core compare support")
5548 (description "This package provides the Eclipse core compare support
5549module @code{org.eclipse.compare.core}.")
5550 (license license:epl1.0)))
5551
5552(define-public java-eclipse-team-core
5553 (package
5554 (name "java-eclipse-team-core")
5555 (version "3.8.0")
5556 (source (origin
5557 (method url-fetch)
5558 (uri (string-append "https://repo1.maven.org/maven2/"
5559 "org/eclipse/platform/org.eclipse.team.core/"
5560 version "/org.eclipse.team.core-"
5561 version "-sources.jar"))
5562 (sha256
5563 (base32
5564 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5565 (build-system ant-build-system)
5566 (arguments
5567 `(#:tests? #f ; no tests included
5568 #:jar-name "eclipse-team-core.jar"))
5569 (inputs
5570 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5571 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5572 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5573 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5574 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5575 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5576 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5577 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5578 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5579 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5580 (home-page "https://www.eclipse.org/platform")
5581 (synopsis "Eclipse team support core")
5582 (description "This package provides the Eclipse team support core module
5583@code{org.eclipse.team.core}.")
5584 (license license:epl1.0)))
5585
5586(define-public java-eclipse-core-commands
5587 (package
5588 (name "java-eclipse-core-commands")
5589 (version "3.8.1")
5590 (source (origin
5591 (method url-fetch)
5592 (uri (string-append "https://repo1.maven.org/maven2/"
5593 "org/eclipse/platform/org.eclipse.core.commands/"
5594 version "/org.eclipse.core.commands-"
5595 version "-sources.jar"))
5596 (sha256
5597 (base32
5598 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5599 (build-system ant-build-system)
5600 (arguments
5601 `(#:tests? #f ; no tests included
5602 #:jar-name "eclipse-core-commands.jar"))
5603 (inputs
5604 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5605 (home-page "https://www.eclipse.org/platform")
5606 (synopsis "Eclipse core commands")
5607 (description "This package provides Eclipse core commands in the module
5608@code{org.eclipse.core.commands}.")
5609 (license license:epl1.0)))
5610
5611(define-public java-eclipse-text
5612 (package
5613 (name "java-eclipse-text")
5614 (version "3.6.0")
5615 (source (origin
5616 (method url-fetch)
5617 (uri (string-append "https://repo1.maven.org/maven2/"
5618 "org/eclipse/platform/org.eclipse.text/"
5619 version "/org.eclipse.text-"
5620 version "-sources.jar"))
5621 (sha256
5622 (base32
5623 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5624 (build-system ant-build-system)
5625 (arguments
5626 `(#:tests? #f ; no tests included
5627 #:jar-name "eclipse-text.jar"
5628 #:phases
5629 (modify-phases %standard-phases
5630 ;; When creating a new category we must make sure that the new list
5631 ;; matches List<Position>. By default it seems to be too generic
5632 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5633 ;; Without this we get this error:
5634 ;;
5635 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5636 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5637 ;; [javac] fPositions.put(category, new ArrayList<>());
5638 ;; [javac] ^
5639 ;; [javac] required: String,List<Position>
5640 ;; [javac] found: String,ArrayList<Object>
5641 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5642 ;; to List<Position> by method invocation conversion
5643 ;; [javac] where K,V are type-variables:
5644 ;; [javac] K extends Object declared in interface Map
5645 ;; [javac] V extends Object declared in interface Map
5646 ;;
5647 ;; I don't know if this is a good fix. I suspect it is not, but it
5648 ;; seems to work.
5649 (add-after 'unpack 'fix-compilation-error
5650 (lambda _
5651 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5652 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5653 "Positions.put(category, new ArrayList<Position>());"))
5654 #t)))))
5655 (inputs
5656 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5657 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5658 ("java-icu4j" ,java-icu4j)))
5659 (home-page "http://www.eclipse.org/platform")
5660 (synopsis "Eclipse text library")
5661 (description "Platform Text is part of the Platform UI project and
5662provides the basic building blocks for text and text editors within Eclipse
5663and contributes the Eclipse default text editor.")
5664 (license license:epl1.0)))
5665
5666(define-public java-eclipse-jdt-core
5667 (package
5668 (name "java-eclipse-jdt-core")
5669 (version "3.12.3")
5670 (source (origin
5671 (method url-fetch)
5672 (uri (string-append "https://repo1.maven.org/maven2/"
5673 "org/eclipse/jdt/org.eclipse.jdt.core/"
5674 version "/org.eclipse.jdt.core-"
5675 version "-sources.jar"))
5676 (sha256
5677 (base32
5678 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5679 (build-system ant-build-system)
5680 (arguments
5681 `(#:tests? #f ; no tests included
5682 #:jar-name "eclipse-jdt-core.jar"))
5683 (inputs
5684 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5685 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5686 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5687 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5688 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5689 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5690 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5691 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5692 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5693 ("java-eclipse-osgi" ,java-eclipse-osgi)
5694 ("java-eclipse-text" ,java-eclipse-text)))
5695 (home-page "https://www.eclipse.org/jdt")
5696 (synopsis "Java development tools core libraries")
5697 (description "This package provides the core libraries of the Eclipse Java
5698development tools.")
5699 (license license:epl1.0)))
5700
5701(define-public java-javax-mail
5702 (package
5703 (name "java-javax-mail")
5704 (version "1.5.6")
5705 (source (origin
5706 (method url-fetch)
5707 (uri (string-append "https://repo1.maven.org/maven2/"
5708 "com/sun/mail/javax.mail/"
5709 version "/javax.mail-"
5710 version "-sources.jar"))
5711 (sha256
5712 (base32
5713 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5714 (build-system ant-build-system)
5715 (arguments
5716 `(#:tests? #f ; no tests
5717 #:jar-name "javax-mail.jar"))
5718 (home-page "https://javamail.java.net")
5719 (synopsis "Reference implementation of the JavaMail API")
5720 (description
5721 "This package provides versions of the JavaMail API implementation, IMAP,
5722SMTP, and POP3 service providers, some examples, and documentation for the
5723JavaMail API.")
5724 ;; GPLv2 only with "classpath exception".
5725 (license license:gpl2)))
5726
5727(define-public java-log4j-api
5728 (package
5729 (name "java-log4j-api")
5730 (version "2.4.1")
5731 (source (origin
5732 (method url-fetch)
5733 (uri (string-append "mirror://apache/logging/log4j/" version
5734 "/apache-log4j-" version "-src.tar.gz"))
5735 (sha256
5736 (base32
5737 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5738 (build-system ant-build-system)
5739 (arguments
5740 `(#:tests? #f ; tests require unpackaged software
5741 #:jar-name "log4j-api.jar"
5742 #:make-flags
5743 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5744 "/share/java"))
5745 #:phases
5746 (modify-phases %standard-phases
5747 (add-after 'unpack 'enter-dir
5748 (lambda _ (chdir "log4j-api") #t))
5749 ;; FIXME: The tests require additional software that has not been
5750 ;; packaged yet, such as
5751 ;; * org.apache.maven
5752 ;; * org.apache.felix
5753 (add-after 'enter-dir 'delete-tests
5754 (lambda _ (delete-file-recursively "src/test") #t)))))
5755 (inputs
5756 `(("java-osgi-core" ,java-osgi-core)
5757 ("java-hamcrest-core" ,java-hamcrest-core)
5758 ("java-junit" ,java-junit)))
5759 (home-page "http://logging.apache.org/log4j/2.x/")
5760 (synopsis "API module of the Log4j logging framework for Java")
5761 (description
5762 "This package provides the API module of the Log4j logging framework for
5763Java.")
5764 (license license:asl2.0)))
5765
5766(define-public java-log4j-core
5767 (package
5768 (inherit java-log4j-api)
5769 (name "java-log4j-core")
5770 (inputs
5771 `(("java-osgi-core" ,java-osgi-core)
5772 ("java-hamcrest-core" ,java-hamcrest-core)
5773 ("java-log4j-api" ,java-log4j-api)
5774 ("java-mail" ,java-mail)
5775 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5776 ("java-lmax-disruptor" ,java-lmax-disruptor)
5777 ("java-kafka" ,java-kafka-clients)
5778 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5779 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5780 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5781 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5782 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5783 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5784 ("java-commons-compress" ,java-commons-compress)
5785 ("java-commons-csv" ,java-commons-csv)
5786 ("java-jeromq" ,java-jeromq)
5787 ("java-junit" ,java-junit)))
5788 (native-inputs
5789 `(("hamcrest" ,java-hamcrest-all)
5790 ("java-commons-io" ,java-commons-io)
5791 ("java-commons-lang3" ,java-commons-lang3)
5792 ("slf4j" ,java-slf4j-api)))
5793 (arguments
5794 `(#:tests? #f ; tests require more dependencies
5795 #:test-dir "src/test"
5796 #:source-dir "src/main/java"
5797 #:jar-name "log4j-core.jar"
5798 #:jdk ,icedtea-8
5799 #:make-flags
5800 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5801 "/share/java"))
5802 #:phases
5803 (modify-phases %standard-phases
5804 (add-after 'unpack 'enter-dir
5805 (lambda _ (chdir "log4j-core") #t)))))
5806 (synopsis "Core component of the Log4j framework")
5807 (description "This package provides the core component of the Log4j
5808logging framework for Java.")))
5809
5810(define-public java-log4j-1.2-api
5811 (package
5812 (inherit java-log4j-api)
5813 (name "java-log4j-1.2-api")
5814 (arguments
5815 `(#:jar-name "java-log4j-1.2-api.jar"
5816 #:source-dir "log4j-1.2-api/src/main/java"
5817 #:jdk ,icedtea-8
5818 ;; Tests require maven-model (and other maven subprojects), which is a
5819 ;; cyclic dependency.
5820 #:tests? #f))
5821 (inputs
5822 `(("log4j-api" ,java-log4j-api)
5823 ("log4j-core" ,java-log4j-core)
5824 ("osgi-core" ,java-osgi-core)
5825 ("eclipse-osgi" ,java-eclipse-osgi)
5826 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5827
5828(define-public java-commons-cli
5829 (package
5830 (name "java-commons-cli")
5831 (version "1.4")
5832 (source (origin
5833 (method url-fetch)
5834 (uri (string-append "mirror://apache/commons/cli/source/"
5835 "commons-cli-" version "-src.tar.gz"))
5836 (sha256
5837 (base32
5838 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
5839 (build-system ant-build-system)
5840 ;; TODO: javadoc
5841 (arguments
5842 `(#:jar-name "commons-cli.jar"))
5843 (native-inputs
5844 `(("java-junit" ,java-junit)
5845 ("java-hamcrest-core" ,java-hamcrest-core)))
5846 (home-page "http://commons.apache.org/cli/")
5847 (synopsis "Command line arguments and options parsing library")
5848 (description "The Apache Commons CLI library provides an API for parsing
5849command line options passed to programs. It is also able to print help
5850messages detailing the options available for a command line tool.
5851
5852Commons CLI supports different types of options:
5853
5854@itemize
5855@item POSIX like options (ie. tar -zxvf foo.tar.gz)
5856@item GNU like long options (ie. du --human-readable --max-depth=1)
5857@item Java like properties (ie. java -Djava.awt.headless=true Foo)
5858@item Short options with value attached (ie. gcc -O2 foo.c)
5859@item long options with single hyphen (ie. ant -projecthelp)
5860@end itemize
5861
5862This is a part of the Apache Commons Project.")
5863 (license license:asl2.0)))
5864
5865(define-public java-commons-codec
5866 (package
5867 (name "java-commons-codec")
5868 (version "1.10")
5869 (source (origin
5870 (method url-fetch)
5871 (uri (string-append "mirror://apache/commons/codec/source/"
5872 "commons-codec-" version "-src.tar.gz"))
5873 (sha256
5874 (base32
5875 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5876 (build-system ant-build-system)
5877 (outputs '("out" "doc"))
5878 (arguments
5879 `(#:test-target "test"
5880 #:make-flags
5881 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5882 (junit (assoc-ref %build-inputs "java-junit")))
5883 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5884 (string-append "-Dhamcrest.jar=" hamcrest
5885 "/share/java/hamcrest-core.jar")
5886 ;; Do not append version to jar.
5887 "-Dfinal.name=commons-codec"))
5888 #:phases
5889 (modify-phases %standard-phases
5890 (add-after 'build 'build-javadoc ant-build-javadoc)
5891 (replace 'install (install-jars "dist"))
5892 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5893 (native-inputs
5894 `(("java-junit" ,java-junit)
5895 ("java-hamcrest-core" ,java-hamcrest-core)))
5896 (home-page "http://commons.apache.org/codec/")
5897 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5898 (description "The codec package contains simple encoder and decoders for
5899various formats such as Base64 and Hexadecimal. In addition to these widely
5900used encoders and decoders, the codec package also maintains a collection of
5901phonetic encoding utilities.
5902
5903This is a part of the Apache Commons Project.")
5904 (license license:asl2.0)))
5905
5906(define-public java-commons-daemon
5907 (package
5908 (name "java-commons-daemon")
5909 (version "1.0.15")
5910 (source (origin
5911 (method url-fetch)
5912 (uri (string-append "mirror://apache/commons/daemon/source/"
5913 "commons-daemon-" version "-src.tar.gz"))
5914 (sha256
5915 (base32
5916 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5917 (build-system ant-build-system)
5918 (arguments
5919 `(#:test-target "test"
5920 #:phases
5921 (modify-phases %standard-phases
5922 (add-after 'build 'build-javadoc ant-build-javadoc)
5923 (replace 'install (install-jars "dist"))
5924 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5925 (native-inputs
5926 `(("java-junit" ,java-junit)))
5927 (home-page "http://commons.apache.org/daemon/")
5928 (synopsis "Library to launch Java applications as daemons")
5929 (description "The Daemon package from Apache Commons can be used to
5930implement Java applications which can be launched as daemons. For example the
5931program will be notified about a shutdown so that it can perform cleanup tasks
5932before its process of execution is destroyed by the operation system.
5933
5934This package contains the Java library. You will also need the actual binary
5935for your architecture which is provided by the jsvc package.
5936
5937This is a part of the Apache Commons Project.")
5938 (license license:asl2.0)))
5939
5940(define-public java-javaewah
5941 (package
5942 (name "java-javaewah")
5943 (version "1.1.6")
5944 (source (origin
5945 (method url-fetch)
5946 (uri (string-append "https://github.com/lemire/javaewah/"
5947 "archive/JavaEWAH-" version ".tar.gz"))
5948 (sha256
5949 (base32
5950 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5951 (build-system ant-build-system)
5952 (arguments `(#:jar-name "javaewah.jar"))
5953 (inputs
5954 `(("java-junit" ,java-junit)
5955 ("java-hamcrest-core" ,java-hamcrest-core)))
5956 (home-page "https://github.com/lemire/javaewah")
5957 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5958 (description "This is a word-aligned compressed variant of the Java
5959@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
5960compression scheme. It can be used to implement bitmap indexes.
5961
5962The goal of word-aligned compression is not to achieve the best compression,
5963but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
5964cycles, maybe at the expense of storage. However, the EWAH scheme is always
5965more efficient storage-wise than an uncompressed bitmap (as implemented in the
5966@code{BitSet} class by Sun).")
5967 ;; GPL2.0 derivates are explicitly allowed.
5968 (license license:asl2.0)))
5969
5970(define-public java-slf4j-api
5971 (package
5972 (name "java-slf4j-api")
5973 (version "1.7.25")
5974 (source (origin
5975 (method url-fetch)
5976 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
5977 version ".tar.gz"))
5978 (sha256
5979 (base32
5980 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
5981 (modules '((guix build utils)))
5982 ;; Delete bundled jars.
5983 (snippet
5984 '(begin
5985 (for-each delete-file (find-files "." "\\.jar$"))
5986 #t))))
5987 (build-system ant-build-system)
5988 (arguments
5989 `(#:jar-name "slf4j-api.jar"
5990 #:source-dir "slf4j-api/src/main"
5991 #:test-dir "slf4j-api/src/test"
5992 #:phases
5993 (modify-phases %standard-phases
5994 (add-after 'build 'regenerate-jar
5995 (lambda _
5996 ;; pom.xml ignores these files in the jar creation process. If we don't,
5997 ;; we get the error "This code should have never made it into slf4j-api.jar"
5998 (delete-file-recursively "build/classes/org/slf4j/impl")
5999 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6000 "build/classes" ".")))
6001 (add-before 'check 'dont-test-abstract-classes
6002 (lambda _
6003 ;; abstract classes are not meant to be run with junit
6004 (substitute* "build.xml"
6005 (("<include name=\"\\*\\*/\\*Test.java\" />")
6006 (string-append "<include name=\"**/*Test.java\" />"
6007 "<exclude name=\"**/MultithreadedInitializationTest"
6008 ".java\" />")))
6009 #t)))))
6010 (inputs
6011 `(("java-junit" ,java-junit)
6012 ("java-hamcrest-core" ,java-hamcrest-core)))
6013 (home-page "https://www.slf4j.org/")
6014 (synopsis "Simple logging facade for Java")
6015 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6016simple facade or abstraction for various logging
6017frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6018allowing the end user to plug in the desired logging framework at deployment
6019time.")
6020 (license license:expat)))
6021
6022(define java-slf4j-api-bootstrap
6023 (package
6024 (inherit java-slf4j-api)
6025 (name "java-slf4j-api-bootstrap")
6026 (inputs `())
6027 (arguments
6028 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6029 ((#:tests? _ #f) #f)))))
6030
6031(define-public java-slf4j-simple
6032 (package
6033 (name "java-slf4j-simple")
6034 (version "1.7.25")
6035 (source (package-source java-slf4j-api))
6036 (build-system ant-build-system)
6037 (arguments
6038 `(#:jar-name "slf4j-simple.jar"
6039 #:source-dir "slf4j-simple/src/main"
6040 #:test-dir "slf4j-simple/src/test"
6041 #:phases
6042 (modify-phases %standard-phases
6043 ;; The tests need some test classes from slf4j-api
6044 (add-before 'check 'build-slf4j-api-test-helpers
6045 (lambda _
6046 ;; Add current dir to CLASSPATH ...
6047 (setenv "CLASSPATH"
6048 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6049 ;; ... and build test helper classes here:
6050 (apply invoke
6051 `("javac" "-d" "."
6052 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6053 (inputs
6054 `(("java-junit" ,java-junit)
6055 ("java-hamcrest-core" ,java-hamcrest-core)
6056 ("java-slf4j-api" ,java-slf4j-api)))
6057 (home-page "https://www.slf4j.org/")
6058 (synopsis "Simple implementation of simple logging facade for Java")
6059 (description "SLF4J binding for the Simple implementation, which outputs
6060all events to System.err. Only messages of level INFO and higher are
6061printed.")
6062 (license license:expat)))
6063
6064(define-public antlr2
6065 (package
6066 (name "antlr2")
6067 (version "2.7.7")
6068 (source (origin
6069 (method url-fetch)
6070 (uri (string-append "http://www.antlr2.org/download/antlr-"
6071 version ".tar.gz"))
6072 (sha256
6073 (base32
6074 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6075 (modules '((guix build utils)))
6076 (snippet
6077 '(begin
6078 (delete-file "antlr.jar")
6079 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6080 (("#include <map>")
6081 (string-append
6082 "#include <map>\n"
6083 "#define EOF (-1)\n"
6084 "#include <strings.h>")))
6085 (substitute* "configure"
6086 (("/bin/sh") "sh"))
6087 #t))))
6088 (build-system gnu-build-system)
6089 (arguments
6090 `(#:tests? #f ; no test target
6091 #:imported-modules ((guix build ant-build-system)
6092 (guix build syscalls)
6093 ,@%gnu-build-system-modules)
6094 #:modules (((guix build ant-build-system) #:prefix ant:)
6095 (guix build gnu-build-system)
6096 (guix build utils))
6097 #:phases
6098 (modify-phases %standard-phases
6099 (add-after 'install 'strip-jar-timestamps
6100 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6101 (add-after 'configure 'fix-bin-ls
6102 (lambda _
6103 (substitute* (find-files "." "Makefile")
6104 (("/bin/ls") "ls"))
6105 #t)))))
6106 (native-inputs
6107 `(("which" ,which)
6108 ("zip" ,zip)
6109 ("java" ,icedtea "jdk")))
6110 (inputs
6111 `(("java" ,icedtea)))
6112 (home-page "http://www.antlr2.org")
6113 (synopsis "Framework for constructing recognizers, compilers, and translators")
6114 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6115is a language tool that provides a framework for constructing recognizers,
6116compilers, and translators from grammatical descriptions containing Java, C#,
6117C++, or Python actions. ANTLR provides excellent support for tree construction,
6118tree walking, and translation.")
6119 (license license:public-domain)))
6120
6121(define-public java-stringtemplate-3
6122 (package
6123 (name "java-stringtemplate")
6124 (version "3.2.1")
6125 (source (origin
6126 (method url-fetch)
6127 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6128 "gh-pages/download/stringtemplate-"
6129 version ".tar.gz"))
6130 (sha256
6131 (base32
6132 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6133 (build-system ant-build-system)
6134 (arguments
6135 `(#:jar-name (string-append ,name "-" ,version ".jar")
6136 #:test-dir "test"
6137 #:modules ((guix build ant-build-system)
6138 (guix build utils)
6139 (srfi srfi-1))
6140 #:phases
6141 (modify-phases %standard-phases
6142 (add-before 'check 'fix-tests
6143 (lambda _
6144 (substitute* "build.xml"
6145 (("\\$\\{test.home\\}/java")
6146 "${test.home}/org"))
6147 #t))
6148 (add-before 'build 'generate-grammar
6149 (lambda _
6150 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6151 (for-each (lambda (file)
6152 (format #t "~a\n" file)
6153 (invoke "antlr" file))
6154 '("template.g" "angle.bracket.template.g" "action.g"
6155 "eval.g" "group.g" "interface.g")))
6156 #t)))))
6157 (native-inputs
6158 `(("antlr" ,antlr2)
6159 ("java-junit" ,java-junit)))
6160 (home-page "http://www.stringtemplate.org")
6161 (synopsis "Template engine to generate formatted text output")
6162 (description "StringTemplate is a java template engine (with ports for C#,
6163Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6164or any other formatted text output. StringTemplate is particularly good at
6165code generators, multiple site skins, and internationalization / localization.
6166StringTemplate also powers ANTLR.")
6167 (license license:bsd-3)))
6168
6169;; antlr3 is partially written using antlr3 grammar files. It also depends on
6170;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6171;; files and uses antlr3 at runtime. The latest version requires a recent version
6172;; of antlr3 at runtime.
6173;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6174;; This version of ST4 is sufficient for the latest antlr3.
6175;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6176;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6177;; against the latest ST4.
6178;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6179;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6180;; only grammar files with the antlr2 syntax.
6181;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6182
6183(define-public java-stringtemplate
6184 (package (inherit java-stringtemplate-3)
6185 (name "java-stringtemplate")
6186 (version "4.0.8")
6187 (source (origin
6188 (method url-fetch)
6189 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6190 version ".tar.gz"))
6191 (file-name (string-append name "-" version ".tar.gz"))
6192 (sha256
6193 (base32
6194 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6195 (build-system ant-build-system)
6196 (arguments
6197 `(#:jar-name (string-append ,name "-" ,version ".jar")
6198 #:tests? #f ; FIXME: tests fail for unknown reasons
6199 #:test-dir "test"
6200 #:modules ((guix build ant-build-system)
6201 (guix build utils)
6202 (srfi srfi-1))
6203 #:phases
6204 (modify-phases %standard-phases
6205 (add-before 'check 'fix-test-target
6206 (lambda _
6207 (substitute* "build.xml"
6208 (("\\$\\{test.home\\}/java") "${test.home}/")
6209 (("\\*Test.java") "Test*.java"))
6210 #t))
6211 (add-before 'build 'generate-grammar
6212 (lambda _
6213 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6214 (for-each (lambda (file)
6215 (format #t "~a\n" file)
6216 (invoke "antlr3" file))
6217 '("STParser.g" "Group.g" "CodeGenerator.g")))
6218 #t)))))
6219 (inputs
6220 `(("antlr3" ,antlr3-bootstrap)
6221 ("antlr2" ,antlr2)
6222 ("java-stringtemplate" ,java-stringtemplate-3)
6223 ("java-junit" ,java-junit)))))
6224
6225(define java-stringtemplate-4.0.6
6226 (package (inherit java-stringtemplate)
6227 (name "java-stringtemplate")
6228 (version "4.0.6")
6229 (source (origin
6230 (method url-fetch)
6231 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6232 version ".tar.gz"))
6233 (file-name (string-append name "-" version ".tar.gz"))
6234 (sha256
6235 (base32
6236 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6237 (inputs
6238 `(("antlr3" ,antlr3-3.3)
6239 ("antlr2" ,antlr2)
6240 ("java-stringtemplate" ,java-stringtemplate-3)))))
6241
6242(define-public antlr3
6243 (package
6244 (name "antlr3")
6245 (version "3.5.2")
6246 (source (origin
6247 (method url-fetch)
6248 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6249 version ".tar.gz"))
6250 (file-name (string-append name "-" version ".tar.gz"))
6251 (sha256
6252 (base32
6253 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6254 (build-system ant-build-system)
6255 (arguments
6256 `(#:jar-name (string-append ,name "-" ,version ".jar")
6257 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6258 #:tests? #f
6259 #:phases
6260 (modify-phases %standard-phases
6261 (add-after 'install 'bin-install
6262 (lambda* (#:key inputs outputs #:allow-other-keys)
6263 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6264 (bin (string-append (assoc-ref outputs "out") "/bin")))
6265 (mkdir-p bin)
6266 (with-output-to-file (string-append bin "/antlr3")
6267 (lambda _
6268 (display
6269 (string-append "#!" (which "sh") "\n"
6270 "java -cp " jar "/" ,name "-" ,version ".jar:"
6271 (string-concatenate
6272 (find-files (assoc-ref inputs "stringtemplate")
6273 ".*\\.jar"))
6274 ":"
6275 (string-concatenate
6276 (find-files (assoc-ref inputs "stringtemplate4")
6277 ".*\\.jar"))
6278 ":"
6279 (string-concatenate
6280 (find-files (string-append
6281 (assoc-ref inputs "antlr")
6282 "/lib")
6283 ".*\\.jar"))
6284 " org.antlr.Tool $*"))))
6285 (chmod (string-append bin "/antlr3") #o755))
6286 #t))
6287 (add-before 'build 'generate-grammar
6288 (lambda _
6289 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6290 (for-each (lambda (file)
6291 (display file)
6292 (newline)
6293 (invoke "antlr3" file))
6294 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6295 "AssignTokenTypesWalker.g"
6296 "ActionTranslator.g" "TreeToNFAConverter.g"
6297 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6298 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6299 (substitute* "ANTLRParser.java"
6300 (("public Object getTree") "public GrammarAST getTree"))
6301 (substitute* "ANTLRv3Parser.java"
6302 (("public Object getTree") "public CommonTree getTree"))
6303 (chdir "../../../../../java")
6304 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6305 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6306import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6307 (substitute* "org/antlr/tool/ErrorManager.java"
6308 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6309 (chdir "../../../..")
6310 #t))
6311 (add-before 'build 'fix-build-xml
6312 (lambda _
6313 (substitute* "build.xml"
6314 (("<exec") "<copy todir=\"${classes.dir}\">
6315<fileset dir=\"tool/src/main/resources\">
6316<include name=\"**/*.stg\"/>
6317<include name=\"**/*.st\"/>
6318<include name=\"**/*.sti\"/>
6319<include name=\"**/STLexer.tokens\"/>
6320</fileset>
6321</copy><exec"))
6322 #t)))))
6323 (native-inputs
6324 `(("antlr" ,antlr2)
6325 ("antlr3" ,antlr3-bootstrap)))
6326 (inputs
6327 `(("junit" ,java-junit)
6328 ("stringtemplate" ,java-stringtemplate-3)
6329 ("stringtemplate4" ,java-stringtemplate)))
6330 (propagated-inputs
6331 `(("stringtemplate" ,java-stringtemplate-3)
6332 ("antlr" ,antlr2)
6333 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6334 (home-page "http://www.antlr3.org")
6335 (synopsis "Framework for constructing recognizers, compilers, and translators")
6336 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6337is a language tool that provides a framework for constructing recognizers,
6338compilers, and translators from grammatical descriptions containing Java, C#,
6339C++, or Python actions. ANTLR provides excellent support for tree construction,
6340tree walking, and translation.")
6341 (license license:bsd-3)))
6342
6343(define antlr3-bootstrap
6344 (package
6345 (inherit antlr3)
6346 (name "antlr3-bootstrap")
6347 (native-inputs
6348 `(("antlr" ,antlr2)
6349 ("antlr3" ,antlr3-3.3)))
6350 (inputs
6351 `(("junit" ,java-junit)))))
6352
6353(define antlr3-3.3
6354 (package
6355 (inherit antlr3)
6356 (name "antlr3")
6357 (version "3.3")
6358 (source (origin
6359 (method url-fetch)
6360 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6361 "gh-pages/download/antlr-"
6362 version ".tar.gz"))
6363 (sha256
6364 (base32
6365 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6366 (patches
6367 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6368 (arguments
6369 `(#:jar-name (string-append ,name "-" ,version ".jar")
6370 #:source-dir (string-join '("tool/src/main/java"
6371 "runtime/Java/src/main/java"
6372 "tool/src/main/antlr2"
6373 "tool/src/main/antlr3")
6374 ":")
6375 #:tests? #f ; FIXME: tests seem to require maven plugin
6376 #:modules ((guix build ant-build-system)
6377 (guix build utils)
6378 (srfi srfi-1))
6379 #:phases
6380 (modify-phases %standard-phases
6381 (add-after 'install 'bin-install
6382 (lambda* (#:key inputs outputs #:allow-other-keys)
6383 (let* ((out (assoc-ref outputs "out"))
6384 (jar (string-append out "/share/java"))
6385 (bin (string-append out "/bin")))
6386 (mkdir-p bin)
6387 (with-output-to-file (string-append bin "/antlr3")
6388 (lambda _
6389 (display
6390 (string-append
6391 "#!" (which "sh") "\n"
6392 "java -cp " jar "/antlr3-3.3.jar:"
6393 (string-join
6394 (append (find-files (assoc-ref inputs "java-stringtemplate")
6395 ".*\\.jar$")
6396 (find-files (string-append (assoc-ref inputs "antlr")
6397 "/lib")
6398 ".*\\.jar$"))
6399 ":")
6400 " org.antlr.Tool $*"))))
6401 (chmod (string-append bin "/antlr3") #o755)
6402 #t)))
6403 (add-before 'build 'generate-grammar
6404 (lambda _
6405 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6406 (("import org.antlr.grammar.v2.\\*;")
6407 "import org.antlr.grammar.v2.*;\n
6408import org.antlr.grammar.v2.TreeToNFAConverter;\n
6409import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6410import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6411 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6412 (for-each (lambda (file)
6413 (format #t "~a\n" file)
6414 (invoke "antlr" file))
6415 '("antlr.g" "antlr.print.g" "assign.types.g"
6416 "buildnfa.g" "codegen.g" "define.g")))
6417 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6418 (for-each (lambda (file)
6419 (format #t "~a\n" file)
6420 (invoke "antlr3" file))
6421 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6422 "ANTLRv3Tree.g")))
6423 #t))
6424 (add-before 'build 'fix-build-xml
6425 (lambda _
6426 (substitute* "build.xml"
6427 (("<exec") "<copy todir=\"${classes.dir}\">
6428<fileset dir=\"tool/src/main/resources\">
6429<include name=\"**/*.stg\"/>
6430<include name=\"**/*.st\"/>
6431<include name=\"**/*.sti\"/>
6432<include name=\"**/STLexer.tokens\"/>
6433</fileset>
6434</copy><exec"))
6435 #t)))))
6436 (native-inputs
6437 `(("antlr" ,antlr2)
6438 ("antlr3" ,antlr3-3.1)))
6439 (inputs
6440 `(("junit" ,java-junit)))
6441 (propagated-inputs
6442 `(("java-stringtemplate" ,java-stringtemplate-3)
6443 ("antlr" ,antlr2)
6444 ("antlr3" ,antlr3-3.1)))))
6445
6446(define antlr3-3.1
6447 (package
6448 (inherit antlr3)
6449 (version "3.1")
6450 (source (origin
6451 (method url-fetch)
6452 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6453 "gh-pages/download/antlr-"
6454 version ".tar.gz"))
6455 (sha256
6456 (base32
6457 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6458 (patches
6459 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6460 (arguments
6461 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6462 #:source-dir "src:runtime/Java/src"
6463 #:tests? #f
6464 #:phases
6465 (modify-phases %standard-phases
6466 (add-after 'install 'bin-install
6467 (lambda* (#:key inputs outputs #:allow-other-keys)
6468 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6469 (bin (string-append (assoc-ref outputs "out") "/bin")))
6470 (mkdir-p bin)
6471 (with-output-to-file (string-append bin "/antlr3")
6472 (lambda _
6473 (display
6474 (string-append "#!" (which "sh") "\n"
6475 "java -cp " jar "/antlr3-3.1.jar:"
6476 (string-concatenate
6477 (find-files (assoc-ref inputs "stringtemplate")
6478 ".*\\.jar"))
6479 ":"
6480 (string-concatenate
6481 (find-files (string-append
6482 (assoc-ref inputs "antlr")
6483 "/lib")
6484 ".*\\.jar"))
6485 " org.antlr.Tool $*"))))
6486 (chmod (string-append bin "/antlr3") #o755))
6487 #t))
6488 (add-before 'build 'generate-grammar
6489 (lambda _
6490 (let ((dir "src/org/antlr/tool/"))
6491 (for-each (lambda (file)
6492 (display file)
6493 (newline)
6494 (invoke "antlr" "-o" dir (string-append dir file)))
6495 '("antlr.g" "antlr.print.g" "assign.types.g"
6496 "buildnfa.g" "define.g")))
6497 (format #t "codegen.g\n")
6498 (invoke "antlr" "-o" "src/org/antlr/codegen"
6499 "src/org/antlr/codegen/codegen.g")
6500 #t))
6501 (add-before 'build 'fix-build-xml
6502 (lambda _
6503 (substitute* "build.xml"
6504 (("<exec") "<copy todir=\"${classes.dir}\">
6505<fileset dir=\"src\">
6506<include name=\"**/*.stg\"/>
6507<include name=\"**/*.st\"/>
6508<include name=\"**/*.sti\"/>
6509<include name=\"**/STLexer.tokens\"/>
6510</fileset>
6511</copy><exec"))
6512 #t)))))
6513 (native-inputs
6514 `(("antlr" ,antlr2)))
6515 (inputs
6516 `(("junit" ,java-junit)))
6517 (propagated-inputs
6518 `(("stringtemplate" ,java-stringtemplate-3)))))
6519
6520(define-public java-commons-cli-1.2
6521 ;; This is a bootstrap dependency for Maven2.
6522 (package
6523 (inherit java-commons-cli)
6524 (version "1.2")
6525 (source (origin
6526 (method url-fetch)
6527 (uri (string-append "mirror://apache/commons/cli/source/"
6528 "commons-cli-" version "-src.tar.gz"))
6529 (sha256
6530 (base32
6531 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6532 (arguments
6533 `(#:jar-name "commons-cli.jar"
6534 #:phases
6535 (modify-phases %standard-phases
6536 (add-before 'check 'fix-build-xml
6537 (lambda* (#:key inputs #:allow-other-keys)
6538 (substitute* "build.xml"
6539 (("dir=\"\\$\\{test.home\\}/java\"")
6540 "dir=\"${test.home}\""))
6541 #t)))))
6542 (native-inputs
6543 `(("java-junit" ,java-junit)))))
6544
6545(define-public java-microemulator-cldc
6546 (package
6547 (name "java-microemulator-cldc")
6548 (version "2.0.4")
6549 (source (origin
6550 (method url-fetch)
6551 (uri (string-append "https://github.com/barteo/microemu/archive/"
6552 "microemulator_"
6553 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6554 version)
6555 ".tar.gz"))
6556 (file-name (string-append name "-" version ".tar.gz"))
6557 (sha256
6558 (base32
6559 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6560 (build-system ant-build-system)
6561 (arguments
6562 `(#:jar-name "microemulator-cldc.jar"
6563 #:source-dir "microemu-cldc/src/main/java"
6564 #:tests? #f)); Requires even older software
6565 (home-page "https://github.com/barteo/microemu")
6566 (synopsis "J2ME CLDC emulator")
6567 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6568Emulator. It allows to demonstrate MIDlet based applications in web browser
6569applet and can be run as a standalone java application.")
6570 (license (list license:asl2.0
6571 ;; or altenatively:
6572 license:lgpl2.1+))))
6573
6574(define-public java-datanucleus-javax-persistence
6575 (package
6576 (name "java-datanucleus-javax-persistence")
6577 (version "2.2.0")
6578 (source (origin
6579 (method url-fetch)
6580 (uri (string-append "https://github.com/datanucleus/"
6581 "javax.persistence/archive/javax.persistence-"
6582 version "-release.tar.gz"))
6583 (sha256
6584 (base32
6585 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6586 (build-system ant-build-system)
6587 (arguments
6588 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6589 #:jdk ,icedtea-8
6590 #:source-dir "src/main/java"
6591 #:tests? #f)); no tests
6592 (home-page "https://github.com/datanucleus/javax.persistence")
6593 (synopsis "JPA API")
6594 (description "This package contains a clean definition of JPA API intended
6595for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6596jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6597used to generate this API.")
6598 (license (list license:edl1.0 license:epl1.0))))
6599
6600(define-public java-osgi-cmpn
6601 (package
6602 (name "java-osgi-cmpn")
6603 (version "6.0.0")
6604 (source (origin
6605 (method url-fetch)
6606 (uri (string-append "http://central.maven.org/maven2/"
6607 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6608 version "-sources.jar"))
6609 (sha256
6610 (base32
6611 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6612 (build-system ant-build-system)
6613 (arguments
6614 `(#:jar-name "osgi-cmpn.jar"
6615 #:tests? #f)); no tests
6616 (inputs
6617 `(("annotation" ,java-osgi-annotation)
6618 ("core" ,java-osgi-core)
6619 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6620 ("microemulator" ,java-microemulator-cldc)
6621 ("servlet" ,java-classpathx-servletapi)))
6622 (home-page "https://www.osgi.org")
6623 (synopsis "Compendium specification module of OSGi framework")
6624 (description
6625 "OSGi, for Open Services Gateway initiative framework, is a module system
6626and service platform for the Java programming language. This package contains
6627the compendium specification module, providing interfaces and classes for use
6628in compiling bundles.")
6629 (license license:asl2.0)))
6630
6631(define-public java-osgi-service-component-annotations
6632 (package
6633 (name "java-osgi-service-component-annotations")
6634 (version "1.3.0")
6635 (source (origin
6636 (method url-fetch)
6637 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6638 "org.osgi.service.component.annotations/"
6639 version "/org.osgi.service.component.annotations-"
6640 version "-sources.jar"))
6641 (sha256
6642 (base32
6643 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6644 (build-system ant-build-system)
6645 (arguments
6646 `(#:jar-name "osgi-service-component-annotations.jar"
6647 #:tests? #f)); no tests
6648 (inputs
6649 `(("annotation" ,java-osgi-annotation)))
6650 (home-page "https://www.osgi.org")
6651 (synopsis "Support annotations for osgi-service-component")
6652 (description
6653 "OSGi, for Open Services Gateway initiative framework, is a module system
6654and service platform for the Java programming language. This package contains
6655the support annotations for osgi-service-component.")
6656 (license license:asl2.0)))
6657
6658(define-public java-osgi-dto
6659 (package
6660 (name "java-osgi-dto")
6661 (version "1.0.0")
6662 (source (origin
6663 (method url-fetch)
6664 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6665 "org.osgi.dto/" version "/org.osgi.dto-"
6666 version "-sources.jar"))
6667 (sha256
6668 (base32
6669 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6670 (build-system ant-build-system)
6671 (arguments
6672 `(#:jar-name "osgi-dto.jar"
6673 #:tests? #f)); no tests
6674 (inputs
6675 `(("annotation" ,java-osgi-annotation)))
6676 (home-page "https://www.osgi.org")
6677 (synopsis "Data Transfer Objects")
6678 (description
6679 "OSGi, for Open Services Gateway initiative framework, is a module system
6680and service platform for the Java programming language. This package contains
6681the Data Transfer Objects. It is easily serializable having only public fields
6682of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6683Map and array aggregates may also be used. The aggregates must only hold
6684objects of the listed types or aggregates.")
6685 (license license:asl2.0)))
6686
6687(define-public java-osgi-resource
6688 (package
6689 (name "java-osgi-resource")
6690 (version "1.0.0")
6691 (source (origin
6692 (method url-fetch)
6693 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6694 "org.osgi.resource/"
6695 version "/org.osgi.resource-"
6696 version "-sources.jar"))
6697 (sha256
6698 (base32
6699 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6700 (build-system ant-build-system)
6701 (arguments
6702 `(#:jar-name "osgi-resource.jar"
6703 #:tests? #f)); no tests
6704 (inputs
6705 `(("annotation" ,java-osgi-annotation)
6706 ("dto" ,java-osgi-dto)))
6707 (home-page "https://www.osgi.org")
6708 (synopsis "OSGI Resource")
6709 (description
6710 "OSGi, for Open Services Gateway initiative framework, is a module system
6711and service platform for the Java programming language. This package contains
6712the definition of common types in osgi packages.")
6713 (license license:asl2.0)))
6714
6715(define-public java-osgi-namespace-contract
6716 (package
6717 (name "java-osgi-namespace-contract")
6718 (version "1.0.0")
6719 (source (origin
6720 (method url-fetch)
6721 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6722 "org.osgi.namespace.contract/"
6723 version "/org.osgi.namespace.contract-"
6724 version "-sources.jar"))
6725 (sha256
6726 (base32
6727 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6728 (build-system ant-build-system)
6729 (inputs
6730 `(("resource" ,java-osgi-resource)
6731 ("annotation" ,java-osgi-annotation)))
6732 (arguments
6733 `(#:jar-name "osgi-namespace-contract.jar"
6734 #:tests? #f)); no tests
6735 (home-page "https://www.osgi.org")
6736 (synopsis "Contract Capability and Requirement Namespace")
6737 (description
6738 "OSGi, for Open Services Gateway initiative framework, is a module system
6739and service platform for the Java programming language. This package contains
6740the names for the attributes and directives for a namespace with contracts.")
6741 (license license:asl2.0)))
6742
6743(define-public java-osgi-namespace-extender
6744 (package
6745 (name "java-osgi-namespace-extender")
6746 (version "1.0.1")
6747 (source (origin
6748 (method url-fetch)
6749 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6750 "org.osgi.namespace.extender/"
6751 version "/org.osgi.namespace.extender-"
6752 version "-sources.jar"))
6753 (sha256
6754 (base32
6755 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6756 (build-system ant-build-system)
6757 (inputs
6758 `(("resource" ,java-osgi-resource)
6759 ("annotation" ,java-osgi-annotation)))
6760 (arguments
6761 `(#:jar-name "osgi-namespace-extendent.jar"
6762 #:tests? #f)); no tests
6763 (home-page "https://www.osgi.org")
6764 (synopsis "Extender Capability and Requirement Namespace")
6765 (description
6766 "OSGi, for Open Services Gateway initiative framework, is a module system
6767and service platform for the Java programming language. This package contains
6768the names for the attributes and directives for an extender namespace.")
6769 (license license:asl2.0)))
6770
6771(define-public java-osgi-namespace-service
6772 (package
6773 (name "java-osgi-namespace-service")
6774 (version "1.0.0")
6775 (source (origin
6776 (method url-fetch)
6777 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6778 "org.osgi.namespace.service/"
6779 version "/org.osgi.namespace.service-"
6780 version "-sources.jar"))
6781 (sha256
6782 (base32
6783 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6784 (build-system ant-build-system)
6785 (inputs
6786 `(("resource" ,java-osgi-resource)
6787 ("annotation" ,java-osgi-annotation)))
6788 (arguments
6789 `(#:jar-name "osgi-namespace-service.jar"
6790 #:tests? #f)); no tests
6791 (home-page "https://www.osgi.org")
6792 (synopsis "Service Capability and Requirement Namespace")
6793 (description
6794 "OSGi, for Open Services Gateway initiative framework, is a module system
6795and service platform for the Java programming language. This package contains
6796the names for the attributes and directives for a service namespace.")
6797 (license license:asl2.0)))
6798
6799(define-public java-osgi-util-function
6800 (package
6801 (name "java-osgi-util-function")
6802 (version "1.0.0")
6803 (source (origin
6804 (method url-fetch)
6805 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6806 "org.osgi.util.function/"
6807 version "/org.osgi.util.function-"
6808 version "-sources.jar"))
6809 (sha256
6810 (base32
6811 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6812 (build-system ant-build-system)
6813 (arguments
6814 `(#:jar-name "osgi-util-function.jar"
6815 #:tests? #f)); no tests
6816 (inputs
6817 `(("annotation" ,java-osgi-annotation)))
6818 (home-page "https://www.osgi.org")
6819 (synopsis "OSGI Util Function")
6820 (description
6821 "OSGi, for Open Services Gateway initiative framework, is a module system
6822and service platform for the Java programming language. This package contains
6823an interface for a function that accepts a single argument and produces a result.")
6824 (license license:asl2.0)))
6825
6826(define-public java-osgi-util-promise
6827 (package
6828 (name "java-osgi-util-promise")
6829 (version "1.0.0")
6830 (source (origin
6831 (method url-fetch)
6832 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6833 "org.osgi.util.promise/"
6834 version "/org.osgi.util.promise-"
6835 version "-sources.jar"))
6836 (sha256
6837 (base32
6838 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6839 (build-system ant-build-system)
6840 (arguments
6841 `(#:jar-name "osgi-util-promise.jar"
6842 #:tests? #f)); no tests
6843 (inputs
6844 `(("annotation" ,java-osgi-annotation)
6845 ("function" ,java-osgi-util-function)))
6846 (home-page "https://www.osgi.org")
6847 (synopsis "Promise of a value")
6848 (description
6849 "OSGi, for Open Services Gateway initiative framework, is a module system
6850and service platform for the Java programming language. This package contains
6851an interface and utilitary classes for promises. A Promise represents a future
6852value. It handles the interactions for asynchronous processing.")
6853 (license license:asl2.0)))
6854
6855(define-public java-osgi-service-metatype-annotations
6856 (package
6857 (name "java-osgi-service-metatype-annotations")
6858 (version "1.3.0")
6859 (source (origin
6860 (method url-fetch)
6861 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6862 "org.osgi.service.metatype.annotations/"
6863 version "/org.osgi.service.metatype.annotations-"
6864 version "-sources.jar"))
6865 (sha256
6866 (base32
6867 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6868 (build-system ant-build-system)
6869 (arguments
6870 `(#:jar-name "osgi-service-metatype-annotations.jar"
6871 #:tests? #f)); no tests
6872 (inputs
6873 `(("annotation" ,java-osgi-annotation)))
6874 (home-page "https://www.osgi.org")
6875 (synopsis "Support annotations for metatype")
6876 (description
6877 "OSGi, for Open Services Gateway initiative framework, is a module system
6878and service platform for the Java programming language. This package contains
6879the support annotations for metatype.")
6880 (license license:asl2.0)))
6881
6882(define-public java-osgi-service-repository
6883 (package
6884 (name "java-osgi-service-repository")
6885 (version "1.1.0")
6886 (source (origin
6887 (method url-fetch)
6888 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6889 "org.osgi.service.repository/"
6890 version "/org.osgi.service.repository-"
6891 version "-sources.jar"))
6892 (sha256
6893 (base32
6894 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6895 (build-system ant-build-system)
6896 (arguments
6897 `(#:jar-name "osgi-service-repository.jar"
6898 #:tests? #f)); no tests
6899 (inputs
6900 `(("annotation" ,java-osgi-annotation)
6901 ("promise" ,java-osgi-util-promise)
6902 ("resource" ,java-osgi-resource)))
6903 (home-page "https://www.osgi.org")
6904 (synopsis "OSGI service repository")
6905 (description
6906 "OSGi, for Open Services Gateway initiative framework, is a module system
6907and service platform for the Java programming language. This package contains
6908a repository service that contains resources.")
6909 (license license:asl2.0)))
6910
6911(define-public java-osgi-framework
6912 (package
6913 (name "java-osgi-framework")
6914 (version "1.8.0")
6915 (source (origin
6916 (method url-fetch)
6917 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6918 "org.osgi.framework/" version "/org.osgi.framework-"
6919 version "-sources.jar"))
6920 (sha256
6921 (base32
6922 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6923 (build-system ant-build-system)
6924 (arguments
6925 `(#:jar-name "osgi-framework.jar"
6926 #:tests? #f)); no tests
6927 (inputs
6928 `(("annotation" ,java-osgi-annotation)
6929 ("resource" ,java-osgi-resource)
6930 ("dto" ,java-osgi-dto)))
6931 (home-page "https://www.osgi.org")
6932 (synopsis "OSGi framework")
6933 (description
6934 "OSGi, for Open Services Gateway initiative framework, is a module system
6935and service platform for the Java programming language.")
6936 (license license:asl2.0)))
6937
6938(define-public java-osgi-service-log
6939 (package
6940 (name "java-osgi-service-log")
6941 (version "1.3.0")
6942 (source (origin
6943 (method url-fetch)
6944 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6945 "org.osgi.service.log/"
6946 version "/org.osgi.service.log-"
6947 version "-sources.jar"))
6948 (sha256
6949 (base32
6950 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6951 (build-system ant-build-system)
6952 (arguments
6953 `(#:jar-name "osgi-service-log.jar"
6954 #:tests? #f)); no tests
6955 (inputs
6956 `(("java-osgi-framework" ,java-osgi-framework)))
6957 (home-page "https://www.osgi.org")
6958 (synopsis "Provides methods for bundles to write messages to the log")
6959 (description
6960 "OSGi, for Open Services Gateway initiative framework, is a module system
6961and service platform for the Java programming language. This package contains
6962the log service.")
6963 (license license:asl2.0)))
6964
6965(define-public java-osgi-service-jdbc
6966 (package
6967 (name "java-osgi-service-jdbc")
6968 (version "1.0.0")
6969 (source (origin
6970 (method url-fetch)
6971 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6972 "org.osgi.service.jdbc/"
6973 version "/org.osgi.service.jdbc-"
6974 version "-sources.jar"))
6975 (sha256
6976 (base32
6977 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
6978 (build-system ant-build-system)
6979 (arguments
6980 `(#:jar-name "osgi-service-jdbc.jar"
6981 #:tests? #f)); no tests
6982 (home-page "https://www.osgi.org")
6983 (synopsis "Factory for JDBC connection factories")
6984 (description
6985 "OSGi, for Open Services Gateway initiative framework, is a module system
6986and service platform for the Java programming language. This package contains
6987a factory for JDBC connection factories. There are 3 preferred connection
6988factories for getting JDBC connections:
6989
6990@itemize
6991@item @code{javax.sql.DataSource};
6992@item @code{javax.sql.ConnectionPoolDataSource};
6993@item @code{javax.sql.XADataSource}.
6994@end itemize")
6995 (license license:asl2.0)))
6996
6997(define-public java-osgi-service-resolver
6998 (package
6999 (name "java-osgi-service-resolver")
7000 (version "1.0.1")
7001 (source (origin
7002 (method url-fetch)
7003 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7004 "org.osgi.service.resolver/"
7005 version "/org.osgi.service.resolver-"
7006 version "-sources.jar"))
7007 (sha256
7008 (base32
7009 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7010 (build-system ant-build-system)
7011 (arguments
7012 `(#:jar-name "osgi-service-resolver.jar"
7013 #:tests? #f)); no tests
7014 (inputs
7015 `(("annotation" ,java-osgi-annotation)
7016 ("resource" ,java-osgi-resource)))
7017 (home-page "https://www.osgi.org")
7018 (synopsis "OSGI Resolver service")
7019 (description
7020 "OSGi, for Open Services Gateway initiative framework, is a module system
7021and service platform for the Java programming language. This package contains
7022a resolver service that resolves the specified resources in the context supplied
7023by the caller.")
7024 (license license:asl2.0)))
7025
7026(define-public java-osgi-util-tracker
7027 (package
7028 (name "java-osgi-util-tracker")
7029 (version "1.5.1")
7030 (source (origin
7031 (method url-fetch)
7032 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7033 "org.osgi.util.tracker/"
7034 version "/org.osgi.util.tracker-"
7035 version "-sources.jar"))
7036 (sha256
7037 (base32
7038 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7039 (build-system ant-build-system)
7040 (arguments
7041 `(#:jar-name "osgi-util-tracker.jar"
7042 #:tests? #f)); no tests
7043 (inputs
7044 `(("framework" ,java-osgi-framework)
7045 ("annotation" ,java-osgi-annotation)))
7046 (home-page "https://www.osgi.org")
7047 (synopsis "Bundle tracking")
7048 (description
7049 "OSGi, for Open Services Gateway initiative framework, is a module system
7050and service platform for the Java programming language. This package contains
7051bundle tracking utility classes.")
7052 (license license:asl2.0)))
7053
7054(define-public java-osgi-service-cm
7055 (package
7056 (name "java-osgi-service-cm")
7057 (version "1.5.0")
7058 (source (origin
7059 (method url-fetch)
7060 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7061 "org.osgi.service.cm/"
7062 version "/org.osgi.service.cm-"
7063 version "-sources.jar"))
7064 (sha256
7065 (base32
7066 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7067 (build-system ant-build-system)
7068 (arguments
7069 `(#:jar-name "osgi-service-cm.jar"
7070 #:tests? #f)); no tests
7071 (inputs
7072 `(("framework" ,java-osgi-framework)
7073 ("annotation" ,java-osgi-annotation)))
7074 (home-page "https://www.osgi.org")
7075 (synopsis "OSGI Configuration Management")
7076 (description
7077 "OSGi, for Open Services Gateway initiative framework, is a module system
7078and service platform for the Java programming language. This package contains
7079utility classes for the configuration of services.")
7080 (license license:asl2.0)))
7081
7082(define-public java-osgi-service-packageadmin
7083 (package
7084 (name "java-osgi-service-packageadmin")
7085 (version "1.2.0")
7086 (source (origin
7087 (method url-fetch)
7088 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7089 "org.osgi.service.packageadmin/"
7090 version "/org.osgi.service.packageadmin-"
7091 version "-sources.jar"))
7092 (sha256
7093 (base32
7094 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7095 (build-system ant-build-system)
7096 (arguments
7097 `(#:jar-name "osgi-service-packageadmin.jar"
7098 #:tests? #f)); no tests
7099 (inputs
7100 `(("framework" ,java-osgi-framework)))
7101 (home-page "https://www.osgi.org")
7102 (synopsis "OSGI Package Administration")
7103 (description
7104 "OSGi, for Open Services Gateway initiative framework, is a module system
7105and service platform for the Java programming language. This package contains
7106the packageadmin service.")
7107 (license license:asl2.0)))
7108
7109(define-public java-ops4j-base-lang
7110 (package
7111 (name "java-ops4j-base-lang")
7112 (version "1.5.0")
7113 (source (origin
7114 (method url-fetch)
7115 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7116 "archive/base-" version ".tar.gz"))
7117 (sha256
7118 (base32
7119 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7120 (build-system ant-build-system)
7121 (arguments
7122 `(#:jar-name "java-ops4j-base-lang.jar"
7123 #:source-dir "ops4j-base-lang/src/main/java"
7124 #:tests? #f; no tests
7125 #:phases
7126 (modify-phases %standard-phases
7127 (add-before 'build 'add-test-file
7128 (lambda _
7129 ;; That file is required by a test in ops4j-pax-exam-core-spi
7130 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7131 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7132 (lambda _
7133 (display
7134 (string-append
7135 "version=" ,version "\n"
7136 "groupId=org.ops4j.base"
7137 "artifactId=ops4j-base-lang\n"))))
7138 #t)))))
7139 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7140 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7141 (description "OPS4J stands for Open Participation Software for Java. This
7142package contains utilities and extensions related to @code{java.lang}.")
7143 (license license:asl2.0)))
7144
7145(define-public java-ops4j-base-monitors
7146 (package
7147 (inherit java-ops4j-base-lang)
7148 (name "java-ops4j-base-monitors")
7149 (arguments
7150 `(#:jar-name "java-ops4j-base-monitors.jar"
7151 #:source-dir "ops4j-base-monitors/src/main/java"
7152 #:tests? #f)); no tests
7153 (inputs
7154 `(("lang" ,java-ops4j-base-lang)))
7155 (description "OPS4J stands for Open Participation Software for Java. This
7156package contains utilities and extensions related to monitoring.")))
7157
7158(define-public java-ops4j-base-io
7159 (package
7160 (inherit java-ops4j-base-lang)
7161 (name "java-ops4j-base-io")
7162 (arguments
7163 `(#:jar-name "java-ops4j-base-io.jar"
7164 #:source-dir "ops4j-base-io/src/main/java"
7165 #:test-dir "ops4j-base-io/src/test"
7166 #:test-exclude
7167 (list "**/ListerTest.java")))
7168 (inputs
7169 `(("lang" ,java-ops4j-base-monitors)
7170 ("lang" ,java-ops4j-base-lang)))
7171 (native-inputs
7172 `(("junit" ,java-junit)
7173 ("hamcrest" ,java-hamcrest-core)))
7174 (description "OPS4J stands for Open Participation Software for Java. This
7175package contains utilities and extensions related to handling streams and files.")))
7176
7177(define-public java-ops4j-base-util
7178 (package
7179 (inherit java-ops4j-base-lang)
7180 (name "java-ops4j-base-util")
7181 (arguments
7182 `(#:jar-name "java-ops4j-base-util.jar"
7183 #:source-dir "ops4j-base-util/src/main/java"
7184 #:test-dir "ops4j-base-util/src/test"))
7185 (inputs
7186 `(("lang" ,java-ops4j-base-lang)))
7187 (native-inputs
7188 `(("junit" ,java-junit)))
7189 (description "OPS4J stands for Open Participation Software for Java. This
7190package contains utilities and extensions related to environment, i18n and
7191mime types.")))
7192
7193(define-public java-ops4j-base-util-property
7194 (package
7195 (inherit java-ops4j-base-lang)
7196 (name "java-ops4j-base-util-property")
7197 (arguments
7198 `(#:jar-name "java-ops4j-base-util-property.jar"
7199 #:source-dir "ops4j-base-util-property/src/main/java"
7200 #:tests? #f)); no tests
7201 (inputs
7202 `(("lang" ,java-ops4j-base-lang)
7203 ("util" ,java-ops4j-base-util)))
7204 (description "OPS4J stands for Open Participation Software for Java. This
7205package contains utilities and extensions related to resolving properties from
7206different sources.")))
7207
7208(define-public java-ops4j-base-store
7209 (package
7210 (inherit java-ops4j-base-lang)
7211 (name "java-ops4j-base-store")
7212 (arguments
7213 `(#:jar-name "java-ops4j-base-store.jar"
7214 #:source-dir "ops4j-base-store/src/main/java"
7215 #:tests? #f)); no tests
7216 (inputs
7217 `(("lang" ,java-ops4j-base-lang)
7218 ("slf4j" ,java-slf4j-api)
7219 ("io" ,java-ops4j-base-io)))
7220 (description "OPS4J stands for Open Participation Software for Java. This
7221package contains utilities for storing and retrieving data from an
7222@code{InputStream}.")))
7223
7224(define-public java-ops4j-base-spi
7225 (package
7226 (inherit java-ops4j-base-lang)
7227 (name "java-ops4j-base-spi")
7228 (arguments
7229 `(#:jar-name "java-ops4j-base-spi.jar"
7230 #:source-dir "ops4j-base-spi/src/main/java"
7231 #:test-dir "ops4j-base-spi/src/test"))
7232 (native-inputs
7233 `(("junit" ,java-junit)
7234 ("hamcrest" ,java-hamcrest-core)))
7235 (description "OPS4J stands for Open Participation Software for Java. This
7236package contains utilities for obtaining services via the Java SE 6
7237@code{ServiceLoader}.")))
7238
7239(define-public java-aqute-bnd-annotation
7240 (package
7241 (name "java-aqute-bnd-annotation")
7242 (version "3.5.0")
7243 (source (origin
7244 (method url-fetch)
7245 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7246 version ".REL.tar.gz"))
7247 (file-name (string-append name "-" version ".tar.gz"))
7248 (sha256
7249 (base32
7250 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7251 (build-system ant-build-system)
7252 (arguments
7253 `(#:jar-name "java-aqute-bnd-annotation.jar"
7254 #:source-dir "biz.aQute.bnd.annotation/src"
7255 #:tests? #f)); empty test dir
7256 (home-page "http://bnd.bndtools.org/")
7257 (synopsis "Tools for OSGi")
7258 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7259headers based on analyzing the class code, it verifies the project settings,
7260it manages project dependencies, gives diffs jars, and much more.")
7261 (license license:asl2.0)))
7262
7263(define-public java-aqute-libg
7264 (package
7265 (inherit java-aqute-bnd-annotation)
7266 (name "java-aqute-libg")
7267 (arguments
7268 `(#:jar-name "java-aqute-libg.jar"
7269 ;; The build fails when source/target more recent than 1.7. This
7270 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7271 ;;
7272 ;; It is closed as won't fix. There is no way to change the source
7273 ;; so that it works on 1.8, and still works on 1.6, the upstream
7274 ;; target. It work fine on 1.7, so we use 1.7.
7275 #:make-flags (list "-Dant.build.javac.source=1.7"
7276 "-Dant.build.javac.target=1.7")
7277 #:phases
7278 (modify-phases %standard-phases
7279 (add-before 'configure 'chdir
7280 ;; Change to aQute.libg directory, so that the relative
7281 ;; paths in the tests aren't broken.
7282 (lambda _
7283 (chdir "aQute.libg")
7284 #t))
7285 (add-before 'check 'create-test-directory
7286 ;; Copy the test directory to test/java, since that's where
7287 ;; ant-build-system's default project in build.xml expects to find
7288 ;; the test classes. Leave a copy in the original place to not
7289 ;; break paths in tests.
7290 (lambda _
7291 (mkdir "src/test")
7292 (copy-recursively "test" "src/test/java")
7293 #t)))))
7294 (inputs
7295 `(("slf4j" ,java-slf4j-api)
7296 ("osgi-annot" ,java-osgi-annotation)
7297 ("java-osgi-cmpn" ,java-osgi-cmpn)
7298 ("osgi" ,java-osgi-core)))
7299 (native-inputs
7300 `(("hamcrest" ,java-hamcrest-core)
7301 ("java-junit" ,java-junit)))))
7302
7303(define java-aqute-libg-bootstrap
7304 (package
7305 (inherit java-aqute-libg)
7306 (name "java-aqute-libg-bootstrap")
7307 (arguments
7308 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7309 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7310 ((#:tests? _ #f) #f)))
7311 (inputs
7312 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7313 ,@(delete `("slf4j" ,java-slf4j-api)
7314 (package-inputs java-aqute-libg))))
7315 (native-inputs '())))
7316
7317(define-public java-aqute-bndlib
7318 (package
7319 (inherit java-aqute-bnd-annotation)
7320 (name "java-aqute-bndlib")
7321 (arguments
7322 `(#:jar-name "java-bndlib.jar"
7323 #:source-dir "biz.aQute.bndlib/src"
7324 #:tests? #f)); no tests
7325 (inputs
7326 `(("slf4j" ,java-slf4j-api)
7327 ("osgi-annot" ,java-osgi-annotation)
7328 ("java-aqute-libg" ,java-aqute-libg)
7329 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7330 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7331 ("java-osgi-service-repository" ,java-osgi-service-repository)
7332 ("java-osgi-service-log" ,java-osgi-service-log)
7333 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7334 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7335 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7336 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7337 ("promise" ,java-osgi-util-promise)
7338 ("osgi" ,java-osgi-core)))))
7339
7340(define java-aqute-bndlib-bootstrap
7341 (package
7342 (inherit java-aqute-bndlib)
7343 (name "java-aqute-bndlib-bootstrap")
7344 (inputs
7345 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7346 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7347 ,@(delete `("slf4j" ,java-slf4j-api)
7348 (delete `("java-aqute-libg" ,java-aqute-libg)
7349 (package-inputs java-aqute-bndlib)))))))
7350
7351(define-public java-ops4j-pax-tinybundles
7352 (package
7353 (name "java-ops4j-pax-tinybundles")
7354 (version "2.1.1")
7355 (source (origin
7356 (method url-fetch)
7357 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7358 "archive/tinybundles-" version ".tar.gz"))
7359 (sha256
7360 (base32
7361 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7362 (arguments
7363 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7364 #:source-dir "src/main/java"
7365 #:test-exclude
7366 ;; Abstract base classes for other tests
7367 (list "**/BndTest.java" "**/CoreTest.java")
7368 #:phases
7369 (modify-phases %standard-phases
7370 (add-before 'check 'fix-version
7371 (lambda _
7372 ;; This test has a reference to an old version of bndlib we are not
7373 ;; packaging. It uses the version referenced in pom.xml. We replace
7374 ;; it with our own version.
7375 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7376 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7377 ,(package-version java-aqute-bndlib)))
7378 #t)))))
7379 (inputs
7380 `(("lang" ,java-ops4j-base-lang)
7381 ("io" ,java-ops4j-base-io)
7382 ("store" ,java-ops4j-base-store)
7383 ("slf4j" ,java-slf4j-api)
7384 ("libg" ,java-aqute-libg)
7385 ("bndlib" ,java-aqute-bndlib)))
7386 (native-inputs
7387 `(("junit" ,java-junit)
7388 ("hamcrest" ,java-hamcrest-core)
7389 ("log4j" ,java-log4j-api)
7390 ("bndannotation" ,java-aqute-bnd-annotation)
7391 ("framework" ,java-osgi-framework)))
7392 (build-system ant-build-system)
7393 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7394 (synopsis "Java APIs to create OSGi related artifacts")
7395 (description "Tinybundles is all about creating OSGi related artifacts like
7396Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7397to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7398other hand, this library can be a foundation of real end user tools that need
7399to create those artifacts.")
7400 (license license:asl2.0)))
7401
7402(define-public java-ops4j-pax-exam-core
7403 (package
7404 (name "java-ops4j-pax-exam-core")
7405 (version "4.11.0")
7406 (source (origin
7407 (method url-fetch)
7408 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7409 "archive/exam-reactor-" version ".tar.gz"))
7410 (sha256
7411 (base32
7412 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7413 (arguments
7414 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7415 #:source-dir "core/pax-exam/src/main/java"
7416 #:test-dir "core/pax-exam/src/test"))
7417 (inputs
7418 `(("slf4j" ,java-slf4j-api)
7419 ("lang" ,java-ops4j-base-lang)
7420 ("io" ,java-ops4j-base-io)
7421 ("util-property" ,java-ops4j-base-util-property)
7422 ("util-store" ,java-ops4j-base-store)
7423 ("java-osgi-core" ,java-osgi-core)))
7424 (native-inputs
7425 `(("junit" ,java-junit)
7426 ("hamcrest" ,java-hamcrest-core)))
7427 (build-system ant-build-system)
7428 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7429 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7430 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7431the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7432the system under test at the same time.")
7433 (license license:asl2.0)))
7434
7435(define-public java-ops4j-pax-exam-core-spi
7436 (package
7437 (inherit java-ops4j-pax-exam-core)
7438 (name "java-ops4j-pax-exam-core-spi")
7439 (arguments
7440 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7441 #:source-dir "src/main/java"
7442 #:test-exclude
7443 (list
7444 ;; Abstract base class, not a test
7445 "**/BaseStagedReactorTest.java"
7446 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7447 "**/WarBuilderTest.java")
7448 #:phases
7449 (modify-phases %standard-phases
7450 (add-before 'configure 'chdir
7451 (lambda _
7452 ;; Tests assume we are in this directory
7453 (chdir "core/pax-exam-spi")
7454 #t))
7455 (add-before 'check 'fix-tests
7456 (lambda _
7457 ;; One test checks that this file is present.
7458 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7459 (with-output-to-file
7460 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7461 (lambda _
7462 (display
7463 (string-append "artifactId = pax-exam-spi\n"
7464 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7465 ;; Maven puts compilation results in the target directory, while we
7466 ;; put them in the build directory.
7467 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7468 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7469 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7470 (("target") "build"))
7471 ;; One test is expected to fail, but it doesn't throw the expected exception
7472 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7473 (("AssertionError") "IllegalArgumentException"))
7474 #t)))))
7475 (inputs
7476 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7477 ("lang" ,java-ops4j-base-lang)
7478 ("monitors" ,java-ops4j-base-monitors)
7479 ("store" ,java-ops4j-base-store)
7480 ("io" ,java-ops4j-base-io)
7481 ("spi" ,java-ops4j-base-spi)
7482 ("osgi" ,java-osgi-core)
7483 ("slf4j" ,java-slf4j-api)
7484 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7485 (native-inputs
7486 `(("mockito" ,java-mockito-1)
7487 ("junit" ,java-junit)
7488 ("hamcrest" ,java-hamcrest-core)
7489 ("cglib" ,java-cglib)
7490 ("objenesis" ,java-objenesis)
7491 ("asm" ,java-asm)))))
7492
7493(define-public java-ops4j-pax-exam-core-junit
7494 (package
7495 (inherit java-ops4j-pax-exam-core)
7496 (name "java-ops4j-pax-exam-core-junit")
7497 (arguments
7498 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7499 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7500 #:tests? #f)); no tests
7501 (inputs
7502 `(("junit" ,java-junit)
7503 ("slf4j" ,java-slf4j-api)
7504 ("core" ,java-ops4j-pax-exam-core)
7505 ("spi" ,java-ops4j-pax-exam-core-spi)))
7506 (native-inputs '())))
7507
7508(define-public java-fasterxml-jackson-annotations
7509 (package
7510 (name "java-fasterxml-jackson-annotations")
7511 (version "2.9.4")
7512 (source (origin
7513 (method url-fetch)
7514 (uri (string-append "https://github.com/FasterXML/"
7515 "jackson-annotations/archive/"
7516 "jackson-annotations-" version ".tar.gz"))
7517 (sha256
7518 (base32
7519 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7520 (build-system ant-build-system)
7521 (arguments
7522 `(#:jar-name "jackson-annotations.jar"
7523 #:source-dir "src/main/java"
7524 #:test-dir "src/test"))
7525 (native-inputs
7526 `(("junit" ,java-junit)))
7527 (home-page "https://github.com/FasterXML/jackson-annotations")
7528 (synopsis "General purpose annotations for the Jackson Data Processor")
7529 (description "This package contains general purpose annotations for the
7530Jackson Data Processor, used on value and handler types. The only annotations
7531not included are ones that require dependency to the Databind package.")
7532 (license license:asl2.0)))
7533
7534(define-public java-fasterxml-jackson-core
7535 (package
7536 (name "java-fasterxml-jackson-core")
7537 (version "2.9.4")
7538 (source (origin
7539 (method url-fetch)
7540 (uri (string-append "https://github.com/FasterXML/"
7541 "jackson-core/archive/"
7542 "jackson-core-" version ".tar.gz"))
7543 (sha256
7544 (base32
7545 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7546 (build-system ant-build-system)
7547 (arguments
7548 `(#:jar-name "jackson-core.jar"
7549 #:source-dir "src/main/java"
7550 #:test-dir "src/test"
7551 #:test-exclude
7552 (list
7553 ;; Expected failure. pom.xml excludes these
7554 "**/failing/**"
7555 ;; Base classes that have no constructor for junit
7556 "**/BaseTest.java"
7557 "**/ConcurrencyReadTest.java"
7558 "**/ManualCharAccessTest.java"
7559 "**/ManualCharAccessTest.java"
7560 "**/TrailingCommasTest.java"
7561 "**/AsyncMissingValuesInObjectTest.java"
7562 "**/AsyncMissingValuesInArrayTest.java")
7563 #:phases
7564 (modify-phases %standard-phases
7565 (add-before 'configure 'generate-PackageVersion.java
7566 (lambda _
7567 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7568 (in (string-append out ".in")))
7569 (copy-file in out)
7570 (substitute* out
7571 (("@package@") "com.fasterxml.jackson.core.json")
7572 (("@projectversion@") ,version)
7573 (("@projectgroupid@") "com.fasterxml.jackson.core")
7574 (("@projectartifactid@") "jackson-core")))
7575 #t))
7576 (add-before 'build 'copy-resources
7577 (lambda _
7578 (copy-recursively "src/main/resources"
7579 "build/classes")
7580 #t))
7581 (add-before 'check 'copy-test-resources
7582 (lambda _
7583 (copy-recursively "src/test/resources"
7584 "build/test-classes")
7585 #t)))))
7586 (native-inputs
7587 `(("junit" ,java-junit)
7588 ("hamcrest" ,java-hamcrest-core)))
7589 (home-page "https://github.com/FasterXML/jackson-core")
7590 (synopsis "")
7591 (description "")
7592 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7593
7594(define-public java-fasterxml-jackson-databind
7595 (package
7596 (name "java-fasterxml-jackson-databind")
7597 (version "2.9.4")
7598 (source (origin
7599 (method url-fetch)
7600 (uri (string-append "https://github.com/FasterXML/"
7601 "jackson-databind/archive/"
7602 "jackson-databind-" version ".tar.gz"))
7603 (sha256
7604 (base32
7605 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7606 (build-system ant-build-system)
7607 (arguments
7608 `(#:jar-name "jackson-databind.jar"
7609 #:source-dir "src/main/java"
7610 #:tests? #f; requires javax.measures for which I can't find a free implementation
7611 #:phases
7612 (modify-phases %standard-phases
7613 (add-before 'configure 'generate-PackageVersion.java
7614 (lambda _
7615 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7616 (in (string-append out ".in")))
7617 (copy-file in out)
7618 (substitute* out
7619 (("@package@") "com.fasterxml.jackson.databind.cfg")
7620 (("@projectversion@") ,version)
7621 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7622 (("@projectartifactid@") "jackson-databind")))
7623 #t))
7624 (add-before 'build 'copy-resources
7625 (lambda _
7626 (copy-recursively "src/main/resources" "build/classes")
7627 #t)))))
7628 (inputs
7629 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7630 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7631 (home-page "https://github.com/FasterXML/jackson-databind")
7632 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7633 (description "This package contains the general-purpose data-binding
7634functionality and tree-model for Jackson Data Processor. It builds on core
7635streaming parser/generator package, and uses Jackson Annotations for
7636configuration.")
7637 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7638
7639(define-public java-fasterxml-jackson-modules-base-jaxb
7640 (package
7641 (name "java-fasterxml-jackson-modules-base-jaxb")
7642 (version "2.9.4")
7643 (source (origin
7644 (method url-fetch)
7645 (uri (string-append "https://github.com/FasterXML/"
7646 "jackson-modules-base/archive/"
7647 "jackson-modules-base-" version ".tar.gz"))
7648 (sha256
7649 (base32
7650 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7651 (build-system ant-build-system)
7652 (arguments
7653 `(#:jar-name "jackson-modules-base-jaxb.jar"
7654 #:source-dir "jaxb/src/main/java"
7655 #:test-dir "jaxb/src/test"
7656 #:test-exclude
7657 ;; Base class for tests
7658 (list "**/BaseJaxbTest.java")
7659 #:phases
7660 (modify-phases %standard-phases
7661 (add-before 'configure 'generate-PackageVersion.java
7662 (lambda _
7663 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7664 "jackson/module/jaxb/PackageVersion.java"))
7665 (in (string-append out ".in")))
7666 (copy-file in out)
7667 (substitute* out
7668 (("@package@") "com.fasterxml.jackson.module.jaxb")
7669 (("@projectversion@") ,version)
7670 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7671 (("@projectartifactid@") "jackson-module-jaxb")))
7672 #t))
7673 (add-before 'build 'copy-resources
7674 (lambda _
7675 (copy-recursively "jaxb/src/main/resources" "build/classes")
7676 #t)))))
7677 (inputs
7678 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7679 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7680 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7681 (native-inputs
7682 `(("java-junit" ,java-junit)))
7683 (home-page "https://github.com/FasterXML/jackson-modules-base")
7684 (synopsis "Jaxb annotations jackson module")
7685 (description "This package is the jaxb annotations module for jackson.")
7686 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7687
7688(define-public java-fasterxml-jackson-modules-base-mrbean
7689 (package
7690 (name "java-fasterxml-jackson-modules-base-mrbean")
7691 (version "2.9.4")
7692 (source (origin
7693 (method url-fetch)
7694 (uri (string-append "https://github.com/FasterXML/"
7695 "jackson-modules-base/archive/"
7696 "jackson-modules-base-" version ".tar.gz"))
7697 (sha256
7698 (base32
7699 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7700 (build-system ant-build-system)
7701 (arguments
7702 `(#:jar-name "jackson-modules-base-mrbean.jar"
7703 #:source-dir "mrbean/src/main/java"
7704 #:test-dir "mrbean/src/test"
7705 #:test-exclude
7706 ;; Base class for tests
7707 (list "**/BaseTest.java")
7708 #:phases
7709 (modify-phases %standard-phases
7710 (add-before 'configure 'generate-PackageVersion.java
7711 (lambda _
7712 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
7713 "jackson/module/mrbean/PackageVersion.java"))
7714 (in (string-append out ".in")))
7715 (copy-file in out)
7716 (substitute* out
7717 (("@package@") "com.fasterxml.jackson.module.mrbean")
7718 (("@projectversion@") ,version)
7719 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
7720 (("@projectartifactid@") "jackson-module-mrbean")))
7721 #t)))))
7722 (inputs
7723 `(("java-asm" ,java-asm)
7724 ("java-fasterxml-jackson-annotations"
7725 ,java-fasterxml-jackson-annotations)
7726 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7727 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7728 (native-inputs
7729 `(("java-junit" ,java-junit)))
7730 (home-page "https://github.com/FasterXML/jackson-modules-base")
7731 (synopsis "POJO type materialization for Java")
7732 (description "This package implements POJO type materialization.
7733Databinders can construct implementation classes for Java interfaces as part
7734of deserialization.")
7735 (license license:asl2.0)))
7736
7737(define-public java-snakeyaml
7738 (package
7739 (name "java-snakeyaml")
7740 (version "1.18")
7741 (source (origin
7742 (method url-fetch)
7743 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7744 version ".tar.gz"))
7745 (file-name (string-append name "-" version ".tar.gz"))
7746 (sha256
7747 (base32
7748 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7749 (build-system ant-build-system)
7750 (arguments
7751 `(#:jar-name "java-snakeyaml.jar"
7752 #:source-dir "src/main/java"
7753 ;; Tests require velocity, a cyclic dependency, and
7754 ;; java-spring-framework-context which is not packaged.
7755 #:tests? #f))
7756 (home-page "https://bitbucket.org/asomov/snakeyaml")
7757 (synopsis "YAML processor")
7758 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7759 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7760
7761(define-public java-fasterxml-jackson-dataformat-yaml
7762 (package
7763 (name "java-fasterxml-jackson-dataformat-yaml")
7764 (version "2.9.4")
7765 (source (origin
7766 (method url-fetch)
7767 (uri (string-append "https://github.com/FasterXML/"
7768 "jackson-dataformats-text/archive/"
7769 "jackson-dataformats-text-" version ".tar.gz"))
7770 (sha256
7771 (base32
7772 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
7773 (build-system ant-build-system)
7774 (arguments
7775 `(#:jar-name "jackson-dataformat-yaml.jar"
7776 #:source-dir "yaml/src/main/java"
7777 #:test-dir "yaml/src/test"
7778 #:test-exclude (list "**/failing/**.java")
7779 #:phases
7780 (modify-phases %standard-phases
7781 (add-before 'configure 'generate-PackageVersion.java
7782 (lambda _
7783 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7784 (in (string-append out ".in")))
7785 (copy-file in out)
7786 (substitute* out
7787 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7788 (("@projectversion@") ,version)
7789 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7790 (("@projectartifactid@") "jackson-dataformat-yaml")))
7791 #t)))))
7792 (inputs
7793 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7794 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7795 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7796 ("java-snakeyaml" ,java-snakeyaml)))
7797 (native-inputs
7798 `(("junit" ,java-junit)
7799 ("hamcrest" ,java-hamcrest-core)
7800 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7801 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7802 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7803 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7804 (synopsis "Yaml backend for Jackson")
7805 (description "Dataformat backends are used to support format alternatives
7806to JSON, supported by default. This is done by sub-classing Jackson core
7807abstractions.")
7808 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7809
7810(define-public java-stax2-api
7811 (package
7812 (name "java-stax2-api")
7813 (version "4.0.0")
7814 (source (origin
7815 (method url-fetch)
7816 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7817 "stax2-api-" version ".tar.gz"))
7818 (sha256
7819 (base32
7820 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7821 (build-system ant-build-system)
7822 (arguments
7823 `(#:jar-name "java-stax2-api.jar"
7824 #:source-dir "src/main/java"
7825 #:tests? #f)); no tests
7826 (home-page "https://github.com/FasterXML/stax2-api")
7827 (synopsis "Stax2 API")
7828 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7829significant new functionalities, such as full-featured bi-direction validation
7830interface and high-performance Typed Access API.")
7831 (license license:bsd-2)))
7832
7833(define-public java-woodstox-core
7834 (package
7835 (name "java-woodstox-core")
7836 (version "5.0.3")
7837 (source (origin
7838 (method url-fetch)
7839 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7840 "woodstox-core-" version ".tar.gz"))
7841 (sha256
7842 (base32
7843 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7844 (build-system ant-build-system)
7845 (arguments
7846 `(#:jar-name "woodstox.jar"
7847 #:test-exclude
7848 (list "**/Base*.java" "failing/**")
7849 #:phases
7850 (modify-phases %standard-phases
7851 (add-before 'build 'remove-msv-dep
7852 (lambda _
7853 ;; we don't need osgi, and it depends on msv
7854 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7855 ;; msv's latest release is from 2011 and we don't need it
7856 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7857 (delete-file-recursively "src/test/java/wstxtest/osgi")
7858 (delete-file-recursively "src/test/java/wstxtest/msv")
7859 #t))
7860 (add-before 'build 'copy-resources
7861 (lambda _
7862 (copy-recursively "src/main/resources" "build/classes")
7863 #t)))))
7864 (inputs
7865 `(("stax2" ,java-stax2-api)))
7866 (native-inputs
7867 `(("junit" ,java-junit)))
7868 (home-page "https://github.com/FasterXML/woodstox")
7869 (synopsis "Stax XML API implementation")
7870 (description "Woodstox is a stax XML API implementation.")
7871 (license license:asl2.0)))
7872
7873(define-public java-fasterxml-jackson-dataformat-xml
7874 (package
7875 (name "java-fasterxml-jackson-dataformat-xml")
7876 (version "2.9.4")
7877 (source (origin
7878 (method url-fetch)
7879 (uri (string-append "https://github.com/FasterXML/"
7880 "jackson-dataformat-xml/archive/"
7881 "jackson-dataformat-xml-" version ".tar.gz"))
7882 (sha256
7883 (base32
7884 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
7885 (build-system ant-build-system)
7886 (arguments
7887 `(#:jar-name "jackson-dataformat-xml.jar"
7888 #:source-dir "src/main/java"
7889 #:test-exclude
7890 (list "**/failing/**")
7891 #:phases
7892 (modify-phases %standard-phases
7893 (add-before 'configure 'generate-PackageVersion.java
7894 (lambda _
7895 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7896 (in (string-append out ".in")))
7897 (copy-file in out)
7898 (newline)
7899 (substitute* out
7900 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7901 (("@projectversion@") ,version)
7902 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7903 (("@projectartifactid@") "jackson-dataformat-xml")))
7904 #t))
7905 (add-before 'build 'copy-resources
7906 (lambda _
7907 (copy-recursively "src/main/resources" "build/classes")
7908 #t)))))
7909 (inputs
7910 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7911 ("jackson-core" ,java-fasterxml-jackson-core)
7912 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7913 ("jackson-databind" ,java-fasterxml-jackson-databind)
7914 ("stax2-api" ,java-stax2-api)
7915 ("woodstox" ,java-woodstox-core)))
7916 (native-inputs
7917 `(("junit" ,java-junit)
7918 ("hamcrest" ,java-hamcrest-core)))
7919 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7920 (synopsis "Read and write XML")
7921 (description "This package contains Jackson extension component for reading
7922and writing XML encoded data.
7923
7924Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7925approach (that is, no support is added for \"Schema-first\" approach). Support
7926for JAXB annotations is provided by JAXB annotation module; this module
7927provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7928@code{JsonFactory}) as well as small number of higher level overrides needed to
7929make data-binding work.")
7930 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7931
7932(define-public java-hdrhistogram
7933 (package
7934 (name "java-hdrhistogram")
7935 (version "2.1.9")
7936 (source (origin
7937 (method url-fetch)
7938 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7939 "archive/HdrHistogram-" version ".tar.gz"))
7940 (sha256
7941 (base32
7942 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7943 (build-system ant-build-system)
7944 (arguments
7945 `(#:jar-name "java-hdrhistogram.jar"
7946 #:source-dir "src/main/java"
7947 #:phases
7948 (modify-phases %standard-phases
7949 (add-before 'configure 'set-version
7950 (lambda _
7951 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7952 (template (string-append version-java ".template")))
7953 (copy-file template version-java)
7954 (substitute* version-java
7955 (("\\$VERSION\\$") ,version)
7956 (("\\$BUILD_TIME\\$") "0"))
7957 #t))))))
7958 (native-inputs
7959 `(("junit" ,java-junit)
7960 ("hamcrest" ,java-hamcrest-core)))
7961 (home-page "https://hdrhistogram.github.io/HdrHistogram")
7962 (synopsis "High dynamic range histogram")
7963 (description "Hdrhistogram allows to create histograms that support
7964recording and analyzing sampled data value counts across a configurable integer
7965value range with configurable value precision within the range. Value precision
7966is expressed as the number of significant digits in the value recording, and
7967provides control over value quantization behavior across the value range and
7968the subsequent value resolution at any given level.")
7969 (license license:public-domain)))
7970
7971(define-public java-cofoja
7972 (package
7973 (name "java-cofoja")
7974 (version "1.3")
7975 (source (origin
7976 (method git-fetch)
7977 (uri (git-reference
7978 (url "https://github.com/nhatminhle/cofoja.git")
7979 (commit (string-append "v" version))))
7980 (file-name (string-append "java-cofoja-" version "-checkout"))
7981 (sha256
7982 (base32
7983 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
7984 (build-system ant-build-system)
7985 (arguments
7986 `(#:build-target "dist"
7987 #:test-target "test"
7988 #:jdk ,icedtea-8
7989 #:make-flags
7990 (list "-Ddist.dir=dist")
7991 #:modules ((guix build ant-build-system)
7992 (guix build java-utils)
7993 (guix build utils)
7994 (srfi srfi-1)
7995 (ice-9 match))
7996 #:phases
7997 (modify-phases %standard-phases
7998 ;; The bulid system ignores the class path the ant-build-system sets
7999 ;; up and instead expects to find all dependencies in the "lib"
8000 ;; directory.
8001 (add-after 'unpack 'create-libdir
8002 (lambda* (#:key inputs #:allow-other-keys)
8003 (mkdir-p "lib")
8004 (for-each
8005 (lambda (file)
8006 (let ((target (string-append "lib/" (basename file))))
8007 (unless (file-exists? target)
8008 (symlink file target))))
8009 (append-map (match-lambda
8010 ((label . dir)
8011 (find-files dir "\\.jar$")))
8012 inputs))
8013 #t))
8014 (replace 'install (install-jars "dist")))))
8015 (inputs
8016 `(("java-asm" ,java-asm)))
8017 (native-inputs
8018 `(("java-junit" ,java-junit)))
8019 (home-page "https://github.com/nhatminhle/cofoja")
8020 (synopsis "Contracts for Java")
8021 (description "Contracts for Java, or Cofoja for short, is a contract
8022programming framework and test tool for Java, which uses annotation processing
8023and bytecode instrumentation to provide run-time checking. (In particular,
8024this is not a static analysis tool.)")
8025 (license license:lgpl3+)))
8026
8027(define-public java-aopalliance
8028 (package
8029 (name "java-aopalliance")
8030 (version "1.0")
8031 (source (origin
8032 (method git-fetch)
8033 ;; Note: this git repository is not official, but contains the
8034 ;; source code that is in the CVS repository. Downloading the
8035 ;; tarball from sourceforge is undeterministic, and the cvs download
8036 ;; fails.
8037 (uri (git-reference
8038 (url "https://github.com/hoverruan/aopalliance")
8039 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8040 (file-name (string-append name "-" version))
8041 (sha256
8042 (base32
8043 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8044 (build-system ant-build-system)
8045 (arguments
8046 `(#:jar-name "java-aopalliance.jar"
8047 #:jdk ,icedtea-8
8048 #:tests? #f; no tests
8049 #:source-dir "aopalliance/src/main"))
8050 (home-page "http://aopalliance.sourceforge.net")
8051 (synopsis "Aspect-Oriented Programming")
8052 (description "The AOP Alliance project is a joint project between several
8053software engineering people who are interested in Aspect-Oriented Programming
8054(AOP) and Java.")
8055 (license license:public-domain)))
8056
8057(define-public java-javax-inject
8058 (package
8059 (name "java-javax-inject")
8060 (version "tck-1")
8061 (source (origin
8062 (method url-fetch)
8063 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8064 "archive/javax.inject-" version ".tar.gz"))
8065 (sha256
8066 (base32
8067 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8068 (build-system ant-build-system)
8069 (arguments
8070 `(#:jar-name "java-javax-inject.jar"
8071 #:jdk ,icedtea-8
8072 #:tests? #f)); no tests
8073 (home-page "http://github.com/javax-inject/javax-inject")
8074 (synopsis "JSR-330: Dependency Injection for Java")
8075 (description "This package specifies a means for obtaining objects in such
8076a way as to maximize reusability, testability and maintainability compared to
8077traditional approaches such as constructors, factories, and service locators
8078(e.g., JNDI). This process, known as dependency injection, is beneficial to
8079most nontrivial applications.
8080
8081Many types depend on other types. For example, a @var{Stopwatch} might depend
8082on a @var{TimeSource}. The types on which a type depends are known as its
8083dependencies. The process of finding an instance of a dependency to use at run
8084time is known as resolving the dependency. If no such instance can be found,
8085the dependency is said to be unsatisfied, and the application is broken.")
8086 (license license:asl2.0)))
8087
8088(define-public java-guice
8089 (package
8090 (name "java-guice")
8091 (version "4.1")
8092 (source (origin
8093 (method url-fetch)
8094 (uri (string-append "https://github.com/google/guice/archive/"
8095 version ".tar.gz"))
8096 (file-name (string-append name "-" version ".tar.gz"))
8097 (modules '((guix build utils)))
8098 (snippet
8099 `(begin
8100 (for-each delete-file (find-files "." ".*.jar"))))
8101 (sha256
8102 (base32
8103 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8104 (build-system ant-build-system)
8105 (arguments
8106 `(#:jar-name "java-guice.jar"
8107 #:jdk ,icedtea-8
8108 #:tests? #f; FIXME: tests are not in a java sub directory
8109 #:source-dir "core/src"))
8110 (inputs
8111 `(("guava" ,java-guava)
8112 ("java-cglib" ,java-cglib)
8113 ("java-aopalliance" ,java-aopalliance)
8114 ("java-javax-inject" ,java-javax-inject)
8115 ("java-asm" ,java-asm)))
8116 (home-page "https://github.com/google/guice")
8117 (synopsis "Lightweight dependency injection framework")
8118 (description "Guice is a lightweight dependency injection framework fo
8119Java 6 and above.")
8120 (license license:asl2.0)))
8121
8122(define-public java-guice-servlet
8123 (package
8124 (inherit java-guice)
8125 (name "java-guice-servlet")
8126 (arguments
8127 `(#:jar-name "guice-servlet.jar"
8128 #:source-dir "extensions/servlet/src/"
8129 #:jdk ,icedtea-8
8130 #:tests? #f)); FIXME: not in a java subdir
8131 (inputs
8132 `(("guice" ,java-guice)
8133 ("servlet" ,java-classpathx-servletapi)
8134 ,@(package-inputs java-guice)))))
8135
8136(define-public java-assertj
8137 (package
8138 (name "java-assertj")
8139 (version "3.8.0")
8140 (source (origin
8141 (method url-fetch)
8142 (uri (string-append "https://github.com/joel-costigliola/"
8143 "assertj-core/archive/"
8144 "assertj-core-" version ".tar.gz"))
8145 (sha256
8146 (base32
8147 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8148 (build-system ant-build-system)
8149 (arguments
8150 `(#:jar-name "java-assertj.jar"
8151 #:jdk ,icedtea-8
8152 #:source-dir "src/main/java"
8153 #:tests? #f)); depends on tng-junit which depends on assertj
8154 (inputs
8155 `(("cglib" ,java-cglib)
8156 ("junit" ,java-junit)
8157 ("hamcrest" ,java-hamcrest-core)))
8158 (native-inputs
8159 `(("mockito" ,java-mockito-1)))
8160 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8161 (synopsis "Fluent assertions for java")
8162 (description "AssertJ core is a Java library that provides a fluent
8163interface for writing assertions. Its main goal is to improve test code
8164readability and make maintenance of tests easier.")
8165 (license license:asl2.0)))
8166
8167(define-public java-jboss-javassist
8168 (package
8169 (name "java-jboss-javassist")
8170 (version "3.21.0")
8171 (source (origin
8172 (method url-fetch)
8173 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8174 "archive/rel_"
8175 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8176 "_ga.tar.gz"))
8177 (sha256
8178 (base32
8179 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8180 (build-system ant-build-system)
8181 (arguments
8182 `(#:jar-name "java-jboss-javassist.jar"
8183 #:jdk ,icedtea-8
8184 #:source-dir "src/main"
8185 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8186 #:phases
8187 (modify-phases %standard-phases
8188 (add-before 'configure 'remove-binary
8189 (lambda _
8190 (delete-file "javassist.jar")
8191 #t)))))
8192 (native-inputs
8193 `(("junit" ,java-junit)))
8194 (home-page "https://github.com/jboss-javassist/javassist")
8195 (synopsis "Java bytecode engineering toolkit")
8196 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8197manipulation simple. It is a class library for editing bytecodes in Java; it
8198enables Java programs to define a new class at runtime and to modify a class
8199file when the JVM loads it.")
8200 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8201
8202(define-public java-jcommander
8203 (package
8204 (name "java-jcommander")
8205 (version "1.71")
8206 (source (origin
8207 (method url-fetch)
8208 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8209 version ".tar.gz"))
8210 (file-name (string-append name "-" version ".tar.gz"))
8211 (sha256
8212 (base32
8213 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8214 (build-system ant-build-system)
8215 (arguments
8216 `(#:jar-name "java-jcommander.jar"
8217 #:jdk ,icedtea-8
8218 #:tests? #f; requires testng which depends on jcommander
8219 #:source-dir "src/main/java"))
8220 (home-page "http://jcommander.org")
8221 (synopsis "Command line parameters parser")
8222 (description "JCommander is a very small Java framework that makes it
8223trivial to parse command line parameters. Parameters are declared with
8224annotations.")
8225 (license license:asl2.0)))
8226
8227(define-public java-bsh
8228 (package
8229 (name "java-bsh")
8230 (version "2.0b6")
8231 (source (origin
8232 (method url-fetch)
8233 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8234 version ".tar.gz"))
8235 (file-name (string-append name "-" version ".tar.gz"))
8236 (sha256
8237 (base32
8238 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8239 (build-system ant-build-system)
8240 (arguments
8241 `(#:build-target "jarall"
8242 #:test-target "junit-tests-all"
8243 #:phases
8244 (modify-phases %standard-phases
8245 (replace 'install
8246 (lambda* (#:key outputs #:allow-other-keys)
8247 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8248 (mkdir-p share)
8249 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8250 #t))))))
8251 (home-page "http://beanshell.org/")
8252 (synopsis "Lightweight Scripting for Java")
8253 (description "BeanShell is a small, free, embeddable Java source
8254interpreter with object scripting language features, written in Java.
8255BeanShell dynamically executes standard Java syntax and extends it with common
8256scripting conveniences such as loose types, commands, and method closures like
8257those in Perl and JavaScript.")
8258 (license license:asl2.0)))
8259
8260(define-public java-fest-util
8261 (package
8262 (name "java-fest-util")
8263 (version "1.2.5")
8264 (source (origin
8265 (method url-fetch)
8266 (uri (string-append "https://github.com/alexruiz/fest-util/"
8267 "archive/fest-util-" version ".tar.gz"))
8268 (sha256
8269 (base32
8270 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8271 (build-system ant-build-system)
8272 (arguments
8273 `(#:jar-name "java-fest-util.jar"
8274 #:source-dir "src/main/java"))
8275 (native-inputs
8276 `(("junit" ,java-junit)
8277 ("hamcrest" ,java-hamcrest-core)))
8278 (home-page "https://github.com/alexruiz/fest-util")
8279 (synopsis "FEST common utilities")
8280 (description "Common utilities used in all FEST module.")
8281 (license license:asl2.0)))
8282
8283(define-public java-fest-test
8284 (package
8285 (name "java-fest-test")
8286 (version "2.1.0")
8287 (source (origin
8288 (method url-fetch)
8289 (uri (string-append "https://github.com/alexruiz/fest-test/"
8290 "archive/fest-test-" version ".tar.gz"))
8291 (sha256
8292 (base32
8293 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8294 (build-system ant-build-system)
8295 (arguments
8296 `(#:jar-name "java-fest-test.jar"
8297 #:source-dir "src/main/java"
8298 #:tests? #f)); no tests
8299 (inputs
8300 `(("junit" ,java-junit)))
8301 (home-page "https://github.com/alexruiz/fest-test")
8302 (synopsis "Common FEST testing infrastructure")
8303 (description "Fest-test contains the common FEST testing infrastructure.")
8304 (license license:asl2.0)))
8305
8306(define-public java-fest-assert
8307 (package
8308 (name "java-fest-assert")
8309 (version "2.0M10")
8310 (source (origin
8311 (method url-fetch)
8312 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8313 "archive/fest-assert-core-" version ".tar.gz"))
8314 (sha256
8315 (base32
8316 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8317 (build-system ant-build-system)
8318 (arguments
8319 `(#:jar-name "java-fest-assert.jar"
8320 #:source-dir "src/main/java"
8321 #:test-exclude
8322 (list
8323 "**/Abstract*.java"
8324 "**/*BaseTest.java"
8325 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8326 "**/MessageFormatter_format_Test.java"
8327 "**/internal/*/*_assert*_Test.java")))
8328 (inputs
8329 `(("java-fest-util" ,java-fest-util)))
8330 (native-inputs
8331 `(("java-junit" ,java-junit)
8332 ("java-fest-test" ,java-fest-test)
8333 ("java-hamcrest-core" ,java-hamcrest-core)
8334 ("java-mockito" ,java-mockito-1)
8335 ("java-cglib" ,java-cglib)
8336 ("java-objenesis" ,java-objenesis)
8337 ("java-asm" ,java-asm)))
8338 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8339 (synopsis "FEST fluent assertions")
8340 (description "FEST-Assert provides a fluent interface for assertions.")
8341 (license license:asl2.0)))
8342
8343(define-public java-testng
8344 (package
8345 (name "java-testng")
8346 (version "6.14.3")
8347 (source (origin
8348 (method git-fetch)
8349 (uri (git-reference
8350 (url "https://github.com/cbeust/testng.git")
8351 (commit version)))
8352 (file-name (string-append name "-" version "-checkout"))
8353 (sha256
8354 (base32
8355 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8356 (build-system ant-build-system)
8357 (arguments
8358 `(#:jdk ,icedtea-8; java.util.function
8359 #:jar-name "java-testng.jar"
8360 #:source-dir "src/main/java"
8361 #:phases
8362 (modify-phases %standard-phases
8363 ;; FIXME: I don't know why these tests fail
8364 (add-after 'unpack 'delete-failing-tests
8365 (lambda _
8366 (substitute* "src/test/resources/testng.xml"
8367 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8368 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8369 #t))
8370 ;; We don't have groovy
8371 (add-after 'unpack 'delete-groovy-tests
8372 (lambda _
8373 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8374 (substitute* "src/test/resources/testng.xml"
8375 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8376 #t))
8377 (add-before 'build 'copy-resources
8378 (lambda _
8379 (copy-recursively "src/main/resources" "build/classes")
8380 #t))
8381 (add-before 'check 'copy-test-resources
8382 (lambda _
8383 (copy-recursively "src/test/resources" "build/test-classes")
8384 #t))
8385 (replace 'check
8386 (lambda _
8387 (invoke "ant" "compile-tests")
8388 ;; we don't have groovy
8389 (substitute* "src/test/resources/testng.xml"
8390 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8391 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8392 ":build/classes"
8393 ":build/test-classes")
8394 "-Dtest.resources.dir=src/test/resources"
8395 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8396 (propagated-inputs
8397 `(("junit" ,java-junit)
8398 ("java-jsr305" ,java-jsr305)
8399 ("java-bsh" ,java-bsh)
8400 ("java-jcommander" ,java-jcommander)
8401 ("java-guice" ,java-guice)
8402 ("snakeyaml" ,java-snakeyaml)))
8403 (native-inputs
8404 `(("guava" ,java-guava)
8405 ("java-javax-inject" ,java-javax-inject)
8406 ("java-hamcrest" ,java-hamcrest-all)
8407 ("java-assertj" ,java-assertj)
8408 ("java-mockito" ,java-mockito-1)
8409 ("cglib" ,java-cglib)
8410 ("asm" ,java-asm)
8411 ("aopalliance" ,java-aopalliance)))
8412 (home-page "http://testng.org")
8413 (synopsis "Testing framework")
8414 (description "TestNG is a testing framework inspired from JUnit and NUnit
8415but introducing some new functionalities that make it more powerful and easier
8416to use.")
8417 (license license:asl2.0)))
8418
8419(define-public java-jnacl
8420 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8421 (revision "2"))
8422 (package
8423 (name "java-jnacl")
8424 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8425 (source (origin
8426 (method git-fetch)
8427 (uri (git-reference
8428 (url "https://github.com/neilalexander/jnacl.git")
8429 (commit commit)))
8430 (file-name (git-file-name name version))
8431 (sha256
8432 (base32
8433 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8434 (build-system ant-build-system)
8435 (arguments
8436 `(#:jar-name "jnacl.jar"
8437 #:source-dir "src/main/java"
8438 #:jdk ,icedtea-8
8439 #:phases
8440 (modify-phases %standard-phases
8441 (add-before 'build 'fix-tests
8442 (lambda _
8443 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8444 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8445 (("assertions.Assertions") "assertions.api.Assertions"))
8446 #t))
8447 (replace 'check
8448 (lambda _
8449 (invoke "ant" "compile-tests")
8450 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8451 ":build/classes"
8452 ":build/test-classes")
8453 "org.testng.TestNG" "-testclass"
8454 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8455 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8456 ":build/classes"
8457 ":build/test-classes")
8458 "org.testng.TestNG" "-testclass"
8459 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
8460 (native-inputs
8461 `(("java-testng" ,java-testng)
8462 ("java-fest-util" ,java-fest-util)
8463 ("java-fest-assert" ,java-fest-assert)))
8464 (home-page "https://github.com/neilalexander/jnacl")
8465 (synopsis "Java implementation of NaCl")
8466 (description "Pure Java implementation of the NaCl: Networking and
8467Cryptography library.")
8468 (license license:bsd-2))))
8469
8470(define-public java-mvel2
8471 (package
8472 (name "java-mvel2")
8473 (version "2.3.1")
8474 (source (origin
8475 (method url-fetch)
8476 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8477 version ".Final.tar.gz"))
8478 (sha256
8479 (base32
8480 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8481 (build-system ant-build-system)
8482 (arguments
8483 `(#:jar-name "mvel2.jar"
8484 #:source-dir "src/main/java"
8485 #:test-exclude
8486 (list "**/Abstract*.java"
8487 ;; Base class with no tests
8488 "**/MVELThreadTest.java")
8489 #:phases
8490 (modify-phases %standard-phases
8491 (add-after 'install 'install-bin
8492 (lambda* (#:key outputs #:allow-other-keys)
8493 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8494 (mkdir-p bin)
8495 (with-output-to-file (string-append bin "/mvel2")
8496 (lambda _
8497 (display
8498 (string-append
8499 "#!" (which "bash") "\n"
8500 "if [ \"$#\" -ne \"2\" ]; then\n"
8501 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8502 "exit\n"
8503 "fi\n"
8504 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8505 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8506 " org.mvel2.sh.Main $1"))))
8507 (chmod (string-append bin "/mvel2") #o755))
8508 #t)))))
8509 (native-inputs
8510 `(("junit" ,java-junit)
8511 ("hamcrest" ,java-hamcrest-core)))
8512 (home-page "https://github.com/mvel/mvel")
8513 (synopsis "MVFLEX Expression Language")
8514 (description "MVEL has largely been inspired by Java syntax, but has some
8515fundamental differences aimed at making it more efficient as an expression
8516language, such as operators that directly support collection, array and string
8517matching, as well as regular expressions. MVEL is used to evaluate expressions
8518written using Java syntax.
8519
8520In addition to the expression language, MVEL serves as a templating language for
8521configuration and string construction.")
8522 (license license:asl2.0)))
8523
8524(define-public java-commons-jexl-2
8525 (package
8526 (name "java-commons-jexl")
8527 (version "2.1.1")
8528 (source (origin
8529 (method url-fetch)
8530 (uri (string-append "mirror://apache/commons/jexl/source/"
8531 "commons-jexl-" version "-src.tar.gz"))
8532 (sha256
8533 (base32
8534 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8535 (build-system ant-build-system)
8536 (arguments
8537 `(#:jar-name "commons-jexl-2.jar"
8538 #:jdk ,icedtea-8
8539 #:source-dir "src/main/java"
8540 #:phases
8541 (modify-phases %standard-phases
8542 (add-before 'check 'disable-broken-tests
8543 (lambda* (#:key inputs #:allow-other-keys)
8544 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8545 (substitute* "ArithmeticTest.java"
8546 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8547 (("asserter.assertExpression\\(\"imanull") "//"))
8548 ;; This test fails with "ambiguous method invocation"
8549 (delete-file "CacheTest.java")
8550 ;; This test doesn't have access to the temp directory
8551 (substitute* "ClassCreatorTest.java"
8552 (("java.io.tmpdir") "user.dir"))
8553 ;; This test fails in trying to detect whether it can run.
8554 (substitute* "ClassCreator.java"
8555 (("boolean canRun =.*") "boolean canRun = false;\n"))
8556 ;; ...and these tests depend on it.
8557 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8558 (delete-file "scripting/JexlScriptEngineTest.java"))
8559 #t))
8560 (add-before 'build 'run-javacc
8561 (lambda _
8562 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
8563 (invoke "java" "jjtree" "Parser.jjt")
8564 (invoke "java" "javacc" "Parser.jj"))
8565 #t)))))
8566 (inputs
8567 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8568 (native-inputs
8569 `(("java-junit" ,java-junit)
8570 ("java-hamcrest-core" ,java-hamcrest-core)
8571 ("javacc" ,javacc-4)))
8572 (home-page "https://commons.apache.org/proper/commons-jexl/")
8573 (synopsis "Java Expression Language ")
8574 (description "JEXL is a library intended to facilitate the implementation
8575of dynamic and scripting features in applications and frameworks written in
8576Java. JEXL implements an Expression Language based on some extensions to the
8577JSTL Expression Language supporting most of the constructs seen in
8578shell-script or ECMAScript. Its goal is to expose scripting features usable
8579by technical operatives or consultants working with enterprise platforms.")
8580 (license license:asl2.0)))
8581
8582(define-public java-lz4
8583 (package
8584 (name "java-lz4")
8585 (version "1.4.0")
8586 (source (origin
8587 (method url-fetch)
8588 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8589 version ".tar.gz"))
8590 (file-name (string-append name "-" version ".tar.gz"))
8591 (sha256
8592 (base32
8593 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8594 (build-system ant-build-system)
8595 (arguments
8596 `(#:jar-name "lz4.jar"
8597 #:jdk ,icedtea-8
8598 #:source-dir "src/java:src/java-unsafe"
8599 #:tests? #f; FIXME: requires more dependencies
8600 #:phases
8601 (modify-phases %standard-phases
8602 (add-before 'configure 'generate-source
8603 (lambda _
8604 (with-directory-excursion "src/build/source_templates"
8605 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8606 #t)))))
8607 (native-inputs
8608 `(("mvel" ,java-mvel2)))
8609 (home-page "https://jpountz.github.io/lz4-java")
8610 (synopsis "Compression algorithm")
8611 (description "LZ4 - Java is a Java port of the popular lz4 compression
8612algorithms and xxHash hashing algorithm.")
8613 (license license:asl2.0)))
8614
8615(define-public java-bouncycastle
8616 (package
8617 (name "java-bouncycastle")
8618 (version "1.60")
8619 (source (origin
8620 (method url-fetch)
8621 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
8622 (substring version 0 1) "v"
8623 (substring version 2 4) ".tar.gz"))
8624 (sha256
8625 (base32
8626 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
8627 (modules '((guix build utils)))
8628 (snippet
8629 '(begin
8630 (for-each delete-file
8631 (find-files "." "\\.jar$"))
8632 #t))))
8633 (build-system ant-build-system)
8634 (arguments
8635 `(#:jdk ,icedtea-8
8636 #:tests? #f
8637 #:phases
8638 (modify-phases %standard-phases
8639 (replace 'build
8640 (lambda _
8641 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
8642 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
8643 ;; FIXME: the tests freeze.
8644 ;; (replace 'check
8645 ;; (lambda _
8646 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
8647 (replace 'install
8648 (install-jars "build/artifacts/jdk1.5/jars")))))
8649 (inputs
8650 `(("java-javax-mail" ,java-javax-mail)))
8651 (native-inputs
8652 `(("unzip" ,unzip)
8653 ("junit" ,java-junit)
8654 ("java-native-access" ,java-native-access)
8655 ("java-native-access-platform" ,java-native-access-platform)))
8656 (home-page "https://www.bouncycastle.org")
8657 (synopsis "Cryptographic library")
8658 (description "Bouncy Castle is a cryptographic library for the Java
8659programming language.")
8660 (license license:expat)))
8661
8662(define-public java-lmax-disruptor
8663 (package
8664 (name "java-lmax-disruptor")
8665 (version "3.3.7")
8666 (source (origin
8667 (method url-fetch)
8668 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8669 "archive/" version ".tar.gz"))
8670 (file-name (string-append name "-" version ".tar.gz"))
8671 (sha256
8672 (base32
8673 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8674 (build-system ant-build-system)
8675 (arguments
8676 `(#:jar-name "java-lmax-disruptor.jar"
8677 #:jdk ,icedtea-8
8678 #:tests? #f)); tests hang
8679 (inputs
8680 `(("junit" ,java-junit)
8681 ("java-hdrhistogram" ,java-hdrhistogram)
8682 ("java-jmock" ,java-jmock)
8683 ("java-jmock-legacy" ,java-jmock-legacy)
8684 ("java-jmock-junit4" ,java-jmock-junit4)
8685 ("java-hamcrest-all" ,java-hamcrest-all)))
8686 (native-inputs
8687 `(("cglib" ,java-cglib)
8688 ("objenesis" ,java-objenesis)
8689 ("asm" ,java-asm)))
8690 (home-page "https://www.lmax.com/disruptor")
8691 (synopsis "High performance inter-thread communication")
8692 (description "LMAX Disruptor is a software pattern and software component
8693for high performance inter-thread communication that avoids the need for
8694message queues or resource locking.")
8695 (license license:asl2.0)))
8696
8697(define-public java-commons-bcel
8698 (package
8699 (name "java-commons-bcel")
8700 (version "6.1")
8701 (source (origin
8702 (method url-fetch)
8703 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8704 version "-src.tar.gz"))
8705 (sha256
8706 (base32
8707 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8708 (build-system ant-build-system)
8709 (arguments
8710 `(#:jar-name "bcel.jar"
8711 #:jdk ,icedtea-8
8712 #:source-dir "src/main/java"
8713 #:test-dir "src/test/java"
8714 ;; FIXME: Tests require the unpackaged jna.
8715 #:tests? #f))
8716 (home-page "https://commons.apache.org/proper/commons-bcel/")
8717 (synopsis "Byte code engineering library")
8718 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8719intended to give users a convenient way to analyze, create, and
8720manipulate (binary) Java class files. Classes are represented by objects
8721which contain all the symbolic information of the given class: methods, fields
8722and byte code instructions, in particular.
8723
8724Such objects can be read from an existing file, be transformed by a
8725program (e.g. a class loader at run-time) and written to a file again. An
8726even more interesting application is the creation of classes from scratch at
8727run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8728if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8729of Java @code{.class} files.")
8730 (license license:asl2.0)))
8731
8732(define-public java-xerial-core
8733 (package
8734 (name "java-xerial-core")
8735 (version "2.1")
8736 (source (origin
8737 (method url-fetch)
8738 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8739 version ".tar.gz"))
8740 (file-name (string-append name "-" version ".tar.gz"))
8741 (sha256
8742 (base32
8743 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8744 (build-system ant-build-system)
8745 (arguments
8746 `(#:jar-name "xerial-core.jar"
8747 #:source-dir "xerial-core/src/main/java"
8748 #:test-dir "xerial-core/src/test"
8749 #:phases
8750 (modify-phases %standard-phases
8751 (add-before 'build 'copy-resources
8752 (lambda _
8753 (copy-recursively "xerial-core/src/main/resources"
8754 "build/classes")
8755 #t)))))
8756 (native-inputs
8757 `(("junit" ,java-junit)
8758 ("hamcrest" ,java-hamcrest-core)))
8759 (home-page "https://github.com/xerial/xerial-java")
8760 (synopsis "Data management libraries for Java")
8761 (description "Xerial is a set of data management libraries for the Java
8762programming language. The ultimate goal of the Xerial project is to manage
8763everything as database, including class objects, text format data, data
8764streams, etc.")
8765 (license license:asl2.0)))
8766
8767(define-public java-powermock-reflect
8768 (package
8769 (name "java-powermock-reflect")
8770 (version "1.7.3")
8771 (source (origin
8772 (method url-fetch)
8773 (uri (string-append "https://github.com/powermock/powermock/"
8774 "archive/powermock-" version ".tar.gz"))
8775 (file-name (string-append name "-" version ".tar.gz"))
8776 (sha256
8777 (base32
8778 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8779 (patches
8780 (search-patches "java-powermock-fix-java-files.patch"))))
8781 (build-system ant-build-system)
8782 (arguments
8783 `(#:jar-name "java-powermock-reflect.jar"
8784 #:jdk ,icedtea-8
8785 #:source-dir "powermock-reflect/src/main/java"
8786 #:test-dir "powermock-reflect/src/test"))
8787 (inputs
8788 `(("java-objenesis" ,java-objenesis)))
8789 (native-inputs
8790 `(("junit" ,java-junit)
8791 ("cglib" ,java-cglib)
8792 ("asm" ,java-asm)
8793 ("hamcrest" ,java-hamcrest-core)
8794 ("assertj" ,java-assertj)))
8795 (home-page "https://github.com/powermock/powermock")
8796 (synopsis "Mock library extension framework")
8797 (description "PowerMock is a framework that extends other mock libraries
8798such as EasyMock with more powerful capabilities. PowerMock uses a custom
8799classloader and bytecode manipulation to enable mocking of static methods,
8800constructors, final classes and methods, private methods, removal of static
8801initializers and more. By using a custom classloader no changes need to be
8802done to the IDE or continuous integration servers which simplifies adoption.")
8803 (license license:asl2.0)))
8804
8805(define-public java-powermock-core
8806 (package
8807 (inherit java-powermock-reflect)
8808 (name "java-powermock-core")
8809 (arguments
8810 `(#:jar-name "java-powermock-core.jar"
8811 #:source-dir "powermock-core/src/main/java"
8812 #:test-dir "powermock-core/src/test"
8813 #:tests? #f; requires powermock-api
8814 #:jdk ,icedtea-8
8815 #:phases
8816 (modify-phases %standard-phases
8817 (add-before 'build 'copy-resources
8818 (lambda _
8819 (copy-recursively "powermock-core/src/main/resources"
8820 "build/classes")
8821 #t)))))
8822 (inputs
8823 `(("reflect" ,java-powermock-reflect)
8824 ("javassist" ,java-jboss-javassist)))
8825 (native-inputs
8826 `(("junit" ,java-junit)
8827 ("assertj" ,java-assertj)
8828 ("mockito" ,java-mockito-1)))))
8829
8830(define-public java-powermock-api-support
8831 (package
8832 (inherit java-powermock-reflect)
8833 (name "java-powermock-api-support")
8834 (build-system ant-build-system)
8835 (arguments
8836 `(#:jar-name "java-powermock-api-support.jar"
8837 #:jdk ,icedtea-8
8838 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8839 #:tests? #f)); no tests
8840 (inputs
8841 `(("core" ,java-powermock-core)
8842 ("reflect" ,java-powermock-reflect)))))
8843
8844(define-public java-powermock-modules-junit4-common
8845 (package
8846 (inherit java-powermock-reflect)
8847 (name "java-powermock-modules-junit4-common")
8848 (build-system ant-build-system)
8849 (arguments
8850 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8851 #:jdk ,icedtea-8
8852 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8853 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8854 (inputs
8855 `(("core" ,java-powermock-core)
8856 ("easymock" ,java-easymock)
8857 ("reflect" ,java-powermock-reflect)
8858 ("hamcrest" ,java-hamcrest-core)
8859 ("cglib" ,java-cglib)))))
8860
8861(define-public java-powermock-modules-junit4
8862 (package
8863 (inherit java-powermock-reflect)
8864 (name "java-powermock-modules-junit4")
8865 (build-system ant-build-system)
8866 (arguments
8867 `(#:jar-name "java-powermock-modules-junit4.jar"
8868 #:jdk ,icedtea-8
8869 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
8870 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8871 #:phases
8872 (modify-phases %standard-phases
8873 (add-before 'build 'fix-junit-detection
8874 (lambda _
8875 ;; Our junit version is 4.12-SNAPSHOT
8876 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8877 "PowerMockJUnit4MethodValidator.java")
8878 (("4.12") "4.12-SNAPSHOT"))
8879 #t)))))
8880 (inputs
8881 `(("core" ,java-powermock-core)
8882 ("reflect" ,java-powermock-reflect)
8883 ("common" ,java-powermock-modules-junit4-common)
8884 ("cglib" ,java-cglib)))
8885 (native-inputs
8886 `(("easymock" ,java-easymock)
8887 ("hamcrest" ,java-hamcrest-core)
8888 ("objenesis" ,java-objenesis)
8889 ("asm" ,java-asm)
8890 ("junit" ,java-junit)))))
8891
8892(define-public java-powermock-api-easymock
8893 (package
8894 (inherit java-powermock-reflect)
8895 (name "java-powermock-api-easymock")
8896 (build-system ant-build-system)
8897 (arguments
8898 `(#:jar-name "java-powermock-api-easymock.jar"
8899 #:jdk ,icedtea-8
8900 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8901 #:tests? #f; no tests
8902 #:phases
8903 (modify-phases %standard-phases
8904 (add-before 'build 'fix-file
8905 (lambda _
8906 ;; FIXME: This looks wrong, but it fixes a build error.
8907 (with-directory-excursion "powermock-api/powermock-api-easymock"
8908 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8909 (("classLoader instanceof MockClassLoader") "false")
8910 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8911 #t)))))
8912 (inputs
8913 `(("core" ,java-powermock-core)
8914 ("easymock" ,java-easymock)
8915 ("reflect" ,java-powermock-reflect)
8916 ("support" ,java-powermock-api-support)
8917 ("cglib" ,java-cglib)))))
8918
8919(define-public java-jboss-jms-api-spec
8920 (package
8921 (name "java-jboss-jms-api-spec")
8922 (version "2.0")
8923 (source (origin
8924 (method url-fetch)
8925 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8926 "archive/jboss-jms-api_" version
8927 "_spec-1.0.1.Final.tar.gz"))
8928 (sha256
8929 (base32
8930 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8931 (build-system ant-build-system)
8932 (arguments
8933 `(#:jar-name "java-jboss-jms-api_spec.jar"
8934 #:jdk ,icedtea-8
8935 #:source-dir "."
8936 #:tests? #f)); no tests
8937 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8938 (synopsis "Java Message Service API specification")
8939 (description "Java Message Service (JMS) API is used to send messages
8940messages between two or more clients. It is a messaging standard that allows
8941application components to create, send, receive, and read messages.")
8942 ; either gpl2 only with GPL Classpath Exception, or cddl.
8943 (license (list license:gpl2 license:cddl1.0))))
8944
8945(define-public java-mail
8946 (package
8947 (name "java-mail")
8948 (version "1.6.0")
8949 (source (origin
8950 (method url-fetch)
8951 (uri (string-append "https://github.com/javaee/javamail/archive/"
8952 "JAVAMAIL-1_6_0.tar.gz"))
8953 (sha256
8954 (base32
8955 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8956 (build-system ant-build-system)
8957 (arguments
8958 `(#:jar-name "java-mail.jar"
8959 #:jdk ,icedtea-8
8960 #:source-dir "mail/src/main/java"
8961 #:test-dir "mail/src/test"
8962 #:test-exclude
8963 (list "**/CollectorFormatterTest.java"
8964 "**/CompactFormatterTest.java"
8965 "**/DurationFilterTest.java"
8966 "**/MailHandlerTest.java"
8967 "**/GetLocalAddressTest.java"
8968 ;; FIXME: both end with:
8969 ;; java.lang.ClassNotFoundException:
8970 ;; javax.mail.internet.MimeMultipartParseTest
8971 "**/MimeMultipartParseTest.java"
8972 "**/SearchTermSerializationTest.java")
8973 #:phases
8974 (modify-phases %standard-phases
8975 (add-before 'configure 'move-version.java
8976 (lambda _
8977 (copy-file "mail/src/main/resources/javax/mail/Version.java"
8978 "mail/src/main/java/javax/mail/Version.java")
8979 #t))
8980 (add-before 'build 'copy-resources
8981 (lambda _
8982 (copy-recursively "mail/src/main/resources/META-INF"
8983 "build/classes/META-INF")
8984 #t)))))
8985 (native-inputs
8986 `(("junit" ,java-junit)
8987 ("hamcrest" ,java-hamcrest-core)))
8988 (home-page "https://javaee.github.io/javamail/")
8989 (synopsis "Mail-related functionnalities in Java")
8990 (description "The JavaMail API provides a platform-independent and
8991protocol-independent framework to build mail and messaging applications.")
8992 ;; General Public License Version 2 only ("GPL") or the Common Development
8993 ;; and Distribution License("CDDL")
8994 (license (list license:cddl1.1
8995 license:gpl2)))); with classpath exception
8996
8997(define-public java-jeromq
8998 (package
8999 (name "java-jeromq")
9000 (version "0.4.3")
9001 (source (origin
9002 (method git-fetch)
9003 (uri (git-reference
9004 (url "https://github.com/zeromq/jeromq.git")
9005 (commit (string-append "v" version))))
9006 (file-name (string-append name "-" version "-checkout"))
9007 (sha256
9008 (base32
9009 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9010 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9011 (build-system ant-build-system)
9012 (arguments
9013 `(#:jar-name "java-jeromq.jar"
9014 #:source-dir "src/main/java"
9015 #:jdk ,icedtea-8
9016 #:test-exclude
9017 (list
9018 "**/Abstract*.java"
9019 ;; Requires network
9020 "**/ZBeaconTest.java"
9021 ;; Failures
9022 "**/DealerSpecTest.java"
9023 "**/CustomDecoderTest.java"
9024 "**/CustomEncoderTest.java"
9025 "**/ConnectRidTest.java"
9026 "**/ReqSpecTest.java"
9027 "**/PushPullSpecTest.java"
9028 "**/PubSubHwmTest.java"
9029 "**/RouterSpecTest.java"
9030 "**/ProxyTest.java")))
9031 (inputs
9032 `(("java-jnacl" ,java-jnacl)))
9033 (native-inputs
9034 `(("java-hamcrest-core" ,java-hamcrest-core)
9035 ("junit" ,java-junit)))
9036 (home-page "http://zeromq.org/bindings:java")
9037 (synopsis "Java binding for 0MQ")
9038 (description "Jeromq provides the java bindings for 0MQ.")
9039 (license license:mpl2.0)))
9040
9041(define-public java-kafka-clients
9042 (package
9043 (name "java-kafka-clients")
9044 (version "1.0.0")
9045 (source (origin
9046 (method url-fetch)
9047 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9048 version "-src.tgz"))
9049 (sha256
9050 (base32
9051 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9052 (build-system ant-build-system)
9053 (arguments
9054 `(#:jar-name "java-kafka-clients.jar"
9055 #:jdk ,icedtea-8
9056 #:source-dir "clients/src/main/java"
9057 #:test-dir "clients/src/test"
9058 #:test-exclude
9059 (list
9060 ;; This file does not contain a class
9061 "**/IntegrationTest.java"
9062 ;; Requires network
9063 "**/ClientUtilsTest.java"
9064 ;; End with errors that seem related to our powermock
9065 "**/KafkaProducerTest.java"
9066 "**/BufferPoolTest.java")))
9067 (inputs
9068 `(("java-slf4j-api" ,java-slf4j-api)
9069 ("java-lz4" ,java-lz4)))
9070 (native-inputs
9071 `(("junit" ,java-junit)
9072 ("hamcrest" ,java-hamcrest-all)
9073 ("objenesis" ,java-objenesis)
9074 ("asm" ,java-asm)
9075 ("cglib" ,java-cglib)
9076 ("javassist" ,java-jboss-javassist)
9077 ("snappy" ,java-snappy)
9078 ("easymock" ,java-easymock)
9079 ("powermock" ,java-powermock-core)
9080 ("powermock-easymock" ,java-powermock-api-easymock)
9081 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9082 ("powermock-junit4" ,java-powermock-modules-junit4)
9083 ("powermock-support" ,java-powermock-api-support)
9084 ("java-bouncycastle" ,java-bouncycastle)))
9085 (home-page "https://kafka.apache.org")
9086 (synopsis "Distributed streaming platform")
9087 (description "Kafka is a distributed streaming platform, which means:
9088@itemize
9089@item it can publish and subscribe to streams of records;
9090@item it can store streams of records in a fault-tolerant way;
9091@item it can process streams of records as they occur.
9092@end itemize")
9093 ;; Either cddl or gpl2 only.
9094 (license (list license:cddl1.1; actually cddl1.1
9095 license:gpl2)))); with classpath exception
9096
9097(define-public java-jdom
9098 (package
9099 (name "java-jdom")
9100 (version "1.1.3")
9101 (source (origin
9102 (method url-fetch)
9103 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9104 version ".tar.gz"))
9105 (sha256
9106 (base32
9107 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9108 (build-system ant-build-system)
9109 (arguments
9110 `(#:build-target "package"
9111 #:tests? #f; tests are run as part of the build process
9112 #:phases
9113 (modify-phases %standard-phases
9114 (replace 'install
9115 (install-jars "build")))))
9116 (home-page "http://jdom.org/")
9117 (synopsis "Access, manipulate, and output XML data")
9118 (description "Java-based solution for accessing, manipulating, and
9119outputting XML data from Java code.")
9120 (license license:bsd-4)))
9121
9122(define-public java-geronimo-xbean-reflect
9123 (package
9124 (name "java-geronimo-xbean-reflect")
9125 (version "4.5")
9126 (source (origin
9127 (method svn-fetch)
9128 (uri (svn-reference
9129 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9130 (revision 1807396)))
9131 (file-name (string-append name "-" version))
9132 (sha256
9133 (base32
9134 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9135 (build-system ant-build-system)
9136 (arguments
9137 `(#:jar-name "geronimo-xbean-reflect.jar"
9138 #:source-dir "xbean-reflect/src/main/java"
9139 #:test-dir "xbean-reflect/src/test"
9140 #:jdk ,icedtea-8
9141 #:test-exclude
9142 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9143 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9144 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9145 #:phases
9146 (modify-phases %standard-phases
9147 (add-before 'build 'fix-source
9148 (lambda _
9149 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9150 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9151 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9152 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9153 #t))))))
9154 (inputs
9155 `(("asm" ,java-asm)
9156 ("log4j" ,java-log4j-api)
9157 ("log4j-1.2" ,java-log4j-1.2-api)
9158 ("log4j-core" ,java-log4j-core)
9159 ("logging" ,java-commons-logging-minimal)))
9160 (native-inputs
9161 `(("junit" ,java-junit)))
9162 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9163 (synopsis "Dependency injection helper")
9164 (description "Xbean-reflect provides very flexible ways to create objects
9165and graphs of objects for dependency injection frameworks")
9166 (license license:asl2.0)))
9167
9168(define-public java-geronimo-xbean-bundleutils
9169 (package
9170 (inherit java-geronimo-xbean-reflect)
9171 (name "java-geronimo-xbean-bundleutils")
9172 (arguments
9173 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9174 #:source-dir "xbean-bundleutils/src/main/java"
9175 #:test-dir "xbean-bundleutils/src/test"
9176 #:phases
9177 (modify-phases %standard-phases
9178 (add-before 'build 'fix-java
9179 (lambda _
9180 ;; We use a more recent version of osgi, so this file requires
9181 ;; more interface method implementations.
9182 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9183 (("import org.osgi.framework.ServiceRegistration;")
9184 "import org.osgi.framework.ServiceRegistration;
9185import org.osgi.framework.ServiceFactory;
9186import java.util.Collection;
9187import org.osgi.framework.ServiceObjects;")
9188 (("public Bundle getBundle\\(\\)")
9189 "@Override
9190public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9191 throw new UnsupportedOperationException();
9192}
9193@Override
9194public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9195 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9196 throw new UnsupportedOperationException();
9197}
9198public Bundle getBundle()"))
9199 #t)))))
9200 (inputs
9201 `(("java-slf4j" ,java-slf4j-api)
9202 ("java-asm" ,java-asm)
9203 ("java-osgi-framework" ,java-osgi-framework)
9204 ("java-eclipse-osgi" ,java-eclipse-osgi)
9205 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9206
9207(define-public java-geronimo-xbean-asm-util
9208 (package
9209 (inherit java-geronimo-xbean-reflect)
9210 (name "java-geronimo-xbean-asm-util")
9211 (arguments
9212 `(#:jar-name "geronimo-xbean-asm-util.jar"
9213 #:source-dir "xbean-asm-util/src/main/java"
9214 #:tests? #f)); no tests
9215 (inputs
9216 `(("java-asm" ,java-asm)))
9217 (native-inputs '())))
9218
9219(define-public java-geronimo-xbean-finder
9220 (package
9221 (inherit java-geronimo-xbean-reflect)
9222 (name "java-geronimo-xbean-finder")
9223 (arguments
9224 `(#:jar-name "geronimo-xbean-finder.jar"
9225 #:source-dir "xbean-finder/src/main/java"
9226 #:test-dir "xbean-finder/src/test"))
9227 (inputs
9228 `(("java-slf4j-api" ,java-slf4j-api)
9229 ("java-asm" ,java-asm)
9230 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9231 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9232 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9233 ("java-osgi-framework" ,java-osgi-framework)))
9234 (native-inputs
9235 `(("java-junit" ,java-junit)
9236 ("java-hamcrest-core" ,java-hamcrest-core)))))
9237
9238(define-public java-gson
9239 (package
9240 (name "java-gson")
9241 (version "2.8.2")
9242 (source (origin
9243 (method url-fetch)
9244 (uri (string-append "https://github.com/google/gson/archive/"
9245 "gson-parent-" version ".tar.gz"))
9246 (sha256
9247 (base32
9248 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9249 (build-system ant-build-system)
9250 (arguments
9251 `(#:jar-name "gson.jar"
9252 #:source-dir "gson/src/main/java"
9253 #:test-dir "gson/src/test"))
9254 (native-inputs
9255 `(("java-junit" ,java-junit)
9256 ("java-hamcrest-core" ,java-hamcrest-core)))
9257 (home-page "https://github.com/google/gson")
9258 (synopsis "Java serialization/deserialization library from/to JSON")
9259 (description "Gson is a Java library that can be used to convert Java
9260Objects into their JSON representation. It can also be used to convert a JSON
9261string to an equivalent Java object. Gson can work with arbitrary Java objects
9262including pre-existing objects that you do not have source-code of.")
9263 (license license:asl2.0)))
9264
9265(define-public java-hawtjni
9266 (package
9267 (name "java-hawtjni")
9268 (version "1.15")
9269 (source (origin
9270 (method url-fetch)
9271 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9272 "hawtjni-project-" version ".tar.gz"))
9273 (sha256
9274 (base32
9275 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9276 (build-system ant-build-system)
9277 (arguments
9278 `(#:jar-name "hawtjni.jar"
9279 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9280 #:tests? #f; no tests
9281 #:phases
9282 (modify-phases %standard-phases
9283 (add-before 'build 'build-native
9284 (lambda* (#:key inputs #:allow-other-keys)
9285 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9286 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9287 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9288 "-fPIC" "-O2" include)
9289 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9290 "-fPIC" "-O2" include)
9291 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9292 "hawtjni.o" "hawtjni-callback.o")))
9293 #t))
9294 (add-after 'install 'install-native
9295 (lambda* (#:key outputs #:allow-other-keys)
9296 (let* ((out (assoc-ref outputs "out"))
9297 (lib (string-append out "/lib"))
9298 (inc (string-append out "/include")))
9299 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9300 (install-file "libhawtjni.so" lib)
9301 (install-file "hawtjni.h" inc)))
9302 #t)))))
9303 (inputs
9304 `(("java-commons-cli" ,java-commons-cli)
9305 ("java-asm" ,java-asm)
9306 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9307 (home-page "https://fusesource.github.io/hawtjni/")
9308 (synopsis "JNI code generator")
9309 (description "HawtJNI is a code generator that produces the JNI code needed
9310to implement Java native methods. It is based on the jnigen code generator
9311that is part of the SWT Tools project.")
9312 (license license:asl2.0)))
9313
9314(define-public java-jansi-native
9315 (package
9316 (name "java-jansi-native")
9317 (version "1.7")
9318 (source (origin
9319 (method url-fetch)
9320 (uri (string-append "https://github.com/fusesource/jansi-native/"
9321 "archive/jansi-native-" version ".tar.gz"))
9322 (sha256
9323 (base32
9324 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9325 (build-system ant-build-system)
9326 (arguments
9327 `(#:jar-name "jansi-native.jar"
9328 #:source-dir "src/main/java"
9329 #:tests? #f; no tests
9330 #:phases
9331 (modify-phases %standard-phases
9332 (add-before 'build 'build-native
9333 (lambda* (#:key inputs #:allow-other-keys)
9334 ;; there are more required files for windows in windows/
9335 (with-directory-excursion "src/main/native-package/src"
9336 (substitute* "jansi_ttyname.c"
9337 (("#include \"jansi_.*") ""))
9338 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9339 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9340 "/include")
9341 (string-append "-I" (assoc-ref inputs "jdk")
9342 "/include/linux")
9343 "-fPIC" "-O2")
9344 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9345 (add-before 'build 'install-native
9346 (lambda _
9347 (let ((dir (string-append "build/classes/META-INF/native/"
9348 ,(match (%current-system)
9349 ((or "i686-linux" "armhf-linux")
9350 "linux32")
9351 ((or "x86_64-linux" "aarch64-linux")
9352 "linux64")))))
9353 (install-file "src/main/native-package/src/libjansi.so" dir))
9354 #t))
9355 (add-after 'install 'install-native
9356 (lambda* (#:key outputs #:allow-other-keys)
9357 (install-file "src/main/native-package/src/jansi.h"
9358 (string-append (assoc-ref outputs "out") "/include"))
9359 #t)))))
9360 (inputs
9361 `(("java-hawtjni" ,java-hawtjni)))
9362 (home-page "https://fusesource.github.io/jansi/")
9363 (synopsis "Native library for jansi")
9364 (description "This package provides the native library for jansi, a small
9365Java library that allows you to use ANSI escape sequences to format your
9366console output.")
9367 (license license:asl2.0)))
9368
9369(define-public java-jansi
9370 (package
9371 (name "java-jansi")
9372 (version "1.16")
9373 (source (origin
9374 (method url-fetch)
9375 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9376 "jansi-project-" version ".tar.gz"))
9377 (sha256
9378 (base32
9379 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9380 (build-system ant-build-system)
9381 (arguments
9382 `(#:jar-name "jansi.jar"
9383 #:source-dir "jansi/src/main/java"
9384 #:test-dir "jansi/src/test"
9385 #:phases
9386 (modify-phases %standard-phases
9387 (add-after 'check 'clear-term
9388 (lambda _
9389 (invoke "echo" "-e" "\\e[0m"))))))
9390 (inputs
9391 `(("java-jansi-native" ,java-jansi-native)))
9392 (native-inputs
9393 `(("java-junit" ,java-junit)
9394 ("java-hamcrest-core" ,java-hamcrest-core)))
9395 (home-page "https://fusesource.github.io/jansi/")
9396 (synopsis "Portable ANSI escape sequences")
9397 (description "Jansi is a Java library that allows you to use ANSI escape
9398sequences to format your console output which works on every platform.")
9399 (license license:asl2.0)))
9400
9401(define-public java-jboss-el-api-spec
9402 (package
9403 (name "java-jboss-el-api-spec")
9404 (version "3.0")
9405 (source (origin
9406 (method url-fetch)
9407 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9408 "archive/jboss-el-api_" version
9409 "_spec-1.0.7.Final.tar.gz"))
9410 (sha256
9411 (base32
9412 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9413 (build-system ant-build-system)
9414 (arguments
9415 `(#:jar-name "java-jboss-el-api_spec.jar"
9416 #:jdk ,icedtea-8))
9417 (inputs
9418 `(("java-junit" ,java-junit)))
9419 (home-page "https://github.com/jboss/jboss-el-api_spec")
9420 (synopsis "JSR-341 expression language 3.0 API")
9421 (description "This package contains an implementation of the JSR-341
9422specification for the expression language 3.0. It implements an expression
9423language inspired by ECMAScript and XPath. This language is used with
9424JavaServer Pages (JSP).")
9425 ;; Either GPL2 only or CDDL.
9426 (license (list license:gpl2 license:cddl1.1))))
9427
9428(define-public java-jboss-interceptors-api-spec
9429 (package
9430 (name "java-jboss-interceptors-api-spec")
9431 (version "1.2")
9432 (source (origin
9433 (method url-fetch)
9434 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9435 "archive/jboss-interceptors-api_" version
9436 "_spec-1.0.0.Final.tar.gz"))
9437 (sha256
9438 (base32
9439 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9440 (build-system ant-build-system)
9441 (arguments
9442 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9443 #:jdk ,icedtea-8
9444 #:source-dir "."
9445 #:tests? #f)); no tests
9446 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9447 (synopsis "Interceptors 1.2 API classes from JSR 318")
9448 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9449API. Interceptors are used to interpose on business method invocations and
9450specific events.")
9451 ;; Either GPL2 only or CDDL.
9452 (license (list license:gpl2 license:cddl1.1))))
9453
9454(define-public java-cdi-api
9455 (package
9456 (name "java-cdi-api")
9457 (version "2.0")
9458 (source (origin
9459 (method url-fetch)
9460 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9461 version ".tar.gz"))
9462 (file-name (string-append name "-" version ".tar.gz"))
9463 (sha256
9464 (base32
9465 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9466 (build-system ant-build-system)
9467 (arguments
9468 `(#:source-dir "api/src/main/java"
9469 #:jar-name "java-cdi-api.jar"
9470 #:test-dir "api/src/test"
9471 #:jdk ,icedtea-8
9472 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9473 (inputs
9474 `(("java-javax-inject" ,java-javax-inject)
9475 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9476 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9477 (native-inputs
9478 `(("java-testng" ,java-testng)
9479 ("java-hamcrest-core" ,java-hamcrest-core)))
9480 (home-page "http://cdi-spec.org/")
9481 (synopsis "Contexts and Dependency Injection APIs")
9482 (description "Java-cdi-api contains the required APIs for Contexts and
9483Dependency Injection (CDI).")
9484 (license license:asl2.0)))
9485
9486(define-public java-joda-convert
9487 (package
9488 (name "java-joda-convert")
9489 (version "1.9.2")
9490 (source (origin
9491 (method url-fetch)
9492 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9493 version ".tar.gz"))
9494 (file-name (string-append name "-" version ".tar.gz"))
9495 (sha256
9496 (base32
9497 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9498 (build-system ant-build-system)
9499 (arguments
9500 `(#:jar-name (string-append ,name "-" ,version ".jar")
9501 #:source-dir "src/main/java"
9502 #:test-include (list "**/Test*.java")
9503 ;; Contains only interfaces and base classes (no test)
9504 #:test-exclude (list "**/test*/**.java")))
9505 (inputs
9506 `(("java-guava" ,java-guava)))
9507 (native-inputs
9508 `(("java-junit" ,java-junit)
9509 ("java-hamcrest-core" ,java-hamcrest-core)))
9510 (home-page "http://www.joda.org/joda-convert/")
9511 (synopsis "Conversion between Objects and Strings")
9512 (description "Joda-Convert provides a small set of classes to aid
9513conversion between Objects and Strings. It is not intended to tackle the
9514wider problem of Object to Object transformation.")
9515 (license license:asl2.0)))
9516
9517(define-public java-joda-time
9518 (package
9519 (name "java-joda-time")
9520 (version "2.9.9")
9521 (source (origin
9522 (method url-fetch)
9523 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9524 version ".tar.gz"))
9525 (file-name (string-append name "-" version ".tar.gz"))
9526 (sha256
9527 (base32
9528 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9529 (build-system ant-build-system)
9530 (arguments
9531 `(#:jar-name "java-joda-time.jar"
9532 #:source-dir "src/main/java"
9533 #:test-include (list "**/Test*.java")
9534 ;; There is no runnable test in these files
9535 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9536 #:phases
9537 (modify-phases %standard-phases
9538 (add-after 'build 'build-resources
9539 (lambda _
9540 (mkdir-p "build/classes/org/joda/time/tz/data")
9541 (mkdir-p "build/classes/org/joda/time/format")
9542 ;; This will produce the following exception:
9543 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9544 ;; which is normal, because it doesn't exist yet. It still generates
9545 ;; the same file as in the binary one can find on maven.
9546 (invoke "java" "-cp"
9547 (string-append "build/classes:" (getenv "CLASSPATH"))
9548 "org.joda.time.tz.ZoneInfoCompiler"
9549 "-src" "src/main/java/org/joda/time/tz/src"
9550 "-dst" "build/classes/org/joda/time/tz/data"
9551 "africa" "antarctica" "asia" "australasia"
9552 "europe" "northamerica" "southamerica"
9553 "pacificnew" "etcetera" "backward" "systemv")
9554 (for-each (lambda (f)
9555 (copy-file f (string-append
9556 "build/classes/org/joda/time/format/"
9557 (basename f))))
9558 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9559 #t))
9560 (add-before 'install 'regenerate-jar
9561 (lambda _
9562 ;; We need to regenerate the jar file to add generated data.
9563 (delete-file "build/jar/java-joda-time.jar")
9564 (invoke "ant" "jar")))
9565 (add-before 'check 'copy-test-resources
9566 (lambda _
9567 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9568 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9569 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9570 (copy-recursively "src/test/resources" "build/test-classes")
9571 #t)))))
9572 (inputs
9573 `(("java-joda-convert" ,java-joda-convert)))
9574 (native-inputs
9575 `(("java-junit" ,java-junit)
9576 ("java-hamcrest-core" ,java-hamcrest-core)
9577 ("tzdata" ,tzdata)))
9578 (home-page "http://www.joda.org/joda-time/")
9579 (synopsis "Replacement for the Java date and time classes")
9580 (description "Joda-Time is a replacement for the Java date and time
9581classes prior to Java SE 8.")
9582 (license license:asl2.0)))
9583
9584(define-public java-xerces
9585 (package
9586 (name "java-xerces")
9587 (version "2.11.0")
9588 (source
9589 (origin
9590 (method url-fetch)
9591 (uri (string-append "mirror://apache/xerces/j/source/"
9592 "Xerces-J-src." version ".tar.gz"))
9593 (sha256
9594 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9595 (patches (search-patches
9596 "java-xerces-xjavac_taskdef.patch"
9597 "java-xerces-build_dont_unzip.patch"
9598 "java-xerces-bootclasspath.patch"))))
9599 (build-system ant-build-system)
9600 (arguments
9601 `(#:tests? #f;; Test files are not present
9602 #:test-target "test"
9603 #:jdk ,icedtea-8
9604 #:phases
9605 (modify-phases %standard-phases
9606 (add-after 'unpack 'create-build.properties
9607 (lambda* (#:key inputs #:allow-other-keys)
9608 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9609 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9610 (with-output-to-file "build.properties"
9611 (lambda _
9612 (format #t
9613 "jar.jaxp = ~a/share/java/jaxp.jar~@
9614 jar.apis-ext = ~a/share/java/jaxp.jar~@
9615 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9616 jaxp jaxp resolver)))
9617 ;; Make xerces use our version of jaxp in tests
9618 (substitute* "build.xml"
9619 (("xml-apis.jar")
9620 (string-append jaxp "/share/java/jaxp.jar"))
9621 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9622 "${jar.apis}")))
9623 #t))
9624 (replace 'install (install-jars "build")))))
9625 (inputs
9626 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9627 ("java-jaxp" ,java-jaxp)))
9628 (home-page "https://xerces.apache.org/xerces2-j/")
9629 (synopsis "Validating XML parser for Java with DOM level 3 support")
9630 (description "The Xerces2 Java parser is the reference implementation of
9631XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9632processor.
9633
9634Xerces2-J supports the following standards and APIs:
9635
9636@itemize
9637@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9638@item Namespaces in XML Recommendation
9639@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9640 Range Recommendations
9641@item Simple API for XML (SAX) 2.0.1 Core and Extension
9642@item Java APIs for XML Processing (JAXP) 1.2.01
9643@item XML Schema 1.0 Structures and Datatypes Recommendations
9644@item Experimental implementation of the Document Object Model (DOM) Level 3
9645 Core and Load/Save Working Drafts
9646@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9647 Candidate Recommendation
9648@end itemize
9649
9650Xerces is now able to parse documents written according to the XML 1.1
9651Candidate Recommendation, except that it does not yet provide an option to
9652enable normalization checking as described in section 2.13 of this
9653specification. It also handles namespaces according to the XML Namespaces 1.1
9654Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9655the DOM level 3 load/save API's are in use.")
9656 (license license:asl2.0)))
9657
9658(define-public java-jakarta-regexp
9659 (package
9660 (name "java-jakarta-regexp")
9661 (version "1.5")
9662 (source
9663 (origin
9664 (method url-fetch)
9665 (uri (string-append
9666 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
9667 version ".tar.gz"))
9668 (sha256
9669 (base32
9670 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
9671 (build-system ant-build-system)
9672 (arguments
9673 `(#:test-target "test"
9674 #:phases
9675 (modify-phases %standard-phases
9676 (replace 'install
9677 (lambda* (#:key outputs #:allow-other-keys)
9678 (let* ((out (assoc-ref outputs "out"))
9679 (out-share (string-append out "/share/java")))
9680 (mkdir-p out-share)
9681 (for-each (lambda (name)
9682 (install-file name out-share))
9683 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
9684 #t))))))
9685 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
9686 (synopsis "Regular expression parser generator for Java.")
9687 (description "@code{jakarta-regexp} is an old regular expression parser
9688generator for Java.")
9689 (license license:asl2.0)))
9690
9691(define-public java-jline
9692 (package
9693 (name "java-jline")
9694 (version "1.0")
9695 (source (origin
9696 (method url-fetch)
9697 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9698 version ".tar.gz"))
9699 (sha256
9700 (base32
9701 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9702 (build-system ant-build-system)
9703 (arguments
9704 `(#:jar-name "jline.jar"
9705 #:source-dir "src/main/java"
9706 #:test-dir "src/test"
9707 #:phases
9708 (modify-phases %standard-phases
9709 (add-before 'build 'copy-resources
9710 (lambda _
9711 (copy-recursively "src/main/resources" "build/classes")
9712 #t)))))
9713 (native-inputs
9714 `(("java-junit" ,java-junit)))
9715 (home-page "https://jline.github.io")
9716 (synopsis "Console input handling library")
9717 (description "JLine is a Java library for handling console input. It is
9718similar in functionality to BSD editline and GNU readline but with additional
9719features that bring it on par with the Z shell line editor.")
9720 (license license:bsd-3)))
9721
9722(define-public java-jline-2
9723 (package
9724 (inherit java-jline)
9725 (version "2.14.5")
9726 (source (origin
9727 (method url-fetch)
9728 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
9729 version ".tar.gz"))
9730 (sha256
9731 (base32
9732 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
9733 (arguments
9734 `(#:jdk ,icedtea-8
9735 ,@(package-arguments java-jline)))
9736 (inputs
9737 `(("java-jansi" ,java-jansi)
9738 ("java-jansi-native" ,java-jansi-native)))
9739 (native-inputs
9740 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
9741 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
9742 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
9743 ("java-powermock-api-support" ,java-powermock-api-support)
9744 ("java-powermock-core" ,java-powermock-core)
9745 ("java-powermock-reflect" ,java-powermock-reflect)
9746 ("java-easymock" ,java-easymock)
9747 ("java-jboss-javassist" ,java-jboss-javassist)
9748 ("java-objenesis" ,java-objenesis)
9749 ("java-asm" ,java-asm)
9750 ("java-hamcrest-core" ,java-hamcrest-core)
9751 ("java-cglib" ,java-cglib)
9752 ("java-junit" ,java-junit)
9753 ("java-hawtjni" ,java-hawtjni)))))
9754
9755(define-public java-xmlunit
9756 (package
9757 (name "java-xmlunit")
9758 (version "2.5.1")
9759 (source (origin
9760 (method url-fetch)
9761 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9762 version ".tar.gz"))
9763 (file-name (string-append name "-" version ".tar.gz"))
9764 (sha256
9765 (base32
9766 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9767 (build-system ant-build-system)
9768 (arguments
9769 `(#:jar-name "java-xmlunit.jar"
9770 #:source-dir "xmlunit-core/src/main/java"
9771 #:test-dir "xmlunit-core/src/test"
9772 #:phases
9773 (modify-phases %standard-phases
9774 (add-before 'check 'copy-test-resources
9775 (lambda* (#:key inputs #:allow-other-keys)
9776 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9777 #t)))))
9778 (native-inputs
9779 `(("java-junit" ,java-junit)
9780 ("java-mockito-1" ,java-mockito-1)
9781 ("java-hamcrest-all" ,java-hamcrest-all)
9782 ("java-objenesis" ,java-objenesis)
9783 ("java-asm" ,java-asm)
9784 ("java-cglib" ,java-cglib)
9785 ("resources"
9786 ,(origin
9787 (method git-fetch)
9788 (uri (git-reference
9789 (url "https://github.com/xmlunit/test-resources.git")
9790 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9791 (file-name "java-xmlunit-test-resources")
9792 (sha256
9793 (base32
9794 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9795 (home-page "http://www.xmlunit.org/")
9796 (synopsis "XML output testing")
9797 (description "XMLUnit provides you with the tools to verify the XML you
9798emit is the one you want to create. It provides helpers to validate against
9799an XML Schema, assert the values of XPath queries or compare XML documents
9800against expected outcomes.")
9801 (license license:asl2.0)))
9802
9803(define-public java-xmlunit-legacy
9804 (package
9805 (inherit java-xmlunit)
9806 (name "java-xmlunit-legacy")
9807 (arguments
9808 `(#:jar-name "java-xmlunit-legacy.jar"
9809 #:source-dir "xmlunit-legacy/src/main/java"
9810 #:test-dir "xmlunit-legacy/src/test"))
9811 (inputs
9812 `(("java-xmlunit" ,java-xmlunit)
9813 ("java-junit" ,java-junit)))
9814 (native-inputs
9815 `(("java-mockito-1" ,java-mockito-1)))))
9816
9817(define-public java-openchart2
9818 (package
9819 (name "java-openchart2")
9820 (version "1.4.3")
9821 (source (origin
9822 (method url-fetch)
9823 (uri (string-append "http://download.approximatrix.com/openchart2/"
9824 "openchart2-" version ".source.zip"))
9825 (sha256
9826 (base32
9827 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9828 (build-system ant-build-system)
9829 (arguments
9830 `(#:test-target "test"
9831 #:phases
9832 (modify-phases %standard-phases
9833 (add-after 'unpack 'fix-junit-errors
9834 (lambda _
9835 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9836 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9837 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9838 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9839 "model/DefaultChartDataModelConstraintsTest.java"
9840 "model/MultiScatterDataModelConstraintsTest.java"
9841 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9842 (("(assertEquals[^;]+);" before _)
9843 (string-append (string-drop-right before 2) ", 1E-6);"))))
9844 #t))
9845 (replace 'install (install-jars ".")))))
9846 (native-inputs
9847 `(("unzip" ,unzip)
9848 ("java-junit" ,java-junit)
9849 ("java-hamcrest-core" ,java-hamcrest-core)))
9850 (home-page "http://approximatrix.com/products/openchart2/")
9851 (synopsis "Simple plotting for Java")
9852 (description "Openchart2 provides a simple, yet powerful, interface for
9853Java programmers to create two-dimensional charts and plots. The library
9854features an assortment of graph styles, including advanced scatter plots, bar
9855graphs, and pie charts.")
9856 (license license:lgpl2.1+)))
9857
9858(define-public java-commons-httpclient
9859 (package
9860 (name "java-commons-httpclient")
9861 (version "3.1")
9862 (source (origin
9863 (method url-fetch)
9864 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
9865 "commons-httpclient/source/commons-httpclient-"
9866 version "-src.tar.gz"))
9867 (sha256
9868 (base32
9869 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
9870 (build-system ant-build-system)
9871 (arguments
9872 `(#:build-target "compile"
9873 #:test-target "test"
9874 #:tests? #f; requires junit-textui (junit 3)
9875 #:phases
9876 (modify-phases %standard-phases
9877 (add-before 'build 'fix-accent
9878 (lambda _
9879 (for-each (lambda (file)
9880 (with-fluids ((%default-port-encoding "ISO-8859-1"))
9881 (substitute* file
9882 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
9883 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
9884 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
9885 "src/test/org/apache/commons/httpclient/TestHttps.java"
9886 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
9887 #t))
9888 (replace 'install
9889 (lambda* (#:key outputs #:allow-other-keys)
9890 (invoke "ant" "dist"
9891 (string-append "-Ddist.home=" (assoc-ref outputs "out")
9892 "/share/java"))
9893 #t)))))
9894 (propagated-inputs
9895 `(("java-commons-logging" ,java-commons-logging-minimal)
9896 ("java-commons-codec" ,java-commons-codec)))
9897 (home-page "https://hc.apache.org")
9898 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
9899 (description "This package contains an HTTP/1.1 compliant HTTP agent
9900implementation. It also provides reusable components for client-side
9901authentication, HTTP state management, and HTTP connection management.")
9902 (license license:asl2.0)))
9903
9904(define-public java-commons-vfs
9905 (package
9906 (name "java-commons-vfs")
9907 (version "2.2")
9908 (source (origin
9909 (method url-fetch)
9910 (uri (string-append "mirror://apache/commons/vfs/source/"
9911 "commons-vfs2-distribution-" version "-src.tar.gz"))
9912 (file-name (string-append name "-" version ".tar.gz"))
9913 (sha256
9914 (base32
9915 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
9916 (modules '((guix build utils)))
9917 (snippet
9918 '(begin
9919 (for-each delete-file
9920 (find-files "." "\\.jar$"))
9921 #t))))
9922 (build-system ant-build-system)
9923 (arguments
9924 `(#:jar-name "commons-vfs.jar"
9925 #:source-dir "commons-vfs2/src/main/java"
9926 #:test-dir "commons-vfs2/src/test"
9927 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
9928 #:tests? #f
9929 #:phases
9930 (modify-phases %standard-phases
9931 (add-before 'build 'remove-hadoop-and-webdav
9932 ; Remove these files as they are not required and depend on difficult
9933 ; packages.
9934 (lambda _
9935 (for-each delete-file-recursively
9936 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
9937 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
9938 #t)))))
9939 (inputs
9940 `(("java-commons-collections4" ,java-commons-collections4)
9941 ("java-commons-compress" ,java-commons-compress)
9942 ("java-commons-httpclient" ,java-commons-httpclient)
9943 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
9944 ("java-commons-net" ,java-commons-net)
9945 ("java-jsch" ,java-jsch)))
9946 (home-page "http://commons.apache.org/proper/commons-vfs/")
9947 (synopsis "Java filesystem library")
9948 (description "Commons VFS provides a single API for accessing various
9949different file systems. It presents a uniform view of the files from various
9950different sources, such as the files on local disk, on an HTTP server, or
9951inside a Zip archive.")
9952 (license license:asl2.0)))
9953
9954(define-public java-jakarta-oro
9955 (package
9956 (name "java-jakarta-oro")
9957 (version "2.0.8")
9958 (source (origin
9959 (method url-fetch)
9960 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
9961 "jakarta-oro-" version ".tar.gz"))
9962 (sha256
9963 (base32
9964 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
9965 (modules '((guix build utils)))
9966 (snippet
9967 `(begin
9968 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
9969 #t))))
9970 (build-system ant-build-system)
9971 (arguments
9972 `(#:build-target "package"
9973 #:tests? #f; tests are run as part of the build process
9974 #:phases
9975 (modify-phases %standard-phases
9976 (replace 'install
9977 (install-jars ,(string-append "jakarta-oro-" version))))))
9978 (home-page "https://jakarta.apache.org/oro/")
9979 (synopsis "Text-processing for Java")
9980 (description "The Jakarta-ORO Java classes are a set of text-processing
9981Java classes that provide Perl5 compatible regular expressions, AWK-like
9982regular expressions, glob expressions, and utility classes for performing
9983substitutions, splits, filtering filenames, etc. This library is the successor
9984of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
9985from ORO, Inc.")
9986 (license license:asl1.1)))
9987
9988(define-public java-native-access
9989 (package
9990 (name "java-native-access")
9991 (version "4.5.1")
9992 (source (origin
9993 (method url-fetch)
9994 (uri (string-append "https://github.com/java-native-access/jna/"
9995 "archive/" version ".tar.gz"))
9996 (file-name (string-append name "-" version ".tar.gz"))
9997 (sha256
9998 (base32
9999 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10000 (modules '((guix build utils)))
10001 (snippet
10002 `(begin
10003 (for-each delete-file (find-files "." ".*.jar"))
10004 (delete-file-recursively "native/libffi")
10005 (delete-file-recursively "dist")
10006 #t))))
10007 (build-system ant-build-system)
10008 (arguments
10009 `(#:tests? #f; FIXME: tests require reflections.jar
10010 #:test-target "test"
10011 #:make-flags (list "-Ddynlink.native=true")
10012 #:phases
10013 (modify-phases %standard-phases
10014 (add-before 'build 'fix-build.xml
10015 (lambda* (#:key inputs #:allow-other-keys)
10016 (substitute* "build.xml"
10017 ;; Since we removed the bundled ant.jar, give the correct path
10018 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10019 ;; We removed generated native libraries. We can only rebuild one
10020 ;; so don't fail if we can't find a native library for another architecture.
10021 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10022 ;; Copy test dependencies
10023 (copy-file (string-append (assoc-ref inputs "java-junit")
10024 "/share/java/junit.jar")
10025 "lib/junit.jar")
10026 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10027 "/share/java/hamcrest-core.jar")
10028 "lib/hamcrest-core.jar")
10029 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10030 #t))
10031 (add-before 'build 'build-native
10032 (lambda _
10033 (invoke "ant" "-Ddynlink.native=true" "native")
10034 #t))
10035 (replace 'install
10036 (install-jars "build")))))
10037 (inputs
10038 `(("libffi" ,libffi)
10039 ("libx11" ,libx11)
10040 ("libxt" ,libxt)))
10041 (native-inputs
10042 `(("java-junit" ,java-junit)
10043 ("java-hamcrest-core" ,java-hamcrest-core)))
10044 (home-page "https://github.com/java-native-access/jna")
10045 (synopsis "Access to native shared libraries from Java")
10046 (description "JNA provides Java programs easy access to native shared
10047libraries without writing anything but Java code - no JNI or native code is
10048required. JNA allows you to call directly into native functions using natural
10049Java method invocation.")
10050 ;; Java Native Access project (JNA) is dual-licensed under 2
10051 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10052 (license (list
10053 license:asl2.0
10054 license:lgpl2.1+))))
10055
10056(define-public java-native-access-platform
10057 (package
10058 (inherit java-native-access)
10059 (name "java-native-access-platform")
10060 (arguments
10061 `(#:test-target "test"
10062 #:tests? #f; require jna-test.jar
10063 #:phases
10064 (modify-phases %standard-phases
10065 (add-before 'build 'chdir
10066 (lambda _
10067 (chdir "contrib/platform")
10068 #t))
10069 (add-after 'chdir 'fix-ant
10070 (lambda* (#:key inputs #:allow-other-keys)
10071 (substitute* "nbproject/project.properties"
10072 (("../../build/jna.jar")
10073 (string-append (assoc-ref inputs "java-native-access")
10074 "/share/java/jna.jar"))
10075 (("../../lib/hamcrest-core-.*.jar")
10076 (string-append (assoc-ref inputs "java-hamcrest-core")
10077 "/share/java/hamcrest-core.jar"))
10078 (("../../lib/junit.jar")
10079 (string-append (assoc-ref inputs "java-junit")
10080 "/share/java/junit.jar")))
10081 #t))
10082 (replace 'install
10083 (install-jars "dist")))))
10084 (inputs
10085 `(("java-native-access" ,java-native-access)))
10086 (synopsis "Cross-platform mappings for jna")
10087 (description "java-native-access-platfrom has cross-platform mappings
10088and mappings for a number of commonly used platform functions, including a
10089large number of Win32 mappings as well as a set of utility classes that
10090simplify native access.")))
10091
10092(define-public java-jsch-agentproxy-core
10093 (package
10094 (name "java-jsch-agentproxy-core")
10095 (version "0.0.8")
10096 (source (origin
10097 (method url-fetch)
10098 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10099 version ".tar.gz"))
10100 (file-name (string-append name "-" version ".tar.gz"))
10101 (sha256
10102 (base32
10103 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10104 (build-system ant-build-system)
10105 (arguments
10106 `(#:jar-name "jsch-agentproxy-core.jar"
10107 #:source-dir "jsch-agent-proxy-core/src/main/java"
10108 #:tests? #f)); no tests
10109 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10110 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10111 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10112and Pageant included Putty. It will be easily integrated into JSch, and users
10113will be allowed to use these programs for authentication.")
10114 (license license:bsd-3)))
10115
10116(define-public java-jsch-agentproxy-sshagent
10117 (package
10118 (inherit java-jsch-agentproxy-core)
10119 (name "java-jsch-agentproxy-sshagent")
10120 (arguments
10121 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10122 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10123 #:tests? #f)); no tests
10124 (inputs
10125 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10126 (synopsis "Proxy to ssh-agent")
10127 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10128and Pageant included in Putty. This component contains the code for a proxy to
10129ssh-agent.")))
10130
10131(define-public java-jsch-agentproxy-usocket-jna
10132 (package
10133 (inherit java-jsch-agentproxy-core)
10134 (name "java-jsch-agentproxy-usocket-jna")
10135 (arguments
10136 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10137 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10138 #:tests? #f)); no tests
10139 (inputs
10140 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10141 ("java-native-access" ,java-native-access)))
10142 (synopsis "USocketFactory implementation using JNA")
10143 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10144and Pageant included in Putty. This component contains an implementation of
10145USocketFactory using @dfn{JNA} (Java Native Access).")))
10146
10147(define-public java-jsch-agentproxy-pageant
10148 (package
10149 (inherit java-jsch-agentproxy-core)
10150 (name "java-jsch-agentproxy-pageant")
10151 (arguments
10152 `(#:jar-name "jsch-agentproxy-pageant.jar"
10153 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10154 #:tests? #f)); no tests
10155 (inputs
10156 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10157 ("java-native-access" ,java-native-access)
10158 ("java-native-access-platform" ,java-native-access-platform)))
10159 (synopsis "Proxy to pageant")
10160 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10161and Pageant included in Putty. This component contains the code for a proxy to
10162pageant.")))
10163
10164(define-public java-jsch-agentproxy-usocket-nc
10165 (package
10166 (inherit java-jsch-agentproxy-core)
10167 (name "java-jsch-agentproxy-usocket-nc")
10168 (arguments
10169 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10170 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10171 #:tests? #f)); no tests
10172 (inputs
10173 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10174 (synopsis "USocketFactory implementation using netcat")
10175 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10176and Pageant included in Putty. This component contains an implementation of
10177USocketFactory using netcat.")))
10178
10179(define-public java-jsch-agentproxy-connector-factory
10180 (package
10181 (inherit java-jsch-agentproxy-core)
10182 (name "java-jsch-agentproxy-connector-factory")
10183 (arguments
10184 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10185 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10186 #:tests? #f)); no tests
10187 (inputs
10188 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10189 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10190 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10191 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10192 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10193 (synopsis "Connector factory for jsch agent proxy")
10194 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10195and Pageant included in Putty. This component contains a connector factory.")))
10196
10197(define-public java-jsch-agentproxy-jsch
10198 (package
10199 (inherit java-jsch-agentproxy-core)
10200 (name "java-jsch-agentproxy-jsch")
10201 (arguments
10202 `(#:jar-name "jsch-agentproxy-jsch.jar"
10203 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10204 #:tests? #f)); no tests
10205 (inputs
10206 `(("java-jsch" ,java-jsch)
10207 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10208 (synopsis "JSch integration library for agentproxy")
10209 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10210and Pageant included in Putty. This component contains a library to use
10211jsch-agent-proxy with JSch.")))
10212
10213(define-public java-apache-ivy
10214 (package
10215 (name "java-apache-ivy")
10216 (version "2.4.0")
10217 (source (origin
10218 (method url-fetch)
10219 (uri (string-append "mirror://apache//ant/ivy/" version
10220 "/apache-ivy-" version "-src.tar.gz"))
10221 (sha256
10222 (base32
10223 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10224 (patches
10225 (search-patches
10226 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10227 (build-system ant-build-system)
10228 (arguments
10229 `(#:jar-name "ivy.jar"
10230 #:tests? #f
10231 #:phases
10232 (modify-phases %standard-phases
10233 (add-before 'build 'remove-example
10234 (lambda _
10235 (delete-file-recursively "src/example")
10236 #t))
10237 (add-before 'build 'copy-resources
10238 (lambda _
10239 (with-directory-excursion "src/java"
10240 (for-each (lambda (file)
10241 (install-file file (string-append "../../build/classes/" (dirname file))))
10242 (append
10243 (find-files "." ".*.css")
10244 (find-files "." ".*.ent")
10245 (find-files "." ".*.html")
10246 (find-files "." ".*.properties")
10247 (find-files "." ".*.xsd")
10248 (find-files "." ".*.xsl")
10249 (find-files "." ".*.xml"))))
10250 #t))
10251 (add-before 'build 'fix-vfs
10252 (lambda _
10253 (substitute*
10254 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10255 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10256 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10257 #t))
10258 (add-before 'install 'copy-manifest
10259 (lambda _
10260 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10261 #t))
10262 (add-before 'install 'repack
10263 (lambda _
10264 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10265 "-C" "build/classes" ".")))
10266 (add-after 'install 'install-bin
10267 (lambda* (#:key outputs #:allow-other-keys)
10268 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10269 (ivy (string-append bin "/ivy"))
10270 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10271 (mkdir-p bin)
10272 (with-output-to-file ivy
10273 (lambda _
10274 (display (string-append
10275 "#!" (which "sh") "\n"
10276 "if [[ -z $CLASSPATH ]]; then\n"
10277 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10278 "else\n"
10279 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10280 "fi\n"
10281 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10282 (chmod ivy #o755)
10283 #t))))))
10284 (inputs
10285 `(("java-bouncycastle" ,java-bouncycastle)
10286 ("java-commons-cli" ,java-commons-cli)
10287 ("java-commons-collections" ,java-commons-collections)
10288 ("java-commons-httpclient" ,java-commons-httpclient)
10289 ("java-commons-lang" ,java-commons-lang)
10290 ("java-commons-vfs" ,java-commons-vfs)
10291 ("java-jakarta-oro" ,java-jakarta-oro)
10292 ("java-jsch" ,java-jsch)
10293 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10294 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10295 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10296 ("java-junit" ,java-junit)))
10297 (home-page "https://ant.apache.org/ivy")
10298 (synopsis "Dependency manager for the Java programming language")
10299 (description "Ivy is a tool for managing (recording, tracking, resolving
10300and reporting) project dependencies. It is characterized by the following:
10301
10302@itemize
10303@item flexibility and configurability - Ivy is essentially process agnostic
10304 and is not tied to any methodology or structure. Instead it provides the
10305 necessary flexibility and configurability to be adapted to a broad range
10306 of dependency management and build processes.
10307@item tight integration with Apache Ant - while available as a standalone tool,
10308 Ivy works particularly well with Apache Ant providing a number of
10309 powerful Ant tasks ranging from dependency resolution to dependency
10310 reporting and publication.
10311@end itemize")
10312 (license license:asl2.0)))
10313
10314(define-public java-eclipse-sisu-inject
10315 (package
10316 (name "java-eclipse-sisu-inject")
10317 (version "0.3.3")
10318 (source (origin
10319 (method url-fetch)
10320 (uri (string-append "https://github.com/eclipse/sisu.inject/"
10321 "archive/releases/" version ".tar.gz"))
10322 (sha256
10323 (base32
10324 "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn"))))
10325 (build-system ant-build-system)
10326 (arguments
10327 `(#:jar-name "eclipse-sisu-inject.jar"
10328 #:source-dir "org.eclipse.sisu.inject/src"
10329 #:jdk ,icedtea-8
10330 #:tests? #f)); no tests
10331 (inputs
10332 `(("java-guice" ,java-guice)
10333 ("java-guice-servlet" ,java-guice-servlet)
10334 ("java-javax-inject" ,java-javax-inject)
10335 ("java-javaee-servletapi" ,java-javaee-servletapi)
10336 ("java-junit" ,java-junit)
10337 ("java-slf4j-api" ,java-slf4j-api)
10338 ("java-jsr305" ,java-jsr305)
10339 ("java-jsr250" ,java-jsr250)
10340 ("java-cdi-api" ,java-cdi-api)
10341 ("java-osgi-framework" ,java-osgi-framework)
10342 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10343 ("java-testng" ,java-testng)))
10344 (home-page "https://www.eclipse.org/sisu/")
10345 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10346 (description "Sisu is a modular JSR330-based container that supports
10347classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10348Google-Guice to perform dependency injection and provide the core JSR330
10349support, but removes the need to write explicit bindings in Guice modules.
10350Integration with other containers via the Eclipse Extension Registry and the
10351OSGi Service Registry is a goal of this project.")
10352 (license license:epl1.0)))
10353
10354(define-public java-eclipse-sisu-plexus
10355 (package
10356 (name "java-eclipse-sisu-plexus")
10357 (version "0.3.3")
10358 (source (origin
10359 (method url-fetch)
10360 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10361 "archive/releases/" version ".tar.gz"))
10362 (sha256
10363 (base32
10364 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10365 (modules '((guix build utils)))
10366 (snippet
10367 '(begin
10368 (for-each delete-file (find-files "." ".*.jar"))
10369 (rename-file "org.eclipse.sisu.plexus.tests/src"
10370 "org.eclipse.sisu.plexus.tests/java")
10371 #t))))
10372 (build-system ant-build-system)
10373 (arguments
10374 `(#:jar-name "eclipse-sisu-plexus.jar"
10375 #:source-dir "org.eclipse.sisu.plexus/src"
10376 #:test-dir "org.eclipse.sisu.plexus.tests"
10377 #:test-exclude
10378 (list
10379 ;; This test fails probably because we can't generate the necessary
10380 ;; meta-inf files.
10381 "**/PlexusLoggingTest.*"
10382 ;; FIXME: This test fails because of some injection error
10383 "**/PlexusRequirementTest.*")
10384 #:jdk ,icedtea-8
10385 #:phases
10386 (modify-phases %standard-phases
10387 (add-before 'build 'copy-resources
10388 (lambda _
10389 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10390 "build/classes/META-INF/plexus")
10391 #t))
10392 (add-before 'check 'build-test-jar
10393 (lambda _
10394 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10395 (mkdir "build")
10396 (with-directory-excursion "java"
10397 (apply invoke "javac" "-cp"
10398 (string-append (getenv "CLASSPATH")
10399 ":../../../../../build/classes")
10400 (find-files "." ".*.java"))
10401 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10402 (find-files "." ".*.jar")))
10403 (mkdir-p "build/META-INF/plexus")
10404 (copy-file "resources/META-INF/plexus/components.xml"
10405 "build/META-INF/plexus/components.xml")
10406 (with-directory-excursion "build"
10407 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10408 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10409 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10410 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10411 (("resources/component-jar")
10412 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10413 #t)))))
10414 (inputs
10415 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10416 ("java-plexus-util" ,java-plexus-utils)
10417 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10418 ("java-osgi-framework" ,java-osgi-framework)
10419 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10420 ("java-guice" ,java-guice)
10421 ("java-javax-inject" ,java-javax-inject)
10422 ("java-slf4j-api" ,java-slf4j-api)
10423 ("java-junit" ,java-junit)))
10424 (native-inputs
10425 `(("java-guava" ,java-guava)
10426 ("java-aopalliance" ,java-aopalliance)
10427 ("java-cglib" ,java-cglib)
10428 ("java-asm" ,java-asm)))
10429 (home-page "https://www.eclipse.org/sisu/")
10430 (synopsis "Plexus support for the sisu container")
10431 (description "Sisu is a modular JSR330-based container that supports
10432classpath scanning, auto-binding, and dynamic auto-wiring. This package
10433adds Plexus support to the Sisu-Inject container.")
10434 (license license:epl1.0)))
10435
10436(define-public java-commons-compiler
10437 (package
10438 (name "java-commons-compiler")
10439 (version "3.0.8")
10440 (source (origin
10441 (method git-fetch)
10442 (uri (git-reference
10443 (url "https://github.com/janino-compiler/janino")
10444 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10445 (file-name (string-append name "-" version))
10446 (sha256
10447 (base32
10448 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10449 (modules '((guix build utils)))
10450 (snippet
10451 '(begin
10452 (for-each delete-file
10453 (find-files "." "\\.jar$"))
10454 #t))))
10455 (build-system ant-build-system)
10456 (arguments
10457 `(#:jar-name "commons-compiler.jar"
10458 #:source-dir "commons-compiler/src/main"
10459 #:tests? #f)); no tests
10460 (home-page "https://github.com/janino-compiler/janino")
10461 (synopsis "Java compiler")
10462 (description "Commons-compiler contains an API for janino, including the
10463@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10464and @code{ISimpleCompiler} interfaces.")
10465 (license license:bsd-3)))
10466
10467(define-public java-janino
10468 (package
10469 (inherit java-commons-compiler)
10470 (name "java-janino")
10471 (arguments
10472 `(#:jar-name "janino.jar"
10473 #:source-dir "src/main/java"
10474 #:phases
10475 (modify-phases %standard-phases
10476 (add-before 'configure 'chdir
10477 (lambda _
10478 (chdir "janino")
10479 #t)))))
10480 (inputs
10481 `(("java-commons-compiler" ,java-commons-compiler)))
10482 (native-inputs
10483 `(("java-junit" ,java-junit)
10484 ("java-hamcrest-core" ,java-hamcrest-core)))
10485 (description "Janino is a Java compiler. Janino can compile a set of
10486source files to a set of class files like @code{javac}, but also compile a
10487Java expression, block, class body or source file in memory, load the bytecode
10488and execute it directly in the same JVM. @code{janino} can also be used for
10489static code analysis or code manipulation.")))
10490
10491(define-public java-logback-core
10492 (package
10493 (name "java-logback-core")
10494 (version "1.2.3")
10495 (source (origin
10496 (method url-fetch)
10497 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10498 version ".tar.gz"))
10499 (file-name (string-append name "-" version ".tar.gz"))
10500 (sha256
10501 (base32
10502 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10503 (modules '((guix build utils)))
10504 (snippet
10505 '(begin
10506 (delete-file-recursively "logback-access/lib")
10507 #t))))
10508 (build-system ant-build-system)
10509 (arguments
10510 `(#:jar-name "logback.jar"
10511 #:source-dir "src/main/java"
10512 #:test-dir "src/test"
10513 #:test-exclude
10514 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10515 ;; which creates FastClasses
10516 (list "**/AllCoreTest.*"
10517 "**/AutoFlushingObjectWriterTest.*"
10518 "**/PackageTest.*"
10519 "**/ResilientOutputStreamTest.*"
10520 ;; And we still don't want to run abstract classes
10521 "**/Abstract*.*")
10522 #:phases
10523 (modify-phases %standard-phases
10524 (add-before 'configure 'chdir
10525 (lambda _
10526 (chdir "logback-core")
10527 #t)))))
10528 (inputs
10529 `(("java-javax-mail" ,java-javax-mail)
10530 ("servlet" ,java-javaee-servletapi)
10531 ("java-commons-compiler" ,java-commons-compiler)
10532 ("java-janino" ,java-janino)))
10533 (native-inputs
10534 `(("java-junit" ,java-junit)
10535 ("java-hamcrest-core" ,java-hamcrest-core)
10536 ("java-mockito-1" ,java-mockito-1)
10537 ("java-cglib" ,java-cglib)
10538 ("java-asm" ,java-asm)
10539 ("java-objenesis" ,java-objenesis)
10540 ("java-joda-time" ,java-joda-time)))
10541 (home-page "https://logback.qos.ch")
10542 (synopsis "Logging for java")
10543 (description "Logback is intended as a successor to the popular log4j project.
10544This module lays the groundwork for the other two modules.")
10545 ;; Either epl1.0 or lgpl2.1
10546 (license (list license:epl1.0
10547 license:lgpl2.1))))
10548
10549(define-public java-logback-classic
10550 (package
10551 (inherit java-logback-core)
10552 (name "java-logback-classic")
10553 (arguments
10554 `(#:jar-name "logback-classic.jar"
10555 #:source-dir "src/main/java"
10556 #:test-dir "src/test"
10557 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10558 #:jdk ,icedtea-8
10559 #:phases
10560 (modify-phases %standard-phases
10561 (add-before 'configure 'chdir
10562 (lambda _
10563 (chdir "logback-classic")
10564 #t))
10565 (replace 'build
10566 (lambda* (#:key inputs #:allow-other-keys)
10567 (mkdir-p "build/classes")
10568 (setenv "CLASSPATH"
10569 (string-join
10570 (apply append (map (lambda (input)
10571 (find-files (assoc-ref inputs input)
10572 ".*.jar"))
10573 '("java-logback-core" "java-slf4j-api"
10574 "java-commons-compiler" "servlet"
10575 "groovy")))
10576 ":"))
10577 (apply invoke "groovyc" "-d" "build/classes" "-j"
10578 (find-files "src/main/" ".*\\.(groovy|java)$"))
10579 (invoke "ant" "jar")
10580 #t)))))
10581 (inputs
10582 `(("java-logback-core" ,java-logback-core)
10583 ("java-slf4j-api" ,java-slf4j-api)
10584 ,@(package-inputs java-logback-core)))
10585 (native-inputs
10586 `(("groovy" ,groovy)))
10587 (description "Logback is intended as a successor to the popular log4j project.
10588This module can be assimilated to a significantly improved version of log4j.
10589Moreover, @code{logback-classic} natively implements the slf4j API so that you
10590can readily switch back and forth between logback and other logging frameworks
10591such as log4j or @code{java.util.logging} (JUL).")))
10592
10593(define-public java-qdox
10594 (package
10595 (name "java-qdox")
10596 ; Newer version exists, but this version is required by java-plexus-component-metadata
10597 (version "2.0-M2")
10598 (source (origin
10599 (method url-fetch)
10600 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10601 ;; Older releases at https://github.com/codehaus/qdox/
10602 ;; Note: The release at maven is pre-generated. The release at
10603 ;; github requires jflex.
10604 (uri (string-append "http://central.maven.org/maven2/"
10605 "com/thoughtworks/qdox/qdox/" version
10606 "/qdox-" version "-sources.jar"))
10607 (sha256
10608 (base32
10609 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10610 (build-system ant-build-system)
10611 (arguments
10612 `(#:jar-name "qdox.jar"
10613 #:tests? #f)); no tests
10614 (home-page "http://qdox.codehaus.org/")
10615 (synopsis "Parse definitions from Java source files")
10616 (description "QDox is a high speed, small footprint parser for extracting
10617class/interface/method definitions from source files complete with JavaDoc
10618@code{@@tags}. It is designed to be used by active code generators or
10619documentation tools.")
10620 (license license:asl2.0)))