projects/guix·blob version-0.16.0 · refs

10692 lines · 447.4 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 elf)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages gawk)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages gcc)
54 #:use-module (gnu packages gl)
55 #:use-module (gnu packages gnuzilla) ;nss
56 #:use-module (gnu packages ghostscript) ;lcms
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages groovy)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages guile)
61 #:use-module (gnu packages icu4c)
62 #:use-module (gnu packages image)
63 #:use-module (gnu packages libffi)
64 #:use-module (gnu packages linux) ;alsa
65 #:use-module (gnu packages maths)
66 #:use-module (gnu packages onc-rpc)
67 #:use-module (gnu packages web)
68 #:use-module (gnu packages wget)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages perl)
71 #:use-module (gnu packages popt)
72 #:use-module (gnu packages kerberos)
73 #:use-module (gnu packages xml)
74 #:use-module (gnu packages xorg)
75 #:use-module (gnu packages texinfo)
76 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
77 #:use-module (srfi srfi-11)
78 #:use-module (ice-9 match))
79
80
81;;;
82;;; Java bootstrap toolchain.
83;;;
84
85;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
86;; use it to build a simple version of GNU Classpath, the Java standard
87;; library. We chose version 0.93 because it is the last version that can be
88;; built with Jikes. With Jikes and this version of GNU Classpath we can
89;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
90;; the last version of JamVM that works with a version of GNU classpath that
91;; does not require ECJ. These three packages make up the bootstrap JDK.
92
93;; This is sufficient to build an older version of Ant, which is needed to
94;; build an older version of ECJ, an incremental Java compiler, both of which
95;; are written in Java.
96;;
97;; ECJ is needed to build the latest release (0.99) and the development
98;; version of GNU Classpath. The development version of GNU Classpath has
99;; much more support for Java 1.6 than the latest release, but we need to
100;; build 0.99 first to get a working version of javah. ECJ, the development
101;; version of GNU Classpath, and the latest version of JamVM make up the
102;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
103;; build framework. We then build the more recent JDKs Icedtea 2.x and
104;; Icedtea 3.x.
105
106(define jikes
107 (package
108 (name "jikes")
109 (version "1.22")
110 (source (origin
111 (method url-fetch)
112 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
113 version "/jikes-" version ".tar.bz2"))
114 (sha256
115 (base32
116 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
117 (build-system gnu-build-system)
118 (home-page "http://jikes.sourceforge.net/")
119 (synopsis "Compiler for the Java language")
120 (description "Jikes is a compiler that translates Java source files as
121defined in The Java Language Specification into the bytecoded instruction set
122and binary format defined in The Java Virtual Machine Specification.")
123 (license license:ibmpl1.0)))
124
125;; This is the last version of GNU Classpath that can be built without ECJ.
126(define classpath-bootstrap
127 (package
128 (name "classpath")
129 (version "0.93")
130 (source (origin
131 (method url-fetch)
132 (uri (string-append "mirror://gnu/classpath/classpath-"
133 version ".tar.gz"))
134 (sha256
135 (base32
136 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
137 (patches (search-patches "classpath-aarch64-support.patch"))))
138 (build-system gnu-build-system)
139 (arguments
140 `(#:configure-flags
141 (list (string-append "JAVAC="
142 (assoc-ref %build-inputs "jikes")
143 "/bin/jikes")
144 "--disable-Werror"
145 "--disable-gmp"
146 "--disable-gtk-peer"
147 "--disable-gconf-peer"
148 "--disable-plugin"
149 "--disable-dssi"
150 "--disable-alsa"
151 "--disable-gjdoc")
152 #:phases
153 (modify-phases %standard-phases
154 (add-after 'install 'install-data
155 (lambda _ (invoke "make" "install-data"))))))
156 (native-inputs
157 `(("jikes" ,jikes)
158 ("fastjar" ,fastjar)
159 ("libltdl" ,libltdl)
160 ("pkg-config" ,pkg-config)))
161 (home-page "https://www.gnu.org/software/classpath/")
162 (synopsis "Essential libraries for Java")
163 (description "GNU Classpath is a project to create core class libraries
164for use with runtimes, compilers and tools for the Java programming
165language.")
166 ;; GPLv2 or later, with special linking exception.
167 (license license:gpl2+)))
168
169;; This is the last version of JamVM that works with a version of GNU
170;; classpath that does not require ECJ.
171(define jamvm-1-bootstrap
172 (package
173 (name "jamvm")
174 (version "1.5.1")
175 (source (origin
176 (method url-fetch)
177 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
178 "JamVM%20" version "/jamvm-"
179 version ".tar.gz"))
180 (patches (search-patches "jamvm-arm.patch"))
181 (sha256
182 (base32
183 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
184 (build-system gnu-build-system)
185 (arguments
186 `(#:configure-flags
187 (list (string-append "--with-classpath-install-dir="
188 (assoc-ref %build-inputs "classpath")))))
189 (inputs
190 `(("classpath" ,classpath-bootstrap)
191 ("jikes" ,jikes)
192 ("zlib" ,zlib)))
193 (home-page "http://jamvm.sourceforge.net/")
194 (synopsis "Small Java Virtual Machine")
195 (description "JamVM is a Java Virtual Machine conforming to the JVM
196specification edition 2 (blue book). It is extremely small. However, unlike
197other small VMs it supports the full spec, including object finalisation and
198JNI.")
199 (license license:gpl2+)))
200
201(define ant-bootstrap
202 (package
203 (name "ant-bootstrap")
204 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
205 ;; are not supported. The 1.8.x series is the last to use only features
206 ;; supported by Jikes.
207 (version "1.8.4")
208 (source (origin
209 (method url-fetch)
210 (uri (string-append "http://archive.apache.org/dist/"
211 "ant/source/apache-ant-"
212 version "-src.tar.bz2"))
213 (sha256
214 (base32
215 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
216 (build-system gnu-build-system)
217 (arguments
218 `(#:imported-modules ((guix build syscalls)
219 ,@%gnu-build-system-modules)
220 #:modules ((srfi srfi-1)
221 (guix build gnu-build-system)
222 (guix build utils)
223 (guix build syscalls))
224 #:tests? #f ; no "check" target
225 #:phases
226 (modify-phases %standard-phases
227 (delete 'bootstrap)
228 (delete 'configure)
229 (replace 'build
230 (lambda* (#:key inputs #:allow-other-keys)
231 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
232 (setenv "JAVACMD"
233 (string-append (assoc-ref inputs "jamvm")
234 "/bin/jamvm"))
235 (setenv "JAVAC"
236 (string-append (assoc-ref inputs "jikes")
237 "/bin/jikes"))
238 (setenv "CLASSPATH"
239 (string-append (assoc-ref inputs "jamvm")
240 "/lib/rt.jar"))
241
242 ;; Ant complains if this file doesn't exist.
243 (setenv "HOME" "/tmp")
244 (with-output-to-file "/tmp/.ant.properties"
245 (lambda _ (display "")))
246
247 ;; Use jikes instead of javac for <javac ...> tags in build.xml
248 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
249
250 ;; jikes produces lots of warnings, but they are not very
251 ;; interesting, so we silence them.
252 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
253
254 ;; Without these JamVM options the build may freeze.
255 (substitute* "bootstrap.sh"
256 (("^\"\\$\\{JAVACMD\\}\" " m)
257 ,@(if (string-prefix? "armhf" (or (%current-system)
258 (%current-target-system)))
259 `((string-append m "-Xnocompact "))
260 `((string-append m "-Xnocompact -Xnoinlining ")))))
261
262 ;; Disable tests because we are bootstrapping and thus don't have
263 ;; any of the dependencies required to build and run the tests.
264 (substitute* "build.xml"
265 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
266 (invoke "bash" "bootstrap.sh"
267 (string-append "-Ddist.dir="
268 (assoc-ref %outputs "out")))))
269 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
270 (lambda* (#:key outputs #:allow-other-keys)
271 (define (repack-archive jar)
272 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
273 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
274 (with-directory-excursion dir
275 (invoke "unzip" jar))
276 (delete-file jar)
277 ;; XXX: copied from (gnu build install)
278 (for-each (lambda (file)
279 (let ((s (lstat file)))
280 (unless (eq? (stat:type s) 'symlink)
281 (utime file 0 0 0 0))))
282 (find-files dir #:directories? #t))
283 ;; It is important that the manifest appears first.
284 (with-directory-excursion dir
285 (let* ((files (find-files "." ".*" #:directories? #t))
286 ;; To ensure that the reference scanner can
287 ;; detect all store references in the jars
288 ;; we disable compression with the "-0" option.
289 (command (if (file-exists? manifest)
290 `("zip" "-0" "-X" ,jar ,manifest
291 ,@files)
292 `("zip" "-0" "-X" ,jar ,@files))))
293 (apply invoke command)))))
294 (for-each repack-archive
295 (find-files
296 (string-append (assoc-ref %outputs "out") "/lib")
297 "\\.jar$"))
298 #t))
299 (delete 'install))))
300 (native-inputs
301 `(("jikes" ,jikes)
302 ("jamvm" ,jamvm-1-bootstrap)
303 ("unzip" ,unzip)
304 ("zip", zip)))
305 (home-page "http://ant.apache.org")
306 (synopsis "Build tool for Java")
307 (description
308 "Ant is a platform-independent build tool for Java. It is similar to
309make but is implemented using the Java language, requires the Java platform,
310and is best suited to building Java projects. Ant uses XML to describe the
311build process and its dependencies, whereas Make uses Makefile format.")
312 (license license:asl2.0)))
313
314;; Version 3.2.2 is the last version without a dependency on a full-fledged
315;; compiler for Java 1.5.
316(define ecj-bootstrap
317 (package
318 (name "ecj-bootstrap")
319 (version "3.2.2")
320 (source (origin
321 (method url-fetch)
322 (uri (string-append "http://archive.eclipse.org/eclipse/"
323 "downloads/drops/R-" version
324 "-200702121330/ecjsrc.zip"))
325 (sha256
326 (base32
327 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
328 ;; It would be so much easier if we could use the ant-build-system, but we
329 ;; cannot as we don't have ant at this point. We use ecj for
330 ;; bootstrapping the JDK.
331 (build-system gnu-build-system)
332 (arguments
333 `(#:modules ((guix build gnu-build-system)
334 (guix build utils)
335 (srfi srfi-1))
336 #:tests? #f ; there are no tests
337 #:phases
338 (modify-phases %standard-phases
339 (replace 'configure
340 (lambda* (#:key inputs #:allow-other-keys)
341 (setenv "CLASSPATH"
342 (string-join
343 (cons (string-append (assoc-ref inputs "jamvm")
344 "/lib/rt.jar")
345 (find-files (string-append
346 (assoc-ref inputs "ant-bootstrap")
347 "/lib")
348 "\\.jar$"))
349 ":"))
350 #t))
351 (replace 'build
352 (lambda* (#:key inputs #:allow-other-keys)
353 ;; The unpack phase enters the "org" directory by mistake.
354 (chdir "..")
355
356 ;; Create a simple manifest to make ecj executable.
357 (with-output-to-file "manifest"
358 (lambda _
359 (display "Manifest-Version: 1.0
360Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
361
362 ;; Compile it all!
363 (and (apply invoke "jikes"
364 (find-files "." "\\.java$"))
365 (invoke "fastjar" "cvfm"
366 "ecj-bootstrap.jar" "manifest" "."))))
367 (replace 'install
368 (lambda* (#:key outputs #:allow-other-keys)
369 (let ((share (string-append (assoc-ref outputs "out")
370 "/share/java/")))
371 (mkdir-p share)
372 (install-file "ecj-bootstrap.jar" share)
373 #t))))))
374 (native-inputs
375 `(("ant-bootstrap" ,ant-bootstrap)
376 ("unzip" ,unzip)
377 ("jikes" ,jikes)
378 ("jamvm" ,jamvm-1-bootstrap)
379 ("fastjar" ,fastjar)))
380 (home-page "https://eclipse.org")
381 (synopsis "Eclipse Java development tools core batch compiler")
382 (description "This package provides the Eclipse Java core batch compiler
383for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
384requirement for all GNU Classpath releases after version 0.93.")
385 (license license:epl1.0)))
386
387(define ecj-javac-wrapper
388 (package (inherit ecj-bootstrap)
389 (name "ecj-javac-wrapper")
390 (source #f)
391 (build-system trivial-build-system)
392 (arguments
393 `(#:modules ((guix build utils))
394 #:builder
395 (begin
396 (use-modules (guix build utils))
397 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
398 (target (string-append bin "/javac"))
399 (guile (string-append (assoc-ref %build-inputs "guile")
400 "/bin/guile"))
401 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
402 "/share/java/ecj-bootstrap.jar"))
403 (java (string-append (assoc-ref %build-inputs "jamvm")
404 "/bin/jamvm"))
405 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
406 "/share/classpath")))
407 (string-append jvmlib "/glibj.zip:"
408 jvmlib "/tools.zip"))))
409 (mkdir-p bin)
410 (with-output-to-file target
411 (lambda _
412 (format #t "#!~a --no-auto-compile\n!#\n" guile)
413 (write
414 `(begin (use-modules (ice-9 match)
415 (ice-9 receive)
416 (ice-9 hash-table)
417 (srfi srfi-1)
418 (srfi srfi-26))
419 (define defaults
420 '(("-bootclasspath" ,bootcp)
421 ("-source" "1.5")
422 ("-target" "1.5")
423 ("-cp" ".")))
424 (define (main args)
425 (let ((classpath (getenv "CLASSPATH")))
426 (setenv "CLASSPATH"
427 (string-join (list ,ecj
428 ,(string-append (assoc-ref %build-inputs "jamvm")
429 "/lib/rt.jar")
430 (or classpath ""))
431 ":")))
432 (receive (vm-args other-args)
433 ;; Separate VM arguments from arguments to ECJ.
434 (partition (cut string-prefix? "-J" <>)
435 (fold (lambda (default acc)
436 (if (member (first default) acc)
437 acc (append default acc)))
438 args defaults))
439 (apply system* ,java
440 (append
441 ;; Remove "-J" prefix
442 (map (cut string-drop <> 2) vm-args)
443 '("org.eclipse.jdt.internal.compiler.batch.Main")
444 (cons "-nowarn" other-args)))))
445 ;; Entry point
446 (let ((args (cdr (command-line))))
447 (if (null? args)
448 (format (current-error-port) "javac: no arguments given!\n")
449 (main args)))))))
450 (chmod target #o755)
451 #t))))
452 (native-inputs
453 `(("guile" ,guile-2.2)
454 ("ecj-bootstrap" ,ecj-bootstrap)
455 ("jamvm" ,jamvm-1-bootstrap)
456 ("classpath" ,classpath-bootstrap)))
457 (description "This package provides a wrapper around the @dfn{Eclipse
458compiler for Java} (ecj) with a command line interface that is compatible with
459the standard javac executable.")))
460
461;; The classpath-bootstrap was built without a virtual machine, so it does not
462;; provide a wrapper for javah. We cannot build the development version of
463;; Classpath without javah.
464(define classpath-0.99
465 (package (inherit classpath-bootstrap)
466 (version "0.99")
467 (source (origin
468 (method url-fetch)
469 (uri (string-append "mirror://gnu/classpath/classpath-"
470 version ".tar.gz"))
471 (sha256
472 (base32
473 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
474 (patches (search-patches "classpath-aarch64-support.patch"))))
475 (arguments
476 `(#:configure-flags
477 (list (string-append "--with-ecj-jar="
478 (assoc-ref %build-inputs "ecj-bootstrap")
479 "/share/java/ecj-bootstrap.jar")
480 (string-append "JAVAC="
481 (assoc-ref %build-inputs "ecj-javac-wrapper")
482 "/bin/javac")
483 (string-append "JAVA="
484 (assoc-ref %build-inputs "jamvm")
485 "/bin/jamvm")
486 "GCJ_JAVAC_TRUE=no"
487 "ac_cv_prog_java_works=yes" ; trust me
488 "--disable-Werror"
489 "--disable-gmp"
490 "--disable-gtk-peer"
491 "--disable-gconf-peer"
492 "--disable-plugin"
493 "--disable-dssi"
494 "--disable-alsa"
495 "--disable-gjdoc")
496 #:phases
497 (modify-phases %standard-phases
498 (add-after 'install 'install-data
499 (lambda _ (invoke "make" "install-data"))))))
500 (native-inputs
501 `(("ecj-bootstrap" ,ecj-bootstrap)
502 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
503 ("fastjar" ,fastjar)
504 ("jamvm" ,jamvm-1-bootstrap)
505 ("classpath" ,classpath-bootstrap)
506 ("libltdl" ,libltdl)
507 ("pkg-config" ,pkg-config)))))
508
509;; We need this because classpath-bootstrap does not provide all of the tools
510;; we need to build classpath-devel.
511(define classpath-jamvm-wrappers
512 (package (inherit classpath-0.99)
513 (name "classpath-jamvm-wrappers")
514 (source #f)
515 (build-system trivial-build-system)
516 (arguments
517 `(#:modules ((guix build utils))
518 #:builder
519 (begin
520 (use-modules (guix build utils))
521 (let* ((bash (assoc-ref %build-inputs "bash"))
522 (jamvm (assoc-ref %build-inputs "jamvm"))
523 (classpath (assoc-ref %build-inputs "classpath"))
524 (bin (string-append (assoc-ref %outputs "out")
525 "/bin/")))
526 (mkdir-p bin)
527 (for-each (lambda (tool)
528 (with-output-to-file (string-append bin tool)
529 (lambda _
530 ,@(if (string-prefix? "armhf" (or (%current-system)
531 (%current-target-system)))
532 `((format #t "#!~a/bin/sh
533~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
534gnu.classpath.tools.~a.~a $@"
535 bash jamvm classpath tool
536 (if (string=? "native2ascii" tool)
537 "Native2ASCII" "Main")))
538 `((format #t "#!~a/bin/sh
539~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
540gnu.classpath.tools.~a.~a $@"
541 bash jamvm classpath tool
542 (if (string=? "native2ascii" tool)
543 "Native2ASCII" "Main"))))))
544 (chmod (string-append bin tool) #o755))
545 (list "javah"
546 "rmic"
547 "rmid"
548 "orbd"
549 "rmiregistry"
550 "native2ascii"))
551 #t))))
552 (native-inputs
553 `(("bash" ,bash)
554 ("jamvm" ,jamvm-1-bootstrap)
555 ("classpath" ,classpath-0.99)))
556 (inputs '())
557 (synopsis "Executables from GNU Classpath")
558 (description "This package provides wrappers around the tools provided by
559the GNU Classpath library. They are executed by the JamVM virtual
560machine.")))
561
562;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
563;; then Classpath has gained much more support for Java 1.6.
564(define-public classpath-devel
565 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
566 (revision "1"))
567 (package (inherit classpath-bootstrap)
568 (version (string-append "0.99-" revision "." (string-take commit 9)))
569 (source (origin
570 (method git-fetch)
571 (uri (git-reference
572 (url "https://git.savannah.gnu.org/git/classpath.git")
573 (commit commit)))
574 (file-name (string-append "classpath-" version "-checkout"))
575 (sha256
576 (base32
577 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
578 (arguments
579 `(#:make-flags
580 ;; Ensure that the initial heap size is smaller than the maximum
581 ;; size. By default only Xmx is set, which can lead to invalid
582 ;; memory settings on some machines with a lot of memory.
583 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
584 #:configure-flags
585 (list (string-append "--with-ecj-jar="
586 (assoc-ref %build-inputs "ecj-bootstrap")
587 "/share/java/ecj-bootstrap.jar")
588 (string-append "--with-javac="
589 (assoc-ref %build-inputs "ecj-javac-wrapper")
590 "/bin/javac")
591 (string-append "JAVA="
592 (assoc-ref %build-inputs "jamvm")
593 "/bin/jamvm")
594 "GCJ_JAVAC_TRUE=no"
595 "ac_cv_prog_java_works=yes" ; trust me
596 "--disable-Werror"
597 "--disable-gmp"
598 "--disable-gtk-peer"
599 "--disable-gconf-peer"
600 "--disable-plugin"
601 "--disable-dssi"
602 "--disable-alsa"
603 "--disable-gjdoc")
604 #:phases
605 (modify-phases %standard-phases
606 ;; XXX The bootstrap phase executes autogen.sh, which fails after
607 ;; complaining about the lack of gettext.
608 (replace 'bootstrap
609 (lambda _ (invoke "autoreconf" "-vif")))
610 (add-after 'unpack 'remove-unsupported-annotations
611 (lambda _
612 (substitute* (find-files "java" "\\.java$")
613 (("@Override") ""))
614 #t))
615 (add-after 'install 'install-data
616 (lambda _ (invoke "make" "install-data"))))))
617 (native-inputs
618 `(("autoconf" ,autoconf)
619 ("automake" ,automake)
620 ("libtool" ,libtool)
621 ("gettext" ,gettext-minimal)
622 ("texinfo" ,texinfo)
623 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
624 ("ecj-bootstrap" ,ecj-bootstrap)
625 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
626 ("fastjar" ,fastjar)
627 ("jamvm" ,jamvm-1-bootstrap)
628 ("libltdl" ,libltdl)
629 ("pkg-config" ,pkg-config))))))
630
631(define jamvm
632 (package (inherit jamvm-1-bootstrap)
633 (version "2.0.0")
634 (source (origin
635 (method url-fetch)
636 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
637 "JamVM%20" version "/jamvm-"
638 version ".tar.gz"))
639 (sha256
640 (base32
641 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
642 (build-system gnu-build-system)
643 (arguments
644 `(#:configure-flags
645 (list (string-append "--with-classpath-install-dir="
646 (assoc-ref %build-inputs "classpath")))))
647 (inputs
648 `(("classpath" ,classpath-devel)
649 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
650 ("zlib" ,zlib)))))
651
652(define ecj-javac-wrapper-final
653 (package (inherit ecj-javac-wrapper)
654 (native-inputs
655 `(("guile" ,guile-2.2)
656 ("ecj-bootstrap" ,ecj-bootstrap)
657 ("jamvm" ,jamvm)
658 ("classpath" ,classpath-devel)))))
659
660;; The bootstrap JDK consisting of jamvm, classpath-devel,
661;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
662;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
663;; which uses Java 6 only.
664(define-public icedtea-6
665 (package
666 (name "icedtea")
667 (version "1.13.13")
668 (source (origin
669 (method url-fetch)
670 (uri (string-append
671 "http://icedtea.wildebeest.org/download/source/icedtea6-"
672 version ".tar.xz"))
673 (sha256
674 (base32
675 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
676 (modules '((guix build utils)))
677 (snippet
678 '(begin
679 (substitute* "Makefile.in"
680 ;; do not leak information about the build host
681 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
682 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
683 #t))))
684 (build-system gnu-build-system)
685 (outputs '("out" ; Java Runtime Environment
686 "jdk" ; Java Development Kit
687 "doc")) ; all documentation
688 (arguments
689 `(;; There are many failing tests and many are known to fail upstream.
690 #:tests? #f
691
692 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
693 ;; gremlin) doesn't support it yet, so skip this phase.
694 #:validate-runpath? #f
695
696 #:modules ((guix build utils)
697 (guix build gnu-build-system)
698 (srfi srfi-19))
699
700 #:configure-flags
701 `("--enable-bootstrap"
702 "--enable-nss"
703 "--without-rhino"
704 "--with-parallel-jobs"
705 "--disable-downloading"
706 "--disable-tests"
707 ,(string-append "--with-ecj="
708 (assoc-ref %build-inputs "ecj")
709 "/share/java/ecj-bootstrap.jar")
710 ,(string-append "--with-jar="
711 (assoc-ref %build-inputs "fastjar")
712 "/bin/fastjar")
713 ,(string-append "--with-jdk-home="
714 (assoc-ref %build-inputs "classpath"))
715 ,(string-append "--with-java="
716 (assoc-ref %build-inputs "jamvm")
717 "/bin/jamvm"))
718 #:phases
719 (modify-phases %standard-phases
720 (replace 'unpack
721 (lambda* (#:key source inputs #:allow-other-keys)
722 (invoke "tar" "xvf" source)
723 (chdir (string-append "icedtea6-" ,version))
724 (mkdir "openjdk")
725 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
726 ;; The convenient OpenJDK source bundle is no longer
727 ;; available for download, so we have to take the sources
728 ;; from the Mercurial repositories and change the Makefile
729 ;; to avoid tests for the OpenJDK zip archive.
730 (with-directory-excursion "openjdk"
731 (for-each (lambda (part)
732 (mkdir part)
733 (copy-recursively
734 (assoc-ref inputs
735 (string-append part "-src"))
736 part))
737 '("jdk" "corba"
738 "langtools" "jaxp" "jaxws")))
739 (with-directory-excursion "openjdk"
740 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
741 (rename-file "hg-checkout" "hotspot"))
742 (substitute* "Makefile.in"
743 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
744 "echo \"trust me\";")
745 ;; The contents of the bootstrap directory must be
746 ;; writeable but when copying from the store they are
747 ;; not.
748 (("mkdir -p lib/rt" line)
749 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
750 (invoke "chmod" "-R" "u+w" "openjdk")))
751 (add-after 'unpack 'use-classpath
752 (lambda* (#:key inputs #:allow-other-keys)
753 (let ((jvmlib (assoc-ref inputs "classpath"))
754 (jamvm (assoc-ref inputs "jamvm")))
755 ;; Classpath does not provide rt.jar.
756 (substitute* "Makefile.in"
757 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
758 (string-append jvmlib "/share/classpath/glibj.zip")))
759 ;; Make sure we can find all classes.
760 (setenv "CLASSPATH"
761 (string-append jvmlib "/share/classpath/glibj.zip:"
762 jvmlib "/share/classpath/tools.zip:"
763 jamvm "/lib/rt.jar"))
764 (setenv "JAVACFLAGS"
765 (string-append "-cp "
766 jvmlib "/share/classpath/glibj.zip:"
767 jvmlib "/share/classpath/tools.zip")))
768 #t))
769 (add-after 'unpack 'patch-patches
770 (lambda _
771 ;; shebang in patches so that they apply cleanly
772 (substitute* '("patches/jtreg-jrunscript.patch"
773 "patches/hotspot/hs23/drop_unlicensed_test.patch")
774 (("#!/bin/sh") (string-append "#!" (which "sh"))))
775 #t))
776 (add-after 'unpack 'patch-paths
777 (lambda* (#:key inputs #:allow-other-keys)
778 ;; buildtree.make generates shell scripts, so we need to replace
779 ;; the generated shebang
780 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
781 (("/bin/sh") (which "bash")))
782
783 (let ((corebin (string-append
784 (assoc-ref inputs "coreutils") "/bin/"))
785 (binbin (string-append
786 (assoc-ref inputs "binutils") "/bin/"))
787 (grepbin (string-append
788 (assoc-ref inputs "grep") "/bin/")))
789 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
790 "openjdk/corba/make/common/shared/Defs-linux.gmk")
791 (("UNIXCOMMAND_PATH = /bin/")
792 (string-append "UNIXCOMMAND_PATH = " corebin))
793 (("USRBIN_PATH = /usr/bin/")
794 (string-append "USRBIN_PATH = " corebin))
795 (("DEVTOOLS_PATH *= */usr/bin/")
796 (string-append "DEVTOOLS_PATH = " corebin))
797 (("COMPILER_PATH *= */usr/bin/")
798 (string-append "COMPILER_PATH = "
799 (assoc-ref inputs "gcc") "/bin/"))
800 (("DEF_OBJCOPY *=.*objcopy")
801 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
802
803 ;; fix path to alsa header
804 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
805 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
806 (string-append "ALSA_INCLUDE="
807 (assoc-ref inputs "alsa-lib")
808 "/include/alsa/version.h")))
809
810 ;; fix hard-coded utility paths
811 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
812 "openjdk/corba/make/common/shared/Defs-utils.gmk")
813 (("ECHO *=.*echo")
814 (string-append "ECHO = " (which "echo")))
815 (("^GREP *=.*grep")
816 (string-append "GREP = " (which "grep")))
817 (("EGREP *=.*egrep")
818 (string-append "EGREP = " (which "egrep")))
819 (("CPIO *=.*cpio")
820 (string-append "CPIO = " (which "cpio")))
821 (("READELF *=.*readelf")
822 (string-append "READELF = " (which "readelf")))
823 (("^ *AR *=.*ar")
824 (string-append "AR = " (which "ar")))
825 (("^ *TAR *=.*tar")
826 (string-append "TAR = " (which "tar")))
827 (("AS *=.*as")
828 (string-append "AS = " (which "as")))
829 (("LD *=.*ld")
830 (string-append "LD = " (which "ld")))
831 (("STRIP *=.*strip")
832 (string-append "STRIP = " (which "strip")))
833 (("NM *=.*nm")
834 (string-append "NM = " (which "nm")))
835 (("^SH *=.*sh")
836 (string-append "SH = " (which "bash")))
837 (("^FIND *=.*find")
838 (string-append "FIND = " (which "find")))
839 (("LDD *=.*ldd")
840 (string-append "LDD = " (which "ldd")))
841 (("NAWK *=.*(n|g)awk")
842 (string-append "NAWK = " (which "gawk")))
843 (("XARGS *=.*xargs")
844 (string-append "XARGS = " (which "xargs")))
845 (("UNZIP *=.*unzip")
846 (string-append "UNZIP = " (which "unzip")))
847 (("ZIPEXE *=.*zip")
848 (string-append "ZIPEXE = " (which "zip")))
849 (("SED *=.*sed")
850 (string-append "SED = " (which "sed"))))
851
852 ;; Some of these timestamps cause problems as they are more than
853 ;; 10 years ago, failing the build process.
854 (substitute*
855 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
856 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
857 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
858 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
859 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
860 #t)))
861 (add-before 'configure 'set-additional-paths
862 (lambda* (#:key inputs #:allow-other-keys)
863 (setenv "CPATH"
864 (string-append (assoc-ref inputs "libxrender")
865 "/include/X11/extensions" ":"
866 (assoc-ref inputs "libxtst")
867 "/include/X11/extensions" ":"
868 (assoc-ref inputs "libxinerama")
869 "/include/X11/extensions" ":"
870 (or (getenv "CPATH") "")))
871 (setenv "ALT_CUPS_HEADERS_PATH"
872 (string-append (assoc-ref inputs "cups")
873 "/include"))
874 (setenv "ALT_FREETYPE_HEADERS_PATH"
875 (string-append (assoc-ref inputs "freetype")
876 "/include"))
877 (setenv "ALT_FREETYPE_LIB_PATH"
878 (string-append (assoc-ref inputs "freetype")
879 "/lib"))
880 #t))
881 (replace 'install
882 (lambda* (#:key outputs #:allow-other-keys)
883 (let ((doc (string-append (assoc-ref outputs "doc")
884 "/share/doc/icedtea"))
885 (jre (assoc-ref outputs "out"))
886 (jdk (assoc-ref outputs "jdk")))
887 (copy-recursively "openjdk.build/docs" doc)
888 (copy-recursively "openjdk.build/j2re-image" jre)
889 (copy-recursively "openjdk.build/j2sdk-image" jdk))
890 #t)))))
891 (native-inputs
892 `(("ant" ,ant-bootstrap)
893 ("alsa-lib" ,alsa-lib)
894 ("attr" ,attr)
895 ("classpath" ,classpath-devel)
896 ("coreutils" ,coreutils)
897 ("cpio" ,cpio)
898 ("cups" ,cups)
899 ("ecj" ,ecj-bootstrap)
900 ("ecj-javac" ,ecj-javac-wrapper-final)
901 ("fastjar" ,fastjar)
902 ("fontconfig" ,fontconfig)
903 ("freetype" ,freetype)
904 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
905 ("gtk" ,gtk+-2)
906 ("gawk" ,gawk)
907 ("giflib" ,giflib)
908 ("grep" ,grep)
909 ("jamvm" ,jamvm)
910 ("lcms" ,lcms)
911 ("libjpeg" ,libjpeg)
912 ("libnsl" ,libnsl)
913 ("libpng" ,libpng)
914 ("libtool" ,libtool)
915 ("libx11" ,libx11)
916 ("libxcomposite" ,libxcomposite)
917 ("libxi" ,libxi)
918 ("libxinerama" ,libxinerama)
919 ("libxrender" ,libxrender)
920 ("libxslt" ,libxslt) ;for xsltproc
921 ("libxt" ,libxt)
922 ("libxtst" ,libxtst)
923 ("mit-krb5" ,mit-krb5)
924 ("nss" ,nss)
925 ("nss-certs" ,nss-certs)
926 ("perl" ,perl)
927 ("pkg-config" ,pkg-config)
928 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
929 ("unzip" ,unzip)
930 ("wget" ,wget)
931 ("which" ,which)
932 ("zip" ,zip)
933 ("zlib" ,zlib)
934 ("openjdk-src"
935 ,(origin
936 (method hg-fetch)
937 (uri (hg-reference
938 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
939 (changeset "jdk6-b41")))
940 (sha256
941 (base32
942 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
943 ("jdk-src"
944 ,(origin
945 (method hg-fetch)
946 (uri (hg-reference
947 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
948 (changeset "jdk6-b41")))
949 (sha256
950 (base32
951 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
952 ("hotspot-src"
953 ,(origin
954 (method hg-fetch)
955 (uri (hg-reference
956 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
957 (changeset "jdk6-b41")))
958 (sha256
959 (base32
960 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
961 (patches
962 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
963 ("corba-src"
964 ,(origin
965 (method hg-fetch)
966 (uri (hg-reference
967 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
968 (changeset "jdk6-b41")))
969 (sha256
970 (base32
971 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
972 ("langtools-src"
973 ,(origin
974 (method hg-fetch)
975 (uri (hg-reference
976 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
977 (changeset "jdk6-b41")))
978 (sha256
979 (base32
980 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
981 ("jaxp-src"
982 ,(origin
983 (method hg-fetch)
984 (uri (hg-reference
985 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
986 (changeset "jdk6-b41")))
987 (sha256
988 (base32
989 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
990 ("jaxws-src"
991 ,(origin
992 (method hg-fetch)
993 (uri (hg-reference
994 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
995 (changeset "jdk6-b41")))
996 (sha256
997 (base32
998 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
999 (home-page "http://icedtea.classpath.org")
1000 (synopsis "Java development kit")
1001 (description
1002 "This package provides the OpenJDK built with the IcedTea build harness.
1003This version of the OpenJDK is no longer maintained and is only used for
1004bootstrapping purposes.")
1005 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1006 ;; same license as both GNU Classpath and OpenJDK.
1007 (license license:gpl2+)))
1008
1009(define-public icedtea-7
1010 (let* ((version "2.6.13")
1011 (drop (lambda (name hash)
1012 (origin
1013 (method url-fetch)
1014 (uri (string-append
1015 "http://icedtea.classpath.org/download/drops"
1016 "/icedtea7/" version "/" name ".tar.bz2"))
1017 (sha256 (base32 hash))))))
1018 (package
1019 (name "icedtea")
1020 (version version)
1021 (source (origin
1022 (method url-fetch)
1023 (uri (string-append
1024 "http://icedtea.wildebeest.org/download/source/icedtea-"
1025 version ".tar.xz"))
1026 (sha256
1027 (base32
1028 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1029 (modules '((guix build utils)))
1030 (snippet
1031 '(begin
1032 (substitute* "Makefile.in"
1033 ;; do not leak information about the build host
1034 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1035 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1036 #t))))
1037 (build-system gnu-build-system)
1038 (outputs '("out" ; Java Runtime Environment
1039 "jdk" ; Java Development Kit
1040 "doc")) ; all documentation
1041 (arguments
1042 `(;; There are many test failures. Some are known to
1043 ;; fail upstream, others relate to not having an X
1044 ;; server running at test time, yet others are a
1045 ;; complete mystery to me.
1046
1047 ;; hotspot: passed: 241; failed: 45; error: 2
1048 ;; langtools: passed: 1,934; failed: 26
1049 ;; jdk: unknown
1050 #:tests? #f
1051
1052 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1053 ;; gremlin) doesn't support it yet, so skip this phase.
1054 #:validate-runpath? #f
1055
1056 ;; Apparently, the C locale is needed for some of the tests.
1057 #:locale "C"
1058
1059 #:modules ((guix build utils)
1060 (guix build gnu-build-system)
1061 (ice-9 match)
1062 (ice-9 popen)
1063 (srfi srfi-19)
1064 (srfi srfi-26))
1065
1066 #:configure-flags
1067 ;; TODO: package pcsc and sctp, and add to inputs
1068 `("--disable-system-pcsc"
1069 "--disable-system-sctp"
1070 "--enable-bootstrap"
1071 "--enable-nss"
1072 "--without-rhino"
1073 "--disable-downloading"
1074 "--disable-tests" ;they are run in the check phase instead
1075 "--with-openjdk-src-dir=./openjdk.src"
1076 ,(string-append "--with-jdk-home="
1077 (assoc-ref %build-inputs "jdk")))
1078
1079 #:phases
1080 (modify-phases %standard-phases
1081 (replace 'unpack
1082 (lambda* (#:key source inputs #:allow-other-keys)
1083 (let ((target (string-append "icedtea-" ,version))
1084 (unpack (lambda* (name #:optional dir)
1085 (let ((dir (or dir
1086 (string-drop-right name 5))))
1087 (mkdir dir)
1088 (invoke "tar" "xvf"
1089 (assoc-ref inputs name)
1090 "-C" dir
1091 "--strip-components=1")))))
1092 (mkdir target)
1093 (invoke "tar" "xvf" source
1094 "-C" target "--strip-components=1")
1095 (chdir target)
1096 (unpack "openjdk-src" "openjdk.src")
1097 (with-directory-excursion "openjdk.src"
1098 (for-each unpack
1099 (filter (cut string-suffix? "-drop" <>)
1100 (map (match-lambda
1101 ((name . _) name))
1102 inputs))))
1103 #t)))
1104 (add-after 'unpack 'fix-x11-extension-include-path
1105 (lambda* (#:key inputs #:allow-other-keys)
1106 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1107 (((string-append "\\$\\(firstword \\$\\(wildcard "
1108 "\\$\\(OPENWIN_HOME\\)"
1109 "/include/X11/extensions\\).*$"))
1110 (string-append (assoc-ref inputs "libxrender")
1111 "/include/X11/extensions"
1112 " -I" (assoc-ref inputs "libxtst")
1113 "/include/X11/extensions"
1114 " -I" (assoc-ref inputs "libxinerama")
1115 "/include/X11/extensions"))
1116 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1117 #t))
1118 (add-after 'unpack 'patch-paths
1119 (lambda _
1120 ;; buildtree.make generates shell scripts, so we need to replace
1121 ;; the generated shebang
1122 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1123 (("/bin/sh") (which "bash")))
1124
1125 (let ((corebin (string-append
1126 (assoc-ref %build-inputs "coreutils") "/bin/"))
1127 (binbin (string-append
1128 (assoc-ref %build-inputs "binutils") "/bin/"))
1129 (grepbin (string-append
1130 (assoc-ref %build-inputs "grep") "/bin/")))
1131 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1132 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1133 (("UNIXCOMMAND_PATH = /bin/")
1134 (string-append "UNIXCOMMAND_PATH = " corebin))
1135 (("USRBIN_PATH = /usr/bin/")
1136 (string-append "USRBIN_PATH = " corebin))
1137 (("DEVTOOLS_PATH *= */usr/bin/")
1138 (string-append "DEVTOOLS_PATH = " corebin))
1139 (("COMPILER_PATH *= */usr/bin/")
1140 (string-append "COMPILER_PATH = "
1141 (assoc-ref %build-inputs "gcc") "/bin/"))
1142 (("DEF_OBJCOPY *=.*objcopy")
1143 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1144
1145 ;; fix path to alsa header
1146 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1147 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1148 (string-append "ALSA_INCLUDE="
1149 (assoc-ref %build-inputs "alsa-lib")
1150 "/include/alsa/version.h")))
1151
1152 ;; fix hard-coded utility paths
1153 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1154 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1155 (("ECHO *=.*echo")
1156 (string-append "ECHO = " (which "echo")))
1157 (("^GREP *=.*grep")
1158 (string-append "GREP = " (which "grep")))
1159 (("EGREP *=.*egrep")
1160 (string-append "EGREP = " (which "egrep")))
1161 (("CPIO *=.*cpio")
1162 (string-append "CPIO = " (which "cpio")))
1163 (("READELF *=.*readelf")
1164 (string-append "READELF = " (which "readelf")))
1165 (("^ *AR *=.*ar")
1166 (string-append "AR = " (which "ar")))
1167 (("^ *TAR *=.*tar")
1168 (string-append "TAR = " (which "tar")))
1169 (("AS *=.*as")
1170 (string-append "AS = " (which "as")))
1171 (("LD *=.*ld")
1172 (string-append "LD = " (which "ld")))
1173 (("STRIP *=.*strip")
1174 (string-append "STRIP = " (which "strip")))
1175 (("NM *=.*nm")
1176 (string-append "NM = " (which "nm")))
1177 (("^SH *=.*sh")
1178 (string-append "SH = " (which "bash")))
1179 (("^FIND *=.*find")
1180 (string-append "FIND = " (which "find")))
1181 (("LDD *=.*ldd")
1182 (string-append "LDD = " (which "ldd")))
1183 (("NAWK *=.*(n|g)awk")
1184 (string-append "NAWK = " (which "gawk")))
1185 (("XARGS *=.*xargs")
1186 (string-append "XARGS = " (which "xargs")))
1187 (("UNZIP *=.*unzip")
1188 (string-append "UNZIP = " (which "unzip")))
1189 (("ZIPEXE *=.*zip")
1190 (string-append "ZIPEXE = " (which "zip")))
1191 (("SED *=.*sed")
1192 (string-append "SED = " (which "sed"))))
1193
1194 ;; Some of these timestamps cause problems as they are more than
1195 ;; 10 years ago, failing the build process.
1196 (substitute*
1197 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1198 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1199 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1200 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1201 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1202 #t))
1203 (add-before 'configure 'set-additional-paths
1204 (lambda* (#:key inputs #:allow-other-keys)
1205 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1206 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1207 (string-append "ALSA_INCLUDE="
1208 (assoc-ref inputs "alsa-lib")
1209 "/include/alsa/version.h")))
1210 (setenv "CC" "gcc")
1211 (setenv "CPATH"
1212 (string-append (assoc-ref inputs "libxcomposite")
1213 "/include/X11/extensions" ":"
1214 (assoc-ref inputs "libxrender")
1215 "/include/X11/extensions" ":"
1216 (assoc-ref inputs "libxtst")
1217 "/include/X11/extensions" ":"
1218 (assoc-ref inputs "libxinerama")
1219 "/include/X11/extensions" ":"
1220 (or (getenv "CPATH") "")))
1221 (setenv "ALT_OBJCOPY" (which "objcopy"))
1222 (setenv "ALT_CUPS_HEADERS_PATH"
1223 (string-append (assoc-ref inputs "cups")
1224 "/include"))
1225 (setenv "ALT_FREETYPE_HEADERS_PATH"
1226 (string-append (assoc-ref inputs "freetype")
1227 "/include"))
1228 (setenv "ALT_FREETYPE_LIB_PATH"
1229 (string-append (assoc-ref inputs "freetype")
1230 "/lib"))
1231 #t))
1232 (add-before 'check 'fix-test-framework
1233 (lambda _
1234 ;; Fix PATH in test environment
1235 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1236 (("PATH=/bin:/usr/bin")
1237 (string-append "PATH=" (getenv "PATH"))))
1238 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1239 (("/usr/bin/env") (which "env")))
1240 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1241 (("/bin/rm") (which "rm"))
1242 (("/bin/cp") (which "cp"))
1243 (("/bin/mv") (which "mv")))
1244 #t))
1245 (add-before 'check 'fix-hotspot-tests
1246 (lambda _
1247 (with-directory-excursion "openjdk.src/hotspot/test/"
1248 (substitute* "jprt.config"
1249 (("PATH=\"\\$\\{path4sdk\\}\"")
1250 (string-append "PATH=" (getenv "PATH")))
1251 (("make=/usr/bin/make")
1252 (string-append "make=" (which "make"))))
1253 (substitute* '("runtime/6626217/Test6626217.sh"
1254 "runtime/7110720/Test7110720.sh")
1255 (("/bin/rm") (which "rm"))
1256 (("/bin/cp") (which "cp"))
1257 (("/bin/mv") (which "mv"))))
1258 #t))
1259 (add-before 'check 'fix-jdk-tests
1260 (lambda _
1261 (with-directory-excursion "openjdk.src/jdk/test/"
1262 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1263 (("/bin/pwd") (which "pwd")))
1264 (substitute* "com/sun/jdi/ShellScaffold.sh"
1265 (("/bin/kill") (which "kill")))
1266 (substitute* "start-Xvfb.sh"
1267 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1268 (("/usr/bin/nohup") (which "nohup")))
1269 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1270 (("/bin/rm") (which "rm")))
1271 (substitute* "tools/launcher/MultipleJRE.sh"
1272 (("echo \"#!/bin/sh\"")
1273 (string-append "echo \"#!" (which "rm") "\""))
1274 (("/usr/bin/zip") (which "zip")))
1275 (substitute* "com/sun/jdi/OnThrowTest.java"
1276 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1277 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1278 (("/usr/bin/uptime") (which "uptime")))
1279 (substitute* "java/lang/ProcessBuilder/Basic.java"
1280 (("/usr/bin/env") (which "env"))
1281 (("/bin/false") (which "false"))
1282 (("/bin/true") (which "true"))
1283 (("/bin/cp") (which "cp"))
1284 (("/bin/sh") (which "sh")))
1285 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1286 (("/bin/sh") (which "sh")))
1287 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1288 (("/usr/bin/perl") (which "perl"))
1289 (("/bin/ps") (which "ps"))
1290 (("/bin/true") (which "true")))
1291 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1292 (("/usr/bin/tee") (which "tee")))
1293 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1294 (("/bin/true") (which "true")))
1295 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1296 (("/bin/cat") (which "cat")))
1297 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1298 (("/bin/sh") (which "sh"))
1299 (("/bin/true") (which "true"))
1300 (("/bin/kill") (which "kill")))
1301 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1302 (("/usr/bin/echo") (which "echo")))
1303 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1304 (("/usr/bin/cat") (which "cat")))
1305 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1306 (("/bin/cat") (which "cat"))
1307 (("/bin/sleep") (which "sleep"))
1308 (("/bin/sh") (which "sh")))
1309 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1310 (("/bin/cat") (which "cat")))
1311 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1312 (("/bin/chmod") (which "chmod")))
1313 (substitute* "java/util/zip/ZipFile/Assortment.java"
1314 (("/bin/sh") (which "sh"))))
1315 #t))
1316 (replace 'check
1317 (lambda _
1318 ;; The "make check-*" targets always return zero, so we need to
1319 ;; check for errors in the associated log files to determine
1320 ;; whether any tests have failed.
1321 (use-modules (ice-9 rdelim))
1322 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1323 (checker (lambda (port)
1324 (let loop ()
1325 (let ((line (read-line port)))
1326 (cond
1327 ((eof-object? line) #t)
1328 ((regexp-exec error-pattern line)
1329 (error "test failed"))
1330 (else (loop)))))))
1331 (run-test (lambda (test)
1332 (invoke "make" test)
1333 (call-with-input-file
1334 (string-append "test/" test ".log")
1335 checker))))
1336 (when #f ; skip tests
1337 (run-test "check-hotspot")
1338 (run-test "check-langtools")
1339 (run-test "check-jdk"))
1340 #t)))
1341 (replace 'install
1342 (lambda* (#:key outputs #:allow-other-keys)
1343 (let ((doc (string-append (assoc-ref outputs "doc")
1344 "/share/doc/icedtea"))
1345 (jre (assoc-ref outputs "out"))
1346 (jdk (assoc-ref outputs "jdk")))
1347 (copy-recursively "openjdk.build/docs" doc)
1348 (copy-recursively "openjdk.build/j2re-image" jre)
1349 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1350 #t))
1351 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1352 ;; But that shared object is located in the server/ folder, so it
1353 ;; cannot be found. This phase creates a symbolic link in the
1354 ;; lib/amd64 folder so that the other libraries can find it.
1355 ;;
1356 ;; See:
1357 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1358 ;;
1359 ;; FIXME: Find the bug in the build system, so that this symlink is
1360 ;; not needed.
1361 (add-after 'install 'install-libjvm
1362 (lambda* (#:key inputs outputs #:allow-other-keys)
1363 (let* ((lib-path (string-append (assoc-ref outputs "out")
1364 "/lib/amd64")))
1365 (symlink (string-append lib-path "/server/libjvm.so")
1366 (string-append lib-path "/libjvm.so")))
1367 #t))
1368 ;; By default IcedTea only generates an empty keystore. In order to
1369 ;; be able to use certificates in Java programs we need to generate a
1370 ;; keystore from a set of certificates. For convenience we use the
1371 ;; certificates from the nss-certs package.
1372 (add-after 'install 'install-keystore
1373 (lambda* (#:key inputs outputs #:allow-other-keys)
1374 (let* ((keystore "cacerts")
1375 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1376 "/etc/ssl/certs"))
1377 (keytool (string-append (assoc-ref outputs "jdk")
1378 "/bin/keytool")))
1379 (define (extract-cert file target)
1380 (call-with-input-file file
1381 (lambda (in)
1382 (call-with-output-file target
1383 (lambda (out)
1384 (let loop ((line (read-line in 'concat))
1385 (copying? #f))
1386 (cond
1387 ((eof-object? line) #t)
1388 ((string-prefix? "-----BEGIN" line)
1389 (display line out)
1390 (loop (read-line in 'concat) #t))
1391 ((string-prefix? "-----END" line)
1392 (display line out)
1393 #t)
1394 (else
1395 (when copying? (display line out))
1396 (loop (read-line in 'concat) copying?)))))))))
1397 (define (import-cert cert)
1398 (format #t "Importing certificate ~a\n" (basename cert))
1399 (let ((temp "tmpcert"))
1400 (extract-cert cert temp)
1401 (let ((port (open-pipe* OPEN_WRITE keytool
1402 "-import"
1403 "-alias" (basename cert)
1404 "-keystore" keystore
1405 "-storepass" "changeit"
1406 "-file" temp)))
1407 (display "yes\n" port)
1408 (when (not (zero? (status:exit-val (close-pipe port))))
1409 (format #t "failed to import ~a\n" cert)))
1410 (delete-file temp)))
1411
1412 ;; This is necessary because the certificate directory contains
1413 ;; files with non-ASCII characters in their names.
1414 (setlocale LC_ALL "en_US.utf8")
1415 (setenv "LC_ALL" "en_US.utf8")
1416
1417 (for-each import-cert (find-files certs-dir "\\.pem$"))
1418 (mkdir-p (string-append (assoc-ref outputs "out")
1419 "/lib/security"))
1420 (mkdir-p (string-append (assoc-ref outputs "jdk")
1421 "/jre/lib/security"))
1422
1423 ;; The cacerts files we are going to overwrite are chmod'ed as
1424 ;; read-only (444) in icedtea-8 (which derives from this
1425 ;; package). We have to change this so we can overwrite them.
1426 (chmod (string-append (assoc-ref outputs "out")
1427 "/lib/security/" keystore) #o644)
1428 (chmod (string-append (assoc-ref outputs "jdk")
1429 "/jre/lib/security/" keystore) #o644)
1430
1431 (install-file keystore
1432 (string-append (assoc-ref outputs "out")
1433 "/lib/security"))
1434 (install-file keystore
1435 (string-append (assoc-ref outputs "jdk")
1436 "/jre/lib/security"))
1437 #t))))))
1438 (native-inputs
1439 `(("openjdk-src"
1440 ,(drop "openjdk"
1441 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1442 ("corba-drop"
1443 ,(drop "corba"
1444 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1445 ("jaxp-drop"
1446 ,(drop "jaxp"
1447 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1448 ("jaxws-drop"
1449 ,(drop "jaxws"
1450 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1451 ("jdk-drop"
1452 ,(drop "jdk"
1453 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1454 ("langtools-drop"
1455 ,(drop "langtools"
1456 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1457 ("hotspot-drop"
1458 ,(origin
1459 (method url-fetch)
1460 (uri (string-append
1461 "http://icedtea.classpath.org/downloads/drops"
1462 "/icedtea7/" version "/hotspot.tar.bz2"))
1463 (sha256
1464 (base32
1465 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1466 (patches (search-patches
1467 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1468 ("ant" ,ant-bootstrap)
1469 ("attr" ,attr)
1470 ("coreutils" ,coreutils)
1471 ("diffutils" ,diffutils) ;for tests
1472 ("gawk" ,gawk)
1473 ("grep" ,grep)
1474 ("libtool" ,libtool)
1475 ("pkg-config" ,pkg-config)
1476 ("wget" ,wget)
1477 ("which" ,which)
1478 ("cpio" ,cpio)
1479 ("zip" ,zip)
1480 ("unzip" ,unzip)
1481 ("fastjar" ,fastjar)
1482 ("libxslt" ,libxslt) ;for xsltproc
1483 ("nss-certs" ,nss-certs)
1484 ("perl" ,perl)
1485 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1486 ("jdk" ,icedtea-6 "jdk")))
1487 (inputs
1488 `(("alsa-lib" ,alsa-lib)
1489 ("cups" ,cups)
1490 ("libx11" ,libx11)
1491 ("libxcomposite" ,libxcomposite)
1492 ("libxt" ,libxt)
1493 ("libxtst" ,libxtst)
1494 ("libxi" ,libxi)
1495 ("libxinerama" ,libxinerama)
1496 ("libxrender" ,libxrender)
1497 ("libjpeg" ,libjpeg)
1498 ("libpng" ,libpng)
1499 ("mit-krb5" ,mit-krb5)
1500 ("nss" ,nss)
1501 ("giflib" ,giflib)
1502 ("fontconfig" ,fontconfig)
1503 ("freetype" ,freetype)
1504 ("lcms" ,lcms)
1505 ("zlib" ,zlib)
1506 ("gtk" ,gtk+-2)))
1507 (home-page "http://icedtea.classpath.org")
1508 (synopsis "Java development kit")
1509 (description
1510 "This package provides the Java development kit OpenJDK built with the
1511IcedTea build harness.")
1512 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1513 ;; same license as both GNU Classpath and OpenJDK.
1514 (license license:gpl2+))))
1515
1516(define-public icedtea-8
1517 (let* ((version "3.7.0")
1518 (drop (lambda (name hash)
1519 (origin
1520 (method url-fetch)
1521 (uri (string-append
1522 "http://icedtea.classpath.org/download/drops"
1523 "/icedtea8/" version "/" name ".tar.xz"))
1524 (sha256 (base32 hash))))))
1525 (package (inherit icedtea-7)
1526 (version "3.7.0")
1527 (source (origin
1528 (method url-fetch)
1529 (uri (string-append
1530 "http://icedtea.wildebeest.org/download/source/icedtea-"
1531 version ".tar.xz"))
1532 (sha256
1533 (base32
1534 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1535 (modules '((guix build utils)))
1536 (snippet
1537 '(begin
1538 (substitute* '("configure"
1539 "acinclude.m4")
1540 ;; Do not embed build time
1541 (("(DIST_ID=\"Custom build).*$" _ prefix)
1542 (string-append prefix "\"\n"))
1543 ;; Do not leak information about the build host
1544 (("DIST_NAME=\"\\$build_os\"")
1545 "DIST_NAME=\"guix\""))
1546 #t))))
1547 (arguments
1548 `(#:imported-modules
1549 ((guix build ant-build-system)
1550 (guix build syscalls)
1551 ,@%gnu-build-system-modules)
1552 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1553 ((#:modules modules)
1554 `((guix build utils)
1555 (guix build gnu-build-system)
1556 ((guix build ant-build-system) #:prefix ant:)
1557 (ice-9 match)
1558 (ice-9 popen)
1559 (srfi srfi-19)
1560 (srfi srfi-26)))
1561 ((#:configure-flags flags)
1562 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1563 `( ;;"--disable-bootstrap"
1564 "--enable-bootstrap"
1565 "--enable-nss"
1566 "--disable-downloading"
1567 "--disable-system-pcsc"
1568 "--disable-system-sctp"
1569 "--disable-tests" ;they are run in the check phase instead
1570 "--with-openjdk-src-dir=./openjdk.src"
1571 ,(string-append "--with-jdk-home=" jdk))))
1572 ((#:phases phases)
1573 `(modify-phases ,phases
1574 (delete 'fix-x11-extension-include-path)
1575 (delete 'patch-paths)
1576 (delete 'set-additional-paths)
1577 (delete 'patch-patches)
1578 ;; Prevent the keytool from recording the current time when
1579 ;; adding certificates at build time.
1580 (add-after 'unpack 'patch-keystore
1581 (lambda _
1582 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1583 (("date = new Date\\(\\);")
1584 "\
1585date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1586new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1587new Date();"))
1588 #t))
1589 (add-after 'unpack 'patch-jni-libs
1590 ;; Hardcode dynamically loaded libraries.
1591 (lambda _
1592 (let* ((library-path (search-path-as-string->list
1593 (getenv "LIBRARY_PATH")))
1594 (find-library (lambda (name)
1595 (search-path
1596 library-path
1597 (string-append "lib" name ".so")))))
1598 (for-each
1599 (lambda (file)
1600 (catch 'decoding-error
1601 (lambda ()
1602 (substitute* file
1603 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1604 _ name version)
1605 (format #f "\"~a\"" (find-library name)))
1606 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1607 (format #f "\"~a\"" (find-library name)))))
1608 (lambda _
1609 ;; Those are safe to skip.
1610 (format (current-error-port)
1611 "warning: failed to substitute: ~a~%"
1612 file))))
1613 (find-files "openjdk.src/jdk/src/solaris/native"
1614 "\\.c|\\.h"))
1615 #t)))
1616 (replace 'install
1617 (lambda* (#:key outputs #:allow-other-keys)
1618 (let ((doc (string-append (assoc-ref outputs "doc")
1619 "/share/doc/icedtea"))
1620 (jre (assoc-ref outputs "out"))
1621 (jdk (assoc-ref outputs "jdk")))
1622 (copy-recursively "openjdk.build/docs" doc)
1623 (copy-recursively "openjdk.build/images/j2re-image" jre)
1624 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1625 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1626 ;; support via NSS.
1627 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1628 (string-append jre "/lib/security/nss.cfg"))
1629 #t)))
1630 (add-after 'install 'strip-jar-timestamps
1631 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1632 (native-inputs
1633 `(("jdk" ,icedtea-7 "jdk")
1634 ("openjdk-src"
1635 ,(drop "openjdk"
1636 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1637 ("aarch32-drop"
1638 ,(drop "aarch32"
1639 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1640 ("corba-drop"
1641 ,(drop "corba"
1642 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1643 ("jaxp-drop"
1644 ,(drop "jaxp"
1645 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1646 ("jaxws-drop"
1647 ,(drop "jaxws"
1648 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1649 ("jdk-drop"
1650 ,(drop "jdk"
1651 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1652 ("langtools-drop"
1653 ,(drop "langtools"
1654 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1655 ("hotspot-drop"
1656 ,(origin
1657 (method url-fetch)
1658 (uri (string-append
1659 "http://icedtea.classpath.org/download/drops"
1660 "/icedtea8/" version "/hotspot.tar.xz"))
1661 (sha256
1662 (base32
1663 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1664 (patches (search-patches
1665 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1666 ("nashorn-drop"
1667 ,(drop "nashorn"
1668 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1669 ("shenandoah-drop"
1670 ,(drop "shenandoah"
1671 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1672 ,@(fold alist-delete (package-native-inputs icedtea-7)
1673 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1674 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1675
1676(define-public openjdk9
1677 (package
1678 (name "openjdk")
1679 (version "9.181")
1680 (source (origin
1681 (method url-fetch)
1682 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1683 (file-name (string-append name "-" version ".tar.bz2"))
1684 (sha256
1685 (base32
1686 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1687 (modules '((guix build utils)))
1688 (snippet
1689 `(begin
1690 (for-each delete-file (find-files "." ".*.bin$"))
1691 (for-each delete-file (find-files "." ".*.exe$"))
1692 (for-each delete-file (find-files "." ".*.jar$"))
1693 #t))))
1694 (build-system gnu-build-system)
1695 (outputs '("out" "jdk" "doc"))
1696 (arguments
1697 `(#:tests? #f; require jtreg
1698 #:imported-modules
1699 ((guix build syscalls)
1700 ,@%gnu-build-system-modules)
1701 #:phases
1702 (modify-phases %standard-phases
1703 (add-after 'patch-source-shebangs 'fix-java-shebangs
1704 (lambda _
1705 ;; This file was "fixed" by patch-source-shebangs, but it requires
1706 ;; this exact first line.
1707 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1708 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1709 #t))
1710 (replace 'configure
1711 (lambda* (#:key inputs outputs #:allow-other-keys)
1712 ;; TODO: unbundle libpng and lcms
1713 (invoke "bash" "./configure"
1714 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1715 "--disable-freetype-bundling"
1716 "--disable-warnings-as-errors"
1717 "--disable-hotspot-gtest"
1718 "--with-giflib=system"
1719 "--with-libjpeg=system"
1720 (string-append "--prefix=" (assoc-ref outputs "out")))
1721 #t))
1722 (replace 'build
1723 (lambda _
1724 (with-output-to-file ".src-rev"
1725 (lambda _
1726 (display ,version)))
1727 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1728 (invoke "make" "all")
1729 #t))
1730 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1731 ;; But that shared object is located in the server/ folder, so it
1732 ;; cannot be found. This phase creates a symbolic link in the
1733 ;; lib/ folder so that the other libraries can find it.
1734 ;;
1735 ;; See:
1736 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1737 ;;
1738 ;; FIXME: Find the bug in the build system, so that this symlink is
1739 ;; not needed.
1740 (add-after 'install 'install-libjvm
1741 (lambda* (#:key inputs outputs #:allow-other-keys)
1742 (let* ((lib-out (string-append (assoc-ref outputs "out")
1743 "/lib"))
1744 (lib-jdk (string-append (assoc-ref outputs "jdk")
1745 "/lib")))
1746 (symlink (string-append lib-jdk "/server/libjvm.so")
1747 (string-append lib-jdk "/libjvm.so"))
1748 (symlink (string-append lib-out "/server/libjvm.so")
1749 (string-append lib-out "/libjvm.so")))
1750 #t))
1751 (replace 'install
1752 (lambda* (#:key outputs #:allow-other-keys)
1753 (let ((out (assoc-ref outputs "out"))
1754 (jdk (assoc-ref outputs "jdk"))
1755 (doc (assoc-ref outputs "doc"))
1756 (images (car (find-files "build" ".*-server-release"
1757 #:directories? #t))))
1758 (copy-recursively (string-append images "/images/jdk") jdk)
1759 (copy-recursively (string-append images "/images/jre") out)
1760 (copy-recursively (string-append images "/images/docs") doc))
1761 #t))
1762 (add-after 'install 'strip-zip-timestamps
1763 (lambda* (#:key outputs #:allow-other-keys)
1764 (use-modules (guix build syscalls))
1765 (for-each (lambda (zip)
1766 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1767 (with-directory-excursion dir
1768 (invoke "unzip" zip))
1769 (delete-file zip)
1770 (for-each (lambda (file)
1771 (let ((s (lstat file)))
1772 (unless (eq? (stat:type s) 'symlink)
1773 (format #t "reset ~a~%" file)
1774 (utime file 0 0 0 0))))
1775 (find-files dir #:directories? #t))
1776 (with-directory-excursion dir
1777 (let ((files (find-files "." ".*" #:directories? #t)))
1778 (apply invoke "zip" "-0" "-X" zip files)))))
1779 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1780 #t)))))
1781 (inputs
1782 `(("alsa-lib" ,alsa-lib)
1783 ("cups" ,cups)
1784 ("fontconfig" ,fontconfig)
1785 ("freetype" ,freetype)
1786 ("giflib" ,giflib)
1787 ("lcms" ,lcms)
1788 ("libelf" ,libelf)
1789 ("libjpeg" ,libjpeg)
1790 ("libice" ,libice)
1791 ("libpng" ,libpng)
1792 ("libx11" ,libx11)
1793 ("libxcomposite" ,libxcomposite)
1794 ("libxi" ,libxi)
1795 ("libxinerama" ,libxinerama)
1796 ("libxrender" ,libxrender)
1797 ("libxt" ,libxt)
1798 ("libxtst" ,libxtst)))
1799 (native-inputs
1800 `(("icedtea-8" ,icedtea-8)
1801 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1802 ("unzip" ,unzip)
1803 ("which" ,which)
1804 ("zip" ,zip)))
1805 (home-page "https://openjdk.java.net/projects/jdk9/")
1806 (synopsis "Java development kit")
1807 (description
1808 "This package provides the Java development kit OpenJDK.")
1809 (license license:gpl2+)))
1810
1811(define-public openjdk10
1812 (package
1813 (inherit openjdk9)
1814 (name "openjdk")
1815 (version "10.46")
1816 (source (origin
1817 (method url-fetch)
1818 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1819 (file-name (string-append name "-" version ".tar.bz2"))
1820 (sha256
1821 (base32
1822 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1823 (modules '((guix build utils)))
1824 (snippet
1825 `(begin
1826 (for-each delete-file (find-files "." ".*.bin$"))
1827 (for-each delete-file (find-files "." ".*.exe$"))
1828 (for-each delete-file (find-files "." ".*.jar$"))
1829 #t))))
1830 (arguments
1831 (substitute-keyword-arguments (package-arguments openjdk9)
1832 ((#:phases phases)
1833 `(modify-phases ,phases
1834 (replace 'fix-java-shebangs
1835 (lambda _
1836 ;; This file was "fixed" by patch-source-shebangs, but it requires
1837 ;; this exact first line.
1838 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1839 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1840 #t))
1841 (replace 'configure
1842 (lambda* (#:key inputs outputs #:allow-other-keys)
1843 (invoke "bash" "./configure"
1844 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1845 "--disable-freetype-bundling"
1846 "--disable-warnings-as-errors"
1847 "--disable-hotspot-gtest"
1848 "--with-giflib=system"
1849 "--with-libjpeg=system"
1850 "--with-native-debug-symbols=zipped"
1851 (string-append "--prefix=" (assoc-ref outputs "out")))
1852 #t))))))
1853 (native-inputs
1854 `(("openjdk9" ,openjdk9)
1855 ("openjdk9:jdk" ,openjdk9 "jdk")
1856 ("unzip" ,unzip)
1857 ("which" ,which)
1858 ("zip" ,zip)))))
1859
1860(define-public icedtea icedtea-8)
1861
1862
1863(define-public ant/java8
1864 (package (inherit ant-bootstrap)
1865 (name "ant")
1866 (version "1.10.1")
1867 (source (origin
1868 (method url-fetch)
1869 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1870 version "-src.tar.gz"))
1871 (sha256
1872 (base32
1873 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1874 (modules '((guix build utils)))
1875 (snippet
1876 '(begin
1877 (for-each delete-file
1878 (find-files "lib/optional" "\\.jar$"))
1879 #t))))
1880 (arguments
1881 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1882 ((#:phases phases)
1883 `(modify-phases ,phases
1884 (add-after 'unpack 'remove-scripts
1885 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1886 ;; wrappers.
1887 (lambda _
1888 (for-each delete-file
1889 (find-files "src/script"
1890 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1891 #t))
1892 (replace 'build
1893 (lambda* (#:key inputs outputs #:allow-other-keys)
1894 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1895
1896 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1897 ;; Ant to build. This is necessary in addition to disabling the
1898 ;; "check" phase, because the dependency on "test-jar" would always
1899 ;; result in the tests to be run.
1900 (substitute* "build.xml"
1901 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1902 (invoke "bash" "bootstrap.sh"
1903 (string-append "-Ddist.dir="
1904 (assoc-ref outputs "out")))))))))
1905 (native-inputs
1906 `(("jdk" ,icedtea-8 "jdk")
1907 ("zip" ,zip)
1908 ("unzip" ,unzip)))))
1909
1910;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1911;; requires Java 8.
1912(define-public ant
1913 (package (inherit ant/java8)
1914 (version "1.9.9")
1915 (source (origin
1916 (method url-fetch)
1917 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1918 version "-src.tar.gz"))
1919 (sha256
1920 (base32
1921 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1922 (native-inputs
1923 `(("jdk" ,icedtea-7 "jdk")
1924 ("zip" ,zip)
1925 ("unzip" ,unzip)))))
1926
1927(define-public ant-apache-bcel
1928 (package
1929 (inherit ant/java8)
1930 (name "ant-apache-bcel")
1931 (arguments
1932 (substitute-keyword-arguments (package-arguments ant/java8)
1933 ((#:phases phases)
1934 `(modify-phases ,phases
1935 (add-after 'unpack 'link-bcel
1936 (lambda* (#:key inputs #:allow-other-keys)
1937 (for-each (lambda (file)
1938 (symlink file
1939 (string-append "lib/optional/"
1940 (basename file))))
1941 (find-files (assoc-ref inputs "java-commons-bcel")
1942 "\\.jar$"))
1943 #t))
1944 (add-after 'build 'install
1945 (lambda* (#:key outputs #:allow-other-keys)
1946 (let* ((out (assoc-ref outputs "out"))
1947 (share (string-append out "/share/java"))
1948 (bin (string-append out "/bin"))
1949 (lib (string-append out "/lib")))
1950 (mkdir-p share)
1951 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1952 (delete-file-recursively bin)
1953 (delete-file-recursively lib)
1954 #t)))))))
1955 (inputs
1956 `(("java-commons-bcel" ,java-commons-bcel)
1957 ,@(package-inputs ant/java8)))))
1958
1959(define-public ant-junit
1960 (package
1961 (inherit ant/java8)
1962 (name "ant-junit")
1963 (arguments
1964 (substitute-keyword-arguments (package-arguments ant/java8)
1965 ((#:phases phases)
1966 `(modify-phases ,phases
1967 (add-after 'unpack 'link-junit
1968 (lambda* (#:key inputs #:allow-other-keys)
1969 (for-each (lambda (file)
1970 (symlink file
1971 (string-append "lib/optional/"
1972 (basename file))))
1973 (find-files (assoc-ref inputs "java-junit")
1974 "\\.jar$"))
1975 #t))
1976 (add-after 'build 'install
1977 (lambda* (#:key outputs #:allow-other-keys)
1978 (let* ((out (assoc-ref outputs "out"))
1979 (share (string-append out "/share/java"))
1980 (bin (string-append out "/bin"))
1981 (lib (string-append out "/lib")))
1982 (mkdir-p share)
1983 (install-file (string-append lib "/ant-junit.jar") share)
1984 (delete-file-recursively bin)
1985 (delete-file-recursively lib)
1986 #t)))))))
1987 (inputs
1988 `(("java-junit" ,java-junit)
1989 ,@(package-inputs ant/java8)))))
1990
1991(define-public javacc-4
1992 (package
1993 (name "javacc")
1994 (version "4.1")
1995 (source (origin
1996 (method git-fetch)
1997 (uri (git-reference
1998 (url "https://github.com/javacc/javacc.git")
1999 (commit "release_41")))
2000 (file-name (string-append "javacc-" version "-checkout"))
2001 (sha256
2002 (base32
2003 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2004 (modules '((guix build utils)))
2005 ;; delete bundled jars
2006 (snippet '(begin (delete-file-recursively "lib") #t))))
2007 (build-system ant-build-system)
2008 ;; Tests fail with
2009 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2010 ;; JAVACODE failed
2011 (arguments
2012 `(#:tests? #f
2013 #:phases
2014 (modify-phases %standard-phases
2015 ;; Delete tests to avoid build failure (we don't run them anyway).
2016 (add-after 'unpack 'delete-tests
2017 (lambda _
2018 (for-each delete-file
2019 '("src/org/javacc/JavaCCTestCase.java"
2020 "src/org/javacc/parser/ExpansionTest.java"
2021 "src/org/javacc/parser/OptionsTest.java"
2022 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2023 (for-each delete-file-recursively
2024 '("src/org/javacc/parser/test"
2025 "src/org/javacc/jjdoc/test"))
2026 #t))
2027 (replace 'install (install-jars "bin/lib")))))
2028 (home-page "https://javacc.org/")
2029 (synopsis "Java parser generator")
2030 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2031generator for use with Java applications. A parser generator is a tool that
2032reads a grammar specification and converts it to a Java program that can
2033recognize matches to the grammar. In addition to the parser generator itself,
2034JavaCC provides other standard capabilities related to parser generation such
2035as tree building (via a tool called JJTree included with JavaCC), actions,
2036debugging, etc.")
2037 (license license:bsd-3)))
2038
2039(define-public javacc
2040 (package
2041 (inherit javacc-4)
2042 (version "7.0.3")
2043 (source (origin
2044 (method url-fetch)
2045 (uri (string-append "https://github.com/javacc/javacc/"
2046 "archive/" version ".tar.gz"))
2047 (file-name (string-append "javacc-" version ".tar.gz"))
2048 (sha256
2049 (base32
2050 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))
2051 (modules '((guix build utils)))
2052 ;; delete bundled jars
2053 (snippet '(begin (for-each delete-file-recursively
2054 '("bootstrap" "lib"))
2055 #t))))
2056 (arguments
2057 `(#:make-flags ; bootstrap from javacc-4
2058 (list (string-append "-Dbootstrap-jar="
2059 (assoc-ref %build-inputs "javacc")
2060 "/share/java/javacc.jar"))
2061 #:test-target "test"
2062 #:phases
2063 (modify-phases %standard-phases
2064 (replace 'install (install-jars "target")))))
2065 (native-inputs
2066 `(("javacc" ,javacc-4)))))
2067
2068;; This is the last 3.x release of ECJ
2069(define-public java-ecj-3
2070 (package
2071 (name "java-ecj")
2072 (version "3.8.2")
2073 (source (origin
2074 (method url-fetch)
2075 (uri (string-append "http://archive.eclipse.org/eclipse/"
2076 "downloads/drops/R-" version
2077 "-201301310800/ecjsrc-" version ".jar"))
2078 (sha256
2079 (base32
2080 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2081 (build-system ant-build-system)
2082 (arguments
2083 `(#:tests? #f ; none included
2084 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2085 #:make-flags (list "-f" "src/build.xml")
2086 #:build-target "build"
2087 #:phases
2088 (modify-phases %standard-phases
2089 (add-after 'unpack 'fix-manifest
2090 (lambda _
2091 ;; Record the main class to make ecj executable.
2092 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2093 (lambda (in out)
2094 (display "Manifest-Version: 1.0
2095Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2096 out)))
2097 #t))
2098 (replace 'install (install-jars ".")))))
2099 (home-page "https://eclipse.org")
2100 (synopsis "Eclipse Java development tools core batch compiler")
2101 (description "This package provides the Eclipse Java core batch compiler.")
2102 (license license:epl1.0)))
2103
2104;; This is needed for java-cisd-args4j
2105(define-public java-ecj-3.5
2106 (package (inherit java-ecj-3)
2107 (version "3.5.1")
2108 (source (origin
2109 (method url-fetch/zipbomb)
2110 (uri (string-append "http://archive.eclipse.org/eclipse/"
2111 "downloads/drops/R-" version
2112 "-200909170800/ecjsrc-" version ".zip"))
2113 (sha256
2114 (base32
2115 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2116 (build-system ant-build-system)
2117 (arguments
2118 `(#:tests? #f ; none included
2119 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2120 #:build-target "build"
2121 #:phases
2122 (modify-phases %standard-phases
2123 (add-after 'unpack 'fix-manifest
2124 (lambda _
2125 ;; Record the main class to make ecj executable.
2126 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2127 (lambda (in out)
2128 (dump-port in out)
2129 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2130 out)))
2131 #t))
2132 (replace 'install (install-jars ".")))))
2133 (native-inputs
2134 `(("unzip" ,unzip)))))
2135
2136(define-public java-cisd-base
2137 (let ((revision 38938)
2138 (base-version "14.12.0"))
2139 (package
2140 (name "java-cisd-base")
2141 (version (string-append base-version "-" (number->string revision)))
2142 (source (origin
2143 (method svn-fetch)
2144 (uri (svn-reference
2145 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2146 "base/tags/release/"
2147 (version-major+minor base-version)
2148 ".x/" base-version "/base/"))
2149 (revision revision)))
2150 (file-name (string-append "java-cisd-base-" version "-checkout"))
2151 (sha256
2152 (base32
2153 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2154 (modules '((guix build utils)))
2155 (snippet
2156 '(begin
2157 ;; Delete included gradle jar
2158 (delete-file-recursively "gradle/wrapper")
2159 ;; Delete pre-built native libraries
2160 (delete-file-recursively "libs")
2161 #t))))
2162 (build-system ant-build-system)
2163 (arguments
2164 `(#:make-flags '("-file" "build/build.xml")
2165 #:test-target "jar-test"
2166 #:jdk ,icedtea-8
2167 #:phases
2168 (modify-phases %standard-phases
2169 (add-after 'unpack 'unpack-build-resources
2170 (lambda* (#:key inputs #:allow-other-keys)
2171 (copy-recursively (assoc-ref inputs "build-resources")
2172 "../build_resources")
2173 #t))
2174 (add-after 'unpack-build-resources 'fix-dependencies
2175 (lambda* (#:key inputs #:allow-other-keys)
2176 (substitute* "build/build.xml"
2177 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2178 (string-append (assoc-ref inputs "java-testng")
2179 "/share/java/java-testng.jar"))
2180 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2181 (string-append (assoc-ref inputs "java-commons-lang")
2182 "/share/java/commons-lang-"
2183 ,(package-version java-commons-lang) ".jar"))
2184 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2185 (string-append (assoc-ref inputs "java-commons-io")
2186 "/share/java/commons-io-"
2187 ,(package-version java-commons-io)
2188 "-SNAPSHOT.jar"))
2189 ;; Remove dependency on svn
2190 (("<build-info.*") "")
2191 (("\\$\\{revision.number\\}")
2192 ,(number->string revision))
2193 (("\\$\\{version.number\\}") ,base-version))
2194 ;; Remove dependency on classycle
2195 (substitute* "../build_resources/ant/build-common.xml"
2196 (("<taskdef name=\"dependency-checker.*") "")
2197 (("classname=\"classycle.*") "")
2198 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2199 #t))
2200 ;; A few tests fail because of the lack of a proper /etc/groups and
2201 ;; /etc/passwd file in the build container.
2202 (add-after 'unpack 'disable-broken-tests
2203 (lambda _
2204 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2205 (("Unix.isOperational\\(\\)") "false"))
2206 #t))
2207 ;; These decorators are almost useless and pull in an unpackaged
2208 ;; dependency.
2209 (add-after 'unpack 'remove-useless-decorators
2210 (lambda _
2211 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2212 (("@Private") "")
2213 (("import ch.rinn.restrictions.Private;") ""))
2214 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2215 (("@Friend.*") "")
2216 (("import ch.rinn.restrictions.Friend;") ""))
2217 #t))
2218 (add-before 'configure 'build-native-code
2219 (lambda* (#:key inputs #:allow-other-keys)
2220 (let ((jdk (assoc-ref inputs "jdk"))
2221 (dir ,(match (%current-system)
2222 ("i686-linux"
2223 "i386-Linux")
2224 ((or "armhf-linux" "aarch64-linux")
2225 "arm-Linux")
2226 ((or "x86_64-linux")
2227 "amd64-Linux")
2228 (_ "unknown-Linux"))))
2229 (with-directory-excursion "source/c"
2230 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2231 (string-append "-I" jdk "/include")
2232 (string-append "-I" jdk "/include/linux")
2233 "-o" "libunix.so")
2234 (invoke "gcc" "-shared" "-O3" "-fPIC"
2235 "-DMACHINE_BYTE_ORDER=1"
2236 "copyCommon.c"
2237 "copyByteChar.c"
2238 "copyByteDouble.c"
2239 "copyByteFloat.c"
2240 "copyByteInt.c"
2241 "copyByteLong.c"
2242 "copyByteShort.c"
2243 (string-append "-I" jdk "/include")
2244 (string-append "-I" jdk "/include/linux")
2245 "-o" "libnativedata.so"))
2246 (install-file "source/c/libunix.so"
2247 (string-append "libs/native/unix/" dir))
2248 (install-file "source/c/libnativedata.so"
2249 (string-append "libs/native/nativedata/" dir))
2250 #t)))
2251 ;; In the "check" phase we only build the test executable.
2252 (add-after 'check 'run-tests
2253 (lambda _
2254 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2255 (delete-file "targets/dist/sis-base-test.jar")
2256 #t))
2257 (replace 'install (install-jars "targets/dist")))))
2258 (native-inputs
2259 `(("jdk" ,icedtea-8)
2260 ("java-commons-lang" ,java-commons-lang)
2261 ("java-commons-io" ,java-commons-io)
2262 ("java-testng" ,java-testng)
2263 ("build-resources"
2264 ,(origin
2265 (method svn-fetch)
2266 (uri (svn-reference
2267 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2268 "base/tags/release/"
2269 (version-major+minor base-version)
2270 ".x/" base-version
2271 "/build_resources/"))
2272 (revision revision)))
2273 (sha256
2274 (base32
2275 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2276 (home-page "http://svnsis.ethz.ch")
2277 (synopsis "Utility classes for libraries from ETH Zurich")
2278 (description "This library supplies some utility classes needed for
2279libraries from the SIS division at ETH Zurich like jHDF5.")
2280 ;; The C sources are under a non-copyleft license, which looks like a
2281 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2282 (license (list license:asl2.0
2283 (license:non-copyleft "file://source/c/COPYING"))))))
2284
2285(define-public java-cisd-args4j
2286 (let ((revision 39162)
2287 (base-version "9.11.2"))
2288 (package
2289 (name "java-cisd-args4j")
2290 (version (string-append base-version "-" (number->string revision)))
2291 (source (origin
2292 (method svn-fetch)
2293 (uri (svn-reference
2294 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2295 "args4j/tags/release/"
2296 (version-major+minor base-version)
2297 ".x/" base-version "/args4j/"))
2298 (revision revision)))
2299 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2300 (sha256
2301 (base32
2302 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2303 (build-system ant-build-system)
2304 (arguments
2305 `(#:make-flags '("-file" "build/build.xml")
2306 #:tests? #f ; there are no tests
2307 ;; There are weird build failures with JDK8, such as: "The type
2308 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2309 ;; referenced from required .class files"
2310 #:jdk ,icedtea-7
2311 #:modules ((guix build ant-build-system)
2312 (guix build utils)
2313 (guix build java-utils)
2314 (sxml simple)
2315 (sxml transform)
2316 (sxml xpath))
2317 #:phases
2318 (modify-phases %standard-phases
2319 (add-after 'unpack 'unpack-build-resources
2320 (lambda* (#:key inputs #:allow-other-keys)
2321 (mkdir-p "../build_resources")
2322 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2323 "-C" "../build_resources"
2324 "--strip-components=1")
2325 (mkdir-p "../build_resources/lib")
2326 #t))
2327 (add-after 'unpack-build-resources 'fix-dependencies
2328 (lambda* (#:key inputs #:allow-other-keys)
2329 ;; FIXME: There should be a more convenient abstraction for
2330 ;; editing XML files.
2331 (with-directory-excursion "../build_resources/ant/"
2332 (chmod "build-common.xml" #o664)
2333 (call-with-output-file "build-common.xml.new"
2334 (lambda (port)
2335 (sxml->xml
2336 (pre-post-order
2337 (with-input-from-file "build-common.xml"
2338 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2339 `(;; Remove dependency on classycle and custom ant tasks
2340 (taskdef . ,(lambda (tag . kids)
2341 (let ((name ((sxpath '(name *text*)) kids)))
2342 (if (or (member "build-info" name)
2343 (member "dependency-checker" name)
2344 (member "build-java-subprojects" name)
2345 (member "project-classpath" name))
2346 '() ; skip
2347 `(,tag ,@kids)))))
2348 (typedef . ,(lambda (tag . kids)
2349 (let ((name ((sxpath '(name *text*)) kids)))
2350 (if (member "recursive-jar" name)
2351 '() ; skip
2352 `(,tag ,@kids)))))
2353 (build-java-subprojects . ,(lambda _ '()))
2354 ;; Ignore everything else
2355 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2356 (*text* . ,(lambda (_ txt) txt))))
2357 port)))
2358 (rename-file "build-common.xml.new" "build-common.xml"))
2359 (substitute* "build/build.xml"
2360 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2361 (string-append (assoc-ref inputs "java-cisd-base")
2362 "/share/java/sis-base.jar"))
2363 ;; Remove dependency on svn
2364 (("<build-info.*") "")
2365 (("\\$\\{revision.number\\}")
2366 ,(number->string revision))
2367 (("\\$\\{version.number\\}") ,base-version)
2368 ;; Don't use custom ant tasks.
2369 (("recursive-jar") "jar")
2370 (("<project-classpath.*") ""))
2371 #t))
2372 (replace 'install (install-jars "targets/dist")))))
2373 (inputs
2374 `(("java-cisd-base" ,java-cisd-base)))
2375 (native-inputs
2376 `(("ecj" ,java-ecj-3.5)
2377 ("build-resources"
2378 ,(origin
2379 (method svn-fetch)
2380 (uri (svn-reference
2381 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2382 "args4j/tags/release/"
2383 (version-major+minor base-version)
2384 ".x/" base-version
2385 "/build_resources/"))
2386 (revision revision)))
2387 (sha256
2388 (base32
2389 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2390 (modules '((guix build utils)))
2391 ;; Delete bundled pre-built jars.
2392 (snippet
2393 '(begin (delete-file-recursively "lib/") #t))))))
2394 (home-page "http://svnsis.ethz.ch")
2395 (synopsis "Command line parser library")
2396 (description "This package provides a parser for command line arguments.")
2397 (license license:asl2.0))))
2398
2399(define-public java-cisd-jhdf5
2400 (let ((revision 39162)
2401 (base-version "14.12.6"))
2402 (package
2403 (name "java-cisd-jhdf5")
2404 (version (string-append base-version "-" (number->string revision)))
2405 (source (origin
2406 (method svn-fetch)
2407 (uri (svn-reference
2408 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2409 "jhdf5/tags/release/"
2410 (version-major+minor base-version)
2411 ".x/" base-version "/jhdf5/"))
2412 (revision revision)))
2413 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2414 (sha256
2415 (base32
2416 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2417 (modules '((guix build utils)))
2418 (snippet
2419 '(begin
2420 ;; Delete included gradle jar
2421 (delete-file-recursively "gradle/wrapper")
2422 ;; Delete pre-built native libraries
2423 (delete-file-recursively "libs")
2424 #t))))
2425 (build-system ant-build-system)
2426 (arguments
2427 `(#:make-flags '("-file" "build/build.xml")
2428 #:build-target "jar-all"
2429 #:test-target "jar-test"
2430 #:jdk ,icedtea-8
2431 #:phases
2432 (modify-phases %standard-phases
2433 ;; FIXME: this build phase fails.
2434 (delete 'generate-jar-indices)
2435 ;; Don't erase results from the build phase when building tests.
2436 (add-after 'unpack 'separate-test-target-from-clean
2437 (lambda _
2438 (substitute* "build/build.xml"
2439 (("\"jar-test\" depends=\"clean, ")
2440 "\"jar-test\" depends=\""))
2441 #t))
2442 (add-after 'unpack 'unpack-build-resources
2443 (lambda* (#:key inputs #:allow-other-keys)
2444 (copy-recursively (assoc-ref inputs "build-resources")
2445 "../build_resources")
2446 (delete-file-recursively "../build_resources/lib/")
2447 (mkdir-p "../build_resources/lib")
2448 ;; Remove dependency on classycle
2449 (substitute* "../build_resources/ant/build-common.xml"
2450 (("<taskdef name=\"dependency-checker.*") "")
2451 (("classname=\"classycle.*") "")
2452 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2453 ;; Remove dependency on svn
2454 (substitute* "build/build.xml"
2455 (("<build-info.*") "")
2456 (("\\$\\{revision.number\\}")
2457 ,(number->string revision))
2458 (("\\$\\{version.number\\}") ,base-version))
2459 #t))
2460 (add-after 'unpack-build-resources 'fix-dependencies
2461 (lambda* (#:key inputs #:allow-other-keys)
2462 (substitute* "../build_resources/ant/build-common.xml"
2463 (("../libraries/testng/testng-jdk15.jar")
2464 (string-append (assoc-ref inputs "java-testng")
2465 "/share/java/java-testng.jar")))
2466 (substitute* "build/build.xml"
2467 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2468 (string-append (assoc-ref inputs "java-cisd-base")
2469 "/share/java/sis-base.jar"))
2470 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2471 (string-append (assoc-ref inputs "java-cisd-args4j")
2472 "/share/java/cisd-args4j.jar"))
2473 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2474 (string-append (assoc-ref inputs "java-commons-lang")
2475 "/share/java/commons-lang-"
2476 ,(package-version java-commons-lang) ".jar"))
2477 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2478 (string-append (assoc-ref inputs "java-commons-io")
2479 "/share/java/commons-io-"
2480 ,(package-version java-commons-io)
2481 "-SNAPSHOT.jar"))
2482 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2483 (string-append (assoc-ref inputs "java-testng")
2484 "/share/java/java-testng.jar"))
2485 (("\\$\\{lib\\}/junit4/junit.jar")
2486 (string-append (assoc-ref inputs "java-junit")
2487 "/share/java/junit.jar"))
2488 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2489 (string-append (assoc-ref inputs "java-hamcrest-core")
2490 "/share/java/hamcrest-core.jar")))
2491 ;; Remove dependency on ch.rinn.restrictions
2492 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2493 (substitute* '("BitSetConversionUtils.java"
2494 "HDF5Utils.java")
2495 (("import ch.rinn.restrictions.Private;") "")
2496 (("@Private") "")))
2497 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2498 (substitute* '("BitSetConversionTest.java"
2499 "h5ar/HDF5ArchiverTest.java")
2500 (("import ch.rinn.restrictions.Friend;") "")
2501 (("@Friend.*") ""))
2502 ;; Remove leftovers from removing @Friend
2503 (substitute* "h5ar/HDF5ArchiverTest.java"
2504 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2505 "")))
2506 #t))
2507 (add-before 'configure 'build-native-library
2508 (lambda* (#:key inputs #:allow-other-keys)
2509 (let ((jdk (assoc-ref inputs "jdk"))
2510 (hdf5 (assoc-ref inputs "hdf5"))
2511 (dir ,(match (%current-system)
2512 ("i686-linux"
2513 "i386-Linux")
2514 ((or "armhf-linux" "aarch64-linux")
2515 "arm-Linux")
2516 ((or "x86_64-linux")
2517 "amd64-Linux")
2518 (_ "unknown-Linux"))))
2519 (with-directory-excursion "source/c"
2520 (apply invoke `("gcc" "-shared" "-O3"
2521 "-fPIC"
2522 "-Wl,--exclude-libs,ALL"
2523 ,@(find-files "jhdf5" "\\.c$")
2524 ,@(find-files "hdf-java" "\\.c$")
2525 ,(string-append "-I" hdf5 "/include")
2526 ,(string-append "-I" jdk "/include")
2527 ,(string-append "-I" jdk "/include/linux")
2528 ,(string-append hdf5 "/lib/libhdf5.a")
2529 "-o" "libjhdf5.so" "-lz")))
2530 (install-file "source/c/libjhdf5.so"
2531 (string-append "libs/native/jhdf5/" dir))
2532 #t)))
2533 ;; In the "check" phase we only build the test executable.
2534 (add-after 'check 'run-tests
2535 (lambda _
2536 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2537 (delete-file "targets/dist/sis-jhdf5-test.jar")
2538 #t))
2539 (replace 'install
2540 (install-jars "targets/dist")))))
2541 (inputs
2542 `(("java-cisd-base" ,java-cisd-base)
2543 ("java-cisd-args4j" ,java-cisd-args4j)
2544 ("java-commons-lang" ,java-commons-lang)
2545 ("java-commons-io" ,java-commons-io)
2546 ("hdf5" ,hdf5)
2547 ("zlib" ,zlib)))
2548 (native-inputs
2549 `(("jdk" ,icedtea-8)
2550 ("java-testng" ,java-testng)
2551 ("java-junit" ,java-junit)
2552 ("java-jmock" ,java-jmock)
2553 ("java-hamcrest-core" ,java-hamcrest-core)
2554 ("build-resources"
2555 ,(origin
2556 (method svn-fetch)
2557 (uri (svn-reference
2558 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2559 "jhdf5/tags/release/"
2560 (version-major+minor base-version)
2561 ".x/" base-version
2562 "/build_resources/"))
2563 (revision revision)))
2564 (sha256
2565 (base32
2566 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2567 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2568 (synopsis "Java binding for HDF5")
2569 (description "JHDF5 is a high-level API in Java for reading and writing
2570HDF5 files, building on the libraries provided by the HDF Group.")
2571 ;; The C sources are under a non-copyleft license, which looks like a
2572 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2573 (license (list license:asl2.0
2574 (license:non-copyleft "file://source/c/COPYING"))))))
2575
2576(define-public java-classpathx-servletapi
2577 (package
2578 (name "java-classpathx-servletapi")
2579 (version "3.0.1")
2580 (source (origin
2581 (method url-fetch)
2582 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2583 "servletapi-" version ".tar.gz"))
2584 (sha256
2585 (base32
2586 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2587 (build-system ant-build-system)
2588 (arguments
2589 `(#:tests? #f ; there is no test target
2590 #:build-target "compile"
2591 #:make-flags
2592 (list "-Dbuild.compiler=javac1.8"
2593 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2594 #:phases
2595 (modify-phases %standard-phases
2596 (replace 'install
2597 (lambda* (#:key make-flags #:allow-other-keys)
2598 (apply invoke `("ant" "dist" ,@make-flags)))))))
2599 (home-page "https://www.gnu.org/software/classpathx/")
2600 (synopsis "Java servlet API implementation")
2601 (description "This is the GNU servlet API distribution, part of the
2602ClasspathX project. It provides implementations of version 3.0 of the servlet
2603API and version 2.1 of the Java ServerPages API.")
2604 (license license:gpl3+)))
2605
2606(define-public java-javaee-servletapi
2607 (package
2608 (name "java-javaee-servletapi")
2609 (version "3.1.0")
2610 (source (origin
2611 (method url-fetch)
2612 (uri (string-append "https://github.com/javaee/servlet-spec/"
2613 "archive/" version ".zip"))
2614 (file-name (string-append name "-" version ".zip"))
2615 (sha256
2616 (base32
2617 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
2618 (build-system ant-build-system)
2619 (arguments
2620 `(#:jar-name "javax-servletapi.jar"
2621 ;; no tests
2622 #:tests? #f
2623 #:source-dir "src/main/java"))
2624 (native-inputs
2625 `(("unzip" ,unzip)))
2626 (home-page "https://javaee.github.io/servlet-spec/")
2627 (synopsis "Java servlet API")
2628 (description "Java Servlet is the foundation web specification in the
2629Java Enterprise Platform. Developers can build web applications using the
2630Servlet API to interact with the request/response workflow. This project
2631provides information on the continued development of the Java Servlet
2632specification.")
2633 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
2634 ;; Some files are licensed under ASL 2.0.
2635 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
2636
2637(define-public java-swt
2638 (package
2639 (name "java-swt")
2640 (version "4.7.1a")
2641 (source
2642 ;; The types of many variables and procedures differ in the sources
2643 ;; dependent on whether the target architecture is a 32-bit system or a
2644 ;; 64-bit system. Instead of patching the sources on demand in a build
2645 ;; phase we download either the 32-bit archive (which mostly uses "int"
2646 ;; types) or the 64-bit archive (which mostly uses "long" types).
2647 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2648 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2649 (file32 "x86")
2650 (file64 "x86_64"))
2651 (let-values (((hash file)
2652 (match (or (%current-target-system) (%current-system))
2653 ("x86_64-linux" (values hash64 file64))
2654 (_ (values hash32 file32)))))
2655 (origin
2656 (method url-fetch)
2657 (uri (string-append
2658 "http://download.eclipse.org/eclipse/downloads/drops4/"
2659 "R-" version "-201710090410/swt-" version
2660 "-gtk-linux-" file ".zip"))
2661 (sha256 (base32 hash))))))
2662 (build-system ant-build-system)
2663 (arguments
2664 `(#:jar-name "swt.jar"
2665 #:jdk ,icedtea-8
2666 #:tests? #f ; no "check" target
2667 #:phases
2668 (modify-phases %standard-phases
2669 (replace 'unpack
2670 (lambda* (#:key source #:allow-other-keys)
2671 (mkdir "swt")
2672 (invoke "unzip" source "-d" "swt")
2673 (chdir "swt")
2674 (mkdir "src")
2675 (invoke "unzip" "src.zip" "-d" "src")))
2676 ;; The classpath contains invalid icecat jars. Since we don't need
2677 ;; anything other than the JDK on the classpath, we can simply unset
2678 ;; it.
2679 (add-after 'configure 'unset-classpath
2680 (lambda _ (unsetenv "CLASSPATH") #t))
2681 (add-before 'build 'build-native
2682 (lambda* (#:key inputs outputs #:allow-other-keys)
2683 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2684 ;; Build shared libraries. Users of SWT have to set the system
2685 ;; property swt.library.path to the "lib" directory of this
2686 ;; package output.
2687 (mkdir-p lib)
2688 (setenv "OUTPUT_DIR" lib)
2689 (with-directory-excursion "src"
2690 (invoke "bash" "build.sh")))))
2691 (add-after 'install 'install-native
2692 (lambda* (#:key outputs #:allow-other-keys)
2693 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2694 (for-each (lambda (file)
2695 (install-file file lib))
2696 (find-files "." "\\.so$"))
2697 #t))))))
2698 (inputs
2699 `(("gtk" ,gtk+-2)
2700 ("libxtst" ,libxtst)
2701 ("libxt" ,libxt)
2702 ("mesa" ,mesa)
2703 ("glu" ,glu)))
2704 (native-inputs
2705 `(("pkg-config" ,pkg-config)
2706 ("unzip" ,unzip)))
2707 (home-page "https://www.eclipse.org/swt/")
2708 (synopsis "Widget toolkit for Java")
2709 (description
2710 "SWT is a widget toolkit for Java designed to provide efficient, portable
2711access to the user-interface facilities of the operating systems on which it
2712is implemented.")
2713 ;; SWT code is licensed under EPL1.0
2714 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2715 ;; Cairo bindings contain code under MPL1.1
2716 ;; XULRunner 1.9 bindings contain code under MPL2.0
2717 (license (list
2718 license:epl1.0
2719 license:mpl1.1
2720 license:mpl2.0
2721 license:lgpl2.1+))))
2722
2723(define-public java-xz
2724 (package
2725 (name "java-xz")
2726 (version "1.6")
2727 (source (origin
2728 (method url-fetch)
2729 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2730 (sha256
2731 (base32
2732 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2733 (build-system ant-build-system)
2734 (arguments
2735 `(#:tests? #f ; There are no tests to run.
2736 #:jar-name ,(string-append "xz-" version ".jar")
2737 #:phases
2738 (modify-phases %standard-phases
2739 ;; The unpack phase enters the "maven" directory by accident.
2740 (add-after 'unpack 'chdir
2741 (lambda _ (chdir "..") #t)))))
2742 (native-inputs
2743 `(("unzip" ,unzip)))
2744 (home-page "https://tukaani.org/xz/java.html")
2745 (synopsis "Implementation of XZ data compression in pure Java")
2746 (description "This library aims to be a complete implementation of XZ data
2747compression in pure Java. Single-threaded streamed compression and
2748decompression and random access decompression have been fully implemented.")
2749 (license license:public-domain)))
2750
2751;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2752;; of the latest release.
2753(define-public java-qdox-1.12
2754 (package
2755 (name "java-qdox")
2756 (version "1.12.1")
2757 (source (origin
2758 (method url-fetch)
2759 (uri (string-append "http://central.maven.org/maven2/"
2760 "com/thoughtworks/qdox/qdox/" version
2761 "/qdox-" version "-sources.jar"))
2762 (sha256
2763 (base32
2764 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2765 (build-system ant-build-system)
2766 (arguments
2767 `(;; Tests require junit
2768 #:tests? #f
2769 #:jar-name "qdox.jar"
2770 #:phases
2771 (modify-phases %standard-phases
2772 (replace 'unpack
2773 (lambda* (#:key source #:allow-other-keys)
2774 (mkdir "src")
2775 (with-directory-excursion "src"
2776 (invoke "jar" "-xf" source))))
2777 ;; At this point we don't have junit, so we must remove the API
2778 ;; tests.
2779 (add-after 'unpack 'delete-tests
2780 (lambda _
2781 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2782 #t)))))
2783 (home-page "http://qdox.codehaus.org/")
2784 (synopsis "Parse definitions from Java source files")
2785 (description
2786 "QDox is a high speed, small footprint parser for extracting
2787class/interface/method definitions from source files complete with JavaDoc
2788@code{@@tags}. It is designed to be used by active code generators or
2789documentation tools.")
2790 (license license:asl2.0)))
2791
2792(define-public java-jarjar
2793 (package
2794 (name "java-jarjar")
2795 (version "1.4")
2796 (source (origin
2797 (method url-fetch)
2798 (uri (string-append
2799 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2800 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2801 (sha256
2802 (base32
2803 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
2804 (modules '((guix build utils)))
2805 (snippet
2806 '(begin
2807 ;; Delete bundled thirds-party jar archives.
2808 ;; TODO: unbundle maven-plugin-api.
2809 (delete-file "lib/asm-4.0.jar")
2810 (delete-file "lib/asm-commons-4.0.jar")
2811 (delete-file "lib/junit-4.8.1.jar")
2812 #t))))
2813 (build-system ant-build-system)
2814 (arguments
2815 `(;; Tests require junit, which ultimately depends on this package.
2816 #:tests? #f
2817 #:build-target "jar"
2818 #:phases
2819 (modify-phases %standard-phases
2820 (add-before 'build 'do-not-use-bundled-asm
2821 (lambda* (#:key inputs #:allow-other-keys)
2822 (substitute* "build.xml"
2823 (("<path id=\"path.build\">")
2824 (string-append "<path id=\"path.build\"><fileset dir=\""
2825 (assoc-ref inputs "java-asm-bootstrap")
2826 "/share/java\" includes=\"**/*.jar\"/>"))
2827 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
2828 (("lib/asm-commons-4.0.jar")
2829 (string-append (assoc-ref inputs "java-asm-bootstrap")
2830 "/share/java/asm-6.0.jar"))
2831 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
2832 (string-append "<include name=\"org/objectweb/asm/"
2833 "commons/Remap*.class\"/>"
2834 "<include name=\"org/objectweb/asm/*.class\"/>"
2835 "<include name=\"org/objectweb/asm/"
2836 "signature/*.class\"/>"
2837 "<include name=\"org/objectweb/asm/"
2838 "commons/SignatureRemapper.class\"/>")))
2839 #t))
2840 (replace 'install
2841 (lambda* (#:key outputs #:allow-other-keys)
2842 (let ((target (string-append (assoc-ref outputs "out")
2843 "/share/java")))
2844 (install-file (string-append "dist/jarjar-" ,version ".jar")
2845 target))
2846 #t)))))
2847 (inputs
2848 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
2849 (native-inputs
2850 `(("unzip" ,unzip)))
2851 (home-page "https://code.google.com/archive/p/jarjar/")
2852 (synopsis "Repackage Java libraries")
2853 (description
2854 "Jar Jar Links is a utility that makes it easy to repackage Java
2855libraries and embed them into your own distribution. Jar Jar Links includes
2856an Ant task that extends the built-in @code{jar} task.")
2857 (license license:asl2.0)))
2858
2859(define-public java-hamcrest-core
2860 (package
2861 (name "java-hamcrest-core")
2862 (version "1.3")
2863 (source (origin
2864 (method url-fetch)
2865 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2866 "archive/hamcrest-java-" version ".tar.gz"))
2867 (sha256
2868 (base32
2869 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2870 (modules '((guix build utils)))
2871 (snippet
2872 '(begin
2873 ;; Delete bundled thirds-party jar archives.
2874 (delete-file-recursively "lib")
2875 #t))))
2876 (build-system ant-build-system)
2877 (arguments
2878 `(#:tests? #f ; Tests require junit
2879 #:modules ((guix build ant-build-system)
2880 (guix build utils)
2881 (srfi srfi-1))
2882 #:make-flags (list (string-append "-Dversion=" ,version))
2883 #:test-target "unit-test"
2884 #:build-target "core"
2885 #:phases
2886 (modify-phases %standard-phases
2887 ;; Disable unit tests, because they require junit, which requires
2888 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2889 ;; attribute from the manifest for reproducibility.
2890 (add-before 'configure 'patch-build.xml
2891 (lambda _
2892 (substitute* "build.xml"
2893 (("unit-test, ") "")
2894 (("\\$\\{build.timestamp\\}") "guix"))
2895 #t))
2896 ;; Java's "getMethods()" returns methods in an unpredictable order.
2897 ;; To make the output of the generated code deterministic we must
2898 ;; sort the array of methods.
2899 (add-after 'unpack 'make-method-order-deterministic
2900 (lambda _
2901 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2902 (("import java\\.util\\.Iterator;" line)
2903 (string-append line "\n"
2904 "import java.util.Arrays; import java.util.Comparator;"))
2905 (("allMethods = cls\\.getMethods\\(\\);" line)
2906 (string-append "_" line
2907 "
2908private Method[] getSortedMethods() {
2909 Arrays.sort(_allMethods, new Comparator<Method>() {
2910 @Override
2911 public int compare(Method a, Method b) {
2912 return a.toString().compareTo(b.toString());
2913 }
2914 });
2915 return _allMethods;
2916}
2917
2918private Method[] allMethods = getSortedMethods();")))
2919 #t))
2920 (add-before 'build 'do-not-use-bundled-qdox
2921 (lambda* (#:key inputs #:allow-other-keys)
2922 (substitute* "build.xml"
2923 (("lib/generator/qdox-1.12.jar")
2924 (string-append (assoc-ref inputs "java-qdox-1.12")
2925 "/share/java/qdox.jar")))
2926 #t))
2927 ;; build.xml searches for .jar files in this directoy, which
2928 ;; we remove from the source archive.
2929 (add-before 'build 'create-dummy-directories
2930 (lambda _
2931 (mkdir-p "lib/integration")
2932 #t))
2933 (replace 'install
2934 (lambda* (#:key outputs #:allow-other-keys)
2935 (let* ((target (string-append (assoc-ref outputs "out")
2936 "/share/java/"))
2937 (version-suffix ,(string-append "-" version ".jar"))
2938 (install-without-version-suffix
2939 (lambda (jar)
2940 (copy-file jar
2941 (string-append target
2942 (basename jar version-suffix)
2943 ".jar")))))
2944 (mkdir-p target)
2945 (for-each
2946 install-without-version-suffix
2947 (find-files "build"
2948 (lambda (name _)
2949 (and (string-suffix? ".jar" name)
2950 (not (string-suffix? "-sources.jar" name)))))))
2951 #t)))))
2952 (native-inputs
2953 `(("java-qdox-1.12" ,java-qdox-1.12)
2954 ("java-jarjar" ,java-jarjar)))
2955 (home-page "http://hamcrest.org/")
2956 (synopsis "Library of matchers for building test expressions")
2957 (description
2958 "This package provides a library of matcher objects (also known as
2959constraints or predicates) allowing @code{match} rules to be defined
2960declaratively, to be used in other frameworks. Typical scenarios include
2961testing frameworks, mocking libraries and UI validation rules.")
2962 (license license:bsd-2)))
2963
2964(define-public java-junit
2965 (package
2966 (name "java-junit")
2967 (version "4.12")
2968 (source (origin
2969 (method url-fetch)
2970 (uri (string-append "https://github.com/junit-team/junit/"
2971 "archive/r" version ".tar.gz"))
2972 (file-name (string-append name "-" version ".tar.gz"))
2973 (sha256
2974 (base32
2975 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2976 (modules '((guix build utils)))
2977 (snippet
2978 '(begin
2979 ;; Delete bundled jar archives.
2980 (delete-file-recursively "lib")
2981 #t))))
2982 (build-system ant-build-system)
2983 (arguments
2984 `(#:tests? #f ; no tests
2985 #:jar-name "junit.jar"))
2986 (inputs
2987 `(("java-hamcrest-core" ,java-hamcrest-core)))
2988 (home-page "http://junit.org/")
2989 (synopsis "Test framework for Java")
2990 (description
2991 "JUnit is a simple framework to write repeatable tests for Java projects.
2992JUnit provides assertions for testing expected results, test fixtures for
2993sharing common test data, and test runners for running tests.")
2994 (license license:epl1.0)))
2995
2996(define-public java-plexus-utils
2997 (package
2998 (name "java-plexus-utils")
2999 (version "3.0.24")
3000 (source (origin
3001 (method url-fetch)
3002 (uri (string-append "https://github.com/codehaus-plexus/"
3003 "plexus-utils/archive/plexus-utils-"
3004 version ".tar.gz"))
3005 (sha256
3006 (base32
3007 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
3008 (build-system ant-build-system)
3009 ;; FIXME: The default build.xml does not include a target to install
3010 ;; javadoc files.
3011 (arguments
3012 `(#:jar-name "plexus-utils.jar"
3013 #:source-dir "src/main"
3014 #:phases
3015 (modify-phases %standard-phases
3016 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3017 (lambda _
3018 (substitute* "src/main/java/org/codehaus/plexus/util/\
3019cli/shell/BourneShell.java"
3020 (("/bin/sh") (which "sh"))
3021 (("/usr/") (getcwd)))
3022 #t))
3023 (add-after 'unpack 'fix-or-disable-broken-tests
3024 (lambda _
3025 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3026 (substitute* '("cli/CommandlineTest.java"
3027 "cli/shell/BourneShellTest.java")
3028 (("/bin/sh") (which "sh"))
3029 (("/bin/echo") (which "echo")))
3030
3031 ;; This test depends on MavenProjectStub, but we don't have
3032 ;; a package for Maven.
3033 (delete-file "introspection/ReflectionValueExtractorTest.java")
3034
3035 ;; FIXME: The command line tests fail, maybe because they use
3036 ;; absolute paths.
3037 (delete-file "cli/CommandlineTest.java"))
3038 #t)))))
3039 (native-inputs
3040 `(("java-junit" ,java-junit)))
3041 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3042 (synopsis "Common utilities for the Plexus framework")
3043 (description "This package provides various Java utility classes for the
3044Plexus framework to ease working with strings, files, command lines, XML and
3045more.")
3046 (license license:asl2.0)))
3047
3048(define-public java-plexus-interpolation
3049 (package
3050 (name "java-plexus-interpolation")
3051 (version "1.23")
3052 (source (origin
3053 (method url-fetch)
3054 (uri (string-append "https://github.com/codehaus-plexus/"
3055 "plexus-interpolation/archive/"
3056 "plexus-interpolation-" version ".tar.gz"))
3057 (sha256
3058 (base32
3059 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3060 (build-system ant-build-system)
3061 (arguments
3062 `(#:jar-name "plexus-interpolation.jar"
3063 #:source-dir "src/main"))
3064 (native-inputs
3065 `(("java-junit" ,java-junit)
3066 ("java-hamcrest-core" ,java-hamcrest-core)))
3067 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3068 (synopsis "Java components for interpolating ${} strings and the like")
3069 (description "Plexus interpolator is a modular, flexible interpolation
3070framework for the expression language style commonly seen in Maven, Plexus,
3071and other related projects.
3072
3073It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3074package within @code{plexus-utils}, but has been separated in order to allow
3075these two libraries to vary independently of one another.")
3076 (license license:asl2.0)))
3077
3078(define-public java-plexus-classworlds
3079 (package
3080 (name "java-plexus-classworlds")
3081 (version "2.5.2")
3082 (source (origin
3083 (method url-fetch)
3084 (uri (string-append "https://github.com/codehaus-plexus/"
3085 "plexus-classworlds/archive/plexus-classworlds-"
3086 version ".tar.gz"))
3087 (sha256
3088 (base32
3089 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3090 (build-system ant-build-system)
3091 (arguments
3092 `(#:jar-name "plexus-classworlds.jar"
3093 #:source-dir "src/main"
3094 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3095 (native-inputs
3096 `(("java-junit" ,java-junit)))
3097 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3098 (synopsis "Java class loader framework")
3099 (description "Plexus classworlds replaces the native @code{ClassLoader}
3100mechanism of Java. It is especially useful for dynamic loading of application
3101components.")
3102 (license license:asl2.0)))
3103
3104(define java-plexus-container-default-bootstrap
3105 (package
3106 (name "java-plexus-container-default-bootstrap")
3107 (version "1.7.1")
3108 (source (origin
3109 (method url-fetch)
3110 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3111 "/archive/plexus-containers-" version ".tar.gz"))
3112 (sha256
3113 (base32
3114 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3115 (build-system ant-build-system)
3116 (arguments
3117 `(#:jar-name "container-default.jar"
3118 #:source-dir "plexus-container-default/src/main/java"
3119 #:test-dir "plexus-container-default/src/test"
3120 #:jdk ,icedtea-8
3121 #:tests? #f; requires plexus-archiver, which depends on this package
3122 #:phases
3123 (modify-phases %standard-phases
3124 (add-before 'build 'copy-resources
3125 (lambda _
3126 (copy-recursively
3127 "plexus-container-default/src/main/resources/"
3128 "build/classes")
3129 #t)))))
3130 (inputs
3131 `(("worldclass" ,java-plexus-classworlds)
3132 ("xbean" ,java-geronimo-xbean-reflect)
3133 ("utils" ,java-plexus-utils)
3134 ("junit" ,java-junit)
3135 ("guava" ,java-guava)))
3136 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3137 (synopsis "Inversion-of-control container")
3138 (description "Plexus-default-container is Plexus' inversion-of-control
3139(@dfn{IoC}) container. It is composed of its public API and its default
3140implementation.")
3141 (license license:asl2.0)))
3142
3143(define-public java-plexus-io
3144 (package
3145 (name "java-plexus-io")
3146 (version "3.0.0")
3147 (source (origin
3148 (method url-fetch)
3149 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3150 "/archive/plexus-io-" version ".tar.gz"))
3151 (sha256
3152 (base32
3153 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3154 (build-system ant-build-system)
3155 (arguments
3156 `(#:jar-name "plexus-io.jar"
3157 #:source-dir "src/main/java"
3158 #:test-dir "src/test"
3159 #:jdk ,icedtea-8
3160 #:phases
3161 (modify-phases %standard-phases
3162 (add-before 'build 'copy-resources
3163 (lambda _
3164 (mkdir-p "build/classes/META-INF/plexus")
3165 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3166 "build/classes/META-INF/plexus/components.xml")
3167 #t)))))
3168 (inputs
3169 `(("utils" ,java-plexus-utils)
3170 ("commons-io" ,java-commons-io)
3171 ("java-jsr305" ,java-jsr305)))
3172 (native-inputs
3173 `(("junit" ,java-junit)
3174 ("hamcrest" ,java-hamcrest-core)
3175 ("guava" ,java-guava)
3176 ("classworlds" ,java-plexus-classworlds)
3177 ("xbean" ,java-geronimo-xbean-reflect)
3178 ("container-default" ,java-plexus-container-default-bootstrap)))
3179 (home-page "https://github.com/codehaus-plexus/plexus-io")
3180 (synopsis "I/O plexus components")
3181 (description "Plexus IO is a set of plexus components, which are designed
3182for use in I/O operations. This implementation using plexus components allows
3183reusing it in maven.")
3184 (license license:asl2.0)))
3185
3186(define-public java-plexus-archiver
3187 (package
3188 (name "java-plexus-archiver")
3189 (version "3.5")
3190 (source (origin
3191 (method url-fetch)
3192 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3193 "/archive/plexus-archiver-" version ".tar.gz"))
3194 (sha256
3195 (base32
3196 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
3197 (build-system ant-build-system)
3198 (arguments
3199 `(#:jar-name "plexus-archiver.jar"
3200 #:source-dir "src/main/java"
3201 #:jdk ,icedtea-8
3202 #:test-dir "src/test"
3203 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3204 #:phases
3205 (modify-phases %standard-phases
3206 (add-before 'check 'remove-failing
3207 (lambda _
3208 ;; Requires an older version of plexus container
3209 (delete-file
3210 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3211 #t))
3212 (add-before 'build 'copy-resources
3213 (lambda _
3214 (mkdir-p "build/classes/META-INF/plexus")
3215 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3216 "build/classes/META-INF/plexus/components.xml")
3217 #t)))))
3218 (inputs
3219 `(("utils" ,java-plexus-utils)
3220 ("commons-io" ,java-commons-io)
3221 ("snappy" ,java-iq80-snappy)
3222 ("io" ,java-plexus-io)
3223 ("compress" ,java-commons-compress)
3224 ("container-default" ,java-plexus-container-default-bootstrap)
3225 ("snappy" ,java-snappy)
3226 ("java-jsr305" ,java-jsr305)))
3227 (native-inputs
3228 `(("junit" ,java-junit)
3229 ("classworld" ,java-plexus-classworlds)
3230 ("xbean" ,java-geronimo-xbean-reflect)
3231 ("xz" ,java-tukaani-xz)
3232 ("guava" ,java-guava)))
3233 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3234 (synopsis "Archiver component of the Plexus project")
3235 (description "Plexus-archiver contains a component to deal with project
3236archives (jar).")
3237 (license license:asl2.0)))
3238
3239(define-public java-plexus-container-default
3240 (package
3241 (inherit java-plexus-container-default-bootstrap)
3242 (name "java-plexus-container-default")
3243 (arguments
3244 `(#:jar-name "container-default.jar"
3245 #:source-dir "plexus-container-default/src/main/java"
3246 #:test-dir "plexus-container-default/src/test"
3247 #:test-exclude (list ;"**/*Test.java"
3248 "**/Abstract*.java"
3249 ;; Requires plexus-hierarchy
3250 "**/PlexusHierarchyTest.java"
3251 ;; Failures
3252 "**/ComponentRealmCompositionTest.java"
3253 "**/PlexusContainerTest.java")
3254 #:jdk ,icedtea-8
3255 #:phases
3256 (modify-phases %standard-phases
3257 (add-before 'build 'copy-resources
3258 (lambda _
3259 (copy-recursively
3260 "plexus-container-default/src/main/resources/"
3261 "build/classes")
3262 #t))
3263 (add-before 'check 'fix-paths
3264 (lambda _
3265 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3266 (substitute*
3267 (string-append
3268 dir "/plexus/component/composition/"
3269 "ComponentRealmCompositionTest.java")
3270 (("src/test") "plexus-container-default/src/test"))
3271 #t))))))
3272 (inputs
3273 `(("worldclass" ,java-plexus-classworlds)
3274 ("xbean" ,java-geronimo-xbean-reflect)
3275 ("utils" ,java-plexus-utils)
3276 ("junit" ,java-junit)
3277 ("guava" ,java-guava)))
3278 (native-inputs
3279 `(("archiver" ,java-plexus-archiver)
3280 ("hamcrest" ,java-hamcrest-core)))))
3281
3282(define-public java-plexus-component-annotations
3283 (package
3284 (inherit java-plexus-container-default)
3285 (name "java-plexus-component-annotations")
3286 (arguments
3287 `(#:jar-name "plexus-component-annotations.jar"
3288 #:source-dir "plexus-component-annotations/src/main/java"
3289 #:tests? #f)); no tests
3290 (inputs '())
3291 (native-inputs '())
3292 (synopsis "Plexus descriptors generator")
3293 (description "This package is a Maven plugin to generate Plexus descriptors
3294from source tags and class annotations.")))
3295
3296(define-public java-plexus-cipher
3297 (package
3298 (name "java-plexus-cipher")
3299 (version "1.7")
3300 (source (origin
3301 (method url-fetch)
3302 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3303 "/archive/plexus-cipher-" version ".tar.gz"))
3304 (sha256
3305 (base32
3306 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3307 (build-system ant-build-system)
3308 (arguments
3309 `(#:jar-name "plexus-cipher.jar"
3310 #:source-dir "src/main/java"
3311 #:jdk ,icedtea-8
3312 #:tests? #f; FIXME: requires sisu-inject-bean
3313 #:phases
3314 (modify-phases %standard-phases
3315 (add-before 'build 'copy-resources
3316 (lambda _
3317 (copy-recursively "src/main/resources" "build/classes")
3318 (mkdir-p "build/classes/META-INF/sisu")
3319 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3320 (lambda _
3321 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3322 #t)))))
3323 (inputs
3324 `(("java-cdi-api" ,java-cdi-api)
3325 ("java-javax-inject" ,java-javax-inject)))
3326 (home-page "https://github.com/sonatype/plexus-cipher")
3327 (synopsis "Encryption/decryption Component")
3328 (description "Plexus-cipher contains a component to deal with encryption
3329and decryption.")
3330 (license license:asl2.0)))
3331
3332(define-public java-plexus-compiler-api
3333 (package
3334 (name "java-plexus-compiler-api")
3335 (version "2.8.4")
3336 (source (origin
3337 (method url-fetch)
3338 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3339 "/archive/plexus-compiler-" version ".tar.gz"))
3340 (sha256
3341 (base32
3342 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3343 (build-system ant-build-system)
3344 (arguments
3345 `(#:jar-name "plexus-compiler-api.jar"
3346 #:source-dir "plexus-compiler-api/src/main/java"
3347 #:jdk ,icedtea-8
3348 #:test-dir "plexus-compiler-api/src/test"))
3349 (inputs
3350 `(("java-plexus-container-default" ,java-plexus-container-default)
3351 ("java-plexus-util" ,java-plexus-utils)))
3352 (native-inputs
3353 `(("java-junit" ,java-junit)))
3354 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3355 (synopsis "Plexus Compilers component's API to manipulate compilers")
3356 (description "This package contains the API used by components to manipulate
3357compilers.")
3358 (license (list license:asl2.0
3359 license:expat))))
3360
3361(define-public java-plexus-compiler-javac
3362 (package
3363 (inherit java-plexus-compiler-api)
3364 (name "java-plexus-compiler-javac")
3365 (arguments
3366 `(#:jar-name "plexus-compiler-javac.jar"
3367 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3368 #:jdk ,icedtea-8
3369 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3370 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3371 (inputs
3372 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3373 ("java-plexus-utils" ,java-plexus-utils)
3374 ("java-plexus-container-default" ,java-plexus-container-default)))
3375 (native-inputs
3376 `(("java-junit" ,java-junit)))
3377 (synopsis "Javac Compiler support for Plexus Compiler component")
3378 (description "This package contains the Javac Compiler support for Plexus
3379Compiler component.")))
3380
3381(define-public java-plexus-sec-dispatcher
3382 (package
3383 (name "java-plexus-sec-dispatcher")
3384 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3385 (source (origin
3386 ;; This project doesn't tag releases or publish tarballs, so we take
3387 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3388 (method url-fetch)
3389 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3390 "archive/7db8f88048.tar.gz"))
3391 (sha256
3392 (base32
3393 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3394 (file-name (string-append name "-" version ".tar.gz"))))
3395 (arguments
3396 `(#:jar-name "plexus-sec-dispatcher.jar"
3397 #:source-dir "src/main/java"
3398 #:jdk ,icedtea-8
3399 #:phases
3400 (modify-phases %standard-phases
3401 (add-before 'build 'generate-models
3402 (lambda* (#:key inputs #:allow-other-keys)
3403 (define (modello-single-mode file version mode)
3404 (invoke "java"
3405 "org.codehaus.modello.ModelloCli"
3406 file mode "src/main/java" version
3407 "false" "true"))
3408 (let ((file "src/main/mdo/settings-security.mdo"))
3409 (modello-single-mode file "1.0.0" "java")
3410 (modello-single-mode file "1.0.0" "xpp3-reader")
3411 (modello-single-mode file "1.0.0" "xpp3-writer"))
3412 #t))
3413 (add-before 'build 'generate-components.xml
3414 (lambda _
3415 (mkdir-p "build/classes/META-INF/plexus")
3416 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3417 (lambda _
3418 (display
3419 "<component-set>\n
3420 <components>\n
3421 <component>\n
3422 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3423 <role-hint>default</role-hint>\n
3424 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3425 <description></description>\n
3426 <requirements>\n
3427 <requirement>\n
3428 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3429 <field-name>_cipher</field-name>\n
3430 </requirement>\n
3431 <requirement>\n
3432 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3433 <field-name>_decryptors</field-name>\n
3434 </requirement>\n
3435 </requirements>\n
3436 <configuration>\n
3437 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3438 </configuration>\n
3439 </component>\n
3440 </components>\n
3441</component-set>\n")))
3442 #t))
3443 (add-before 'check 'fix-paths
3444 (lambda _
3445 (copy-recursively "src/test/resources" "target")
3446 #t)))))
3447 (inputs
3448 `(("java-plexus-cipher" ,java-plexus-cipher)))
3449 (native-inputs
3450 `(("java-modello-core" ,java-modello-core)
3451 ;; for modello:
3452 ("java-plexus-container-default" ,java-plexus-container-default)
3453 ("java-plexus-classworlds" ,java-plexus-classworlds)
3454 ("java-plexus-utils" ,java-plexus-utils)
3455 ("java-guava" ,java-guava)
3456 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3457 ("java-sisu-build-api" ,java-sisu-build-api)
3458 ;; modello plugins:
3459 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3460 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3461 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3462 ;; for tests
3463 ("java-junit" ,java-junit)))
3464 (build-system ant-build-system)
3465 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3466 (synopsis "Plexus Security Dispatcher Component")
3467 (description "This package is the Plexus Security Dispatcher Component.
3468This component decrypts a string passed to it.")
3469 (license license:asl2.0)))
3470
3471(define-public java-plexus-cli
3472 (package
3473 (name "java-plexus-cli")
3474 (version "1.7")
3475 (source (origin
3476 (method git-fetch)
3477 (uri (git-reference
3478 (url "https://github.com/sonatype/plexus-cli")
3479 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3480 (file-name (string-append name "-" version))
3481 (sha256
3482 (base32
3483 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3484 (build-system ant-build-system)
3485 (arguments
3486 `(#:jar-name "plexus-cli.jar"
3487 #:source-dir "src/main/java"
3488 #:jdk ,icedtea-8
3489 #:test-dir "src/test"))
3490 (inputs
3491 `(("java-commons-cli" ,java-commons-cli)
3492 ("java-plexus-container-default" ,java-plexus-container-default)
3493 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3494 (native-inputs
3495 `(("java-plexus-utils" ,java-plexus-utils)
3496 ("java-junit" ,java-junit)
3497 ("java-guava" ,java-guava)))
3498 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3499 (synopsis "CLI building library for plexus")
3500 (description "This package is a library to help creating CLI around
3501Plexus components.")
3502 (license license:asl2.0)))
3503
3504(define-public java-sisu-build-api
3505 (package
3506 (name "java-sisu-build-api")
3507 (version "0.0.7")
3508 (source (origin
3509 (method url-fetch)
3510 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3511 "archive/plexus-build-api-" version ".tar.gz"))
3512 (sha256
3513 (base32
3514 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3515 (build-system ant-build-system)
3516 (arguments
3517 `(#:jar-name "sisu-build-api.jar"
3518 #:source-dir "src/main/java"
3519 #:jdk ,icedtea-8
3520 #:tests? #f; FIXME: how to run the tests?
3521 #:phases
3522 (modify-phases %standard-phases
3523 (add-before 'build 'copy-resources
3524 (lambda _
3525 (copy-recursively "src/main/resources" "build/classes")
3526 (substitute* (find-files "build/classes")
3527 (("\\$\\{project.version\\}") ,version))
3528 #t))
3529 (add-before 'build 'generate-plexus-compontent
3530 (lambda _
3531 (mkdir-p "build/classes/META-INF/plexus")
3532 ;; This file is required for plexus to inject this package.
3533 ;; FIXME: how is it generated?
3534 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3535 (lambda _
3536 (display
3537 "<component-set>\n
3538 <components>\n
3539 <component>\n
3540 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3541 <role-hint>default</role-hint>\n
3542 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3543 <description>Filesystem based non-incremental build context implementation\n
3544which behaves as if all files were just created.</description>\n
3545 </component>\n
3546 </components>\n
3547</component-set>\n")))
3548 #t)))))
3549 (inputs
3550 `(("java-plexus-utils" ,java-plexus-utils)
3551 ("java-plexus-container-default" ,java-plexus-container-default)))
3552 (home-page "https://github.com/sonatype/sisu-build-api/")
3553 (synopsis "Base build API for maven")
3554 (description "This package contains the base build API for maven and
3555a default implementation of it. This API is about scanning files in a
3556project and determining what files need to be rebuilt.")
3557 (license license:asl2.0)))
3558
3559(define-public java-modello-core
3560 (package
3561 (name "java-modello-core")
3562 (version "1.9.1")
3563 (source (origin
3564 (method url-fetch)
3565 (uri (string-append "https://github.com/codehaus-plexus/modello"
3566 "/archive/modello-" version ".tar.gz"))
3567 (sha256
3568 (base32
3569 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3570 (build-system ant-build-system)
3571 (arguments
3572 `(#:jar-name "modello-core.jar"
3573 #:source-dir "modello-core/src/main/java"
3574 #:test-dir "modello-core/src/test"
3575 #:main-class "org.codehaus.modello.ModelloCli"
3576 #:jdk ,icedtea-8
3577 #:phases
3578 (modify-phases %standard-phases
3579 (add-before 'build 'copy-resources
3580 (lambda _
3581 (mkdir-p "build/classes/META-INF/plexus")
3582 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3583 "build/classes/META-INF/plexus/components.xml")
3584 #t))
3585 (add-before 'check 'fix-tests
3586 (lambda _
3587 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3588 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3589 "modello/core/io/ModelReaderTest.java")
3590 (("src/test") "modello-core/src/test")))
3591 #t)))))
3592 (inputs
3593 `(("java-plexus-utils" ,java-plexus-utils)
3594 ("java-plexus-container-default" ,java-plexus-container-default)
3595 ("java-sisu-build-api" ,java-sisu-build-api)))
3596 (native-inputs
3597 `(("java-junit" ,java-junit)
3598 ("java-plexus-classworlds" ,java-plexus-classworlds)
3599 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3600 ("java-guava" ,java-guava)))
3601 (home-page "http://codehaus-plexus.github.io/modello/")
3602 (synopsis "Framework for code generation from a simple model")
3603 (description "Modello is a framework for code generation from a simple model.
3604
3605Modello generates code from a simple model format: based on a plugin
3606architecture, various types of code and descriptors can be generated from the
3607single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3608XSD and documentation.")
3609 (license (list
3610 license:expat
3611 ;; Although this package uses only files licensed under expat,
3612 ;; other parts of the source are licensed under different
3613 ;; licenses. We include them to be inherited by other packages.
3614 license:asl2.0
3615 ;; Some files in modello-plugin-java are licensed under a
3616 ;; 5-clause BSD license.
3617 (license:non-copyleft
3618 (string-append "file:///modello-plugins/modello-plugin-java/"
3619 "src/main/java/org/codehaus/modello/plugin/"
3620 "java/javasource/JNaming.java"))))))
3621
3622(define-public java-modello-plugins-java
3623 (package
3624 (inherit java-modello-core)
3625 (name "java-modello-plugins-java")
3626 (arguments
3627 `(#:jar-name "modello-plugins-java.jar"
3628 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3629 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3630 #:jdk ,icedtea-8
3631 #:tests? #f; requires maven-model, which depends on this package
3632 #:phases
3633 (modify-phases %standard-phases
3634 (add-before 'build 'copy-resources
3635 (lambda _
3636 (mkdir-p "build/classes")
3637 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3638 "build/classes")
3639 #t)))))
3640 (inputs
3641 `(("java-modello-core" ,java-modello-core)
3642 ,@(package-inputs java-modello-core)))
3643 (synopsis "Modello Java Plugin")
3644 (description "Modello Java Plugin generates Java objects for the model.")))
3645
3646(define-public java-modello-plugins-xml
3647 (package
3648 (inherit java-modello-core)
3649 (name "java-modello-plugins-xml")
3650 (arguments
3651 `(#:jar-name "modello-plugins-xml.jar"
3652 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3653 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3654 #:jdk ,icedtea-8
3655 #:phases
3656 (modify-phases %standard-phases
3657 (add-before 'build 'copy-resources
3658 (lambda _
3659 (mkdir-p "build/classes")
3660 (copy-recursively
3661 "modello-plugins/modello-plugin-xml/src/main/resources"
3662 "build/classes")
3663 #t))
3664 (add-before 'check 'fix-paths
3665 (lambda _
3666 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3667 (substitute*
3668 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3669 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
3670 #t)))))
3671 (inputs
3672 `(("java-modello-core" ,java-modello-core)
3673 ("java-modello-plugins-java" ,java-modello-plugins-java)
3674 ,@(package-inputs java-modello-core)))
3675 (synopsis "Modello XML Plugin")
3676 (description "Modello XML Plugin contains shared code for every plugins
3677working on XML representation of the model.")))
3678
3679(define-public java-modello-test
3680 (package
3681 (inherit java-modello-core)
3682 (name "java-modello-test")
3683 (arguments
3684 `(#:jar-name "modello-test.jar"
3685 #:source-dir "modello-test/src/main/java"
3686 #:tests? #f; no tests
3687 #:jdk ,icedtea-8))
3688 (inputs
3689 `(("java-plexus-utils" ,java-plexus-utils)
3690 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3691 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3692 ("java-plexus-container-default" ,java-plexus-container-default)))
3693 (synopsis "Modello test package")
3694 (description "The modello test package contains the basis to create
3695Modello generator unit-tests, including sample models and xml files to test
3696every feature for every plugin.")))
3697
3698(define-public java-modello-plugins-xpp3
3699 (package
3700 (inherit java-modello-core)
3701 (name "java-modello-plugins-xpp3")
3702 (arguments
3703 `(#:jar-name "modello-plugins-xpp3.jar"
3704 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3705 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3706 ;; One of the test dependencies is maven-model which depends on this package.
3707 #:tests? #f
3708 #:jdk ,icedtea-8
3709 #:phases
3710 (modify-phases %standard-phases
3711 (add-before 'build 'copy-resources
3712 (lambda _
3713 (mkdir-p "build/classes")
3714 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3715 "build/classes")
3716 #t)))))
3717 (inputs
3718 `(("java-modello-core" ,java-modello-core)
3719 ("java-modello-plugins-java" ,java-modello-plugins-java)
3720 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3721 ,@(package-inputs java-modello-core)))
3722 (native-inputs
3723 `(("java-xmlunit" ,java-xmlunit)
3724 ("java-modello-test" ,java-modello-test)
3725 ,@(package-native-inputs java-modello-core)))
3726 (synopsis "Modello XPP3 Plugin")
3727 (description "The modello XPP3 plugin generates XML readers and writers based
3728on the XPP3 API (XML Pull Parser).")))
3729
3730(define-public java-asm
3731 (package
3732 (name "java-asm")
3733 (version "6.0")
3734 (source (origin
3735 (method url-fetch)
3736 (uri (string-append "http://download.forge.ow2.org/asm/"
3737 "asm-" version ".tar.gz"))
3738 (sha256
3739 (base32
3740 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3741 (build-system ant-build-system)
3742 (propagated-inputs
3743 `(("java-aqute-bndlib" ,java-aqute-bndlib)
3744 ("java-aqute-libg" ,java-aqute-libg)))
3745 (arguments
3746 `(#:build-target "compile"
3747 ;; The tests require an old version of Janino, which no longer compiles
3748 ;; with the JDK7.
3749 #:tests? #f
3750 #:make-flags
3751 (list
3752 ;; We don't need these extra ant tasks, but the build system asks us to
3753 ;; provide a path anyway.
3754 "-Dobjectweb.ant.tasks.path=dummy-path"
3755 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3756 ;; used during the build automatically by ant-build-system, but
3757 ;; java-asm's build.xml fails unless we provide something here.
3758 "-Dbiz.aQute.bnd.path=dummy-path")
3759 #:phases
3760 (modify-phases %standard-phases
3761 (add-before 'install 'build-jars
3762 (lambda* (#:key make-flags #:allow-other-keys)
3763 ;; We cannot use the "jar" target because it depends on a couple
3764 ;; of unpackaged, complicated tools.
3765 (mkdir "dist")
3766 (invoke "jar"
3767 "-cf" (string-append "dist/asm-" ,version ".jar")
3768 "-C" "output/build/tmp" ".")))
3769 (replace 'install
3770 (install-jars "dist")))))
3771 (native-inputs
3772 `(("java-junit" ,java-junit)))
3773 (home-page "http://asm.ow2.org/")
3774 (synopsis "Very small and fast Java bytecode manipulation framework")
3775 (description "ASM is an all purpose Java bytecode manipulation and
3776analysis framework. It can be used to modify existing classes or dynamically
3777generate classes, directly in binary form. The provided common
3778transformations and analysis algorithms allow to easily assemble custom
3779complex transformations and code analysis tools.")
3780 (license license:bsd-3)))
3781
3782(define java-asm-bootstrap
3783 (package
3784 (inherit java-asm)
3785 (name "java-asm-bootstrap")
3786 (arguments
3787 (substitute-keyword-arguments (package-arguments java-asm)
3788 ((#:tests? _) #f)))
3789 (native-inputs `())
3790 (propagated-inputs
3791 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
3792 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
3793 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
3794 (delete `("java-aqute-libg" ,java-aqute-libg)
3795 (package-inputs java-asm)))))))
3796
3797(define-public java-cglib
3798 (package
3799 (name "java-cglib")
3800 (version "3.2.4")
3801 (source (origin
3802 (method url-fetch)
3803 (uri (string-append
3804 "https://github.com/cglib/cglib/archive/RELEASE_"
3805 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3806 ".tar.gz"))
3807 (file-name (string-append "cglib-" version ".tar.gz"))
3808 (sha256
3809 (base32
3810 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3811 (build-system ant-build-system)
3812 (arguments
3813 `(;; FIXME: tests fail because junit runs
3814 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3815 ;; to describe a test at all.
3816 #:tests? #f
3817 #:jar-name "cglib.jar"
3818 #:phases
3819 (modify-phases %standard-phases
3820 (add-after 'unpack 'chdir
3821 (lambda _ (chdir "cglib") #t)))))
3822 (inputs
3823 `(("java-asm" ,java-asm)
3824 ("java-junit" ,java-junit)))
3825 (home-page "https://github.com/cglib/cglib/")
3826 (synopsis "Java byte code generation library")
3827 (description "The byte code generation library CGLIB is a high level API
3828to generate and transform Java byte code.")
3829 (license license:asl2.0)))
3830
3831(define-public java-objenesis
3832 (package
3833 (name "java-objenesis")
3834 (version "2.5.1")
3835 (source (origin
3836 (method url-fetch)
3837 (uri (string-append "https://github.com/easymock/objenesis/"
3838 "archive/" version ".tar.gz"))
3839 (file-name (string-append "objenesis-" version ".tar.gz"))
3840 (sha256
3841 (base32
3842 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3843 (build-system ant-build-system)
3844 (arguments
3845 `(#:jar-name "objenesis.jar"
3846 #:source-dir "main/src/"
3847 #:test-dir "main/src/test/"))
3848 (native-inputs
3849 `(("java-junit" ,java-junit)
3850 ("java-hamcrest-core" ,java-hamcrest-core)))
3851 (home-page "http://objenesis.org/")
3852 (synopsis "Bypass the constructor when creating an object")
3853 (description "Objenesis is a small Java library that serves one purpose:
3854to instantiate a new object of a particular class. It is common to see
3855restrictions in libraries stating that classes must require a default
3856constructor. Objenesis aims to overcome these restrictions by bypassing the
3857constructor on object instantiation.")
3858 (license license:asl2.0)))
3859
3860(define-public java-easymock
3861 (package
3862 (name "java-easymock")
3863 (version "3.4")
3864 (source (origin
3865 (method url-fetch)
3866 (uri (string-append "https://github.com/easymock/easymock/"
3867 "archive/easymock-" version ".tar.gz"))
3868 (sha256
3869 (base32
3870 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3871 (build-system ant-build-system)
3872 (arguments
3873 `(#:jar-name "easymock.jar"
3874 #:source-dir "core/src/main"
3875 #:test-dir "core/src/test"
3876 #:phases
3877 (modify-phases %standard-phases
3878 ;; FIXME: Android support requires the following packages to be
3879 ;; available: com.google.dexmaker.stock.ProxyBuilder
3880 (add-after 'unpack 'delete-android-support
3881 (lambda _
3882 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3883 (substitute* "MocksControl.java"
3884 (("AndroidSupport.isAndroid\\(\\)") "false")
3885 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3886 (delete-file "AndroidClassProxyFactory.java"))
3887 #t))
3888 (add-after 'unpack 'delete-broken-tests
3889 (lambda _
3890 (with-directory-excursion "core/src/test/java/org/easymock"
3891 ;; This test depends on dexmaker.
3892 (delete-file "tests2/ClassExtensionHelperTest.java")
3893
3894 ;; This is not a test.
3895 (delete-file "tests/BaseEasyMockRunnerTest.java")
3896
3897 ;; This test should be executed with a different runner...
3898 (delete-file "tests2/EasyMockAnnotationsTest.java")
3899 ;; ...but deleting it means that we also have to delete these
3900 ;; dependent files.
3901 (delete-file "tests2/EasyMockRunnerTest.java")
3902 (delete-file "tests2/EasyMockRuleTest.java")
3903
3904 ;; This test fails because the file "easymock.properties" does
3905 ;; not exist.
3906 (delete-file "tests2/EasyMockPropertiesTest.java"))
3907 #t)))))
3908 (inputs
3909 `(("java-asm" ,java-asm)
3910 ("java-cglib" ,java-cglib)
3911 ("java-objenesis" ,java-objenesis)))
3912 (native-inputs
3913 `(("java-junit" ,java-junit)
3914 ("java-hamcrest-core" ,java-hamcrest-core)))
3915 (home-page "http://easymock.org")
3916 (synopsis "Java library providing mock objects for unit tests")
3917 (description "EasyMock is a Java library that provides an easy way to use
3918mock objects in unit testing.")
3919 (license license:asl2.0)))
3920
3921(define-public java-jmock-1
3922 (package
3923 (name "java-jmock")
3924 (version "1.2.0")
3925 (source (origin
3926 (method url-fetch)
3927 (uri (string-append "https://github.com/jmock-developers/"
3928 "jmock-library/archive/" version ".tar.gz"))
3929 (file-name (string-append "jmock-" version ".tar.gz"))
3930 (sha256
3931 (base32
3932 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3933 (build-system ant-build-system)
3934 (arguments
3935 `(#:build-target "jars"
3936 #:test-target "run.tests"
3937 #:phases
3938 (modify-phases %standard-phases
3939 (replace 'install (install-jars "build")))))
3940 (home-page "http://www.jmock.org")
3941 (synopsis "Mock object library for test-driven development")
3942 (description "JMock is a library that supports test-driven development of
3943Java code with mock objects. Mock objects help you design and test the
3944interactions between the objects in your programs.
3945
3946The jMock library
3947
3948@itemize
3949@item makes it quick and easy to define mock objects
3950@item lets you precisely specify the interactions between
3951 your objects, reducing the brittleness of your tests
3952@item plugs into your favourite test framework
3953@item is easy to extend.
3954@end itemize\n")
3955 (license license:bsd-3)))
3956
3957(define-public java-jmock
3958 (package
3959 (inherit java-jmock-1)
3960 (name "java-jmock")
3961 (version "2.8.2")
3962 (source (origin
3963 (method url-fetch)
3964 (uri (string-append "https://github.com/jmock-developers/"
3965 "jmock-library/archive/" version ".tar.gz"))
3966 (file-name (string-append name "-" version ".tar.gz"))
3967 (sha256
3968 (base32
3969 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3970 (inputs
3971 `(("java-hamcrest-all" ,java-hamcrest-all)
3972 ("java-asm" ,java-asm)
3973 ("java-bsh" ,java-bsh)
3974 ("java-junit" ,java-junit)))
3975 (native-inputs
3976 `(("cglib" ,java-cglib)))
3977 (arguments
3978 `(#:jar-name "java-jmock.jar"
3979 #:source-dir "jmock/src/main/java"
3980 #:test-dir "jmock/src/test"))))
3981
3982(define-public java-jmock-junit4
3983 (package
3984 (inherit java-jmock)
3985 (name "java-jmock-junit4")
3986 (arguments
3987 `(#:jar-name "java-jmock-junit4.jar"
3988 #:source-dir "jmock-junit4/src/main/java"
3989 #:test-dir "jmock-junit4/src/test"))
3990 (inputs
3991 `(("java-hamcrest-all" ,java-hamcrest-all)
3992 ("java-asm" ,java-asm)
3993 ("java-bsh" ,java-bsh)
3994 ("java-jmock" ,java-jmock)
3995 ("java-jumit" ,java-junit)))))
3996
3997(define-public java-jmock-legacy
3998 (package
3999 (inherit java-jmock)
4000 (name "java-jmock-legacy")
4001 (arguments
4002 `(#:jar-name "java-jmock-legacy.jar"
4003 #:source-dir "jmock-legacy/src/main/java"
4004 #:test-dir "jmock-legacy/src/test"
4005 #:phases
4006 (modify-phases %standard-phases
4007 (add-before 'check 'copy-tests
4008 (lambda _
4009 ;; This file is a dependancy of some tests
4010 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4011 (copy-file (string-append "jmock/src/test/java/" file)
4012 (string-append "jmock-legacy/src/test/java/" file))
4013 #t))))))
4014 (inputs
4015 `(("java-hamcrest-all" ,java-hamcrest-all)
4016 ("java-objenesis" ,java-objenesis)
4017 ("java-cglib" ,java-cglib)
4018 ("java-jmock" ,java-jmock)
4019 ("java-asm" ,java-asm)
4020 ("java-bsh" ,java-bsh)
4021 ("java-junit" ,java-junit)))
4022 (native-inputs
4023 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4024
4025(define-public java-hamcrest-all
4026 (package (inherit java-hamcrest-core)
4027 (name "java-hamcrest-all")
4028 (arguments
4029 `(#:jdk ,icedtea-8
4030 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4031 ((#:build-target _) "bigjar")
4032 ((#:phases phases)
4033 `(modify-phases ,phases
4034 ;; Some build targets override the classpath, so we need to patch
4035 ;; the build.xml to ensure that required dependencies are on the
4036 ;; classpath.
4037 (add-after 'unpack 'patch-classpath-for-integration
4038 (lambda* (#:key inputs #:allow-other-keys)
4039 (substitute* "build.xml"
4040 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4041 (string-join
4042 (cons line
4043 (append
4044 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4045 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4046 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4047 ";"))
4048 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4049 (string-append (assoc-ref inputs "java-hamcrest-core")
4050 "/share/java/hamcrest-core.jar")))
4051 #t)))))))
4052 (inputs
4053 `(("java-junit" ,java-junit)
4054 ("java-jmock" ,java-jmock-1)
4055 ;; This is necessary because of what seems to be a race condition.
4056 ;; This package would sometimes fail to build because hamcrest-core.jar
4057 ;; could not be found, even though it is built as part of this package.
4058 ;; Adding java-hamcrest-core appears to fix this problem. See
4059 ;; https://debbugs.gnu.org/31390 for more information.
4060 ("java-hamcrest-core" ,java-hamcrest-core)
4061 ("java-easymock" ,java-easymock)
4062 ,@(package-inputs java-hamcrest-core)))))
4063
4064(define-public java-jopt-simple
4065 (package
4066 (name "java-jopt-simple")
4067 (version "5.0.3")
4068 (source (origin
4069 (method url-fetch)
4070 (uri (string-append "http://repo1.maven.org/maven2/"
4071 "net/sf/jopt-simple/jopt-simple/"
4072 version "/jopt-simple-"
4073 version "-sources.jar"))
4074 (sha256
4075 (base32
4076 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4077 (build-system ant-build-system)
4078 (arguments
4079 `(#:tests? #f ; there are no tests
4080 #:jar-name "jopt-simple.jar"))
4081 (home-page "https://pholser.github.io/jopt-simple/")
4082 (synopsis "Java library for parsing command line options")
4083 (description "JOpt Simple is a Java library for parsing command line
4084options, such as those you might pass to an invocation of @code{javac}. In
4085the interest of striving for simplicity, as closely as possible JOpt Simple
4086attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4087GNU @code{getopt_long}. It also aims to make option parser configuration and
4088retrieval of options and their arguments simple and expressive, without being
4089overly clever.")
4090 (license license:expat)))
4091
4092(define-public java-commons-math3
4093 (package
4094 (name "java-commons-math3")
4095 (version "3.6.1")
4096 (source (origin
4097 (method url-fetch)
4098 (uri (string-append "mirror://apache/commons/math/source/"
4099 "commons-math3-" version "-src.tar.gz"))
4100 (sha256
4101 (base32
4102 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4103 (build-system ant-build-system)
4104 (arguments
4105 `(#:build-target "jar"
4106 #:test-target "test"
4107 #:make-flags
4108 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4109 (junit (assoc-ref %build-inputs "java-junit")))
4110 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4111 (string-append "-Dhamcrest.jar=" hamcrest
4112 "/share/java/hamcrest-core.jar")))
4113 #:phases
4114 (modify-phases %standard-phases
4115 ;; We want to build the jar in the build phase and run the tests
4116 ;; later in a separate phase.
4117 (add-after 'unpack 'untangle-targets
4118 (lambda _
4119 (substitute* "build.xml"
4120 (("name=\"jar\" depends=\"test\"")
4121 "name=\"jar\" depends=\"compile\""))
4122 #t))
4123 ;; There is no install target.
4124 (replace 'install
4125 (install-jars "target")))))
4126 (native-inputs
4127 `(("java-junit" ,java-junit)
4128 ("java-hamcrest-core" ,java-hamcrest-core)))
4129 (home-page "http://commons.apache.org/math/")
4130 (synopsis "Apache Commons mathematics library")
4131 (description "Commons Math is a library of lightweight, self-contained
4132mathematics and statistics components addressing the most common problems not
4133available in the Java programming language or Commons Lang.")
4134 (license license:asl2.0)))
4135
4136(define-public java-jmh
4137 (package
4138 (name "java-jmh")
4139 (version "1.17.5")
4140 (source (origin
4141 (method hg-fetch)
4142 (uri (hg-reference
4143 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4144 (changeset version)))
4145 (file-name (string-append name "-" version "-checkout"))
4146 (sha256
4147 (base32
4148 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4149 (build-system ant-build-system)
4150 (arguments
4151 `(#:jar-name "jmh-core.jar"
4152 #:source-dir "jmh-core/src/main"
4153 #:test-dir "jmh-core/src/test"
4154 #:phases
4155 (modify-phases %standard-phases
4156 ;; This seems to be a bug in the JDK. It may not be necessary in
4157 ;; future versions of the JDK.
4158 (add-after 'unpack 'fix-bug
4159 (lambda _
4160 (with-directory-excursion
4161 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4162 (substitute* '("IntegerValueConverter.java"
4163 "ThreadsValueConverter.java")
4164 (("public Class<Integer> valueType")
4165 "public Class<? extends Integer> valueType")))
4166 #t)))))
4167 (inputs
4168 `(("java-jopt-simple" ,java-jopt-simple)
4169 ("java-commons-math3" ,java-commons-math3)))
4170 (native-inputs
4171 `(("java-junit" ,java-junit)
4172 ("java-hamcrest-core" ,java-hamcrest-core)))
4173 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4174 (synopsis "Benchmark harness for the JVM")
4175 (description "JMH is a Java harness for building, running, and analysing
4176nano/micro/milli/macro benchmarks written in Java and other languages
4177targeting the JVM.")
4178 ;; GPLv2 only
4179 (license license:gpl2)))
4180
4181(define-public java-commons-collections4
4182 (package
4183 (name "java-commons-collections4")
4184 (version "4.1")
4185 (source (origin
4186 (method url-fetch)
4187 (uri (string-append "mirror://apache/commons/collections/source/"
4188 "commons-collections4-" version "-src.tar.gz"))
4189 (sha256
4190 (base32
4191 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4192 (build-system ant-build-system)
4193 (arguments
4194 `(#:test-target "test"
4195 #:make-flags
4196 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4197 (junit (assoc-ref %build-inputs "java-junit"))
4198 (easymock (assoc-ref %build-inputs "java-easymock")))
4199 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4200 (string-append "-Dhamcrest.jar=" hamcrest
4201 "/share/java/hamcrest-core.jar")
4202 (string-append "-Deasymock.jar=" easymock
4203 "/share/java/easymock.jar")))
4204 #:phases
4205 (modify-phases %standard-phases
4206 (replace 'install
4207 (install-jars "target")))))
4208 (native-inputs
4209 `(("java-junit" ,java-junit)
4210 ("java-hamcrest-core" ,java-hamcrest-core)
4211 ("java-easymock" ,java-easymock)))
4212 (home-page "http://commons.apache.org/collections/")
4213 (synopsis "Collections framework")
4214 (description "The Java Collections Framework is the recognised standard
4215for collection handling in Java. Commons-Collections seek to build upon the
4216JDK classes by providing new interfaces, implementations and utilities. There
4217are many features, including:
4218
4219@itemize
4220@item @code{Bag} interface for collections that have a number of copies of
4221 each object
4222@item @code{BidiMap} interface for maps that can be looked up from value to
4223 key as well and key to value
4224@item @code{MapIterator} interface to provide simple and quick iteration over
4225 maps
4226@item Transforming decorators that alter each object as it is added to the
4227 collection
4228@item Composite collections that make multiple collections look like one
4229@item Ordered maps and sets that retain the order elements are added in,
4230 including an LRU based map
4231@item Reference map that allows keys and/or values to be garbage collected
4232 under close control
4233@item Many comparator implementations
4234@item Many iterator implementations
4235@item Adapter classes from array and enumerations to collections
4236@item Utilities to test or create typical set-theory properties of collections
4237 such as union, intersection, and closure.
4238@end itemize\n")
4239 (license license:asl2.0)))
4240
4241(define-public java-commons-collections
4242 (package
4243 (inherit java-commons-collections4)
4244 (name "java-commons-collections")
4245 (version "3.2.2")
4246 (source (origin
4247 (method url-fetch)
4248 (uri (string-append "mirror://apache/commons/collections/source/"
4249 "commons-collections-" version "-src.tar.gz"))
4250 (sha256
4251 (base32
4252 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4253 (patches
4254 (search-patches "java-commons-collections-fix-java8.patch"))))
4255 (arguments
4256 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4257 ((#:phases phases)
4258 `(modify-phases ,phases
4259 ;; The manifest is required by the build procedure
4260 (add-before 'build 'add-manifest
4261 (lambda _
4262 (mkdir-p "build/conf")
4263 (call-with-output-file "build/conf/MANIFEST.MF"
4264 (lambda (file)
4265 (format file "Manifest-Version: 1.0\n")))
4266 #t))
4267 (replace 'install
4268 (install-jars "build"))))))))
4269
4270(define java-commons-collections-test-classes
4271 (package
4272 (inherit java-commons-collections)
4273 (arguments
4274 `(#:jar-name "commons-collections-test-classes.jar"
4275 #:source-dir "src/test"
4276 #:tests? #f))
4277 (inputs
4278 `(("collection" ,java-commons-collections)))))
4279
4280(define-public java-commons-beanutils
4281 (package
4282 (name "java-commons-beanutils")
4283 (version "1.9.3")
4284 (source (origin
4285 (method url-fetch)
4286 (uri (string-append "mirror://apache/commons/beanutils/source/"
4287 "commons-beanutils-" version "-src.tar.gz"))
4288 (sha256
4289 (base32
4290 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4291 (build-system ant-build-system)
4292 (arguments
4293 `(#:test-target "test"
4294 #:tests? #f
4295 #:phases
4296 (modify-phases %standard-phases
4297 (replace 'install
4298 (lambda* (#:key outputs #:allow-other-keys)
4299 (rename-file (string-append "dist/commons-beanutils-" ,version
4300 "-SNAPSHOT.jar")
4301 "commons-beanutils.jar")
4302 (install-file "commons-beanutils.jar"
4303 (string-append (assoc-ref outputs "out") "/share/java/"))
4304 #t)))))
4305 (inputs
4306 `(("logging" ,java-commons-logging-minimal)
4307 ("collections" ,java-commons-collections)))
4308 (native-inputs
4309 `(("junit" ,java-junit)
4310 ("collections-test" ,java-commons-collections-test-classes)))
4311 (home-page "http://commons.apache.org/beanutils/")
4312 (synopsis "Dynamically set or get properties in Java")
4313 (description "BeanUtils provides a simplified interface to reflection and
4314introspection to set or get dynamically determined properties through their
4315setter and getter method.")
4316 (license license:asl2.0)))
4317
4318(define-public java-commons-io
4319 (package
4320 (name "java-commons-io")
4321 (version "2.5")
4322 (source
4323 (origin
4324 (method url-fetch)
4325 (uri (string-append "mirror://apache/commons/io/source/"
4326 "commons-io-" version "-src.tar.gz"))
4327 (sha256
4328 (base32
4329 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4330 (build-system ant-build-system)
4331 (outputs '("out" "doc"))
4332 (arguments
4333 `(#:test-target "test"
4334 #:make-flags
4335 (list (string-append "-Djunit.jar="
4336 (assoc-ref %build-inputs "java-junit")
4337 "/share/java/junit.jar"))
4338 #:phases
4339 (modify-phases %standard-phases
4340 (add-after 'build 'build-javadoc ant-build-javadoc)
4341 (replace 'install (install-jars "target"))
4342 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4343 (native-inputs
4344 `(("java-junit" ,java-junit)
4345 ("java-hamcrest-core" ,java-hamcrest-core)))
4346 (home-page "http://commons.apache.org/io/")
4347 (synopsis "Common useful IO related classes")
4348 (description "Commons-IO contains utility classes, stream implementations,
4349file filters and endian classes.")
4350 (license license:asl2.0)))
4351
4352(define-public java-commons-exec-1.1
4353 (package
4354 (name "java-commons-exec")
4355 (version "1.1")
4356 (source
4357 (origin
4358 (method url-fetch)
4359 (uri (string-append "mirror://apache/commons/exec/source/"
4360 "commons-exec-" version "-src.tar.gz"))
4361 (sha256
4362 (base32
4363 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4364 (build-system ant-build-system)
4365 (arguments
4366 `(#:test-target "test"
4367 #:make-flags
4368 (list (string-append "-Dmaven.junit.jar="
4369 (assoc-ref %build-inputs "java-junit")
4370 "/share/java/junit.jar"))
4371 #:phases
4372 (modify-phases %standard-phases
4373 (add-before 'build 'delete-network-tests
4374 (lambda _
4375 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4376 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4377 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4378 #t))
4379 ;; The "build" phase automatically tests.
4380 (delete 'check)
4381 (replace 'install (install-jars "target")))))
4382 (native-inputs
4383 `(("java-junit" ,java-junit)))
4384 (home-page "http://commons.apache.org/proper/commons-exec/")
4385 (synopsis "Common program execution related classes")
4386 (description "Commons-Exec simplifies executing external processes.")
4387 (license license:asl2.0)))
4388
4389(define-public java-commons-exec
4390 (package
4391 (inherit java-commons-exec-1.1)
4392 (version "1.3")
4393 (source
4394 (origin
4395 (method url-fetch)
4396 (uri (string-append "mirror://apache/commons/exec/source/"
4397 "commons-exec-" version "-src.tar.gz"))
4398 (sha256
4399 (base32
4400 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4401 (arguments
4402 `(#:test-target "test"
4403 #:make-flags
4404 (list (string-append "-Dmaven.junit.jar="
4405 (assoc-ref %build-inputs "java-junit")
4406 "/share/java/junit.jar")
4407 "-Dmaven.compiler.source=1.7"
4408 "-Dmaven.compiler.target=1.7")
4409 #:phases
4410 (modify-phases %standard-phases
4411 (add-before 'build 'delete-network-tests
4412 (lambda* (#:key inputs #:allow-other-keys)
4413 ;; This test hangs indefinitely.
4414 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4415 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4416 (("ping -c 10 127.0.0.1") "sleep 10"))
4417 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4418 (("/bin/ls") "ls"))
4419 (call-with-output-file "src/test/scripts/ping.sh"
4420 (lambda (port)
4421 (format port "#!~a/bin/sh\nsleep $1\n"
4422 (assoc-ref inputs "bash"))))
4423 #t))
4424 ;; The "build" phase automatically tests.
4425 (delete 'check)
4426 (replace 'install (install-jars "target")))))
4427 (native-inputs
4428 `(("java-junit" ,java-junit)
4429 ("java-hamcrest-core" ,java-hamcrest-core)))))
4430
4431(define-public java-commons-lang
4432 (package
4433 (name "java-commons-lang")
4434 (version "2.6")
4435 (source
4436 (origin
4437 (method url-fetch)
4438 (uri (string-append "mirror://apache/commons/lang/source/"
4439 "commons-lang-" version "-src.tar.gz"))
4440 (sha256
4441 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4442 (build-system ant-build-system)
4443 (outputs '("out" "doc"))
4444 (arguments
4445 `(#:test-target "test"
4446 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4447 #:phases
4448 (modify-phases %standard-phases
4449 (add-after 'build 'build-javadoc ant-build-javadoc)
4450 (add-before 'check 'disable-failing-test
4451 (lambda _
4452 ;; Disable a failing test
4453 (substitute* "src/test/java/org/apache/commons/lang/\
4454time/FastDateFormatTest.java"
4455 (("public void testFormat\\(\\)")
4456 "public void disabled_testFormat()"))
4457 #t))
4458 (replace 'install (install-jars "target"))
4459 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4460 (native-inputs
4461 `(("java-junit" ,java-junit)))
4462 (home-page "http://commons.apache.org/lang/")
4463 (synopsis "Extension of the java.lang package")
4464 (description "The Commons Lang components contains a set of Java classes
4465that provide helper methods for standard Java classes, especially those found
4466in the @code{java.lang} package in the Sun JDK. The following classes are
4467included:
4468
4469@itemize
4470@item StringUtils - Helper for @code{java.lang.String}.
4471@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4472 of characters such as @code{[a-z]} and @code{[abcdez]}.
4473@item RandomStringUtils - Helper for creating randomised strings.
4474@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4475@item NumberRange - A range of numbers with an upper and lower bound.
4476@item ObjectUtils - Helper for @code{java.lang.Object}.
4477@item SerializationUtils - Helper for serializing objects.
4478@item SystemUtils - Utility class defining the Java system properties.
4479@item NestedException package - A sub-package for the creation of nested
4480 exceptions.
4481@item Enum package - A sub-package for the creation of enumerated types.
4482@item Builder package - A sub-package for the creation of @code{equals},
4483 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4484@end itemize\n")
4485 (license license:asl2.0)))
4486
4487(define-public java-commons-lang3
4488 (package
4489 (name "java-commons-lang3")
4490 (version "3.4")
4491 (source
4492 (origin
4493 (method url-fetch)
4494 (uri (string-append "mirror://apache/commons/lang/source/"
4495 "commons-lang3-" version "-src.tar.gz"))
4496 (sha256
4497 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4498 (build-system ant-build-system)
4499 (outputs '("out" "doc"))
4500 (arguments
4501 `(#:test-target "test"
4502 #:make-flags
4503 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4504 (junit (assoc-ref %build-inputs "java-junit"))
4505 (easymock (assoc-ref %build-inputs "java-easymock"))
4506 (io (assoc-ref %build-inputs "java-commons-io")))
4507 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4508 (string-append "-Dhamcrest.jar=" hamcrest
4509 "/share/java/hamcrest-all.jar")
4510 (string-append "-Dcommons-io.jar=" io
4511 "/share/java/commons-io-"
4512 ,(package-version java-commons-io)
4513 "-SNAPSHOT.jar")
4514 (string-append "-Deasymock.jar=" easymock
4515 "/share/java/easymock.jar")))
4516 #:phases
4517 (modify-phases %standard-phases
4518 (add-after 'build 'build-javadoc ant-build-javadoc)
4519 (replace 'install (install-jars "target"))
4520 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4521 (native-inputs
4522 `(("java-junit" ,java-junit)
4523 ("java-commons-io" ,java-commons-io)
4524 ("java-hamcrest-all" ,java-hamcrest-all)
4525 ("java-easymock" ,java-easymock)))
4526 (home-page "http://commons.apache.org/lang/")
4527 (synopsis "Extension of the java.lang package")
4528 (description "The Commons Lang components contains a set of Java classes
4529that provide helper methods for standard Java classes, especially those found
4530in the @code{java.lang} package. The following classes are included:
4531
4532@itemize
4533@item StringUtils - Helper for @code{java.lang.String}.
4534@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4535 characters such as @code{[a-z]} and @code{[abcdez]}.
4536@item RandomStringUtils - Helper for creating randomised strings.
4537@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4538@item NumberRange - A range of numbers with an upper and lower bound.
4539@item ObjectUtils - Helper for @code{java.lang.Object}.
4540@item SerializationUtils - Helper for serializing objects.
4541@item SystemUtils - Utility class defining the Java system properties.
4542@item NestedException package - A sub-package for the creation of nested
4543 exceptions.
4544@item Enum package - A sub-package for the creation of enumerated types.
4545@item Builder package - A sub-package for the creation of @code{equals},
4546 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4547@end itemize\n")
4548 (license license:asl2.0)))
4549
4550(define-public java-commons-bsf
4551 (package
4552 (name "java-commons-bsf")
4553 (version "2.4.0")
4554 (source (origin
4555 (method url-fetch)
4556 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4557 version ".tar.gz"))
4558 (sha256
4559 (base32
4560 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4561 (modules '((guix build utils)))
4562 (snippet
4563 '(begin
4564 (for-each delete-file
4565 (find-files "." "\\.jar$"))
4566 #t))))
4567 (build-system ant-build-system)
4568 (arguments
4569 `(#:build-target "jar"
4570 #:tests? #f; No test file
4571 #:modules ((guix build ant-build-system)
4572 (guix build utils)
4573 (guix build java-utils)
4574 (sxml simple))
4575 #:phases
4576 (modify-phases %standard-phases
4577 (add-before 'build 'create-properties
4578 (lambda _
4579 ;; This file is missing from the distribution
4580 (call-with-output-file "build-properties.xml"
4581 (lambda (port)
4582 (sxml->xml
4583 `(project (@ (basedir ".") (name "build-properties") (default ""))
4584 (property (@ (name "project.name") (value "bsf")))
4585 (property (@ (name "source.level") (value "1.5")))
4586 (property (@ (name "build.lib") (value "build/jar")))
4587 (property (@ (name "src.dir") (value "src")))
4588 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4589 (property (@ (name "build.tests") (value "build/test-classes")))
4590 (property (@ (name "build.dest") (value "build/classes"))))
4591 port)))
4592 #t))
4593 (replace 'install (install-jars "build")))))
4594 (native-inputs
4595 `(("java-junit" ,java-junit)))
4596 (inputs
4597 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4598 (home-page "https://commons.apache.org/proper/commons-bsf")
4599 (synopsis "Bean Scripting Framework")
4600 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4601which provides scripting language support within Java applications, and access
4602to Java objects and methods from scripting languages. BSF allows one to write
4603JSPs in languages other than Java while providing access to the Java class
4604library. In addition, BSF permits any Java application to be implemented in
4605part (or dynamically extended) by a language that is embedded within it. This
4606is achieved by providing an API that permits calling scripting language engines
4607from within Java, as well as an object registry that exposes Java objects to
4608these scripting language engines.")
4609 (license license:asl2.0)))
4610
4611(define-public java-commons-jxpath
4612 (package
4613 (name "java-commons-jxpath")
4614 (version "1.3")
4615 (source (origin
4616 (method url-fetch)
4617 (uri (string-append "mirror://apache/commons/jxpath/source/"
4618 "commons-jxpath-" version "-src.tar.gz"))
4619 (sha256
4620 (base32
4621 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4622 (build-system ant-build-system)
4623 (arguments
4624 `(#:jar-name "commons-jxpath.jar"
4625 ;; tests require more dependencies, including mockrunner which depends on old software
4626 #:tests? #f
4627 #:source-dir "src/java"))
4628 (inputs
4629 `(("servlet" ,java-classpathx-servletapi)
4630 ("java-jdom" ,java-jdom)
4631 ("java-commons-beanutils" ,java-commons-beanutils)))
4632 (native-inputs
4633 `(("java-junit" ,java-junit)))
4634 (home-page "http://commons.apache.org/jxpath/")
4635 (synopsis "Simple interpreter of an expression language called XPath.")
4636 (description "The org.apache.commons.jxpath package defines a simple
4637interpreter of an expression language called XPath. JXPath applies XPath
4638expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4639contexts, DOM etc, including mixtures thereof.")
4640 (license license:asl2.0)))
4641
4642(define-public java-jsr250
4643 (package
4644 (name "java-jsr250")
4645 (version "1.3")
4646 (source (origin
4647 (method url-fetch)
4648 (uri (string-append "https://repo1.maven.org/maven2/"
4649 "javax/annotation/javax.annotation-api/"
4650 version "/javax.annotation-api-"
4651 version "-sources.jar"))
4652 (sha256
4653 (base32
4654 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4655 (build-system ant-build-system)
4656 (arguments
4657 `(#:tests? #f ; no tests included
4658 #:jdk ,icedtea-8
4659 #:jar-name "jsr250.jar"))
4660 (home-page "https://jcp.org/en/jsr/detail?id=250")
4661 (synopsis "Security-related annotations")
4662 (description "This package provides annotations for security. It provides
4663packages in the @code{javax.annotation} and @code{javax.annotation.security}
4664namespaces.")
4665 ;; either cddl or gpl2 only, with classpath exception
4666 (license (list license:cddl1.0
4667 license:gpl2))))
4668
4669(define-public java-jsr305
4670 (package
4671 (name "java-jsr305")
4672 (version "3.0.1")
4673 (source (origin
4674 (method url-fetch)
4675 (uri (string-append "https://repo1.maven.org/maven2/"
4676 "com/google/code/findbugs/"
4677 "jsr305/" version "/jsr305-"
4678 version "-sources.jar"))
4679 (sha256
4680 (base32
4681 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4682 (build-system ant-build-system)
4683 (arguments
4684 `(#:tests? #f ; no tests included
4685 #:jar-name "jsr305.jar"))
4686 (home-page "http://findbugs.sourceforge.net/")
4687 (synopsis "Annotations for the static analyzer called findbugs")
4688 (description "This package provides annotations for the findbugs package.
4689It provides packages in the @code{javax.annotations} namespace.")
4690 (license license:asl2.0)))
4691
4692(define-public java-guava
4693 (package
4694 (name "java-guava")
4695 ;; This is the last release of Guava that can be built with Java 7.
4696 (version "20.0")
4697 (source (origin
4698 (method url-fetch)
4699 (uri (string-append "https://github.com/google/guava/"
4700 "releases/download/v" version
4701 "/guava-" version "-sources.jar"))
4702 (sha256
4703 (base32
4704 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4705 (build-system ant-build-system)
4706 (arguments
4707 `(#:tests? #f ; no tests included
4708 #:jar-name "guava.jar"
4709 #:phases
4710 (modify-phases %standard-phases
4711 (add-after 'unpack 'trim-sources
4712 (lambda _
4713 (with-directory-excursion "src/com/google/common"
4714 ;; Remove annotations to avoid extra dependencies:
4715 ;; * "j2objc" annotations are used when converting Java to
4716 ;; Objective C;
4717 ;; * "errorprone" annotations catch common Java mistakes at
4718 ;; compile time;
4719 ;; * "IgnoreJRERequirement" is used for Android.
4720 (substitute* (find-files "." "\\.java$")
4721 (("import com.google.j2objc.*") "")
4722 (("import com.google.errorprone.annotation.*") "")
4723 (("import org.codehaus.mojo.animal_sniffer.*") "")
4724 (("@CanIgnoreReturnValue") "")
4725 (("@LazyInit") "")
4726 (("@WeakOuter") "")
4727 (("@RetainedWith") "")
4728 (("@Weak") "")
4729 (("@ForOverride") "")
4730 (("@J2ObjCIncompatible") "")
4731 (("@IgnoreJRERequirement") "")))
4732 #t)))))
4733 (inputs
4734 `(("java-jsr305" ,java-jsr305)))
4735 (home-page "https://github.com/google/guava")
4736 (synopsis "Google core libraries for Java")
4737 (description "Guava is a set of core libraries that includes new
4738collection types (such as multimap and multiset), immutable collections, a
4739graph library, functional types, an in-memory cache, and APIs/utilities for
4740concurrency, I/O, hashing, primitives, reflection, string processing, and much
4741more!")
4742 (license license:asl2.0)))
4743
4744;; The java-commons-logging package provides adapters to many different
4745;; logging frameworks. To avoid an excessive dependency graph we try to build
4746;; it with only a minimal set of adapters.
4747(define-public java-commons-logging-minimal
4748 (package
4749 (name "java-commons-logging-minimal")
4750 (version "1.2")
4751 (source (origin
4752 (method url-fetch)
4753 (uri (string-append "mirror://apache/commons/logging/source/"
4754 "commons-logging-" version "-src.tar.gz"))
4755 (sha256
4756 (base32
4757 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4758 (build-system ant-build-system)
4759 (arguments
4760 `(#:tests? #f ; avoid dependency on logging frameworks
4761 #:jar-name "commons-logging-minimal.jar"
4762 #:phases
4763 (modify-phases %standard-phases
4764 (add-after 'unpack 'delete-adapters-and-tests
4765 (lambda _
4766 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4767 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4768 ;; is used by applications; SimpleLog is the only actually usable
4769 ;; implementation that does not depend on another logging
4770 ;; framework.
4771 (for-each
4772 (lambda (file)
4773 (delete-file (string-append
4774 "src/main/java/org/apache/commons/logging/impl/" file)))
4775 (list "Jdk13LumberjackLogger.java"
4776 "WeakHashtable.java"
4777 "Log4JLogger.java"
4778 "ServletContextCleaner.java"
4779 "Jdk14Logger.java"
4780 "AvalonLogger.java"
4781 "LogKitLogger.java"))
4782 (delete-file-recursively "src/test")
4783 #t)))))
4784 (home-page "http://commons.apache.org/logging/")
4785 (synopsis "Common API for logging implementations")
4786 (description "The Logging package is a thin bridge between different
4787logging implementations. A library that uses the commons-logging API can be
4788used with any logging implementation at runtime.")
4789 (license license:asl2.0)))
4790
4791;; This is the last release of the 1.x series.
4792(define-public java-mockito-1
4793 (package
4794 (name "java-mockito")
4795 (version "1.10.19")
4796 (source (origin
4797 (method url-fetch)
4798 (uri (string-append "http://repo1.maven.org/maven2/"
4799 "org/mockito/mockito-core/" version
4800 "/mockito-core-" version "-sources.jar"))
4801 (sha256
4802 (base32
4803 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4804 (build-system ant-build-system)
4805 (arguments
4806 `(#:jar-name "mockito.jar"
4807 #:tests? #f ; no tests included
4808 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4809 ;; patches in build phases.
4810 #:phases
4811 (modify-phases %standard-phases
4812 ;; Mockito was developed against a different version of hamcrest,
4813 ;; which does not require matcher implementations to provide an
4814 ;; implementation of the "describeMismatch" method. We add this
4815 ;; simple definition to pass the build with our version of hamcrest.
4816 (add-after 'unpack 'fix-hamcrest-build-error
4817 (lambda _
4818 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4819 (("public Matcher getActualMatcher\\(\\) .*" line)
4820 (string-append "
4821 public void describeMismatch(Object item, Description description) {
4822 actualMatcher.describeMismatch(item, description);
4823 }"
4824 line)))
4825 #t))
4826 ;; Mockito bundles cglib. We have a cglib package, so let's use
4827 ;; that instead.
4828 (add-after 'unpack 'use-system-libraries
4829 (lambda _
4830 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4831 (substitute* '("CGLIBHacker.java"
4832 "CglibMockMaker.java"
4833 "ClassImposterizer.java"
4834 "DelegatingMockitoMethodProxy.java"
4835 "MethodInterceptorFilter.java"
4836 "MockitoNamingPolicy.java"
4837 "SerializableMockitoMethodProxy.java"
4838 "SerializableNoOp.java")
4839 (("import org.mockito.cglib") "import net.sf.cglib")))
4840 #t)))))
4841 (inputs
4842 `(("java-junit" ,java-junit)
4843 ("java-objenesis" ,java-objenesis)
4844 ("java-cglib" ,java-cglib)
4845 ("java-hamcrest-core" ,java-hamcrest-core)))
4846 (home-page "http://mockito.org")
4847 (synopsis "Mockito is a mock library for Java")
4848 (description "Mockito is a mocking library for Java which lets you write
4849tests with a clean and simple API. It generates mocks using reflection, and
4850it records all mock invocations, including methods arguments.")
4851 (license license:asl2.0)))
4852
4853(define-public java-httpcomponents-httpcore
4854 (package
4855 (name "java-httpcomponents-httpcore")
4856 (version "4.4.6")
4857 (source (origin
4858 (method url-fetch)
4859 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4860 "source/httpcomponents-core-"
4861 version "-src.tar.gz"))
4862 (sha256
4863 (base32
4864 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4865 (build-system ant-build-system)
4866 (arguments
4867 `(#:jar-name "httpcomponents-httpcore.jar"
4868 #:phases
4869 (modify-phases %standard-phases
4870 (add-after 'unpack 'chdir
4871 (lambda _ (chdir "httpcore") #t)))))
4872 (inputs
4873 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4874 ("java-commons-lang3" ,java-commons-lang3)))
4875 (native-inputs
4876 `(("java-junit" ,java-junit)
4877 ("java-mockito" ,java-mockito-1)))
4878 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4879 (synopsis "Low level HTTP transport components")
4880 (description "HttpCore is a set of low level HTTP transport components
4881that can be used to build custom client and server side HTTP services with a
4882minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4883on the classic Java I/O and non-blocking, event driven I/O model based on Java
4884NIO.
4885
4886This package provides the blocking I/O model library.")
4887 (license license:asl2.0)))
4888
4889(define-public java-httpcomponents-httpcore-nio
4890 (package (inherit java-httpcomponents-httpcore)
4891 (name "java-httpcomponents-httpcore-nio")
4892 (arguments
4893 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4894 #:phases
4895 (modify-phases %standard-phases
4896 (add-after 'unpack 'chdir
4897 (lambda _ (chdir "httpcore-nio") #t)))))
4898 (inputs
4899 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4900 ("java-hamcrest-core" ,java-hamcrest-core)
4901 ,@(package-inputs java-httpcomponents-httpcore)))
4902 (description "HttpCore is a set of low level HTTP transport components
4903that can be used to build custom client and server side HTTP services with a
4904minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4905on the classic Java I/O and non-blocking, event driven I/O model based on Java
4906NIO.
4907
4908This package provides the non-blocking I/O model library based on Java
4909NIO.")))
4910
4911(define-public java-httpcomponents-httpcore-ab
4912 (package (inherit java-httpcomponents-httpcore)
4913 (name "java-httpcomponents-httpcore-ab")
4914 (arguments
4915 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4916 #:phases
4917 (modify-phases %standard-phases
4918 (add-after 'unpack 'chdir
4919 (lambda _ (chdir "httpcore-ab") #t)))))
4920 (inputs
4921 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4922 ("java-commons-cli" ,java-commons-cli)
4923 ("java-hamcrest-core" ,java-hamcrest-core)
4924 ,@(package-inputs java-httpcomponents-httpcore)))
4925 (synopsis "Apache HttpCore benchmarking tool")
4926 (description "This package provides the HttpCore benchmarking tool. It is
4927an Apache AB clone based on HttpCore.")))
4928
4929(define-public java-httpcomponents-httpclient
4930 (package
4931 (name "java-httpcomponents-httpclient")
4932 (version "4.5.3")
4933 (source (origin
4934 (method url-fetch)
4935 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4936 "source/httpcomponents-client-"
4937 version "-src.tar.gz"))
4938 (sha256
4939 (base32
4940 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4941 (build-system ant-build-system)
4942 (arguments
4943 `(#:jar-name "httpcomponents-httpclient.jar"
4944 #:phases
4945 (modify-phases %standard-phases
4946 (add-after 'unpack 'chdir
4947 (lambda _ (chdir "httpclient") #t)))))
4948 (inputs
4949 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4950 ("java-commons-codec" ,java-commons-codec)
4951 ("java-hamcrest-core" ,java-hamcrest-core)
4952 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4953 ("java-mockito" ,java-mockito-1)
4954 ("java-junit" ,java-junit)))
4955 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4956 (synopsis "HTTP client library for Java")
4957 (description "Although the @code{java.net} package provides basic
4958functionality for accessing resources via HTTP, it doesn't provide the full
4959flexibility or functionality needed by many applications. @code{HttpClient}
4960seeks to fill this void by providing an efficient, up-to-date, and
4961feature-rich package implementing the client side of the most recent HTTP
4962standards and recommendations.")
4963 (license license:asl2.0)))
4964
4965(define-public java-httpcomponents-httpmime
4966 (package (inherit java-httpcomponents-httpclient)
4967 (name "java-httpcomponents-httpmime")
4968 (arguments
4969 `(#:jar-name "httpcomponents-httpmime.jar"
4970 #:phases
4971 (modify-phases %standard-phases
4972 (add-after 'unpack 'chdir
4973 (lambda _ (chdir "httpmime") #t)))))
4974 (inputs
4975 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4976 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4977 ("java-junit" ,java-junit)
4978 ("java-hamcrest-core" ,java-hamcrest-core)))))
4979
4980(define-public java-commons-net
4981 (package
4982 (name "java-commons-net")
4983 (version "3.6")
4984 (source (origin
4985 (method url-fetch)
4986 (uri (string-append "mirror://apache/commons/net/source/"
4987 "commons-net-" version "-src.tar.gz"))
4988 (sha256
4989 (base32
4990 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4991 (build-system ant-build-system)
4992 (arguments
4993 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4994 ;; should be "resources/examples/examples.properties"), but gets "null"
4995 ;; instead.
4996 #:tests? #f
4997 #:jar-name "commons-net.jar"))
4998 (native-inputs
4999 `(("java-junit" ,java-junit)
5000 ("java-hamcrest-core" ,java-hamcrest-core)))
5001 (home-page "http://commons.apache.org/net/")
5002 (synopsis "Client library for many basic Internet protocols")
5003 (description "The Apache Commons Net library implements the client side of
5004many basic Internet protocols. The purpose of the library is to provide
5005fundamental protocol access, not higher-level abstractions.")
5006 (license license:asl2.0)))
5007
5008(define-public java-jsch
5009 (package
5010 (name "java-jsch")
5011 (version "0.1.54")
5012 (source (origin
5013 (method url-fetch)
5014 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5015 version "/jsch-" version ".zip"))
5016 (sha256
5017 (base32
5018 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
5019 (build-system ant-build-system)
5020 (arguments
5021 `(#:build-target "dist"
5022 #:tests? #f ; no tests included
5023 #:phases
5024 (modify-phases %standard-phases
5025 (replace 'install (install-jars "dist")))))
5026 (native-inputs
5027 `(("unzip" ,unzip)))
5028 (home-page "http://www.jcraft.com/jsch/")
5029 (synopsis "Pure Java implementation of SSH2")
5030 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5031to connect to an SSH server and use port forwarding, X11 forwarding, file
5032transfer, etc., and you can integrate its functionality into your own Java
5033programs.")
5034 (license license:bsd-3)))
5035
5036(define-public java-commons-compress
5037 (package
5038 (name "java-commons-compress")
5039 (version "1.13")
5040 (source (origin
5041 (method url-fetch)
5042 (uri (string-append "mirror://apache/commons/compress/source/"
5043 "commons-compress-" version "-src.tar.gz"))
5044 (sha256
5045 (base32
5046 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5047 (build-system ant-build-system)
5048 (arguments
5049 `(#:jar-name "commons-compress.jar"
5050 #:phases
5051 (modify-phases %standard-phases
5052 (add-after 'unpack 'delete-bad-tests
5053 (lambda _
5054 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5055 ;; FIXME: These tests really should not fail. Maybe they are
5056 ;; indicative of problems with our Java packaging work.
5057
5058 ;; This test fails with a null pointer exception.
5059 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5060 ;; This test fails to open test resources.
5061 (delete-file "archivers/zip/ExplodeSupportTest.java")
5062
5063 ;; FIXME: This test adds a dependency on powermock, which is hard to
5064 ;; package at this point.
5065 ;; https://github.com/powermock/powermock
5066 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5067 #t)))))
5068 (inputs
5069 `(("java-junit" ,java-junit)
5070 ("java-hamcrest-core" ,java-hamcrest-core)
5071 ("java-mockito" ,java-mockito-1)
5072 ("java-xz" ,java-xz)))
5073 (home-page "https://commons.apache.org/proper/commons-compress/")
5074 (synopsis "Java library for working with compressed files")
5075 (description "The Apache Commons Compress library defines an API for
5076working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5077Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5078 (license license:asl2.0)))
5079
5080(define-public java-commons-csv
5081 (package
5082 (name "java-commons-csv")
5083 (version "1.4")
5084 (source (origin
5085 (method url-fetch)
5086 (uri (string-append "mirror://apache/commons/csv/source/"
5087 "commons-csv-" version "-src.tar.gz"))
5088 (sha256
5089 (base32
5090 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5091 (build-system ant-build-system)
5092 (arguments
5093 `(#:jar-name "commons-csv.jar"
5094 #:source-dir "src/main/java"
5095 #:tests? #f)); FIXME: requires java-h2
5096 (inputs
5097 `(("java-hamcrest-core" ,java-hamcrest-core)
5098 ("java-commons-io" ,java-commons-io)
5099 ("java-commons-lang3" ,java-commons-lang3)
5100 ("junit" ,java-junit)))
5101 (home-page "https://commons.apache.org/proper/commons-csv/")
5102 (synopsis "Read and write CSV documents")
5103 (description "Commons CSV reads and writes files in variations of the Comma
5104Separated Value (CSV) format. The most common CSV formats are predefined in the
5105CSVFormat class:
5106
5107@itemize
5108@item Microsoft Excel
5109@item Informix UNLOAD
5110@item Informix UNLOAD CSV
5111@item MySQL
5112@item RFC 4180
5113@item TDF
5114@end itemize
5115
5116Custom formats can be created using a fluent style API.")
5117 (license license:asl2.0)))
5118
5119(define-public java-osgi-annotation
5120 (package
5121 (name "java-osgi-annotation")
5122 (version "6.0.0")
5123 (source (origin
5124 (method url-fetch)
5125 (uri (string-append "https://repo1.maven.org/maven2/"
5126 "org/osgi/org.osgi.annotation/" version "/"
5127 "org.osgi.annotation-" version "-sources.jar"))
5128 (sha256
5129 (base32
5130 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5131 (build-system ant-build-system)
5132 (arguments
5133 `(#:tests? #f ; no tests
5134 #:jar-name "osgi-annotation.jar"))
5135 (home-page "https://www.osgi.org")
5136 (synopsis "Annotation module of OSGi framework")
5137 (description
5138 "OSGi, for Open Services Gateway initiative framework, is a module system
5139and service platform for the Java programming language. This package contains
5140the OSGi annotation module, providing additional services to help dynamic
5141components.")
5142 (license license:asl2.0)))
5143
5144(define-public java-osgi-core
5145 (package
5146 (name "java-osgi-core")
5147 (version "6.0.0")
5148 (source (origin
5149 (method url-fetch)
5150 (uri (string-append "https://repo1.maven.org/maven2/"
5151 "org/osgi/org.osgi.core/" version "/"
5152 "org.osgi.core-" version "-sources.jar"))
5153 (sha256
5154 (base32
5155 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5156 (build-system ant-build-system)
5157 (arguments
5158 `(#:tests? #f ; no tests
5159 #:jar-name "osgi-core.jar"))
5160 (inputs
5161 `(("java-osgi-annotation" ,java-osgi-annotation)))
5162 (home-page "https://www.osgi.org")
5163 (synopsis "Core module of OSGi framework")
5164 (description
5165 "OSGi, for Open Services Gateway initiative framework, is a module system
5166and service platform for the Java programming language. This package contains
5167the OSGi Core module.")
5168 (license license:asl2.0)))
5169
5170(define-public java-osgi-service-event
5171 (package
5172 (name "java-osgi-service-event")
5173 (version "1.3.1")
5174 (source (origin
5175 (method url-fetch)
5176 (uri (string-append "https://repo1.maven.org/maven2/"
5177 "org/osgi/org.osgi.service.event/"
5178 version "/org.osgi.service.event-"
5179 version "-sources.jar"))
5180 (sha256
5181 (base32
5182 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5183 (build-system ant-build-system)
5184 (arguments
5185 `(#:tests? #f ; no tests
5186 #:jar-name "osgi-service-event.jar"))
5187 (inputs
5188 `(("java-osgi-annotation" ,java-osgi-annotation)
5189 ("java-osgi-core" ,java-osgi-core)))
5190 (home-page "https://www.osgi.org")
5191 (synopsis "OSGi service event module")
5192 (description
5193 "OSGi, for Open Services Gateway initiative framework, is a module system
5194and service platform for the Java programming language. This package contains
5195the OSGi @code{org.osgi.service.event} module.")
5196 (license license:asl2.0)))
5197
5198(define-public java-eclipse-osgi
5199 (package
5200 (name "java-eclipse-osgi")
5201 (version "3.11.3")
5202 (source (origin
5203 (method url-fetch)
5204 (uri (string-append "https://repo1.maven.org/maven2/"
5205 "org/eclipse/platform/org.eclipse.osgi/"
5206 version "/org.eclipse.osgi-"
5207 version "-sources.jar"))
5208 (sha256
5209 (base32
5210 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5211 (build-system ant-build-system)
5212 (arguments
5213 `(#:tests? #f ; no tests included
5214 #:jar-name "eclipse-equinox-osgi.jar"))
5215 (inputs
5216 `(("java-osgi-annotation" ,java-osgi-annotation)))
5217 (home-page "http://www.eclipse.org/equinox/")
5218 (synopsis "Eclipse Equinox OSGi framework")
5219 (description "This package provides an implementation of the OSGi Core
5220specification.")
5221 (license license:epl1.0)))
5222
5223(define-public java-eclipse-equinox-common
5224 (package
5225 (name "java-eclipse-equinox-common")
5226 (version "3.8.0")
5227 (source (origin
5228 (method url-fetch)
5229 (uri (string-append "https://repo1.maven.org/maven2/"
5230 "org/eclipse/platform/org.eclipse.equinox.common/"
5231 version "/org.eclipse.equinox.common-"
5232 version "-sources.jar"))
5233 (sha256
5234 (base32
5235 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
5236 (build-system ant-build-system)
5237 (arguments
5238 `(#:tests? #f ; no tests included
5239 #:jar-name "eclipse-equinox-common.jar"))
5240 (inputs
5241 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5242 (home-page "http://www.eclipse.org/equinox/")
5243 (synopsis "Common Eclipse runtime")
5244 (description "This package provides the common Eclipse runtime.")
5245 (license license:epl1.0)))
5246
5247(define-public java-eclipse-core-jobs
5248 (package
5249 (name "java-eclipse-core-jobs")
5250 (version "3.8.0")
5251 (source (origin
5252 (method url-fetch)
5253 (uri (string-append "https://repo1.maven.org/maven2/"
5254 "org/eclipse/platform/org.eclipse.core.jobs/"
5255 version "/org.eclipse.core.jobs-"
5256 version "-sources.jar"))
5257 (sha256
5258 (base32
5259 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5260 (build-system ant-build-system)
5261 (arguments
5262 `(#:tests? #f ; no tests included
5263 #:jar-name "eclipse-core-jobs.jar"))
5264 (inputs
5265 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5266 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5267 (home-page "http://www.eclipse.org/equinox/")
5268 (synopsis "Eclipse jobs mechanism")
5269 (description "This package provides the Eclipse jobs mechanism.")
5270 (license license:epl1.0)))
5271
5272(define-public java-eclipse-equinox-registry
5273 (package
5274 (name "java-eclipse-equinox-registry")
5275 (version "3.6.100")
5276 (source (origin
5277 (method url-fetch)
5278 (uri (string-append "https://repo1.maven.org/maven2/"
5279 "org/eclipse/platform/org.eclipse.equinox.registry/"
5280 version "/org.eclipse.equinox.registry-"
5281 version "-sources.jar"))
5282 (sha256
5283 (base32
5284 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5285 (build-system ant-build-system)
5286 (arguments
5287 `(#:tests? #f ; no tests included
5288 #:jar-name "eclipse-equinox-registry.jar"))
5289 (inputs
5290 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5291 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5292 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5293 (home-page "http://www.eclipse.org/equinox/")
5294 (synopsis "Eclipse extension registry support")
5295 (description "This package provides support for the Eclipse extension
5296registry.")
5297 (license license:epl1.0)))
5298
5299(define-public java-eclipse-equinox-app
5300 (package
5301 (name "java-eclipse-equinox-app")
5302 (version "1.3.400")
5303 (source (origin
5304 (method url-fetch)
5305 (uri (string-append "https://repo1.maven.org/maven2/"
5306 "org/eclipse/platform/org.eclipse.equinox.app/"
5307 version "/org.eclipse.equinox.app-"
5308 version "-sources.jar"))
5309 (sha256
5310 (base32
5311 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5312 (build-system ant-build-system)
5313 (arguments
5314 `(#:tests? #f ; no tests included
5315 #:jar-name "eclipse-equinox-app.jar"))
5316 (inputs
5317 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5318 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5319 ("java-eclipse-osgi" ,java-eclipse-osgi)
5320 ("java-osgi-service-event" ,java-osgi-service-event)))
5321 (home-page "http://www.eclipse.org/equinox/")
5322 (synopsis "Equinox application container")
5323 (description "This package provides the Equinox application container for
5324Eclipse.")
5325 (license license:epl1.0)))
5326
5327(define-public java-eclipse-equinox-preferences
5328 (package
5329 (name "java-eclipse-equinox-preferences")
5330 (version "3.6.1")
5331 (source (origin
5332 (method url-fetch)
5333 (uri (string-append "https://repo1.maven.org/maven2/"
5334 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5335 version "/org.eclipse.equinox.preferences-"
5336 version "-sources.jar"))
5337 (sha256
5338 (base32
5339 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5340 (build-system ant-build-system)
5341 (arguments
5342 `(#:tests? #f ; no tests included
5343 #:jar-name "eclipse-equinox-preferences.jar"))
5344 (inputs
5345 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5346 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5347 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5348 (home-page "http://www.eclipse.org/equinox/")
5349 (synopsis "Eclipse preferences mechanism")
5350 (description "This package provides the Eclipse preferences mechanism with
5351the module @code{org.eclipse.equinox.preferences}.")
5352 (license license:epl1.0)))
5353
5354(define-public java-eclipse-core-contenttype
5355 (package
5356 (name "java-eclipse-core-contenttype")
5357 (version "3.5.100")
5358 (source (origin
5359 (method url-fetch)
5360 (uri (string-append "https://repo1.maven.org/maven2/"
5361 "org/eclipse/platform/org.eclipse.core.contenttype/"
5362 version "/org.eclipse.core.contenttype-"
5363 version "-sources.jar"))
5364 (sha256
5365 (base32
5366 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5367 (build-system ant-build-system)
5368 (arguments
5369 `(#:tests? #f ; no tests included
5370 #:jar-name "eclipse-core-contenttype.jar"))
5371 (inputs
5372 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5373 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5374 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5375 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5376 (home-page "http://www.eclipse.org/")
5377 (synopsis "Eclipse content mechanism")
5378 (description "This package provides the Eclipse content mechanism in the
5379@code{org.eclipse.core.contenttype} module.")
5380 (license license:epl1.0)))
5381
5382(define-public java-eclipse-core-runtime
5383 (package
5384 (name "java-eclipse-core-runtime")
5385 (version "3.12.0")
5386 (source (origin
5387 (method url-fetch)
5388 (uri (string-append "https://repo1.maven.org/maven2/"
5389 "org/eclipse/platform/org.eclipse.core.runtime/"
5390 version "/org.eclipse.core.runtime-"
5391 version "-sources.jar"))
5392 (sha256
5393 (base32
5394 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5395 (build-system ant-build-system)
5396 (arguments
5397 `(#:tests? #f ; no tests included
5398 #:jar-name "eclipse-core-runtime.jar"))
5399 (inputs
5400 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5401 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5402 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5403 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5404 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5405 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5406 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5407 (home-page "https://www.eclipse.org/")
5408 (synopsis "Eclipse core runtime")
5409 (description "This package provides the Eclipse core runtime with the
5410module @code{org.eclipse.core.runtime}.")
5411 (license license:epl1.0)))
5412
5413(define-public java-eclipse-core-filesystem
5414 (package
5415 (name "java-eclipse-core-filesystem")
5416 (version "1.6.1")
5417 (source (origin
5418 (method url-fetch)
5419 (uri (string-append "https://repo1.maven.org/maven2/"
5420 "org/eclipse/platform/org.eclipse.core.filesystem/"
5421 version "/org.eclipse.core.filesystem-"
5422 version "-sources.jar"))
5423 (sha256
5424 (base32
5425 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5426 (build-system ant-build-system)
5427 (arguments
5428 `(#:tests? #f ; no tests included
5429 #:jar-name "eclipse-core-filesystem.jar"))
5430 (inputs
5431 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5432 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5433 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5434 (home-page "https://www.eclipse.org/")
5435 (synopsis "Eclipse core file system")
5436 (description "This package provides the Eclipse core file system with the
5437module @code{org.eclipse.core.filesystem}.")
5438 (license license:epl1.0)))
5439
5440(define-public java-eclipse-core-expressions
5441 (package
5442 (name "java-eclipse-core-expressions")
5443 (version "3.5.100")
5444 (source (origin
5445 (method url-fetch)
5446 (uri (string-append "https://repo1.maven.org/maven2/"
5447 "org/eclipse/platform/org.eclipse.core.expressions/"
5448 version "/org.eclipse.core.expressions-"
5449 version "-sources.jar"))
5450 (sha256
5451 (base32
5452 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5453 (build-system ant-build-system)
5454 (arguments
5455 `(#:tests? #f ; no tests included
5456 #:jar-name "eclipse-core-expressions.jar"))
5457 (inputs
5458 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5459 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5460 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5461 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5462 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5463 (home-page "https://www.eclipse.org/")
5464 (synopsis "Eclipse core expression language")
5465 (description "This package provides the Eclipse core expression language
5466with the @code{org.eclipse.core.expressions} module.")
5467 (license license:epl1.0)))
5468
5469(define-public java-eclipse-core-variables
5470 (package
5471 (name "java-eclipse-core-variables")
5472 (version "3.3.0")
5473 (source (origin
5474 (method url-fetch)
5475 (uri (string-append "https://repo1.maven.org/maven2/"
5476 "org/eclipse/platform/org.eclipse.core.variables/"
5477 version "/org.eclipse.core.variables-"
5478 version "-sources.jar"))
5479 (sha256
5480 (base32
5481 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5482 (build-system ant-build-system)
5483 (arguments
5484 `(#:tests? #f ; no tests included
5485 #:jar-name "eclipse-core-variables.jar"))
5486 (inputs
5487 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5488 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5489 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5490 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5491 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5492 (home-page "https://www.eclipse.org/platform")
5493 (synopsis "Eclipse core variables")
5494 (description "This package provides the Eclipse core variables module
5495@code{org.eclipse.core.variables}.")
5496 (license license:epl1.0)))
5497
5498(define-public java-eclipse-ant-core
5499 (package
5500 (name "java-eclipse-ant-core")
5501 (version "3.4.100")
5502 (source (origin
5503 (method url-fetch)
5504 (uri (string-append "https://repo1.maven.org/maven2/"
5505 "org/eclipse/platform/org.eclipse.ant.core/"
5506 version "/org.eclipse.ant.core-"
5507 version "-sources.jar"))
5508 (sha256
5509 (base32
5510 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5511 (build-system ant-build-system)
5512 (arguments
5513 `(#:tests? #f ; no tests included
5514 #:jar-name "eclipse-ant-core.jar"))
5515 (inputs
5516 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5517 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5518 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5519 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5520 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5521 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5522 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5523 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5524 (home-page "https://www.eclipse.org/platform")
5525 (synopsis "Ant build tool core libraries")
5526 (description "This package provides the ant build tool core libraries with
5527the module @code{org.eclipse.ant.core}.")
5528 (license license:epl1.0)))
5529
5530(define-public java-eclipse-core-resources
5531 (package
5532 (name "java-eclipse-core-resources")
5533 (version "3.11.1")
5534 (source (origin
5535 (method url-fetch)
5536 (uri (string-append "https://repo1.maven.org/maven2/"
5537 "org/eclipse/platform/org.eclipse.core.resources/"
5538 version "/org.eclipse.core.resources-"
5539 version "-sources.jar"))
5540 (sha256
5541 (base32
5542 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5543 (build-system ant-build-system)
5544 (arguments
5545 `(#:tests? #f ; no tests included
5546 #:jar-name "eclipse-core-resources.jar"))
5547 (inputs
5548 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5549 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5550 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5551 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5552 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5553 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5554 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5555 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5556 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5557 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5558 (home-page "https://www.eclipse.org/")
5559 (synopsis "Eclipse core resource management")
5560 (description "This package provides the Eclipse core resource management
5561module @code{org.eclipse.core.resources}.")
5562 (license license:epl1.0)))
5563
5564(define-public java-eclipse-compare-core
5565 (package
5566 (name "java-eclipse-compare-core")
5567 (version "3.6.0")
5568 (source (origin
5569 (method url-fetch)
5570 (uri (string-append "https://repo1.maven.org/maven2/"
5571 "org/eclipse/platform/org.eclipse.compare.core/"
5572 version "/org.eclipse.compare.core-"
5573 version "-sources.jar"))
5574 (sha256
5575 (base32
5576 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5577 (build-system ant-build-system)
5578 (arguments
5579 `(#:tests? #f ; no tests included
5580 #:jar-name "eclipse-compare-core.jar"))
5581 (inputs
5582 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5583 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5584 ("java-eclipse-osgi" ,java-eclipse-osgi)
5585 ("java-icu4j" ,java-icu4j)))
5586 (home-page "https://www.eclipse.org/")
5587 (synopsis "Eclipse core compare support")
5588 (description "This package provides the Eclipse core compare support
5589module @code{org.eclipse.compare.core}.")
5590 (license license:epl1.0)))
5591
5592(define-public java-eclipse-team-core
5593 (package
5594 (name "java-eclipse-team-core")
5595 (version "3.8.0")
5596 (source (origin
5597 (method url-fetch)
5598 (uri (string-append "https://repo1.maven.org/maven2/"
5599 "org/eclipse/platform/org.eclipse.team.core/"
5600 version "/org.eclipse.team.core-"
5601 version "-sources.jar"))
5602 (sha256
5603 (base32
5604 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5605 (build-system ant-build-system)
5606 (arguments
5607 `(#:tests? #f ; no tests included
5608 #:jar-name "eclipse-team-core.jar"))
5609 (inputs
5610 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5611 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5612 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5613 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5614 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5615 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5616 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5617 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5618 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5619 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5620 (home-page "https://www.eclipse.org/platform")
5621 (synopsis "Eclipse team support core")
5622 (description "This package provides the Eclipse team support core module
5623@code{org.eclipse.team.core}.")
5624 (license license:epl1.0)))
5625
5626(define-public java-eclipse-core-commands
5627 (package
5628 (name "java-eclipse-core-commands")
5629 (version "3.8.1")
5630 (source (origin
5631 (method url-fetch)
5632 (uri (string-append "https://repo1.maven.org/maven2/"
5633 "org/eclipse/platform/org.eclipse.core.commands/"
5634 version "/org.eclipse.core.commands-"
5635 version "-sources.jar"))
5636 (sha256
5637 (base32
5638 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5639 (build-system ant-build-system)
5640 (arguments
5641 `(#:tests? #f ; no tests included
5642 #:jar-name "eclipse-core-commands.jar"))
5643 (inputs
5644 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5645 (home-page "https://www.eclipse.org/platform")
5646 (synopsis "Eclipse core commands")
5647 (description "This package provides Eclipse core commands in the module
5648@code{org.eclipse.core.commands}.")
5649 (license license:epl1.0)))
5650
5651(define-public java-eclipse-text
5652 (package
5653 (name "java-eclipse-text")
5654 (version "3.6.0")
5655 (source (origin
5656 (method url-fetch)
5657 (uri (string-append "https://repo1.maven.org/maven2/"
5658 "org/eclipse/platform/org.eclipse.text/"
5659 version "/org.eclipse.text-"
5660 version "-sources.jar"))
5661 (sha256
5662 (base32
5663 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5664 (build-system ant-build-system)
5665 (arguments
5666 `(#:tests? #f ; no tests included
5667 #:jar-name "eclipse-text.jar"
5668 #:phases
5669 (modify-phases %standard-phases
5670 ;; When creating a new category we must make sure that the new list
5671 ;; matches List<Position>. By default it seems to be too generic
5672 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5673 ;; Without this we get this error:
5674 ;;
5675 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5676 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5677 ;; [javac] fPositions.put(category, new ArrayList<>());
5678 ;; [javac] ^
5679 ;; [javac] required: String,List<Position>
5680 ;; [javac] found: String,ArrayList<Object>
5681 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5682 ;; to List<Position> by method invocation conversion
5683 ;; [javac] where K,V are type-variables:
5684 ;; [javac] K extends Object declared in interface Map
5685 ;; [javac] V extends Object declared in interface Map
5686 ;;
5687 ;; I don't know if this is a good fix. I suspect it is not, but it
5688 ;; seems to work.
5689 (add-after 'unpack 'fix-compilation-error
5690 (lambda _
5691 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5692 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5693 "Positions.put(category, new ArrayList<Position>());"))
5694 #t)))))
5695 (inputs
5696 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5697 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5698 ("java-icu4j" ,java-icu4j)))
5699 (home-page "http://www.eclipse.org/platform")
5700 (synopsis "Eclipse text library")
5701 (description "Platform Text is part of the Platform UI project and
5702provides the basic building blocks for text and text editors within Eclipse
5703and contributes the Eclipse default text editor.")
5704 (license license:epl1.0)))
5705
5706(define-public java-eclipse-jdt-core
5707 (package
5708 (name "java-eclipse-jdt-core")
5709 (version "3.12.3")
5710 (source (origin
5711 (method url-fetch)
5712 (uri (string-append "https://repo1.maven.org/maven2/"
5713 "org/eclipse/jdt/org.eclipse.jdt.core/"
5714 version "/org.eclipse.jdt.core-"
5715 version "-sources.jar"))
5716 (sha256
5717 (base32
5718 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5719 (build-system ant-build-system)
5720 (arguments
5721 `(#:tests? #f ; no tests included
5722 #:jar-name "eclipse-jdt-core.jar"))
5723 (inputs
5724 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5725 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5726 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5727 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5728 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5729 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5730 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5731 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5732 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5733 ("java-eclipse-osgi" ,java-eclipse-osgi)
5734 ("java-eclipse-text" ,java-eclipse-text)))
5735 (home-page "https://www.eclipse.org/jdt")
5736 (synopsis "Java development tools core libraries")
5737 (description "This package provides the core libraries of the Eclipse Java
5738development tools.")
5739 (license license:epl1.0)))
5740
5741(define-public java-javax-mail
5742 (package
5743 (name "java-javax-mail")
5744 (version "1.5.6")
5745 (source (origin
5746 (method url-fetch)
5747 (uri (string-append "https://repo1.maven.org/maven2/"
5748 "com/sun/mail/javax.mail/"
5749 version "/javax.mail-"
5750 version "-sources.jar"))
5751 (sha256
5752 (base32
5753 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5754 (build-system ant-build-system)
5755 (arguments
5756 `(#:tests? #f ; no tests
5757 #:jar-name "javax-mail.jar"))
5758 (home-page "https://javamail.java.net")
5759 (synopsis "Reference implementation of the JavaMail API")
5760 (description
5761 "This package provides versions of the JavaMail API implementation, IMAP,
5762SMTP, and POP3 service providers, some examples, and documentation for the
5763JavaMail API.")
5764 ;; GPLv2 only with "classpath exception".
5765 (license license:gpl2)))
5766
5767(define-public java-log4j-api
5768 (package
5769 (name "java-log4j-api")
5770 (version "2.4.1")
5771 (source (origin
5772 (method url-fetch)
5773 (uri (string-append "mirror://apache/logging/log4j/" version
5774 "/apache-log4j-" version "-src.tar.gz"))
5775 (sha256
5776 (base32
5777 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5778 (build-system ant-build-system)
5779 (arguments
5780 `(#:tests? #f ; tests require unpackaged software
5781 #:jar-name "log4j-api.jar"
5782 #:make-flags
5783 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5784 "/share/java"))
5785 #:phases
5786 (modify-phases %standard-phases
5787 (add-after 'unpack 'enter-dir
5788 (lambda _ (chdir "log4j-api") #t))
5789 ;; FIXME: The tests require additional software that has not been
5790 ;; packaged yet, such as
5791 ;; * org.apache.maven
5792 ;; * org.apache.felix
5793 (add-after 'enter-dir 'delete-tests
5794 (lambda _ (delete-file-recursively "src/test") #t)))))
5795 (inputs
5796 `(("java-osgi-core" ,java-osgi-core)
5797 ("java-hamcrest-core" ,java-hamcrest-core)
5798 ("java-junit" ,java-junit)))
5799 (home-page "http://logging.apache.org/log4j/2.x/")
5800 (synopsis "API module of the Log4j logging framework for Java")
5801 (description
5802 "This package provides the API module of the Log4j logging framework for
5803Java.")
5804 (license license:asl2.0)))
5805
5806(define-public java-log4j-core
5807 (package
5808 (inherit java-log4j-api)
5809 (name "java-log4j-core")
5810 (inputs
5811 `(("java-osgi-core" ,java-osgi-core)
5812 ("java-hamcrest-core" ,java-hamcrest-core)
5813 ("java-log4j-api" ,java-log4j-api)
5814 ("java-mail" ,java-mail)
5815 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5816 ("java-lmax-disruptor" ,java-lmax-disruptor)
5817 ("java-kafka" ,java-kafka-clients)
5818 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5819 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5820 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5821 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5822 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5823 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5824 ("java-commons-compress" ,java-commons-compress)
5825 ("java-commons-csv" ,java-commons-csv)
5826 ("java-jeromq" ,java-jeromq)
5827 ("java-junit" ,java-junit)))
5828 (native-inputs
5829 `(("hamcrest" ,java-hamcrest-all)
5830 ("java-commons-io" ,java-commons-io)
5831 ("java-commons-lang3" ,java-commons-lang3)
5832 ("slf4j" ,java-slf4j-api)))
5833 (arguments
5834 `(#:tests? #f ; tests require more dependencies
5835 #:test-dir "src/test"
5836 #:source-dir "src/main/java"
5837 #:jar-name "log4j-core.jar"
5838 #:jdk ,icedtea-8
5839 #:make-flags
5840 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5841 "/share/java"))
5842 #:phases
5843 (modify-phases %standard-phases
5844 (add-after 'unpack 'enter-dir
5845 (lambda _ (chdir "log4j-core") #t)))))
5846 (synopsis "Core component of the Log4j framework")
5847 (description "This package provides the core component of the Log4j
5848logging framework for Java.")))
5849
5850(define-public java-log4j-1.2-api
5851 (package
5852 (inherit java-log4j-api)
5853 (name "java-log4j-1.2-api")
5854 (arguments
5855 `(#:jar-name "java-log4j-1.2-api.jar"
5856 #:source-dir "log4j-1.2-api/src/main/java"
5857 #:jdk ,icedtea-8
5858 ;; Tests require maven-model (and other maven subprojects), which is a
5859 ;; cyclic dependency.
5860 #:tests? #f))
5861 (inputs
5862 `(("log4j-api" ,java-log4j-api)
5863 ("log4j-core" ,java-log4j-core)
5864 ("osgi-core" ,java-osgi-core)
5865 ("eclipse-osgi" ,java-eclipse-osgi)
5866 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5867
5868(define-public java-commons-cli
5869 (package
5870 (name "java-commons-cli")
5871 (version "1.4")
5872 (source (origin
5873 (method url-fetch)
5874 (uri (string-append "mirror://apache/commons/cli/source/"
5875 "commons-cli-" version "-src.tar.gz"))
5876 (sha256
5877 (base32
5878 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
5879 (build-system ant-build-system)
5880 ;; TODO: javadoc
5881 (arguments
5882 `(#:jar-name "commons-cli.jar"))
5883 (native-inputs
5884 `(("java-junit" ,java-junit)
5885 ("java-hamcrest-core" ,java-hamcrest-core)))
5886 (home-page "http://commons.apache.org/cli/")
5887 (synopsis "Command line arguments and options parsing library")
5888 (description "The Apache Commons CLI library provides an API for parsing
5889command line options passed to programs. It is also able to print help
5890messages detailing the options available for a command line tool.
5891
5892Commons CLI supports different types of options:
5893
5894@itemize
5895@item POSIX like options (ie. tar -zxvf foo.tar.gz)
5896@item GNU like long options (ie. du --human-readable --max-depth=1)
5897@item Java like properties (ie. java -Djava.awt.headless=true Foo)
5898@item Short options with value attached (ie. gcc -O2 foo.c)
5899@item long options with single hyphen (ie. ant -projecthelp)
5900@end itemize
5901
5902This is a part of the Apache Commons Project.")
5903 (license license:asl2.0)))
5904
5905(define-public java-commons-codec
5906 (package
5907 (name "java-commons-codec")
5908 (version "1.10")
5909 (source (origin
5910 (method url-fetch)
5911 (uri (string-append "mirror://apache/commons/codec/source/"
5912 "commons-codec-" version "-src.tar.gz"))
5913 (sha256
5914 (base32
5915 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5916 (build-system ant-build-system)
5917 (outputs '("out" "doc"))
5918 (arguments
5919 `(#:test-target "test"
5920 #:make-flags
5921 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5922 (junit (assoc-ref %build-inputs "java-junit")))
5923 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5924 (string-append "-Dhamcrest.jar=" hamcrest
5925 "/share/java/hamcrest-core.jar")
5926 ;; Do not append version to jar.
5927 "-Dfinal.name=commons-codec"))
5928 #:phases
5929 (modify-phases %standard-phases
5930 (add-after 'build 'build-javadoc ant-build-javadoc)
5931 (replace 'install (install-jars "dist"))
5932 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5933 (native-inputs
5934 `(("java-junit" ,java-junit)
5935 ("java-hamcrest-core" ,java-hamcrest-core)))
5936 (home-page "http://commons.apache.org/codec/")
5937 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5938 (description "The codec package contains simple encoder and decoders for
5939various formats such as Base64 and Hexadecimal. In addition to these widely
5940used encoders and decoders, the codec package also maintains a collection of
5941phonetic encoding utilities.
5942
5943This is a part of the Apache Commons Project.")
5944 (license license:asl2.0)))
5945
5946(define-public java-commons-daemon
5947 (package
5948 (name "java-commons-daemon")
5949 (version "1.0.15")
5950 (source (origin
5951 (method url-fetch)
5952 (uri (string-append "mirror://apache/commons/daemon/source/"
5953 "commons-daemon-" version "-src.tar.gz"))
5954 (sha256
5955 (base32
5956 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5957 (build-system ant-build-system)
5958 (arguments
5959 `(#:test-target "test"
5960 #:phases
5961 (modify-phases %standard-phases
5962 (add-after 'build 'build-javadoc ant-build-javadoc)
5963 (replace 'install (install-jars "dist"))
5964 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5965 (native-inputs
5966 `(("java-junit" ,java-junit)))
5967 (home-page "http://commons.apache.org/daemon/")
5968 (synopsis "Library to launch Java applications as daemons")
5969 (description "The Daemon package from Apache Commons can be used to
5970implement Java applications which can be launched as daemons. For example the
5971program will be notified about a shutdown so that it can perform cleanup tasks
5972before its process of execution is destroyed by the operation system.
5973
5974This package contains the Java library. You will also need the actual binary
5975for your architecture which is provided by the jsvc package.
5976
5977This is a part of the Apache Commons Project.")
5978 (license license:asl2.0)))
5979
5980(define-public java-javaewah
5981 (package
5982 (name "java-javaewah")
5983 (version "1.1.6")
5984 (source (origin
5985 (method url-fetch)
5986 (uri (string-append "https://github.com/lemire/javaewah/"
5987 "archive/JavaEWAH-" version ".tar.gz"))
5988 (sha256
5989 (base32
5990 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5991 (build-system ant-build-system)
5992 (arguments `(#:jar-name "javaewah.jar"))
5993 (inputs
5994 `(("java-junit" ,java-junit)
5995 ("java-hamcrest-core" ,java-hamcrest-core)))
5996 (home-page "https://github.com/lemire/javaewah")
5997 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5998 (description "This is a word-aligned compressed variant of the Java
5999@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6000compression scheme. It can be used to implement bitmap indexes.
6001
6002The goal of word-aligned compression is not to achieve the best compression,
6003but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6004cycles, maybe at the expense of storage. However, the EWAH scheme is always
6005more efficient storage-wise than an uncompressed bitmap (as implemented in the
6006@code{BitSet} class by Sun).")
6007 ;; GPL2.0 derivates are explicitly allowed.
6008 (license license:asl2.0)))
6009
6010(define-public java-slf4j-api
6011 (package
6012 (name "java-slf4j-api")
6013 (version "1.7.25")
6014 (source (origin
6015 (method url-fetch)
6016 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6017 version ".tar.gz"))
6018 (sha256
6019 (base32
6020 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6021 (modules '((guix build utils)))
6022 ;; Delete bundled jars.
6023 (snippet
6024 '(begin
6025 (for-each delete-file (find-files "." "\\.jar$"))
6026 #t))))
6027 (build-system ant-build-system)
6028 (arguments
6029 `(#:jar-name "slf4j-api.jar"
6030 #:source-dir "slf4j-api/src/main"
6031 #:test-dir "slf4j-api/src/test"
6032 #:phases
6033 (modify-phases %standard-phases
6034 (add-after 'build 'regenerate-jar
6035 (lambda _
6036 ;; pom.xml ignores these files in the jar creation process. If we don't,
6037 ;; we get the error "This code should have never made it into slf4j-api.jar"
6038 (delete-file-recursively "build/classes/org/slf4j/impl")
6039 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6040 "build/classes" ".")))
6041 (add-before 'check 'dont-test-abstract-classes
6042 (lambda _
6043 ;; abstract classes are not meant to be run with junit
6044 (substitute* "build.xml"
6045 (("<include name=\"\\*\\*/\\*Test.java\" />")
6046 (string-append "<include name=\"**/*Test.java\" />"
6047 "<exclude name=\"**/MultithreadedInitializationTest"
6048 ".java\" />")))
6049 #t)))))
6050 (inputs
6051 `(("java-junit" ,java-junit)
6052 ("java-hamcrest-core" ,java-hamcrest-core)))
6053 (home-page "https://www.slf4j.org/")
6054 (synopsis "Simple logging facade for Java")
6055 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6056simple facade or abstraction for various logging
6057frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6058allowing the end user to plug in the desired logging framework at deployment
6059time.")
6060 (license license:expat)))
6061
6062(define java-slf4j-api-bootstrap
6063 (package
6064 (inherit java-slf4j-api)
6065 (name "java-slf4j-api-bootstrap")
6066 (inputs `())
6067 (arguments
6068 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6069 ((#:tests? _ #f) #f)))))
6070
6071(define-public java-slf4j-simple
6072 (package
6073 (name "java-slf4j-simple")
6074 (version "1.7.25")
6075 (source (package-source java-slf4j-api))
6076 (build-system ant-build-system)
6077 (arguments
6078 `(#:jar-name "slf4j-simple.jar"
6079 #:source-dir "slf4j-simple/src/main"
6080 #:test-dir "slf4j-simple/src/test"
6081 #:phases
6082 (modify-phases %standard-phases
6083 ;; The tests need some test classes from slf4j-api
6084 (add-before 'check 'build-slf4j-api-test-helpers
6085 (lambda _
6086 ;; Add current dir to CLASSPATH ...
6087 (setenv "CLASSPATH"
6088 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6089 ;; ... and build test helper classes here:
6090 (apply invoke
6091 `("javac" "-d" "."
6092 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6093 (inputs
6094 `(("java-junit" ,java-junit)
6095 ("java-hamcrest-core" ,java-hamcrest-core)
6096 ("java-slf4j-api" ,java-slf4j-api)))
6097 (home-page "https://www.slf4j.org/")
6098 (synopsis "Simple implementation of simple logging facade for Java")
6099 (description "SLF4J binding for the Simple implementation, which outputs
6100all events to System.err. Only messages of level INFO and higher are
6101printed.")
6102 (license license:expat)))
6103
6104(define-public antlr2
6105 (package
6106 (name "antlr2")
6107 (version "2.7.7")
6108 (source (origin
6109 (method url-fetch)
6110 (uri (string-append "http://www.antlr2.org/download/antlr-"
6111 version ".tar.gz"))
6112 (sha256
6113 (base32
6114 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6115 (modules '((guix build utils)))
6116 (snippet
6117 '(begin
6118 (delete-file "antlr.jar")
6119 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6120 (("#include <map>")
6121 (string-append
6122 "#include <map>\n"
6123 "#define EOF (-1)\n"
6124 "#include <strings.h>")))
6125 (substitute* "configure"
6126 (("/bin/sh") "sh"))
6127 #t))))
6128 (build-system gnu-build-system)
6129 (arguments
6130 `(#:tests? #f ; no test target
6131 #:imported-modules ((guix build ant-build-system)
6132 (guix build syscalls)
6133 ,@%gnu-build-system-modules)
6134 #:modules (((guix build ant-build-system) #:prefix ant:)
6135 (guix build gnu-build-system)
6136 (guix build utils))
6137 #:phases
6138 (modify-phases %standard-phases
6139 (add-after 'install 'strip-jar-timestamps
6140 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6141 (add-after 'configure 'fix-bin-ls
6142 (lambda _
6143 (substitute* (find-files "." "Makefile")
6144 (("/bin/ls") "ls"))
6145 #t)))))
6146 (native-inputs
6147 `(("which" ,which)
6148 ("zip" ,zip)
6149 ("java" ,icedtea "jdk")))
6150 (inputs
6151 `(("java" ,icedtea)))
6152 (home-page "http://www.antlr2.org")
6153 (synopsis "Framework for constructing recognizers, compilers, and translators")
6154 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6155is a language tool that provides a framework for constructing recognizers,
6156compilers, and translators from grammatical descriptions containing Java, C#,
6157C++, or Python actions. ANTLR provides excellent support for tree construction,
6158tree walking, and translation.")
6159 (license license:public-domain)))
6160
6161(define-public java-stringtemplate-3
6162 (package
6163 (name "java-stringtemplate")
6164 (version "3.2.1")
6165 (source (origin
6166 (method url-fetch)
6167 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6168 "gh-pages/download/stringtemplate-"
6169 version ".tar.gz"))
6170 (sha256
6171 (base32
6172 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6173 (build-system ant-build-system)
6174 (arguments
6175 `(#:jar-name (string-append ,name "-" ,version ".jar")
6176 #:test-dir "test"
6177 #:modules ((guix build ant-build-system)
6178 (guix build utils)
6179 (srfi srfi-1))
6180 #:phases
6181 (modify-phases %standard-phases
6182 (add-before 'check 'fix-tests
6183 (lambda _
6184 (substitute* "build.xml"
6185 (("\\$\\{test.home\\}/java")
6186 "${test.home}/org"))
6187 #t))
6188 (add-before 'build 'generate-grammar
6189 (lambda _
6190 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6191 (for-each (lambda (file)
6192 (format #t "~a\n" file)
6193 (invoke "antlr" file))
6194 '("template.g" "angle.bracket.template.g" "action.g"
6195 "eval.g" "group.g" "interface.g")))
6196 #t)))))
6197 (native-inputs
6198 `(("antlr" ,antlr2)
6199 ("java-junit" ,java-junit)))
6200 (home-page "http://www.stringtemplate.org")
6201 (synopsis "Template engine to generate formatted text output")
6202 (description "StringTemplate is a java template engine (with ports for C#,
6203Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6204or any other formatted text output. StringTemplate is particularly good at
6205code generators, multiple site skins, and internationalization / localization.
6206StringTemplate also powers ANTLR.")
6207 (license license:bsd-3)))
6208
6209;; antlr3 is partially written using antlr3 grammar files. It also depends on
6210;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6211;; files and uses antlr3 at runtime. The latest version requires a recent version
6212;; of antlr3 at runtime.
6213;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6214;; This version of ST4 is sufficient for the latest antlr3.
6215;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6216;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6217;; against the latest ST4.
6218;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6219;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6220;; only grammar files with the antlr2 syntax.
6221;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6222
6223(define-public java-stringtemplate
6224 (package (inherit java-stringtemplate-3)
6225 (name "java-stringtemplate")
6226 (version "4.0.8")
6227 (source (origin
6228 (method url-fetch)
6229 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6230 version ".tar.gz"))
6231 (file-name (string-append name "-" version ".tar.gz"))
6232 (sha256
6233 (base32
6234 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6235 (build-system ant-build-system)
6236 (arguments
6237 `(#:jar-name (string-append ,name "-" ,version ".jar")
6238 #:tests? #f ; FIXME: tests fail for unknown reasons
6239 #:test-dir "test"
6240 #:modules ((guix build ant-build-system)
6241 (guix build utils)
6242 (srfi srfi-1))
6243 #:phases
6244 (modify-phases %standard-phases
6245 (add-before 'check 'fix-test-target
6246 (lambda _
6247 (substitute* "build.xml"
6248 (("\\$\\{test.home\\}/java") "${test.home}/")
6249 (("\\*Test.java") "Test*.java"))
6250 #t))
6251 (add-before 'build 'generate-grammar
6252 (lambda _
6253 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6254 (for-each (lambda (file)
6255 (format #t "~a\n" file)
6256 (invoke "antlr3" file))
6257 '("STParser.g" "Group.g" "CodeGenerator.g")))
6258 #t)))))
6259 (inputs
6260 `(("antlr3" ,antlr3-bootstrap)
6261 ("antlr2" ,antlr2)
6262 ("java-stringtemplate" ,java-stringtemplate-3)
6263 ("java-junit" ,java-junit)))))
6264
6265(define java-stringtemplate-4.0.6
6266 (package (inherit java-stringtemplate)
6267 (name "java-stringtemplate")
6268 (version "4.0.6")
6269 (source (origin
6270 (method url-fetch)
6271 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6272 version ".tar.gz"))
6273 (file-name (string-append name "-" version ".tar.gz"))
6274 (sha256
6275 (base32
6276 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6277 (inputs
6278 `(("antlr3" ,antlr3-3.3)
6279 ("antlr2" ,antlr2)
6280 ("java-stringtemplate" ,java-stringtemplate-3)))))
6281
6282(define-public antlr3
6283 (package
6284 (name "antlr3")
6285 (version "3.5.2")
6286 (source (origin
6287 (method url-fetch)
6288 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6289 version ".tar.gz"))
6290 (file-name (string-append name "-" version ".tar.gz"))
6291 (sha256
6292 (base32
6293 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6294 (build-system ant-build-system)
6295 (arguments
6296 `(#:jar-name (string-append ,name "-" ,version ".jar")
6297 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6298 #:tests? #f
6299 #:phases
6300 (modify-phases %standard-phases
6301 (add-after 'install 'bin-install
6302 (lambda* (#:key inputs outputs #:allow-other-keys)
6303 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6304 (bin (string-append (assoc-ref outputs "out") "/bin")))
6305 (mkdir-p bin)
6306 (with-output-to-file (string-append bin "/antlr3")
6307 (lambda _
6308 (display
6309 (string-append "#!" (which "sh") "\n"
6310 "java -cp " jar "/" ,name "-" ,version ".jar:"
6311 (string-concatenate
6312 (find-files (assoc-ref inputs "stringtemplate")
6313 ".*\\.jar"))
6314 ":"
6315 (string-concatenate
6316 (find-files (assoc-ref inputs "stringtemplate4")
6317 ".*\\.jar"))
6318 ":"
6319 (string-concatenate
6320 (find-files (string-append
6321 (assoc-ref inputs "antlr")
6322 "/lib")
6323 ".*\\.jar"))
6324 " org.antlr.Tool $*"))))
6325 (chmod (string-append bin "/antlr3") #o755))
6326 #t))
6327 (add-before 'build 'generate-grammar
6328 (lambda _
6329 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6330 (for-each (lambda (file)
6331 (display file)
6332 (newline)
6333 (invoke "antlr3" file))
6334 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6335 "AssignTokenTypesWalker.g"
6336 "ActionTranslator.g" "TreeToNFAConverter.g"
6337 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6338 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6339 (substitute* "ANTLRParser.java"
6340 (("public Object getTree") "public GrammarAST getTree"))
6341 (substitute* "ANTLRv3Parser.java"
6342 (("public Object getTree") "public CommonTree getTree"))
6343 (chdir "../../../../../java")
6344 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6345 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6346import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6347 (substitute* "org/antlr/tool/ErrorManager.java"
6348 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6349 (chdir "../../../..")
6350 #t))
6351 (add-before 'build 'fix-build-xml
6352 (lambda _
6353 (substitute* "build.xml"
6354 (("<exec") "<copy todir=\"${classes.dir}\">
6355<fileset dir=\"tool/src/main/resources\">
6356<include name=\"**/*.stg\"/>
6357<include name=\"**/*.st\"/>
6358<include name=\"**/*.sti\"/>
6359<include name=\"**/STLexer.tokens\"/>
6360</fileset>
6361</copy><exec"))
6362 #t)))))
6363 (native-inputs
6364 `(("antlr" ,antlr2)
6365 ("antlr3" ,antlr3-bootstrap)))
6366 (inputs
6367 `(("junit" ,java-junit)
6368 ("stringtemplate" ,java-stringtemplate-3)
6369 ("stringtemplate4" ,java-stringtemplate)))
6370 (propagated-inputs
6371 `(("stringtemplate" ,java-stringtemplate-3)
6372 ("antlr" ,antlr2)
6373 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6374 (home-page "http://www.antlr3.org")
6375 (synopsis "Framework for constructing recognizers, compilers, and translators")
6376 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6377is a language tool that provides a framework for constructing recognizers,
6378compilers, and translators from grammatical descriptions containing Java, C#,
6379C++, or Python actions. ANTLR provides excellent support for tree construction,
6380tree walking, and translation.")
6381 (license license:bsd-3)))
6382
6383(define antlr3-bootstrap
6384 (package
6385 (inherit antlr3)
6386 (name "antlr3-bootstrap")
6387 (native-inputs
6388 `(("antlr" ,antlr2)
6389 ("antlr3" ,antlr3-3.3)))
6390 (inputs
6391 `(("junit" ,java-junit)))))
6392
6393(define antlr3-3.3
6394 (package
6395 (inherit antlr3)
6396 (name "antlr3")
6397 (version "3.3")
6398 (source (origin
6399 (method url-fetch)
6400 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6401 "gh-pages/download/antlr-"
6402 version ".tar.gz"))
6403 (sha256
6404 (base32
6405 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6406 (patches
6407 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6408 (arguments
6409 `(#:jar-name (string-append ,name "-" ,version ".jar")
6410 #:source-dir (string-join '("tool/src/main/java"
6411 "runtime/Java/src/main/java"
6412 "tool/src/main/antlr2"
6413 "tool/src/main/antlr3")
6414 ":")
6415 #:tests? #f ; FIXME: tests seem to require maven plugin
6416 #:modules ((guix build ant-build-system)
6417 (guix build utils)
6418 (srfi srfi-1))
6419 #:phases
6420 (modify-phases %standard-phases
6421 (add-after 'install 'bin-install
6422 (lambda* (#:key inputs outputs #:allow-other-keys)
6423 (let* ((out (assoc-ref outputs "out"))
6424 (jar (string-append out "/share/java"))
6425 (bin (string-append out "/bin")))
6426 (mkdir-p bin)
6427 (with-output-to-file (string-append bin "/antlr3")
6428 (lambda _
6429 (display
6430 (string-append
6431 "#!" (which "sh") "\n"
6432 "java -cp " jar "/antlr3-3.3.jar:"
6433 (string-join
6434 (append (find-files (assoc-ref inputs "java-stringtemplate")
6435 ".*\\.jar$")
6436 (find-files (string-append (assoc-ref inputs "antlr")
6437 "/lib")
6438 ".*\\.jar$"))
6439 ":")
6440 " org.antlr.Tool $*"))))
6441 (chmod (string-append bin "/antlr3") #o755)
6442 #t)))
6443 (add-before 'build 'generate-grammar
6444 (lambda _
6445 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6446 (("import org.antlr.grammar.v2.\\*;")
6447 "import org.antlr.grammar.v2.*;\n
6448import org.antlr.grammar.v2.TreeToNFAConverter;\n
6449import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6450import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6451 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6452 (for-each (lambda (file)
6453 (format #t "~a\n" file)
6454 (invoke "antlr" file))
6455 '("antlr.g" "antlr.print.g" "assign.types.g"
6456 "buildnfa.g" "codegen.g" "define.g")))
6457 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6458 (for-each (lambda (file)
6459 (format #t "~a\n" file)
6460 (invoke "antlr3" file))
6461 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6462 "ANTLRv3Tree.g")))
6463 #t))
6464 (add-before 'build 'fix-build-xml
6465 (lambda _
6466 (substitute* "build.xml"
6467 (("<exec") "<copy todir=\"${classes.dir}\">
6468<fileset dir=\"tool/src/main/resources\">
6469<include name=\"**/*.stg\"/>
6470<include name=\"**/*.st\"/>
6471<include name=\"**/*.sti\"/>
6472<include name=\"**/STLexer.tokens\"/>
6473</fileset>
6474</copy><exec"))
6475 #t)))))
6476 (native-inputs
6477 `(("antlr" ,antlr2)
6478 ("antlr3" ,antlr3-3.1)))
6479 (inputs
6480 `(("junit" ,java-junit)))
6481 (propagated-inputs
6482 `(("java-stringtemplate" ,java-stringtemplate-3)
6483 ("antlr" ,antlr2)
6484 ("antlr3" ,antlr3-3.1)))))
6485
6486(define antlr3-3.1
6487 (package
6488 (inherit antlr3)
6489 (version "3.1")
6490 (source (origin
6491 (method url-fetch)
6492 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6493 "gh-pages/download/antlr-"
6494 version ".tar.gz"))
6495 (sha256
6496 (base32
6497 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6498 (patches
6499 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6500 (arguments
6501 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6502 #:source-dir "src:runtime/Java/src"
6503 #:tests? #f
6504 #:phases
6505 (modify-phases %standard-phases
6506 (add-after 'install 'bin-install
6507 (lambda* (#:key inputs outputs #:allow-other-keys)
6508 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6509 (bin (string-append (assoc-ref outputs "out") "/bin")))
6510 (mkdir-p bin)
6511 (with-output-to-file (string-append bin "/antlr3")
6512 (lambda _
6513 (display
6514 (string-append "#!" (which "sh") "\n"
6515 "java -cp " jar "/antlr3-3.1.jar:"
6516 (string-concatenate
6517 (find-files (assoc-ref inputs "stringtemplate")
6518 ".*\\.jar"))
6519 ":"
6520 (string-concatenate
6521 (find-files (string-append
6522 (assoc-ref inputs "antlr")
6523 "/lib")
6524 ".*\\.jar"))
6525 " org.antlr.Tool $*"))))
6526 (chmod (string-append bin "/antlr3") #o755))
6527 #t))
6528 (add-before 'build 'generate-grammar
6529 (lambda _
6530 (let ((dir "src/org/antlr/tool/"))
6531 (for-each (lambda (file)
6532 (display file)
6533 (newline)
6534 (invoke "antlr" "-o" dir (string-append dir file)))
6535 '("antlr.g" "antlr.print.g" "assign.types.g"
6536 "buildnfa.g" "define.g")))
6537 (format #t "codegen.g\n")
6538 (invoke "antlr" "-o" "src/org/antlr/codegen"
6539 "src/org/antlr/codegen/codegen.g")
6540 #t))
6541 (add-before 'build 'fix-build-xml
6542 (lambda _
6543 (substitute* "build.xml"
6544 (("<exec") "<copy todir=\"${classes.dir}\">
6545<fileset dir=\"src\">
6546<include name=\"**/*.stg\"/>
6547<include name=\"**/*.st\"/>
6548<include name=\"**/*.sti\"/>
6549<include name=\"**/STLexer.tokens\"/>
6550</fileset>
6551</copy><exec"))
6552 #t)))))
6553 (native-inputs
6554 `(("antlr" ,antlr2)))
6555 (inputs
6556 `(("junit" ,java-junit)))
6557 (propagated-inputs
6558 `(("stringtemplate" ,java-stringtemplate-3)))))
6559
6560(define-public java-commons-cli-1.2
6561 ;; This is a bootstrap dependency for Maven2.
6562 (package
6563 (inherit java-commons-cli)
6564 (version "1.2")
6565 (source (origin
6566 (method url-fetch)
6567 (uri (string-append "mirror://apache/commons/cli/source/"
6568 "commons-cli-" version "-src.tar.gz"))
6569 (sha256
6570 (base32
6571 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6572 (arguments
6573 `(#:jar-name "commons-cli.jar"
6574 #:phases
6575 (modify-phases %standard-phases
6576 (add-before 'check 'fix-build-xml
6577 (lambda* (#:key inputs #:allow-other-keys)
6578 (substitute* "build.xml"
6579 (("dir=\"\\$\\{test.home\\}/java\"")
6580 "dir=\"${test.home}\""))
6581 #t)))))
6582 (native-inputs
6583 `(("java-junit" ,java-junit)))))
6584
6585(define-public java-microemulator-cldc
6586 (package
6587 (name "java-microemulator-cldc")
6588 (version "2.0.4")
6589 (source (origin
6590 (method url-fetch)
6591 (uri (string-append "https://github.com/barteo/microemu/archive/"
6592 "microemulator_"
6593 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6594 version)
6595 ".tar.gz"))
6596 (file-name (string-append name "-" version ".tar.gz"))
6597 (sha256
6598 (base32
6599 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6600 (build-system ant-build-system)
6601 (arguments
6602 `(#:jar-name "microemulator-cldc.jar"
6603 #:source-dir "microemu-cldc/src/main/java"
6604 #:tests? #f)); Requires even older software
6605 (home-page "https://github.com/barteo/microemu")
6606 (synopsis "J2ME CLDC emulator")
6607 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6608Emulator. It allows to demonstrate MIDlet based applications in web browser
6609applet and can be run as a standalone java application.")
6610 (license (list license:asl2.0
6611 ;; or altenatively:
6612 license:lgpl2.1+))))
6613
6614(define-public java-datanucleus-javax-persistence
6615 (package
6616 (name "java-datanucleus-javax-persistence")
6617 (version "2.2.0")
6618 (source (origin
6619 (method url-fetch)
6620 (uri (string-append "https://github.com/datanucleus/"
6621 "javax.persistence/archive/javax.persistence-"
6622 version "-release.tar.gz"))
6623 (sha256
6624 (base32
6625 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6626 (build-system ant-build-system)
6627 (arguments
6628 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6629 #:jdk ,icedtea-8
6630 #:source-dir "src/main/java"
6631 #:tests? #f)); no tests
6632 (home-page "https://github.com/datanucleus/javax.persistence")
6633 (synopsis "JPA API")
6634 (description "This package contains a clean definition of JPA API intended
6635for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6636jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6637used to generate this API.")
6638 (license (list license:edl1.0 license:epl1.0))))
6639
6640(define-public java-osgi-cmpn
6641 (package
6642 (name "java-osgi-cmpn")
6643 (version "6.0.0")
6644 (source (origin
6645 (method url-fetch)
6646 (uri (string-append "http://central.maven.org/maven2/"
6647 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6648 version "-sources.jar"))
6649 (sha256
6650 (base32
6651 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6652 (build-system ant-build-system)
6653 (arguments
6654 `(#:jar-name "osgi-cmpn.jar"
6655 #:tests? #f)); no tests
6656 (inputs
6657 `(("annotation" ,java-osgi-annotation)
6658 ("core" ,java-osgi-core)
6659 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6660 ("microemulator" ,java-microemulator-cldc)
6661 ("servlet" ,java-classpathx-servletapi)))
6662 (home-page "https://www.osgi.org")
6663 (synopsis "Compendium specification module of OSGi framework")
6664 (description
6665 "OSGi, for Open Services Gateway initiative framework, is a module system
6666and service platform for the Java programming language. This package contains
6667the compendium specification module, providing interfaces and classes for use
6668in compiling bundles.")
6669 (license license:asl2.0)))
6670
6671(define-public java-osgi-service-component-annotations
6672 (package
6673 (name "java-osgi-service-component-annotations")
6674 (version "1.3.0")
6675 (source (origin
6676 (method url-fetch)
6677 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6678 "org.osgi.service.component.annotations/"
6679 version "/org.osgi.service.component.annotations-"
6680 version "-sources.jar"))
6681 (sha256
6682 (base32
6683 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6684 (build-system ant-build-system)
6685 (arguments
6686 `(#:jar-name "osgi-service-component-annotations.jar"
6687 #:tests? #f)); no tests
6688 (inputs
6689 `(("annotation" ,java-osgi-annotation)))
6690 (home-page "https://www.osgi.org")
6691 (synopsis "Support annotations for osgi-service-component")
6692 (description
6693 "OSGi, for Open Services Gateway initiative framework, is a module system
6694and service platform for the Java programming language. This package contains
6695the support annotations for osgi-service-component.")
6696 (license license:asl2.0)))
6697
6698(define-public java-osgi-dto
6699 (package
6700 (name "java-osgi-dto")
6701 (version "1.0.0")
6702 (source (origin
6703 (method url-fetch)
6704 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6705 "org.osgi.dto/" version "/org.osgi.dto-"
6706 version "-sources.jar"))
6707 (sha256
6708 (base32
6709 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6710 (build-system ant-build-system)
6711 (arguments
6712 `(#:jar-name "osgi-dto.jar"
6713 #:tests? #f)); no tests
6714 (inputs
6715 `(("annotation" ,java-osgi-annotation)))
6716 (home-page "https://www.osgi.org")
6717 (synopsis "Data Transfer Objects")
6718 (description
6719 "OSGi, for Open Services Gateway initiative framework, is a module system
6720and service platform for the Java programming language. This package contains
6721the Data Transfer Objects. It is easily serializable having only public fields
6722of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6723Map and array aggregates may also be used. The aggregates must only hold
6724objects of the listed types or aggregates.")
6725 (license license:asl2.0)))
6726
6727(define-public java-osgi-resource
6728 (package
6729 (name "java-osgi-resource")
6730 (version "1.0.0")
6731 (source (origin
6732 (method url-fetch)
6733 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6734 "org.osgi.resource/"
6735 version "/org.osgi.resource-"
6736 version "-sources.jar"))
6737 (sha256
6738 (base32
6739 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6740 (build-system ant-build-system)
6741 (arguments
6742 `(#:jar-name "osgi-resource.jar"
6743 #:tests? #f)); no tests
6744 (inputs
6745 `(("annotation" ,java-osgi-annotation)
6746 ("dto" ,java-osgi-dto)))
6747 (home-page "https://www.osgi.org")
6748 (synopsis "OSGI Resource")
6749 (description
6750 "OSGi, for Open Services Gateway initiative framework, is a module system
6751and service platform for the Java programming language. This package contains
6752the definition of common types in osgi packages.")
6753 (license license:asl2.0)))
6754
6755(define-public java-osgi-namespace-contract
6756 (package
6757 (name "java-osgi-namespace-contract")
6758 (version "1.0.0")
6759 (source (origin
6760 (method url-fetch)
6761 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6762 "org.osgi.namespace.contract/"
6763 version "/org.osgi.namespace.contract-"
6764 version "-sources.jar"))
6765 (sha256
6766 (base32
6767 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6768 (build-system ant-build-system)
6769 (inputs
6770 `(("resource" ,java-osgi-resource)
6771 ("annotation" ,java-osgi-annotation)))
6772 (arguments
6773 `(#:jar-name "osgi-namespace-contract.jar"
6774 #:tests? #f)); no tests
6775 (home-page "https://www.osgi.org")
6776 (synopsis "Contract Capability and Requirement Namespace")
6777 (description
6778 "OSGi, for Open Services Gateway initiative framework, is a module system
6779and service platform for the Java programming language. This package contains
6780the names for the attributes and directives for a namespace with contracts.")
6781 (license license:asl2.0)))
6782
6783(define-public java-osgi-namespace-extender
6784 (package
6785 (name "java-osgi-namespace-extender")
6786 (version "1.0.1")
6787 (source (origin
6788 (method url-fetch)
6789 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6790 "org.osgi.namespace.extender/"
6791 version "/org.osgi.namespace.extender-"
6792 version "-sources.jar"))
6793 (sha256
6794 (base32
6795 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6796 (build-system ant-build-system)
6797 (inputs
6798 `(("resource" ,java-osgi-resource)
6799 ("annotation" ,java-osgi-annotation)))
6800 (arguments
6801 `(#:jar-name "osgi-namespace-extendent.jar"
6802 #:tests? #f)); no tests
6803 (home-page "https://www.osgi.org")
6804 (synopsis "Extender Capability and Requirement Namespace")
6805 (description
6806 "OSGi, for Open Services Gateway initiative framework, is a module system
6807and service platform for the Java programming language. This package contains
6808the names for the attributes and directives for an extender namespace.")
6809 (license license:asl2.0)))
6810
6811(define-public java-osgi-namespace-service
6812 (package
6813 (name "java-osgi-namespace-service")
6814 (version "1.0.0")
6815 (source (origin
6816 (method url-fetch)
6817 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6818 "org.osgi.namespace.service/"
6819 version "/org.osgi.namespace.service-"
6820 version "-sources.jar"))
6821 (sha256
6822 (base32
6823 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6824 (build-system ant-build-system)
6825 (inputs
6826 `(("resource" ,java-osgi-resource)
6827 ("annotation" ,java-osgi-annotation)))
6828 (arguments
6829 `(#:jar-name "osgi-namespace-service.jar"
6830 #:tests? #f)); no tests
6831 (home-page "https://www.osgi.org")
6832 (synopsis "Service Capability and Requirement Namespace")
6833 (description
6834 "OSGi, for Open Services Gateway initiative framework, is a module system
6835and service platform for the Java programming language. This package contains
6836the names for the attributes and directives for a service namespace.")
6837 (license license:asl2.0)))
6838
6839(define-public java-osgi-util-function
6840 (package
6841 (name "java-osgi-util-function")
6842 (version "1.0.0")
6843 (source (origin
6844 (method url-fetch)
6845 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6846 "org.osgi.util.function/"
6847 version "/org.osgi.util.function-"
6848 version "-sources.jar"))
6849 (sha256
6850 (base32
6851 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6852 (build-system ant-build-system)
6853 (arguments
6854 `(#:jar-name "osgi-util-function.jar"
6855 #:tests? #f)); no tests
6856 (inputs
6857 `(("annotation" ,java-osgi-annotation)))
6858 (home-page "https://www.osgi.org")
6859 (synopsis "OSGI Util Function")
6860 (description
6861 "OSGi, for Open Services Gateway initiative framework, is a module system
6862and service platform for the Java programming language. This package contains
6863an interface for a function that accepts a single argument and produces a result.")
6864 (license license:asl2.0)))
6865
6866(define-public java-osgi-util-promise
6867 (package
6868 (name "java-osgi-util-promise")
6869 (version "1.0.0")
6870 (source (origin
6871 (method url-fetch)
6872 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6873 "org.osgi.util.promise/"
6874 version "/org.osgi.util.promise-"
6875 version "-sources.jar"))
6876 (sha256
6877 (base32
6878 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6879 (build-system ant-build-system)
6880 (arguments
6881 `(#:jar-name "osgi-util-promise.jar"
6882 #:tests? #f)); no tests
6883 (inputs
6884 `(("annotation" ,java-osgi-annotation)
6885 ("function" ,java-osgi-util-function)))
6886 (home-page "https://www.osgi.org")
6887 (synopsis "Promise of a value")
6888 (description
6889 "OSGi, for Open Services Gateway initiative framework, is a module system
6890and service platform for the Java programming language. This package contains
6891an interface and utilitary classes for promises. A Promise represents a future
6892value. It handles the interactions for asynchronous processing.")
6893 (license license:asl2.0)))
6894
6895(define-public java-osgi-service-metatype-annotations
6896 (package
6897 (name "java-osgi-service-metatype-annotations")
6898 (version "1.3.0")
6899 (source (origin
6900 (method url-fetch)
6901 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6902 "org.osgi.service.metatype.annotations/"
6903 version "/org.osgi.service.metatype.annotations-"
6904 version "-sources.jar"))
6905 (sha256
6906 (base32
6907 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6908 (build-system ant-build-system)
6909 (arguments
6910 `(#:jar-name "osgi-service-metatype-annotations.jar"
6911 #:tests? #f)); no tests
6912 (inputs
6913 `(("annotation" ,java-osgi-annotation)))
6914 (home-page "https://www.osgi.org")
6915 (synopsis "Support annotations for metatype")
6916 (description
6917 "OSGi, for Open Services Gateway initiative framework, is a module system
6918and service platform for the Java programming language. This package contains
6919the support annotations for metatype.")
6920 (license license:asl2.0)))
6921
6922(define-public java-osgi-service-repository
6923 (package
6924 (name "java-osgi-service-repository")
6925 (version "1.1.0")
6926 (source (origin
6927 (method url-fetch)
6928 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6929 "org.osgi.service.repository/"
6930 version "/org.osgi.service.repository-"
6931 version "-sources.jar"))
6932 (sha256
6933 (base32
6934 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6935 (build-system ant-build-system)
6936 (arguments
6937 `(#:jar-name "osgi-service-repository.jar"
6938 #:tests? #f)); no tests
6939 (inputs
6940 `(("annotation" ,java-osgi-annotation)
6941 ("promise" ,java-osgi-util-promise)
6942 ("resource" ,java-osgi-resource)))
6943 (home-page "https://www.osgi.org")
6944 (synopsis "OSGI service repository")
6945 (description
6946 "OSGi, for Open Services Gateway initiative framework, is a module system
6947and service platform for the Java programming language. This package contains
6948a repository service that contains resources.")
6949 (license license:asl2.0)))
6950
6951(define-public java-osgi-framework
6952 (package
6953 (name "java-osgi-framework")
6954 (version "1.8.0")
6955 (source (origin
6956 (method url-fetch)
6957 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6958 "org.osgi.framework/" version "/org.osgi.framework-"
6959 version "-sources.jar"))
6960 (sha256
6961 (base32
6962 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6963 (build-system ant-build-system)
6964 (arguments
6965 `(#:jar-name "osgi-framework.jar"
6966 #:tests? #f)); no tests
6967 (inputs
6968 `(("annotation" ,java-osgi-annotation)
6969 ("resource" ,java-osgi-resource)
6970 ("dto" ,java-osgi-dto)))
6971 (home-page "https://www.osgi.org")
6972 (synopsis "OSGi framework")
6973 (description
6974 "OSGi, for Open Services Gateway initiative framework, is a module system
6975and service platform for the Java programming language.")
6976 (license license:asl2.0)))
6977
6978(define-public java-osgi-service-log
6979 (package
6980 (name "java-osgi-service-log")
6981 (version "1.3.0")
6982 (source (origin
6983 (method url-fetch)
6984 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6985 "org.osgi.service.log/"
6986 version "/org.osgi.service.log-"
6987 version "-sources.jar"))
6988 (sha256
6989 (base32
6990 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6991 (build-system ant-build-system)
6992 (arguments
6993 `(#:jar-name "osgi-service-log.jar"
6994 #:tests? #f)); no tests
6995 (inputs
6996 `(("java-osgi-framework" ,java-osgi-framework)))
6997 (home-page "https://www.osgi.org")
6998 (synopsis "Provides methods for bundles to write messages to the log")
6999 (description
7000 "OSGi, for Open Services Gateway initiative framework, is a module system
7001and service platform for the Java programming language. This package contains
7002the log service.")
7003 (license license:asl2.0)))
7004
7005(define-public java-osgi-service-jdbc
7006 (package
7007 (name "java-osgi-service-jdbc")
7008 (version "1.0.0")
7009 (source (origin
7010 (method url-fetch)
7011 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7012 "org.osgi.service.jdbc/"
7013 version "/org.osgi.service.jdbc-"
7014 version "-sources.jar"))
7015 (sha256
7016 (base32
7017 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7018 (build-system ant-build-system)
7019 (arguments
7020 `(#:jar-name "osgi-service-jdbc.jar"
7021 #:tests? #f)); no tests
7022 (home-page "https://www.osgi.org")
7023 (synopsis "Factory for JDBC connection factories")
7024 (description
7025 "OSGi, for Open Services Gateway initiative framework, is a module system
7026and service platform for the Java programming language. This package contains
7027a factory for JDBC connection factories. There are 3 preferred connection
7028factories for getting JDBC connections:
7029
7030@itemize
7031@item @code{javax.sql.DataSource};
7032@item @code{javax.sql.ConnectionPoolDataSource};
7033@item @code{javax.sql.XADataSource}.
7034@end itemize")
7035 (license license:asl2.0)))
7036
7037(define-public java-osgi-service-resolver
7038 (package
7039 (name "java-osgi-service-resolver")
7040 (version "1.0.1")
7041 (source (origin
7042 (method url-fetch)
7043 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7044 "org.osgi.service.resolver/"
7045 version "/org.osgi.service.resolver-"
7046 version "-sources.jar"))
7047 (sha256
7048 (base32
7049 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7050 (build-system ant-build-system)
7051 (arguments
7052 `(#:jar-name "osgi-service-resolver.jar"
7053 #:tests? #f)); no tests
7054 (inputs
7055 `(("annotation" ,java-osgi-annotation)
7056 ("resource" ,java-osgi-resource)))
7057 (home-page "https://www.osgi.org")
7058 (synopsis "OSGI Resolver service")
7059 (description
7060 "OSGi, for Open Services Gateway initiative framework, is a module system
7061and service platform for the Java programming language. This package contains
7062a resolver service that resolves the specified resources in the context supplied
7063by the caller.")
7064 (license license:asl2.0)))
7065
7066(define-public java-osgi-util-tracker
7067 (package
7068 (name "java-osgi-util-tracker")
7069 (version "1.5.1")
7070 (source (origin
7071 (method url-fetch)
7072 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7073 "org.osgi.util.tracker/"
7074 version "/org.osgi.util.tracker-"
7075 version "-sources.jar"))
7076 (sha256
7077 (base32
7078 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7079 (build-system ant-build-system)
7080 (arguments
7081 `(#:jar-name "osgi-util-tracker.jar"
7082 #:tests? #f)); no tests
7083 (inputs
7084 `(("framework" ,java-osgi-framework)
7085 ("annotation" ,java-osgi-annotation)))
7086 (home-page "https://www.osgi.org")
7087 (synopsis "Bundle tracking")
7088 (description
7089 "OSGi, for Open Services Gateway initiative framework, is a module system
7090and service platform for the Java programming language. This package contains
7091bundle tracking utility classes.")
7092 (license license:asl2.0)))
7093
7094(define-public java-osgi-service-cm
7095 (package
7096 (name "java-osgi-service-cm")
7097 (version "1.5.0")
7098 (source (origin
7099 (method url-fetch)
7100 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7101 "org.osgi.service.cm/"
7102 version "/org.osgi.service.cm-"
7103 version "-sources.jar"))
7104 (sha256
7105 (base32
7106 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7107 (build-system ant-build-system)
7108 (arguments
7109 `(#:jar-name "osgi-service-cm.jar"
7110 #:tests? #f)); no tests
7111 (inputs
7112 `(("framework" ,java-osgi-framework)
7113 ("annotation" ,java-osgi-annotation)))
7114 (home-page "https://www.osgi.org")
7115 (synopsis "OSGI Configuration Management")
7116 (description
7117 "OSGi, for Open Services Gateway initiative framework, is a module system
7118and service platform for the Java programming language. This package contains
7119utility classes for the configuration of services.")
7120 (license license:asl2.0)))
7121
7122(define-public java-osgi-service-packageadmin
7123 (package
7124 (name "java-osgi-service-packageadmin")
7125 (version "1.2.0")
7126 (source (origin
7127 (method url-fetch)
7128 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7129 "org.osgi.service.packageadmin/"
7130 version "/org.osgi.service.packageadmin-"
7131 version "-sources.jar"))
7132 (sha256
7133 (base32
7134 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7135 (build-system ant-build-system)
7136 (arguments
7137 `(#:jar-name "osgi-service-packageadmin.jar"
7138 #:tests? #f)); no tests
7139 (inputs
7140 `(("framework" ,java-osgi-framework)))
7141 (home-page "https://www.osgi.org")
7142 (synopsis "OSGI Package Administration")
7143 (description
7144 "OSGi, for Open Services Gateway initiative framework, is a module system
7145and service platform for the Java programming language. This package contains
7146the packageadmin service.")
7147 (license license:asl2.0)))
7148
7149(define-public java-ops4j-base-lang
7150 (package
7151 (name "java-ops4j-base-lang")
7152 (version "1.5.0")
7153 (source (origin
7154 (method url-fetch)
7155 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7156 "archive/base-" version ".tar.gz"))
7157 (sha256
7158 (base32
7159 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7160 (build-system ant-build-system)
7161 (arguments
7162 `(#:jar-name "java-ops4j-base-lang.jar"
7163 #:source-dir "ops4j-base-lang/src/main/java"
7164 #:tests? #f; no tests
7165 #:phases
7166 (modify-phases %standard-phases
7167 (add-before 'build 'add-test-file
7168 (lambda _
7169 ;; That file is required by a test in ops4j-pax-exam-core-spi
7170 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7171 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7172 (lambda _
7173 (display
7174 (string-append
7175 "version=" ,version "\n"
7176 "groupId=org.ops4j.base"
7177 "artifactId=ops4j-base-lang\n"))))
7178 #t)))))
7179 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7180 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7181 (description "OPS4J stands for Open Participation Software for Java. This
7182package contains utilities and extensions related to @code{java.lang}.")
7183 (license license:asl2.0)))
7184
7185(define-public java-ops4j-base-monitors
7186 (package
7187 (inherit java-ops4j-base-lang)
7188 (name "java-ops4j-base-monitors")
7189 (arguments
7190 `(#:jar-name "java-ops4j-base-monitors.jar"
7191 #:source-dir "ops4j-base-monitors/src/main/java"
7192 #:tests? #f)); no tests
7193 (inputs
7194 `(("lang" ,java-ops4j-base-lang)))
7195 (description "OPS4J stands for Open Participation Software for Java. This
7196package contains utilities and extensions related to monitoring.")))
7197
7198(define-public java-ops4j-base-io
7199 (package
7200 (inherit java-ops4j-base-lang)
7201 (name "java-ops4j-base-io")
7202 (arguments
7203 `(#:jar-name "java-ops4j-base-io.jar"
7204 #:source-dir "ops4j-base-io/src/main/java"
7205 #:test-dir "ops4j-base-io/src/test"
7206 #:test-exclude
7207 (list "**/ListerTest.java")))
7208 (inputs
7209 `(("lang" ,java-ops4j-base-monitors)
7210 ("lang" ,java-ops4j-base-lang)))
7211 (native-inputs
7212 `(("junit" ,java-junit)
7213 ("hamcrest" ,java-hamcrest-core)))
7214 (description "OPS4J stands for Open Participation Software for Java. This
7215package contains utilities and extensions related to handling streams and files.")))
7216
7217(define-public java-ops4j-base-util
7218 (package
7219 (inherit java-ops4j-base-lang)
7220 (name "java-ops4j-base-util")
7221 (arguments
7222 `(#:jar-name "java-ops4j-base-util.jar"
7223 #:source-dir "ops4j-base-util/src/main/java"
7224 #:test-dir "ops4j-base-util/src/test"))
7225 (inputs
7226 `(("lang" ,java-ops4j-base-lang)))
7227 (native-inputs
7228 `(("junit" ,java-junit)))
7229 (description "OPS4J stands for Open Participation Software for Java. This
7230package contains utilities and extensions related to environment, i18n and
7231mime types.")))
7232
7233(define-public java-ops4j-base-util-property
7234 (package
7235 (inherit java-ops4j-base-lang)
7236 (name "java-ops4j-base-util-property")
7237 (arguments
7238 `(#:jar-name "java-ops4j-base-util-property.jar"
7239 #:source-dir "ops4j-base-util-property/src/main/java"
7240 #:tests? #f)); no tests
7241 (inputs
7242 `(("lang" ,java-ops4j-base-lang)
7243 ("util" ,java-ops4j-base-util)))
7244 (description "OPS4J stands for Open Participation Software for Java. This
7245package contains utilities and extensions related to resolving properties from
7246different sources.")))
7247
7248(define-public java-ops4j-base-store
7249 (package
7250 (inherit java-ops4j-base-lang)
7251 (name "java-ops4j-base-store")
7252 (arguments
7253 `(#:jar-name "java-ops4j-base-store.jar"
7254 #:source-dir "ops4j-base-store/src/main/java"
7255 #:tests? #f)); no tests
7256 (inputs
7257 `(("lang" ,java-ops4j-base-lang)
7258 ("slf4j" ,java-slf4j-api)
7259 ("io" ,java-ops4j-base-io)))
7260 (description "OPS4J stands for Open Participation Software for Java. This
7261package contains utilities for storing and retrieving data from an
7262@code{InputStream}.")))
7263
7264(define-public java-ops4j-base-spi
7265 (package
7266 (inherit java-ops4j-base-lang)
7267 (name "java-ops4j-base-spi")
7268 (arguments
7269 `(#:jar-name "java-ops4j-base-spi.jar"
7270 #:source-dir "ops4j-base-spi/src/main/java"
7271 #:test-dir "ops4j-base-spi/src/test"))
7272 (native-inputs
7273 `(("junit" ,java-junit)
7274 ("hamcrest" ,java-hamcrest-core)))
7275 (description "OPS4J stands for Open Participation Software for Java. This
7276package contains utilities for obtaining services via the Java SE 6
7277@code{ServiceLoader}.")))
7278
7279(define-public java-aqute-bnd-annotation
7280 (package
7281 (name "java-aqute-bnd-annotation")
7282 (version "3.5.0")
7283 (source (origin
7284 (method url-fetch)
7285 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7286 version ".REL.tar.gz"))
7287 (file-name (string-append name "-" version ".tar.gz"))
7288 (sha256
7289 (base32
7290 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7291 (build-system ant-build-system)
7292 (arguments
7293 `(#:jar-name "java-aqute-bnd-annotation.jar"
7294 #:source-dir "biz.aQute.bnd.annotation/src"
7295 #:tests? #f)); empty test dir
7296 (home-page "http://bnd.bndtools.org/")
7297 (synopsis "Tools for OSGi")
7298 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7299headers based on analyzing the class code, it verifies the project settings,
7300it manages project dependencies, gives diffs jars, and much more.")
7301 (license license:asl2.0)))
7302
7303(define-public java-aqute-libg
7304 (package
7305 (inherit java-aqute-bnd-annotation)
7306 (name "java-aqute-libg")
7307 (arguments
7308 `(#:jar-name "java-aqute-libg.jar"
7309 ;; The build fails when source/target more recent than 1.7. This
7310 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7311 ;;
7312 ;; It is closed as won't fix. There is no way to change the source
7313 ;; so that it works on 1.8, and still works on 1.6, the upstream
7314 ;; target. It work fine on 1.7, so we use 1.7.
7315 #:make-flags (list "-Dant.build.javac.source=1.7"
7316 "-Dant.build.javac.target=1.7")
7317 #:phases
7318 (modify-phases %standard-phases
7319 (add-before 'configure 'chdir
7320 ;; Change to aQute.libg directory, so that the relative
7321 ;; paths in the tests aren't broken.
7322 (lambda _
7323 (chdir "aQute.libg")
7324 #t))
7325 (add-before 'check 'create-test-directory
7326 ;; Copy the test directory to test/java, since that's where
7327 ;; ant-build-system's default project in build.xml expects to find
7328 ;; the test classes. Leave a copy in the original place to not
7329 ;; break paths in tests.
7330 (lambda _
7331 (mkdir "src/test")
7332 (copy-recursively "test" "src/test/java")
7333 #t)))))
7334 (inputs
7335 `(("slf4j" ,java-slf4j-api)
7336 ("osgi-annot" ,java-osgi-annotation)
7337 ("java-osgi-cmpn" ,java-osgi-cmpn)
7338 ("osgi" ,java-osgi-core)))
7339 (native-inputs
7340 `(("hamcrest" ,java-hamcrest-core)
7341 ("java-junit" ,java-junit)))))
7342
7343(define java-aqute-libg-bootstrap
7344 (package
7345 (inherit java-aqute-libg)
7346 (name "java-aqute-libg-bootstrap")
7347 (arguments
7348 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7349 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7350 ((#:tests? _ #f) #f)))
7351 (inputs
7352 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7353 ,@(delete `("slf4j" ,java-slf4j-api)
7354 (package-inputs java-aqute-libg))))
7355 (native-inputs '())))
7356
7357(define-public java-aqute-bndlib
7358 (package
7359 (inherit java-aqute-bnd-annotation)
7360 (name "java-aqute-bndlib")
7361 (arguments
7362 `(#:jar-name "java-bndlib.jar"
7363 #:source-dir "biz.aQute.bndlib/src"
7364 #:tests? #f)); no tests
7365 (inputs
7366 `(("slf4j" ,java-slf4j-api)
7367 ("osgi-annot" ,java-osgi-annotation)
7368 ("java-aqute-libg" ,java-aqute-libg)
7369 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7370 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7371 ("java-osgi-service-repository" ,java-osgi-service-repository)
7372 ("java-osgi-service-log" ,java-osgi-service-log)
7373 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7374 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7375 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7376 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7377 ("promise" ,java-osgi-util-promise)
7378 ("osgi" ,java-osgi-core)))))
7379
7380(define java-aqute-bndlib-bootstrap
7381 (package
7382 (inherit java-aqute-bndlib)
7383 (name "java-aqute-bndlib-bootstrap")
7384 (inputs
7385 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7386 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7387 ,@(delete `("slf4j" ,java-slf4j-api)
7388 (delete `("java-aqute-libg" ,java-aqute-libg)
7389 (package-inputs java-aqute-bndlib)))))))
7390
7391(define-public java-ops4j-pax-tinybundles
7392 (package
7393 (name "java-ops4j-pax-tinybundles")
7394 (version "2.1.1")
7395 (source (origin
7396 (method url-fetch)
7397 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7398 "archive/tinybundles-" version ".tar.gz"))
7399 (sha256
7400 (base32
7401 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7402 (arguments
7403 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7404 #:source-dir "src/main/java"
7405 #:test-exclude
7406 ;; Abstract base classes for other tests
7407 (list "**/BndTest.java" "**/CoreTest.java")
7408 #:phases
7409 (modify-phases %standard-phases
7410 (add-before 'check 'fix-version
7411 (lambda _
7412 ;; This test has a reference to an old version of bndlib we are not
7413 ;; packaging. It uses the version referenced in pom.xml. We replace
7414 ;; it with our own version.
7415 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7416 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7417 ,(package-version java-aqute-bndlib)))
7418 #t)))))
7419 (inputs
7420 `(("lang" ,java-ops4j-base-lang)
7421 ("io" ,java-ops4j-base-io)
7422 ("store" ,java-ops4j-base-store)
7423 ("slf4j" ,java-slf4j-api)
7424 ("libg" ,java-aqute-libg)
7425 ("bndlib" ,java-aqute-bndlib)))
7426 (native-inputs
7427 `(("junit" ,java-junit)
7428 ("hamcrest" ,java-hamcrest-core)
7429 ("log4j" ,java-log4j-api)
7430 ("bndannotation" ,java-aqute-bnd-annotation)
7431 ("framework" ,java-osgi-framework)))
7432 (build-system ant-build-system)
7433 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7434 (synopsis "Java APIs to create OSGi related artifacts")
7435 (description "Tinybundles is all about creating OSGi related artifacts like
7436Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7437to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7438other hand, this library can be a foundation of real end user tools that need
7439to create those artifacts.")
7440 (license license:asl2.0)))
7441
7442(define-public java-ops4j-pax-exam-core
7443 (package
7444 (name "java-ops4j-pax-exam-core")
7445 (version "4.11.0")
7446 (source (origin
7447 (method url-fetch)
7448 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7449 "archive/exam-reactor-" version ".tar.gz"))
7450 (sha256
7451 (base32
7452 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7453 (arguments
7454 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7455 #:source-dir "core/pax-exam/src/main/java"
7456 #:test-dir "core/pax-exam/src/test"))
7457 (inputs
7458 `(("slf4j" ,java-slf4j-api)
7459 ("lang" ,java-ops4j-base-lang)
7460 ("io" ,java-ops4j-base-io)
7461 ("util-property" ,java-ops4j-base-util-property)
7462 ("util-store" ,java-ops4j-base-store)
7463 ("java-osgi-core" ,java-osgi-core)))
7464 (native-inputs
7465 `(("junit" ,java-junit)
7466 ("hamcrest" ,java-hamcrest-core)))
7467 (build-system ant-build-system)
7468 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7469 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7470 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7471the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7472the system under test at the same time.")
7473 (license license:asl2.0)))
7474
7475(define-public java-ops4j-pax-exam-core-spi
7476 (package
7477 (inherit java-ops4j-pax-exam-core)
7478 (name "java-ops4j-pax-exam-core-spi")
7479 (arguments
7480 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7481 #:source-dir "src/main/java"
7482 #:test-exclude
7483 (list
7484 ;; Abstract base class, not a test
7485 "**/BaseStagedReactorTest.java"
7486 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7487 "**/WarBuilderTest.java")
7488 #:phases
7489 (modify-phases %standard-phases
7490 (add-before 'configure 'chdir
7491 (lambda _
7492 ;; Tests assume we are in this directory
7493 (chdir "core/pax-exam-spi")
7494 #t))
7495 (add-before 'check 'fix-tests
7496 (lambda _
7497 ;; One test checks that this file is present.
7498 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7499 (with-output-to-file
7500 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7501 (lambda _
7502 (display
7503 (string-append "artifactId = pax-exam-spi\n"
7504 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7505 ;; Maven puts compilation results in the target directory, while we
7506 ;; put them in the build directory.
7507 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7508 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7509 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7510 (("target") "build"))
7511 ;; One test is expected to fail, but it doesn't throw the expected exception
7512 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7513 (("AssertionError") "IllegalArgumentException"))
7514 #t)))))
7515 (inputs
7516 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7517 ("lang" ,java-ops4j-base-lang)
7518 ("monitors" ,java-ops4j-base-monitors)
7519 ("store" ,java-ops4j-base-store)
7520 ("io" ,java-ops4j-base-io)
7521 ("spi" ,java-ops4j-base-spi)
7522 ("osgi" ,java-osgi-core)
7523 ("slf4j" ,java-slf4j-api)
7524 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7525 (native-inputs
7526 `(("mockito" ,java-mockito-1)
7527 ("junit" ,java-junit)
7528 ("hamcrest" ,java-hamcrest-core)
7529 ("cglib" ,java-cglib)
7530 ("objenesis" ,java-objenesis)
7531 ("asm" ,java-asm)))))
7532
7533(define-public java-ops4j-pax-exam-core-junit
7534 (package
7535 (inherit java-ops4j-pax-exam-core)
7536 (name "java-ops4j-pax-exam-core-junit")
7537 (arguments
7538 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7539 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7540 #:tests? #f)); no tests
7541 (inputs
7542 `(("junit" ,java-junit)
7543 ("slf4j" ,java-slf4j-api)
7544 ("core" ,java-ops4j-pax-exam-core)
7545 ("spi" ,java-ops4j-pax-exam-core-spi)))
7546 (native-inputs '())))
7547
7548(define-public java-fasterxml-jackson-annotations
7549 (package
7550 (name "java-fasterxml-jackson-annotations")
7551 (version "2.9.4")
7552 (source (origin
7553 (method url-fetch)
7554 (uri (string-append "https://github.com/FasterXML/"
7555 "jackson-annotations/archive/"
7556 "jackson-annotations-" version ".tar.gz"))
7557 (sha256
7558 (base32
7559 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7560 (build-system ant-build-system)
7561 (arguments
7562 `(#:jar-name "jackson-annotations.jar"
7563 #:source-dir "src/main/java"
7564 #:test-dir "src/test"))
7565 (native-inputs
7566 `(("junit" ,java-junit)))
7567 (home-page "https://github.com/FasterXML/jackson-annotations")
7568 (synopsis "General purpose annotations for the Jackson Data Processor")
7569 (description "This package contains general purpose annotations for the
7570Jackson Data Processor, used on value and handler types. The only annotations
7571not included are ones that require dependency to the Databind package.")
7572 (license license:asl2.0)))
7573
7574(define-public java-fasterxml-jackson-core
7575 (package
7576 (name "java-fasterxml-jackson-core")
7577 (version "2.9.4")
7578 (source (origin
7579 (method url-fetch)
7580 (uri (string-append "https://github.com/FasterXML/"
7581 "jackson-core/archive/"
7582 "jackson-core-" version ".tar.gz"))
7583 (sha256
7584 (base32
7585 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7586 (build-system ant-build-system)
7587 (arguments
7588 `(#:jar-name "jackson-core.jar"
7589 #:source-dir "src/main/java"
7590 #:test-dir "src/test"
7591 #:test-exclude
7592 (list
7593 ;; Expected failure. pom.xml excludes these
7594 "**/failing/**"
7595 ;; Base classes that have no constructor for junit
7596 "**/BaseTest.java"
7597 "**/ConcurrencyReadTest.java"
7598 "**/ManualCharAccessTest.java"
7599 "**/ManualCharAccessTest.java"
7600 "**/TrailingCommasTest.java"
7601 "**/AsyncMissingValuesInObjectTest.java"
7602 "**/AsyncMissingValuesInArrayTest.java")
7603 #:phases
7604 (modify-phases %standard-phases
7605 (add-before 'configure 'generate-PackageVersion.java
7606 (lambda _
7607 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7608 (in (string-append out ".in")))
7609 (copy-file in out)
7610 (substitute* out
7611 (("@package@") "com.fasterxml.jackson.core.json")
7612 (("@projectversion@") ,version)
7613 (("@projectgroupid@") "com.fasterxml.jackson.core")
7614 (("@projectartifactid@") "jackson-core")))
7615 #t))
7616 (add-before 'build 'copy-resources
7617 (lambda _
7618 (copy-recursively "src/main/resources"
7619 "build/classes")
7620 #t))
7621 (add-before 'check 'copy-test-resources
7622 (lambda _
7623 (copy-recursively "src/test/resources"
7624 "build/test-classes")
7625 #t)))))
7626 (native-inputs
7627 `(("junit" ,java-junit)
7628 ("hamcrest" ,java-hamcrest-core)))
7629 (home-page "https://github.com/FasterXML/jackson-core")
7630 (synopsis "")
7631 (description "")
7632 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7633
7634(define-public java-fasterxml-jackson-databind
7635 (package
7636 (name "java-fasterxml-jackson-databind")
7637 (version "2.9.4")
7638 (source (origin
7639 (method url-fetch)
7640 (uri (string-append "https://github.com/FasterXML/"
7641 "jackson-databind/archive/"
7642 "jackson-databind-" version ".tar.gz"))
7643 (sha256
7644 (base32
7645 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7646 (build-system ant-build-system)
7647 (arguments
7648 `(#:jar-name "jackson-databind.jar"
7649 #:source-dir "src/main/java"
7650 #:tests? #f; requires javax.measures for which I can't find a free implementation
7651 #:phases
7652 (modify-phases %standard-phases
7653 (add-before 'configure 'generate-PackageVersion.java
7654 (lambda _
7655 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7656 (in (string-append out ".in")))
7657 (copy-file in out)
7658 (substitute* out
7659 (("@package@") "com.fasterxml.jackson.databind.cfg")
7660 (("@projectversion@") ,version)
7661 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7662 (("@projectartifactid@") "jackson-databind")))
7663 #t))
7664 (add-before 'build 'copy-resources
7665 (lambda _
7666 (copy-recursively "src/main/resources" "build/classes")
7667 #t)))))
7668 (inputs
7669 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7670 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7671 (home-page "https://github.com/FasterXML/jackson-databind")
7672 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7673 (description "This package contains the general-purpose data-binding
7674functionality and tree-model for Jackson Data Processor. It builds on core
7675streaming parser/generator package, and uses Jackson Annotations for
7676configuration.")
7677 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7678
7679(define-public java-fasterxml-jackson-modules-base-jaxb
7680 (package
7681 (name "java-fasterxml-jackson-modules-base-jaxb")
7682 (version "2.9.4")
7683 (source (origin
7684 (method url-fetch)
7685 (uri (string-append "https://github.com/FasterXML/"
7686 "jackson-modules-base/archive/"
7687 "jackson-modules-base-" version ".tar.gz"))
7688 (sha256
7689 (base32
7690 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7691 (build-system ant-build-system)
7692 (arguments
7693 `(#:jar-name "jackson-modules-base-jaxb.jar"
7694 #:source-dir "jaxb/src/main/java"
7695 #:test-dir "jaxb/src/test"
7696 #:test-exclude
7697 ;; Base class for tests
7698 (list "**/BaseJaxbTest.java")
7699 #:phases
7700 (modify-phases %standard-phases
7701 (add-before 'configure 'generate-PackageVersion.java
7702 (lambda _
7703 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7704 "jackson/module/jaxb/PackageVersion.java"))
7705 (in (string-append out ".in")))
7706 (copy-file in out)
7707 (substitute* out
7708 (("@package@") "com.fasterxml.jackson.module.jaxb")
7709 (("@projectversion@") ,version)
7710 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7711 (("@projectartifactid@") "jackson-module-jaxb")))
7712 #t))
7713 (add-before 'build 'copy-resources
7714 (lambda _
7715 (copy-recursively "jaxb/src/main/resources" "build/classes")
7716 #t)))))
7717 (inputs
7718 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7719 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7720 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7721 (native-inputs
7722 `(("java-junit" ,java-junit)))
7723 (home-page "https://github.com/FasterXML/jackson-modules-base")
7724 (synopsis "Jaxb annotations jackson module")
7725 (description "This package is the jaxb annotations module for jackson.")
7726 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7727
7728(define-public java-fasterxml-jackson-modules-base-mrbean
7729 (package
7730 (name "java-fasterxml-jackson-modules-base-mrbean")
7731 (version "2.9.4")
7732 (source (origin
7733 (method url-fetch)
7734 (uri (string-append "https://github.com/FasterXML/"
7735 "jackson-modules-base/archive/"
7736 "jackson-modules-base-" version ".tar.gz"))
7737 (sha256
7738 (base32
7739 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7740 (build-system ant-build-system)
7741 (arguments
7742 `(#:jar-name "jackson-modules-base-mrbean.jar"
7743 #:source-dir "mrbean/src/main/java"
7744 #:test-dir "mrbean/src/test"
7745 #:test-exclude
7746 ;; Base class for tests
7747 (list "**/BaseTest.java")
7748 #:phases
7749 (modify-phases %standard-phases
7750 (add-before 'configure 'generate-PackageVersion.java
7751 (lambda _
7752 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
7753 "jackson/module/mrbean/PackageVersion.java"))
7754 (in (string-append out ".in")))
7755 (copy-file in out)
7756 (substitute* out
7757 (("@package@") "com.fasterxml.jackson.module.mrbean")
7758 (("@projectversion@") ,version)
7759 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
7760 (("@projectartifactid@") "jackson-module-mrbean")))
7761 #t)))))
7762 (inputs
7763 `(("java-asm" ,java-asm)
7764 ("java-fasterxml-jackson-annotations"
7765 ,java-fasterxml-jackson-annotations)
7766 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7767 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7768 (native-inputs
7769 `(("java-junit" ,java-junit)))
7770 (home-page "https://github.com/FasterXML/jackson-modules-base")
7771 (synopsis "POJO type materialization for Java")
7772 (description "This package implements POJO type materialization.
7773Databinders can construct implementation classes for Java interfaces as part
7774of deserialization.")
7775 (license license:asl2.0)))
7776
7777(define-public java-snakeyaml
7778 (package
7779 (name "java-snakeyaml")
7780 (version "1.18")
7781 (source (origin
7782 (method url-fetch)
7783 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7784 version ".tar.gz"))
7785 (file-name (string-append name "-" version ".tar.gz"))
7786 (sha256
7787 (base32
7788 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7789 (build-system ant-build-system)
7790 (arguments
7791 `(#:jar-name "java-snakeyaml.jar"
7792 #:source-dir "src/main/java"
7793 ;; Tests require velocity, a cyclic dependency, and
7794 ;; java-spring-framework-context which is not packaged.
7795 #:tests? #f))
7796 (home-page "https://bitbucket.org/asomov/snakeyaml")
7797 (synopsis "YAML processor")
7798 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7799 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7800
7801(define-public java-fasterxml-jackson-dataformat-yaml
7802 (package
7803 (name "java-fasterxml-jackson-dataformat-yaml")
7804 (version "2.9.4")
7805 (source (origin
7806 (method url-fetch)
7807 (uri (string-append "https://github.com/FasterXML/"
7808 "jackson-dataformats-text/archive/"
7809 "jackson-dataformats-text-" version ".tar.gz"))
7810 (sha256
7811 (base32
7812 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
7813 (build-system ant-build-system)
7814 (arguments
7815 `(#:jar-name "jackson-dataformat-yaml.jar"
7816 #:source-dir "yaml/src/main/java"
7817 #:test-dir "yaml/src/test"
7818 #:test-exclude (list "**/failing/**.java")
7819 #:phases
7820 (modify-phases %standard-phases
7821 (add-before 'configure 'generate-PackageVersion.java
7822 (lambda _
7823 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7824 (in (string-append out ".in")))
7825 (copy-file in out)
7826 (substitute* out
7827 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7828 (("@projectversion@") ,version)
7829 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7830 (("@projectartifactid@") "jackson-dataformat-yaml")))
7831 #t)))))
7832 (inputs
7833 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7834 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7835 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7836 ("java-snakeyaml" ,java-snakeyaml)))
7837 (native-inputs
7838 `(("junit" ,java-junit)
7839 ("hamcrest" ,java-hamcrest-core)
7840 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7841 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7842 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7843 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7844 (synopsis "Yaml backend for Jackson")
7845 (description "Dataformat backends are used to support format alternatives
7846to JSON, supported by default. This is done by sub-classing Jackson core
7847abstractions.")
7848 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7849
7850(define-public java-stax2-api
7851 (package
7852 (name "java-stax2-api")
7853 (version "4.0.0")
7854 (source (origin
7855 (method url-fetch)
7856 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7857 "stax2-api-" version ".tar.gz"))
7858 (sha256
7859 (base32
7860 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7861 (build-system ant-build-system)
7862 (arguments
7863 `(#:jar-name "java-stax2-api.jar"
7864 #:source-dir "src/main/java"
7865 #:tests? #f)); no tests
7866 (home-page "https://github.com/FasterXML/stax2-api")
7867 (synopsis "Stax2 API")
7868 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7869significant new functionalities, such as full-featured bi-direction validation
7870interface and high-performance Typed Access API.")
7871 (license license:bsd-2)))
7872
7873(define-public java-woodstox-core
7874 (package
7875 (name "java-woodstox-core")
7876 (version "5.0.3")
7877 (source (origin
7878 (method url-fetch)
7879 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7880 "woodstox-core-" version ".tar.gz"))
7881 (sha256
7882 (base32
7883 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7884 (build-system ant-build-system)
7885 (arguments
7886 `(#:jar-name "woodstox.jar"
7887 #:test-exclude
7888 (list "**/Base*.java" "failing/**")
7889 #:phases
7890 (modify-phases %standard-phases
7891 (add-before 'build 'remove-msv-dep
7892 (lambda _
7893 ;; we don't need osgi, and it depends on msv
7894 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7895 ;; msv's latest release is from 2011 and we don't need it
7896 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7897 (delete-file-recursively "src/test/java/wstxtest/osgi")
7898 (delete-file-recursively "src/test/java/wstxtest/msv")
7899 #t))
7900 (add-before 'build 'copy-resources
7901 (lambda _
7902 (copy-recursively "src/main/resources" "build/classes")
7903 #t)))))
7904 (inputs
7905 `(("stax2" ,java-stax2-api)))
7906 (native-inputs
7907 `(("junit" ,java-junit)))
7908 (home-page "https://github.com/FasterXML/woodstox")
7909 (synopsis "Stax XML API implementation")
7910 (description "Woodstox is a stax XML API implementation.")
7911 (license license:asl2.0)))
7912
7913(define-public java-fasterxml-jackson-dataformat-xml
7914 (package
7915 (name "java-fasterxml-jackson-dataformat-xml")
7916 (version "2.9.4")
7917 (source (origin
7918 (method url-fetch)
7919 (uri (string-append "https://github.com/FasterXML/"
7920 "jackson-dataformat-xml/archive/"
7921 "jackson-dataformat-xml-" version ".tar.gz"))
7922 (sha256
7923 (base32
7924 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
7925 (build-system ant-build-system)
7926 (arguments
7927 `(#:jar-name "jackson-dataformat-xml.jar"
7928 #:source-dir "src/main/java"
7929 #:test-exclude
7930 (list "**/failing/**")
7931 #:phases
7932 (modify-phases %standard-phases
7933 (add-before 'configure 'generate-PackageVersion.java
7934 (lambda _
7935 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7936 (in (string-append out ".in")))
7937 (copy-file in out)
7938 (newline)
7939 (substitute* out
7940 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7941 (("@projectversion@") ,version)
7942 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7943 (("@projectartifactid@") "jackson-dataformat-xml")))
7944 #t))
7945 (add-before 'build 'copy-resources
7946 (lambda _
7947 (copy-recursively "src/main/resources" "build/classes")
7948 #t)))))
7949 (inputs
7950 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7951 ("jackson-core" ,java-fasterxml-jackson-core)
7952 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7953 ("jackson-databind" ,java-fasterxml-jackson-databind)
7954 ("stax2-api" ,java-stax2-api)
7955 ("woodstox" ,java-woodstox-core)))
7956 (native-inputs
7957 `(("junit" ,java-junit)
7958 ("hamcrest" ,java-hamcrest-core)))
7959 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7960 (synopsis "Read and write XML")
7961 (description "This package contains Jackson extension component for reading
7962and writing XML encoded data.
7963
7964Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7965approach (that is, no support is added for \"Schema-first\" approach). Support
7966for JAXB annotations is provided by JAXB annotation module; this module
7967provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7968@code{JsonFactory}) as well as small number of higher level overrides needed to
7969make data-binding work.")
7970 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7971
7972(define-public java-hdrhistogram
7973 (package
7974 (name "java-hdrhistogram")
7975 (version "2.1.9")
7976 (source (origin
7977 (method url-fetch)
7978 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7979 "archive/HdrHistogram-" version ".tar.gz"))
7980 (sha256
7981 (base32
7982 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7983 (build-system ant-build-system)
7984 (arguments
7985 `(#:jar-name "java-hdrhistogram.jar"
7986 #:source-dir "src/main/java"
7987 #:phases
7988 (modify-phases %standard-phases
7989 (add-before 'configure 'set-version
7990 (lambda _
7991 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7992 (template (string-append version-java ".template")))
7993 (copy-file template version-java)
7994 (substitute* version-java
7995 (("\\$VERSION\\$") ,version)
7996 (("\\$BUILD_TIME\\$") "0"))
7997 #t))))))
7998 (native-inputs
7999 `(("junit" ,java-junit)
8000 ("hamcrest" ,java-hamcrest-core)))
8001 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8002 (synopsis "High dynamic range histogram")
8003 (description "Hdrhistogram allows to create histograms that support
8004recording and analyzing sampled data value counts across a configurable integer
8005value range with configurable value precision within the range. Value precision
8006is expressed as the number of significant digits in the value recording, and
8007provides control over value quantization behavior across the value range and
8008the subsequent value resolution at any given level.")
8009 (license license:public-domain)))
8010
8011(define-public java-cofoja
8012 (package
8013 (name "java-cofoja")
8014 (version "1.3")
8015 (source (origin
8016 (method git-fetch)
8017 (uri (git-reference
8018 (url "https://github.com/nhatminhle/cofoja.git")
8019 (commit (string-append "v" version))))
8020 (file-name (string-append "java-cofoja-" version "-checkout"))
8021 (sha256
8022 (base32
8023 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8024 (build-system ant-build-system)
8025 (arguments
8026 `(#:build-target "dist"
8027 #:test-target "test"
8028 #:jdk ,icedtea-8
8029 #:make-flags
8030 (list "-Ddist.dir=dist")
8031 #:modules ((guix build ant-build-system)
8032 (guix build java-utils)
8033 (guix build utils)
8034 (srfi srfi-1)
8035 (ice-9 match))
8036 #:phases
8037 (modify-phases %standard-phases
8038 ;; The bulid system ignores the class path the ant-build-system sets
8039 ;; up and instead expects to find all dependencies in the "lib"
8040 ;; directory.
8041 (add-after 'unpack 'create-libdir
8042 (lambda* (#:key inputs #:allow-other-keys)
8043 (mkdir-p "lib")
8044 (for-each
8045 (lambda (file)
8046 (let ((target (string-append "lib/" (basename file))))
8047 (unless (file-exists? target)
8048 (symlink file target))))
8049 (append-map (match-lambda
8050 ((label . dir)
8051 (find-files dir "\\.jar$")))
8052 inputs))
8053 #t))
8054 (replace 'install (install-jars "dist")))))
8055 (inputs
8056 `(("java-asm" ,java-asm)))
8057 (native-inputs
8058 `(("java-junit" ,java-junit)))
8059 (home-page "https://github.com/nhatminhle/cofoja")
8060 (synopsis "Contracts for Java")
8061 (description "Contracts for Java, or Cofoja for short, is a contract
8062programming framework and test tool for Java, which uses annotation processing
8063and bytecode instrumentation to provide run-time checking. (In particular,
8064this is not a static analysis tool.)")
8065 (license license:lgpl3+)))
8066
8067(define-public java-aopalliance
8068 (package
8069 (name "java-aopalliance")
8070 (version "1.0")
8071 (source (origin
8072 (method git-fetch)
8073 ;; Note: this git repository is not official, but contains the
8074 ;; source code that is in the CVS repository. Downloading the
8075 ;; tarball from sourceforge is undeterministic, and the cvs download
8076 ;; fails.
8077 (uri (git-reference
8078 (url "https://github.com/hoverruan/aopalliance")
8079 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8080 (file-name (string-append name "-" version))
8081 (sha256
8082 (base32
8083 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8084 (build-system ant-build-system)
8085 (arguments
8086 `(#:jar-name "java-aopalliance.jar"
8087 #:jdk ,icedtea-8
8088 #:tests? #f; no tests
8089 #:source-dir "aopalliance/src/main"))
8090 (home-page "http://aopalliance.sourceforge.net")
8091 (synopsis "Aspect-Oriented Programming")
8092 (description "The AOP Alliance project is a joint project between several
8093software engineering people who are interested in Aspect-Oriented Programming
8094(AOP) and Java.")
8095 (license license:public-domain)))
8096
8097(define-public java-javax-inject
8098 (package
8099 (name "java-javax-inject")
8100 (version "tck-1")
8101 (source (origin
8102 (method url-fetch)
8103 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8104 "archive/javax.inject-" version ".tar.gz"))
8105 (sha256
8106 (base32
8107 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8108 (build-system ant-build-system)
8109 (arguments
8110 `(#:jar-name "java-javax-inject.jar"
8111 #:jdk ,icedtea-8
8112 #:tests? #f)); no tests
8113 (home-page "http://github.com/javax-inject/javax-inject")
8114 (synopsis "JSR-330: Dependency Injection for Java")
8115 (description "This package specifies a means for obtaining objects in such
8116a way as to maximize reusability, testability and maintainability compared to
8117traditional approaches such as constructors, factories, and service locators
8118(e.g., JNDI). This process, known as dependency injection, is beneficial to
8119most nontrivial applications.
8120
8121Many types depend on other types. For example, a @var{Stopwatch} might depend
8122on a @var{TimeSource}. The types on which a type depends are known as its
8123dependencies. The process of finding an instance of a dependency to use at run
8124time is known as resolving the dependency. If no such instance can be found,
8125the dependency is said to be unsatisfied, and the application is broken.")
8126 (license license:asl2.0)))
8127
8128(define-public java-guice
8129 (package
8130 (name "java-guice")
8131 (version "4.1")
8132 (source (origin
8133 (method url-fetch)
8134 (uri (string-append "https://github.com/google/guice/archive/"
8135 version ".tar.gz"))
8136 (file-name (string-append name "-" version ".tar.gz"))
8137 (modules '((guix build utils)))
8138 (snippet
8139 `(begin
8140 (for-each delete-file (find-files "." ".*.jar"))))
8141 (sha256
8142 (base32
8143 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8144 (build-system ant-build-system)
8145 (arguments
8146 `(#:jar-name "java-guice.jar"
8147 #:jdk ,icedtea-8
8148 #:tests? #f; FIXME: tests are not in a java sub directory
8149 #:source-dir "core/src"))
8150 (inputs
8151 `(("guava" ,java-guava)
8152 ("java-cglib" ,java-cglib)
8153 ("java-aopalliance" ,java-aopalliance)
8154 ("java-javax-inject" ,java-javax-inject)
8155 ("java-asm" ,java-asm)))
8156 (home-page "https://github.com/google/guice")
8157 (synopsis "Lightweight dependency injection framework")
8158 (description "Guice is a lightweight dependency injection framework fo
8159Java 6 and above.")
8160 (license license:asl2.0)))
8161
8162(define-public java-guice-servlet
8163 (package
8164 (inherit java-guice)
8165 (name "java-guice-servlet")
8166 (arguments
8167 `(#:jar-name "guice-servlet.jar"
8168 #:source-dir "extensions/servlet/src/"
8169 #:jdk ,icedtea-8
8170 #:tests? #f)); FIXME: not in a java subdir
8171 (inputs
8172 `(("guice" ,java-guice)
8173 ("servlet" ,java-classpathx-servletapi)
8174 ,@(package-inputs java-guice)))))
8175
8176(define-public java-assertj
8177 (package
8178 (name "java-assertj")
8179 (version "3.8.0")
8180 (source (origin
8181 (method url-fetch)
8182 (uri (string-append "https://github.com/joel-costigliola/"
8183 "assertj-core/archive/"
8184 "assertj-core-" version ".tar.gz"))
8185 (sha256
8186 (base32
8187 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8188 (build-system ant-build-system)
8189 (arguments
8190 `(#:jar-name "java-assertj.jar"
8191 #:jdk ,icedtea-8
8192 #:source-dir "src/main/java"
8193 #:tests? #f)); depends on tng-junit which depends on assertj
8194 (inputs
8195 `(("cglib" ,java-cglib)
8196 ("junit" ,java-junit)
8197 ("hamcrest" ,java-hamcrest-core)))
8198 (native-inputs
8199 `(("mockito" ,java-mockito-1)))
8200 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8201 (synopsis "Fluent assertions for java")
8202 (description "AssertJ core is a Java library that provides a fluent
8203interface for writing assertions. Its main goal is to improve test code
8204readability and make maintenance of tests easier.")
8205 (license license:asl2.0)))
8206
8207(define-public java-jboss-javassist
8208 (package
8209 (name "java-jboss-javassist")
8210 (version "3.21.0")
8211 (source (origin
8212 (method url-fetch)
8213 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8214 "archive/rel_"
8215 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8216 "_ga.tar.gz"))
8217 (sha256
8218 (base32
8219 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8220 (build-system ant-build-system)
8221 (arguments
8222 `(#:jar-name "java-jboss-javassist.jar"
8223 #:jdk ,icedtea-8
8224 #:source-dir "src/main"
8225 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8226 #:phases
8227 (modify-phases %standard-phases
8228 (add-before 'configure 'remove-binary
8229 (lambda _
8230 (delete-file "javassist.jar")
8231 #t)))))
8232 (native-inputs
8233 `(("junit" ,java-junit)))
8234 (home-page "https://github.com/jboss-javassist/javassist")
8235 (synopsis "Java bytecode engineering toolkit")
8236 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8237manipulation simple. It is a class library for editing bytecodes in Java; it
8238enables Java programs to define a new class at runtime and to modify a class
8239file when the JVM loads it.")
8240 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8241
8242(define-public java-jcommander
8243 (package
8244 (name "java-jcommander")
8245 (version "1.71")
8246 (source (origin
8247 (method url-fetch)
8248 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8249 version ".tar.gz"))
8250 (file-name (string-append name "-" version ".tar.gz"))
8251 (sha256
8252 (base32
8253 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8254 (build-system ant-build-system)
8255 (arguments
8256 `(#:jar-name "java-jcommander.jar"
8257 #:jdk ,icedtea-8
8258 #:tests? #f; requires testng which depends on jcommander
8259 #:source-dir "src/main/java"))
8260 (home-page "http://jcommander.org")
8261 (synopsis "Command line parameters parser")
8262 (description "JCommander is a very small Java framework that makes it
8263trivial to parse command line parameters. Parameters are declared with
8264annotations.")
8265 (license license:asl2.0)))
8266
8267(define-public java-bsh
8268 (package
8269 (name "java-bsh")
8270 (version "2.0b6")
8271 (source (origin
8272 (method url-fetch)
8273 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8274 version ".tar.gz"))
8275 (file-name (string-append name "-" version ".tar.gz"))
8276 (sha256
8277 (base32
8278 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8279 (build-system ant-build-system)
8280 (arguments
8281 `(#:build-target "jarall"
8282 #:test-target "junit-tests-all"
8283 #:phases
8284 (modify-phases %standard-phases
8285 (replace 'install
8286 (lambda* (#:key outputs #:allow-other-keys)
8287 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8288 (mkdir-p share)
8289 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8290 #t))))))
8291 (home-page "http://beanshell.org/")
8292 (synopsis "Lightweight Scripting for Java")
8293 (description "BeanShell is a small, free, embeddable Java source
8294interpreter with object scripting language features, written in Java.
8295BeanShell dynamically executes standard Java syntax and extends it with common
8296scripting conveniences such as loose types, commands, and method closures like
8297those in Perl and JavaScript.")
8298 (license license:asl2.0)))
8299
8300(define-public java-fest-util
8301 (package
8302 (name "java-fest-util")
8303 (version "1.2.5")
8304 (source (origin
8305 (method url-fetch)
8306 (uri (string-append "https://github.com/alexruiz/fest-util/"
8307 "archive/fest-util-" version ".tar.gz"))
8308 (sha256
8309 (base32
8310 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8311 (build-system ant-build-system)
8312 (arguments
8313 `(#:jar-name "java-fest-util.jar"
8314 #:source-dir "src/main/java"))
8315 (native-inputs
8316 `(("junit" ,java-junit)
8317 ("hamcrest" ,java-hamcrest-core)))
8318 (home-page "https://github.com/alexruiz/fest-util")
8319 (synopsis "FEST common utilities")
8320 (description "Common utilities used in all FEST module.")
8321 (license license:asl2.0)))
8322
8323(define-public java-fest-test
8324 (package
8325 (name "java-fest-test")
8326 (version "2.1.0")
8327 (source (origin
8328 (method url-fetch)
8329 (uri (string-append "https://github.com/alexruiz/fest-test/"
8330 "archive/fest-test-" version ".tar.gz"))
8331 (sha256
8332 (base32
8333 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8334 (build-system ant-build-system)
8335 (arguments
8336 `(#:jar-name "java-fest-test.jar"
8337 #:source-dir "src/main/java"
8338 #:tests? #f)); no tests
8339 (inputs
8340 `(("junit" ,java-junit)))
8341 (home-page "https://github.com/alexruiz/fest-test")
8342 (synopsis "Common FEST testing infrastructure")
8343 (description "Fest-test contains the common FEST testing infrastructure.")
8344 (license license:asl2.0)))
8345
8346(define-public java-fest-assert
8347 (package
8348 (name "java-fest-assert")
8349 (version "2.0M10")
8350 (source (origin
8351 (method url-fetch)
8352 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8353 "archive/fest-assert-core-" version ".tar.gz"))
8354 (sha256
8355 (base32
8356 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8357 (build-system ant-build-system)
8358 (arguments
8359 `(#:jar-name "java-fest-assert.jar"
8360 #:source-dir "src/main/java"
8361 #:test-exclude
8362 (list
8363 "**/Abstract*.java"
8364 "**/*BaseTest.java"
8365 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8366 "**/MessageFormatter_format_Test.java"
8367 "**/internal/*/*_assert*_Test.java")))
8368 (inputs
8369 `(("java-fest-util" ,java-fest-util)))
8370 (native-inputs
8371 `(("java-junit" ,java-junit)
8372 ("java-fest-test" ,java-fest-test)
8373 ("java-hamcrest-core" ,java-hamcrest-core)
8374 ("java-mockito" ,java-mockito-1)
8375 ("java-cglib" ,java-cglib)
8376 ("java-objenesis" ,java-objenesis)
8377 ("java-asm" ,java-asm)))
8378 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8379 (synopsis "FEST fluent assertions")
8380 (description "FEST-Assert provides a fluent interface for assertions.")
8381 (license license:asl2.0)))
8382
8383(define-public java-testng
8384 (package
8385 (name "java-testng")
8386 (version "6.14.3")
8387 (source (origin
8388 (method git-fetch)
8389 (uri (git-reference
8390 (url "https://github.com/cbeust/testng.git")
8391 (commit version)))
8392 (file-name (string-append name "-" version "-checkout"))
8393 (sha256
8394 (base32
8395 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8396 (build-system ant-build-system)
8397 (arguments
8398 `(#:jdk ,icedtea-8; java.util.function
8399 #:jar-name "java-testng.jar"
8400 #:source-dir "src/main/java"
8401 #:phases
8402 (modify-phases %standard-phases
8403 ;; FIXME: I don't know why these tests fail
8404 (add-after 'unpack 'delete-failing-tests
8405 (lambda _
8406 (substitute* "src/test/resources/testng.xml"
8407 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8408 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8409 #t))
8410 ;; We don't have groovy
8411 (add-after 'unpack 'delete-groovy-tests
8412 (lambda _
8413 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8414 (substitute* "src/test/resources/testng.xml"
8415 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8416 #t))
8417 (add-before 'build 'copy-resources
8418 (lambda _
8419 (copy-recursively "src/main/resources" "build/classes")
8420 #t))
8421 (add-before 'check 'copy-test-resources
8422 (lambda _
8423 (copy-recursively "src/test/resources" "build/test-classes")
8424 #t))
8425 (replace 'check
8426 (lambda _
8427 (invoke "ant" "compile-tests")
8428 ;; we don't have groovy
8429 (substitute* "src/test/resources/testng.xml"
8430 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8431 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8432 ":build/classes"
8433 ":build/test-classes")
8434 "-Dtest.resources.dir=src/test/resources"
8435 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8436 (propagated-inputs
8437 `(("junit" ,java-junit)
8438 ("java-jsr305" ,java-jsr305)
8439 ("java-bsh" ,java-bsh)
8440 ("java-jcommander" ,java-jcommander)
8441 ("java-guice" ,java-guice)
8442 ("snakeyaml" ,java-snakeyaml)))
8443 (native-inputs
8444 `(("guava" ,java-guava)
8445 ("java-javax-inject" ,java-javax-inject)
8446 ("java-hamcrest" ,java-hamcrest-all)
8447 ("java-assertj" ,java-assertj)
8448 ("java-mockito" ,java-mockito-1)
8449 ("cglib" ,java-cglib)
8450 ("asm" ,java-asm)
8451 ("aopalliance" ,java-aopalliance)))
8452 (home-page "http://testng.org")
8453 (synopsis "Testing framework")
8454 (description "TestNG is a testing framework inspired from JUnit and NUnit
8455but introducing some new functionalities that make it more powerful and easier
8456to use.")
8457 (license license:asl2.0)))
8458
8459(define-public java-jnacl
8460 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8461 (revision "2"))
8462 (package
8463 (name "java-jnacl")
8464 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8465 (source (origin
8466 (method git-fetch)
8467 (uri (git-reference
8468 (url "https://github.com/neilalexander/jnacl.git")
8469 (commit commit)))
8470 (file-name (git-file-name name version))
8471 (sha256
8472 (base32
8473 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8474 (build-system ant-build-system)
8475 (arguments
8476 `(#:jar-name "jnacl.jar"
8477 #:source-dir "src/main/java"
8478 #:jdk ,icedtea-8
8479 #:phases
8480 (modify-phases %standard-phases
8481 (add-before 'build 'fix-tests
8482 (lambda _
8483 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8484 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8485 (("assertions.Assertions") "assertions.api.Assertions"))
8486 #t))
8487 (replace 'check
8488 (lambda _
8489 (invoke "ant" "compile-tests")
8490 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8491 ":build/classes"
8492 ":build/test-classes")
8493 "org.testng.TestNG" "-testclass"
8494 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8495 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8496 ":build/classes"
8497 ":build/test-classes")
8498 "org.testng.TestNG" "-testclass"
8499 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
8500 (native-inputs
8501 `(("java-testng" ,java-testng)
8502 ("java-fest-util" ,java-fest-util)
8503 ("java-fest-assert" ,java-fest-assert)))
8504 (home-page "https://github.com/neilalexander/jnacl")
8505 (synopsis "Java implementation of NaCl")
8506 (description "Pure Java implementation of the NaCl: Networking and
8507Cryptography library.")
8508 (license license:bsd-2))))
8509
8510(define-public java-mvel2
8511 (package
8512 (name "java-mvel2")
8513 (version "2.3.1")
8514 (source (origin
8515 (method url-fetch)
8516 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8517 version ".Final.tar.gz"))
8518 (sha256
8519 (base32
8520 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8521 (build-system ant-build-system)
8522 (arguments
8523 `(#:jar-name "mvel2.jar"
8524 #:source-dir "src/main/java"
8525 #:test-exclude
8526 (list "**/Abstract*.java"
8527 ;; Base class with no tests
8528 "**/MVELThreadTest.java")
8529 #:phases
8530 (modify-phases %standard-phases
8531 (add-after 'install 'install-bin
8532 (lambda* (#:key outputs #:allow-other-keys)
8533 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8534 (mkdir-p bin)
8535 (with-output-to-file (string-append bin "/mvel2")
8536 (lambda _
8537 (display
8538 (string-append
8539 "#!" (which "bash") "\n"
8540 "if [ \"$#\" -ne \"2\" ]; then\n"
8541 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8542 "exit\n"
8543 "fi\n"
8544 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8545 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8546 " org.mvel2.sh.Main $1"))))
8547 (chmod (string-append bin "/mvel2") #o755))
8548 #t)))))
8549 (native-inputs
8550 `(("junit" ,java-junit)
8551 ("hamcrest" ,java-hamcrest-core)))
8552 (home-page "https://github.com/mvel/mvel")
8553 (synopsis "MVFLEX Expression Language")
8554 (description "MVEL has largely been inspired by Java syntax, but has some
8555fundamental differences aimed at making it more efficient as an expression
8556language, such as operators that directly support collection, array and string
8557matching, as well as regular expressions. MVEL is used to evaluate expressions
8558written using Java syntax.
8559
8560In addition to the expression language, MVEL serves as a templating language for
8561configuration and string construction.")
8562 (license license:asl2.0)))
8563
8564(define-public java-commons-jexl-2
8565 (package
8566 (name "java-commons-jexl")
8567 (version "2.1.1")
8568 (source (origin
8569 (method url-fetch)
8570 (uri (string-append "mirror://apache/commons/jexl/source/"
8571 "commons-jexl-" version "-src.tar.gz"))
8572 (sha256
8573 (base32
8574 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8575 (build-system ant-build-system)
8576 (arguments
8577 `(#:jar-name "commons-jexl-2.jar"
8578 #:jdk ,icedtea-8
8579 #:source-dir "src/main/java"
8580 #:phases
8581 (modify-phases %standard-phases
8582 (add-before 'check 'disable-broken-tests
8583 (lambda* (#:key inputs #:allow-other-keys)
8584 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8585 (substitute* "ArithmeticTest.java"
8586 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8587 (("asserter.assertExpression\\(\"imanull") "//"))
8588 ;; This test fails with "ambiguous method invocation"
8589 (delete-file "CacheTest.java")
8590 ;; This test doesn't have access to the temp directory
8591 (substitute* "ClassCreatorTest.java"
8592 (("java.io.tmpdir") "user.dir"))
8593 ;; This test fails in trying to detect whether it can run.
8594 (substitute* "ClassCreator.java"
8595 (("boolean canRun =.*") "boolean canRun = false;\n"))
8596 ;; ...and these tests depend on it.
8597 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8598 (delete-file "scripting/JexlScriptEngineTest.java"))
8599 #t))
8600 (add-before 'build 'run-javacc
8601 (lambda _
8602 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
8603 (invoke "java" "jjtree" "Parser.jjt")
8604 (invoke "java" "javacc" "Parser.jj"))
8605 #t)))))
8606 (inputs
8607 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8608 (native-inputs
8609 `(("java-junit" ,java-junit)
8610 ("java-hamcrest-core" ,java-hamcrest-core)
8611 ("javacc" ,javacc-4)))
8612 (home-page "https://commons.apache.org/proper/commons-jexl/")
8613 (synopsis "Java Expression Language ")
8614 (description "JEXL is a library intended to facilitate the implementation
8615of dynamic and scripting features in applications and frameworks written in
8616Java. JEXL implements an Expression Language based on some extensions to the
8617JSTL Expression Language supporting most of the constructs seen in
8618shell-script or ECMAScript. Its goal is to expose scripting features usable
8619by technical operatives or consultants working with enterprise platforms.")
8620 (license license:asl2.0)))
8621
8622(define-public java-lz4
8623 (package
8624 (name "java-lz4")
8625 (version "1.4.0")
8626 (source (origin
8627 (method url-fetch)
8628 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8629 version ".tar.gz"))
8630 (file-name (string-append name "-" version ".tar.gz"))
8631 (sha256
8632 (base32
8633 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8634 (build-system ant-build-system)
8635 (arguments
8636 `(#:jar-name "lz4.jar"
8637 #:jdk ,icedtea-8
8638 #:source-dir "src/java:src/java-unsafe"
8639 #:tests? #f; FIXME: requires more dependencies
8640 #:phases
8641 (modify-phases %standard-phases
8642 (add-before 'configure 'generate-source
8643 (lambda _
8644 (with-directory-excursion "src/build/source_templates"
8645 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8646 #t)))))
8647 (native-inputs
8648 `(("mvel" ,java-mvel2)))
8649 (home-page "https://jpountz.github.io/lz4-java")
8650 (synopsis "Compression algorithm")
8651 (description "LZ4 - Java is a Java port of the popular lz4 compression
8652algorithms and xxHash hashing algorithm.")
8653 (license license:asl2.0)))
8654
8655(define-public java-bouncycastle
8656 (package
8657 (name "java-bouncycastle")
8658 (version "1.60")
8659 (source (origin
8660 (method url-fetch)
8661 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
8662 (substring version 0 1) "v"
8663 (substring version 2 4) ".tar.gz"))
8664 (sha256
8665 (base32
8666 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
8667 (modules '((guix build utils)))
8668 (snippet
8669 '(begin
8670 (for-each delete-file
8671 (find-files "." "\\.jar$"))
8672 #t))))
8673 (build-system ant-build-system)
8674 (arguments
8675 `(#:jdk ,icedtea-8
8676 #:tests? #f
8677 #:phases
8678 (modify-phases %standard-phases
8679 (replace 'build
8680 (lambda _
8681 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
8682 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
8683 ;; FIXME: the tests freeze.
8684 ;; (replace 'check
8685 ;; (lambda _
8686 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
8687 (replace 'install
8688 (install-jars "build/artifacts/jdk1.5/jars")))))
8689 (inputs
8690 `(("java-javax-mail" ,java-javax-mail)))
8691 (native-inputs
8692 `(("unzip" ,unzip)
8693 ("junit" ,java-junit)
8694 ("java-native-access" ,java-native-access)
8695 ("java-native-access-platform" ,java-native-access-platform)))
8696 (home-page "https://www.bouncycastle.org")
8697 (synopsis "Cryptographic library")
8698 (description "Bouncy Castle is a cryptographic library for the Java
8699programming language.")
8700 (license license:expat)))
8701
8702(define-public java-lmax-disruptor
8703 (package
8704 (name "java-lmax-disruptor")
8705 (version "3.3.7")
8706 (source (origin
8707 (method url-fetch)
8708 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8709 "archive/" version ".tar.gz"))
8710 (file-name (string-append name "-" version ".tar.gz"))
8711 (sha256
8712 (base32
8713 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8714 (build-system ant-build-system)
8715 (arguments
8716 `(#:jar-name "java-lmax-disruptor.jar"
8717 #:jdk ,icedtea-8
8718 #:tests? #f)); tests hang
8719 (inputs
8720 `(("junit" ,java-junit)
8721 ("java-hdrhistogram" ,java-hdrhistogram)
8722 ("java-jmock" ,java-jmock)
8723 ("java-jmock-legacy" ,java-jmock-legacy)
8724 ("java-jmock-junit4" ,java-jmock-junit4)
8725 ("java-hamcrest-all" ,java-hamcrest-all)))
8726 (native-inputs
8727 `(("cglib" ,java-cglib)
8728 ("objenesis" ,java-objenesis)
8729 ("asm" ,java-asm)))
8730 (home-page "https://www.lmax.com/disruptor")
8731 (synopsis "High performance inter-thread communication")
8732 (description "LMAX Disruptor is a software pattern and software component
8733for high performance inter-thread communication that avoids the need for
8734message queues or resource locking.")
8735 (license license:asl2.0)))
8736
8737(define-public java-commons-bcel
8738 (package
8739 (name "java-commons-bcel")
8740 (version "6.1")
8741 (source (origin
8742 (method url-fetch)
8743 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8744 version "-src.tar.gz"))
8745 (sha256
8746 (base32
8747 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8748 (build-system ant-build-system)
8749 (arguments
8750 `(#:jar-name "bcel.jar"
8751 #:jdk ,icedtea-8
8752 #:source-dir "src/main/java"
8753 #:test-dir "src/test/java"
8754 ;; FIXME: Tests require the unpackaged jna.
8755 #:tests? #f))
8756 (home-page "https://commons.apache.org/proper/commons-bcel/")
8757 (synopsis "Byte code engineering library")
8758 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8759intended to give users a convenient way to analyze, create, and
8760manipulate (binary) Java class files. Classes are represented by objects
8761which contain all the symbolic information of the given class: methods, fields
8762and byte code instructions, in particular.
8763
8764Such objects can be read from an existing file, be transformed by a
8765program (e.g. a class loader at run-time) and written to a file again. An
8766even more interesting application is the creation of classes from scratch at
8767run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8768if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8769of Java @code{.class} files.")
8770 (license license:asl2.0)))
8771
8772(define-public java-xerial-core
8773 (package
8774 (name "java-xerial-core")
8775 (version "2.1")
8776 (source (origin
8777 (method url-fetch)
8778 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8779 version ".tar.gz"))
8780 (file-name (string-append name "-" version ".tar.gz"))
8781 (sha256
8782 (base32
8783 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8784 (build-system ant-build-system)
8785 (arguments
8786 `(#:jar-name "xerial-core.jar"
8787 #:source-dir "xerial-core/src/main/java"
8788 #:test-dir "xerial-core/src/test"
8789 #:phases
8790 (modify-phases %standard-phases
8791 (add-before 'build 'copy-resources
8792 (lambda _
8793 (copy-recursively "xerial-core/src/main/resources"
8794 "build/classes")
8795 #t)))))
8796 (native-inputs
8797 `(("junit" ,java-junit)
8798 ("hamcrest" ,java-hamcrest-core)))
8799 (home-page "https://github.com/xerial/xerial-java")
8800 (synopsis "Data management libraries for Java")
8801 (description "Xerial is a set of data management libraries for the Java
8802programming language. The ultimate goal of the Xerial project is to manage
8803everything as database, including class objects, text format data, data
8804streams, etc.")
8805 (license license:asl2.0)))
8806
8807(define-public java-powermock-reflect
8808 (package
8809 (name "java-powermock-reflect")
8810 (version "1.7.3")
8811 (source (origin
8812 (method url-fetch)
8813 (uri (string-append "https://github.com/powermock/powermock/"
8814 "archive/powermock-" version ".tar.gz"))
8815 (file-name (string-append name "-" version ".tar.gz"))
8816 (sha256
8817 (base32
8818 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8819 (patches
8820 (search-patches "java-powermock-fix-java-files.patch"))))
8821 (build-system ant-build-system)
8822 (arguments
8823 `(#:jar-name "java-powermock-reflect.jar"
8824 #:jdk ,icedtea-8
8825 #:source-dir "powermock-reflect/src/main/java"
8826 #:test-dir "powermock-reflect/src/test"))
8827 (inputs
8828 `(("java-objenesis" ,java-objenesis)))
8829 (native-inputs
8830 `(("junit" ,java-junit)
8831 ("cglib" ,java-cglib)
8832 ("asm" ,java-asm)
8833 ("hamcrest" ,java-hamcrest-core)
8834 ("assertj" ,java-assertj)))
8835 (home-page "https://github.com/powermock/powermock")
8836 (synopsis "Mock library extension framework")
8837 (description "PowerMock is a framework that extends other mock libraries
8838such as EasyMock with more powerful capabilities. PowerMock uses a custom
8839classloader and bytecode manipulation to enable mocking of static methods,
8840constructors, final classes and methods, private methods, removal of static
8841initializers and more. By using a custom classloader no changes need to be
8842done to the IDE or continuous integration servers which simplifies adoption.")
8843 (license license:asl2.0)))
8844
8845(define-public java-powermock-core
8846 (package
8847 (inherit java-powermock-reflect)
8848 (name "java-powermock-core")
8849 (arguments
8850 `(#:jar-name "java-powermock-core.jar"
8851 #:source-dir "powermock-core/src/main/java"
8852 #:test-dir "powermock-core/src/test"
8853 #:tests? #f; requires powermock-api
8854 #:jdk ,icedtea-8
8855 #:phases
8856 (modify-phases %standard-phases
8857 (add-before 'build 'copy-resources
8858 (lambda _
8859 (copy-recursively "powermock-core/src/main/resources"
8860 "build/classes")
8861 #t)))))
8862 (inputs
8863 `(("reflect" ,java-powermock-reflect)
8864 ("javassist" ,java-jboss-javassist)))
8865 (native-inputs
8866 `(("junit" ,java-junit)
8867 ("assertj" ,java-assertj)
8868 ("mockito" ,java-mockito-1)))))
8869
8870(define-public java-powermock-api-support
8871 (package
8872 (inherit java-powermock-reflect)
8873 (name "java-powermock-api-support")
8874 (build-system ant-build-system)
8875 (arguments
8876 `(#:jar-name "java-powermock-api-support.jar"
8877 #:jdk ,icedtea-8
8878 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8879 #:tests? #f)); no tests
8880 (inputs
8881 `(("core" ,java-powermock-core)
8882 ("reflect" ,java-powermock-reflect)))))
8883
8884(define-public java-powermock-modules-junit4-common
8885 (package
8886 (inherit java-powermock-reflect)
8887 (name "java-powermock-modules-junit4-common")
8888 (build-system ant-build-system)
8889 (arguments
8890 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8891 #:jdk ,icedtea-8
8892 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8893 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8894 (inputs
8895 `(("core" ,java-powermock-core)
8896 ("easymock" ,java-easymock)
8897 ("reflect" ,java-powermock-reflect)
8898 ("hamcrest" ,java-hamcrest-core)
8899 ("cglib" ,java-cglib)))))
8900
8901(define-public java-powermock-modules-junit4
8902 (package
8903 (inherit java-powermock-reflect)
8904 (name "java-powermock-modules-junit4")
8905 (build-system ant-build-system)
8906 (arguments
8907 `(#:jar-name "java-powermock-modules-junit4.jar"
8908 #:jdk ,icedtea-8
8909 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
8910 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8911 #:phases
8912 (modify-phases %standard-phases
8913 (add-before 'build 'fix-junit-detection
8914 (lambda _
8915 ;; Our junit version is 4.12-SNAPSHOT
8916 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8917 "PowerMockJUnit4MethodValidator.java")
8918 (("4.12") "4.12-SNAPSHOT"))
8919 #t)))))
8920 (inputs
8921 `(("core" ,java-powermock-core)
8922 ("reflect" ,java-powermock-reflect)
8923 ("common" ,java-powermock-modules-junit4-common)
8924 ("cglib" ,java-cglib)))
8925 (native-inputs
8926 `(("easymock" ,java-easymock)
8927 ("hamcrest" ,java-hamcrest-core)
8928 ("objenesis" ,java-objenesis)
8929 ("asm" ,java-asm)
8930 ("junit" ,java-junit)))))
8931
8932(define-public java-powermock-api-easymock
8933 (package
8934 (inherit java-powermock-reflect)
8935 (name "java-powermock-api-easymock")
8936 (build-system ant-build-system)
8937 (arguments
8938 `(#:jar-name "java-powermock-api-easymock.jar"
8939 #:jdk ,icedtea-8
8940 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8941 #:tests? #f; no tests
8942 #:phases
8943 (modify-phases %standard-phases
8944 (add-before 'build 'fix-file
8945 (lambda _
8946 ;; FIXME: This looks wrong, but it fixes a build error.
8947 (with-directory-excursion "powermock-api/powermock-api-easymock"
8948 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8949 (("classLoader instanceof MockClassLoader") "false")
8950 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8951 #t)))))
8952 (inputs
8953 `(("core" ,java-powermock-core)
8954 ("easymock" ,java-easymock)
8955 ("reflect" ,java-powermock-reflect)
8956 ("support" ,java-powermock-api-support)
8957 ("cglib" ,java-cglib)))))
8958
8959(define-public java-jboss-jms-api-spec
8960 (package
8961 (name "java-jboss-jms-api-spec")
8962 (version "2.0")
8963 (source (origin
8964 (method url-fetch)
8965 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8966 "archive/jboss-jms-api_" version
8967 "_spec-1.0.1.Final.tar.gz"))
8968 (sha256
8969 (base32
8970 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8971 (build-system ant-build-system)
8972 (arguments
8973 `(#:jar-name "java-jboss-jms-api_spec.jar"
8974 #:jdk ,icedtea-8
8975 #:source-dir "."
8976 #:tests? #f)); no tests
8977 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8978 (synopsis "Java Message Service API specification")
8979 (description "Java Message Service (JMS) API is used to send messages
8980messages between two or more clients. It is a messaging standard that allows
8981application components to create, send, receive, and read messages.")
8982 ; either gpl2 only with GPL Classpath Exception, or cddl.
8983 (license (list license:gpl2 license:cddl1.0))))
8984
8985(define-public java-mail
8986 (package
8987 (name "java-mail")
8988 (version "1.6.0")
8989 (source (origin
8990 (method url-fetch)
8991 (uri (string-append "https://github.com/javaee/javamail/archive/"
8992 "JAVAMAIL-1_6_0.tar.gz"))
8993 (sha256
8994 (base32
8995 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8996 (build-system ant-build-system)
8997 (arguments
8998 `(#:jar-name "java-mail.jar"
8999 #:jdk ,icedtea-8
9000 #:source-dir "mail/src/main/java"
9001 #:test-dir "mail/src/test"
9002 #:test-exclude
9003 (list "**/CollectorFormatterTest.java"
9004 "**/CompactFormatterTest.java"
9005 "**/DurationFilterTest.java"
9006 "**/MailHandlerTest.java"
9007 "**/GetLocalAddressTest.java"
9008 ;; FIXME: both end with:
9009 ;; java.lang.ClassNotFoundException:
9010 ;; javax.mail.internet.MimeMultipartParseTest
9011 "**/MimeMultipartParseTest.java"
9012 "**/SearchTermSerializationTest.java")
9013 #:phases
9014 (modify-phases %standard-phases
9015 (add-before 'configure 'move-version.java
9016 (lambda _
9017 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9018 "mail/src/main/java/javax/mail/Version.java")
9019 #t))
9020 (add-before 'build 'copy-resources
9021 (lambda _
9022 (copy-recursively "mail/src/main/resources/META-INF"
9023 "build/classes/META-INF")
9024 #t)))))
9025 (native-inputs
9026 `(("junit" ,java-junit)
9027 ("hamcrest" ,java-hamcrest-core)))
9028 (home-page "https://javaee.github.io/javamail/")
9029 (synopsis "Mail-related functionnalities in Java")
9030 (description "The JavaMail API provides a platform-independent and
9031protocol-independent framework to build mail and messaging applications.")
9032 ;; General Public License Version 2 only ("GPL") or the Common Development
9033 ;; and Distribution License("CDDL")
9034 (license (list license:cddl1.1
9035 license:gpl2)))); with classpath exception
9036
9037(define-public java-jeromq
9038 (package
9039 (name "java-jeromq")
9040 (version "0.4.3")
9041 (source (origin
9042 (method git-fetch)
9043 (uri (git-reference
9044 (url "https://github.com/zeromq/jeromq.git")
9045 (commit (string-append "v" version))))
9046 (file-name (string-append name "-" version "-checkout"))
9047 (sha256
9048 (base32
9049 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9050 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9051 (build-system ant-build-system)
9052 (arguments
9053 `(#:jar-name "java-jeromq.jar"
9054 #:source-dir "src/main/java"
9055 #:jdk ,icedtea-8
9056 #:test-exclude
9057 (list
9058 "**/Abstract*.java"
9059 ;; Requires network
9060 "**/ZBeaconTest.java"
9061 ;; Failures
9062 "**/DealerSpecTest.java"
9063 "**/CustomDecoderTest.java"
9064 "**/CustomEncoderTest.java"
9065 "**/ConnectRidTest.java"
9066 "**/ReqSpecTest.java"
9067 "**/PushPullSpecTest.java"
9068 "**/PubSubHwmTest.java"
9069 "**/RouterSpecTest.java"
9070 "**/ProxyTest.java")))
9071 (inputs
9072 `(("java-jnacl" ,java-jnacl)))
9073 (native-inputs
9074 `(("java-hamcrest-core" ,java-hamcrest-core)
9075 ("junit" ,java-junit)))
9076 (home-page "http://zeromq.org/bindings:java")
9077 (synopsis "Java binding for 0MQ")
9078 (description "Jeromq provides the java bindings for 0MQ.")
9079 (license license:mpl2.0)))
9080
9081(define-public java-kafka-clients
9082 (package
9083 (name "java-kafka-clients")
9084 (version "1.0.0")
9085 (source (origin
9086 (method url-fetch)
9087 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9088 version "-src.tgz"))
9089 (sha256
9090 (base32
9091 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9092 (build-system ant-build-system)
9093 (arguments
9094 `(#:jar-name "java-kafka-clients.jar"
9095 #:jdk ,icedtea-8
9096 #:source-dir "clients/src/main/java"
9097 #:test-dir "clients/src/test"
9098 #:test-exclude
9099 (list
9100 ;; This file does not contain a class
9101 "**/IntegrationTest.java"
9102 ;; Requires network
9103 "**/ClientUtilsTest.java"
9104 ;; End with errors that seem related to our powermock
9105 "**/KafkaProducerTest.java"
9106 "**/BufferPoolTest.java")))
9107 (inputs
9108 `(("java-slf4j-api" ,java-slf4j-api)
9109 ("java-lz4" ,java-lz4)))
9110 (native-inputs
9111 `(("junit" ,java-junit)
9112 ("hamcrest" ,java-hamcrest-all)
9113 ("objenesis" ,java-objenesis)
9114 ("asm" ,java-asm)
9115 ("cglib" ,java-cglib)
9116 ("javassist" ,java-jboss-javassist)
9117 ("snappy" ,java-snappy)
9118 ("easymock" ,java-easymock)
9119 ("powermock" ,java-powermock-core)
9120 ("powermock-easymock" ,java-powermock-api-easymock)
9121 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9122 ("powermock-junit4" ,java-powermock-modules-junit4)
9123 ("powermock-support" ,java-powermock-api-support)
9124 ("java-bouncycastle" ,java-bouncycastle)))
9125 (home-page "https://kafka.apache.org")
9126 (synopsis "Distributed streaming platform")
9127 (description "Kafka is a distributed streaming platform, which means:
9128@itemize
9129@item it can publish and subscribe to streams of records;
9130@item it can store streams of records in a fault-tolerant way;
9131@item it can process streams of records as they occur.
9132@end itemize")
9133 ;; Either cddl or gpl2 only.
9134 (license (list license:cddl1.1; actually cddl1.1
9135 license:gpl2)))); with classpath exception
9136
9137(define-public java-jdom
9138 (package
9139 (name "java-jdom")
9140 (version "1.1.3")
9141 (source (origin
9142 (method url-fetch)
9143 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9144 version ".tar.gz"))
9145 (sha256
9146 (base32
9147 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9148 (build-system ant-build-system)
9149 (arguments
9150 `(#:build-target "package"
9151 #:tests? #f; tests are run as part of the build process
9152 #:phases
9153 (modify-phases %standard-phases
9154 (replace 'install
9155 (install-jars "build")))))
9156 (home-page "http://jdom.org/")
9157 (synopsis "Access, manipulate, and output XML data")
9158 (description "Java-based solution for accessing, manipulating, and
9159outputting XML data from Java code.")
9160 (license license:bsd-4)))
9161
9162(define-public java-geronimo-xbean-reflect
9163 (package
9164 (name "java-geronimo-xbean-reflect")
9165 (version "4.5")
9166 (source (origin
9167 (method svn-fetch)
9168 (uri (svn-reference
9169 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9170 (revision 1807396)))
9171 (file-name (string-append name "-" version))
9172 (sha256
9173 (base32
9174 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9175 (build-system ant-build-system)
9176 (arguments
9177 `(#:jar-name "geronimo-xbean-reflect.jar"
9178 #:source-dir "xbean-reflect/src/main/java"
9179 #:test-dir "xbean-reflect/src/test"
9180 #:jdk ,icedtea-8
9181 #:test-exclude
9182 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9183 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9184 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9185 #:phases
9186 (modify-phases %standard-phases
9187 (add-before 'build 'fix-source
9188 (lambda _
9189 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9190 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9191 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9192 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9193 #t))))))
9194 (inputs
9195 `(("asm" ,java-asm)
9196 ("log4j" ,java-log4j-api)
9197 ("log4j-1.2" ,java-log4j-1.2-api)
9198 ("log4j-core" ,java-log4j-core)
9199 ("logging" ,java-commons-logging-minimal)))
9200 (native-inputs
9201 `(("junit" ,java-junit)))
9202 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9203 (synopsis "Dependency injection helper")
9204 (description "Xbean-reflect provides very flexible ways to create objects
9205and graphs of objects for dependency injection frameworks")
9206 (license license:asl2.0)))
9207
9208(define-public java-geronimo-xbean-bundleutils
9209 (package
9210 (inherit java-geronimo-xbean-reflect)
9211 (name "java-geronimo-xbean-bundleutils")
9212 (arguments
9213 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9214 #:source-dir "xbean-bundleutils/src/main/java"
9215 #:test-dir "xbean-bundleutils/src/test"
9216 #:phases
9217 (modify-phases %standard-phases
9218 (add-before 'build 'fix-java
9219 (lambda _
9220 ;; We use a more recent version of osgi, so this file requires
9221 ;; more interface method implementations.
9222 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9223 (("import org.osgi.framework.ServiceRegistration;")
9224 "import org.osgi.framework.ServiceRegistration;
9225import org.osgi.framework.ServiceFactory;
9226import java.util.Collection;
9227import org.osgi.framework.ServiceObjects;")
9228 (("public Bundle getBundle\\(\\)")
9229 "@Override
9230public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9231 throw new UnsupportedOperationException();
9232}
9233@Override
9234public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9235 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9236 throw new UnsupportedOperationException();
9237}
9238public Bundle getBundle()"))
9239 #t)))))
9240 (inputs
9241 `(("java-slf4j" ,java-slf4j-api)
9242 ("java-asm" ,java-asm)
9243 ("java-osgi-framework" ,java-osgi-framework)
9244 ("java-eclipse-osgi" ,java-eclipse-osgi)
9245 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9246
9247(define-public java-geronimo-xbean-asm-util
9248 (package
9249 (inherit java-geronimo-xbean-reflect)
9250 (name "java-geronimo-xbean-asm-util")
9251 (arguments
9252 `(#:jar-name "geronimo-xbean-asm-util.jar"
9253 #:source-dir "xbean-asm-util/src/main/java"
9254 #:tests? #f)); no tests
9255 (inputs
9256 `(("java-asm" ,java-asm)))
9257 (native-inputs '())))
9258
9259(define-public java-geronimo-xbean-finder
9260 (package
9261 (inherit java-geronimo-xbean-reflect)
9262 (name "java-geronimo-xbean-finder")
9263 (arguments
9264 `(#:jar-name "geronimo-xbean-finder.jar"
9265 #:source-dir "xbean-finder/src/main/java"
9266 #:test-dir "xbean-finder/src/test"))
9267 (inputs
9268 `(("java-slf4j-api" ,java-slf4j-api)
9269 ("java-asm" ,java-asm)
9270 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9271 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9272 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9273 ("java-osgi-framework" ,java-osgi-framework)))
9274 (native-inputs
9275 `(("java-junit" ,java-junit)
9276 ("java-hamcrest-core" ,java-hamcrest-core)))))
9277
9278(define-public java-gson
9279 (package
9280 (name "java-gson")
9281 (version "2.8.2")
9282 (source (origin
9283 (method url-fetch)
9284 (uri (string-append "https://github.com/google/gson/archive/"
9285 "gson-parent-" version ".tar.gz"))
9286 (sha256
9287 (base32
9288 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9289 (build-system ant-build-system)
9290 (arguments
9291 `(#:jar-name "gson.jar"
9292 #:source-dir "gson/src/main/java"
9293 #:test-dir "gson/src/test"))
9294 (native-inputs
9295 `(("java-junit" ,java-junit)
9296 ("java-hamcrest-core" ,java-hamcrest-core)))
9297 (home-page "https://github.com/google/gson")
9298 (synopsis "Java serialization/deserialization library from/to JSON")
9299 (description "Gson is a Java library that can be used to convert Java
9300Objects into their JSON representation. It can also be used to convert a JSON
9301string to an equivalent Java object. Gson can work with arbitrary Java objects
9302including pre-existing objects that you do not have source-code of.")
9303 (license license:asl2.0)))
9304
9305(define-public java-hawtjni
9306 (package
9307 (name "java-hawtjni")
9308 (version "1.15")
9309 (source (origin
9310 (method url-fetch)
9311 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9312 "hawtjni-project-" version ".tar.gz"))
9313 (sha256
9314 (base32
9315 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9316 (build-system ant-build-system)
9317 (arguments
9318 `(#:jar-name "hawtjni.jar"
9319 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9320 #:tests? #f; no tests
9321 #:phases
9322 (modify-phases %standard-phases
9323 (add-before 'build 'build-native
9324 (lambda* (#:key inputs #:allow-other-keys)
9325 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9326 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9327 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9328 "-fPIC" "-O2" include)
9329 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9330 "-fPIC" "-O2" include)
9331 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9332 "hawtjni.o" "hawtjni-callback.o")))
9333 #t))
9334 (add-after 'install 'install-native
9335 (lambda* (#:key outputs #:allow-other-keys)
9336 (let* ((out (assoc-ref outputs "out"))
9337 (lib (string-append out "/lib"))
9338 (inc (string-append out "/include")))
9339 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9340 (install-file "libhawtjni.so" lib)
9341 (install-file "hawtjni.h" inc)))
9342 #t)))))
9343 (inputs
9344 `(("java-commons-cli" ,java-commons-cli)
9345 ("java-asm" ,java-asm)
9346 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9347 (home-page "https://fusesource.github.io/hawtjni/")
9348 (synopsis "JNI code generator")
9349 (description "HawtJNI is a code generator that produces the JNI code needed
9350to implement Java native methods. It is based on the jnigen code generator
9351that is part of the SWT Tools project.")
9352 (license license:asl2.0)))
9353
9354(define-public java-jansi-native
9355 (package
9356 (name "java-jansi-native")
9357 (version "1.7")
9358 (source (origin
9359 (method url-fetch)
9360 (uri (string-append "https://github.com/fusesource/jansi-native/"
9361 "archive/jansi-native-" version ".tar.gz"))
9362 (sha256
9363 (base32
9364 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9365 (build-system ant-build-system)
9366 (arguments
9367 `(#:jar-name "jansi-native.jar"
9368 #:source-dir "src/main/java"
9369 #:tests? #f; no tests
9370 #:phases
9371 (modify-phases %standard-phases
9372 (add-before 'build 'build-native
9373 (lambda* (#:key inputs #:allow-other-keys)
9374 ;; there are more required files for windows in windows/
9375 (with-directory-excursion "src/main/native-package/src"
9376 (substitute* "jansi_ttyname.c"
9377 (("#include \"jansi_.*") ""))
9378 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9379 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9380 "/include")
9381 (string-append "-I" (assoc-ref inputs "jdk")
9382 "/include/linux")
9383 "-fPIC" "-O2")
9384 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9385 (add-before 'build 'install-native
9386 (lambda _
9387 (let ((dir (string-append "build/classes/META-INF/native/"
9388 ,(match (%current-system)
9389 ((or "i686-linux" "armhf-linux")
9390 "linux32")
9391 ((or "x86_64-linux" "aarch64-linux"
9392 "mips64el-linux")
9393 "linux64")))))
9394 (install-file "src/main/native-package/src/libjansi.so" dir))
9395 #t))
9396 (add-after 'install 'install-native
9397 (lambda* (#:key outputs #:allow-other-keys)
9398 (install-file "src/main/native-package/src/jansi.h"
9399 (string-append (assoc-ref outputs "out") "/include"))
9400 #t)))))
9401 (inputs
9402 `(("java-hawtjni" ,java-hawtjni)))
9403 (home-page "https://fusesource.github.io/jansi/")
9404 (synopsis "Native library for jansi")
9405 (description "This package provides the native library for jansi, a small
9406Java library that allows you to use ANSI escape sequences to format your
9407console output.")
9408 (license license:asl2.0)))
9409
9410(define-public java-jansi
9411 (package
9412 (name "java-jansi")
9413 (version "1.16")
9414 (source (origin
9415 (method url-fetch)
9416 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9417 "jansi-project-" version ".tar.gz"))
9418 (sha256
9419 (base32
9420 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9421 (build-system ant-build-system)
9422 (arguments
9423 `(#:jar-name "jansi.jar"
9424 #:source-dir "jansi/src/main/java"
9425 #:test-dir "jansi/src/test"
9426 #:phases
9427 (modify-phases %standard-phases
9428 (add-after 'check 'clear-term
9429 (lambda _
9430 (invoke "echo" "-e" "\\e[0m"))))))
9431 (inputs
9432 `(("java-jansi-native" ,java-jansi-native)))
9433 (native-inputs
9434 `(("java-junit" ,java-junit)
9435 ("java-hamcrest-core" ,java-hamcrest-core)))
9436 (home-page "https://fusesource.github.io/jansi/")
9437 (synopsis "Portable ANSI escape sequences")
9438 (description "Jansi is a Java library that allows you to use ANSI escape
9439sequences to format your console output which works on every platform.")
9440 (license license:asl2.0)))
9441
9442(define-public java-jboss-el-api-spec
9443 (package
9444 (name "java-jboss-el-api-spec")
9445 (version "3.0")
9446 (source (origin
9447 (method url-fetch)
9448 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9449 "archive/jboss-el-api_" version
9450 "_spec-1.0.7.Final.tar.gz"))
9451 (sha256
9452 (base32
9453 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9454 (build-system ant-build-system)
9455 (arguments
9456 `(#:jar-name "java-jboss-el-api_spec.jar"
9457 #:jdk ,icedtea-8))
9458 (inputs
9459 `(("java-junit" ,java-junit)))
9460 (home-page "https://github.com/jboss/jboss-el-api_spec")
9461 (synopsis "JSR-341 expression language 3.0 API")
9462 (description "This package contains an implementation of the JSR-341
9463specification for the expression language 3.0. It implements an expression
9464language inspired by ECMAScript and XPath. This language is used with
9465JavaServer Pages (JSP).")
9466 ;; Either GPL2 only or CDDL.
9467 (license (list license:gpl2 license:cddl1.1))))
9468
9469(define-public java-jboss-interceptors-api-spec
9470 (package
9471 (name "java-jboss-interceptors-api-spec")
9472 (version "1.2")
9473 (source (origin
9474 (method url-fetch)
9475 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9476 "archive/jboss-interceptors-api_" version
9477 "_spec-1.0.0.Final.tar.gz"))
9478 (sha256
9479 (base32
9480 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9481 (build-system ant-build-system)
9482 (arguments
9483 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9484 #:jdk ,icedtea-8
9485 #:source-dir "."
9486 #:tests? #f)); no tests
9487 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9488 (synopsis "Interceptors 1.2 API classes from JSR 318")
9489 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9490API. Interceptors are used to interpose on business method invocations and
9491specific events.")
9492 ;; Either GPL2 only or CDDL.
9493 (license (list license:gpl2 license:cddl1.1))))
9494
9495(define-public java-cdi-api
9496 (package
9497 (name "java-cdi-api")
9498 (version "2.0")
9499 (source (origin
9500 (method url-fetch)
9501 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9502 version ".tar.gz"))
9503 (file-name (string-append name "-" version ".tar.gz"))
9504 (sha256
9505 (base32
9506 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9507 (build-system ant-build-system)
9508 (arguments
9509 `(#:source-dir "api/src/main/java"
9510 #:jar-name "java-cdi-api.jar"
9511 #:test-dir "api/src/test"
9512 #:jdk ,icedtea-8
9513 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9514 (inputs
9515 `(("java-javax-inject" ,java-javax-inject)
9516 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9517 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9518 (native-inputs
9519 `(("java-testng" ,java-testng)
9520 ("java-hamcrest-core" ,java-hamcrest-core)))
9521 (home-page "http://cdi-spec.org/")
9522 (synopsis "Contexts and Dependency Injection APIs")
9523 (description "Java-cdi-api contains the required APIs for Contexts and
9524Dependency Injection (CDI).")
9525 (license license:asl2.0)))
9526
9527(define-public java-joda-convert
9528 (package
9529 (name "java-joda-convert")
9530 (version "1.9.2")
9531 (source (origin
9532 (method url-fetch)
9533 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9534 version ".tar.gz"))
9535 (file-name (string-append name "-" version ".tar.gz"))
9536 (sha256
9537 (base32
9538 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9539 (build-system ant-build-system)
9540 (arguments
9541 `(#:jar-name (string-append ,name "-" ,version ".jar")
9542 #:source-dir "src/main/java"
9543 #:test-include (list "**/Test*.java")
9544 ;; Contains only interfaces and base classes (no test)
9545 #:test-exclude (list "**/test*/**.java")))
9546 (inputs
9547 `(("java-guava" ,java-guava)))
9548 (native-inputs
9549 `(("java-junit" ,java-junit)
9550 ("java-hamcrest-core" ,java-hamcrest-core)))
9551 (home-page "http://www.joda.org/joda-convert/")
9552 (synopsis "Conversion between Objects and Strings")
9553 (description "Joda-Convert provides a small set of classes to aid
9554conversion between Objects and Strings. It is not intended to tackle the
9555wider problem of Object to Object transformation.")
9556 (license license:asl2.0)))
9557
9558(define-public java-joda-time
9559 (package
9560 (name "java-joda-time")
9561 (version "2.9.9")
9562 (source (origin
9563 (method url-fetch)
9564 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9565 version ".tar.gz"))
9566 (file-name (string-append name "-" version ".tar.gz"))
9567 (sha256
9568 (base32
9569 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9570 (build-system ant-build-system)
9571 (arguments
9572 `(#:jar-name "java-joda-time.jar"
9573 #:source-dir "src/main/java"
9574 #:test-include (list "**/Test*.java")
9575 ;; There is no runnable test in these files
9576 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9577 #:phases
9578 (modify-phases %standard-phases
9579 (add-after 'build 'build-resources
9580 (lambda _
9581 (mkdir-p "build/classes/org/joda/time/tz/data")
9582 (mkdir-p "build/classes/org/joda/time/format")
9583 ;; This will produce the following exception:
9584 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9585 ;; which is normal, because it doesn't exist yet. It still generates
9586 ;; the same file as in the binary one can find on maven.
9587 (invoke "java" "-cp"
9588 (string-append "build/classes:" (getenv "CLASSPATH"))
9589 "org.joda.time.tz.ZoneInfoCompiler"
9590 "-src" "src/main/java/org/joda/time/tz/src"
9591 "-dst" "build/classes/org/joda/time/tz/data"
9592 "africa" "antarctica" "asia" "australasia"
9593 "europe" "northamerica" "southamerica"
9594 "pacificnew" "etcetera" "backward" "systemv")
9595 (for-each (lambda (f)
9596 (copy-file f (string-append
9597 "build/classes/org/joda/time/format/"
9598 (basename f))))
9599 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9600 #t))
9601 (add-before 'install 'regenerate-jar
9602 (lambda _
9603 ;; We need to regenerate the jar file to add generated data.
9604 (delete-file "build/jar/java-joda-time.jar")
9605 (invoke "ant" "jar")))
9606 (add-before 'check 'copy-test-resources
9607 (lambda _
9608 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9609 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9610 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9611 (copy-recursively "src/test/resources" "build/test-classes")
9612 #t)))))
9613 (inputs
9614 `(("java-joda-convert" ,java-joda-convert)))
9615 (native-inputs
9616 `(("java-junit" ,java-junit)
9617 ("java-hamcrest-core" ,java-hamcrest-core)
9618 ("tzdata" ,tzdata)))
9619 (home-page "http://www.joda.org/joda-time/")
9620 (synopsis "Replacement for the Java date and time classes")
9621 (description "Joda-Time is a replacement for the Java date and time
9622classes prior to Java SE 8.")
9623 (license license:asl2.0)))
9624
9625(define-public java-xerces
9626 (package
9627 (name "java-xerces")
9628 (version "2.11.0")
9629 (source
9630 (origin
9631 (method url-fetch)
9632 (uri (string-append "mirror://apache/xerces/j/source/"
9633 "Xerces-J-src." version ".tar.gz"))
9634 (sha256
9635 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9636 (patches (search-patches
9637 "java-xerces-xjavac_taskdef.patch"
9638 "java-xerces-build_dont_unzip.patch"
9639 "java-xerces-bootclasspath.patch"))))
9640 (build-system ant-build-system)
9641 (arguments
9642 `(#:tests? #f;; Test files are not present
9643 #:test-target "test"
9644 #:jdk ,icedtea-8
9645 #:phases
9646 (modify-phases %standard-phases
9647 (add-after 'unpack 'create-build.properties
9648 (lambda* (#:key inputs #:allow-other-keys)
9649 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9650 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9651 (with-output-to-file "build.properties"
9652 (lambda _
9653 (format #t
9654 "jar.jaxp = ~a/share/java/jaxp.jar~@
9655 jar.apis-ext = ~a/share/java/jaxp.jar~@
9656 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9657 jaxp jaxp resolver)))
9658 ;; Make xerces use our version of jaxp in tests
9659 (substitute* "build.xml"
9660 (("xml-apis.jar")
9661 (string-append jaxp "/share/java/jaxp.jar"))
9662 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9663 "${jar.apis}")))
9664 #t))
9665 (replace 'install (install-jars "build")))))
9666 (inputs
9667 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9668 ("java-jaxp" ,java-jaxp)))
9669 (home-page "https://xerces.apache.org/xerces2-j/")
9670 (synopsis "Validating XML parser for Java with DOM level 3 support")
9671 (description "The Xerces2 Java parser is the reference implementation of
9672XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9673processor.
9674
9675Xerces2-J supports the following standards and APIs:
9676
9677@itemize
9678@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9679@item Namespaces in XML Recommendation
9680@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9681 Range Recommendations
9682@item Simple API for XML (SAX) 2.0.1 Core and Extension
9683@item Java APIs for XML Processing (JAXP) 1.2.01
9684@item XML Schema 1.0 Structures and Datatypes Recommendations
9685@item Experimental implementation of the Document Object Model (DOM) Level 3
9686 Core and Load/Save Working Drafts
9687@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9688 Candidate Recommendation
9689@end itemize
9690
9691Xerces is now able to parse documents written according to the XML 1.1
9692Candidate Recommendation, except that it does not yet provide an option to
9693enable normalization checking as described in section 2.13 of this
9694specification. It also handles namespaces according to the XML Namespaces 1.1
9695Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9696the DOM level 3 load/save API's are in use.")
9697 (license license:asl2.0)))
9698
9699(define-public java-jakarta-regexp
9700 (package
9701 (name "java-jakarta-regexp")
9702 (version "1.5")
9703 (source
9704 (origin
9705 (method url-fetch)
9706 (uri (string-append
9707 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
9708 version ".tar.gz"))
9709 (sha256
9710 (base32
9711 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
9712 (build-system ant-build-system)
9713 (arguments
9714 `(#:test-target "test"
9715 #:phases
9716 (modify-phases %standard-phases
9717 (replace 'install
9718 (lambda* (#:key outputs #:allow-other-keys)
9719 (let* ((out (assoc-ref outputs "out"))
9720 (out-share (string-append out "/share/java")))
9721 (mkdir-p out-share)
9722 (for-each (lambda (name)
9723 (install-file name out-share))
9724 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
9725 #t))))))
9726 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
9727 (synopsis "Regular expression parser generator for Java.")
9728 (description "@code{jakarta-regexp} is an old regular expression parser
9729generator for Java.")
9730 (license license:asl2.0)))
9731
9732(define-public java-jline
9733 (package
9734 (name "java-jline")
9735 (version "1.0")
9736 (source (origin
9737 (method url-fetch)
9738 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9739 version ".tar.gz"))
9740 (sha256
9741 (base32
9742 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9743 (build-system ant-build-system)
9744 (arguments
9745 `(#:jar-name "jline.jar"
9746 #:source-dir "src/main/java"
9747 #:test-dir "src/test"
9748 #:phases
9749 (modify-phases %standard-phases
9750 (add-before 'build 'copy-resources
9751 (lambda _
9752 (copy-recursively "src/main/resources" "build/classes")
9753 #t)))))
9754 (native-inputs
9755 `(("java-junit" ,java-junit)))
9756 (home-page "https://jline.github.io")
9757 (synopsis "Console input handling library")
9758 (description "JLine is a Java library for handling console input. It is
9759similar in functionality to BSD editline and GNU readline but with additional
9760features that bring it on par with the Z shell line editor.")
9761 (license license:bsd-3)))
9762
9763(define-public java-jline-2
9764 (package
9765 (inherit java-jline)
9766 (version "2.14.5")
9767 (source (origin
9768 (method url-fetch)
9769 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
9770 version ".tar.gz"))
9771 (sha256
9772 (base32
9773 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
9774 (arguments
9775 `(#:jdk ,icedtea-8
9776 ,@(package-arguments java-jline)))
9777 (inputs
9778 `(("java-jansi" ,java-jansi)
9779 ("java-jansi-native" ,java-jansi-native)))
9780 (native-inputs
9781 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
9782 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
9783 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
9784 ("java-powermock-api-support" ,java-powermock-api-support)
9785 ("java-powermock-core" ,java-powermock-core)
9786 ("java-powermock-reflect" ,java-powermock-reflect)
9787 ("java-easymock" ,java-easymock)
9788 ("java-jboss-javassist" ,java-jboss-javassist)
9789 ("java-objenesis" ,java-objenesis)
9790 ("java-asm" ,java-asm)
9791 ("java-hamcrest-core" ,java-hamcrest-core)
9792 ("java-cglib" ,java-cglib)
9793 ("java-junit" ,java-junit)
9794 ("java-hawtjni" ,java-hawtjni)))))
9795
9796(define-public java-xmlunit
9797 (package
9798 (name "java-xmlunit")
9799 (version "2.5.1")
9800 (source (origin
9801 (method url-fetch)
9802 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9803 version ".tar.gz"))
9804 (file-name (string-append name "-" version ".tar.gz"))
9805 (sha256
9806 (base32
9807 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9808 (build-system ant-build-system)
9809 (arguments
9810 `(#:jar-name "java-xmlunit.jar"
9811 #:source-dir "xmlunit-core/src/main/java"
9812 #:test-dir "xmlunit-core/src/test"
9813 #:phases
9814 (modify-phases %standard-phases
9815 (add-before 'check 'copy-test-resources
9816 (lambda* (#:key inputs #:allow-other-keys)
9817 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9818 #t)))))
9819 (native-inputs
9820 `(("java-junit" ,java-junit)
9821 ("java-mockito-1" ,java-mockito-1)
9822 ("java-hamcrest-all" ,java-hamcrest-all)
9823 ("java-objenesis" ,java-objenesis)
9824 ("java-asm" ,java-asm)
9825 ("java-cglib" ,java-cglib)
9826 ("resources"
9827 ,(origin
9828 (method git-fetch)
9829 (uri (git-reference
9830 (url "https://github.com/xmlunit/test-resources.git")
9831 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9832 (file-name "java-xmlunit-test-resources")
9833 (sha256
9834 (base32
9835 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9836 (home-page "http://www.xmlunit.org/")
9837 (synopsis "XML output testing")
9838 (description "XMLUnit provides you with the tools to verify the XML you
9839emit is the one you want to create. It provides helpers to validate against
9840an XML Schema, assert the values of XPath queries or compare XML documents
9841against expected outcomes.")
9842 (license license:asl2.0)))
9843
9844(define-public java-xmlunit-legacy
9845 (package
9846 (inherit java-xmlunit)
9847 (name "java-xmlunit-legacy")
9848 (arguments
9849 `(#:jar-name "java-xmlunit-legacy.jar"
9850 #:source-dir "xmlunit-legacy/src/main/java"
9851 #:test-dir "xmlunit-legacy/src/test"))
9852 (inputs
9853 `(("java-xmlunit" ,java-xmlunit)
9854 ("java-junit" ,java-junit)))
9855 (native-inputs
9856 `(("java-mockito-1" ,java-mockito-1)))))
9857
9858(define-public java-xmlunit-matchers
9859 (package
9860 (inherit java-xmlunit)
9861 (name "java-xmlunit-matchers")
9862 (arguments
9863 `(#:jar-name "java-xmlunit-matchers.jar"
9864 #:source-dir "xmlunit-matchers/src/main/java"
9865 #:test-dir "xmlunit-matchers/src/test"
9866 #:test-exclude
9867 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
9868 (list "**/ValidationMatcherTest.java")
9869 #:phases
9870 (modify-phases %standard-phases
9871 (add-before 'build 'copy-test-class
9872 (lambda _
9873 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
9874 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
9875 #t))
9876 (add-before 'build 'fix-test-resources-path
9877 (lambda _
9878 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
9879 (("../test-resources") "test-resources"))
9880 #t))
9881 (add-before 'check 'copy-test-resources
9882 (lambda* (#:key inputs #:allow-other-keys)
9883 (copy-recursively (assoc-ref inputs "resources") "test-resources")
9884 #t)))))
9885 (inputs
9886 `(("java-xmlunit" ,java-xmlunit)
9887 ("java-junit" ,java-junit)))))
9888
9889(define-public java-openchart2
9890 (package
9891 (name "java-openchart2")
9892 (version "1.4.3")
9893 (source (origin
9894 (method url-fetch)
9895 (uri (string-append "http://download.approximatrix.com/openchart2/"
9896 "openchart2-" version ".source.zip"))
9897 (sha256
9898 (base32
9899 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9900 (build-system ant-build-system)
9901 (arguments
9902 `(#:test-target "test"
9903 #:phases
9904 (modify-phases %standard-phases
9905 (add-after 'unpack 'fix-junit-errors
9906 (lambda _
9907 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9908 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9909 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9910 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9911 "model/DefaultChartDataModelConstraintsTest.java"
9912 "model/MultiScatterDataModelConstraintsTest.java"
9913 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9914 (("(assertEquals[^;]+);" before _)
9915 (string-append (string-drop-right before 2) ", 1E-6);"))))
9916 #t))
9917 (replace 'install (install-jars ".")))))
9918 (native-inputs
9919 `(("unzip" ,unzip)
9920 ("java-junit" ,java-junit)
9921 ("java-hamcrest-core" ,java-hamcrest-core)))
9922 (home-page "http://approximatrix.com/products/openchart2/")
9923 (synopsis "Simple plotting for Java")
9924 (description "Openchart2 provides a simple, yet powerful, interface for
9925Java programmers to create two-dimensional charts and plots. The library
9926features an assortment of graph styles, including advanced scatter plots, bar
9927graphs, and pie charts.")
9928 (license license:lgpl2.1+)))
9929
9930(define-public java-commons-httpclient
9931 (package
9932 (name "java-commons-httpclient")
9933 (version "3.1")
9934 (source (origin
9935 (method url-fetch)
9936 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
9937 "commons-httpclient/source/commons-httpclient-"
9938 version "-src.tar.gz"))
9939 (sha256
9940 (base32
9941 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
9942 (build-system ant-build-system)
9943 (arguments
9944 `(#:build-target "compile"
9945 #:test-target "test"
9946 #:tests? #f; requires junit-textui (junit 3)
9947 #:phases
9948 (modify-phases %standard-phases
9949 (add-before 'build 'fix-accent
9950 (lambda _
9951 (for-each (lambda (file)
9952 (with-fluids ((%default-port-encoding "ISO-8859-1"))
9953 (substitute* file
9954 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
9955 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
9956 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
9957 "src/test/org/apache/commons/httpclient/TestHttps.java"
9958 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
9959 #t))
9960 (replace 'install
9961 (lambda* (#:key outputs #:allow-other-keys)
9962 (invoke "ant" "dist"
9963 (string-append "-Ddist.home=" (assoc-ref outputs "out")
9964 "/share/java"))
9965 #t)))))
9966 (propagated-inputs
9967 `(("java-commons-logging" ,java-commons-logging-minimal)
9968 ("java-commons-codec" ,java-commons-codec)))
9969 (home-page "https://hc.apache.org")
9970 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
9971 (description "This package contains an HTTP/1.1 compliant HTTP agent
9972implementation. It also provides reusable components for client-side
9973authentication, HTTP state management, and HTTP connection management.")
9974 (license license:asl2.0)))
9975
9976(define-public java-commons-vfs
9977 (package
9978 (name "java-commons-vfs")
9979 (version "2.2")
9980 (source (origin
9981 (method url-fetch)
9982 (uri (string-append "mirror://apache/commons/vfs/source/"
9983 "commons-vfs2-distribution-" version "-src.tar.gz"))
9984 (file-name (string-append name "-" version ".tar.gz"))
9985 (sha256
9986 (base32
9987 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
9988 (modules '((guix build utils)))
9989 (snippet
9990 '(begin
9991 (for-each delete-file
9992 (find-files "." "\\.jar$"))
9993 #t))))
9994 (build-system ant-build-system)
9995 (arguments
9996 `(#:jar-name "commons-vfs.jar"
9997 #:source-dir "commons-vfs2/src/main/java"
9998 #:test-dir "commons-vfs2/src/test"
9999 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10000 #:tests? #f
10001 #:phases
10002 (modify-phases %standard-phases
10003 (add-before 'build 'remove-hadoop-and-webdav
10004 ; Remove these files as they are not required and depend on difficult
10005 ; packages.
10006 (lambda _
10007 (for-each delete-file-recursively
10008 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10009 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10010 #t)))))
10011 (inputs
10012 `(("java-commons-collections4" ,java-commons-collections4)
10013 ("java-commons-compress" ,java-commons-compress)
10014 ("java-commons-httpclient" ,java-commons-httpclient)
10015 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10016 ("java-commons-net" ,java-commons-net)
10017 ("java-jsch" ,java-jsch)))
10018 (home-page "http://commons.apache.org/proper/commons-vfs/")
10019 (synopsis "Java filesystem library")
10020 (description "Commons VFS provides a single API for accessing various
10021different file systems. It presents a uniform view of the files from various
10022different sources, such as the files on local disk, on an HTTP server, or
10023inside a Zip archive.")
10024 (license license:asl2.0)))
10025
10026(define-public java-jakarta-oro
10027 (package
10028 (name "java-jakarta-oro")
10029 (version "2.0.8")
10030 (source (origin
10031 (method url-fetch)
10032 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10033 "jakarta-oro-" version ".tar.gz"))
10034 (sha256
10035 (base32
10036 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10037 (modules '((guix build utils)))
10038 (snippet
10039 `(begin
10040 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10041 #t))))
10042 (build-system ant-build-system)
10043 (arguments
10044 `(#:build-target "package"
10045 #:tests? #f; tests are run as part of the build process
10046 #:phases
10047 (modify-phases %standard-phases
10048 (replace 'install
10049 (install-jars ,(string-append "jakarta-oro-" version))))))
10050 (home-page "https://jakarta.apache.org/oro/")
10051 (synopsis "Text-processing for Java")
10052 (description "The Jakarta-ORO Java classes are a set of text-processing
10053Java classes that provide Perl5 compatible regular expressions, AWK-like
10054regular expressions, glob expressions, and utility classes for performing
10055substitutions, splits, filtering filenames, etc. This library is the successor
10056of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10057from ORO, Inc.")
10058 (license license:asl1.1)))
10059
10060(define-public java-native-access
10061 (package
10062 (name "java-native-access")
10063 (version "4.5.1")
10064 (source (origin
10065 (method url-fetch)
10066 (uri (string-append "https://github.com/java-native-access/jna/"
10067 "archive/" version ".tar.gz"))
10068 (file-name (string-append name "-" version ".tar.gz"))
10069 (sha256
10070 (base32
10071 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10072 (modules '((guix build utils)))
10073 (snippet
10074 `(begin
10075 (for-each delete-file (find-files "." ".*.jar"))
10076 (delete-file-recursively "native/libffi")
10077 (delete-file-recursively "dist")
10078 #t))))
10079 (build-system ant-build-system)
10080 (arguments
10081 `(#:tests? #f; FIXME: tests require reflections.jar
10082 #:test-target "test"
10083 #:make-flags (list "-Ddynlink.native=true")
10084 #:phases
10085 (modify-phases %standard-phases
10086 (add-before 'build 'fix-build.xml
10087 (lambda* (#:key inputs #:allow-other-keys)
10088 (substitute* "build.xml"
10089 ;; Since we removed the bundled ant.jar, give the correct path
10090 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10091 ;; We removed generated native libraries. We can only rebuild one
10092 ;; so don't fail if we can't find a native library for another architecture.
10093 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10094 ;; Copy test dependencies
10095 (copy-file (string-append (assoc-ref inputs "java-junit")
10096 "/share/java/junit.jar")
10097 "lib/junit.jar")
10098 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10099 "/share/java/hamcrest-core.jar")
10100 "lib/hamcrest-core.jar")
10101 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10102 #t))
10103 (add-before 'build 'build-native
10104 (lambda _
10105 (invoke "ant" "-Ddynlink.native=true" "native")
10106 #t))
10107 (replace 'install
10108 (install-jars "build")))))
10109 (inputs
10110 `(("libffi" ,libffi)
10111 ("libx11" ,libx11)
10112 ("libxt" ,libxt)))
10113 (native-inputs
10114 `(("java-junit" ,java-junit)
10115 ("java-hamcrest-core" ,java-hamcrest-core)))
10116 (home-page "https://github.com/java-native-access/jna")
10117 (synopsis "Access to native shared libraries from Java")
10118 (description "JNA provides Java programs easy access to native shared
10119libraries without writing anything but Java code - no JNI or native code is
10120required. JNA allows you to call directly into native functions using natural
10121Java method invocation.")
10122 ;; Java Native Access project (JNA) is dual-licensed under 2
10123 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10124 (license (list
10125 license:asl2.0
10126 license:lgpl2.1+))))
10127
10128(define-public java-native-access-platform
10129 (package
10130 (inherit java-native-access)
10131 (name "java-native-access-platform")
10132 (arguments
10133 `(#:test-target "test"
10134 #:tests? #f; require jna-test.jar
10135 #:phases
10136 (modify-phases %standard-phases
10137 (add-before 'build 'chdir
10138 (lambda _
10139 (chdir "contrib/platform")
10140 #t))
10141 (add-after 'chdir 'fix-ant
10142 (lambda* (#:key inputs #:allow-other-keys)
10143 (substitute* "nbproject/project.properties"
10144 (("../../build/jna.jar")
10145 (string-append (assoc-ref inputs "java-native-access")
10146 "/share/java/jna.jar"))
10147 (("../../lib/hamcrest-core-.*.jar")
10148 (string-append (assoc-ref inputs "java-hamcrest-core")
10149 "/share/java/hamcrest-core.jar"))
10150 (("../../lib/junit.jar")
10151 (string-append (assoc-ref inputs "java-junit")
10152 "/share/java/junit.jar")))
10153 #t))
10154 (replace 'install
10155 (install-jars "dist")))))
10156 (inputs
10157 `(("java-native-access" ,java-native-access)))
10158 (synopsis "Cross-platform mappings for jna")
10159 (description "java-native-access-platfrom has cross-platform mappings
10160and mappings for a number of commonly used platform functions, including a
10161large number of Win32 mappings as well as a set of utility classes that
10162simplify native access.")))
10163
10164(define-public java-jsch-agentproxy-core
10165 (package
10166 (name "java-jsch-agentproxy-core")
10167 (version "0.0.8")
10168 (source (origin
10169 (method url-fetch)
10170 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10171 version ".tar.gz"))
10172 (file-name (string-append name "-" version ".tar.gz"))
10173 (sha256
10174 (base32
10175 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10176 (build-system ant-build-system)
10177 (arguments
10178 `(#:jar-name "jsch-agentproxy-core.jar"
10179 #:source-dir "jsch-agent-proxy-core/src/main/java"
10180 #:tests? #f)); no tests
10181 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10182 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10183 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10184and Pageant included Putty. It will be easily integrated into JSch, and users
10185will be allowed to use these programs for authentication.")
10186 (license license:bsd-3)))
10187
10188(define-public java-jsch-agentproxy-sshagent
10189 (package
10190 (inherit java-jsch-agentproxy-core)
10191 (name "java-jsch-agentproxy-sshagent")
10192 (arguments
10193 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10194 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10195 #:tests? #f)); no tests
10196 (inputs
10197 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10198 (synopsis "Proxy to ssh-agent")
10199 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10200and Pageant included in Putty. This component contains the code for a proxy to
10201ssh-agent.")))
10202
10203(define-public java-jsch-agentproxy-usocket-jna
10204 (package
10205 (inherit java-jsch-agentproxy-core)
10206 (name "java-jsch-agentproxy-usocket-jna")
10207 (arguments
10208 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10209 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10210 #:tests? #f)); no tests
10211 (inputs
10212 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10213 ("java-native-access" ,java-native-access)))
10214 (synopsis "USocketFactory implementation using JNA")
10215 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10216and Pageant included in Putty. This component contains an implementation of
10217USocketFactory using @dfn{JNA} (Java Native Access).")))
10218
10219(define-public java-jsch-agentproxy-pageant
10220 (package
10221 (inherit java-jsch-agentproxy-core)
10222 (name "java-jsch-agentproxy-pageant")
10223 (arguments
10224 `(#:jar-name "jsch-agentproxy-pageant.jar"
10225 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10226 #:tests? #f)); no tests
10227 (inputs
10228 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10229 ("java-native-access" ,java-native-access)
10230 ("java-native-access-platform" ,java-native-access-platform)))
10231 (synopsis "Proxy to pageant")
10232 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10233and Pageant included in Putty. This component contains the code for a proxy to
10234pageant.")))
10235
10236(define-public java-jsch-agentproxy-usocket-nc
10237 (package
10238 (inherit java-jsch-agentproxy-core)
10239 (name "java-jsch-agentproxy-usocket-nc")
10240 (arguments
10241 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10242 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10243 #:tests? #f)); no tests
10244 (inputs
10245 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10246 (synopsis "USocketFactory implementation using netcat")
10247 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10248and Pageant included in Putty. This component contains an implementation of
10249USocketFactory using netcat.")))
10250
10251(define-public java-jsch-agentproxy-connector-factory
10252 (package
10253 (inherit java-jsch-agentproxy-core)
10254 (name "java-jsch-agentproxy-connector-factory")
10255 (arguments
10256 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10257 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10258 #:tests? #f)); no tests
10259 (inputs
10260 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10261 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10262 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10263 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10264 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10265 (synopsis "Connector factory for jsch agent proxy")
10266 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10267and Pageant included in Putty. This component contains a connector factory.")))
10268
10269(define-public java-jsch-agentproxy-jsch
10270 (package
10271 (inherit java-jsch-agentproxy-core)
10272 (name "java-jsch-agentproxy-jsch")
10273 (arguments
10274 `(#:jar-name "jsch-agentproxy-jsch.jar"
10275 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10276 #:tests? #f)); no tests
10277 (inputs
10278 `(("java-jsch" ,java-jsch)
10279 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10280 (synopsis "JSch integration library for agentproxy")
10281 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10282and Pageant included in Putty. This component contains a library to use
10283jsch-agent-proxy with JSch.")))
10284
10285(define-public java-apache-ivy
10286 (package
10287 (name "java-apache-ivy")
10288 (version "2.4.0")
10289 (source (origin
10290 (method url-fetch)
10291 (uri (string-append "mirror://apache//ant/ivy/" version
10292 "/apache-ivy-" version "-src.tar.gz"))
10293 (sha256
10294 (base32
10295 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10296 (patches
10297 (search-patches
10298 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10299 (build-system ant-build-system)
10300 (arguments
10301 `(#:jar-name "ivy.jar"
10302 #:tests? #f
10303 #:phases
10304 (modify-phases %standard-phases
10305 (add-before 'build 'remove-example
10306 (lambda _
10307 (delete-file-recursively "src/example")
10308 #t))
10309 (add-before 'build 'copy-resources
10310 (lambda _
10311 (with-directory-excursion "src/java"
10312 (for-each (lambda (file)
10313 (install-file file (string-append "../../build/classes/" (dirname file))))
10314 (append
10315 (find-files "." ".*.css")
10316 (find-files "." ".*.ent")
10317 (find-files "." ".*.html")
10318 (find-files "." ".*.properties")
10319 (find-files "." ".*.xsd")
10320 (find-files "." ".*.xsl")
10321 (find-files "." ".*.xml"))))
10322 #t))
10323 (add-before 'build 'fix-vfs
10324 (lambda _
10325 (substitute*
10326 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10327 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10328 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10329 #t))
10330 (add-before 'install 'copy-manifest
10331 (lambda _
10332 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10333 #t))
10334 (add-before 'install 'repack
10335 (lambda _
10336 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10337 "-C" "build/classes" ".")))
10338 (add-after 'install 'install-bin
10339 (lambda* (#:key outputs #:allow-other-keys)
10340 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10341 (ivy (string-append bin "/ivy"))
10342 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10343 (mkdir-p bin)
10344 (with-output-to-file ivy
10345 (lambda _
10346 (display (string-append
10347 "#!" (which "sh") "\n"
10348 "if [[ -z $CLASSPATH ]]; then\n"
10349 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10350 "else\n"
10351 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10352 "fi\n"
10353 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10354 (chmod ivy #o755)
10355 #t))))))
10356 (inputs
10357 `(("java-bouncycastle" ,java-bouncycastle)
10358 ("java-commons-cli" ,java-commons-cli)
10359 ("java-commons-collections" ,java-commons-collections)
10360 ("java-commons-httpclient" ,java-commons-httpclient)
10361 ("java-commons-lang" ,java-commons-lang)
10362 ("java-commons-vfs" ,java-commons-vfs)
10363 ("java-jakarta-oro" ,java-jakarta-oro)
10364 ("java-jsch" ,java-jsch)
10365 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10366 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10367 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10368 ("java-junit" ,java-junit)))
10369 (home-page "https://ant.apache.org/ivy")
10370 (synopsis "Dependency manager for the Java programming language")
10371 (description "Ivy is a tool for managing (recording, tracking, resolving
10372and reporting) project dependencies. It is characterized by the following:
10373
10374@itemize
10375@item flexibility and configurability - Ivy is essentially process agnostic
10376 and is not tied to any methodology or structure. Instead it provides the
10377 necessary flexibility and configurability to be adapted to a broad range
10378 of dependency management and build processes.
10379@item tight integration with Apache Ant - while available as a standalone tool,
10380 Ivy works particularly well with Apache Ant providing a number of
10381 powerful Ant tasks ranging from dependency resolution to dependency
10382 reporting and publication.
10383@end itemize")
10384 (license license:asl2.0)))
10385
10386(define-public java-eclipse-sisu-inject
10387 (package
10388 (name "java-eclipse-sisu-inject")
10389 (version "0.3.3")
10390 (source (origin
10391 (method url-fetch)
10392 (uri (string-append "https://github.com/eclipse/sisu.inject/"
10393 "archive/releases/" version ".tar.gz"))
10394 (sha256
10395 (base32
10396 "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn"))))
10397 (build-system ant-build-system)
10398 (arguments
10399 `(#:jar-name "eclipse-sisu-inject.jar"
10400 #:source-dir "org.eclipse.sisu.inject/src"
10401 #:jdk ,icedtea-8
10402 #:tests? #f)); no tests
10403 (inputs
10404 `(("java-guice" ,java-guice)
10405 ("java-guice-servlet" ,java-guice-servlet)
10406 ("java-javax-inject" ,java-javax-inject)
10407 ("java-javaee-servletapi" ,java-javaee-servletapi)
10408 ("java-junit" ,java-junit)
10409 ("java-slf4j-api" ,java-slf4j-api)
10410 ("java-jsr305" ,java-jsr305)
10411 ("java-jsr250" ,java-jsr250)
10412 ("java-cdi-api" ,java-cdi-api)
10413 ("java-osgi-framework" ,java-osgi-framework)
10414 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10415 ("java-testng" ,java-testng)))
10416 (home-page "https://www.eclipse.org/sisu/")
10417 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10418 (description "Sisu is a modular JSR330-based container that supports
10419classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10420Google-Guice to perform dependency injection and provide the core JSR330
10421support, but removes the need to write explicit bindings in Guice modules.
10422Integration with other containers via the Eclipse Extension Registry and the
10423OSGi Service Registry is a goal of this project.")
10424 (license license:epl1.0)))
10425
10426(define-public java-eclipse-sisu-plexus
10427 (package
10428 (name "java-eclipse-sisu-plexus")
10429 (version "0.3.3")
10430 (source (origin
10431 (method url-fetch)
10432 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10433 "archive/releases/" version ".tar.gz"))
10434 (sha256
10435 (base32
10436 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10437 (modules '((guix build utils)))
10438 (snippet
10439 '(begin
10440 (for-each delete-file (find-files "." ".*.jar"))
10441 (rename-file "org.eclipse.sisu.plexus.tests/src"
10442 "org.eclipse.sisu.plexus.tests/java")
10443 #t))))
10444 (build-system ant-build-system)
10445 (arguments
10446 `(#:jar-name "eclipse-sisu-plexus.jar"
10447 #:source-dir "org.eclipse.sisu.plexus/src"
10448 #:test-dir "org.eclipse.sisu.plexus.tests"
10449 #:test-exclude
10450 (list
10451 ;; This test fails probably because we can't generate the necessary
10452 ;; meta-inf files.
10453 "**/PlexusLoggingTest.*"
10454 ;; FIXME: This test fails because of some injection error
10455 "**/PlexusRequirementTest.*")
10456 #:jdk ,icedtea-8
10457 #:phases
10458 (modify-phases %standard-phases
10459 (add-before 'build 'copy-resources
10460 (lambda _
10461 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10462 "build/classes/META-INF/plexus")
10463 #t))
10464 (add-before 'check 'build-test-jar
10465 (lambda _
10466 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10467 (mkdir "build")
10468 (with-directory-excursion "java"
10469 (apply invoke "javac" "-cp"
10470 (string-append (getenv "CLASSPATH")
10471 ":../../../../../build/classes")
10472 (find-files "." ".*.java"))
10473 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10474 (find-files "." ".*.jar")))
10475 (mkdir-p "build/META-INF/plexus")
10476 (copy-file "resources/META-INF/plexus/components.xml"
10477 "build/META-INF/plexus/components.xml")
10478 (with-directory-excursion "build"
10479 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10480 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10481 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10482 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10483 (("resources/component-jar")
10484 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10485 #t)))))
10486 (inputs
10487 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10488 ("java-plexus-util" ,java-plexus-utils)
10489 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10490 ("java-osgi-framework" ,java-osgi-framework)
10491 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10492 ("java-guice" ,java-guice)
10493 ("java-javax-inject" ,java-javax-inject)
10494 ("java-slf4j-api" ,java-slf4j-api)
10495 ("java-junit" ,java-junit)))
10496 (native-inputs
10497 `(("java-guava" ,java-guava)
10498 ("java-aopalliance" ,java-aopalliance)
10499 ("java-cglib" ,java-cglib)
10500 ("java-asm" ,java-asm)))
10501 (home-page "https://www.eclipse.org/sisu/")
10502 (synopsis "Plexus support for the sisu container")
10503 (description "Sisu is a modular JSR330-based container that supports
10504classpath scanning, auto-binding, and dynamic auto-wiring. This package
10505adds Plexus support to the Sisu-Inject container.")
10506 (license license:epl1.0)))
10507
10508(define-public java-commons-compiler
10509 (package
10510 (name "java-commons-compiler")
10511 (version "3.0.8")
10512 (source (origin
10513 (method git-fetch)
10514 (uri (git-reference
10515 (url "https://github.com/janino-compiler/janino")
10516 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10517 (file-name (string-append name "-" version))
10518 (sha256
10519 (base32
10520 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10521 (modules '((guix build utils)))
10522 (snippet
10523 '(begin
10524 (for-each delete-file
10525 (find-files "." "\\.jar$"))
10526 #t))))
10527 (build-system ant-build-system)
10528 (arguments
10529 `(#:jar-name "commons-compiler.jar"
10530 #:source-dir "commons-compiler/src/main"
10531 #:tests? #f)); no tests
10532 (home-page "https://github.com/janino-compiler/janino")
10533 (synopsis "Java compiler")
10534 (description "Commons-compiler contains an API for janino, including the
10535@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10536and @code{ISimpleCompiler} interfaces.")
10537 (license license:bsd-3)))
10538
10539(define-public java-janino
10540 (package
10541 (inherit java-commons-compiler)
10542 (name "java-janino")
10543 (arguments
10544 `(#:jar-name "janino.jar"
10545 #:source-dir "src/main/java"
10546 #:phases
10547 (modify-phases %standard-phases
10548 (add-before 'configure 'chdir
10549 (lambda _
10550 (chdir "janino")
10551 #t)))))
10552 (inputs
10553 `(("java-commons-compiler" ,java-commons-compiler)))
10554 (native-inputs
10555 `(("java-junit" ,java-junit)
10556 ("java-hamcrest-core" ,java-hamcrest-core)))
10557 (description "Janino is a Java compiler. Janino can compile a set of
10558source files to a set of class files like @code{javac}, but also compile a
10559Java expression, block, class body or source file in memory, load the bytecode
10560and execute it directly in the same JVM. @code{janino} can also be used for
10561static code analysis or code manipulation.")))
10562
10563(define-public java-logback-core
10564 (package
10565 (name "java-logback-core")
10566 (version "1.2.3")
10567 (source (origin
10568 (method url-fetch)
10569 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10570 version ".tar.gz"))
10571 (file-name (string-append name "-" version ".tar.gz"))
10572 (sha256
10573 (base32
10574 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10575 (modules '((guix build utils)))
10576 (snippet
10577 '(begin
10578 (delete-file-recursively "logback-access/lib")
10579 #t))))
10580 (build-system ant-build-system)
10581 (arguments
10582 `(#:jar-name "logback.jar"
10583 #:source-dir "src/main/java"
10584 #:test-dir "src/test"
10585 #:test-exclude
10586 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10587 ;; which creates FastClasses
10588 (list "**/AllCoreTest.*"
10589 "**/AutoFlushingObjectWriterTest.*"
10590 "**/PackageTest.*"
10591 "**/ResilientOutputStreamTest.*"
10592 ;; And we still don't want to run abstract classes
10593 "**/Abstract*.*")
10594 #:phases
10595 (modify-phases %standard-phases
10596 (add-before 'configure 'chdir
10597 (lambda _
10598 (chdir "logback-core")
10599 #t)))))
10600 (inputs
10601 `(("java-javax-mail" ,java-javax-mail)
10602 ("servlet" ,java-javaee-servletapi)
10603 ("java-commons-compiler" ,java-commons-compiler)
10604 ("java-janino" ,java-janino)))
10605 (native-inputs
10606 `(("java-junit" ,java-junit)
10607 ("java-hamcrest-core" ,java-hamcrest-core)
10608 ("java-mockito-1" ,java-mockito-1)
10609 ("java-cglib" ,java-cglib)
10610 ("java-asm" ,java-asm)
10611 ("java-objenesis" ,java-objenesis)
10612 ("java-joda-time" ,java-joda-time)))
10613 (home-page "https://logback.qos.ch")
10614 (synopsis "Logging for java")
10615 (description "Logback is intended as a successor to the popular log4j project.
10616This module lays the groundwork for the other two modules.")
10617 ;; Either epl1.0 or lgpl2.1
10618 (license (list license:epl1.0
10619 license:lgpl2.1))))
10620
10621(define-public java-logback-classic
10622 (package
10623 (inherit java-logback-core)
10624 (name "java-logback-classic")
10625 (arguments
10626 `(#:jar-name "logback-classic.jar"
10627 #:source-dir "src/main/java"
10628 #:test-dir "src/test"
10629 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10630 #:jdk ,icedtea-8
10631 #:phases
10632 (modify-phases %standard-phases
10633 (add-before 'configure 'chdir
10634 (lambda _
10635 (chdir "logback-classic")
10636 #t))
10637 (replace 'build
10638 (lambda* (#:key inputs #:allow-other-keys)
10639 (mkdir-p "build/classes")
10640 (setenv "CLASSPATH"
10641 (string-join
10642 (apply append (map (lambda (input)
10643 (find-files (assoc-ref inputs input)
10644 ".*.jar"))
10645 '("java-logback-core" "java-slf4j-api"
10646 "java-commons-compiler" "servlet"
10647 "groovy")))
10648 ":"))
10649 (apply invoke "groovyc" "-d" "build/classes" "-j"
10650 (find-files "src/main/" ".*\\.(groovy|java)$"))
10651 (invoke "ant" "jar")
10652 #t)))))
10653 (inputs
10654 `(("java-logback-core" ,java-logback-core)
10655 ("java-slf4j-api" ,java-slf4j-api)
10656 ,@(package-inputs java-logback-core)))
10657 (native-inputs
10658 `(("groovy" ,groovy)))
10659 (description "Logback is intended as a successor to the popular log4j project.
10660This module can be assimilated to a significantly improved version of log4j.
10661Moreover, @code{logback-classic} natively implements the slf4j API so that you
10662can readily switch back and forth between logback and other logging frameworks
10663such as log4j or @code{java.util.logging} (JUL).")))
10664
10665(define-public java-qdox
10666 (package
10667 (name "java-qdox")
10668 ; Newer version exists, but this version is required by java-plexus-component-metadata
10669 (version "2.0-M2")
10670 (source (origin
10671 (method url-fetch)
10672 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10673 ;; Older releases at https://github.com/codehaus/qdox/
10674 ;; Note: The release at maven is pre-generated. The release at
10675 ;; github requires jflex.
10676 (uri (string-append "http://central.maven.org/maven2/"
10677 "com/thoughtworks/qdox/qdox/" version
10678 "/qdox-" version "-sources.jar"))
10679 (sha256
10680 (base32
10681 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10682 (build-system ant-build-system)
10683 (arguments
10684 `(#:jar-name "qdox.jar"
10685 #:tests? #f)); no tests
10686 (home-page "http://qdox.codehaus.org/")
10687 (synopsis "Parse definitions from Java source files")
10688 (description "QDox is a high speed, small footprint parser for extracting
10689class/interface/method definitions from source files complete with JavaDoc
10690@code{@@tags}. It is designed to be used by active code generators or
10691documentation tools.")
10692 (license license:asl2.0)))