gnu: java: Use java-javaee-servletapi instead of java-tomcat.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
13 ;;;
14 ;;; This file is part of GNU Guix.
15 ;;;
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
20 ;;;
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
25 ;;;
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29 (define-module (gnu packages java)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix hg-download)
34 #:use-module (guix git-download)
35 #:use-module (guix svn-download)
36 #:use-module (guix utils)
37 #:use-module (guix build-system ant)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system trivial)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages certs)
46 #:use-module (gnu packages cpio)
47 #:use-module (gnu packages cups)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages fontutils)
50 #:use-module (gnu packages gawk)
51 #:use-module (gnu packages gettext)
52 #:use-module (gnu packages gcc)
53 #:use-module (gnu packages gl)
54 #:use-module (gnu packages gnuzilla) ;nss
55 #:use-module (gnu packages ghostscript) ;lcms
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages groovy)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages guile)
60 #:use-module (gnu packages icu4c)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages libffi)
63 #:use-module (gnu packages linux) ;alsa
64 #:use-module (gnu packages maths)
65 #:use-module (gnu packages onc-rpc)
66 #:use-module (gnu packages web)
67 #:use-module (gnu packages wget)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages perl)
70 #:use-module (gnu packages popt)
71 #:use-module (gnu packages kerberos)
72 #:use-module (gnu packages xml)
73 #:use-module (gnu packages xorg)
74 #:use-module (gnu packages texinfo)
75 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
76 #:use-module (srfi srfi-11)
77 #:use-module (ice-9 match))
78
79 \f
80 ;;;
81 ;;; Java bootstrap toolchain.
82 ;;;
83
84 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
85 ;; use it to build a simple version of GNU Classpath, the Java standard
86 ;; library. We chose version 0.93 because it is the last version that can be
87 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
88 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
89 ;; the last version of JamVM that works with a version of GNU classpath that
90 ;; does not require ECJ. These three packages make up the bootstrap JDK.
91
92 ;; This is sufficient to build an older version of Ant, which is needed to
93 ;; build an older version of ECJ, an incremental Java compiler, both of which
94 ;; are written in Java.
95 ;;
96 ;; ECJ is needed to build the latest release (0.99) and the development
97 ;; version of GNU Classpath. The development version of GNU Classpath has
98 ;; much more support for Java 1.6 than the latest release, but we need to
99 ;; build 0.99 first to get a working version of javah. ECJ, the development
100 ;; version of GNU Classpath, and the latest version of JamVM make up the
101 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
102 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
103 ;; Icedtea 3.x.
104
105 (define jikes
106 (package
107 (name "jikes")
108 (version "1.22")
109 (source (origin
110 (method url-fetch)
111 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
112 version "/jikes-" version ".tar.bz2"))
113 (sha256
114 (base32
115 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
116 (build-system gnu-build-system)
117 (home-page "http://jikes.sourceforge.net/")
118 (synopsis "Compiler for the Java language")
119 (description "Jikes is a compiler that translates Java source files as
120 defined in The Java Language Specification into the bytecoded instruction set
121 and binary format defined in The Java Virtual Machine Specification.")
122 (license license:ibmpl1.0)))
123
124 ;; This is the last version of GNU Classpath that can be built without ECJ.
125 (define classpath-bootstrap
126 (package
127 (name "classpath")
128 (version "0.93")
129 (source (origin
130 (method url-fetch)
131 (uri (string-append "mirror://gnu/classpath/classpath-"
132 version ".tar.gz"))
133 (sha256
134 (base32
135 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
136 (patches (search-patches "classpath-aarch64-support.patch"))))
137 (build-system gnu-build-system)
138 (arguments
139 `(#:configure-flags
140 (list (string-append "JAVAC="
141 (assoc-ref %build-inputs "jikes")
142 "/bin/jikes")
143 "--disable-Werror"
144 "--disable-gmp"
145 "--disable-gtk-peer"
146 "--disable-gconf-peer"
147 "--disable-plugin"
148 "--disable-dssi"
149 "--disable-alsa"
150 "--disable-gjdoc")
151 #:phases
152 (modify-phases %standard-phases
153 (add-after 'install 'install-data
154 (lambda _ (invoke "make" "install-data"))))))
155 (native-inputs
156 `(("jikes" ,jikes)
157 ("fastjar" ,fastjar)
158 ("libltdl" ,libltdl)
159 ("pkg-config" ,pkg-config)))
160 (home-page "https://www.gnu.org/software/classpath/")
161 (synopsis "Essential libraries for Java")
162 (description "GNU Classpath is a project to create core class libraries
163 for use with runtimes, compilers and tools for the Java programming
164 language.")
165 ;; GPLv2 or later, with special linking exception.
166 (license license:gpl2+)))
167
168 ;; This is the last version of JamVM that works with a version of GNU
169 ;; classpath that does not require ECJ.
170 (define jamvm-1-bootstrap
171 (package
172 (name "jamvm")
173 (version "1.5.1")
174 (source (origin
175 (method url-fetch)
176 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
177 "JamVM%20" version "/jamvm-"
178 version ".tar.gz"))
179 (patches (search-patches "jamvm-arm.patch"))
180 (sha256
181 (base32
182 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
183 (build-system gnu-build-system)
184 (arguments
185 `(#:configure-flags
186 (list (string-append "--with-classpath-install-dir="
187 (assoc-ref %build-inputs "classpath")))))
188 (inputs
189 `(("classpath" ,classpath-bootstrap)
190 ("jikes" ,jikes)
191 ("zlib" ,zlib)))
192 (home-page "http://jamvm.sourceforge.net/")
193 (synopsis "Small Java Virtual Machine")
194 (description "JamVM is a Java Virtual Machine conforming to the JVM
195 specification edition 2 (blue book). It is extremely small. However, unlike
196 other small VMs it supports the full spec, including object finalisation and
197 JNI.")
198 (license license:gpl2+)))
199
200 (define ant-bootstrap
201 (package
202 (name "ant-bootstrap")
203 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
204 ;; are not supported. The 1.8.x series is the last to use only features
205 ;; supported by Jikes.
206 (version "1.8.4")
207 (source (origin
208 (method url-fetch)
209 (uri (string-append "http://archive.apache.org/dist/"
210 "ant/source/apache-ant-"
211 version "-src.tar.bz2"))
212 (sha256
213 (base32
214 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
215 (build-system gnu-build-system)
216 (arguments
217 `(#:imported-modules ((guix build syscalls)
218 ,@%gnu-build-system-modules)
219 #:modules ((srfi srfi-1)
220 (guix build gnu-build-system)
221 (guix build utils)
222 (guix build syscalls))
223 #:tests? #f ; no "check" target
224 #:phases
225 (modify-phases %standard-phases
226 (delete 'bootstrap)
227 (delete 'configure)
228 (replace 'build
229 (lambda* (#:key inputs #:allow-other-keys)
230 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
231 (setenv "JAVACMD"
232 (string-append (assoc-ref inputs "jamvm")
233 "/bin/jamvm"))
234 (setenv "JAVAC"
235 (string-append (assoc-ref inputs "jikes")
236 "/bin/jikes"))
237 (setenv "CLASSPATH"
238 (string-append (assoc-ref inputs "jamvm")
239 "/lib/rt.jar"))
240
241 ;; Ant complains if this file doesn't exist.
242 (setenv "HOME" "/tmp")
243 (with-output-to-file "/tmp/.ant.properties"
244 (lambda _ (display "")))
245
246 ;; Use jikes instead of javac for <javac ...> tags in build.xml
247 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
248
249 ;; jikes produces lots of warnings, but they are not very
250 ;; interesting, so we silence them.
251 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
252
253 ;; Without these JamVM options the build may freeze.
254 (substitute* "bootstrap.sh"
255 (("^\"\\$\\{JAVACMD\\}\" " m)
256 ,@(if (string-prefix? "armhf" (or (%current-system)
257 (%current-target-system)))
258 `((string-append m "-Xnocompact "))
259 `((string-append m "-Xnocompact -Xnoinlining ")))))
260
261 ;; Disable tests because we are bootstrapping and thus don't have
262 ;; any of the dependencies required to build and run the tests.
263 (substitute* "build.xml"
264 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
265 (invoke "bash" "bootstrap.sh"
266 (string-append "-Ddist.dir="
267 (assoc-ref %outputs "out")))))
268 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
269 (lambda* (#:key outputs #:allow-other-keys)
270 (define (repack-archive jar)
271 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
272 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
273 (with-directory-excursion dir
274 (invoke "unzip" jar))
275 (delete-file jar)
276 ;; XXX: copied from (gnu build install)
277 (for-each (lambda (file)
278 (let ((s (lstat file)))
279 (unless (eq? (stat:type s) 'symlink)
280 (utime file 0 0 0 0))))
281 (find-files dir #:directories? #t))
282 ;; It is important that the manifest appears first.
283 (with-directory-excursion dir
284 (let* ((files (find-files "." ".*" #:directories? #t))
285 ;; To ensure that the reference scanner can
286 ;; detect all store references in the jars
287 ;; we disable compression with the "-0" option.
288 (command (if (file-exists? manifest)
289 `("zip" "-0" "-X" ,jar ,manifest
290 ,@files)
291 `("zip" "-0" "-X" ,jar ,@files))))
292 (apply invoke command)))))
293 (for-each repack-archive
294 (find-files
295 (string-append (assoc-ref %outputs "out") "/lib")
296 "\\.jar$"))
297 #t))
298 (delete 'install))))
299 (native-inputs
300 `(("jikes" ,jikes)
301 ("jamvm" ,jamvm-1-bootstrap)
302 ("unzip" ,unzip)
303 ("zip", zip)))
304 (home-page "http://ant.apache.org")
305 (synopsis "Build tool for Java")
306 (description
307 "Ant is a platform-independent build tool for Java. It is similar to
308 make but is implemented using the Java language, requires the Java platform,
309 and is best suited to building Java projects. Ant uses XML to describe the
310 build process and its dependencies, whereas Make uses Makefile format.")
311 (license license:asl2.0)))
312
313 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
314 ;; compiler for Java 1.5.
315 (define ecj-bootstrap
316 (package
317 (name "ecj-bootstrap")
318 (version "3.2.2")
319 (source (origin
320 (method url-fetch)
321 (uri (string-append "http://archive.eclipse.org/eclipse/"
322 "downloads/drops/R-" version
323 "-200702121330/ecjsrc.zip"))
324 (sha256
325 (base32
326 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
327 ;; It would be so much easier if we could use the ant-build-system, but we
328 ;; cannot as we don't have ant at this point. We use ecj for
329 ;; bootstrapping the JDK.
330 (build-system gnu-build-system)
331 (arguments
332 `(#:modules ((guix build gnu-build-system)
333 (guix build utils)
334 (srfi srfi-1))
335 #:tests? #f ; there are no tests
336 #:phases
337 (modify-phases %standard-phases
338 (replace 'configure
339 (lambda* (#:key inputs #:allow-other-keys)
340 (setenv "CLASSPATH"
341 (string-join
342 (cons (string-append (assoc-ref inputs "jamvm")
343 "/lib/rt.jar")
344 (find-files (string-append
345 (assoc-ref inputs "ant-bootstrap")
346 "/lib")
347 "\\.jar$"))
348 ":"))
349 #t))
350 (replace 'build
351 (lambda* (#:key inputs #:allow-other-keys)
352 ;; The unpack phase enters the "org" directory by mistake.
353 (chdir "..")
354
355 ;; Create a simple manifest to make ecj executable.
356 (with-output-to-file "manifest"
357 (lambda _
358 (display "Manifest-Version: 1.0
359 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
360
361 ;; Compile it all!
362 (and (apply invoke "jikes"
363 (find-files "." "\\.java$"))
364 (invoke "fastjar" "cvfm"
365 "ecj-bootstrap.jar" "manifest" "."))))
366 (replace 'install
367 (lambda* (#:key outputs #:allow-other-keys)
368 (let ((share (string-append (assoc-ref outputs "out")
369 "/share/java/")))
370 (mkdir-p share)
371 (install-file "ecj-bootstrap.jar" share)
372 #t))))))
373 (native-inputs
374 `(("ant-bootstrap" ,ant-bootstrap)
375 ("unzip" ,unzip)
376 ("jikes" ,jikes)
377 ("jamvm" ,jamvm-1-bootstrap)
378 ("fastjar" ,fastjar)))
379 (home-page "https://eclipse.org")
380 (synopsis "Eclipse Java development tools core batch compiler")
381 (description "This package provides the Eclipse Java core batch compiler
382 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
383 requirement for all GNU Classpath releases after version 0.93.")
384 (license license:epl1.0)))
385
386 (define ecj-javac-wrapper
387 (package (inherit ecj-bootstrap)
388 (name "ecj-javac-wrapper")
389 (source #f)
390 (build-system trivial-build-system)
391 (arguments
392 `(#:modules ((guix build utils))
393 #:builder
394 (begin
395 (use-modules (guix build utils))
396 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
397 (target (string-append bin "/javac"))
398 (guile (string-append (assoc-ref %build-inputs "guile")
399 "/bin/guile"))
400 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
401 "/share/java/ecj-bootstrap.jar"))
402 (java (string-append (assoc-ref %build-inputs "jamvm")
403 "/bin/jamvm"))
404 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
405 "/share/classpath")))
406 (string-append jvmlib "/glibj.zip:"
407 jvmlib "/tools.zip"))))
408 (mkdir-p bin)
409 (with-output-to-file target
410 (lambda _
411 (format #t "#!~a --no-auto-compile\n!#\n" guile)
412 (write
413 `(begin (use-modules (ice-9 match)
414 (ice-9 receive)
415 (ice-9 hash-table)
416 (srfi srfi-1)
417 (srfi srfi-26))
418 (define defaults
419 '(("-bootclasspath" ,bootcp)
420 ("-source" "1.5")
421 ("-target" "1.5")
422 ("-cp" ".")))
423 (define (main args)
424 (let ((classpath (getenv "CLASSPATH")))
425 (setenv "CLASSPATH"
426 (string-join (list ,ecj
427 ,(string-append (assoc-ref %build-inputs "jamvm")
428 "/lib/rt.jar")
429 (or classpath ""))
430 ":")))
431 (receive (vm-args other-args)
432 ;; Separate VM arguments from arguments to ECJ.
433 (partition (cut string-prefix? "-J" <>)
434 (fold (lambda (default acc)
435 (if (member (first default) acc)
436 acc (append default acc)))
437 args defaults))
438 (apply system* ,java
439 (append
440 ;; Remove "-J" prefix
441 (map (cut string-drop <> 2) vm-args)
442 '("org.eclipse.jdt.internal.compiler.batch.Main")
443 (cons "-nowarn" other-args)))))
444 ;; Entry point
445 (let ((args (cdr (command-line))))
446 (if (null? args)
447 (format (current-error-port) "javac: no arguments given!\n")
448 (main args)))))))
449 (chmod target #o755)
450 #t))))
451 (native-inputs
452 `(("guile" ,guile-2.2)
453 ("ecj-bootstrap" ,ecj-bootstrap)
454 ("jamvm" ,jamvm-1-bootstrap)
455 ("classpath" ,classpath-bootstrap)))
456 (description "This package provides a wrapper around the @dfn{Eclipse
457 compiler for Java} (ecj) with a command line interface that is compatible with
458 the standard javac executable.")))
459
460 ;; The classpath-bootstrap was built without a virtual machine, so it does not
461 ;; provide a wrapper for javah. We cannot build the development version of
462 ;; Classpath without javah.
463 (define classpath-0.99
464 (package (inherit classpath-bootstrap)
465 (version "0.99")
466 (source (origin
467 (method url-fetch)
468 (uri (string-append "mirror://gnu/classpath/classpath-"
469 version ".tar.gz"))
470 (sha256
471 (base32
472 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
473 (patches (search-patches "classpath-aarch64-support.patch"))))
474 (arguments
475 `(#:configure-flags
476 (list (string-append "--with-ecj-jar="
477 (assoc-ref %build-inputs "ecj-bootstrap")
478 "/share/java/ecj-bootstrap.jar")
479 (string-append "JAVAC="
480 (assoc-ref %build-inputs "ecj-javac-wrapper")
481 "/bin/javac")
482 (string-append "JAVA="
483 (assoc-ref %build-inputs "jamvm")
484 "/bin/jamvm")
485 "GCJ_JAVAC_TRUE=no"
486 "ac_cv_prog_java_works=yes" ; trust me
487 "--disable-Werror"
488 "--disable-gmp"
489 "--disable-gtk-peer"
490 "--disable-gconf-peer"
491 "--disable-plugin"
492 "--disable-dssi"
493 "--disable-alsa"
494 "--disable-gjdoc")
495 #:phases
496 (modify-phases %standard-phases
497 (add-after 'install 'install-data
498 (lambda _ (invoke "make" "install-data"))))))
499 (native-inputs
500 `(("ecj-bootstrap" ,ecj-bootstrap)
501 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
502 ("fastjar" ,fastjar)
503 ("jamvm" ,jamvm-1-bootstrap)
504 ("classpath" ,classpath-bootstrap)
505 ("libltdl" ,libltdl)
506 ("pkg-config" ,pkg-config)))))
507
508 ;; We need this because classpath-bootstrap does not provide all of the tools
509 ;; we need to build classpath-devel.
510 (define classpath-jamvm-wrappers
511 (package (inherit classpath-0.99)
512 (name "classpath-jamvm-wrappers")
513 (source #f)
514 (build-system trivial-build-system)
515 (arguments
516 `(#:modules ((guix build utils))
517 #:builder
518 (begin
519 (use-modules (guix build utils))
520 (let* ((bash (assoc-ref %build-inputs "bash"))
521 (jamvm (assoc-ref %build-inputs "jamvm"))
522 (classpath (assoc-ref %build-inputs "classpath"))
523 (bin (string-append (assoc-ref %outputs "out")
524 "/bin/")))
525 (mkdir-p bin)
526 (for-each (lambda (tool)
527 (with-output-to-file (string-append bin tool)
528 (lambda _
529 ,@(if (string-prefix? "armhf" (or (%current-system)
530 (%current-target-system)))
531 `((format #t "#!~a/bin/sh
532 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
533 gnu.classpath.tools.~a.~a $@"
534 bash jamvm classpath tool
535 (if (string=? "native2ascii" tool)
536 "Native2ASCII" "Main")))
537 `((format #t "#!~a/bin/sh
538 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
539 gnu.classpath.tools.~a.~a $@"
540 bash jamvm classpath tool
541 (if (string=? "native2ascii" tool)
542 "Native2ASCII" "Main"))))))
543 (chmod (string-append bin tool) #o755))
544 (list "javah"
545 "rmic"
546 "rmid"
547 "orbd"
548 "rmiregistry"
549 "native2ascii"))
550 #t))))
551 (native-inputs
552 `(("bash" ,bash)
553 ("jamvm" ,jamvm-1-bootstrap)
554 ("classpath" ,classpath-0.99)))
555 (inputs '())
556 (synopsis "Executables from GNU Classpath")
557 (description "This package provides wrappers around the tools provided by
558 the GNU Classpath library. They are executed by the JamVM virtual
559 machine.")))
560
561 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
562 ;; then Classpath has gained much more support for Java 1.6.
563 (define-public classpath-devel
564 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
565 (revision "1"))
566 (package (inherit classpath-bootstrap)
567 (version (string-append "0.99-" revision "." (string-take commit 9)))
568 (source (origin
569 (method git-fetch)
570 (uri (git-reference
571 (url "https://git.savannah.gnu.org/git/classpath.git")
572 (commit commit)))
573 (file-name (string-append "classpath-" version "-checkout"))
574 (sha256
575 (base32
576 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
577 (arguments
578 `(#:make-flags
579 ;; Ensure that the initial heap size is smaller than the maximum
580 ;; size. By default only Xmx is set, which can lead to invalid
581 ;; memory settings on some machines with a lot of memory.
582 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
583 #:configure-flags
584 (list (string-append "--with-ecj-jar="
585 (assoc-ref %build-inputs "ecj-bootstrap")
586 "/share/java/ecj-bootstrap.jar")
587 (string-append "--with-javac="
588 (assoc-ref %build-inputs "ecj-javac-wrapper")
589 "/bin/javac")
590 (string-append "JAVA="
591 (assoc-ref %build-inputs "jamvm")
592 "/bin/jamvm")
593 "GCJ_JAVAC_TRUE=no"
594 "ac_cv_prog_java_works=yes" ; trust me
595 "--disable-Werror"
596 "--disable-gmp"
597 "--disable-gtk-peer"
598 "--disable-gconf-peer"
599 "--disable-plugin"
600 "--disable-dssi"
601 "--disable-alsa"
602 "--disable-gjdoc")
603 #:phases
604 (modify-phases %standard-phases
605 ;; XXX The bootstrap phase executes autogen.sh, which fails after
606 ;; complaining about the lack of gettext.
607 (replace 'bootstrap
608 (lambda _ (invoke "autoreconf" "-vif")))
609 (add-after 'unpack 'remove-unsupported-annotations
610 (lambda _
611 (substitute* (find-files "java" "\\.java$")
612 (("@Override") ""))
613 #t))
614 (add-after 'install 'install-data
615 (lambda _ (invoke "make" "install-data"))))))
616 (native-inputs
617 `(("autoconf" ,autoconf)
618 ("automake" ,automake)
619 ("libtool" ,libtool)
620 ("gettext" ,gettext-minimal)
621 ("texinfo" ,texinfo)
622 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
623 ("ecj-bootstrap" ,ecj-bootstrap)
624 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
625 ("fastjar" ,fastjar)
626 ("jamvm" ,jamvm-1-bootstrap)
627 ("libltdl" ,libltdl)
628 ("pkg-config" ,pkg-config))))))
629
630 (define jamvm
631 (package (inherit jamvm-1-bootstrap)
632 (version "2.0.0")
633 (source (origin
634 (method url-fetch)
635 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
636 "JamVM%20" version "/jamvm-"
637 version ".tar.gz"))
638 (sha256
639 (base32
640 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
641 (build-system gnu-build-system)
642 (arguments
643 `(#:configure-flags
644 (list (string-append "--with-classpath-install-dir="
645 (assoc-ref %build-inputs "classpath")))))
646 (inputs
647 `(("classpath" ,classpath-devel)
648 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
649 ("zlib" ,zlib)))))
650
651 (define ecj-javac-wrapper-final
652 (package (inherit ecj-javac-wrapper)
653 (native-inputs
654 `(("guile" ,guile-2.2)
655 ("ecj-bootstrap" ,ecj-bootstrap)
656 ("jamvm" ,jamvm)
657 ("classpath" ,classpath-devel)))))
658
659 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
660 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
661 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
662 ;; which uses Java 6 only.
663 (define-public icedtea-6
664 (package
665 (name "icedtea")
666 (version "1.13.13")
667 (source (origin
668 (method url-fetch)
669 (uri (string-append
670 "http://icedtea.wildebeest.org/download/source/icedtea6-"
671 version ".tar.xz"))
672 (sha256
673 (base32
674 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
675 (modules '((guix build utils)))
676 (snippet
677 '(begin
678 (substitute* "Makefile.in"
679 ;; do not leak information about the build host
680 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
681 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
682 #t))))
683 (build-system gnu-build-system)
684 (outputs '("out" ; Java Runtime Environment
685 "jdk" ; Java Development Kit
686 "doc")) ; all documentation
687 (arguments
688 `(;; There are many failing tests and many are known to fail upstream.
689 #:tests? #f
690
691 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
692 ;; gremlin) doesn't support it yet, so skip this phase.
693 #:validate-runpath? #f
694
695 #:modules ((guix build utils)
696 (guix build gnu-build-system)
697 (srfi srfi-19))
698
699 #:configure-flags
700 `("--enable-bootstrap"
701 "--enable-nss"
702 "--without-rhino"
703 "--with-parallel-jobs"
704 "--disable-downloading"
705 "--disable-tests"
706 ,(string-append "--with-ecj="
707 (assoc-ref %build-inputs "ecj")
708 "/share/java/ecj-bootstrap.jar")
709 ,(string-append "--with-jar="
710 (assoc-ref %build-inputs "fastjar")
711 "/bin/fastjar")
712 ,(string-append "--with-jdk-home="
713 (assoc-ref %build-inputs "classpath"))
714 ,(string-append "--with-java="
715 (assoc-ref %build-inputs "jamvm")
716 "/bin/jamvm"))
717 #:phases
718 (modify-phases %standard-phases
719 (replace 'unpack
720 (lambda* (#:key source inputs #:allow-other-keys)
721 (invoke "tar" "xvf" source)
722 (chdir (string-append "icedtea6-" ,version))
723 (mkdir "openjdk")
724 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
725 ;; The convenient OpenJDK source bundle is no longer
726 ;; available for download, so we have to take the sources
727 ;; from the Mercurial repositories and change the Makefile
728 ;; to avoid tests for the OpenJDK zip archive.
729 (with-directory-excursion "openjdk"
730 (for-each (lambda (part)
731 (mkdir part)
732 (copy-recursively
733 (assoc-ref inputs
734 (string-append part "-src"))
735 part))
736 '("jdk" "corba"
737 "langtools" "jaxp" "jaxws")))
738 (with-directory-excursion "openjdk"
739 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
740 (rename-file "hg-checkout" "hotspot"))
741 (substitute* "Makefile.in"
742 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
743 "echo \"trust me\";")
744 ;; The contents of the bootstrap directory must be
745 ;; writeable but when copying from the store they are
746 ;; not.
747 (("mkdir -p lib/rt" line)
748 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
749 (invoke "chmod" "-R" "u+w" "openjdk")))
750 (add-after 'unpack 'use-classpath
751 (lambda* (#:key inputs #:allow-other-keys)
752 (let ((jvmlib (assoc-ref inputs "classpath"))
753 (jamvm (assoc-ref inputs "jamvm")))
754 ;; Classpath does not provide rt.jar.
755 (substitute* "Makefile.in"
756 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
757 (string-append jvmlib "/share/classpath/glibj.zip")))
758 ;; Make sure we can find all classes.
759 (setenv "CLASSPATH"
760 (string-append jvmlib "/share/classpath/glibj.zip:"
761 jvmlib "/share/classpath/tools.zip:"
762 jamvm "/lib/rt.jar"))
763 (setenv "JAVACFLAGS"
764 (string-append "-cp "
765 jvmlib "/share/classpath/glibj.zip:"
766 jvmlib "/share/classpath/tools.zip")))
767 #t))
768 (add-after 'unpack 'patch-patches
769 (lambda _
770 ;; shebang in patches so that they apply cleanly
771 (substitute* '("patches/jtreg-jrunscript.patch"
772 "patches/hotspot/hs23/drop_unlicensed_test.patch")
773 (("#!/bin/sh") (string-append "#!" (which "sh"))))
774 #t))
775 (add-after 'unpack 'patch-paths
776 (lambda* (#:key inputs #:allow-other-keys)
777 ;; buildtree.make generates shell scripts, so we need to replace
778 ;; the generated shebang
779 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
780 (("/bin/sh") (which "bash")))
781
782 (let ((corebin (string-append
783 (assoc-ref inputs "coreutils") "/bin/"))
784 (binbin (string-append
785 (assoc-ref inputs "binutils") "/bin/"))
786 (grepbin (string-append
787 (assoc-ref inputs "grep") "/bin/")))
788 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
789 "openjdk/corba/make/common/shared/Defs-linux.gmk")
790 (("UNIXCOMMAND_PATH = /bin/")
791 (string-append "UNIXCOMMAND_PATH = " corebin))
792 (("USRBIN_PATH = /usr/bin/")
793 (string-append "USRBIN_PATH = " corebin))
794 (("DEVTOOLS_PATH *= */usr/bin/")
795 (string-append "DEVTOOLS_PATH = " corebin))
796 (("COMPILER_PATH *= */usr/bin/")
797 (string-append "COMPILER_PATH = "
798 (assoc-ref inputs "gcc") "/bin/"))
799 (("DEF_OBJCOPY *=.*objcopy")
800 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
801
802 ;; fix path to alsa header
803 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
804 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
805 (string-append "ALSA_INCLUDE="
806 (assoc-ref inputs "alsa-lib")
807 "/include/alsa/version.h")))
808
809 ;; fix hard-coded utility paths
810 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
811 "openjdk/corba/make/common/shared/Defs-utils.gmk")
812 (("ECHO *=.*echo")
813 (string-append "ECHO = " (which "echo")))
814 (("^GREP *=.*grep")
815 (string-append "GREP = " (which "grep")))
816 (("EGREP *=.*egrep")
817 (string-append "EGREP = " (which "egrep")))
818 (("CPIO *=.*cpio")
819 (string-append "CPIO = " (which "cpio")))
820 (("READELF *=.*readelf")
821 (string-append "READELF = " (which "readelf")))
822 (("^ *AR *=.*ar")
823 (string-append "AR = " (which "ar")))
824 (("^ *TAR *=.*tar")
825 (string-append "TAR = " (which "tar")))
826 (("AS *=.*as")
827 (string-append "AS = " (which "as")))
828 (("LD *=.*ld")
829 (string-append "LD = " (which "ld")))
830 (("STRIP *=.*strip")
831 (string-append "STRIP = " (which "strip")))
832 (("NM *=.*nm")
833 (string-append "NM = " (which "nm")))
834 (("^SH *=.*sh")
835 (string-append "SH = " (which "bash")))
836 (("^FIND *=.*find")
837 (string-append "FIND = " (which "find")))
838 (("LDD *=.*ldd")
839 (string-append "LDD = " (which "ldd")))
840 (("NAWK *=.*(n|g)awk")
841 (string-append "NAWK = " (which "gawk")))
842 (("XARGS *=.*xargs")
843 (string-append "XARGS = " (which "xargs")))
844 (("UNZIP *=.*unzip")
845 (string-append "UNZIP = " (which "unzip")))
846 (("ZIPEXE *=.*zip")
847 (string-append "ZIPEXE = " (which "zip")))
848 (("SED *=.*sed")
849 (string-append "SED = " (which "sed"))))
850
851 ;; Some of these timestamps cause problems as they are more than
852 ;; 10 years ago, failing the build process.
853 (substitute*
854 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
855 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
856 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
857 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
858 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
859 #t)))
860 (add-before 'configure 'set-additional-paths
861 (lambda* (#:key inputs #:allow-other-keys)
862 (setenv "CPATH"
863 (string-append (assoc-ref inputs "libxrender")
864 "/include/X11/extensions" ":"
865 (assoc-ref inputs "libxtst")
866 "/include/X11/extensions" ":"
867 (assoc-ref inputs "libxinerama")
868 "/include/X11/extensions" ":"
869 (or (getenv "CPATH") "")))
870 (setenv "ALT_CUPS_HEADERS_PATH"
871 (string-append (assoc-ref inputs "cups")
872 "/include"))
873 (setenv "ALT_FREETYPE_HEADERS_PATH"
874 (string-append (assoc-ref inputs "freetype")
875 "/include"))
876 (setenv "ALT_FREETYPE_LIB_PATH"
877 (string-append (assoc-ref inputs "freetype")
878 "/lib"))
879 #t))
880 (replace 'install
881 (lambda* (#:key outputs #:allow-other-keys)
882 (let ((doc (string-append (assoc-ref outputs "doc")
883 "/share/doc/icedtea"))
884 (jre (assoc-ref outputs "out"))
885 (jdk (assoc-ref outputs "jdk")))
886 (copy-recursively "openjdk.build/docs" doc)
887 (copy-recursively "openjdk.build/j2re-image" jre)
888 (copy-recursively "openjdk.build/j2sdk-image" jdk))
889 #t)))))
890 (native-inputs
891 `(("ant" ,ant-bootstrap)
892 ("alsa-lib" ,alsa-lib)
893 ("attr" ,attr)
894 ("classpath" ,classpath-devel)
895 ("coreutils" ,coreutils)
896 ("cpio" ,cpio)
897 ("cups" ,cups)
898 ("ecj" ,ecj-bootstrap)
899 ("ecj-javac" ,ecj-javac-wrapper-final)
900 ("fastjar" ,fastjar)
901 ("fontconfig" ,fontconfig)
902 ("freetype" ,freetype)
903 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
904 ("gtk" ,gtk+-2)
905 ("gawk" ,gawk)
906 ("giflib" ,giflib)
907 ("grep" ,grep)
908 ("jamvm" ,jamvm)
909 ("lcms" ,lcms)
910 ("libjpeg" ,libjpeg)
911 ("libnsl" ,libnsl)
912 ("libpng" ,libpng)
913 ("libtool" ,libtool)
914 ("libx11" ,libx11)
915 ("libxcomposite" ,libxcomposite)
916 ("libxi" ,libxi)
917 ("libxinerama" ,libxinerama)
918 ("libxrender" ,libxrender)
919 ("libxslt" ,libxslt) ;for xsltproc
920 ("libxt" ,libxt)
921 ("libxtst" ,libxtst)
922 ("mit-krb5" ,mit-krb5)
923 ("nss" ,nss)
924 ("nss-certs" ,nss-certs)
925 ("perl" ,perl)
926 ("pkg-config" ,pkg-config)
927 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
928 ("unzip" ,unzip)
929 ("wget" ,wget)
930 ("which" ,which)
931 ("zip" ,zip)
932 ("zlib" ,zlib)
933 ("openjdk-src"
934 ,(origin
935 (method hg-fetch)
936 (uri (hg-reference
937 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
938 (changeset "jdk6-b41")))
939 (sha256
940 (base32
941 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
942 ("jdk-src"
943 ,(origin
944 (method hg-fetch)
945 (uri (hg-reference
946 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
947 (changeset "jdk6-b41")))
948 (sha256
949 (base32
950 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
951 ("hotspot-src"
952 ,(origin
953 (method hg-fetch)
954 (uri (hg-reference
955 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
956 (changeset "jdk6-b41")))
957 (sha256
958 (base32
959 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
960 (patches
961 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
962 ("corba-src"
963 ,(origin
964 (method hg-fetch)
965 (uri (hg-reference
966 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
967 (changeset "jdk6-b41")))
968 (sha256
969 (base32
970 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
971 ("langtools-src"
972 ,(origin
973 (method hg-fetch)
974 (uri (hg-reference
975 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
976 (changeset "jdk6-b41")))
977 (sha256
978 (base32
979 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
980 ("jaxp-src"
981 ,(origin
982 (method hg-fetch)
983 (uri (hg-reference
984 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
985 (changeset "jdk6-b41")))
986 (sha256
987 (base32
988 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
989 ("jaxws-src"
990 ,(origin
991 (method hg-fetch)
992 (uri (hg-reference
993 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
994 (changeset "jdk6-b41")))
995 (sha256
996 (base32
997 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
998 (home-page "http://icedtea.classpath.org")
999 (synopsis "Java development kit")
1000 (description
1001 "This package provides the OpenJDK built with the IcedTea build harness.
1002 This version of the OpenJDK is no longer maintained and is only used for
1003 bootstrapping purposes.")
1004 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1005 ;; same license as both GNU Classpath and OpenJDK.
1006 (license license:gpl2+)))
1007
1008 (define-public icedtea-7
1009 (let* ((version "2.6.13")
1010 (drop (lambda (name hash)
1011 (origin
1012 (method url-fetch)
1013 (uri (string-append
1014 "http://icedtea.classpath.org/download/drops"
1015 "/icedtea7/" version "/" name ".tar.bz2"))
1016 (sha256 (base32 hash))))))
1017 (package
1018 (name "icedtea")
1019 (version version)
1020 (source (origin
1021 (method url-fetch)
1022 (uri (string-append
1023 "http://icedtea.wildebeest.org/download/source/icedtea-"
1024 version ".tar.xz"))
1025 (sha256
1026 (base32
1027 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1028 (modules '((guix build utils)))
1029 (snippet
1030 '(begin
1031 (substitute* "Makefile.in"
1032 ;; do not leak information about the build host
1033 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1034 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1035 #t))))
1036 (build-system gnu-build-system)
1037 (outputs '("out" ; Java Runtime Environment
1038 "jdk" ; Java Development Kit
1039 "doc")) ; all documentation
1040 (arguments
1041 `(;; There are many test failures. Some are known to
1042 ;; fail upstream, others relate to not having an X
1043 ;; server running at test time, yet others are a
1044 ;; complete mystery to me.
1045
1046 ;; hotspot: passed: 241; failed: 45; error: 2
1047 ;; langtools: passed: 1,934; failed: 26
1048 ;; jdk: unknown
1049 #:tests? #f
1050
1051 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1052 ;; gremlin) doesn't support it yet, so skip this phase.
1053 #:validate-runpath? #f
1054
1055 ;; Apparently, the C locale is needed for some of the tests.
1056 #:locale "C"
1057
1058 #:modules ((guix build utils)
1059 (guix build gnu-build-system)
1060 (ice-9 match)
1061 (ice-9 popen)
1062 (srfi srfi-19)
1063 (srfi srfi-26))
1064
1065 #:configure-flags
1066 ;; TODO: package pcsc and sctp, and add to inputs
1067 `("--disable-system-pcsc"
1068 "--disable-system-sctp"
1069 "--enable-bootstrap"
1070 "--enable-nss"
1071 "--without-rhino"
1072 "--disable-downloading"
1073 "--disable-tests" ;they are run in the check phase instead
1074 "--with-openjdk-src-dir=./openjdk.src"
1075 ,(string-append "--with-jdk-home="
1076 (assoc-ref %build-inputs "jdk")))
1077
1078 #:phases
1079 (modify-phases %standard-phases
1080 (replace 'unpack
1081 (lambda* (#:key source inputs #:allow-other-keys)
1082 (let ((target (string-append "icedtea-" ,version))
1083 (unpack (lambda* (name #:optional dir)
1084 (let ((dir (or dir
1085 (string-drop-right name 5))))
1086 (mkdir dir)
1087 (invoke "tar" "xvf"
1088 (assoc-ref inputs name)
1089 "-C" dir
1090 "--strip-components=1")))))
1091 (mkdir target)
1092 (invoke "tar" "xvf" source
1093 "-C" target "--strip-components=1")
1094 (chdir target)
1095 (unpack "openjdk-src" "openjdk.src")
1096 (with-directory-excursion "openjdk.src"
1097 (for-each unpack
1098 (filter (cut string-suffix? "-drop" <>)
1099 (map (match-lambda
1100 ((name . _) name))
1101 inputs))))
1102 #t)))
1103 (add-after 'unpack 'fix-x11-extension-include-path
1104 (lambda* (#:key inputs #:allow-other-keys)
1105 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1106 (((string-append "\\$\\(firstword \\$\\(wildcard "
1107 "\\$\\(OPENWIN_HOME\\)"
1108 "/include/X11/extensions\\).*$"))
1109 (string-append (assoc-ref inputs "libxrender")
1110 "/include/X11/extensions"
1111 " -I" (assoc-ref inputs "libxtst")
1112 "/include/X11/extensions"
1113 " -I" (assoc-ref inputs "libxinerama")
1114 "/include/X11/extensions"))
1115 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1116 #t))
1117 (add-after 'unpack 'patch-paths
1118 (lambda _
1119 ;; buildtree.make generates shell scripts, so we need to replace
1120 ;; the generated shebang
1121 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1122 (("/bin/sh") (which "bash")))
1123
1124 (let ((corebin (string-append
1125 (assoc-ref %build-inputs "coreutils") "/bin/"))
1126 (binbin (string-append
1127 (assoc-ref %build-inputs "binutils") "/bin/"))
1128 (grepbin (string-append
1129 (assoc-ref %build-inputs "grep") "/bin/")))
1130 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1131 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1132 (("UNIXCOMMAND_PATH = /bin/")
1133 (string-append "UNIXCOMMAND_PATH = " corebin))
1134 (("USRBIN_PATH = /usr/bin/")
1135 (string-append "USRBIN_PATH = " corebin))
1136 (("DEVTOOLS_PATH *= */usr/bin/")
1137 (string-append "DEVTOOLS_PATH = " corebin))
1138 (("COMPILER_PATH *= */usr/bin/")
1139 (string-append "COMPILER_PATH = "
1140 (assoc-ref %build-inputs "gcc") "/bin/"))
1141 (("DEF_OBJCOPY *=.*objcopy")
1142 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1143
1144 ;; fix path to alsa header
1145 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1146 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1147 (string-append "ALSA_INCLUDE="
1148 (assoc-ref %build-inputs "alsa-lib")
1149 "/include/alsa/version.h")))
1150
1151 ;; fix hard-coded utility paths
1152 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1153 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1154 (("ECHO *=.*echo")
1155 (string-append "ECHO = " (which "echo")))
1156 (("^GREP *=.*grep")
1157 (string-append "GREP = " (which "grep")))
1158 (("EGREP *=.*egrep")
1159 (string-append "EGREP = " (which "egrep")))
1160 (("CPIO *=.*cpio")
1161 (string-append "CPIO = " (which "cpio")))
1162 (("READELF *=.*readelf")
1163 (string-append "READELF = " (which "readelf")))
1164 (("^ *AR *=.*ar")
1165 (string-append "AR = " (which "ar")))
1166 (("^ *TAR *=.*tar")
1167 (string-append "TAR = " (which "tar")))
1168 (("AS *=.*as")
1169 (string-append "AS = " (which "as")))
1170 (("LD *=.*ld")
1171 (string-append "LD = " (which "ld")))
1172 (("STRIP *=.*strip")
1173 (string-append "STRIP = " (which "strip")))
1174 (("NM *=.*nm")
1175 (string-append "NM = " (which "nm")))
1176 (("^SH *=.*sh")
1177 (string-append "SH = " (which "bash")))
1178 (("^FIND *=.*find")
1179 (string-append "FIND = " (which "find")))
1180 (("LDD *=.*ldd")
1181 (string-append "LDD = " (which "ldd")))
1182 (("NAWK *=.*(n|g)awk")
1183 (string-append "NAWK = " (which "gawk")))
1184 (("XARGS *=.*xargs")
1185 (string-append "XARGS = " (which "xargs")))
1186 (("UNZIP *=.*unzip")
1187 (string-append "UNZIP = " (which "unzip")))
1188 (("ZIPEXE *=.*zip")
1189 (string-append "ZIPEXE = " (which "zip")))
1190 (("SED *=.*sed")
1191 (string-append "SED = " (which "sed"))))
1192
1193 ;; Some of these timestamps cause problems as they are more than
1194 ;; 10 years ago, failing the build process.
1195 (substitute*
1196 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1197 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1198 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1199 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1200 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1201 #t))
1202 (add-before 'configure 'set-additional-paths
1203 (lambda* (#:key inputs #:allow-other-keys)
1204 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1205 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1206 (string-append "ALSA_INCLUDE="
1207 (assoc-ref inputs "alsa-lib")
1208 "/include/alsa/version.h")))
1209 (setenv "CC" "gcc")
1210 (setenv "CPATH"
1211 (string-append (assoc-ref inputs "libxcomposite")
1212 "/include/X11/extensions" ":"
1213 (assoc-ref inputs "libxrender")
1214 "/include/X11/extensions" ":"
1215 (assoc-ref inputs "libxtst")
1216 "/include/X11/extensions" ":"
1217 (assoc-ref inputs "libxinerama")
1218 "/include/X11/extensions" ":"
1219 (or (getenv "CPATH") "")))
1220 (setenv "ALT_OBJCOPY" (which "objcopy"))
1221 (setenv "ALT_CUPS_HEADERS_PATH"
1222 (string-append (assoc-ref inputs "cups")
1223 "/include"))
1224 (setenv "ALT_FREETYPE_HEADERS_PATH"
1225 (string-append (assoc-ref inputs "freetype")
1226 "/include"))
1227 (setenv "ALT_FREETYPE_LIB_PATH"
1228 (string-append (assoc-ref inputs "freetype")
1229 "/lib"))
1230 #t))
1231 (add-before 'check 'fix-test-framework
1232 (lambda _
1233 ;; Fix PATH in test environment
1234 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1235 (("PATH=/bin:/usr/bin")
1236 (string-append "PATH=" (getenv "PATH"))))
1237 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1238 (("/usr/bin/env") (which "env")))
1239 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1240 (("/bin/rm") (which "rm"))
1241 (("/bin/cp") (which "cp"))
1242 (("/bin/mv") (which "mv")))
1243 #t))
1244 (add-before 'check 'fix-hotspot-tests
1245 (lambda _
1246 (with-directory-excursion "openjdk.src/hotspot/test/"
1247 (substitute* "jprt.config"
1248 (("PATH=\"\\$\\{path4sdk\\}\"")
1249 (string-append "PATH=" (getenv "PATH")))
1250 (("make=/usr/bin/make")
1251 (string-append "make=" (which "make"))))
1252 (substitute* '("runtime/6626217/Test6626217.sh"
1253 "runtime/7110720/Test7110720.sh")
1254 (("/bin/rm") (which "rm"))
1255 (("/bin/cp") (which "cp"))
1256 (("/bin/mv") (which "mv"))))
1257 #t))
1258 (add-before 'check 'fix-jdk-tests
1259 (lambda _
1260 (with-directory-excursion "openjdk.src/jdk/test/"
1261 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1262 (("/bin/pwd") (which "pwd")))
1263 (substitute* "com/sun/jdi/ShellScaffold.sh"
1264 (("/bin/kill") (which "kill")))
1265 (substitute* "start-Xvfb.sh"
1266 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1267 (("/usr/bin/nohup") (which "nohup")))
1268 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1269 (("/bin/rm") (which "rm")))
1270 (substitute* "tools/launcher/MultipleJRE.sh"
1271 (("echo \"#!/bin/sh\"")
1272 (string-append "echo \"#!" (which "rm") "\""))
1273 (("/usr/bin/zip") (which "zip")))
1274 (substitute* "com/sun/jdi/OnThrowTest.java"
1275 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1276 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1277 (("/usr/bin/uptime") (which "uptime")))
1278 (substitute* "java/lang/ProcessBuilder/Basic.java"
1279 (("/usr/bin/env") (which "env"))
1280 (("/bin/false") (which "false"))
1281 (("/bin/true") (which "true"))
1282 (("/bin/cp") (which "cp"))
1283 (("/bin/sh") (which "sh")))
1284 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1285 (("/bin/sh") (which "sh")))
1286 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1287 (("/usr/bin/perl") (which "perl"))
1288 (("/bin/ps") (which "ps"))
1289 (("/bin/true") (which "true")))
1290 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1291 (("/usr/bin/tee") (which "tee")))
1292 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1293 (("/bin/true") (which "true")))
1294 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1295 (("/bin/cat") (which "cat")))
1296 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1297 (("/bin/sh") (which "sh"))
1298 (("/bin/true") (which "true"))
1299 (("/bin/kill") (which "kill")))
1300 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1301 (("/usr/bin/echo") (which "echo")))
1302 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1303 (("/usr/bin/cat") (which "cat")))
1304 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1305 (("/bin/cat") (which "cat"))
1306 (("/bin/sleep") (which "sleep"))
1307 (("/bin/sh") (which "sh")))
1308 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1309 (("/bin/cat") (which "cat")))
1310 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1311 (("/bin/chmod") (which "chmod")))
1312 (substitute* "java/util/zip/ZipFile/Assortment.java"
1313 (("/bin/sh") (which "sh"))))
1314 #t))
1315 (replace 'check
1316 (lambda _
1317 ;; The "make check-*" targets always return zero, so we need to
1318 ;; check for errors in the associated log files to determine
1319 ;; whether any tests have failed.
1320 (use-modules (ice-9 rdelim))
1321 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1322 (checker (lambda (port)
1323 (let loop ()
1324 (let ((line (read-line port)))
1325 (cond
1326 ((eof-object? line) #t)
1327 ((regexp-exec error-pattern line)
1328 (error "test failed"))
1329 (else (loop)))))))
1330 (run-test (lambda (test)
1331 (invoke "make" test)
1332 (call-with-input-file
1333 (string-append "test/" test ".log")
1334 checker))))
1335 (when #f ; skip tests
1336 (run-test "check-hotspot")
1337 (run-test "check-langtools")
1338 (run-test "check-jdk"))
1339 #t)))
1340 (replace 'install
1341 (lambda* (#:key outputs #:allow-other-keys)
1342 (let ((doc (string-append (assoc-ref outputs "doc")
1343 "/share/doc/icedtea"))
1344 (jre (assoc-ref outputs "out"))
1345 (jdk (assoc-ref outputs "jdk")))
1346 (copy-recursively "openjdk.build/docs" doc)
1347 (copy-recursively "openjdk.build/j2re-image" jre)
1348 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1349 #t))
1350 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1351 ;; But that shared object is located in the server/ folder, so it
1352 ;; cannot be found. This phase creates a symbolic link in the
1353 ;; lib/amd64 folder so that the other libraries can find it.
1354 ;;
1355 ;; See:
1356 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1357 ;;
1358 ;; FIXME: Find the bug in the build system, so that this symlink is
1359 ;; not needed.
1360 (add-after 'install 'install-libjvm
1361 (lambda* (#:key inputs outputs #:allow-other-keys)
1362 (let* ((lib-path (string-append (assoc-ref outputs "out")
1363 "/lib/amd64")))
1364 (symlink (string-append lib-path "/server/libjvm.so")
1365 (string-append lib-path "/libjvm.so")))
1366 #t))
1367 ;; By default IcedTea only generates an empty keystore. In order to
1368 ;; be able to use certificates in Java programs we need to generate a
1369 ;; keystore from a set of certificates. For convenience we use the
1370 ;; certificates from the nss-certs package.
1371 (add-after 'install 'install-keystore
1372 (lambda* (#:key inputs outputs #:allow-other-keys)
1373 (let* ((keystore "cacerts")
1374 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1375 "/etc/ssl/certs"))
1376 (keytool (string-append (assoc-ref outputs "jdk")
1377 "/bin/keytool")))
1378 (define (extract-cert file target)
1379 (call-with-input-file file
1380 (lambda (in)
1381 (call-with-output-file target
1382 (lambda (out)
1383 (let loop ((line (read-line in 'concat))
1384 (copying? #f))
1385 (cond
1386 ((eof-object? line) #t)
1387 ((string-prefix? "-----BEGIN" line)
1388 (display line out)
1389 (loop (read-line in 'concat) #t))
1390 ((string-prefix? "-----END" line)
1391 (display line out)
1392 #t)
1393 (else
1394 (when copying? (display line out))
1395 (loop (read-line in 'concat) copying?)))))))))
1396 (define (import-cert cert)
1397 (format #t "Importing certificate ~a\n" (basename cert))
1398 (let ((temp "tmpcert"))
1399 (extract-cert cert temp)
1400 (let ((port (open-pipe* OPEN_WRITE keytool
1401 "-import"
1402 "-alias" (basename cert)
1403 "-keystore" keystore
1404 "-storepass" "changeit"
1405 "-file" temp)))
1406 (display "yes\n" port)
1407 (when (not (zero? (status:exit-val (close-pipe port))))
1408 (format #t "failed to import ~a\n" cert)))
1409 (delete-file temp)))
1410
1411 ;; This is necessary because the certificate directory contains
1412 ;; files with non-ASCII characters in their names.
1413 (setlocale LC_ALL "en_US.utf8")
1414 (setenv "LC_ALL" "en_US.utf8")
1415
1416 (for-each import-cert (find-files certs-dir "\\.pem$"))
1417 (mkdir-p (string-append (assoc-ref outputs "out")
1418 "/lib/security"))
1419 (mkdir-p (string-append (assoc-ref outputs "jdk")
1420 "/jre/lib/security"))
1421
1422 ;; The cacerts files we are going to overwrite are chmod'ed as
1423 ;; read-only (444) in icedtea-8 (which derives from this
1424 ;; package). We have to change this so we can overwrite them.
1425 (chmod (string-append (assoc-ref outputs "out")
1426 "/lib/security/" keystore) #o644)
1427 (chmod (string-append (assoc-ref outputs "jdk")
1428 "/jre/lib/security/" keystore) #o644)
1429
1430 (install-file keystore
1431 (string-append (assoc-ref outputs "out")
1432 "/lib/security"))
1433 (install-file keystore
1434 (string-append (assoc-ref outputs "jdk")
1435 "/jre/lib/security"))
1436 #t))))))
1437 (native-inputs
1438 `(("openjdk-src"
1439 ,(drop "openjdk"
1440 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1441 ("corba-drop"
1442 ,(drop "corba"
1443 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1444 ("jaxp-drop"
1445 ,(drop "jaxp"
1446 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1447 ("jaxws-drop"
1448 ,(drop "jaxws"
1449 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1450 ("jdk-drop"
1451 ,(drop "jdk"
1452 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1453 ("langtools-drop"
1454 ,(drop "langtools"
1455 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1456 ("hotspot-drop"
1457 ,(origin
1458 (method url-fetch)
1459 (uri (string-append
1460 "http://icedtea.classpath.org/downloads/drops"
1461 "/icedtea7/" version "/hotspot.tar.bz2"))
1462 (sha256
1463 (base32
1464 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1465 (patches (search-patches
1466 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1467 ("ant" ,ant-bootstrap)
1468 ("attr" ,attr)
1469 ("coreutils" ,coreutils)
1470 ("diffutils" ,diffutils) ;for tests
1471 ("gawk" ,gawk)
1472 ("grep" ,grep)
1473 ("libtool" ,libtool)
1474 ("pkg-config" ,pkg-config)
1475 ("wget" ,wget)
1476 ("which" ,which)
1477 ("cpio" ,cpio)
1478 ("zip" ,zip)
1479 ("unzip" ,unzip)
1480 ("fastjar" ,fastjar)
1481 ("libxslt" ,libxslt) ;for xsltproc
1482 ("nss-certs" ,nss-certs)
1483 ("perl" ,perl)
1484 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1485 ("jdk" ,icedtea-6 "jdk")))
1486 (inputs
1487 `(("alsa-lib" ,alsa-lib)
1488 ("cups" ,cups)
1489 ("libx11" ,libx11)
1490 ("libxcomposite" ,libxcomposite)
1491 ("libxt" ,libxt)
1492 ("libxtst" ,libxtst)
1493 ("libxi" ,libxi)
1494 ("libxinerama" ,libxinerama)
1495 ("libxrender" ,libxrender)
1496 ("libjpeg" ,libjpeg)
1497 ("libpng" ,libpng)
1498 ("mit-krb5" ,mit-krb5)
1499 ("nss" ,nss)
1500 ("giflib" ,giflib)
1501 ("fontconfig" ,fontconfig)
1502 ("freetype" ,freetype)
1503 ("lcms" ,lcms)
1504 ("zlib" ,zlib)
1505 ("gtk" ,gtk+-2)))
1506 (home-page "http://icedtea.classpath.org")
1507 (synopsis "Java development kit")
1508 (description
1509 "This package provides the Java development kit OpenJDK built with the
1510 IcedTea build harness.")
1511 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1512 ;; same license as both GNU Classpath and OpenJDK.
1513 (license license:gpl2+))))
1514
1515 (define-public icedtea-8
1516 (let* ((version "3.7.0")
1517 (drop (lambda (name hash)
1518 (origin
1519 (method url-fetch)
1520 (uri (string-append
1521 "http://icedtea.classpath.org/download/drops"
1522 "/icedtea8/" version "/" name ".tar.xz"))
1523 (sha256 (base32 hash))))))
1524 (package (inherit icedtea-7)
1525 (version "3.7.0")
1526 (source (origin
1527 (method url-fetch)
1528 (uri (string-append
1529 "http://icedtea.wildebeest.org/download/source/icedtea-"
1530 version ".tar.xz"))
1531 (sha256
1532 (base32
1533 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1534 (modules '((guix build utils)))
1535 (snippet
1536 '(begin
1537 (substitute* '("configure"
1538 "acinclude.m4")
1539 ;; Do not embed build time
1540 (("(DIST_ID=\"Custom build).*$" _ prefix)
1541 (string-append prefix "\"\n"))
1542 ;; Do not leak information about the build host
1543 (("DIST_NAME=\"\\$build_os\"")
1544 "DIST_NAME=\"guix\""))
1545 #t))))
1546 (arguments
1547 `(#:imported-modules
1548 ((guix build ant-build-system)
1549 (guix build syscalls)
1550 ,@%gnu-build-system-modules)
1551 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1552 ((#:modules modules)
1553 `((guix build utils)
1554 (guix build gnu-build-system)
1555 ((guix build ant-build-system) #:prefix ant:)
1556 (ice-9 match)
1557 (ice-9 popen)
1558 (srfi srfi-19)
1559 (srfi srfi-26)))
1560 ((#:configure-flags flags)
1561 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1562 `( ;;"--disable-bootstrap"
1563 "--enable-bootstrap"
1564 "--enable-nss"
1565 "--disable-downloading"
1566 "--disable-system-pcsc"
1567 "--disable-system-sctp"
1568 "--disable-tests" ;they are run in the check phase instead
1569 "--with-openjdk-src-dir=./openjdk.src"
1570 ,(string-append "--with-jdk-home=" jdk))))
1571 ((#:phases phases)
1572 `(modify-phases ,phases
1573 (delete 'fix-x11-extension-include-path)
1574 (delete 'patch-paths)
1575 (delete 'set-additional-paths)
1576 (delete 'patch-patches)
1577 ;; Prevent the keytool from recording the current time when
1578 ;; adding certificates at build time.
1579 (add-after 'unpack 'patch-keystore
1580 (lambda _
1581 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1582 (("date = new Date\\(\\);")
1583 "\
1584 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1585 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1586 new Date();"))
1587 #t))
1588 (add-after 'unpack 'patch-jni-libs
1589 ;; Hardcode dynamically loaded libraries.
1590 (lambda _
1591 (let* ((library-path (search-path-as-string->list
1592 (getenv "LIBRARY_PATH")))
1593 (find-library (lambda (name)
1594 (search-path
1595 library-path
1596 (string-append "lib" name ".so")))))
1597 (for-each
1598 (lambda (file)
1599 (catch 'decoding-error
1600 (lambda ()
1601 (substitute* file
1602 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1603 _ name version)
1604 (format #f "\"~a\"" (find-library name)))
1605 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1606 (format #f "\"~a\"" (find-library name)))))
1607 (lambda _
1608 ;; Those are safe to skip.
1609 (format (current-error-port)
1610 "warning: failed to substitute: ~a~%"
1611 file))))
1612 (find-files "openjdk.src/jdk/src/solaris/native"
1613 "\\.c|\\.h"))
1614 #t)))
1615 (replace 'install
1616 (lambda* (#:key outputs #:allow-other-keys)
1617 (let ((doc (string-append (assoc-ref outputs "doc")
1618 "/share/doc/icedtea"))
1619 (jre (assoc-ref outputs "out"))
1620 (jdk (assoc-ref outputs "jdk")))
1621 (copy-recursively "openjdk.build/docs" doc)
1622 (copy-recursively "openjdk.build/images/j2re-image" jre)
1623 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1624 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1625 ;; support via NSS.
1626 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1627 (string-append jre "/lib/security/nss.cfg"))
1628 #t)))
1629 (add-after 'install 'strip-jar-timestamps
1630 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1631 (native-inputs
1632 `(("jdk" ,icedtea-7 "jdk")
1633 ("openjdk-src"
1634 ,(drop "openjdk"
1635 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1636 ("aarch32-drop"
1637 ,(drop "aarch32"
1638 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1639 ("corba-drop"
1640 ,(drop "corba"
1641 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1642 ("jaxp-drop"
1643 ,(drop "jaxp"
1644 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1645 ("jaxws-drop"
1646 ,(drop "jaxws"
1647 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1648 ("jdk-drop"
1649 ,(drop "jdk"
1650 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1651 ("langtools-drop"
1652 ,(drop "langtools"
1653 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1654 ("hotspot-drop"
1655 ,(origin
1656 (method url-fetch)
1657 (uri (string-append
1658 "http://icedtea.classpath.org/download/drops"
1659 "/icedtea8/" version "/hotspot.tar.xz"))
1660 (sha256
1661 (base32
1662 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1663 (patches (search-patches
1664 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1665 ("nashorn-drop"
1666 ,(drop "nashorn"
1667 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1668 ("shenandoah-drop"
1669 ,(drop "shenandoah"
1670 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1671 ,@(fold alist-delete (package-native-inputs icedtea-7)
1672 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1673 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1674
1675 (define-public icedtea icedtea-7)
1676
1677 \f
1678 (define-public ant/java8
1679 (package (inherit ant-bootstrap)
1680 (name "ant")
1681 (version "1.10.1")
1682 (source (origin
1683 (method url-fetch)
1684 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1685 version "-src.tar.gz"))
1686 (sha256
1687 (base32
1688 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1689 (modules '((guix build utils)))
1690 (snippet
1691 '(begin
1692 (for-each delete-file
1693 (find-files "lib/optional" "\\.jar$"))
1694 #t))))
1695 (arguments
1696 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1697 ((#:phases phases)
1698 `(modify-phases ,phases
1699 (add-after 'unpack 'remove-scripts
1700 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1701 ;; wrappers.
1702 (lambda _
1703 (for-each delete-file
1704 (find-files "src/script"
1705 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1706 #t))
1707 (replace 'build
1708 (lambda* (#:key inputs outputs #:allow-other-keys)
1709 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1710
1711 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1712 ;; Ant to build. This is necessary in addition to disabling the
1713 ;; "check" phase, because the dependency on "test-jar" would always
1714 ;; result in the tests to be run.
1715 (substitute* "build.xml"
1716 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1717 (invoke "bash" "bootstrap.sh"
1718 (string-append "-Ddist.dir="
1719 (assoc-ref outputs "out")))))))))
1720 (native-inputs
1721 `(("jdk" ,icedtea-8 "jdk")
1722 ("zip" ,zip)
1723 ("unzip" ,unzip)))))
1724
1725 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1726 ;; requires Java 8.
1727 (define-public ant
1728 (package (inherit ant/java8)
1729 (version "1.9.9")
1730 (source (origin
1731 (method url-fetch)
1732 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1733 version "-src.tar.gz"))
1734 (sha256
1735 (base32
1736 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1737 (native-inputs
1738 `(("jdk" ,icedtea-7 "jdk")
1739 ("zip" ,zip)
1740 ("unzip" ,unzip)))))
1741
1742 (define-public ant-apache-bcel
1743 (package
1744 (inherit ant/java8)
1745 (name "ant-apache-bcel")
1746 (arguments
1747 (substitute-keyword-arguments (package-arguments ant/java8)
1748 ((#:phases phases)
1749 `(modify-phases ,phases
1750 (add-after 'unpack 'link-bcel
1751 (lambda* (#:key inputs #:allow-other-keys)
1752 (for-each (lambda (file)
1753 (symlink file
1754 (string-append "lib/optional/"
1755 (basename file))))
1756 (find-files (assoc-ref inputs "java-commons-bcel")
1757 "\\.jar$"))
1758 #t))
1759 (add-after 'build 'install
1760 (lambda* (#:key outputs #:allow-other-keys)
1761 (let* ((out (assoc-ref outputs "out"))
1762 (share (string-append out "/share/java"))
1763 (bin (string-append out "/bin"))
1764 (lib (string-append out "/lib")))
1765 (mkdir-p share)
1766 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1767 (delete-file-recursively bin)
1768 (delete-file-recursively lib)
1769 #t)))))))
1770 (inputs
1771 `(("java-commons-bcel" ,java-commons-bcel)
1772 ,@(package-inputs ant/java8)))))
1773
1774 (define-public ant-junit
1775 (package
1776 (inherit ant/java8)
1777 (name "ant-junit")
1778 (arguments
1779 (substitute-keyword-arguments (package-arguments ant/java8)
1780 ((#:phases phases)
1781 `(modify-phases ,phases
1782 (add-after 'unpack 'link-junit
1783 (lambda* (#:key inputs #:allow-other-keys)
1784 (for-each (lambda (file)
1785 (symlink file
1786 (string-append "lib/optional/"
1787 (basename file))))
1788 (find-files (assoc-ref inputs "java-junit")
1789 "\\.jar$"))
1790 #t))
1791 (add-after 'build 'install
1792 (lambda* (#:key outputs #:allow-other-keys)
1793 (let* ((out (assoc-ref outputs "out"))
1794 (share (string-append out "/share/java"))
1795 (bin (string-append out "/bin"))
1796 (lib (string-append out "/lib")))
1797 (mkdir-p share)
1798 (install-file (string-append lib "/ant-junit.jar") share)
1799 (delete-file-recursively bin)
1800 (delete-file-recursively lib)
1801 #t)))))))
1802 (inputs
1803 `(("java-junit" ,java-junit)
1804 ,@(package-inputs ant/java8)))))
1805
1806 (define-public clojure
1807 (let* ((remove-archives '(begin
1808 (for-each delete-file
1809 (find-files "." ".*\\.(jar|zip)"))
1810 #t))
1811 (submodule (lambda (prefix version hash)
1812 (origin
1813 (method url-fetch)
1814 (uri (string-append "https://github.com/clojure/"
1815 prefix version ".tar.gz"))
1816 (sha256 (base32 hash))
1817 (modules '((guix build utils)))
1818 (snippet remove-archives)))))
1819 (package
1820 (name "clojure")
1821 (version "1.9.0")
1822 (source
1823 (origin
1824 (method url-fetch)
1825 (uri
1826 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1827 version ".tar.gz"))
1828 (sha256
1829 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1830 (modules '((guix build utils)))
1831 (snippet remove-archives)))
1832 (build-system ant-build-system)
1833 (arguments
1834 `(#:modules ((guix build ant-build-system)
1835 (guix build utils)
1836 (ice-9 ftw)
1837 (ice-9 regex)
1838 (srfi srfi-1)
1839 (srfi srfi-26))
1840 #:test-target "test"
1841 #:phases
1842 (modify-phases %standard-phases
1843 (add-after 'unpack 'unpack-submodule-sources
1844 (lambda* (#:key inputs #:allow-other-keys)
1845 (for-each
1846 (lambda (name)
1847 (mkdir-p name)
1848 (with-directory-excursion name
1849 (invoke "tar"
1850 ;; Use xz for repacked tarball.
1851 "--xz"
1852 "--extract"
1853 "--verbose"
1854 "--file" (assoc-ref inputs name)
1855 "--strip-components=1"))
1856 (copy-recursively (string-append name "/src/main/clojure/")
1857 "src/clj/"))
1858 '("core-specs-alpha-src"
1859 "data-generators-src"
1860 "spec-alpha-src"
1861 "test-check-src"
1862 "test-generative-src"
1863 "tools-namespace-src"))
1864 #t))
1865 ;; The javadoc target is not built by default.
1866 (add-after 'build 'build-doc
1867 (lambda _
1868 (invoke "ant" "javadoc")))
1869 ;; Needed since no install target is provided.
1870 (replace 'install
1871 (lambda* (#:key outputs #:allow-other-keys)
1872 (let ((java-dir (string-append (assoc-ref outputs "out")
1873 "/share/java/")))
1874 ;; Install versioned to avoid collisions.
1875 (install-file (string-append "clojure-" ,version ".jar")
1876 java-dir)
1877 #t)))
1878 ;; Needed since no install-doc target is provided.
1879 (add-after 'install 'install-doc
1880 (lambda* (#:key outputs #:allow-other-keys)
1881 (let ((doc-dir (string-append (assoc-ref outputs "out")
1882 "/share/doc/clojure-"
1883 ,version "/")))
1884 (copy-recursively "doc/clojure" doc-dir)
1885 (copy-recursively "target/javadoc/"
1886 (string-append doc-dir "javadoc/"))
1887 (for-each (cut install-file <> doc-dir)
1888 (filter (cut string-match
1889 ".*\\.(html|markdown|md|txt)"
1890 <>)
1891 (scandir "./")))
1892 #t))))))
1893 ;; The native-inputs below are needed to run the tests.
1894 (native-inputs
1895 `(("core-specs-alpha-src"
1896 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1897 "0.1.24"
1898 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1899 ("data-generators-src"
1900 ,(submodule "data.generators/archive/data.generators-"
1901 "0.1.2"
1902 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1903 ("spec-alpha-src"
1904 ,(submodule "spec.alpha/archive/spec.alpha-"
1905 "0.1.143"
1906 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1907 ("test-check-src"
1908 ,(submodule "test.check/archive/test.check-"
1909 "0.9.0"
1910 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1911 ("test-generative-src"
1912 ,(submodule "test.generative/archive/test.generative-"
1913 "0.5.2"
1914 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1915 ("tools-namespace-src"
1916 ,(submodule "tools.namespace/archive/tools.namespace-"
1917 "0.2.11"
1918 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1919 (home-page "https://clojure.org/")
1920 (synopsis "Lisp dialect running on the JVM")
1921 (description "Clojure is a dynamic, general-purpose programming language,
1922 combining the approachability and interactive development of a scripting
1923 language with an efficient and robust infrastructure for multithreaded
1924 programming. Clojure is a compiled language, yet remains completely dynamic
1925 – every feature supported by Clojure is supported at runtime. Clojure
1926 provides easy access to the Java frameworks, with optional type hints and type
1927 inference, to ensure that calls to Java can avoid reflection.
1928
1929 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1930 and a powerful macro system. Clojure is predominantly a functional programming
1931 language, and features a rich set of immutable, persistent data structures.
1932 When mutable state is needed, Clojure offers a software transactional memory
1933 system and reactive Agent system that ensure clean, correct, multithreaded
1934 designs.")
1935 ;; Clojure is licensed under EPL1.0
1936 ;; ASM bytecode manipulation library is licensed under BSD-3
1937 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1938 ;; src/clj/repl.clj is licensed under CPL1.0
1939 ;;
1940 ;; See readme.html or readme.txt for details.
1941 (license (list license:epl1.0
1942 license:bsd-3
1943 license:asl2.0
1944 license:cpl1.0)))))
1945
1946 (define-public javacc
1947 (package
1948 (name "javacc")
1949 (version "7.0.3")
1950 (source (origin
1951 (method url-fetch)
1952 (uri (string-append "https://github.com/javacc/javacc/"
1953 "archive/" version ".tar.gz"))
1954 (file-name (string-append "javacc-" version ".tar.gz"))
1955 (sha256
1956 (base32
1957 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1958 (build-system ant-build-system)
1959 (arguments
1960 `(#:test-target "test"
1961 #:phases
1962 (modify-phases %standard-phases
1963 (add-after 'unpack 'delete-bundled-libs
1964 (lambda _
1965 (delete-file-recursively "lib") #t))
1966 (replace 'install (install-jars "target")))))
1967 (home-page "https://javacc.org/")
1968 (synopsis "Java parser generator")
1969 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1970 generator for use with Java applications. A parser generator is a tool that
1971 reads a grammar specification and converts it to a Java program that can
1972 recognize matches to the grammar. In addition to the parser generator itself,
1973 JavaCC provides other standard capabilities related to parser generation such
1974 as tree building (via a tool called JJTree included with JavaCC), actions,
1975 debugging, etc.")
1976 (license license:bsd-3)))
1977
1978 (define-public javacc-4
1979 (package (inherit javacc)
1980 (version "4.1")
1981 (source (origin
1982 (method git-fetch)
1983 (uri (git-reference
1984 (url "https://github.com/javacc/javacc.git")
1985 (commit "release_41")))
1986 (file-name (string-append "javacc-" version "-checkout"))
1987 (sha256
1988 (base32
1989 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
1990 ;; Tests fail with
1991 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
1992 ;; JAVACODE failed
1993 (arguments
1994 `(#:tests? #f
1995 #:phases
1996 (modify-phases %standard-phases
1997 (add-after 'unpack 'delete-bundled-libs
1998 (lambda _
1999 (delete-file-recursively "lib") #t))
2000 (replace 'install (install-jars "bin/lib")))))))
2001
2002 ;; This is the last 3.x release of ECJ
2003 (define-public java-ecj-3
2004 (package
2005 (name "java-ecj")
2006 (version "3.8.2")
2007 (source (origin
2008 (method url-fetch)
2009 (uri (string-append "http://archive.eclipse.org/eclipse/"
2010 "downloads/drops/R-" version
2011 "-201301310800/ecjsrc-" version ".jar"))
2012 (sha256
2013 (base32
2014 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2015 (build-system ant-build-system)
2016 (arguments
2017 `(#:tests? #f ; none included
2018 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2019 #:make-flags (list "-f" "src/build.xml")
2020 #:build-target "build"
2021 #:phases
2022 (modify-phases %standard-phases
2023 (add-after 'unpack 'fix-manifest
2024 (lambda _
2025 ;; Record the main class to make ecj executable.
2026 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2027 (lambda (in out)
2028 (display "Manifest-Version: 1.0
2029 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2030 out)))
2031 #t))
2032 (replace 'install (install-jars ".")))))
2033 (home-page "https://eclipse.org")
2034 (synopsis "Eclipse Java development tools core batch compiler")
2035 (description "This package provides the Eclipse Java core batch compiler.")
2036 (license license:epl1.0)))
2037
2038 ;; This is needed for java-cisd-args4j
2039 (define-public java-ecj-3.5
2040 (package (inherit java-ecj-3)
2041 (version "3.5.1")
2042 (source (origin
2043 (method url-fetch/zipbomb)
2044 (uri (string-append "http://archive.eclipse.org/eclipse/"
2045 "downloads/drops/R-" version
2046 "-200909170800/ecjsrc-" version ".zip"))
2047 (sha256
2048 (base32
2049 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2050 (build-system ant-build-system)
2051 (arguments
2052 `(#:tests? #f ; none included
2053 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2054 #:build-target "build"
2055 #:phases
2056 (modify-phases %standard-phases
2057 (add-after 'unpack 'fix-manifest
2058 (lambda _
2059 ;; Record the main class to make ecj executable.
2060 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2061 (lambda (in out)
2062 (dump-port in out)
2063 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2064 out)))
2065 #t))
2066 (replace 'install (install-jars ".")))))
2067 (native-inputs
2068 `(("unzip" ,unzip)))))
2069
2070 (define-public java-cisd-base
2071 (let ((revision 38938)
2072 (base-version "14.12.0"))
2073 (package
2074 (name "java-cisd-base")
2075 (version (string-append base-version "-" (number->string revision)))
2076 (source (origin
2077 (method svn-fetch)
2078 (uri (svn-reference
2079 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2080 "base/tags/release/"
2081 (version-major+minor base-version)
2082 ".x/" base-version "/base/"))
2083 (revision revision)))
2084 (file-name (string-append "java-cisd-base-" version "-checkout"))
2085 (sha256
2086 (base32
2087 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2088 (modules '((guix build utils)))
2089 (snippet
2090 '(begin
2091 ;; Delete included gradle jar
2092 (delete-file-recursively "gradle/wrapper")
2093 ;; Delete pre-built native libraries
2094 (delete-file-recursively "libs")
2095 #t))))
2096 (build-system ant-build-system)
2097 (arguments
2098 `(#:make-flags '("-file" "build/build.xml")
2099 #:test-target "jar-test"
2100 #:jdk ,icedtea-8
2101 #:phases
2102 (modify-phases %standard-phases
2103 (add-after 'unpack 'unpack-build-resources
2104 (lambda* (#:key inputs #:allow-other-keys)
2105 (copy-recursively (assoc-ref inputs "build-resources")
2106 "../build_resources")
2107 #t))
2108 (add-after 'unpack-build-resources 'fix-dependencies
2109 (lambda* (#:key inputs #:allow-other-keys)
2110 (substitute* "build/build.xml"
2111 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2112 (string-append (assoc-ref inputs "java-testng")
2113 "/share/java/java-testng.jar"))
2114 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2115 (string-append (assoc-ref inputs "java-commons-lang")
2116 "/share/java/commons-lang-"
2117 ,(package-version java-commons-lang) ".jar"))
2118 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2119 (string-append (assoc-ref inputs "java-commons-io")
2120 "/share/java/commons-io-"
2121 ,(package-version java-commons-io)
2122 "-SNAPSHOT.jar"))
2123 ;; Remove dependency on svn
2124 (("<build-info.*") "")
2125 (("\\$\\{revision.number\\}")
2126 ,(number->string revision))
2127 (("\\$\\{version.number\\}") ,base-version))
2128 ;; Remove dependency on classycle
2129 (substitute* "../build_resources/ant/build-common.xml"
2130 (("<taskdef name=\"dependency-checker.*") "")
2131 (("classname=\"classycle.*") "")
2132 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2133 #t))
2134 ;; A few tests fail because of the lack of a proper /etc/groups and
2135 ;; /etc/passwd file in the build container.
2136 (add-after 'unpack 'disable-broken-tests
2137 (lambda _
2138 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2139 (("Unix.isOperational\\(\\)") "false"))
2140 #t))
2141 ;; These decorators are almost useless and pull in an unpackaged
2142 ;; dependency.
2143 (add-after 'unpack 'remove-useless-decorators
2144 (lambda _
2145 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2146 (("@Private") "")
2147 (("import ch.rinn.restrictions.Private;") ""))
2148 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2149 (("@Friend.*") "")
2150 (("import ch.rinn.restrictions.Friend;") ""))
2151 #t))
2152 (add-before 'configure 'build-native-code
2153 (lambda* (#:key inputs #:allow-other-keys)
2154 (let ((jdk (assoc-ref inputs "jdk"))
2155 (dir ,(match (%current-system)
2156 ("i686-linux"
2157 "i386-Linux")
2158 ((or "armhf-linux" "aarch64-linux")
2159 "arm-Linux")
2160 ((or "x86_64-linux")
2161 "amd64-Linux")
2162 (_ "unknown-Linux"))))
2163 (with-directory-excursion "source/c"
2164 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2165 (string-append "-I" jdk "/include")
2166 (string-append "-I" jdk "/include/linux")
2167 "-o" "libunix.so")
2168 (invoke "gcc" "-shared" "-O3" "-fPIC"
2169 "-DMACHINE_BYTE_ORDER=1"
2170 "copyCommon.c"
2171 "copyByteChar.c"
2172 "copyByteDouble.c"
2173 "copyByteFloat.c"
2174 "copyByteInt.c"
2175 "copyByteLong.c"
2176 "copyByteShort.c"
2177 (string-append "-I" jdk "/include")
2178 (string-append "-I" jdk "/include/linux")
2179 "-o" "libnativedata.so"))
2180 (install-file "source/c/libunix.so"
2181 (string-append "libs/native/unix/" dir))
2182 (install-file "source/c/libnativedata.so"
2183 (string-append "libs/native/nativedata/" dir))
2184 #t)))
2185 ;; In the "check" phase we only build the test executable.
2186 (add-after 'check 'run-tests
2187 (lambda _
2188 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2189 (delete-file "targets/dist/sis-base-test.jar")
2190 #t))
2191 (replace 'install (install-jars "targets/dist")))))
2192 (native-inputs
2193 `(("jdk" ,icedtea-8)
2194 ("java-commons-lang" ,java-commons-lang)
2195 ("java-commons-io" ,java-commons-io)
2196 ("java-testng" ,java-testng)
2197 ("build-resources"
2198 ,(origin
2199 (method svn-fetch)
2200 (uri (svn-reference
2201 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2202 "base/tags/release/"
2203 (version-major+minor base-version)
2204 ".x/" base-version
2205 "/build_resources/"))
2206 (revision revision)))
2207 (sha256
2208 (base32
2209 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2210 (home-page "http://svnsis.ethz.ch")
2211 (synopsis "Utility classes for libraries from ETH Zurich")
2212 (description "This library supplies some utility classes needed for
2213 libraries from the SIS division at ETH Zurich like jHDF5.")
2214 ;; The C sources are under a non-copyleft license, which looks like a
2215 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2216 (license (list license:asl2.0
2217 (license:non-copyleft "file://source/c/COPYING"))))))
2218
2219 (define-public java-cisd-args4j
2220 (let ((revision 39162)
2221 (base-version "9.11.2"))
2222 (package
2223 (name "java-cisd-args4j")
2224 (version (string-append base-version "-" (number->string revision)))
2225 (source (origin
2226 (method svn-fetch)
2227 (uri (svn-reference
2228 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2229 "args4j/tags/release/"
2230 (version-major+minor base-version)
2231 ".x/" base-version "/args4j/"))
2232 (revision revision)))
2233 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2234 (sha256
2235 (base32
2236 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2237 (build-system ant-build-system)
2238 (arguments
2239 `(#:make-flags '("-file" "build/build.xml")
2240 #:tests? #f ; there are no tests
2241 ;; There are weird build failures with JDK8, such as: "The type
2242 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2243 ;; referenced from required .class files"
2244 #:jdk ,icedtea-7
2245 #:modules ((guix build ant-build-system)
2246 (guix build utils)
2247 (guix build java-utils)
2248 (sxml simple)
2249 (sxml transform)
2250 (sxml xpath))
2251 #:phases
2252 (modify-phases %standard-phases
2253 (add-after 'unpack 'unpack-build-resources
2254 (lambda* (#:key inputs #:allow-other-keys)
2255 (mkdir-p "../build_resources")
2256 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2257 "-C" "../build_resources"
2258 "--strip-components=1")
2259 (mkdir-p "../build_resources/lib")
2260 #t))
2261 (add-after 'unpack-build-resources 'fix-dependencies
2262 (lambda* (#:key inputs #:allow-other-keys)
2263 ;; FIXME: There should be a more convenient abstraction for
2264 ;; editing XML files.
2265 (with-directory-excursion "../build_resources/ant/"
2266 (chmod "build-common.xml" #o664)
2267 (call-with-output-file "build-common.xml.new"
2268 (lambda (port)
2269 (sxml->xml
2270 (pre-post-order
2271 (with-input-from-file "build-common.xml"
2272 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2273 `(;; Remove dependency on classycle and custom ant tasks
2274 (taskdef . ,(lambda (tag . kids)
2275 (let ((name ((sxpath '(name *text*)) kids)))
2276 (if (or (member "build-info" name)
2277 (member "dependency-checker" name)
2278 (member "build-java-subprojects" name)
2279 (member "project-classpath" name))
2280 '() ; skip
2281 `(,tag ,@kids)))))
2282 (typedef . ,(lambda (tag . kids)
2283 (let ((name ((sxpath '(name *text*)) kids)))
2284 (if (member "recursive-jar" name)
2285 '() ; skip
2286 `(,tag ,@kids)))))
2287 (build-java-subprojects . ,(lambda _ '()))
2288 ;; Ignore everything else
2289 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2290 (*text* . ,(lambda (_ txt) txt))))
2291 port)))
2292 (rename-file "build-common.xml.new" "build-common.xml"))
2293 (substitute* "build/build.xml"
2294 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2295 (string-append (assoc-ref inputs "java-cisd-base")
2296 "/share/java/sis-base.jar"))
2297 ;; Remove dependency on svn
2298 (("<build-info.*") "")
2299 (("\\$\\{revision.number\\}")
2300 ,(number->string revision))
2301 (("\\$\\{version.number\\}") ,base-version)
2302 ;; Don't use custom ant tasks.
2303 (("recursive-jar") "jar")
2304 (("<project-classpath.*") ""))
2305 #t))
2306 (replace 'install (install-jars "targets/dist")))))
2307 (inputs
2308 `(("java-cisd-base" ,java-cisd-base)))
2309 (native-inputs
2310 `(("ecj" ,java-ecj-3.5)
2311 ("build-resources"
2312 ,(origin
2313 (method svn-fetch)
2314 (uri (svn-reference
2315 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2316 "args4j/tags/release/"
2317 (version-major+minor base-version)
2318 ".x/" base-version
2319 "/build_resources/"))
2320 (revision revision)))
2321 (sha256
2322 (base32
2323 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2324 (modules '((guix build utils)))
2325 ;; Delete bundled pre-built jars.
2326 (snippet
2327 '(begin (delete-file-recursively "lib/") #t))))))
2328 (home-page "http://svnsis.ethz.ch")
2329 (synopsis "Command line parser library")
2330 (description "This package provides a parser for command line arguments.")
2331 (license license:asl2.0))))
2332
2333 (define-public java-cisd-jhdf5
2334 (let ((revision 39162)
2335 (base-version "14.12.6"))
2336 (package
2337 (name "java-cisd-jhdf5")
2338 (version (string-append base-version "-" (number->string revision)))
2339 (source (origin
2340 (method svn-fetch)
2341 (uri (svn-reference
2342 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2343 "jhdf5/tags/release/"
2344 (version-major+minor base-version)
2345 ".x/" base-version "/jhdf5/"))
2346 (revision revision)))
2347 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2348 (sha256
2349 (base32
2350 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2351 (modules '((guix build utils)))
2352 (snippet
2353 '(begin
2354 ;; Delete included gradle jar
2355 (delete-file-recursively "gradle/wrapper")
2356 ;; Delete pre-built native libraries
2357 (delete-file-recursively "libs")
2358 #t))))
2359 (build-system ant-build-system)
2360 (arguments
2361 `(#:make-flags '("-file" "build/build.xml")
2362 #:build-target "jar-all"
2363 #:test-target "jar-test"
2364 #:jdk ,icedtea-8
2365 #:phases
2366 (modify-phases %standard-phases
2367 ;; FIXME: this build phase fails.
2368 (delete 'generate-jar-indices)
2369 ;; Don't erase results from the build phase when building tests.
2370 (add-after 'unpack 'separate-test-target-from-clean
2371 (lambda _
2372 (substitute* "build/build.xml"
2373 (("\"jar-test\" depends=\"clean, ")
2374 "\"jar-test\" depends=\""))
2375 #t))
2376 (add-after 'unpack 'unpack-build-resources
2377 (lambda* (#:key inputs #:allow-other-keys)
2378 (copy-recursively (assoc-ref inputs "build-resources")
2379 "../build_resources")
2380 (delete-file-recursively "../build_resources/lib/")
2381 (mkdir-p "../build_resources/lib")
2382 ;; Remove dependency on classycle
2383 (substitute* "../build_resources/ant/build-common.xml"
2384 (("<taskdef name=\"dependency-checker.*") "")
2385 (("classname=\"classycle.*") "")
2386 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2387 ;; Remove dependency on svn
2388 (substitute* "build/build.xml"
2389 (("<build-info.*") "")
2390 (("\\$\\{revision.number\\}")
2391 ,(number->string revision))
2392 (("\\$\\{version.number\\}") ,base-version))
2393 #t))
2394 (add-after 'unpack-build-resources 'fix-dependencies
2395 (lambda* (#:key inputs #:allow-other-keys)
2396 (substitute* "../build_resources/ant/build-common.xml"
2397 (("../libraries/testng/testng-jdk15.jar")
2398 (string-append (assoc-ref inputs "java-testng")
2399 "/share/java/java-testng.jar")))
2400 (substitute* "build/build.xml"
2401 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2402 (string-append (assoc-ref inputs "java-cisd-base")
2403 "/share/java/sis-base.jar"))
2404 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2405 (string-append (assoc-ref inputs "java-cisd-args4j")
2406 "/share/java/cisd-args4j.jar"))
2407 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2408 (string-append (assoc-ref inputs "java-commons-lang")
2409 "/share/java/commons-lang-"
2410 ,(package-version java-commons-lang) ".jar"))
2411 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2412 (string-append (assoc-ref inputs "java-commons-io")
2413 "/share/java/commons-io-"
2414 ,(package-version java-commons-io)
2415 "-SNAPSHOT.jar"))
2416 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2417 (string-append (assoc-ref inputs "java-testng")
2418 "/share/java/java-testng.jar"))
2419 (("\\$\\{lib\\}/junit4/junit.jar")
2420 (string-append (assoc-ref inputs "java-junit")
2421 "/share/java/junit.jar"))
2422 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2423 (string-append (assoc-ref inputs "java-hamcrest-core")
2424 "/share/java/hamcrest-core.jar")))
2425 ;; Remove dependency on ch.rinn.restrictions
2426 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2427 (substitute* '("BitSetConversionUtils.java"
2428 "HDF5Utils.java")
2429 (("import ch.rinn.restrictions.Private;") "")
2430 (("@Private") "")))
2431 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2432 (substitute* '("BitSetConversionTest.java"
2433 "h5ar/HDF5ArchiverTest.java")
2434 (("import ch.rinn.restrictions.Friend;") "")
2435 (("@Friend.*") ""))
2436 ;; Remove leftovers from removing @Friend
2437 (substitute* "h5ar/HDF5ArchiverTest.java"
2438 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2439 "")))
2440 #t))
2441 (add-before 'configure 'build-native-library
2442 (lambda* (#:key inputs #:allow-other-keys)
2443 (let ((jdk (assoc-ref inputs "jdk"))
2444 (hdf5 (assoc-ref inputs "hdf5"))
2445 (dir ,(match (%current-system)
2446 ("i686-linux"
2447 "i386-Linux")
2448 ((or "armhf-linux" "aarch64-linux")
2449 "arm-Linux")
2450 ((or "x86_64-linux")
2451 "amd64-Linux")
2452 (_ "unknown-Linux"))))
2453 (with-directory-excursion "source/c"
2454 (apply invoke `("gcc" "-shared" "-O3"
2455 "-fPIC"
2456 "-Wl,--exclude-libs,ALL"
2457 ,@(find-files "jhdf5" "\\.c$")
2458 ,@(find-files "hdf-java" "\\.c$")
2459 ,(string-append "-I" hdf5 "/include")
2460 ,(string-append "-I" jdk "/include")
2461 ,(string-append "-I" jdk "/include/linux")
2462 ,(string-append hdf5 "/lib/libhdf5.a")
2463 "-o" "libjhdf5.so" "-lz")))
2464 (install-file "source/c/libjhdf5.so"
2465 (string-append "libs/native/jhdf5/" dir))
2466 #t)))
2467 ;; In the "check" phase we only build the test executable.
2468 (add-after 'check 'run-tests
2469 (lambda _
2470 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2471 (delete-file "targets/dist/sis-jhdf5-test.jar")
2472 #t))
2473 (replace 'install
2474 (install-jars "targets/dist")))))
2475 (inputs
2476 `(("java-cisd-base" ,java-cisd-base)
2477 ("java-cisd-args4j" ,java-cisd-args4j)
2478 ("java-commons-lang" ,java-commons-lang)
2479 ("java-commons-io" ,java-commons-io)
2480 ("hdf5" ,hdf5)
2481 ("zlib" ,zlib)))
2482 (native-inputs
2483 `(("jdk" ,icedtea-8)
2484 ("java-testng" ,java-testng)
2485 ("java-junit" ,java-junit)
2486 ("java-jmock" ,java-jmock)
2487 ("java-hamcrest-core" ,java-hamcrest-core)
2488 ("build-resources"
2489 ,(origin
2490 (method svn-fetch)
2491 (uri (svn-reference
2492 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2493 "jhdf5/tags/release/"
2494 (version-major+minor base-version)
2495 ".x/" base-version
2496 "/build_resources/"))
2497 (revision revision)))
2498 (sha256
2499 (base32
2500 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2501 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2502 (synopsis "Java binding for HDF5")
2503 (description "JHDF5 is a high-level API in Java for reading and writing
2504 HDF5 files, building on the libraries provided by the HDF Group.")
2505 ;; The C sources are under a non-copyleft license, which looks like a
2506 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2507 (license (list license:asl2.0
2508 (license:non-copyleft "file://source/c/COPYING"))))))
2509
2510 (define-public java-classpathx-servletapi
2511 (package
2512 (name "java-classpathx-servletapi")
2513 (version "3.0.1")
2514 (source (origin
2515 (method url-fetch)
2516 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2517 "servletapi-" version ".tar.gz"))
2518 (sha256
2519 (base32
2520 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2521 (build-system ant-build-system)
2522 (arguments
2523 `(#:tests? #f ; there is no test target
2524 #:build-target "compile"
2525 #:make-flags
2526 (list "-Dbuild.compiler=javac1.8"
2527 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2528 #:phases
2529 (modify-phases %standard-phases
2530 (replace 'install
2531 (lambda* (#:key make-flags #:allow-other-keys)
2532 (apply invoke `("ant" "dist" ,@make-flags)))))))
2533 (home-page "https://www.gnu.org/software/classpathx/")
2534 (synopsis "Java servlet API implementation")
2535 (description "This is the GNU servlet API distribution, part of the
2536 ClasspathX project. It provides implementations of version 3.0 of the servlet
2537 API and version 2.1 of the Java ServerPages API.")
2538 (license license:gpl3+)))
2539
2540 (define-public java-javaee-servletapi
2541 (package
2542 (name "java-javaee-servletapi")
2543 (version "3.1.0")
2544 (source (origin
2545 (method url-fetch)
2546 (uri (string-append "https://github.com/javaee/servlet-spec/"
2547 "archive/" version ".zip"))
2548 (file-name (string-append name "-" version ".zip"))
2549 (sha256
2550 (base32
2551 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
2552 (build-system ant-build-system)
2553 (arguments
2554 `(#:jar-name "javax-servletapi.jar"
2555 ;; no tests
2556 #:tests? #f
2557 #:source-dir "src/main/java"))
2558 (native-inputs
2559 `(("unzip" ,unzip)))
2560 (home-page "https://javaee.github.io/servlet-spec/")
2561 (synopsis "Java servlet API")
2562 (description "Java Servlet is the foundation web specification in the
2563 Java Enterprise Platform. Developers can build web applications using the
2564 Servlet API to interact with the request/response workflow. This project
2565 provides information on the continued development of the Java Servlet
2566 specification.")
2567 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
2568 ;; Some files are licensed under ASL 2.0.
2569 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
2570
2571 (define-public java-swt
2572 (package
2573 (name "java-swt")
2574 (version "4.7.1a")
2575 (source
2576 ;; The types of many variables and procedures differ in the sources
2577 ;; dependent on whether the target architecture is a 32-bit system or a
2578 ;; 64-bit system. Instead of patching the sources on demand in a build
2579 ;; phase we download either the 32-bit archive (which mostly uses "int"
2580 ;; types) or the 64-bit archive (which mostly uses "long" types).
2581 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2582 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2583 (file32 "x86")
2584 (file64 "x86_64"))
2585 (let-values (((hash file)
2586 (match (or (%current-target-system) (%current-system))
2587 ("x86_64-linux" (values hash64 file64))
2588 (_ (values hash32 file32)))))
2589 (origin
2590 (method url-fetch)
2591 (uri (string-append
2592 "http://download.eclipse.org/eclipse/downloads/drops4/"
2593 "R-" version "-201710090410/swt-" version
2594 "-gtk-linux-" file ".zip"))
2595 (sha256 (base32 hash))))))
2596 (build-system ant-build-system)
2597 (arguments
2598 `(#:jar-name "swt.jar"
2599 #:jdk ,icedtea-8
2600 #:tests? #f ; no "check" target
2601 #:phases
2602 (modify-phases %standard-phases
2603 (replace 'unpack
2604 (lambda* (#:key source #:allow-other-keys)
2605 (mkdir "swt")
2606 (invoke "unzip" source "-d" "swt")
2607 (chdir "swt")
2608 (mkdir "src")
2609 (invoke "unzip" "src.zip" "-d" "src")))
2610 ;; The classpath contains invalid icecat jars. Since we don't need
2611 ;; anything other than the JDK on the classpath, we can simply unset
2612 ;; it.
2613 (add-after 'configure 'unset-classpath
2614 (lambda _ (unsetenv "CLASSPATH") #t))
2615 (add-before 'build 'build-native
2616 (lambda* (#:key inputs outputs #:allow-other-keys)
2617 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2618 ;; Build shared libraries. Users of SWT have to set the system
2619 ;; property swt.library.path to the "lib" directory of this
2620 ;; package output.
2621 (mkdir-p lib)
2622 (setenv "OUTPUT_DIR" lib)
2623 (with-directory-excursion "src"
2624 (invoke "bash" "build.sh")))))
2625 (add-after 'install 'install-native
2626 (lambda* (#:key outputs #:allow-other-keys)
2627 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2628 (for-each (lambda (file)
2629 (install-file file lib))
2630 (find-files "." "\\.so$"))
2631 #t))))))
2632 (inputs
2633 `(("gtk" ,gtk+-2)
2634 ("libxtst" ,libxtst)
2635 ("libxt" ,libxt)
2636 ("mesa" ,mesa)
2637 ("glu" ,glu)))
2638 (native-inputs
2639 `(("pkg-config" ,pkg-config)
2640 ("unzip" ,unzip)))
2641 (home-page "https://www.eclipse.org/swt/")
2642 (synopsis "Widget toolkit for Java")
2643 (description
2644 "SWT is a widget toolkit for Java designed to provide efficient, portable
2645 access to the user-interface facilities of the operating systems on which it
2646 is implemented.")
2647 ;; SWT code is licensed under EPL1.0
2648 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2649 ;; Cairo bindings contain code under MPL1.1
2650 ;; XULRunner 1.9 bindings contain code under MPL2.0
2651 (license (list
2652 license:epl1.0
2653 license:mpl1.1
2654 license:mpl2.0
2655 license:lgpl2.1+))))
2656
2657 (define-public java-xz
2658 (package
2659 (name "java-xz")
2660 (version "1.6")
2661 (source (origin
2662 (method url-fetch)
2663 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2664 (sha256
2665 (base32
2666 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2667 (build-system ant-build-system)
2668 (arguments
2669 `(#:tests? #f ; There are no tests to run.
2670 #:jar-name ,(string-append "xz-" version ".jar")
2671 #:phases
2672 (modify-phases %standard-phases
2673 ;; The unpack phase enters the "maven" directory by accident.
2674 (add-after 'unpack 'chdir
2675 (lambda _ (chdir "..") #t)))))
2676 (native-inputs
2677 `(("unzip" ,unzip)))
2678 (home-page "https://tukaani.org/xz/java.html")
2679 (synopsis "Implementation of XZ data compression in pure Java")
2680 (description "This library aims to be a complete implementation of XZ data
2681 compression in pure Java. Single-threaded streamed compression and
2682 decompression and random access decompression have been fully implemented.")
2683 (license license:public-domain)))
2684
2685 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2686 ;; of the latest release.
2687 (define-public java-qdox-1.12
2688 (package
2689 (name "java-qdox")
2690 (version "1.12.1")
2691 (source (origin
2692 (method url-fetch)
2693 (uri (string-append "http://central.maven.org/maven2/"
2694 "com/thoughtworks/qdox/qdox/" version
2695 "/qdox-" version "-sources.jar"))
2696 (sha256
2697 (base32
2698 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2699 (build-system ant-build-system)
2700 (arguments
2701 `(;; Tests require junit
2702 #:tests? #f
2703 #:jar-name "qdox.jar"
2704 #:phases
2705 (modify-phases %standard-phases
2706 (replace 'unpack
2707 (lambda* (#:key source #:allow-other-keys)
2708 (mkdir "src")
2709 (with-directory-excursion "src"
2710 (invoke "jar" "-xf" source))))
2711 ;; At this point we don't have junit, so we must remove the API
2712 ;; tests.
2713 (add-after 'unpack 'delete-tests
2714 (lambda _
2715 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2716 #t)))))
2717 (home-page "http://qdox.codehaus.org/")
2718 (synopsis "Parse definitions from Java source files")
2719 (description
2720 "QDox is a high speed, small footprint parser for extracting
2721 class/interface/method definitions from source files complete with JavaDoc
2722 @code{@@tags}. It is designed to be used by active code generators or
2723 documentation tools.")
2724 (license license:asl2.0)))
2725
2726 (define-public java-jarjar
2727 (package
2728 (name "java-jarjar")
2729 (version "1.4")
2730 (source (origin
2731 (method url-fetch)
2732 (uri (string-append
2733 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2734 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2735 (sha256
2736 (base32
2737 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
2738 (modules '((guix build utils)))
2739 (snippet
2740 '(begin
2741 ;; Delete bundled thirds-party jar archives.
2742 ;; TODO: unbundle maven-plugin-api.
2743 (delete-file "lib/asm-4.0.jar")
2744 (delete-file "lib/asm-commons-4.0.jar")
2745 (delete-file "lib/junit-4.8.1.jar")
2746 #t))))
2747 (build-system ant-build-system)
2748 (arguments
2749 `(;; Tests require junit, which ultimately depends on this package.
2750 #:tests? #f
2751 #:build-target "jar"
2752 #:phases
2753 (modify-phases %standard-phases
2754 (add-before 'build 'do-not-use-bundled-asm
2755 (lambda* (#:key inputs #:allow-other-keys)
2756 (substitute* "build.xml"
2757 (("<path id=\"path.build\">")
2758 (string-append "<path id=\"path.build\"><fileset dir=\""
2759 (assoc-ref inputs "java-asm-bootstrap")
2760 "/share/java\" includes=\"**/*.jar\"/>"))
2761 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
2762 (("lib/asm-commons-4.0.jar")
2763 (string-append (assoc-ref inputs "java-asm-bootstrap")
2764 "/share/java/asm-6.0.jar"))
2765 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
2766 (string-append "<include name=\"org/objectweb/asm/"
2767 "commons/Remap*.class\"/>"
2768 "<include name=\"org/objectweb/asm/*.class\"/>"
2769 "<include name=\"org/objectweb/asm/"
2770 "signature/*.class\"/>"
2771 "<include name=\"org/objectweb/asm/"
2772 "commons/SignatureRemapper.class\"/>")))
2773 #t))
2774 (replace 'install
2775 (lambda* (#:key outputs #:allow-other-keys)
2776 (let ((target (string-append (assoc-ref outputs "out")
2777 "/share/java")))
2778 (install-file (string-append "dist/jarjar-" ,version ".jar")
2779 target))
2780 #t)))))
2781 (inputs
2782 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
2783 (native-inputs
2784 `(("unzip" ,unzip)))
2785 (home-page "https://code.google.com/archive/p/jarjar/")
2786 (synopsis "Repackage Java libraries")
2787 (description
2788 "Jar Jar Links is a utility that makes it easy to repackage Java
2789 libraries and embed them into your own distribution. Jar Jar Links includes
2790 an Ant task that extends the built-in @code{jar} task.")
2791 (license license:asl2.0)))
2792
2793 (define-public java-hamcrest-core
2794 (package
2795 (name "java-hamcrest-core")
2796 (version "1.3")
2797 (source (origin
2798 (method url-fetch)
2799 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2800 "archive/hamcrest-java-" version ".tar.gz"))
2801 (sha256
2802 (base32
2803 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2804 (modules '((guix build utils)))
2805 (snippet
2806 '(begin
2807 ;; Delete bundled thirds-party jar archives.
2808 (delete-file-recursively "lib")
2809 #t))))
2810 (build-system ant-build-system)
2811 (arguments
2812 `(#:tests? #f ; Tests require junit
2813 #:modules ((guix build ant-build-system)
2814 (guix build utils)
2815 (srfi srfi-1))
2816 #:make-flags (list (string-append "-Dversion=" ,version))
2817 #:test-target "unit-test"
2818 #:build-target "core"
2819 #:phases
2820 (modify-phases %standard-phases
2821 ;; Disable unit tests, because they require junit, which requires
2822 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2823 ;; attribute from the manifest for reproducibility.
2824 (add-before 'configure 'patch-build.xml
2825 (lambda _
2826 (substitute* "build.xml"
2827 (("unit-test, ") "")
2828 (("\\$\\{build.timestamp\\}") "guix"))
2829 #t))
2830 ;; Java's "getMethods()" returns methods in an unpredictable order.
2831 ;; To make the output of the generated code deterministic we must
2832 ;; sort the array of methods.
2833 (add-after 'unpack 'make-method-order-deterministic
2834 (lambda _
2835 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2836 (("import java\\.util\\.Iterator;" line)
2837 (string-append line "\n"
2838 "import java.util.Arrays; import java.util.Comparator;"))
2839 (("allMethods = cls\\.getMethods\\(\\);" line)
2840 (string-append "_" line
2841 "
2842 private Method[] getSortedMethods() {
2843 Arrays.sort(_allMethods, new Comparator<Method>() {
2844 @Override
2845 public int compare(Method a, Method b) {
2846 return a.toString().compareTo(b.toString());
2847 }
2848 });
2849 return _allMethods;
2850 }
2851
2852 private Method[] allMethods = getSortedMethods();")))
2853 #t))
2854 (add-before 'build 'do-not-use-bundled-qdox
2855 (lambda* (#:key inputs #:allow-other-keys)
2856 (substitute* "build.xml"
2857 (("lib/generator/qdox-1.12.jar")
2858 (string-append (assoc-ref inputs "java-qdox-1.12")
2859 "/share/java/qdox.jar")))
2860 #t))
2861 ;; build.xml searches for .jar files in this directoy, which
2862 ;; we remove from the source archive.
2863 (add-before 'build 'create-dummy-directories
2864 (lambda _
2865 (mkdir-p "lib/integration")
2866 #t))
2867 (replace 'install
2868 (lambda* (#:key outputs #:allow-other-keys)
2869 (let* ((target (string-append (assoc-ref outputs "out")
2870 "/share/java/"))
2871 (version-suffix ,(string-append "-" version ".jar"))
2872 (install-without-version-suffix
2873 (lambda (jar)
2874 (copy-file jar
2875 (string-append target
2876 (basename jar version-suffix)
2877 ".jar")))))
2878 (mkdir-p target)
2879 (for-each
2880 install-without-version-suffix
2881 (find-files "build"
2882 (lambda (name _)
2883 (and (string-suffix? ".jar" name)
2884 (not (string-suffix? "-sources.jar" name)))))))
2885 #t)))))
2886 (native-inputs
2887 `(("java-qdox-1.12" ,java-qdox-1.12)
2888 ("java-jarjar" ,java-jarjar)))
2889 (home-page "http://hamcrest.org/")
2890 (synopsis "Library of matchers for building test expressions")
2891 (description
2892 "This package provides a library of matcher objects (also known as
2893 constraints or predicates) allowing @code{match} rules to be defined
2894 declaratively, to be used in other frameworks. Typical scenarios include
2895 testing frameworks, mocking libraries and UI validation rules.")
2896 (license license:bsd-2)))
2897
2898 (define-public java-junit
2899 (package
2900 (name "java-junit")
2901 (version "4.12")
2902 (source (origin
2903 (method url-fetch)
2904 (uri (string-append "https://github.com/junit-team/junit/"
2905 "archive/r" version ".tar.gz"))
2906 (file-name (string-append name "-" version ".tar.gz"))
2907 (sha256
2908 (base32
2909 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2910 (modules '((guix build utils)))
2911 (snippet
2912 '(begin
2913 ;; Delete bundled jar archives.
2914 (delete-file-recursively "lib")
2915 #t))))
2916 (build-system ant-build-system)
2917 (arguments
2918 `(#:tests? #f ; no tests
2919 #:jar-name "junit.jar"))
2920 (inputs
2921 `(("java-hamcrest-core" ,java-hamcrest-core)))
2922 (home-page "http://junit.org/")
2923 (synopsis "Test framework for Java")
2924 (description
2925 "JUnit is a simple framework to write repeatable tests for Java projects.
2926 JUnit provides assertions for testing expected results, test fixtures for
2927 sharing common test data, and test runners for running tests.")
2928 (license license:epl1.0)))
2929
2930 (define-public java-plexus-utils
2931 (package
2932 (name "java-plexus-utils")
2933 (version "3.0.24")
2934 (source (origin
2935 (method url-fetch)
2936 (uri (string-append "https://github.com/codehaus-plexus/"
2937 "plexus-utils/archive/plexus-utils-"
2938 version ".tar.gz"))
2939 (sha256
2940 (base32
2941 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2942 (build-system ant-build-system)
2943 ;; FIXME: The default build.xml does not include a target to install
2944 ;; javadoc files.
2945 (arguments
2946 `(#:jar-name "plexus-utils.jar"
2947 #:source-dir "src/main"
2948 #:phases
2949 (modify-phases %standard-phases
2950 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2951 (lambda _
2952 (substitute* "src/main/java/org/codehaus/plexus/util/\
2953 cli/shell/BourneShell.java"
2954 (("/bin/sh") (which "sh"))
2955 (("/usr/") (getcwd)))
2956 #t))
2957 (add-after 'unpack 'fix-or-disable-broken-tests
2958 (lambda _
2959 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2960 (substitute* '("cli/CommandlineTest.java"
2961 "cli/shell/BourneShellTest.java")
2962 (("/bin/sh") (which "sh"))
2963 (("/bin/echo") (which "echo")))
2964
2965 ;; This test depends on MavenProjectStub, but we don't have
2966 ;; a package for Maven.
2967 (delete-file "introspection/ReflectionValueExtractorTest.java")
2968
2969 ;; FIXME: The command line tests fail, maybe because they use
2970 ;; absolute paths.
2971 (delete-file "cli/CommandlineTest.java"))
2972 #t)))))
2973 (native-inputs
2974 `(("java-junit" ,java-junit)))
2975 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2976 (synopsis "Common utilities for the Plexus framework")
2977 (description "This package provides various Java utility classes for the
2978 Plexus framework to ease working with strings, files, command lines, XML and
2979 more.")
2980 (license license:asl2.0)))
2981
2982 (define-public java-plexus-interpolation
2983 (package
2984 (name "java-plexus-interpolation")
2985 (version "1.23")
2986 (source (origin
2987 (method url-fetch)
2988 (uri (string-append "https://github.com/codehaus-plexus/"
2989 "plexus-interpolation/archive/"
2990 "plexus-interpolation-" version ".tar.gz"))
2991 (sha256
2992 (base32
2993 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2994 (build-system ant-build-system)
2995 (arguments
2996 `(#:jar-name "plexus-interpolation.jar"
2997 #:source-dir "src/main"))
2998 (native-inputs
2999 `(("java-junit" ,java-junit)
3000 ("java-hamcrest-core" ,java-hamcrest-core)))
3001 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3002 (synopsis "Java components for interpolating ${} strings and the like")
3003 (description "Plexus interpolator is a modular, flexible interpolation
3004 framework for the expression language style commonly seen in Maven, Plexus,
3005 and other related projects.
3006
3007 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3008 package within @code{plexus-utils}, but has been separated in order to allow
3009 these two libraries to vary independently of one another.")
3010 (license license:asl2.0)))
3011
3012 (define-public java-plexus-classworlds
3013 (package
3014 (name "java-plexus-classworlds")
3015 (version "2.5.2")
3016 (source (origin
3017 (method url-fetch)
3018 (uri (string-append "https://github.com/codehaus-plexus/"
3019 "plexus-classworlds/archive/plexus-classworlds-"
3020 version ".tar.gz"))
3021 (sha256
3022 (base32
3023 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3024 (build-system ant-build-system)
3025 (arguments
3026 `(#:jar-name "plexus-classworlds.jar"
3027 #:source-dir "src/main"
3028 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3029 (native-inputs
3030 `(("java-junit" ,java-junit)))
3031 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3032 (synopsis "Java class loader framework")
3033 (description "Plexus classworlds replaces the native @code{ClassLoader}
3034 mechanism of Java. It is especially useful for dynamic loading of application
3035 components.")
3036 (license license:asl2.0)))
3037
3038 (define java-plexus-container-default-bootstrap
3039 (package
3040 (name "java-plexus-container-default-bootstrap")
3041 (version "1.7.1")
3042 (source (origin
3043 (method url-fetch)
3044 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3045 "/archive/plexus-containers-" version ".tar.gz"))
3046 (sha256
3047 (base32
3048 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3049 (build-system ant-build-system)
3050 (arguments
3051 `(#:jar-name "container-default.jar"
3052 #:source-dir "plexus-container-default/src/main/java"
3053 #:test-dir "plexus-container-default/src/test"
3054 #:jdk ,icedtea-8
3055 #:tests? #f; requires plexus-archiver, which depends on this package
3056 #:phases
3057 (modify-phases %standard-phases
3058 (add-before 'build 'copy-resources
3059 (lambda _
3060 (copy-recursively
3061 "plexus-container-default/src/main/resources/"
3062 "build/classes")
3063 #t)))))
3064 (inputs
3065 `(("worldclass" ,java-plexus-classworlds)
3066 ("xbean" ,java-geronimo-xbean-reflect)
3067 ("utils" ,java-plexus-utils)
3068 ("junit" ,java-junit)
3069 ("guava" ,java-guava)))
3070 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3071 (synopsis "Inversion-of-control container")
3072 (description "Plexus-default-container is Plexus' inversion-of-control
3073 (@dfn{IoC}) container. It is composed of its public API and its default
3074 implementation.")
3075 (license license:asl2.0)))
3076
3077 (define-public java-plexus-io
3078 (package
3079 (name "java-plexus-io")
3080 (version "3.0.0")
3081 (source (origin
3082 (method url-fetch)
3083 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3084 "/archive/plexus-io-" version ".tar.gz"))
3085 (sha256
3086 (base32
3087 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3088 (build-system ant-build-system)
3089 (arguments
3090 `(#:jar-name "plexus-io.jar"
3091 #:source-dir "src/main/java"
3092 #:test-dir "src/test"
3093 #:jdk ,icedtea-8
3094 #:phases
3095 (modify-phases %standard-phases
3096 (add-before 'build 'copy-resources
3097 (lambda _
3098 (mkdir-p "build/classes/META-INF/plexus")
3099 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3100 "build/classes/META-INF/plexus/components.xml")
3101 #t)))))
3102 (inputs
3103 `(("utils" ,java-plexus-utils)
3104 ("commons-io" ,java-commons-io)
3105 ("java-jsr305" ,java-jsr305)))
3106 (native-inputs
3107 `(("junit" ,java-junit)
3108 ("hamcrest" ,java-hamcrest-core)
3109 ("guava" ,java-guava)
3110 ("classworlds" ,java-plexus-classworlds)
3111 ("xbean" ,java-geronimo-xbean-reflect)
3112 ("container-default" ,java-plexus-container-default-bootstrap)))
3113 (home-page "https://github.com/codehaus-plexus/plexus-io")
3114 (synopsis "I/O plexus components")
3115 (description "Plexus IO is a set of plexus components, which are designed
3116 for use in I/O operations. This implementation using plexus components allows
3117 reusing it in maven.")
3118 (license license:asl2.0)))
3119
3120 (define-public java-plexus-archiver
3121 (package
3122 (name "java-plexus-archiver")
3123 (version "3.5")
3124 (source (origin
3125 (method url-fetch)
3126 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3127 "/archive/plexus-archiver-" version ".tar.gz"))
3128 (sha256
3129 (base32
3130 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
3131 (build-system ant-build-system)
3132 (arguments
3133 `(#:jar-name "plexus-archiver.jar"
3134 #:source-dir "src/main/java"
3135 #:jdk ,icedtea-8
3136 #:test-dir "src/test"
3137 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3138 #:phases
3139 (modify-phases %standard-phases
3140 (add-before 'check 'remove-failing
3141 (lambda _
3142 ;; Requires an older version of plexus container
3143 (delete-file
3144 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3145 #t))
3146 (add-before 'build 'copy-resources
3147 (lambda _
3148 (mkdir-p "build/classes/META-INF/plexus")
3149 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3150 "build/classes/META-INF/plexus/components.xml")
3151 #t)))))
3152 (inputs
3153 `(("utils" ,java-plexus-utils)
3154 ("commons-io" ,java-commons-io)
3155 ("snappy" ,java-iq80-snappy)
3156 ("io" ,java-plexus-io)
3157 ("compress" ,java-commons-compress)
3158 ("container-default" ,java-plexus-container-default-bootstrap)
3159 ("snappy" ,java-snappy)
3160 ("java-jsr305" ,java-jsr305)))
3161 (native-inputs
3162 `(("junit" ,java-junit)
3163 ("classworld" ,java-plexus-classworlds)
3164 ("xbean" ,java-geronimo-xbean-reflect)
3165 ("xz" ,java-tukaani-xz)
3166 ("guava" ,java-guava)))
3167 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3168 (synopsis "Archiver component of the Plexus project")
3169 (description "Plexus-archiver contains a component to deal with project
3170 archives (jar).")
3171 (license license:asl2.0)))
3172
3173 (define-public java-plexus-container-default
3174 (package
3175 (inherit java-plexus-container-default-bootstrap)
3176 (name "java-plexus-container-default")
3177 (arguments
3178 `(#:jar-name "container-default.jar"
3179 #:source-dir "plexus-container-default/src/main/java"
3180 #:test-dir "plexus-container-default/src/test"
3181 #:test-exclude (list ;"**/*Test.java"
3182 "**/Abstract*.java"
3183 ;; Requires plexus-hierarchy
3184 "**/PlexusHierarchyTest.java"
3185 ;; Failures
3186 "**/ComponentRealmCompositionTest.java"
3187 "**/PlexusContainerTest.java")
3188 #:jdk ,icedtea-8
3189 #:phases
3190 (modify-phases %standard-phases
3191 (add-before 'build 'copy-resources
3192 (lambda _
3193 (copy-recursively
3194 "plexus-container-default/src/main/resources/"
3195 "build/classes")
3196 #t))
3197 (add-before 'check 'fix-paths
3198 (lambda _
3199 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3200 (substitute*
3201 (string-append
3202 dir "/plexus/component/composition/"
3203 "ComponentRealmCompositionTest.java")
3204 (("src/test") "plexus-container-default/src/test"))
3205 #t))))))
3206 (inputs
3207 `(("worldclass" ,java-plexus-classworlds)
3208 ("xbean" ,java-geronimo-xbean-reflect)
3209 ("utils" ,java-plexus-utils)
3210 ("junit" ,java-junit)
3211 ("guava" ,java-guava)))
3212 (native-inputs
3213 `(("archiver" ,java-plexus-archiver)
3214 ("hamcrest" ,java-hamcrest-core)))))
3215
3216 (define-public java-plexus-component-annotations
3217 (package
3218 (inherit java-plexus-container-default)
3219 (name "java-plexus-component-annotations")
3220 (arguments
3221 `(#:jar-name "plexus-component-annotations.jar"
3222 #:source-dir "plexus-component-annotations/src/main/java"
3223 #:tests? #f)); no tests
3224 (inputs '())
3225 (native-inputs '())
3226 (synopsis "Plexus descriptors generator")
3227 (description "This package is a Maven plugin to generate Plexus descriptors
3228 from source tags and class annotations.")))
3229
3230 (define-public java-plexus-cipher
3231 (package
3232 (name "java-plexus-cipher")
3233 (version "1.7")
3234 (source (origin
3235 (method url-fetch)
3236 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3237 "/archive/plexus-cipher-" version ".tar.gz"))
3238 (sha256
3239 (base32
3240 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3241 (build-system ant-build-system)
3242 (arguments
3243 `(#:jar-name "plexus-cipher.jar"
3244 #:source-dir "src/main/java"
3245 #:jdk ,icedtea-8
3246 #:tests? #f; FIXME: requires sisu-inject-bean
3247 #:phases
3248 (modify-phases %standard-phases
3249 (add-before 'build 'copy-resources
3250 (lambda _
3251 (copy-recursively "src/main/resources" "build/classes")
3252 (mkdir-p "build/classes/META-INF/sisu")
3253 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3254 (lambda _
3255 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3256 #t)))))
3257 (inputs
3258 `(("java-cdi-api" ,java-cdi-api)
3259 ("java-javax-inject" ,java-javax-inject)))
3260 (home-page "https://github.com/sonatype/plexus-cipher")
3261 (synopsis "Encryption/decryption Component")
3262 (description "Plexus-cipher contains a component to deal with encryption
3263 and decryption.")
3264 (license license:asl2.0)))
3265
3266 (define-public java-plexus-compiler-api
3267 (package
3268 (name "java-plexus-compiler-api")
3269 (version "2.8.4")
3270 (source (origin
3271 (method url-fetch)
3272 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3273 "/archive/plexus-compiler-" version ".tar.gz"))
3274 (sha256
3275 (base32
3276 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3277 (build-system ant-build-system)
3278 (arguments
3279 `(#:jar-name "plexus-compiler-api.jar"
3280 #:source-dir "plexus-compiler-api/src/main/java"
3281 #:jdk ,icedtea-8
3282 #:test-dir "plexus-compiler-api/src/test"))
3283 (inputs
3284 `(("java-plexus-container-default" ,java-plexus-container-default)
3285 ("java-plexus-util" ,java-plexus-utils)))
3286 (native-inputs
3287 `(("java-junit" ,java-junit)))
3288 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3289 (synopsis "Plexus Compilers component's API to manipulate compilers")
3290 (description "This package contains the API used by components to manipulate
3291 compilers.")
3292 (license (list license:asl2.0
3293 license:expat))))
3294
3295 (define-public java-plexus-compiler-javac
3296 (package
3297 (inherit java-plexus-compiler-api)
3298 (name "java-plexus-compiler-javac")
3299 (arguments
3300 `(#:jar-name "plexus-compiler-javac.jar"
3301 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3302 #:jdk ,icedtea-8
3303 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3304 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3305 (inputs
3306 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3307 ("java-plexus-utils" ,java-plexus-utils)
3308 ("java-plexus-container-default" ,java-plexus-container-default)))
3309 (native-inputs
3310 `(("java-junit" ,java-junit)))
3311 (synopsis "Javac Compiler support for Plexus Compiler component")
3312 (description "This package contains the Javac Compiler support for Plexus
3313 Compiler component.")))
3314
3315 (define-public java-plexus-sec-dispatcher
3316 (package
3317 (name "java-plexus-sec-dispatcher")
3318 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3319 (source (origin
3320 ;; This project doesn't tag releases or publish tarballs, so we take
3321 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3322 (method url-fetch)
3323 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3324 "archive/7db8f88048.tar.gz"))
3325 (sha256
3326 (base32
3327 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3328 (file-name (string-append name "-" version ".tar.gz"))))
3329 (arguments
3330 `(#:jar-name "plexus-sec-dispatcher.jar"
3331 #:source-dir "src/main/java"
3332 #:jdk ,icedtea-8
3333 #:phases
3334 (modify-phases %standard-phases
3335 (add-before 'build 'generate-models
3336 (lambda* (#:key inputs #:allow-other-keys)
3337 (define (modello-single-mode file version mode)
3338 (invoke "java"
3339 "org.codehaus.modello.ModelloCli"
3340 file mode "src/main/java" version
3341 "false" "true"))
3342 (let ((file "src/main/mdo/settings-security.mdo"))
3343 (modello-single-mode file "1.0.0" "java")
3344 (modello-single-mode file "1.0.0" "xpp3-reader")
3345 (modello-single-mode file "1.0.0" "xpp3-writer"))
3346 #t))
3347 (add-before 'build 'generate-components.xml
3348 (lambda _
3349 (mkdir-p "build/classes/META-INF/plexus")
3350 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3351 (lambda _
3352 (display
3353 "<component-set>\n
3354 <components>\n
3355 <component>\n
3356 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3357 <role-hint>default</role-hint>\n
3358 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3359 <description></description>\n
3360 <requirements>\n
3361 <requirement>\n
3362 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3363 <field-name>_cipher</field-name>\n
3364 </requirement>\n
3365 <requirement>\n
3366 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3367 <field-name>_decryptors</field-name>\n
3368 </requirement>\n
3369 </requirements>\n
3370 <configuration>\n
3371 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3372 </configuration>\n
3373 </component>\n
3374 </components>\n
3375 </component-set>\n")))
3376 #t))
3377 (add-before 'check 'fix-paths
3378 (lambda _
3379 (copy-recursively "src/test/resources" "target")
3380 #t)))))
3381 (inputs
3382 `(("java-plexus-cipher" ,java-plexus-cipher)))
3383 (native-inputs
3384 `(("java-modello-core" ,java-modello-core)
3385 ;; for modello:
3386 ("java-plexus-container-default" ,java-plexus-container-default)
3387 ("java-plexus-classworlds" ,java-plexus-classworlds)
3388 ("java-plexus-utils" ,java-plexus-utils)
3389 ("java-guava" ,java-guava)
3390 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3391 ("java-sisu-build-api" ,java-sisu-build-api)
3392 ;; modello plugins:
3393 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3394 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3395 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3396 ;; for tests
3397 ("java-junit" ,java-junit)))
3398 (build-system ant-build-system)
3399 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3400 (synopsis "Plexus Security Dispatcher Component")
3401 (description "This package is the Plexus Security Dispatcher Component.
3402 This component decrypts a string passed to it.")
3403 (license license:asl2.0)))
3404
3405 (define-public java-plexus-cli
3406 (package
3407 (name "java-plexus-cli")
3408 (version "1.7")
3409 (source (origin
3410 (method git-fetch)
3411 (uri (git-reference
3412 (url "https://github.com/sonatype/plexus-cli")
3413 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3414 (file-name (string-append name "-" version))
3415 (sha256
3416 (base32
3417 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3418 (build-system ant-build-system)
3419 (arguments
3420 `(#:jar-name "plexus-cli.jar"
3421 #:source-dir "src/main/java"
3422 #:jdk ,icedtea-8
3423 #:test-dir "src/test"))
3424 (inputs
3425 `(("java-commons-cli" ,java-commons-cli)
3426 ("java-plexus-container-default" ,java-plexus-container-default)
3427 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3428 (native-inputs
3429 `(("java-plexus-utils" ,java-plexus-utils)
3430 ("java-junit" ,java-junit)
3431 ("java-guava" ,java-guava)))
3432 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3433 (synopsis "CLI building library for plexus")
3434 (description "This package is a library to help creating CLI around
3435 Plexus components.")
3436 (license license:asl2.0)))
3437
3438 (define-public java-sisu-build-api
3439 (package
3440 (name "java-sisu-build-api")
3441 (version "0.0.7")
3442 (source (origin
3443 (method url-fetch)
3444 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3445 "archive/plexus-build-api-" version ".tar.gz"))
3446 (sha256
3447 (base32
3448 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3449 (build-system ant-build-system)
3450 (arguments
3451 `(#:jar-name "sisu-build-api.jar"
3452 #:source-dir "src/main/java"
3453 #:jdk ,icedtea-8
3454 #:tests? #f; FIXME: how to run the tests?
3455 #:phases
3456 (modify-phases %standard-phases
3457 (add-before 'build 'copy-resources
3458 (lambda _
3459 (copy-recursively "src/main/resources" "build/classes")
3460 (substitute* (find-files "build/classes")
3461 (("\\$\\{project.version\\}") ,version))
3462 #t))
3463 (add-before 'build 'generate-plexus-compontent
3464 (lambda _
3465 (mkdir-p "build/classes/META-INF/plexus")
3466 ;; This file is required for plexus to inject this package.
3467 ;; FIXME: how is it generated?
3468 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3469 (lambda _
3470 (display
3471 "<component-set>\n
3472 <components>\n
3473 <component>\n
3474 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3475 <role-hint>default</role-hint>\n
3476 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3477 <description>Filesystem based non-incremental build context implementation\n
3478 which behaves as if all files were just created.</description>\n
3479 </component>\n
3480 </components>\n
3481 </component-set>\n")))
3482 #t)))))
3483 (inputs
3484 `(("java-plexus-utils" ,java-plexus-utils)
3485 ("java-plexus-container-default" ,java-plexus-container-default)))
3486 (home-page "https://github.com/sonatype/sisu-build-api/")
3487 (synopsis "Base build API for maven")
3488 (description "This package contains the base build API for maven and
3489 a default implementation of it. This API is about scanning files in a
3490 project and determining what files need to be rebuilt.")
3491 (license license:asl2.0)))
3492
3493 (define-public java-modello-core
3494 (package
3495 (name "java-modello-core")
3496 (version "1.9.1")
3497 (source (origin
3498 (method url-fetch)
3499 (uri (string-append "https://github.com/codehaus-plexus/modello"
3500 "/archive/modello-" version ".tar.gz"))
3501 (sha256
3502 (base32
3503 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3504 (build-system ant-build-system)
3505 (arguments
3506 `(#:jar-name "modello-core.jar"
3507 #:source-dir "modello-core/src/main/java"
3508 #:test-dir "modello-core/src/test"
3509 #:main-class "org.codehaus.modello.ModelloCli"
3510 #:jdk ,icedtea-8
3511 #:phases
3512 (modify-phases %standard-phases
3513 (add-before 'build 'copy-resources
3514 (lambda _
3515 (mkdir-p "build/classes/META-INF/plexus")
3516 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3517 "build/classes/META-INF/plexus/components.xml")
3518 #t))
3519 (add-before 'check 'fix-tests
3520 (lambda _
3521 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3522 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3523 "modello/core/io/ModelReaderTest.java")
3524 (("src/test") "modello-core/src/test")))
3525 #t)))))
3526 (inputs
3527 `(("java-plexus-utils" ,java-plexus-utils)
3528 ("java-plexus-container-default" ,java-plexus-container-default)
3529 ("java-sisu-build-api" ,java-sisu-build-api)))
3530 (native-inputs
3531 `(("java-junit" ,java-junit)
3532 ("java-plexus-classworlds" ,java-plexus-classworlds)
3533 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3534 ("java-guava" ,java-guava)))
3535 (home-page "http://codehaus-plexus.github.io/modello/")
3536 (synopsis "Framework for code generation from a simple model")
3537 (description "Modello is a framework for code generation from a simple model.
3538
3539 Modello generates code from a simple model format: based on a plugin
3540 architecture, various types of code and descriptors can be generated from the
3541 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3542 XSD and documentation.")
3543 (license (list
3544 license:expat
3545 ;; Although this package uses only files licensed under expat,
3546 ;; other parts of the source are licensed under different
3547 ;; licenses. We include them to be inherited by other packages.
3548 license:asl2.0
3549 ;; Some files in modello-plugin-java are licensed under a
3550 ;; 5-clause BSD license.
3551 (license:non-copyleft
3552 (string-append "file:///modello-plugins/modello-plugin-java/"
3553 "src/main/java/org/codehaus/modello/plugin/"
3554 "java/javasource/JNaming.java"))))))
3555
3556 (define-public java-modello-plugins-java
3557 (package
3558 (inherit java-modello-core)
3559 (name "java-modello-plugins-java")
3560 (arguments
3561 `(#:jar-name "modello-plugins-java.jar"
3562 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3563 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3564 #:jdk ,icedtea-8
3565 #:tests? #f; requires maven-model, which depends on this package
3566 #:phases
3567 (modify-phases %standard-phases
3568 (add-before 'build 'copy-resources
3569 (lambda _
3570 (mkdir-p "build/classes")
3571 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3572 "build/classes")
3573 #t)))))
3574 (inputs
3575 `(("java-modello-core" ,java-modello-core)
3576 ,@(package-inputs java-modello-core)))
3577 (synopsis "Modello Java Plugin")
3578 (description "Modello Java Plugin generates Java objects for the model.")))
3579
3580 (define-public java-modello-plugins-xml
3581 (package
3582 (inherit java-modello-core)
3583 (name "java-modello-plugins-xml")
3584 (arguments
3585 `(#:jar-name "modello-plugins-xml.jar"
3586 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3587 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3588 #:jdk ,icedtea-8
3589 #:phases
3590 (modify-phases %standard-phases
3591 (add-before 'build 'copy-resources
3592 (lambda _
3593 (mkdir-p "build/classes")
3594 (copy-recursively
3595 "modello-plugins/modello-plugin-xml/src/main/resources"
3596 "build/classes")
3597 #t))
3598 (add-before 'check 'fix-paths
3599 (lambda _
3600 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3601 (substitute*
3602 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3603 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
3604 #t)))))
3605 (inputs
3606 `(("java-modello-core" ,java-modello-core)
3607 ("java-modello-plugins-java" ,java-modello-plugins-java)
3608 ,@(package-inputs java-modello-core)))
3609 (synopsis "Modello XML Plugin")
3610 (description "Modello XML Plugin contains shared code for every plugins
3611 working on XML representation of the model.")))
3612
3613 (define-public java-modello-test
3614 (package
3615 (inherit java-modello-core)
3616 (name "java-modello-test")
3617 (arguments
3618 `(#:jar-name "modello-test.jar"
3619 #:source-dir "modello-test/src/main/java"
3620 #:tests? #f; no tests
3621 #:jdk ,icedtea-8))
3622 (inputs
3623 `(("java-plexus-utils" ,java-plexus-utils)
3624 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3625 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3626 ("java-plexus-container-default" ,java-plexus-container-default)))
3627 (synopsis "Modello test package")
3628 (description "The modello test package contains the basis to create
3629 Modello generator unit-tests, including sample models and xml files to test
3630 every feature for every plugin.")))
3631
3632 (define-public java-modello-plugins-xpp3
3633 (package
3634 (inherit java-modello-core)
3635 (name "java-modello-plugins-xpp3")
3636 (arguments
3637 `(#:jar-name "modello-plugins-xpp3.jar"
3638 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3639 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3640 ;; One of the test dependencies is maven-model which depends on this package.
3641 #:tests? #f
3642 #:jdk ,icedtea-8
3643 #:phases
3644 (modify-phases %standard-phases
3645 (add-before 'build 'copy-resources
3646 (lambda _
3647 (mkdir-p "build/classes")
3648 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3649 "build/classes")
3650 #t)))))
3651 (inputs
3652 `(("java-modello-core" ,java-modello-core)
3653 ("java-modello-plugins-java" ,java-modello-plugins-java)
3654 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3655 ,@(package-inputs java-modello-core)))
3656 (native-inputs
3657 `(("java-xmlunit" ,java-xmlunit)
3658 ("java-modello-test" ,java-modello-test)
3659 ,@(package-native-inputs java-modello-core)))
3660 (synopsis "Modello XPP3 Plugin")
3661 (description "The modello XPP3 plugin generates XML readers and writers based
3662 on the XPP3 API (XML Pull Parser).")))
3663
3664 (define-public java-asm
3665 (package
3666 (name "java-asm")
3667 (version "6.0")
3668 (source (origin
3669 (method url-fetch)
3670 (uri (string-append "http://download.forge.ow2.org/asm/"
3671 "asm-" version ".tar.gz"))
3672 (sha256
3673 (base32
3674 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3675 (build-system ant-build-system)
3676 (propagated-inputs
3677 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
3678 (arguments
3679 `(#:build-target "compile"
3680 ;; The tests require an old version of Janino, which no longer compiles
3681 ;; with the JDK7.
3682 #:tests? #f
3683 #:make-flags
3684 (list
3685 ;; We don't need these extra ant tasks, but the build system asks us to
3686 ;; provide a path anyway.
3687 "-Dobjectweb.ant.tasks.path=dummy-path"
3688 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3689 ;; used during the build automatically by ant-build-system, but
3690 ;; java-asm's build.xml fails unless we provide something here.
3691 "-Dbiz.aQute.bnd.path=dummy-path")
3692 #:phases
3693 (modify-phases %standard-phases
3694 (add-before 'install 'build-jars
3695 (lambda* (#:key make-flags #:allow-other-keys)
3696 ;; We cannot use the "jar" target because it depends on a couple
3697 ;; of unpackaged, complicated tools.
3698 (mkdir "dist")
3699 (invoke "jar"
3700 "-cf" (string-append "dist/asm-" ,version ".jar")
3701 "-C" "output/build/tmp" ".")))
3702 (replace 'install
3703 (install-jars "dist")))))
3704 (native-inputs
3705 `(("java-junit" ,java-junit)))
3706 (home-page "http://asm.ow2.org/")
3707 (synopsis "Very small and fast Java bytecode manipulation framework")
3708 (description "ASM is an all purpose Java bytecode manipulation and
3709 analysis framework. It can be used to modify existing classes or dynamically
3710 generate classes, directly in binary form. The provided common
3711 transformations and analysis algorithms allow to easily assemble custom
3712 complex transformations and code analysis tools.")
3713 (license license:bsd-3)))
3714
3715 (define java-asm-bootstrap
3716 (package
3717 (inherit java-asm)
3718 (name "java-asm-bootstrap")
3719 (arguments
3720 (substitute-keyword-arguments (package-arguments java-asm)
3721 ((#:tests? _) #f)))
3722 (native-inputs `())
3723 (propagated-inputs
3724 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
3725 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
3726 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
3727 (delete `("java-aqute-libg" ,java-aqute-libg)
3728 (package-inputs java-asm)))))))
3729
3730 (define-public java-cglib
3731 (package
3732 (name "java-cglib")
3733 (version "3.2.4")
3734 (source (origin
3735 (method url-fetch)
3736 (uri (string-append
3737 "https://github.com/cglib/cglib/archive/RELEASE_"
3738 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3739 ".tar.gz"))
3740 (file-name (string-append "cglib-" version ".tar.gz"))
3741 (sha256
3742 (base32
3743 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3744 (build-system ant-build-system)
3745 (arguments
3746 `(;; FIXME: tests fail because junit runs
3747 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3748 ;; to describe a test at all.
3749 #:tests? #f
3750 #:jar-name "cglib.jar"
3751 #:phases
3752 (modify-phases %standard-phases
3753 (add-after 'unpack 'chdir
3754 (lambda _ (chdir "cglib") #t)))))
3755 (inputs
3756 `(("java-asm" ,java-asm)
3757 ("java-junit" ,java-junit)))
3758 (home-page "https://github.com/cglib/cglib/")
3759 (synopsis "Java byte code generation library")
3760 (description "The byte code generation library CGLIB is a high level API
3761 to generate and transform Java byte code.")
3762 (license license:asl2.0)))
3763
3764 (define-public java-objenesis
3765 (package
3766 (name "java-objenesis")
3767 (version "2.5.1")
3768 (source (origin
3769 (method url-fetch)
3770 (uri (string-append "https://github.com/easymock/objenesis/"
3771 "archive/" version ".tar.gz"))
3772 (file-name (string-append "objenesis-" version ".tar.gz"))
3773 (sha256
3774 (base32
3775 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3776 (build-system ant-build-system)
3777 (arguments
3778 `(#:jar-name "objenesis.jar"
3779 #:source-dir "main/src/"
3780 #:test-dir "main/src/test/"))
3781 (native-inputs
3782 `(("java-junit" ,java-junit)
3783 ("java-hamcrest-core" ,java-hamcrest-core)))
3784 (home-page "http://objenesis.org/")
3785 (synopsis "Bypass the constructor when creating an object")
3786 (description "Objenesis is a small Java library that serves one purpose:
3787 to instantiate a new object of a particular class. It is common to see
3788 restrictions in libraries stating that classes must require a default
3789 constructor. Objenesis aims to overcome these restrictions by bypassing the
3790 constructor on object instantiation.")
3791 (license license:asl2.0)))
3792
3793 (define-public java-easymock
3794 (package
3795 (name "java-easymock")
3796 (version "3.4")
3797 (source (origin
3798 (method url-fetch)
3799 (uri (string-append "https://github.com/easymock/easymock/"
3800 "archive/easymock-" version ".tar.gz"))
3801 (sha256
3802 (base32
3803 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3804 (build-system ant-build-system)
3805 (arguments
3806 `(#:jar-name "easymock.jar"
3807 #:source-dir "core/src/main"
3808 #:test-dir "core/src/test"
3809 #:phases
3810 (modify-phases %standard-phases
3811 ;; FIXME: Android support requires the following packages to be
3812 ;; available: com.google.dexmaker.stock.ProxyBuilder
3813 (add-after 'unpack 'delete-android-support
3814 (lambda _
3815 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3816 (substitute* "MocksControl.java"
3817 (("AndroidSupport.isAndroid\\(\\)") "false")
3818 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3819 (delete-file "AndroidClassProxyFactory.java"))
3820 #t))
3821 (add-after 'unpack 'delete-broken-tests
3822 (lambda _
3823 (with-directory-excursion "core/src/test/java/org/easymock"
3824 ;; This test depends on dexmaker.
3825 (delete-file "tests2/ClassExtensionHelperTest.java")
3826
3827 ;; This is not a test.
3828 (delete-file "tests/BaseEasyMockRunnerTest.java")
3829
3830 ;; This test should be executed with a different runner...
3831 (delete-file "tests2/EasyMockAnnotationsTest.java")
3832 ;; ...but deleting it means that we also have to delete these
3833 ;; dependent files.
3834 (delete-file "tests2/EasyMockRunnerTest.java")
3835 (delete-file "tests2/EasyMockRuleTest.java")
3836
3837 ;; This test fails because the file "easymock.properties" does
3838 ;; not exist.
3839 (delete-file "tests2/EasyMockPropertiesTest.java"))
3840 #t)))))
3841 (inputs
3842 `(("java-asm" ,java-asm)
3843 ("java-cglib" ,java-cglib)
3844 ("java-objenesis" ,java-objenesis)))
3845 (native-inputs
3846 `(("java-junit" ,java-junit)
3847 ("java-hamcrest-core" ,java-hamcrest-core)))
3848 (home-page "http://easymock.org")
3849 (synopsis "Java library providing mock objects for unit tests")
3850 (description "EasyMock is a Java library that provides an easy way to use
3851 mock objects in unit testing.")
3852 (license license:asl2.0)))
3853
3854 (define-public java-jmock-1
3855 (package
3856 (name "java-jmock")
3857 (version "1.2.0")
3858 (source (origin
3859 (method url-fetch)
3860 (uri (string-append "https://github.com/jmock-developers/"
3861 "jmock-library/archive/" version ".tar.gz"))
3862 (file-name (string-append "jmock-" version ".tar.gz"))
3863 (sha256
3864 (base32
3865 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3866 (build-system ant-build-system)
3867 (arguments
3868 `(#:build-target "jars"
3869 #:test-target "run.tests"
3870 #:phases
3871 (modify-phases %standard-phases
3872 (replace 'install (install-jars "build")))))
3873 (home-page "http://www.jmock.org")
3874 (synopsis "Mock object library for test-driven development")
3875 (description "JMock is a library that supports test-driven development of
3876 Java code with mock objects. Mock objects help you design and test the
3877 interactions between the objects in your programs.
3878
3879 The jMock library
3880
3881 @itemize
3882 @item makes it quick and easy to define mock objects
3883 @item lets you precisely specify the interactions between
3884 your objects, reducing the brittleness of your tests
3885 @item plugs into your favourite test framework
3886 @item is easy to extend.
3887 @end itemize\n")
3888 (license license:bsd-3)))
3889
3890 (define-public java-jmock
3891 (package
3892 (inherit java-jmock-1)
3893 (name "java-jmock")
3894 (version "2.8.2")
3895 (source (origin
3896 (method url-fetch)
3897 (uri (string-append "https://github.com/jmock-developers/"
3898 "jmock-library/archive/" version ".tar.gz"))
3899 (file-name (string-append name "-" version ".tar.gz"))
3900 (sha256
3901 (base32
3902 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3903 (inputs
3904 `(("java-hamcrest-all" ,java-hamcrest-all)
3905 ("java-asm" ,java-asm)
3906 ("java-bsh" ,java-bsh)
3907 ("java-junit" ,java-junit)))
3908 (native-inputs
3909 `(("cglib" ,java-cglib)))
3910 (arguments
3911 `(#:jar-name "java-jmock.jar"
3912 #:source-dir "jmock/src/main/java"
3913 #:test-dir "jmock/src/test"))))
3914
3915 (define-public java-jmock-junit4
3916 (package
3917 (inherit java-jmock)
3918 (name "java-jmock-junit4")
3919 (arguments
3920 `(#:jar-name "java-jmock-junit4.jar"
3921 #:source-dir "jmock-junit4/src/main/java"
3922 #:test-dir "jmock-junit4/src/test"))
3923 (inputs
3924 `(("java-hamcrest-all" ,java-hamcrest-all)
3925 ("java-asm" ,java-asm)
3926 ("java-bsh" ,java-bsh)
3927 ("java-jmock" ,java-jmock)
3928 ("java-jumit" ,java-junit)))))
3929
3930 (define-public java-jmock-legacy
3931 (package
3932 (inherit java-jmock)
3933 (name "java-jmock-legacy")
3934 (arguments
3935 `(#:jar-name "java-jmock-legacy.jar"
3936 #:source-dir "jmock-legacy/src/main/java"
3937 #:test-dir "jmock-legacy/src/test"
3938 #:phases
3939 (modify-phases %standard-phases
3940 (add-before 'check 'copy-tests
3941 (lambda _
3942 ;; This file is a dependancy of some tests
3943 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
3944 (copy-file (string-append "jmock/src/test/java/" file)
3945 (string-append "jmock-legacy/src/test/java/" file))
3946 #t))))))
3947 (inputs
3948 `(("java-hamcrest-all" ,java-hamcrest-all)
3949 ("java-objenesis" ,java-objenesis)
3950 ("java-cglib" ,java-cglib)
3951 ("java-jmock" ,java-jmock)
3952 ("java-asm" ,java-asm)
3953 ("java-bsh" ,java-bsh)
3954 ("java-junit" ,java-junit)))
3955 (native-inputs
3956 `(("java-jmock-junit4" ,java-jmock-junit4)))))
3957
3958 (define-public java-hamcrest-all
3959 (package (inherit java-hamcrest-core)
3960 (name "java-hamcrest-all")
3961 (arguments
3962 `(#:jdk ,icedtea-8
3963 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
3964 ((#:build-target _) "bigjar")
3965 ((#:phases phases)
3966 `(modify-phases ,phases
3967 ;; Some build targets override the classpath, so we need to patch
3968 ;; the build.xml to ensure that required dependencies are on the
3969 ;; classpath.
3970 (add-after 'unpack 'patch-classpath-for-integration
3971 (lambda* (#:key inputs #:allow-other-keys)
3972 (substitute* "build.xml"
3973 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
3974 (string-join
3975 (cons line
3976 (append
3977 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
3978 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
3979 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
3980 ";"))
3981 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3982 (string-append (assoc-ref inputs "java-hamcrest-core")
3983 "/share/java/hamcrest-core.jar")))
3984 #t)))))))
3985 (inputs
3986 `(("java-junit" ,java-junit)
3987 ("java-jmock" ,java-jmock-1)
3988 ;; This is necessary because of what seems to be a race condition.
3989 ;; This package would sometimes fail to build because hamcrest-core.jar
3990 ;; could not be found, even though it is built as part of this package.
3991 ;; Adding java-hamcrest-core appears to fix this problem. See
3992 ;; https://debbugs.gnu.org/31390 for more information.
3993 ("java-hamcrest-core" ,java-hamcrest-core)
3994 ("java-easymock" ,java-easymock)
3995 ,@(package-inputs java-hamcrest-core)))))
3996
3997 (define-public java-jopt-simple
3998 (package
3999 (name "java-jopt-simple")
4000 (version "5.0.3")
4001 (source (origin
4002 (method url-fetch)
4003 (uri (string-append "http://repo1.maven.org/maven2/"
4004 "net/sf/jopt-simple/jopt-simple/"
4005 version "/jopt-simple-"
4006 version "-sources.jar"))
4007 (sha256
4008 (base32
4009 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4010 (build-system ant-build-system)
4011 (arguments
4012 `(#:tests? #f ; there are no tests
4013 #:jar-name "jopt-simple.jar"))
4014 (home-page "https://pholser.github.io/jopt-simple/")
4015 (synopsis "Java library for parsing command line options")
4016 (description "JOpt Simple is a Java library for parsing command line
4017 options, such as those you might pass to an invocation of @code{javac}. In
4018 the interest of striving for simplicity, as closely as possible JOpt Simple
4019 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4020 GNU @code{getopt_long}. It also aims to make option parser configuration and
4021 retrieval of options and their arguments simple and expressive, without being
4022 overly clever.")
4023 (license license:expat)))
4024
4025 (define-public java-commons-math3
4026 (package
4027 (name "java-commons-math3")
4028 (version "3.6.1")
4029 (source (origin
4030 (method url-fetch)
4031 (uri (string-append "mirror://apache/commons/math/source/"
4032 "commons-math3-" version "-src.tar.gz"))
4033 (sha256
4034 (base32
4035 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4036 (build-system ant-build-system)
4037 (arguments
4038 `(#:build-target "jar"
4039 #:test-target "test"
4040 #:make-flags
4041 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4042 (junit (assoc-ref %build-inputs "java-junit")))
4043 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4044 (string-append "-Dhamcrest.jar=" hamcrest
4045 "/share/java/hamcrest-core.jar")))
4046 #:phases
4047 (modify-phases %standard-phases
4048 ;; We want to build the jar in the build phase and run the tests
4049 ;; later in a separate phase.
4050 (add-after 'unpack 'untangle-targets
4051 (lambda _
4052 (substitute* "build.xml"
4053 (("name=\"jar\" depends=\"test\"")
4054 "name=\"jar\" depends=\"compile\""))
4055 #t))
4056 ;; There is no install target.
4057 (replace 'install
4058 (install-jars "target")))))
4059 (native-inputs
4060 `(("java-junit" ,java-junit)
4061 ("java-hamcrest-core" ,java-hamcrest-core)))
4062 (home-page "http://commons.apache.org/math/")
4063 (synopsis "Apache Commons mathematics library")
4064 (description "Commons Math is a library of lightweight, self-contained
4065 mathematics and statistics components addressing the most common problems not
4066 available in the Java programming language or Commons Lang.")
4067 (license license:asl2.0)))
4068
4069 (define-public java-jmh
4070 (package
4071 (name "java-jmh")
4072 (version "1.17.5")
4073 (source (origin
4074 (method hg-fetch)
4075 (uri (hg-reference
4076 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4077 (changeset version)))
4078 (file-name (string-append name "-" version "-checkout"))
4079 (sha256
4080 (base32
4081 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4082 (build-system ant-build-system)
4083 (arguments
4084 `(#:jar-name "jmh-core.jar"
4085 #:source-dir "jmh-core/src/main"
4086 #:test-dir "jmh-core/src/test"
4087 #:phases
4088 (modify-phases %standard-phases
4089 ;; This seems to be a bug in the JDK. It may not be necessary in
4090 ;; future versions of the JDK.
4091 (add-after 'unpack 'fix-bug
4092 (lambda _
4093 (with-directory-excursion
4094 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4095 (substitute* '("IntegerValueConverter.java"
4096 "ThreadsValueConverter.java")
4097 (("public Class<Integer> valueType")
4098 "public Class<? extends Integer> valueType")))
4099 #t)))))
4100 (inputs
4101 `(("java-jopt-simple" ,java-jopt-simple)
4102 ("java-commons-math3" ,java-commons-math3)))
4103 (native-inputs
4104 `(("java-junit" ,java-junit)
4105 ("java-hamcrest-core" ,java-hamcrest-core)))
4106 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4107 (synopsis "Benchmark harness for the JVM")
4108 (description "JMH is a Java harness for building, running, and analysing
4109 nano/micro/milli/macro benchmarks written in Java and other languages
4110 targeting the JVM.")
4111 ;; GPLv2 only
4112 (license license:gpl2)))
4113
4114 (define-public java-commons-collections4
4115 (package
4116 (name "java-commons-collections4")
4117 (version "4.1")
4118 (source (origin
4119 (method url-fetch)
4120 (uri (string-append "mirror://apache/commons/collections/source/"
4121 "commons-collections4-" version "-src.tar.gz"))
4122 (sha256
4123 (base32
4124 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4125 (build-system ant-build-system)
4126 (arguments
4127 `(#:test-target "test"
4128 #:make-flags
4129 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4130 (junit (assoc-ref %build-inputs "java-junit"))
4131 (easymock (assoc-ref %build-inputs "java-easymock")))
4132 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4133 (string-append "-Dhamcrest.jar=" hamcrest
4134 "/share/java/hamcrest-core.jar")
4135 (string-append "-Deasymock.jar=" easymock
4136 "/share/java/easymock.jar")))
4137 #:phases
4138 (modify-phases %standard-phases
4139 (replace 'install
4140 (install-jars "target")))))
4141 (native-inputs
4142 `(("java-junit" ,java-junit)
4143 ("java-hamcrest-core" ,java-hamcrest-core)
4144 ("java-easymock" ,java-easymock)))
4145 (home-page "http://commons.apache.org/collections/")
4146 (synopsis "Collections framework")
4147 (description "The Java Collections Framework is the recognised standard
4148 for collection handling in Java. Commons-Collections seek to build upon the
4149 JDK classes by providing new interfaces, implementations and utilities. There
4150 are many features, including:
4151
4152 @itemize
4153 @item @code{Bag} interface for collections that have a number of copies of
4154 each object
4155 @item @code{BidiMap} interface for maps that can be looked up from value to
4156 key as well and key to value
4157 @item @code{MapIterator} interface to provide simple and quick iteration over
4158 maps
4159 @item Transforming decorators that alter each object as it is added to the
4160 collection
4161 @item Composite collections that make multiple collections look like one
4162 @item Ordered maps and sets that retain the order elements are added in,
4163 including an LRU based map
4164 @item Reference map that allows keys and/or values to be garbage collected
4165 under close control
4166 @item Many comparator implementations
4167 @item Many iterator implementations
4168 @item Adapter classes from array and enumerations to collections
4169 @item Utilities to test or create typical set-theory properties of collections
4170 such as union, intersection, and closure.
4171 @end itemize\n")
4172 (license license:asl2.0)))
4173
4174 (define-public java-commons-collections
4175 (package
4176 (inherit java-commons-collections4)
4177 (name "java-commons-collections")
4178 (version "3.2.2")
4179 (source (origin
4180 (method url-fetch)
4181 (uri (string-append "mirror://apache/commons/collections/source/"
4182 "commons-collections-" version "-src.tar.gz"))
4183 (sha256
4184 (base32
4185 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4186 (patches
4187 (search-patches "java-commons-collections-fix-java8.patch"))))
4188 (arguments
4189 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4190 ((#:phases phases)
4191 `(modify-phases ,phases
4192 ;; The manifest is required by the build procedure
4193 (add-before 'build 'add-manifest
4194 (lambda _
4195 (mkdir-p "build/conf")
4196 (call-with-output-file "build/conf/MANIFEST.MF"
4197 (lambda (file)
4198 (format file "Manifest-Version: 1.0\n")))
4199 #t))
4200 (replace 'install
4201 (install-jars "build"))))))))
4202
4203 (define java-commons-collections-test-classes
4204 (package
4205 (inherit java-commons-collections)
4206 (arguments
4207 `(#:jar-name "commons-collections-test-classes.jar"
4208 #:source-dir "src/test"
4209 #:tests? #f))
4210 (inputs
4211 `(("collection" ,java-commons-collections)))))
4212
4213 (define-public java-commons-beanutils
4214 (package
4215 (name "java-commons-beanutils")
4216 (version "1.9.3")
4217 (source (origin
4218 (method url-fetch)
4219 (uri (string-append "mirror://apache/commons/beanutils/source/"
4220 "commons-beanutils-" version "-src.tar.gz"))
4221 (sha256
4222 (base32
4223 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4224 (build-system ant-build-system)
4225 (arguments
4226 `(#:test-target "test"
4227 #:tests? #f
4228 #:phases
4229 (modify-phases %standard-phases
4230 (replace 'install
4231 (lambda* (#:key outputs #:allow-other-keys)
4232 (rename-file (string-append "dist/commons-beanutils-" ,version
4233 "-SNAPSHOT.jar")
4234 "commons-beanutils.jar")
4235 (install-file "commons-beanutils.jar"
4236 (string-append (assoc-ref outputs "out") "/share/java/"))
4237 #t)))))
4238 (inputs
4239 `(("logging" ,java-commons-logging-minimal)
4240 ("collections" ,java-commons-collections)))
4241 (native-inputs
4242 `(("junit" ,java-junit)
4243 ("collections-test" ,java-commons-collections-test-classes)))
4244 (home-page "http://commons.apache.org/beanutils/")
4245 (synopsis "Dynamically set or get properties in Java")
4246 (description "BeanUtils provides a simplified interface to reflection and
4247 introspection to set or get dynamically determined properties through their
4248 setter and getter method.")
4249 (license license:asl2.0)))
4250
4251 (define-public java-commons-io
4252 (package
4253 (name "java-commons-io")
4254 (version "2.5")
4255 (source
4256 (origin
4257 (method url-fetch)
4258 (uri (string-append "mirror://apache/commons/io/source/"
4259 "commons-io-" version "-src.tar.gz"))
4260 (sha256
4261 (base32
4262 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4263 (build-system ant-build-system)
4264 (outputs '("out" "doc"))
4265 (arguments
4266 `(#:test-target "test"
4267 #:make-flags
4268 (list (string-append "-Djunit.jar="
4269 (assoc-ref %build-inputs "java-junit")
4270 "/share/java/junit.jar"))
4271 #:phases
4272 (modify-phases %standard-phases
4273 (add-after 'build 'build-javadoc ant-build-javadoc)
4274 (replace 'install (install-jars "target"))
4275 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4276 (native-inputs
4277 `(("java-junit" ,java-junit)
4278 ("java-hamcrest-core" ,java-hamcrest-core)))
4279 (home-page "http://commons.apache.org/io/")
4280 (synopsis "Common useful IO related classes")
4281 (description "Commons-IO contains utility classes, stream implementations,
4282 file filters and endian classes.")
4283 (license license:asl2.0)))
4284
4285 (define-public java-commons-lang
4286 (package
4287 (name "java-commons-lang")
4288 (version "2.6")
4289 (source
4290 (origin
4291 (method url-fetch)
4292 (uri (string-append "mirror://apache/commons/lang/source/"
4293 "commons-lang-" version "-src.tar.gz"))
4294 (sha256
4295 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4296 (build-system ant-build-system)
4297 (outputs '("out" "doc"))
4298 (arguments
4299 `(#:test-target "test"
4300 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4301 #:phases
4302 (modify-phases %standard-phases
4303 (add-after 'build 'build-javadoc ant-build-javadoc)
4304 (add-before 'check 'disable-failing-test
4305 (lambda _
4306 ;; Disable a failing test
4307 (substitute* "src/test/java/org/apache/commons/lang/\
4308 time/FastDateFormatTest.java"
4309 (("public void testFormat\\(\\)")
4310 "public void disabled_testFormat()"))
4311 #t))
4312 (replace 'install (install-jars "target"))
4313 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4314 (native-inputs
4315 `(("java-junit" ,java-junit)))
4316 (home-page "http://commons.apache.org/lang/")
4317 (synopsis "Extension of the java.lang package")
4318 (description "The Commons Lang components contains a set of Java classes
4319 that provide helper methods for standard Java classes, especially those found
4320 in the @code{java.lang} package in the Sun JDK. The following classes are
4321 included:
4322
4323 @itemize
4324 @item StringUtils - Helper for @code{java.lang.String}.
4325 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4326 of characters such as @code{[a-z]} and @code{[abcdez]}.
4327 @item RandomStringUtils - Helper for creating randomised strings.
4328 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4329 @item NumberRange - A range of numbers with an upper and lower bound.
4330 @item ObjectUtils - Helper for @code{java.lang.Object}.
4331 @item SerializationUtils - Helper for serializing objects.
4332 @item SystemUtils - Utility class defining the Java system properties.
4333 @item NestedException package - A sub-package for the creation of nested
4334 exceptions.
4335 @item Enum package - A sub-package for the creation of enumerated types.
4336 @item Builder package - A sub-package for the creation of @code{equals},
4337 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4338 @end itemize\n")
4339 (license license:asl2.0)))
4340
4341 (define-public java-commons-lang3
4342 (package
4343 (name "java-commons-lang3")
4344 (version "3.4")
4345 (source
4346 (origin
4347 (method url-fetch)
4348 (uri (string-append "mirror://apache/commons/lang/source/"
4349 "commons-lang3-" version "-src.tar.gz"))
4350 (sha256
4351 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4352 (build-system ant-build-system)
4353 (outputs '("out" "doc"))
4354 (arguments
4355 `(#:test-target "test"
4356 #:make-flags
4357 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4358 (junit (assoc-ref %build-inputs "java-junit"))
4359 (easymock (assoc-ref %build-inputs "java-easymock"))
4360 (io (assoc-ref %build-inputs "java-commons-io")))
4361 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4362 (string-append "-Dhamcrest.jar=" hamcrest
4363 "/share/java/hamcrest-all.jar")
4364 (string-append "-Dcommons-io.jar=" io
4365 "/share/java/commons-io-"
4366 ,(package-version java-commons-io)
4367 "-SNAPSHOT.jar")
4368 (string-append "-Deasymock.jar=" easymock
4369 "/share/java/easymock.jar")))
4370 #:phases
4371 (modify-phases %standard-phases
4372 (add-after 'build 'build-javadoc ant-build-javadoc)
4373 (replace 'install (install-jars "target"))
4374 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4375 (native-inputs
4376 `(("java-junit" ,java-junit)
4377 ("java-commons-io" ,java-commons-io)
4378 ("java-hamcrest-all" ,java-hamcrest-all)
4379 ("java-easymock" ,java-easymock)))
4380 (home-page "http://commons.apache.org/lang/")
4381 (synopsis "Extension of the java.lang package")
4382 (description "The Commons Lang components contains a set of Java classes
4383 that provide helper methods for standard Java classes, especially those found
4384 in the @code{java.lang} package. The following classes are included:
4385
4386 @itemize
4387 @item StringUtils - Helper for @code{java.lang.String}.
4388 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4389 characters such as @code{[a-z]} and @code{[abcdez]}.
4390 @item RandomStringUtils - Helper for creating randomised strings.
4391 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4392 @item NumberRange - A range of numbers with an upper and lower bound.
4393 @item ObjectUtils - Helper for @code{java.lang.Object}.
4394 @item SerializationUtils - Helper for serializing objects.
4395 @item SystemUtils - Utility class defining the Java system properties.
4396 @item NestedException package - A sub-package for the creation of nested
4397 exceptions.
4398 @item Enum package - A sub-package for the creation of enumerated types.
4399 @item Builder package - A sub-package for the creation of @code{equals},
4400 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4401 @end itemize\n")
4402 (license license:asl2.0)))
4403
4404 (define-public java-commons-bsf
4405 (package
4406 (name "java-commons-bsf")
4407 (version "2.4.0")
4408 (source (origin
4409 (method url-fetch)
4410 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4411 version ".tar.gz"))
4412 (sha256
4413 (base32
4414 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4415 (modules '((guix build utils)))
4416 (snippet
4417 '(begin
4418 (for-each delete-file
4419 (find-files "." "\\.jar$"))
4420 #t))))
4421 (build-system ant-build-system)
4422 (arguments
4423 `(#:build-target "jar"
4424 #:tests? #f; No test file
4425 #:modules ((guix build ant-build-system)
4426 (guix build utils)
4427 (guix build java-utils)
4428 (sxml simple))
4429 #:phases
4430 (modify-phases %standard-phases
4431 (add-before 'build 'create-properties
4432 (lambda _
4433 ;; This file is missing from the distribution
4434 (call-with-output-file "build-properties.xml"
4435 (lambda (port)
4436 (sxml->xml
4437 `(project (@ (basedir ".") (name "build-properties") (default ""))
4438 (property (@ (name "project.name") (value "bsf")))
4439 (property (@ (name "source.level") (value "1.5")))
4440 (property (@ (name "build.lib") (value "build/jar")))
4441 (property (@ (name "src.dir") (value "src")))
4442 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4443 (property (@ (name "build.tests") (value "build/test-classes")))
4444 (property (@ (name "build.dest") (value "build/classes"))))
4445 port)))
4446 #t))
4447 (replace 'install (install-jars "build")))))
4448 (native-inputs
4449 `(("java-junit" ,java-junit)))
4450 (inputs
4451 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4452 (home-page "https://commons.apache.org/proper/commons-bsf")
4453 (synopsis "Bean Scripting Framework")
4454 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4455 which provides scripting language support within Java applications, and access
4456 to Java objects and methods from scripting languages. BSF allows one to write
4457 JSPs in languages other than Java while providing access to the Java class
4458 library. In addition, BSF permits any Java application to be implemented in
4459 part (or dynamically extended) by a language that is embedded within it. This
4460 is achieved by providing an API that permits calling scripting language engines
4461 from within Java, as well as an object registry that exposes Java objects to
4462 these scripting language engines.")
4463 (license license:asl2.0)))
4464
4465 (define-public java-commons-jxpath
4466 (package
4467 (name "java-commons-jxpath")
4468 (version "1.3")
4469 (source (origin
4470 (method url-fetch)
4471 (uri (string-append "mirror://apache/commons/jxpath/source/"
4472 "commons-jxpath-" version "-src.tar.gz"))
4473 (sha256
4474 (base32
4475 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4476 (build-system ant-build-system)
4477 (arguments
4478 `(#:jar-name "commons-jxpath.jar"
4479 ;; tests require more dependencies, including mockrunner which depends on old software
4480 #:tests? #f
4481 #:source-dir "src/java"))
4482 (inputs
4483 `(("servlet" ,java-classpathx-servletapi)
4484 ("java-jdom" ,java-jdom)
4485 ("java-commons-beanutils" ,java-commons-beanutils)))
4486 (native-inputs
4487 `(("java-junit" ,java-junit)))
4488 (home-page "http://commons.apache.org/jxpath/")
4489 (synopsis "Simple interpreter of an expression language called XPath.")
4490 (description "The org.apache.commons.jxpath package defines a simple
4491 interpreter of an expression language called XPath. JXPath applies XPath
4492 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4493 contexts, DOM etc, including mixtures thereof.")
4494 (license license:asl2.0)))
4495
4496 (define-public java-jsr250
4497 (package
4498 (name "java-jsr250")
4499 (version "1.3")
4500 (source (origin
4501 (method url-fetch)
4502 (uri (string-append "https://repo1.maven.org/maven2/"
4503 "javax/annotation/javax.annotation-api/"
4504 version "/javax.annotation-api-"
4505 version "-sources.jar"))
4506 (sha256
4507 (base32
4508 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4509 (build-system ant-build-system)
4510 (arguments
4511 `(#:tests? #f ; no tests included
4512 #:jdk ,icedtea-8
4513 #:jar-name "jsr250.jar"))
4514 (home-page "https://jcp.org/en/jsr/detail?id=250")
4515 (synopsis "Security-related annotations")
4516 (description "This package provides annotations for security. It provides
4517 packages in the @code{javax.annotation} and @code{javax.annotation.security}
4518 namespaces.")
4519 ;; either cddl or gpl2 only, with classpath exception
4520 (license (list license:cddl1.0
4521 license:gpl2))))
4522
4523 (define-public java-jsr305
4524 (package
4525 (name "java-jsr305")
4526 (version "3.0.1")
4527 (source (origin
4528 (method url-fetch)
4529 (uri (string-append "https://repo1.maven.org/maven2/"
4530 "com/google/code/findbugs/"
4531 "jsr305/" version "/jsr305-"
4532 version "-sources.jar"))
4533 (sha256
4534 (base32
4535 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4536 (build-system ant-build-system)
4537 (arguments
4538 `(#:tests? #f ; no tests included
4539 #:jar-name "jsr305.jar"))
4540 (home-page "http://findbugs.sourceforge.net/")
4541 (synopsis "Annotations for the static analyzer called findbugs")
4542 (description "This package provides annotations for the findbugs package.
4543 It provides packages in the @code{javax.annotations} namespace.")
4544 (license license:asl2.0)))
4545
4546 (define-public java-guava
4547 (package
4548 (name "java-guava")
4549 ;; This is the last release of Guava that can be built with Java 7.
4550 (version "20.0")
4551 (source (origin
4552 (method url-fetch)
4553 (uri (string-append "https://github.com/google/guava/"
4554 "releases/download/v" version
4555 "/guava-" version "-sources.jar"))
4556 (sha256
4557 (base32
4558 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4559 (build-system ant-build-system)
4560 (arguments
4561 `(#:tests? #f ; no tests included
4562 #:jar-name "guava.jar"
4563 #:phases
4564 (modify-phases %standard-phases
4565 (add-after 'unpack 'trim-sources
4566 (lambda _
4567 (with-directory-excursion "src/com/google/common"
4568 ;; Remove annotations to avoid extra dependencies:
4569 ;; * "j2objc" annotations are used when converting Java to
4570 ;; Objective C;
4571 ;; * "errorprone" annotations catch common Java mistakes at
4572 ;; compile time;
4573 ;; * "IgnoreJRERequirement" is used for Android.
4574 (substitute* (find-files "." "\\.java$")
4575 (("import com.google.j2objc.*") "")
4576 (("import com.google.errorprone.annotation.*") "")
4577 (("import org.codehaus.mojo.animal_sniffer.*") "")
4578 (("@CanIgnoreReturnValue") "")
4579 (("@LazyInit") "")
4580 (("@WeakOuter") "")
4581 (("@RetainedWith") "")
4582 (("@Weak") "")
4583 (("@ForOverride") "")
4584 (("@J2ObjCIncompatible") "")
4585 (("@IgnoreJRERequirement") "")))
4586 #t)))))
4587 (inputs
4588 `(("java-jsr305" ,java-jsr305)))
4589 (home-page "https://github.com/google/guava")
4590 (synopsis "Google core libraries for Java")
4591 (description "Guava is a set of core libraries that includes new
4592 collection types (such as multimap and multiset), immutable collections, a
4593 graph library, functional types, an in-memory cache, and APIs/utilities for
4594 concurrency, I/O, hashing, primitives, reflection, string processing, and much
4595 more!")
4596 (license license:asl2.0)))
4597
4598 ;; The java-commons-logging package provides adapters to many different
4599 ;; logging frameworks. To avoid an excessive dependency graph we try to build
4600 ;; it with only a minimal set of adapters.
4601 (define-public java-commons-logging-minimal
4602 (package
4603 (name "java-commons-logging-minimal")
4604 (version "1.2")
4605 (source (origin
4606 (method url-fetch)
4607 (uri (string-append "mirror://apache/commons/logging/source/"
4608 "commons-logging-" version "-src.tar.gz"))
4609 (sha256
4610 (base32
4611 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4612 (build-system ant-build-system)
4613 (arguments
4614 `(#:tests? #f ; avoid dependency on logging frameworks
4615 #:jar-name "commons-logging-minimal.jar"
4616 #:phases
4617 (modify-phases %standard-phases
4618 (add-after 'unpack 'delete-adapters-and-tests
4619 (lambda _
4620 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4621 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4622 ;; is used by applications; SimpleLog is the only actually usable
4623 ;; implementation that does not depend on another logging
4624 ;; framework.
4625 (for-each
4626 (lambda (file)
4627 (delete-file (string-append
4628 "src/main/java/org/apache/commons/logging/impl/" file)))
4629 (list "Jdk13LumberjackLogger.java"
4630 "WeakHashtable.java"
4631 "Log4JLogger.java"
4632 "ServletContextCleaner.java"
4633 "Jdk14Logger.java"
4634 "AvalonLogger.java"
4635 "LogKitLogger.java"))
4636 (delete-file-recursively "src/test")
4637 #t)))))
4638 (home-page "http://commons.apache.org/logging/")
4639 (synopsis "Common API for logging implementations")
4640 (description "The Logging package is a thin bridge between different
4641 logging implementations. A library that uses the commons-logging API can be
4642 used with any logging implementation at runtime.")
4643 (license license:asl2.0)))
4644
4645 ;; This is the last release of the 1.x series.
4646 (define-public java-mockito-1
4647 (package
4648 (name "java-mockito")
4649 (version "1.10.19")
4650 (source (origin
4651 (method url-fetch)
4652 (uri (string-append "http://repo1.maven.org/maven2/"
4653 "org/mockito/mockito-core/" version
4654 "/mockito-core-" version "-sources.jar"))
4655 (sha256
4656 (base32
4657 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4658 (build-system ant-build-system)
4659 (arguments
4660 `(#:jar-name "mockito.jar"
4661 #:tests? #f ; no tests included
4662 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4663 ;; patches in build phases.
4664 #:phases
4665 (modify-phases %standard-phases
4666 ;; Mockito was developed against a different version of hamcrest,
4667 ;; which does not require matcher implementations to provide an
4668 ;; implementation of the "describeMismatch" method. We add this
4669 ;; simple definition to pass the build with our version of hamcrest.
4670 (add-after 'unpack 'fix-hamcrest-build-error
4671 (lambda _
4672 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4673 (("public Matcher getActualMatcher\\(\\) .*" line)
4674 (string-append "
4675 public void describeMismatch(Object item, Description description) {
4676 actualMatcher.describeMismatch(item, description);
4677 }"
4678 line)))
4679 #t))
4680 ;; Mockito bundles cglib. We have a cglib package, so let's use
4681 ;; that instead.
4682 (add-after 'unpack 'use-system-libraries
4683 (lambda _
4684 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4685 (substitute* '("CGLIBHacker.java"
4686 "CglibMockMaker.java"
4687 "ClassImposterizer.java"
4688 "DelegatingMockitoMethodProxy.java"
4689 "MethodInterceptorFilter.java"
4690 "MockitoNamingPolicy.java"
4691 "SerializableMockitoMethodProxy.java"
4692 "SerializableNoOp.java")
4693 (("import org.mockito.cglib") "import net.sf.cglib")))
4694 #t)))))
4695 (inputs
4696 `(("java-junit" ,java-junit)
4697 ("java-objenesis" ,java-objenesis)
4698 ("java-cglib" ,java-cglib)
4699 ("java-hamcrest-core" ,java-hamcrest-core)))
4700 (home-page "http://mockito.org")
4701 (synopsis "Mockito is a mock library for Java")
4702 (description "Mockito is a mocking library for Java which lets you write
4703 tests with a clean and simple API. It generates mocks using reflection, and
4704 it records all mock invocations, including methods arguments.")
4705 (license license:asl2.0)))
4706
4707 (define-public java-httpcomponents-httpcore
4708 (package
4709 (name "java-httpcomponents-httpcore")
4710 (version "4.4.6")
4711 (source (origin
4712 (method url-fetch)
4713 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4714 "source/httpcomponents-core-"
4715 version "-src.tar.gz"))
4716 (sha256
4717 (base32
4718 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4719 (build-system ant-build-system)
4720 (arguments
4721 `(#:jar-name "httpcomponents-httpcore.jar"
4722 #:phases
4723 (modify-phases %standard-phases
4724 (add-after 'unpack 'chdir
4725 (lambda _ (chdir "httpcore") #t)))))
4726 (inputs
4727 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4728 ("java-commons-lang3" ,java-commons-lang3)))
4729 (native-inputs
4730 `(("java-junit" ,java-junit)
4731 ("java-mockito" ,java-mockito-1)))
4732 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4733 (synopsis "Low level HTTP transport components")
4734 (description "HttpCore is a set of low level HTTP transport components
4735 that can be used to build custom client and server side HTTP services with a
4736 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4737 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4738 NIO.
4739
4740 This package provides the blocking I/O model library.")
4741 (license license:asl2.0)))
4742
4743 (define-public java-httpcomponents-httpcore-nio
4744 (package (inherit java-httpcomponents-httpcore)
4745 (name "java-httpcomponents-httpcore-nio")
4746 (arguments
4747 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4748 #:phases
4749 (modify-phases %standard-phases
4750 (add-after 'unpack 'chdir
4751 (lambda _ (chdir "httpcore-nio") #t)))))
4752 (inputs
4753 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4754 ("java-hamcrest-core" ,java-hamcrest-core)
4755 ,@(package-inputs java-httpcomponents-httpcore)))
4756 (description "HttpCore is a set of low level HTTP transport components
4757 that can be used to build custom client and server side HTTP services with a
4758 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4759 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4760 NIO.
4761
4762 This package provides the non-blocking I/O model library based on Java
4763 NIO.")))
4764
4765 (define-public java-httpcomponents-httpcore-ab
4766 (package (inherit java-httpcomponents-httpcore)
4767 (name "java-httpcomponents-httpcore-ab")
4768 (arguments
4769 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4770 #:phases
4771 (modify-phases %standard-phases
4772 (add-after 'unpack 'chdir
4773 (lambda _ (chdir "httpcore-ab") #t)))))
4774 (inputs
4775 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4776 ("java-commons-cli" ,java-commons-cli)
4777 ("java-hamcrest-core" ,java-hamcrest-core)
4778 ,@(package-inputs java-httpcomponents-httpcore)))
4779 (synopsis "Apache HttpCore benchmarking tool")
4780 (description "This package provides the HttpCore benchmarking tool. It is
4781 an Apache AB clone based on HttpCore.")))
4782
4783 (define-public java-httpcomponents-httpclient
4784 (package
4785 (name "java-httpcomponents-httpclient")
4786 (version "4.5.3")
4787 (source (origin
4788 (method url-fetch)
4789 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4790 "source/httpcomponents-client-"
4791 version "-src.tar.gz"))
4792 (sha256
4793 (base32
4794 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4795 (build-system ant-build-system)
4796 (arguments
4797 `(#:jar-name "httpcomponents-httpclient.jar"
4798 #:phases
4799 (modify-phases %standard-phases
4800 (add-after 'unpack 'chdir
4801 (lambda _ (chdir "httpclient") #t)))))
4802 (inputs
4803 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4804 ("java-commons-codec" ,java-commons-codec)
4805 ("java-hamcrest-core" ,java-hamcrest-core)
4806 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4807 ("java-mockito" ,java-mockito-1)
4808 ("java-junit" ,java-junit)))
4809 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4810 (synopsis "HTTP client library for Java")
4811 (description "Although the @code{java.net} package provides basic
4812 functionality for accessing resources via HTTP, it doesn't provide the full
4813 flexibility or functionality needed by many applications. @code{HttpClient}
4814 seeks to fill this void by providing an efficient, up-to-date, and
4815 feature-rich package implementing the client side of the most recent HTTP
4816 standards and recommendations.")
4817 (license license:asl2.0)))
4818
4819 (define-public java-httpcomponents-httpmime
4820 (package (inherit java-httpcomponents-httpclient)
4821 (name "java-httpcomponents-httpmime")
4822 (arguments
4823 `(#:jar-name "httpcomponents-httpmime.jar"
4824 #:phases
4825 (modify-phases %standard-phases
4826 (add-after 'unpack 'chdir
4827 (lambda _ (chdir "httpmime") #t)))))
4828 (inputs
4829 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4830 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4831 ("java-junit" ,java-junit)
4832 ("java-hamcrest-core" ,java-hamcrest-core)))))
4833
4834 (define-public java-commons-net
4835 (package
4836 (name "java-commons-net")
4837 (version "3.6")
4838 (source (origin
4839 (method url-fetch)
4840 (uri (string-append "mirror://apache/commons/net/source/"
4841 "commons-net-" version "-src.tar.gz"))
4842 (sha256
4843 (base32
4844 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4845 (build-system ant-build-system)
4846 (arguments
4847 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4848 ;; should be "resources/examples/examples.properties"), but gets "null"
4849 ;; instead.
4850 #:tests? #f
4851 #:jar-name "commons-net.jar"))
4852 (native-inputs
4853 `(("java-junit" ,java-junit)
4854 ("java-hamcrest-core" ,java-hamcrest-core)))
4855 (home-page "http://commons.apache.org/net/")
4856 (synopsis "Client library for many basic Internet protocols")
4857 (description "The Apache Commons Net library implements the client side of
4858 many basic Internet protocols. The purpose of the library is to provide
4859 fundamental protocol access, not higher-level abstractions.")
4860 (license license:asl2.0)))
4861
4862 (define-public java-jsch
4863 (package
4864 (name "java-jsch")
4865 (version "0.1.54")
4866 (source (origin
4867 (method url-fetch)
4868 (uri (string-append "mirror://sourceforge/jsch/jsch/"
4869 version "/jsch-" version ".zip"))
4870 (sha256
4871 (base32
4872 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
4873 (build-system ant-build-system)
4874 (arguments
4875 `(#:build-target "dist"
4876 #:tests? #f ; no tests included
4877 #:phases
4878 (modify-phases %standard-phases
4879 (replace 'install (install-jars "dist")))))
4880 (native-inputs
4881 `(("unzip" ,unzip)))
4882 (home-page "http://www.jcraft.com/jsch/")
4883 (synopsis "Pure Java implementation of SSH2")
4884 (description "JSch is a pure Java implementation of SSH2. JSch allows you
4885 to connect to an SSH server and use port forwarding, X11 forwarding, file
4886 transfer, etc., and you can integrate its functionality into your own Java
4887 programs.")
4888 (license license:bsd-3)))
4889
4890 (define-public java-commons-compress
4891 (package
4892 (name "java-commons-compress")
4893 (version "1.13")
4894 (source (origin
4895 (method url-fetch)
4896 (uri (string-append "mirror://apache/commons/compress/source/"
4897 "commons-compress-" version "-src.tar.gz"))
4898 (sha256
4899 (base32
4900 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
4901 (build-system ant-build-system)
4902 (arguments
4903 `(#:jar-name "commons-compress.jar"
4904 #:phases
4905 (modify-phases %standard-phases
4906 (add-after 'unpack 'delete-bad-tests
4907 (lambda _
4908 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
4909 ;; FIXME: These tests really should not fail. Maybe they are
4910 ;; indicative of problems with our Java packaging work.
4911
4912 ;; This test fails with a null pointer exception.
4913 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
4914 ;; This test fails to open test resources.
4915 (delete-file "archivers/zip/ExplodeSupportTest.java")
4916
4917 ;; FIXME: This test adds a dependency on powermock, which is hard to
4918 ;; package at this point.
4919 ;; https://github.com/powermock/powermock
4920 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
4921 #t)))))
4922 (inputs
4923 `(("java-junit" ,java-junit)
4924 ("java-hamcrest-core" ,java-hamcrest-core)
4925 ("java-mockito" ,java-mockito-1)
4926 ("java-xz" ,java-xz)))
4927 (home-page "https://commons.apache.org/proper/commons-compress/")
4928 (synopsis "Java library for working with compressed files")
4929 (description "The Apache Commons Compress library defines an API for
4930 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
4931 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
4932 (license license:asl2.0)))
4933
4934 (define-public java-commons-csv
4935 (package
4936 (name "java-commons-csv")
4937 (version "1.4")
4938 (source (origin
4939 (method url-fetch)
4940 (uri (string-append "mirror://apache/commons/csv/source/"
4941 "commons-csv-" version "-src.tar.gz"))
4942 (sha256
4943 (base32
4944 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
4945 (build-system ant-build-system)
4946 (arguments
4947 `(#:jar-name "commons-csv.jar"
4948 #:source-dir "src/main/java"
4949 #:tests? #f)); FIXME: requires java-h2
4950 (inputs
4951 `(("java-hamcrest-core" ,java-hamcrest-core)
4952 ("java-commons-io" ,java-commons-io)
4953 ("java-commons-lang3" ,java-commons-lang3)
4954 ("junit" ,java-junit)))
4955 (home-page "https://commons.apache.org/proper/commons-csv/")
4956 (synopsis "Read and write CSV documents")
4957 (description "Commons CSV reads and writes files in variations of the Comma
4958 Separated Value (CSV) format. The most common CSV formats are predefined in the
4959 CSVFormat class:
4960
4961 @itemize
4962 @item Microsoft Excel
4963 @item Informix UNLOAD
4964 @item Informix UNLOAD CSV
4965 @item MySQL
4966 @item RFC 4180
4967 @item TDF
4968 @end itemize
4969
4970 Custom formats can be created using a fluent style API.")
4971 (license license:asl2.0)))
4972
4973 (define-public java-osgi-annotation
4974 (package
4975 (name "java-osgi-annotation")
4976 (version "6.0.0")
4977 (source (origin
4978 (method url-fetch)
4979 (uri (string-append "https://repo1.maven.org/maven2/"
4980 "org/osgi/org.osgi.annotation/" version "/"
4981 "org.osgi.annotation-" version "-sources.jar"))
4982 (sha256
4983 (base32
4984 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
4985 (build-system ant-build-system)
4986 (arguments
4987 `(#:tests? #f ; no tests
4988 #:jar-name "osgi-annotation.jar"))
4989 (home-page "https://www.osgi.org")
4990 (synopsis "Annotation module of OSGi framework")
4991 (description
4992 "OSGi, for Open Services Gateway initiative framework, is a module system
4993 and service platform for the Java programming language. This package contains
4994 the OSGi annotation module, providing additional services to help dynamic
4995 components.")
4996 (license license:asl2.0)))
4997
4998 (define-public java-osgi-core
4999 (package
5000 (name "java-osgi-core")
5001 (version "6.0.0")
5002 (source (origin
5003 (method url-fetch)
5004 (uri (string-append "https://repo1.maven.org/maven2/"
5005 "org/osgi/org.osgi.core/" version "/"
5006 "org.osgi.core-" version "-sources.jar"))
5007 (sha256
5008 (base32
5009 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5010 (build-system ant-build-system)
5011 (arguments
5012 `(#:tests? #f ; no tests
5013 #:jar-name "osgi-core.jar"))
5014 (inputs
5015 `(("java-osgi-annotation" ,java-osgi-annotation)))
5016 (home-page "https://www.osgi.org")
5017 (synopsis "Core module of OSGi framework")
5018 (description
5019 "OSGi, for Open Services Gateway initiative framework, is a module system
5020 and service platform for the Java programming language. This package contains
5021 the OSGi Core module.")
5022 (license license:asl2.0)))
5023
5024 (define-public java-osgi-service-event
5025 (package
5026 (name "java-osgi-service-event")
5027 (version "1.3.1")
5028 (source (origin
5029 (method url-fetch)
5030 (uri (string-append "https://repo1.maven.org/maven2/"
5031 "org/osgi/org.osgi.service.event/"
5032 version "/org.osgi.service.event-"
5033 version "-sources.jar"))
5034 (sha256
5035 (base32
5036 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5037 (build-system ant-build-system)
5038 (arguments
5039 `(#:tests? #f ; no tests
5040 #:jar-name "osgi-service-event.jar"))
5041 (inputs
5042 `(("java-osgi-annotation" ,java-osgi-annotation)
5043 ("java-osgi-core" ,java-osgi-core)))
5044 (home-page "https://www.osgi.org")
5045 (synopsis "OSGi service event module")
5046 (description
5047 "OSGi, for Open Services Gateway initiative framework, is a module system
5048 and service platform for the Java programming language. This package contains
5049 the OSGi @code{org.osgi.service.event} module.")
5050 (license license:asl2.0)))
5051
5052 (define-public java-eclipse-osgi
5053 (package
5054 (name "java-eclipse-osgi")
5055 (version "3.11.3")
5056 (source (origin
5057 (method url-fetch)
5058 (uri (string-append "https://repo1.maven.org/maven2/"
5059 "org/eclipse/platform/org.eclipse.osgi/"
5060 version "/org.eclipse.osgi-"
5061 version "-sources.jar"))
5062 (sha256
5063 (base32
5064 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5065 (build-system ant-build-system)
5066 (arguments
5067 `(#:tests? #f ; no tests included
5068 #:jar-name "eclipse-equinox-osgi.jar"))
5069 (inputs
5070 `(("java-osgi-annotation" ,java-osgi-annotation)))
5071 (home-page "http://www.eclipse.org/equinox/")
5072 (synopsis "Eclipse Equinox OSGi framework")
5073 (description "This package provides an implementation of the OSGi Core
5074 specification.")
5075 (license license:epl1.0)))
5076
5077 (define-public java-eclipse-equinox-common
5078 (package
5079 (name "java-eclipse-equinox-common")
5080 (version "3.8.0")
5081 (source (origin
5082 (method url-fetch)
5083 (uri (string-append "https://repo1.maven.org/maven2/"
5084 "org/eclipse/platform/org.eclipse.equinox.common/"
5085 version "/org.eclipse.equinox.common-"
5086 version "-sources.jar"))
5087 (sha256
5088 (base32
5089 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
5090 (build-system ant-build-system)
5091 (arguments
5092 `(#:tests? #f ; no tests included
5093 #:jar-name "eclipse-equinox-common.jar"))
5094 (inputs
5095 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5096 (home-page "http://www.eclipse.org/equinox/")
5097 (synopsis "Common Eclipse runtime")
5098 (description "This package provides the common Eclipse runtime.")
5099 (license license:epl1.0)))
5100
5101 (define-public java-eclipse-core-jobs
5102 (package
5103 (name "java-eclipse-core-jobs")
5104 (version "3.8.0")
5105 (source (origin
5106 (method url-fetch)
5107 (uri (string-append "https://repo1.maven.org/maven2/"
5108 "org/eclipse/platform/org.eclipse.core.jobs/"
5109 version "/org.eclipse.core.jobs-"
5110 version "-sources.jar"))
5111 (sha256
5112 (base32
5113 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5114 (build-system ant-build-system)
5115 (arguments
5116 `(#:tests? #f ; no tests included
5117 #:jar-name "eclipse-core-jobs.jar"))
5118 (inputs
5119 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5120 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5121 (home-page "http://www.eclipse.org/equinox/")
5122 (synopsis "Eclipse jobs mechanism")
5123 (description "This package provides the Eclipse jobs mechanism.")
5124 (license license:epl1.0)))
5125
5126 (define-public java-eclipse-equinox-registry
5127 (package
5128 (name "java-eclipse-equinox-registry")
5129 (version "3.6.100")
5130 (source (origin
5131 (method url-fetch)
5132 (uri (string-append "https://repo1.maven.org/maven2/"
5133 "org/eclipse/platform/org.eclipse.equinox.registry/"
5134 version "/org.eclipse.equinox.registry-"
5135 version "-sources.jar"))
5136 (sha256
5137 (base32
5138 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5139 (build-system ant-build-system)
5140 (arguments
5141 `(#:tests? #f ; no tests included
5142 #:jar-name "eclipse-equinox-registry.jar"))
5143 (inputs
5144 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5145 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5146 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5147 (home-page "http://www.eclipse.org/equinox/")
5148 (synopsis "Eclipse extension registry support")
5149 (description "This package provides support for the Eclipse extension
5150 registry.")
5151 (license license:epl1.0)))
5152
5153 (define-public java-eclipse-equinox-app
5154 (package
5155 (name "java-eclipse-equinox-app")
5156 (version "1.3.400")
5157 (source (origin
5158 (method url-fetch)
5159 (uri (string-append "https://repo1.maven.org/maven2/"
5160 "org/eclipse/platform/org.eclipse.equinox.app/"
5161 version "/org.eclipse.equinox.app-"
5162 version "-sources.jar"))
5163 (sha256
5164 (base32
5165 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5166 (build-system ant-build-system)
5167 (arguments
5168 `(#:tests? #f ; no tests included
5169 #:jar-name "eclipse-equinox-app.jar"))
5170 (inputs
5171 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5172 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5173 ("java-eclipse-osgi" ,java-eclipse-osgi)
5174 ("java-osgi-service-event" ,java-osgi-service-event)))
5175 (home-page "http://www.eclipse.org/equinox/")
5176 (synopsis "Equinox application container")
5177 (description "This package provides the Equinox application container for
5178 Eclipse.")
5179 (license license:epl1.0)))
5180
5181 (define-public java-eclipse-equinox-preferences
5182 (package
5183 (name "java-eclipse-equinox-preferences")
5184 (version "3.6.1")
5185 (source (origin
5186 (method url-fetch)
5187 (uri (string-append "https://repo1.maven.org/maven2/"
5188 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5189 version "/org.eclipse.equinox.preferences-"
5190 version "-sources.jar"))
5191 (sha256
5192 (base32
5193 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5194 (build-system ant-build-system)
5195 (arguments
5196 `(#:tests? #f ; no tests included
5197 #:jar-name "eclipse-equinox-preferences.jar"))
5198 (inputs
5199 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5200 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5201 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5202 (home-page "http://www.eclipse.org/equinox/")
5203 (synopsis "Eclipse preferences mechanism")
5204 (description "This package provides the Eclipse preferences mechanism with
5205 the module @code{org.eclipse.equinox.preferences}.")
5206 (license license:epl1.0)))
5207
5208 (define-public java-eclipse-core-contenttype
5209 (package
5210 (name "java-eclipse-core-contenttype")
5211 (version "3.5.100")
5212 (source (origin
5213 (method url-fetch)
5214 (uri (string-append "https://repo1.maven.org/maven2/"
5215 "org/eclipse/platform/org.eclipse.core.contenttype/"
5216 version "/org.eclipse.core.contenttype-"
5217 version "-sources.jar"))
5218 (sha256
5219 (base32
5220 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5221 (build-system ant-build-system)
5222 (arguments
5223 `(#:tests? #f ; no tests included
5224 #:jar-name "eclipse-core-contenttype.jar"))
5225 (inputs
5226 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5227 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5228 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5229 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5230 (home-page "http://www.eclipse.org/")
5231 (synopsis "Eclipse content mechanism")
5232 (description "This package provides the Eclipse content mechanism in the
5233 @code{org.eclipse.core.contenttype} module.")
5234 (license license:epl1.0)))
5235
5236 (define-public java-eclipse-core-runtime
5237 (package
5238 (name "java-eclipse-core-runtime")
5239 (version "3.12.0")
5240 (source (origin
5241 (method url-fetch)
5242 (uri (string-append "https://repo1.maven.org/maven2/"
5243 "org/eclipse/platform/org.eclipse.core.runtime/"
5244 version "/org.eclipse.core.runtime-"
5245 version "-sources.jar"))
5246 (sha256
5247 (base32
5248 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5249 (build-system ant-build-system)
5250 (arguments
5251 `(#:tests? #f ; no tests included
5252 #:jar-name "eclipse-core-runtime.jar"))
5253 (inputs
5254 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5255 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5256 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5257 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5258 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5259 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5260 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5261 (home-page "https://www.eclipse.org/")
5262 (synopsis "Eclipse core runtime")
5263 (description "This package provides the Eclipse core runtime with the
5264 module @code{org.eclipse.core.runtime}.")
5265 (license license:epl1.0)))
5266
5267 (define-public java-eclipse-core-filesystem
5268 (package
5269 (name "java-eclipse-core-filesystem")
5270 (version "1.6.1")
5271 (source (origin
5272 (method url-fetch)
5273 (uri (string-append "https://repo1.maven.org/maven2/"
5274 "org/eclipse/platform/org.eclipse.core.filesystem/"
5275 version "/org.eclipse.core.filesystem-"
5276 version "-sources.jar"))
5277 (sha256
5278 (base32
5279 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5280 (build-system ant-build-system)
5281 (arguments
5282 `(#:tests? #f ; no tests included
5283 #:jar-name "eclipse-core-filesystem.jar"))
5284 (inputs
5285 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5286 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5287 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5288 (home-page "https://www.eclipse.org/")
5289 (synopsis "Eclipse core file system")
5290 (description "This package provides the Eclipse core file system with the
5291 module @code{org.eclipse.core.filesystem}.")
5292 (license license:epl1.0)))
5293
5294 (define-public java-eclipse-core-expressions
5295 (package
5296 (name "java-eclipse-core-expressions")
5297 (version "3.5.100")
5298 (source (origin
5299 (method url-fetch)
5300 (uri (string-append "https://repo1.maven.org/maven2/"
5301 "org/eclipse/platform/org.eclipse.core.expressions/"
5302 version "/org.eclipse.core.expressions-"
5303 version "-sources.jar"))
5304 (sha256
5305 (base32
5306 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5307 (build-system ant-build-system)
5308 (arguments
5309 `(#:tests? #f ; no tests included
5310 #:jar-name "eclipse-core-expressions.jar"))
5311 (inputs
5312 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5313 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5314 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5315 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5316 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5317 (home-page "https://www.eclipse.org/")
5318 (synopsis "Eclipse core expression language")
5319 (description "This package provides the Eclipse core expression language
5320 with the @code{org.eclipse.core.expressions} module.")
5321 (license license:epl1.0)))
5322
5323 (define-public java-eclipse-core-variables
5324 (package
5325 (name "java-eclipse-core-variables")
5326 (version "3.3.0")
5327 (source (origin
5328 (method url-fetch)
5329 (uri (string-append "https://repo1.maven.org/maven2/"
5330 "org/eclipse/platform/org.eclipse.core.variables/"
5331 version "/org.eclipse.core.variables-"
5332 version "-sources.jar"))
5333 (sha256
5334 (base32
5335 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5336 (build-system ant-build-system)
5337 (arguments
5338 `(#:tests? #f ; no tests included
5339 #:jar-name "eclipse-core-variables.jar"))
5340 (inputs
5341 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5342 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5343 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5344 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5345 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5346 (home-page "https://www.eclipse.org/platform")
5347 (synopsis "Eclipse core variables")
5348 (description "This package provides the Eclipse core variables module
5349 @code{org.eclipse.core.variables}.")
5350 (license license:epl1.0)))
5351
5352 (define-public java-eclipse-ant-core
5353 (package
5354 (name "java-eclipse-ant-core")
5355 (version "3.4.100")
5356 (source (origin
5357 (method url-fetch)
5358 (uri (string-append "https://repo1.maven.org/maven2/"
5359 "org/eclipse/platform/org.eclipse.ant.core/"
5360 version "/org.eclipse.ant.core-"
5361 version "-sources.jar"))
5362 (sha256
5363 (base32
5364 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5365 (build-system ant-build-system)
5366 (arguments
5367 `(#:tests? #f ; no tests included
5368 #:jar-name "eclipse-ant-core.jar"))
5369 (inputs
5370 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5371 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5372 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5373 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5374 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5375 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5376 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5377 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5378 (home-page "https://www.eclipse.org/platform")
5379 (synopsis "Ant build tool core libraries")
5380 (description "This package provides the ant build tool core libraries with
5381 the module @code{org.eclipse.ant.core}.")
5382 (license license:epl1.0)))
5383
5384 (define-public java-eclipse-core-resources
5385 (package
5386 (name "java-eclipse-core-resources")
5387 (version "3.11.1")
5388 (source (origin
5389 (method url-fetch)
5390 (uri (string-append "https://repo1.maven.org/maven2/"
5391 "org/eclipse/platform/org.eclipse.core.resources/"
5392 version "/org.eclipse.core.resources-"
5393 version "-sources.jar"))
5394 (sha256
5395 (base32
5396 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5397 (build-system ant-build-system)
5398 (arguments
5399 `(#:tests? #f ; no tests included
5400 #:jar-name "eclipse-core-resources.jar"))
5401 (inputs
5402 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5403 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5404 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5405 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5406 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5407 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5408 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5409 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5410 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5411 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5412 (home-page "https://www.eclipse.org/")
5413 (synopsis "Eclipse core resource management")
5414 (description "This package provides the Eclipse core resource management
5415 module @code{org.eclipse.core.resources}.")
5416 (license license:epl1.0)))
5417
5418 (define-public java-eclipse-compare-core
5419 (package
5420 (name "java-eclipse-compare-core")
5421 (version "3.6.0")
5422 (source (origin
5423 (method url-fetch)
5424 (uri (string-append "https://repo1.maven.org/maven2/"
5425 "org/eclipse/platform/org.eclipse.compare.core/"
5426 version "/org.eclipse.compare.core-"
5427 version "-sources.jar"))
5428 (sha256
5429 (base32
5430 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5431 (build-system ant-build-system)
5432 (arguments
5433 `(#:tests? #f ; no tests included
5434 #:jar-name "eclipse-compare-core.jar"))
5435 (inputs
5436 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5437 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5438 ("java-eclipse-osgi" ,java-eclipse-osgi)
5439 ("java-icu4j" ,java-icu4j)))
5440 (home-page "https://www.eclipse.org/")
5441 (synopsis "Eclipse core compare support")
5442 (description "This package provides the Eclipse core compare support
5443 module @code{org.eclipse.compare.core}.")
5444 (license license:epl1.0)))
5445
5446 (define-public java-eclipse-team-core
5447 (package
5448 (name "java-eclipse-team-core")
5449 (version "3.8.0")
5450 (source (origin
5451 (method url-fetch)
5452 (uri (string-append "https://repo1.maven.org/maven2/"
5453 "org/eclipse/platform/org.eclipse.team.core/"
5454 version "/org.eclipse.team.core-"
5455 version "-sources.jar"))
5456 (sha256
5457 (base32
5458 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5459 (build-system ant-build-system)
5460 (arguments
5461 `(#:tests? #f ; no tests included
5462 #:jar-name "eclipse-team-core.jar"))
5463 (inputs
5464 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5465 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5466 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5467 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5468 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5469 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5470 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5471 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5472 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5473 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5474 (home-page "https://www.eclipse.org/platform")
5475 (synopsis "Eclipse team support core")
5476 (description "This package provides the Eclipse team support core module
5477 @code{org.eclipse.team.core}.")
5478 (license license:epl1.0)))
5479
5480 (define-public java-eclipse-core-commands
5481 (package
5482 (name "java-eclipse-core-commands")
5483 (version "3.8.1")
5484 (source (origin
5485 (method url-fetch)
5486 (uri (string-append "https://repo1.maven.org/maven2/"
5487 "org/eclipse/platform/org.eclipse.core.commands/"
5488 version "/org.eclipse.core.commands-"
5489 version "-sources.jar"))
5490 (sha256
5491 (base32
5492 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5493 (build-system ant-build-system)
5494 (arguments
5495 `(#:tests? #f ; no tests included
5496 #:jar-name "eclipse-core-commands.jar"))
5497 (inputs
5498 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5499 (home-page "https://www.eclipse.org/platform")
5500 (synopsis "Eclipse core commands")
5501 (description "This package provides Eclipse core commands in the module
5502 @code{org.eclipse.core.commands}.")
5503 (license license:epl1.0)))
5504
5505 (define-public java-eclipse-text
5506 (package
5507 (name "java-eclipse-text")
5508 (version "3.6.0")
5509 (source (origin
5510 (method url-fetch)
5511 (uri (string-append "https://repo1.maven.org/maven2/"
5512 "org/eclipse/platform/org.eclipse.text/"
5513 version "/org.eclipse.text-"
5514 version "-sources.jar"))
5515 (sha256
5516 (base32
5517 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5518 (build-system ant-build-system)
5519 (arguments
5520 `(#:tests? #f ; no tests included
5521 #:jar-name "eclipse-text.jar"
5522 #:phases
5523 (modify-phases %standard-phases
5524 ;; When creating a new category we must make sure that the new list
5525 ;; matches List<Position>. By default it seems to be too generic
5526 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5527 ;; Without this we get this error:
5528 ;;
5529 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5530 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5531 ;; [javac] fPositions.put(category, new ArrayList<>());
5532 ;; [javac] ^
5533 ;; [javac] required: String,List<Position>
5534 ;; [javac] found: String,ArrayList<Object>
5535 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5536 ;; to List<Position> by method invocation conversion
5537 ;; [javac] where K,V are type-variables:
5538 ;; [javac] K extends Object declared in interface Map
5539 ;; [javac] V extends Object declared in interface Map
5540 ;;
5541 ;; I don't know if this is a good fix. I suspect it is not, but it
5542 ;; seems to work.
5543 (add-after 'unpack 'fix-compilation-error
5544 (lambda _
5545 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5546 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5547 "Positions.put(category, new ArrayList<Position>());"))
5548 #t)))))
5549 (inputs
5550 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5551 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5552 ("java-icu4j" ,java-icu4j)))
5553 (home-page "http://www.eclipse.org/platform")
5554 (synopsis "Eclipse text library")
5555 (description "Platform Text is part of the Platform UI project and
5556 provides the basic building blocks for text and text editors within Eclipse
5557 and contributes the Eclipse default text editor.")
5558 (license license:epl1.0)))
5559
5560 (define-public java-eclipse-jdt-core
5561 (package
5562 (name "java-eclipse-jdt-core")
5563 (version "3.12.3")
5564 (source (origin
5565 (method url-fetch)
5566 (uri (string-append "https://repo1.maven.org/maven2/"
5567 "org/eclipse/jdt/org.eclipse.jdt.core/"
5568 version "/org.eclipse.jdt.core-"
5569 version "-sources.jar"))
5570 (sha256
5571 (base32
5572 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5573 (build-system ant-build-system)
5574 (arguments
5575 `(#:tests? #f ; no tests included
5576 #:jar-name "eclipse-jdt-core.jar"))
5577 (inputs
5578 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5579 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5580 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5581 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5582 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5583 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5584 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5585 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5586 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5587 ("java-eclipse-osgi" ,java-eclipse-osgi)
5588 ("java-eclipse-text" ,java-eclipse-text)))
5589 (home-page "https://www.eclipse.org/jdt")
5590 (synopsis "Java development tools core libraries")
5591 (description "This package provides the core libraries of the Eclipse Java
5592 development tools.")
5593 (license license:epl1.0)))
5594
5595 (define-public java-javax-mail
5596 (package
5597 (name "java-javax-mail")
5598 (version "1.5.6")
5599 (source (origin
5600 (method url-fetch)
5601 (uri (string-append "https://repo1.maven.org/maven2/"
5602 "com/sun/mail/javax.mail/"
5603 version "/javax.mail-"
5604 version "-sources.jar"))
5605 (sha256
5606 (base32
5607 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5608 (build-system ant-build-system)
5609 (arguments
5610 `(#:tests? #f ; no tests
5611 #:jar-name "javax-mail.jar"))
5612 (home-page "https://javamail.java.net")
5613 (synopsis "Reference implementation of the JavaMail API")
5614 (description
5615 "This package provides versions of the JavaMail API implementation, IMAP,
5616 SMTP, and POP3 service providers, some examples, and documentation for the
5617 JavaMail API.")
5618 ;; GPLv2 only with "classpath exception".
5619 (license license:gpl2)))
5620
5621 (define-public java-log4j-api
5622 (package
5623 (name "java-log4j-api")
5624 (version "2.4.1")
5625 (source (origin
5626 (method url-fetch)
5627 (uri (string-append "mirror://apache/logging/log4j/" version
5628 "/apache-log4j-" version "-src.tar.gz"))
5629 (sha256
5630 (base32
5631 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5632 (build-system ant-build-system)
5633 (arguments
5634 `(#:tests? #f ; tests require unpackaged software
5635 #:jar-name "log4j-api.jar"
5636 #:make-flags
5637 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5638 "/share/java"))
5639 #:phases
5640 (modify-phases %standard-phases
5641 (add-after 'unpack 'enter-dir
5642 (lambda _ (chdir "log4j-api") #t))
5643 ;; FIXME: The tests require additional software that has not been
5644 ;; packaged yet, such as
5645 ;; * org.apache.maven
5646 ;; * org.apache.felix
5647 (add-after 'enter-dir 'delete-tests
5648 (lambda _ (delete-file-recursively "src/test") #t)))))
5649 (inputs
5650 `(("java-osgi-core" ,java-osgi-core)
5651 ("java-hamcrest-core" ,java-hamcrest-core)
5652 ("java-junit" ,java-junit)))
5653 (home-page "http://logging.apache.org/log4j/2.x/")
5654 (synopsis "API module of the Log4j logging framework for Java")
5655 (description
5656 "This package provides the API module of the Log4j logging framework for
5657 Java.")
5658 (license license:asl2.0)))
5659
5660 (define-public java-log4j-core
5661 (package
5662 (inherit java-log4j-api)
5663 (name "java-log4j-core")
5664 (inputs
5665 `(("java-osgi-core" ,java-osgi-core)
5666 ("java-hamcrest-core" ,java-hamcrest-core)
5667 ("java-log4j-api" ,java-log4j-api)
5668 ("java-mail" ,java-mail)
5669 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5670 ("java-lmax-disruptor" ,java-lmax-disruptor)
5671 ("java-kafka" ,java-kafka-clients)
5672 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5673 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5674 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5675 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5676 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5677 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5678 ("java-commons-compress" ,java-commons-compress)
5679 ("java-commons-csv" ,java-commons-csv)
5680 ("java-jeromq" ,java-jeromq)
5681 ("java-junit" ,java-junit)))
5682 (native-inputs
5683 `(("hamcrest" ,java-hamcrest-all)
5684 ("java-commons-io" ,java-commons-io)
5685 ("java-commons-lang3" ,java-commons-lang3)
5686 ("slf4j" ,java-slf4j-api)))
5687 (arguments
5688 `(#:tests? #f ; tests require more dependencies
5689 #:test-dir "src/test"
5690 #:source-dir "src/main/java"
5691 #:jar-name "log4j-core.jar"
5692 #:jdk ,icedtea-8
5693 #:make-flags
5694 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5695 "/share/java"))
5696 #:phases
5697 (modify-phases %standard-phases
5698 (add-after 'unpack 'enter-dir
5699 (lambda _ (chdir "log4j-core") #t)))))
5700 (synopsis "Core component of the Log4j framework")
5701 (description "This package provides the core component of the Log4j
5702 logging framework for Java.")))
5703
5704 (define-public java-log4j-1.2-api
5705 (package
5706 (inherit java-log4j-api)
5707 (name "java-log4j-1.2-api")
5708 (arguments
5709 `(#:jar-name "java-log4j-1.2-api.jar"
5710 #:source-dir "log4j-1.2-api/src/main/java"
5711 #:jdk ,icedtea-8
5712 ;; Tests require maven-model (and other maven subprojects), which is a
5713 ;; cyclic dependency.
5714 #:tests? #f))
5715 (inputs
5716 `(("log4j-api" ,java-log4j-api)
5717 ("log4j-core" ,java-log4j-core)
5718 ("osgi-core" ,java-osgi-core)
5719 ("eclipse-osgi" ,java-eclipse-osgi)
5720 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5721
5722 (define-public java-commons-cli
5723 (package
5724 (name "java-commons-cli")
5725 (version "1.4")
5726 (source (origin
5727 (method url-fetch)
5728 (uri (string-append "mirror://apache/commons/cli/source/"
5729 "commons-cli-" version "-src.tar.gz"))
5730 (sha256
5731 (base32
5732 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
5733 (build-system ant-build-system)
5734 ;; TODO: javadoc
5735 (arguments
5736 `(#:jar-name "commons-cli.jar"))
5737 (native-inputs
5738 `(("java-junit" ,java-junit)
5739 ("java-hamcrest-core" ,java-hamcrest-core)))
5740 (home-page "http://commons.apache.org/cli/")
5741 (synopsis "Command line arguments and options parsing library")
5742 (description "The Apache Commons CLI library provides an API for parsing
5743 command line options passed to programs. It is also able to print help
5744 messages detailing the options available for a command line tool.
5745
5746 Commons CLI supports different types of options:
5747
5748 @itemize
5749 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
5750 @item GNU like long options (ie. du --human-readable --max-depth=1)
5751 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
5752 @item Short options with value attached (ie. gcc -O2 foo.c)
5753 @item long options with single hyphen (ie. ant -projecthelp)
5754 @end itemize
5755
5756 This is a part of the Apache Commons Project.")
5757 (license license:asl2.0)))
5758
5759 (define-public java-commons-codec
5760 (package
5761 (name "java-commons-codec")
5762 (version "1.10")
5763 (source (origin
5764 (method url-fetch)
5765 (uri (string-append "mirror://apache/commons/codec/source/"
5766 "commons-codec-" version "-src.tar.gz"))
5767 (sha256
5768 (base32
5769 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5770 (build-system ant-build-system)
5771 (outputs '("out" "doc"))
5772 (arguments
5773 `(#:test-target "test"
5774 #:make-flags
5775 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5776 (junit (assoc-ref %build-inputs "java-junit")))
5777 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5778 (string-append "-Dhamcrest.jar=" hamcrest
5779 "/share/java/hamcrest-core.jar")
5780 ;; Do not append version to jar.
5781 "-Dfinal.name=commons-codec"))
5782 #:phases
5783 (modify-phases %standard-phases
5784 (add-after 'build 'build-javadoc ant-build-javadoc)
5785 (replace 'install (install-jars "dist"))
5786 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5787 (native-inputs
5788 `(("java-junit" ,java-junit)
5789 ("java-hamcrest-core" ,java-hamcrest-core)))
5790 (home-page "http://commons.apache.org/codec/")
5791 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5792 (description "The codec package contains simple encoder and decoders for
5793 various formats such as Base64 and Hexadecimal. In addition to these widely
5794 used encoders and decoders, the codec package also maintains a collection of
5795 phonetic encoding utilities.
5796
5797 This is a part of the Apache Commons Project.")
5798 (license license:asl2.0)))
5799
5800 (define-public java-commons-daemon
5801 (package
5802 (name "java-commons-daemon")
5803 (version "1.0.15")
5804 (source (origin
5805 (method url-fetch)
5806 (uri (string-append "mirror://apache/commons/daemon/source/"
5807 "commons-daemon-" version "-src.tar.gz"))
5808 (sha256
5809 (base32
5810 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5811 (build-system ant-build-system)
5812 (arguments
5813 `(#:test-target "test"
5814 #:phases
5815 (modify-phases %standard-phases
5816 (add-after 'build 'build-javadoc ant-build-javadoc)
5817 (replace 'install (install-jars "dist"))
5818 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5819 (native-inputs
5820 `(("java-junit" ,java-junit)))
5821 (home-page "http://commons.apache.org/daemon/")
5822 (synopsis "Library to launch Java applications as daemons")
5823 (description "The Daemon package from Apache Commons can be used to
5824 implement Java applications which can be launched as daemons. For example the
5825 program will be notified about a shutdown so that it can perform cleanup tasks
5826 before its process of execution is destroyed by the operation system.
5827
5828 This package contains the Java library. You will also need the actual binary
5829 for your architecture which is provided by the jsvc package.
5830
5831 This is a part of the Apache Commons Project.")
5832 (license license:asl2.0)))
5833
5834 (define-public java-javaewah
5835 (package
5836 (name "java-javaewah")
5837 (version "1.1.6")
5838 (source (origin
5839 (method url-fetch)
5840 (uri (string-append "https://github.com/lemire/javaewah/"
5841 "archive/JavaEWAH-" version ".tar.gz"))
5842 (sha256
5843 (base32
5844 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5845 (build-system ant-build-system)
5846 (arguments `(#:jar-name "javaewah.jar"))
5847 (inputs
5848 `(("java-junit" ,java-junit)
5849 ("java-hamcrest-core" ,java-hamcrest-core)))
5850 (home-page "https://github.com/lemire/javaewah")
5851 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5852 (description "This is a word-aligned compressed variant of the Java
5853 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
5854 compression scheme. It can be used to implement bitmap indexes.
5855
5856 The goal of word-aligned compression is not to achieve the best compression,
5857 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
5858 cycles, maybe at the expense of storage. However, the EWAH scheme is always
5859 more efficient storage-wise than an uncompressed bitmap (as implemented in the
5860 @code{BitSet} class by Sun).")
5861 ;; GPL2.0 derivates are explicitly allowed.
5862 (license license:asl2.0)))
5863
5864 (define-public java-slf4j-api
5865 (package
5866 (name "java-slf4j-api")
5867 (version "1.7.25")
5868 (source (origin
5869 (method url-fetch)
5870 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
5871 version ".tar.gz"))
5872 (sha256
5873 (base32
5874 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
5875 (modules '((guix build utils)))
5876 ;; Delete bundled jars.
5877 (snippet
5878 '(begin
5879 (for-each delete-file (find-files "." "\\.jar$"))
5880 #t))))
5881 (build-system ant-build-system)
5882 (arguments
5883 `(#:jar-name "slf4j-api.jar"
5884 #:source-dir "slf4j-api/src/main"
5885 #:test-dir "slf4j-api/src/test"
5886 #:phases
5887 (modify-phases %standard-phases
5888 (add-after 'build 'regenerate-jar
5889 (lambda _
5890 ;; pom.xml ignores these files in the jar creation process. If we don't,
5891 ;; we get the error "This code should have never made it into slf4j-api.jar"
5892 (delete-file-recursively "build/classes/org/slf4j/impl")
5893 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
5894 "build/classes" ".")))
5895 (add-before 'check 'dont-test-abstract-classes
5896 (lambda _
5897 ;; abstract classes are not meant to be run with junit
5898 (substitute* "build.xml"
5899 (("<include name=\"\\*\\*/\\*Test.java\" />")
5900 (string-append "<include name=\"**/*Test.java\" />"
5901 "<exclude name=\"**/MultithreadedInitializationTest"
5902 ".java\" />")))
5903 #t)))))
5904 (inputs
5905 `(("java-junit" ,java-junit)
5906 ("java-hamcrest-core" ,java-hamcrest-core)))
5907 (home-page "https://www.slf4j.org/")
5908 (synopsis "Simple logging facade for Java")
5909 (description "The Simple Logging Facade for Java (SLF4J) serves as a
5910 simple facade or abstraction for various logging
5911 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
5912 allowing the end user to plug in the desired logging framework at deployment
5913 time.")
5914 (license license:expat)))
5915
5916 (define java-slf4j-api-bootstrap
5917 (package
5918 (inherit java-slf4j-api)
5919 (name "java-slf4j-api-bootstrap")
5920 (inputs `())
5921 (arguments
5922 (substitute-keyword-arguments (package-arguments java-slf4j-api)
5923 ((#:tests? _ #f) #f)))))
5924
5925 (define-public java-slf4j-simple
5926 (package
5927 (name "java-slf4j-simple")
5928 (version "1.7.25")
5929 (source (package-source java-slf4j-api))
5930 (build-system ant-build-system)
5931 (arguments
5932 `(#:jar-name "slf4j-simple.jar"
5933 #:source-dir "slf4j-simple/src/main"
5934 #:test-dir "slf4j-simple/src/test"
5935 #:phases
5936 (modify-phases %standard-phases
5937 ;; The tests need some test classes from slf4j-api
5938 (add-before 'check 'build-slf4j-api-test-helpers
5939 (lambda _
5940 ;; Add current dir to CLASSPATH ...
5941 (setenv "CLASSPATH"
5942 (string-append (getcwd) ":" (getenv "CLASSPATH")))
5943 ;; ... and build test helper classes here:
5944 (apply invoke
5945 `("javac" "-d" "."
5946 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
5947 (inputs
5948 `(("java-junit" ,java-junit)
5949 ("java-hamcrest-core" ,java-hamcrest-core)
5950 ("java-slf4j-api" ,java-slf4j-api)))
5951 (home-page "https://www.slf4j.org/")
5952 (synopsis "Simple implementation of simple logging facade for Java")
5953 (description "SLF4J binding for the Simple implementation, which outputs
5954 all events to System.err. Only messages of level INFO and higher are
5955 printed.")
5956 (license license:expat)))
5957
5958 (define-public antlr2
5959 (package
5960 (name "antlr2")
5961 (version "2.7.7")
5962 (source (origin
5963 (method url-fetch)
5964 (uri (string-append "http://www.antlr2.org/download/antlr-"
5965 version ".tar.gz"))
5966 (sha256
5967 (base32
5968 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
5969 (modules '((guix build utils)))
5970 (snippet
5971 '(begin
5972 (delete-file "antlr.jar")
5973 (substitute* "lib/cpp/antlr/CharScanner.hpp"
5974 (("#include <map>")
5975 (string-append
5976 "#include <map>\n"
5977 "#define EOF (-1)\n"
5978 "#include <strings.h>")))
5979 (substitute* "configure"
5980 (("/bin/sh") "sh"))
5981 #t))))
5982 (build-system gnu-build-system)
5983 (arguments
5984 `(#:tests? #f ; no test target
5985 #:imported-modules ((guix build ant-build-system)
5986 (guix build syscalls)
5987 ,@%gnu-build-system-modules)
5988 #:modules (((guix build ant-build-system) #:prefix ant:)
5989 (guix build gnu-build-system)
5990 (guix build utils))
5991 #:phases
5992 (modify-phases %standard-phases
5993 (add-after 'install 'strip-jar-timestamps
5994 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
5995 (add-after 'configure 'fix-bin-ls
5996 (lambda _
5997 (substitute* (find-files "." "Makefile")
5998 (("/bin/ls") "ls"))
5999 #t)))))
6000 (native-inputs
6001 `(("which" ,which)
6002 ("zip" ,zip)
6003 ("java" ,icedtea "jdk")))
6004 (inputs
6005 `(("java" ,icedtea)))
6006 (home-page "http://www.antlr2.org")
6007 (synopsis "Framework for constructing recognizers, compilers, and translators")
6008 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6009 is a language tool that provides a framework for constructing recognizers,
6010 compilers, and translators from grammatical descriptions containing Java, C#,
6011 C++, or Python actions. ANTLR provides excellent support for tree construction,
6012 tree walking, and translation.")
6013 (license license:public-domain)))
6014
6015 (define-public java-stringtemplate-3
6016 (package
6017 (name "java-stringtemplate")
6018 (version "3.2.1")
6019 (source (origin
6020 (method url-fetch)
6021 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6022 "gh-pages/download/stringtemplate-"
6023 version ".tar.gz"))
6024 (sha256
6025 (base32
6026 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6027 (build-system ant-build-system)
6028 (arguments
6029 `(#:jar-name (string-append ,name "-" ,version ".jar")
6030 #:test-dir "test"
6031 #:modules ((guix build ant-build-system)
6032 (guix build utils)
6033 (srfi srfi-1))
6034 #:phases
6035 (modify-phases %standard-phases
6036 (add-before 'check 'fix-tests
6037 (lambda _
6038 (substitute* "build.xml"
6039 (("\\$\\{test.home\\}/java")
6040 "${test.home}/org"))
6041 #t))
6042 (add-before 'build 'generate-grammar
6043 (lambda _
6044 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6045 (for-each (lambda (file)
6046 (format #t "~a\n" file)
6047 (invoke "antlr" file))
6048 '("template.g" "angle.bracket.template.g" "action.g"
6049 "eval.g" "group.g" "interface.g")))
6050 #t)))))
6051 (native-inputs
6052 `(("antlr" ,antlr2)
6053 ("java-junit" ,java-junit)))
6054 (home-page "http://www.stringtemplate.org")
6055 (synopsis "Template engine to generate formatted text output")
6056 (description "StringTemplate is a java template engine (with ports for C#,
6057 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6058 or any other formatted text output. StringTemplate is particularly good at
6059 code generators, multiple site skins, and internationalization / localization.
6060 StringTemplate also powers ANTLR.")
6061 (license license:bsd-3)))
6062
6063 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6064 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6065 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6066 ;; of antlr3 at runtime.
6067 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6068 ;; This version of ST4 is sufficient for the latest antlr3.
6069 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6070 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6071 ;; against the latest ST4.
6072 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6073 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6074 ;; only grammar files with the antlr2 syntax.
6075 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6076
6077 (define-public java-stringtemplate
6078 (package (inherit java-stringtemplate-3)
6079 (name "java-stringtemplate")
6080 (version "4.0.8")
6081 (source (origin
6082 (method url-fetch)
6083 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6084 version ".tar.gz"))
6085 (file-name (string-append name "-" version ".tar.gz"))
6086 (sha256
6087 (base32
6088 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6089 (build-system ant-build-system)
6090 (arguments
6091 `(#:jar-name (string-append ,name "-" ,version ".jar")
6092 #:tests? #f ; FIXME: tests fail for unknown reasons
6093 #:test-dir "test"
6094 #:modules ((guix build ant-build-system)
6095 (guix build utils)
6096 (srfi srfi-1))
6097 #:phases
6098 (modify-phases %standard-phases
6099 (add-before 'check 'fix-test-target
6100 (lambda _
6101 (substitute* "build.xml"
6102 (("\\$\\{test.home\\}/java") "${test.home}/")
6103 (("\\*Test.java") "Test*.java"))
6104 #t))
6105 (add-before 'build 'generate-grammar
6106 (lambda _
6107 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6108 (for-each (lambda (file)
6109 (format #t "~a\n" file)
6110 (invoke "antlr3" file))
6111 '("STParser.g" "Group.g" "CodeGenerator.g")))
6112 #t)))))
6113 (inputs
6114 `(("antlr3" ,antlr3-bootstrap)
6115 ("antlr2" ,antlr2)
6116 ("java-stringtemplate" ,java-stringtemplate-3)
6117 ("java-junit" ,java-junit)))))
6118
6119 (define java-stringtemplate-4.0.6
6120 (package (inherit java-stringtemplate)
6121 (name "java-stringtemplate")
6122 (version "4.0.6")
6123 (source (origin
6124 (method url-fetch)
6125 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6126 version ".tar.gz"))
6127 (file-name (string-append name "-" version ".tar.gz"))
6128 (sha256
6129 (base32
6130 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6131 (inputs
6132 `(("antlr3" ,antlr3-3.3)
6133 ("antlr2" ,antlr2)
6134 ("java-stringtemplate" ,java-stringtemplate-3)))))
6135
6136 (define-public antlr3
6137 (package
6138 (name "antlr3")
6139 (version "3.5.2")
6140 (source (origin
6141 (method url-fetch)
6142 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6143 version ".tar.gz"))
6144 (file-name (string-append name "-" version ".tar.gz"))
6145 (sha256
6146 (base32
6147 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6148 (build-system ant-build-system)
6149 (arguments
6150 `(#:jar-name (string-append ,name "-" ,version ".jar")
6151 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6152 #:tests? #f
6153 #:phases
6154 (modify-phases %standard-phases
6155 (add-after 'install 'bin-install
6156 (lambda* (#:key inputs outputs #:allow-other-keys)
6157 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6158 (bin (string-append (assoc-ref outputs "out") "/bin")))
6159 (mkdir-p bin)
6160 (with-output-to-file (string-append bin "/antlr3")
6161 (lambda _
6162 (display
6163 (string-append "#!" (which "sh") "\n"
6164 "java -cp " jar "/" ,name "-" ,version ".jar:"
6165 (string-concatenate
6166 (find-files (assoc-ref inputs "stringtemplate")
6167 ".*\\.jar"))
6168 ":"
6169 (string-concatenate
6170 (find-files (assoc-ref inputs "stringtemplate4")
6171 ".*\\.jar"))
6172 ":"
6173 (string-concatenate
6174 (find-files (string-append
6175 (assoc-ref inputs "antlr")
6176 "/lib")
6177 ".*\\.jar"))
6178 " org.antlr.Tool $*"))))
6179 (chmod (string-append bin "/antlr3") #o755))
6180 #t))
6181 (add-before 'build 'generate-grammar
6182 (lambda _
6183 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6184 (for-each (lambda (file)
6185 (display file)
6186 (newline)
6187 (invoke "antlr3" file))
6188 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6189 "AssignTokenTypesWalker.g"
6190 "ActionTranslator.g" "TreeToNFAConverter.g"
6191 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6192 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6193 (substitute* "ANTLRParser.java"
6194 (("public Object getTree") "public GrammarAST getTree"))
6195 (substitute* "ANTLRv3Parser.java"
6196 (("public Object getTree") "public CommonTree getTree"))
6197 (chdir "../../../../../java")
6198 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6199 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6200 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6201 (substitute* "org/antlr/tool/ErrorManager.java"
6202 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6203 (chdir "../../../..")
6204 #t))
6205 (add-before 'build 'fix-build-xml
6206 (lambda _
6207 (substitute* "build.xml"
6208 (("<exec") "<copy todir=\"${classes.dir}\">
6209 <fileset dir=\"tool/src/main/resources\">
6210 <include name=\"**/*.stg\"/>
6211 <include name=\"**/*.st\"/>
6212 <include name=\"**/*.sti\"/>
6213 <include name=\"**/STLexer.tokens\"/>
6214 </fileset>
6215 </copy><exec"))
6216 #t)))))
6217 (native-inputs
6218 `(("antlr" ,antlr2)
6219 ("antlr3" ,antlr3-bootstrap)))
6220 (inputs
6221 `(("junit" ,java-junit)
6222 ("stringtemplate" ,java-stringtemplate-3)
6223 ("stringtemplate4" ,java-stringtemplate)))
6224 (propagated-inputs
6225 `(("stringtemplate" ,java-stringtemplate-3)
6226 ("antlr" ,antlr2)
6227 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6228 (home-page "http://www.antlr3.org")
6229 (synopsis "Framework for constructing recognizers, compilers, and translators")
6230 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6231 is a language tool that provides a framework for constructing recognizers,
6232 compilers, and translators from grammatical descriptions containing Java, C#,
6233 C++, or Python actions. ANTLR provides excellent support for tree construction,
6234 tree walking, and translation.")
6235 (license license:bsd-3)))
6236
6237 (define antlr3-bootstrap
6238 (package
6239 (inherit antlr3)
6240 (name "antlr3-bootstrap")
6241 (native-inputs
6242 `(("antlr" ,antlr2)
6243 ("antlr3" ,antlr3-3.3)))
6244 (inputs
6245 `(("junit" ,java-junit)))))
6246
6247 (define antlr3-3.3
6248 (package
6249 (inherit antlr3)
6250 (name "antlr3")
6251 (version "3.3")
6252 (source (origin
6253 (method url-fetch)
6254 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6255 "gh-pages/download/antlr-"
6256 version ".tar.gz"))
6257 (sha256
6258 (base32
6259 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6260 (patches
6261 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6262 (arguments
6263 `(#:jar-name (string-append ,name "-" ,version ".jar")
6264 #:source-dir (string-join '("tool/src/main/java"
6265 "runtime/Java/src/main/java"
6266 "tool/src/main/antlr2"
6267 "tool/src/main/antlr3")
6268 ":")
6269 #:tests? #f ; FIXME: tests seem to require maven plugin
6270 #:modules ((guix build ant-build-system)
6271 (guix build utils)
6272 (srfi srfi-1))
6273 #:phases
6274 (modify-phases %standard-phases
6275 (add-after 'install 'bin-install
6276 (lambda* (#:key inputs outputs #:allow-other-keys)
6277 (let* ((out (assoc-ref outputs "out"))
6278 (jar (string-append out "/share/java"))
6279 (bin (string-append out "/bin")))
6280 (mkdir-p bin)
6281 (with-output-to-file (string-append bin "/antlr3")
6282 (lambda _
6283 (display
6284 (string-append
6285 "#!" (which "sh") "\n"
6286 "java -cp " jar "/antlr3-3.3.jar:"
6287 (string-join
6288 (append (find-files (assoc-ref inputs "java-stringtemplate")
6289 ".*\\.jar$")
6290 (find-files (string-append (assoc-ref inputs "antlr")
6291 "/lib")
6292 ".*\\.jar$"))
6293 ":")
6294 " org.antlr.Tool $*"))))
6295 (chmod (string-append bin "/antlr3") #o755)
6296 #t)))
6297 (add-before 'build 'generate-grammar
6298 (lambda _
6299 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6300 (("import org.antlr.grammar.v2.\\*;")
6301 "import org.antlr.grammar.v2.*;\n
6302 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6303 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6304 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6305 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6306 (for-each (lambda (file)
6307 (format #t "~a\n" file)
6308 (invoke "antlr" file))
6309 '("antlr.g" "antlr.print.g" "assign.types.g"
6310 "buildnfa.g" "codegen.g" "define.g")))
6311 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6312 (for-each (lambda (file)
6313 (format #t "~a\n" file)
6314 (invoke "antlr3" file))
6315 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6316 "ANTLRv3Tree.g")))
6317 #t))
6318 (add-before 'build 'fix-build-xml
6319 (lambda _
6320 (substitute* "build.xml"
6321 (("<exec") "<copy todir=\"${classes.dir}\">
6322 <fileset dir=\"tool/src/main/resources\">
6323 <include name=\"**/*.stg\"/>
6324 <include name=\"**/*.st\"/>
6325 <include name=\"**/*.sti\"/>
6326 <include name=\"**/STLexer.tokens\"/>
6327 </fileset>
6328 </copy><exec"))
6329 #t)))))
6330 (native-inputs
6331 `(("antlr" ,antlr2)
6332 ("antlr3" ,antlr3-3.1)))
6333 (inputs
6334 `(("junit" ,java-junit)))
6335 (propagated-inputs
6336 `(("java-stringtemplate" ,java-stringtemplate-3)
6337 ("antlr" ,antlr2)
6338 ("antlr3" ,antlr3-3.1)))))
6339
6340 (define antlr3-3.1
6341 (package
6342 (inherit antlr3)
6343 (version "3.1")
6344 (source (origin
6345 (method url-fetch)
6346 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6347 "gh-pages/download/antlr-"
6348 version ".tar.gz"))
6349 (sha256
6350 (base32
6351 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6352 (patches
6353 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6354 (arguments
6355 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6356 #:source-dir "src:runtime/Java/src"
6357 #:tests? #f
6358 #:phases
6359 (modify-phases %standard-phases
6360 (add-after 'install 'bin-install
6361 (lambda* (#:key inputs outputs #:allow-other-keys)
6362 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6363 (bin (string-append (assoc-ref outputs "out") "/bin")))
6364 (mkdir-p bin)
6365 (with-output-to-file (string-append bin "/antlr3")
6366 (lambda _
6367 (display
6368 (string-append "#!" (which "sh") "\n"
6369 "java -cp " jar "/antlr3-3.1.jar:"
6370 (string-concatenate
6371 (find-files (assoc-ref inputs "stringtemplate")
6372 ".*\\.jar"))
6373 ":"
6374 (string-concatenate
6375 (find-files (string-append
6376 (assoc-ref inputs "antlr")
6377 "/lib")
6378 ".*\\.jar"))
6379 " org.antlr.Tool $*"))))
6380 (chmod (string-append bin "/antlr3") #o755))
6381 #t))
6382 (add-before 'build 'generate-grammar
6383 (lambda _
6384 (let ((dir "src/org/antlr/tool/"))
6385 (for-each (lambda (file)
6386 (display file)
6387 (newline)
6388 (invoke "antlr" "-o" dir (string-append dir file)))
6389 '("antlr.g" "antlr.print.g" "assign.types.g"
6390 "buildnfa.g" "define.g")))
6391 (format #t "codegen.g\n")
6392 (invoke "antlr" "-o" "src/org/antlr/codegen"
6393 "src/org/antlr/codegen/codegen.g")
6394 #t))
6395 (add-before 'build 'fix-build-xml
6396 (lambda _
6397 (substitute* "build.xml"
6398 (("<exec") "<copy todir=\"${classes.dir}\">
6399 <fileset dir=\"src\">
6400 <include name=\"**/*.stg\"/>
6401 <include name=\"**/*.st\"/>
6402 <include name=\"**/*.sti\"/>
6403 <include name=\"**/STLexer.tokens\"/>
6404 </fileset>
6405 </copy><exec"))
6406 #t)))))
6407 (native-inputs
6408 `(("antlr" ,antlr2)))
6409 (inputs
6410 `(("junit" ,java-junit)))
6411 (propagated-inputs
6412 `(("stringtemplate" ,java-stringtemplate-3)))))
6413
6414 (define-public java-commons-cli-1.2
6415 ;; This is a bootstrap dependency for Maven2.
6416 (package
6417 (inherit java-commons-cli)
6418 (version "1.2")
6419 (source (origin
6420 (method url-fetch)
6421 (uri (string-append "mirror://apache/commons/cli/source/"
6422 "commons-cli-" version "-src.tar.gz"))
6423 (sha256
6424 (base32
6425 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6426 (arguments
6427 `(#:jar-name "commons-cli.jar"
6428 #:phases
6429 (modify-phases %standard-phases
6430 (add-before 'check 'fix-build-xml
6431 (lambda* (#:key inputs #:allow-other-keys)
6432 (substitute* "build.xml"
6433 (("dir=\"\\$\\{test.home\\}/java\"")
6434 "dir=\"${test.home}\""))
6435 #t)))))
6436 (native-inputs
6437 `(("java-junit" ,java-junit)))))
6438
6439 (define-public java-microemulator-cldc
6440 (package
6441 (name "java-microemulator-cldc")
6442 (version "2.0.4")
6443 (source (origin
6444 (method url-fetch)
6445 (uri (string-append "https://github.com/barteo/microemu/archive/"
6446 "microemulator_"
6447 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6448 version)
6449 ".tar.gz"))
6450 (file-name (string-append name "-" version ".tar.gz"))
6451 (sha256
6452 (base32
6453 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6454 (build-system ant-build-system)
6455 (arguments
6456 `(#:jar-name "microemulator-cldc.jar"
6457 #:source-dir "microemu-cldc/src/main/java"
6458 #:tests? #f)); Requires even older software
6459 (home-page "https://github.com/barteo/microemu")
6460 (synopsis "J2ME CLDC emulator")
6461 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6462 Emulator. It allows to demonstrate MIDlet based applications in web browser
6463 applet and can be run as a standalone java application.")
6464 (license (list license:asl2.0
6465 ;; or altenatively:
6466 license:lgpl2.1+))))
6467
6468 (define-public java-datanucleus-javax-persistence
6469 (package
6470 (name "java-datanucleus-javax-persistence")
6471 (version "2.2.0")
6472 (source (origin
6473 (method url-fetch)
6474 (uri (string-append "https://github.com/datanucleus/"
6475 "javax.persistence/archive/javax.persistence-"
6476 version "-release.tar.gz"))
6477 (sha256
6478 (base32
6479 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6480 (build-system ant-build-system)
6481 (arguments
6482 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6483 #:jdk ,icedtea-8
6484 #:source-dir "src/main/java"
6485 #:tests? #f)); no tests
6486 (home-page "https://github.com/datanucleus/javax.persistence")
6487 (synopsis "JPA API")
6488 (description "This package contains a clean definition of JPA API intended
6489 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6490 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6491 used to generate this API.")
6492 (license (list license:edl1.0 license:epl1.0))))
6493
6494 (define-public java-osgi-cmpn
6495 (package
6496 (name "java-osgi-cmpn")
6497 (version "6.0.0")
6498 (source (origin
6499 (method url-fetch)
6500 (uri (string-append "http://central.maven.org/maven2/"
6501 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6502 version "-sources.jar"))
6503 (sha256
6504 (base32
6505 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6506 (build-system ant-build-system)
6507 (arguments
6508 `(#:jar-name "osgi-cmpn.jar"
6509 #:tests? #f)); no tests
6510 (inputs
6511 `(("annotation" ,java-osgi-annotation)
6512 ("core" ,java-osgi-core)
6513 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6514 ("microemulator" ,java-microemulator-cldc)
6515 ("servlet" ,java-classpathx-servletapi)))
6516 (home-page "https://www.osgi.org")
6517 (synopsis "Compendium specification module of OSGi framework")
6518 (description
6519 "OSGi, for Open Services Gateway initiative framework, is a module system
6520 and service platform for the Java programming language. This package contains
6521 the compendium specification module, providing interfaces and classes for use
6522 in compiling bundles.")
6523 (license license:asl2.0)))
6524
6525 (define-public java-osgi-service-component-annotations
6526 (package
6527 (name "java-osgi-service-component-annotations")
6528 (version "1.3.0")
6529 (source (origin
6530 (method url-fetch)
6531 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6532 "org.osgi.service.component.annotations/"
6533 version "/org.osgi.service.component.annotations-"
6534 version "-sources.jar"))
6535 (sha256
6536 (base32
6537 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6538 (build-system ant-build-system)
6539 (arguments
6540 `(#:jar-name "osgi-service-component-annotations.jar"
6541 #:tests? #f)); no tests
6542 (inputs
6543 `(("annotation" ,java-osgi-annotation)))
6544 (home-page "https://www.osgi.org")
6545 (synopsis "Support annotations for osgi-service-component")
6546 (description
6547 "OSGi, for Open Services Gateway initiative framework, is a module system
6548 and service platform for the Java programming language. This package contains
6549 the support annotations for osgi-service-component.")
6550 (license license:asl2.0)))
6551
6552 (define-public java-osgi-dto
6553 (package
6554 (name "java-osgi-dto")
6555 (version "1.0.0")
6556 (source (origin
6557 (method url-fetch)
6558 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6559 "org.osgi.dto/" version "/org.osgi.dto-"
6560 version "-sources.jar"))
6561 (sha256
6562 (base32
6563 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6564 (build-system ant-build-system)
6565 (arguments
6566 `(#:jar-name "osgi-dto.jar"
6567 #:tests? #f)); no tests
6568 (inputs
6569 `(("annotation" ,java-osgi-annotation)))
6570 (home-page "https://www.osgi.org")
6571 (synopsis "Data Transfer Objects")
6572 (description
6573 "OSGi, for Open Services Gateway initiative framework, is a module system
6574 and service platform for the Java programming language. This package contains
6575 the Data Transfer Objects. It is easily serializable having only public fields
6576 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6577 Map and array aggregates may also be used. The aggregates must only hold
6578 objects of the listed types or aggregates.")
6579 (license license:asl2.0)))
6580
6581 (define-public java-osgi-resource
6582 (package
6583 (name "java-osgi-resource")
6584 (version "1.0.0")
6585 (source (origin
6586 (method url-fetch)
6587 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6588 "org.osgi.resource/"
6589 version "/org.osgi.resource-"
6590 version "-sources.jar"))
6591 (sha256
6592 (base32
6593 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6594 (build-system ant-build-system)
6595 (arguments
6596 `(#:jar-name "osgi-resource.jar"
6597 #:tests? #f)); no tests
6598 (inputs
6599 `(("annotation" ,java-osgi-annotation)
6600 ("dto" ,java-osgi-dto)))
6601 (home-page "https://www.osgi.org")
6602 (synopsis "OSGI Resource")
6603 (description
6604 "OSGi, for Open Services Gateway initiative framework, is a module system
6605 and service platform for the Java programming language. This package contains
6606 the definition of common types in osgi packages.")
6607 (license license:asl2.0)))
6608
6609 (define-public java-osgi-namespace-contract
6610 (package
6611 (name "java-osgi-namespace-contract")
6612 (version "1.0.0")
6613 (source (origin
6614 (method url-fetch)
6615 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6616 "org.osgi.namespace.contract/"
6617 version "/org.osgi.namespace.contract-"
6618 version "-sources.jar"))
6619 (sha256
6620 (base32
6621 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6622 (build-system ant-build-system)
6623 (inputs
6624 `(("resource" ,java-osgi-resource)
6625 ("annotation" ,java-osgi-annotation)))
6626 (arguments
6627 `(#:jar-name "osgi-namespace-contract.jar"
6628 #:tests? #f)); no tests
6629 (home-page "https://www.osgi.org")
6630 (synopsis "Contract Capability and Requirement Namespace")
6631 (description
6632 "OSGi, for Open Services Gateway initiative framework, is a module system
6633 and service platform for the Java programming language. This package contains
6634 the names for the attributes and directives for a namespace with contracts.")
6635 (license license:asl2.0)))
6636
6637 (define-public java-osgi-namespace-extender
6638 (package
6639 (name "java-osgi-namespace-extender")
6640 (version "1.0.1")
6641 (source (origin
6642 (method url-fetch)
6643 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6644 "org.osgi.namespace.extender/"
6645 version "/org.osgi.namespace.extender-"
6646 version "-sources.jar"))
6647 (sha256
6648 (base32
6649 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6650 (build-system ant-build-system)
6651 (inputs
6652 `(("resource" ,java-osgi-resource)
6653 ("annotation" ,java-osgi-annotation)))
6654 (arguments
6655 `(#:jar-name "osgi-namespace-extendent.jar"
6656 #:tests? #f)); no tests
6657 (home-page "https://www.osgi.org")
6658 (synopsis "Extender Capability and Requirement Namespace")
6659 (description
6660 "OSGi, for Open Services Gateway initiative framework, is a module system
6661 and service platform for the Java programming language. This package contains
6662 the names for the attributes and directives for an extender namespace.")
6663 (license license:asl2.0)))
6664
6665 (define-public java-osgi-namespace-service
6666 (package
6667 (name "java-osgi-namespace-service")
6668 (version "1.0.0")
6669 (source (origin
6670 (method url-fetch)
6671 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6672 "org.osgi.namespace.service/"
6673 version "/org.osgi.namespace.service-"
6674 version "-sources.jar"))
6675 (sha256
6676 (base32
6677 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6678 (build-system ant-build-system)
6679 (inputs
6680 `(("resource" ,java-osgi-resource)
6681 ("annotation" ,java-osgi-annotation)))
6682 (arguments
6683 `(#:jar-name "osgi-namespace-service.jar"
6684 #:tests? #f)); no tests
6685 (home-page "https://www.osgi.org")
6686 (synopsis "Service Capability and Requirement Namespace")
6687 (description
6688 "OSGi, for Open Services Gateway initiative framework, is a module system
6689 and service platform for the Java programming language. This package contains
6690 the names for the attributes and directives for a service namespace.")
6691 (license license:asl2.0)))
6692
6693 (define-public java-osgi-util-function
6694 (package
6695 (name "java-osgi-util-function")
6696 (version "1.0.0")
6697 (source (origin
6698 (method url-fetch)
6699 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6700 "org.osgi.util.function/"
6701 version "/org.osgi.util.function-"
6702 version "-sources.jar"))
6703 (sha256
6704 (base32
6705 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6706 (build-system ant-build-system)
6707 (arguments
6708 `(#:jar-name "osgi-util-function.jar"
6709 #:tests? #f)); no tests
6710 (inputs
6711 `(("annotation" ,java-osgi-annotation)))
6712 (home-page "https://www.osgi.org")
6713 (synopsis "OSGI Util Function")
6714 (description
6715 "OSGi, for Open Services Gateway initiative framework, is a module system
6716 and service platform for the Java programming language. This package contains
6717 an interface for a function that accepts a single argument and produces a result.")
6718 (license license:asl2.0)))
6719
6720 (define-public java-osgi-util-promise
6721 (package
6722 (name "java-osgi-util-promise")
6723 (version "1.0.0")
6724 (source (origin
6725 (method url-fetch)
6726 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6727 "org.osgi.util.promise/"
6728 version "/org.osgi.util.promise-"
6729 version "-sources.jar"))
6730 (sha256
6731 (base32
6732 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6733 (build-system ant-build-system)
6734 (arguments
6735 `(#:jar-name "osgi-util-promise.jar"
6736 #:tests? #f)); no tests
6737 (inputs
6738 `(("annotation" ,java-osgi-annotation)
6739 ("function" ,java-osgi-util-function)))
6740 (home-page "https://www.osgi.org")
6741 (synopsis "Promise of a value")
6742 (description
6743 "OSGi, for Open Services Gateway initiative framework, is a module system
6744 and service platform for the Java programming language. This package contains
6745 an interface and utilitary classes for promises. A Promise represents a future
6746 value. It handles the interactions for asynchronous processing.")
6747 (license license:asl2.0)))
6748
6749 (define-public java-osgi-service-metatype-annotations
6750 (package
6751 (name "java-osgi-service-metatype-annotations")
6752 (version "1.3.0")
6753 (source (origin
6754 (method url-fetch)
6755 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6756 "org.osgi.service.metatype.annotations/"
6757 version "/org.osgi.service.metatype.annotations-"
6758 version "-sources.jar"))
6759 (sha256
6760 (base32
6761 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6762 (build-system ant-build-system)
6763 (arguments
6764 `(#:jar-name "osgi-service-metatype-annotations.jar"
6765 #:tests? #f)); no tests
6766 (inputs
6767 `(("annotation" ,java-osgi-annotation)))
6768 (home-page "https://www.osgi.org")
6769 (synopsis "Support annotations for metatype")
6770 (description
6771 "OSGi, for Open Services Gateway initiative framework, is a module system
6772 and service platform for the Java programming language. This package contains
6773 the support annotations for metatype.")
6774 (license license:asl2.0)))
6775
6776 (define-public java-osgi-service-repository
6777 (package
6778 (name "java-osgi-service-repository")
6779 (version "1.1.0")
6780 (source (origin
6781 (method url-fetch)
6782 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6783 "org.osgi.service.repository/"
6784 version "/org.osgi.service.repository-"
6785 version "-sources.jar"))
6786 (sha256
6787 (base32
6788 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6789 (build-system ant-build-system)
6790 (arguments
6791 `(#:jar-name "osgi-service-repository.jar"
6792 #:tests? #f)); no tests
6793 (inputs
6794 `(("annotation" ,java-osgi-annotation)
6795 ("promise" ,java-osgi-util-promise)
6796 ("resource" ,java-osgi-resource)))
6797 (home-page "https://www.osgi.org")
6798 (synopsis "OSGI service repository")
6799 (description
6800 "OSGi, for Open Services Gateway initiative framework, is a module system
6801 and service platform for the Java programming language. This package contains
6802 a repository service that contains resources.")
6803 (license license:asl2.0)))
6804
6805 (define-public java-osgi-framework
6806 (package
6807 (name "java-osgi-framework")
6808 (version "1.8.0")
6809 (source (origin
6810 (method url-fetch)
6811 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6812 "org.osgi.framework/" version "/org.osgi.framework-"
6813 version "-sources.jar"))
6814 (sha256
6815 (base32
6816 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6817 (build-system ant-build-system)
6818 (arguments
6819 `(#:jar-name "osgi-framework.jar"
6820 #:tests? #f)); no tests
6821 (inputs
6822 `(("annotation" ,java-osgi-annotation)
6823 ("resource" ,java-osgi-resource)
6824 ("dto" ,java-osgi-dto)))
6825 (home-page "https://www.osgi.org")
6826 (synopsis "OSGi framework")
6827 (description
6828 "OSGi, for Open Services Gateway initiative framework, is a module system
6829 and service platform for the Java programming language.")
6830 (license license:asl2.0)))
6831
6832 (define-public java-osgi-service-log
6833 (package
6834 (name "java-osgi-service-log")
6835 (version "1.3.0")
6836 (source (origin
6837 (method url-fetch)
6838 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6839 "org.osgi.service.log/"
6840 version "/org.osgi.service.log-"
6841 version "-sources.jar"))
6842 (sha256
6843 (base32
6844 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6845 (build-system ant-build-system)
6846 (arguments
6847 `(#:jar-name "osgi-service-log.jar"
6848 #:tests? #f)); no tests
6849 (inputs
6850 `(("java-osgi-framework" ,java-osgi-framework)))
6851 (home-page "https://www.osgi.org")
6852 (synopsis "Provides methods for bundles to write messages to the log")
6853 (description
6854 "OSGi, for Open Services Gateway initiative framework, is a module system
6855 and service platform for the Java programming language. This package contains
6856 the log service.")
6857 (license license:asl2.0)))
6858
6859 (define-public java-osgi-service-jdbc
6860 (package
6861 (name "java-osgi-service-jdbc")
6862 (version "1.0.0")
6863 (source (origin
6864 (method url-fetch)
6865 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6866 "org.osgi.service.jdbc/"
6867 version "/org.osgi.service.jdbc-"
6868 version "-sources.jar"))
6869 (sha256
6870 (base32
6871 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
6872 (build-system ant-build-system)
6873 (arguments
6874 `(#:jar-name "osgi-service-jdbc.jar"
6875 #:tests? #f)); no tests
6876 (home-page "https://www.osgi.org")
6877 (synopsis "Factory for JDBC connection factories")
6878 (description
6879 "OSGi, for Open Services Gateway initiative framework, is a module system
6880 and service platform for the Java programming language. This package contains
6881 a factory for JDBC connection factories. There are 3 preferred connection
6882 factories for getting JDBC connections:
6883
6884 @itemize
6885 @item @code{javax.sql.DataSource};
6886 @item @code{javax.sql.ConnectionPoolDataSource};
6887 @item @code{javax.sql.XADataSource}.
6888 @end itemize")
6889 (license license:asl2.0)))
6890
6891 (define-public java-osgi-service-resolver
6892 (package
6893 (name "java-osgi-service-resolver")
6894 (version "1.0.1")
6895 (source (origin
6896 (method url-fetch)
6897 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6898 "org.osgi.service.resolver/"
6899 version "/org.osgi.service.resolver-"
6900 version "-sources.jar"))
6901 (sha256
6902 (base32
6903 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
6904 (build-system ant-build-system)
6905 (arguments
6906 `(#:jar-name "osgi-service-resolver.jar"
6907 #:tests? #f)); no tests
6908 (inputs
6909 `(("annotation" ,java-osgi-annotation)
6910 ("resource" ,java-osgi-resource)))
6911 (home-page "https://www.osgi.org")
6912 (synopsis "OSGI Resolver service")
6913 (description
6914 "OSGi, for Open Services Gateway initiative framework, is a module system
6915 and service platform for the Java programming language. This package contains
6916 a resolver service that resolves the specified resources in the context supplied
6917 by the caller.")
6918 (license license:asl2.0)))
6919
6920 (define-public java-osgi-util-tracker
6921 (package
6922 (name "java-osgi-util-tracker")
6923 (version "1.5.1")
6924 (source (origin
6925 (method url-fetch)
6926 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6927 "org.osgi.util.tracker/"
6928 version "/org.osgi.util.tracker-"
6929 version "-sources.jar"))
6930 (sha256
6931 (base32
6932 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
6933 (build-system ant-build-system)
6934 (arguments
6935 `(#:jar-name "osgi-util-tracker.jar"
6936 #:tests? #f)); no tests
6937 (inputs
6938 `(("framework" ,java-osgi-framework)
6939 ("annotation" ,java-osgi-annotation)))
6940 (home-page "https://www.osgi.org")
6941 (synopsis "Bundle tracking")
6942 (description
6943 "OSGi, for Open Services Gateway initiative framework, is a module system
6944 and service platform for the Java programming language. This package contains
6945 bundle tracking utility classes.")
6946 (license license:asl2.0)))
6947
6948 (define-public java-osgi-service-cm
6949 (package
6950 (name "java-osgi-service-cm")
6951 (version "1.5.0")
6952 (source (origin
6953 (method url-fetch)
6954 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6955 "org.osgi.service.cm/"
6956 version "/org.osgi.service.cm-"
6957 version "-sources.jar"))
6958 (sha256
6959 (base32
6960 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
6961 (build-system ant-build-system)
6962 (arguments
6963 `(#:jar-name "osgi-service-cm.jar"
6964 #:tests? #f)); no tests
6965 (inputs
6966 `(("framework" ,java-osgi-framework)
6967 ("annotation" ,java-osgi-annotation)))
6968 (home-page "https://www.osgi.org")
6969 (synopsis "OSGI Configuration Management")
6970 (description
6971 "OSGi, for Open Services Gateway initiative framework, is a module system
6972 and service platform for the Java programming language. This package contains
6973 utility classes for the configuration of services.")
6974 (license license:asl2.0)))
6975
6976 (define-public java-osgi-service-packageadmin
6977 (package
6978 (name "java-osgi-service-packageadmin")
6979 (version "1.2.0")
6980 (source (origin
6981 (method url-fetch)
6982 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6983 "org.osgi.service.packageadmin/"
6984 version "/org.osgi.service.packageadmin-"
6985 version "-sources.jar"))
6986 (sha256
6987 (base32
6988 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
6989 (build-system ant-build-system)
6990 (arguments
6991 `(#:jar-name "osgi-service-packageadmin.jar"
6992 #:tests? #f)); no tests
6993 (inputs
6994 `(("framework" ,java-osgi-framework)))
6995 (home-page "https://www.osgi.org")
6996 (synopsis "OSGI Package Administration")
6997 (description
6998 "OSGi, for Open Services Gateway initiative framework, is a module system
6999 and service platform for the Java programming language. This package contains
7000 the packageadmin service.")
7001 (license license:asl2.0)))
7002
7003 (define-public java-ops4j-base-lang
7004 (package
7005 (name "java-ops4j-base-lang")
7006 (version "1.5.0")
7007 (source (origin
7008 (method url-fetch)
7009 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7010 "archive/base-" version ".tar.gz"))
7011 (sha256
7012 (base32
7013 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7014 (build-system ant-build-system)
7015 (arguments
7016 `(#:jar-name "java-ops4j-base-lang.jar"
7017 #:source-dir "ops4j-base-lang/src/main/java"
7018 #:tests? #f; no tests
7019 #:phases
7020 (modify-phases %standard-phases
7021 (add-before 'build 'add-test-file
7022 (lambda _
7023 ;; That file is required by a test in ops4j-pax-exam-core-spi
7024 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7025 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7026 (lambda _
7027 (display
7028 (string-append
7029 "version=" ,version "\n"
7030 "groupId=org.ops4j.base"
7031 "artifactId=ops4j-base-lang\n"))))
7032 #t)))))
7033 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7034 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7035 (description "OPS4J stands for Open Participation Software for Java. This
7036 package contains utilities and extensions related to @code{java.lang}.")
7037 (license license:asl2.0)))
7038
7039 (define-public java-ops4j-base-monitors
7040 (package
7041 (inherit java-ops4j-base-lang)
7042 (name "java-ops4j-base-monitors")
7043 (arguments
7044 `(#:jar-name "java-ops4j-base-monitors.jar"
7045 #:source-dir "ops4j-base-monitors/src/main/java"
7046 #:tests? #f)); no tests
7047 (inputs
7048 `(("lang" ,java-ops4j-base-lang)))
7049 (description "OPS4J stands for Open Participation Software for Java. This
7050 package contains utilities and extensions related to monitoring.")))
7051
7052 (define-public java-ops4j-base-io
7053 (package
7054 (inherit java-ops4j-base-lang)
7055 (name "java-ops4j-base-io")
7056 (arguments
7057 `(#:jar-name "java-ops4j-base-io.jar"
7058 #:source-dir "ops4j-base-io/src/main/java"
7059 #:test-dir "ops4j-base-io/src/test"
7060 #:test-exclude
7061 (list "**/ListerTest.java")))
7062 (inputs
7063 `(("lang" ,java-ops4j-base-monitors)
7064 ("lang" ,java-ops4j-base-lang)))
7065 (native-inputs
7066 `(("junit" ,java-junit)
7067 ("hamcrest" ,java-hamcrest-core)))
7068 (description "OPS4J stands for Open Participation Software for Java. This
7069 package contains utilities and extensions related to handling streams and files.")))
7070
7071 (define-public java-ops4j-base-util
7072 (package
7073 (inherit java-ops4j-base-lang)
7074 (name "java-ops4j-base-util")
7075 (arguments
7076 `(#:jar-name "java-ops4j-base-util.jar"
7077 #:source-dir "ops4j-base-util/src/main/java"
7078 #:test-dir "ops4j-base-util/src/test"))
7079 (inputs
7080 `(("lang" ,java-ops4j-base-lang)))
7081 (native-inputs
7082 `(("junit" ,java-junit)))
7083 (description "OPS4J stands for Open Participation Software for Java. This
7084 package contains utilities and extensions related to environment, i18n and
7085 mime types.")))
7086
7087 (define-public java-ops4j-base-util-property
7088 (package
7089 (inherit java-ops4j-base-lang)
7090 (name "java-ops4j-base-util-property")
7091 (arguments
7092 `(#:jar-name "java-ops4j-base-util-property.jar"
7093 #:source-dir "ops4j-base-util-property/src/main/java"
7094 #:tests? #f)); no tests
7095 (inputs
7096 `(("lang" ,java-ops4j-base-lang)
7097 ("util" ,java-ops4j-base-util)))
7098 (description "OPS4J stands for Open Participation Software for Java. This
7099 package contains utilities and extensions related to resolving properties from
7100 different sources.")))
7101
7102 (define-public java-ops4j-base-store
7103 (package
7104 (inherit java-ops4j-base-lang)
7105 (name "java-ops4j-base-store")
7106 (arguments
7107 `(#:jar-name "java-ops4j-base-store.jar"
7108 #:source-dir "ops4j-base-store/src/main/java"
7109 #:tests? #f)); no tests
7110 (inputs
7111 `(("lang" ,java-ops4j-base-lang)
7112 ("slf4j" ,java-slf4j-api)
7113 ("io" ,java-ops4j-base-io)))
7114 (description "OPS4J stands for Open Participation Software for Java. This
7115 package contains utilities for storing and retrieving data from an
7116 @code{InputStream}.")))
7117
7118 (define-public java-ops4j-base-spi
7119 (package
7120 (inherit java-ops4j-base-lang)
7121 (name "java-ops4j-base-spi")
7122 (arguments
7123 `(#:jar-name "java-ops4j-base-spi.jar"
7124 #:source-dir "ops4j-base-spi/src/main/java"
7125 #:test-dir "ops4j-base-spi/src/test"))
7126 (native-inputs
7127 `(("junit" ,java-junit)
7128 ("hamcrest" ,java-hamcrest-core)))
7129 (description "OPS4J stands for Open Participation Software for Java. This
7130 package contains utilities for obtaining services via the Java SE 6
7131 @code{ServiceLoader}.")))
7132
7133 (define-public java-aqute-bnd-annotation
7134 (package
7135 (name "java-aqute-bnd-annotation")
7136 (version "3.5.0")
7137 (source (origin
7138 (method url-fetch)
7139 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7140 version ".REL.tar.gz"))
7141 (file-name (string-append name "-" version ".tar.gz"))
7142 (sha256
7143 (base32
7144 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7145 (build-system ant-build-system)
7146 (arguments
7147 `(#:jar-name "java-aqute-bnd-annotation.jar"
7148 #:source-dir "biz.aQute.bnd.annotation/src"
7149 #:tests? #f)); empty test dir
7150 (home-page "http://bnd.bndtools.org/")
7151 (synopsis "Tools for OSGi")
7152 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7153 headers based on analyzing the class code, it verifies the project settings,
7154 it manages project dependencies, gives diffs jars, and much more.")
7155 (license license:asl2.0)))
7156
7157 (define-public java-aqute-libg
7158 (package
7159 (inherit java-aqute-bnd-annotation)
7160 (name "java-aqute-libg")
7161 (arguments
7162 `(#:jar-name "java-aqute-libg.jar"
7163 ;; The build fails when source/target more recent than 1.7. This
7164 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7165 ;;
7166 ;; It is closed as won't fix. There is no way to change the source
7167 ;; so that it works on 1.8, and still works on 1.6, the upstream
7168 ;; target. It work fine on 1.7, so we use 1.7.
7169 #:make-flags (list "-Dant.build.javac.source=1.7"
7170 "-Dant.build.javac.target=1.7")
7171 #:phases
7172 (modify-phases %standard-phases
7173 (add-before 'configure 'chdir
7174 ;; Change to aQute.libg directory, so that the relative
7175 ;; paths in the tests aren't broken.
7176 (lambda _
7177 (chdir "aQute.libg")
7178 #t))
7179 (add-before 'check 'create-test-directory
7180 ;; Copy the test directory to test/java, since that's where
7181 ;; ant-build-system's default project in build.xml expects to find
7182 ;; the test classes. Leave a copy in the original place to not
7183 ;; break paths in tests.
7184 (lambda _
7185 (mkdir "src/test")
7186 (copy-recursively "test" "src/test/java")
7187 #t)))))
7188 (inputs
7189 `(("slf4j" ,java-slf4j-api)
7190 ("osgi-annot" ,java-osgi-annotation)
7191 ("java-osgi-cmpn" ,java-osgi-cmpn)
7192 ("osgi" ,java-osgi-core)))
7193 (native-inputs
7194 `(("hamcrest" ,java-hamcrest-core)
7195 ("java-junit" ,java-junit)))))
7196
7197 (define java-aqute-libg-bootstrap
7198 (package
7199 (inherit java-aqute-libg)
7200 (name "java-aqute-libg-bootstrap")
7201 (arguments
7202 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7203 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7204 ((#:tests? _ #f) #f)))
7205 (inputs
7206 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7207 ,@(delete `("slf4j" ,java-slf4j-api)
7208 (package-inputs java-aqute-libg))))
7209 (native-inputs '())))
7210
7211 (define-public java-aqute-bndlib
7212 (package
7213 (inherit java-aqute-bnd-annotation)
7214 (name "java-aqute-bndlib")
7215 (arguments
7216 `(#:jar-name "java-bndlib.jar"
7217 #:source-dir "biz.aQute.bndlib/src"
7218 #:tests? #f)); no tests
7219 (inputs
7220 `(("slf4j" ,java-slf4j-api)
7221 ("osgi-annot" ,java-osgi-annotation)
7222 ("java-aqute-libg" ,java-aqute-libg)
7223 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7224 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7225 ("java-osgi-service-repository" ,java-osgi-service-repository)
7226 ("java-osgi-service-log" ,java-osgi-service-log)
7227 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7228 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7229 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7230 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7231 ("promise" ,java-osgi-util-promise)
7232 ("osgi" ,java-osgi-core)))))
7233
7234 (define java-aqute-bndlib-bootstrap
7235 (package
7236 (inherit java-aqute-bndlib)
7237 (name "java-aqute-bndlib-bootstrap")
7238 (inputs
7239 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7240 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7241 ,@(delete `("slf4j" ,java-slf4j-api)
7242 (delete `("java-aqute-libg" ,java-aqute-libg)
7243 (package-inputs java-aqute-bndlib)))))))
7244
7245 (define-public java-ops4j-pax-tinybundles
7246 (package
7247 (name "java-ops4j-pax-tinybundles")
7248 (version "2.1.1")
7249 (source (origin
7250 (method url-fetch)
7251 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7252 "archive/tinybundles-" version ".tar.gz"))
7253 (sha256
7254 (base32
7255 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7256 (arguments
7257 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7258 #:source-dir "src/main/java"
7259 #:test-exclude
7260 ;; Abstract base classes for other tests
7261 (list "**/BndTest.java" "**/CoreTest.java")
7262 #:phases
7263 (modify-phases %standard-phases
7264 (add-before 'check 'fix-version
7265 (lambda _
7266 ;; This test has a reference to an old version of bndlib we are not
7267 ;; packaging. It uses the version referenced in pom.xml. We replace
7268 ;; it with our own version.
7269 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7270 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7271 ,(package-version java-aqute-bndlib)))
7272 #t)))))
7273 (inputs
7274 `(("lang" ,java-ops4j-base-lang)
7275 ("io" ,java-ops4j-base-io)
7276 ("store" ,java-ops4j-base-store)
7277 ("slf4j" ,java-slf4j-api)
7278 ("libg" ,java-aqute-libg)
7279 ("bndlib" ,java-aqute-bndlib)))
7280 (native-inputs
7281 `(("junit" ,java-junit)
7282 ("hamcrest" ,java-hamcrest-core)
7283 ("log4j" ,java-log4j-api)
7284 ("bndannotation" ,java-aqute-bnd-annotation)
7285 ("framework" ,java-osgi-framework)))
7286 (build-system ant-build-system)
7287 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7288 (synopsis "Java APIs to create OSGi related artifacts")
7289 (description "Tinybundles is all about creating OSGi related artifacts like
7290 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7291 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7292 other hand, this library can be a foundation of real end user tools that need
7293 to create those artifacts.")
7294 (license license:asl2.0)))
7295
7296 (define-public java-ops4j-pax-exam-core
7297 (package
7298 (name "java-ops4j-pax-exam-core")
7299 (version "4.11.0")
7300 (source (origin
7301 (method url-fetch)
7302 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7303 "archive/exam-reactor-" version ".tar.gz"))
7304 (sha256
7305 (base32
7306 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7307 (arguments
7308 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7309 #:source-dir "core/pax-exam/src/main/java"
7310 #:test-dir "core/pax-exam/src/test"))
7311 (inputs
7312 `(("slf4j" ,java-slf4j-api)
7313 ("lang" ,java-ops4j-base-lang)
7314 ("io" ,java-ops4j-base-io)
7315 ("util-property" ,java-ops4j-base-util-property)
7316 ("util-store" ,java-ops4j-base-store)
7317 ("java-osgi-core" ,java-osgi-core)))
7318 (native-inputs
7319 `(("junit" ,java-junit)
7320 ("hamcrest" ,java-hamcrest-core)))
7321 (build-system ant-build-system)
7322 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7323 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7324 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7325 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7326 the system under test at the same time.")
7327 (license license:asl2.0)))
7328
7329 (define-public java-ops4j-pax-exam-core-spi
7330 (package
7331 (inherit java-ops4j-pax-exam-core)
7332 (name "java-ops4j-pax-exam-core-spi")
7333 (arguments
7334 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7335 #:source-dir "src/main/java"
7336 #:test-exclude
7337 (list
7338 ;; Abstract base class, not a test
7339 "**/BaseStagedReactorTest.java"
7340 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7341 "**/WarBuilderTest.java")
7342 #:phases
7343 (modify-phases %standard-phases
7344 (add-before 'configure 'chdir
7345 (lambda _
7346 ;; Tests assume we are in this directory
7347 (chdir "core/pax-exam-spi")
7348 #t))
7349 (add-before 'check 'fix-tests
7350 (lambda _
7351 ;; One test checks that this file is present.
7352 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7353 (with-output-to-file
7354 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7355 (lambda _
7356 (display
7357 (string-append "artifactId = pax-exam-spi\n"
7358 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7359 ;; Maven puts compilation results in the target directory, while we
7360 ;; put them in the build directory.
7361 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7362 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7363 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7364 (("target") "build"))
7365 ;; One test is expected to fail, but it doesn't throw the expected exception
7366 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7367 (("AssertionError") "IllegalArgumentException"))
7368 #t)))))
7369 (inputs
7370 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7371 ("lang" ,java-ops4j-base-lang)
7372 ("monitors" ,java-ops4j-base-monitors)
7373 ("store" ,java-ops4j-base-store)
7374 ("io" ,java-ops4j-base-io)
7375 ("spi" ,java-ops4j-base-spi)
7376 ("osgi" ,java-osgi-core)
7377 ("slf4j" ,java-slf4j-api)
7378 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7379 (native-inputs
7380 `(("mockito" ,java-mockito-1)
7381 ("junit" ,java-junit)
7382 ("hamcrest" ,java-hamcrest-core)
7383 ("cglib" ,java-cglib)
7384 ("objenesis" ,java-objenesis)
7385 ("asm" ,java-asm)))))
7386
7387 (define-public java-ops4j-pax-exam-core-junit
7388 (package
7389 (inherit java-ops4j-pax-exam-core)
7390 (name "java-ops4j-pax-exam-core-junit")
7391 (arguments
7392 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7393 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7394 #:tests? #f)); no tests
7395 (inputs
7396 `(("junit" ,java-junit)
7397 ("slf4j" ,java-slf4j-api)
7398 ("core" ,java-ops4j-pax-exam-core)
7399 ("spi" ,java-ops4j-pax-exam-core-spi)))
7400 (native-inputs '())))
7401
7402 (define-public java-fasterxml-jackson-annotations
7403 (package
7404 (name "java-fasterxml-jackson-annotations")
7405 (version "2.9.4")
7406 (source (origin
7407 (method url-fetch)
7408 (uri (string-append "https://github.com/FasterXML/"
7409 "jackson-annotations/archive/"
7410 "jackson-annotations-" version ".tar.gz"))
7411 (sha256
7412 (base32
7413 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7414 (build-system ant-build-system)
7415 (arguments
7416 `(#:jar-name "jackson-annotations.jar"
7417 #:source-dir "src/main/java"
7418 #:test-dir "src/test"))
7419 (native-inputs
7420 `(("junit" ,java-junit)))
7421 (home-page "https://github.com/FasterXML/jackson-annotations")
7422 (synopsis "General purpose annotations for the Jackson Data Processor")
7423 (description "This package contains general purpose annotations for the
7424 Jackson Data Processor, used on value and handler types. The only annotations
7425 not included are ones that require dependency to the Databind package.")
7426 (license license:asl2.0)))
7427
7428 (define-public java-fasterxml-jackson-core
7429 (package
7430 (name "java-fasterxml-jackson-core")
7431 (version "2.9.4")
7432 (source (origin
7433 (method url-fetch)
7434 (uri (string-append "https://github.com/FasterXML/"
7435 "jackson-core/archive/"
7436 "jackson-core-" version ".tar.gz"))
7437 (sha256
7438 (base32
7439 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7440 (build-system ant-build-system)
7441 (arguments
7442 `(#:jar-name "jackson-core.jar"
7443 #:source-dir "src/main/java"
7444 #:test-dir "src/test"
7445 #:test-exclude
7446 (list
7447 ;; Expected failure. pom.xml excludes these
7448 "**/failing/**"
7449 ;; Base classes that have no constructor for junit
7450 "**/BaseTest.java"
7451 "**/ConcurrencyReadTest.java"
7452 "**/ManualCharAccessTest.java"
7453 "**/ManualCharAccessTest.java"
7454 "**/TrailingCommasTest.java"
7455 "**/AsyncMissingValuesInObjectTest.java"
7456 "**/AsyncMissingValuesInArrayTest.java")
7457 #:phases
7458 (modify-phases %standard-phases
7459 (add-before 'configure 'generate-PackageVersion.java
7460 (lambda _
7461 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7462 (in (string-append out ".in")))
7463 (copy-file in out)
7464 (substitute* out
7465 (("@package@") "com.fasterxml.jackson.core.json")
7466 (("@projectversion@") ,version)
7467 (("@projectgroupid@") "com.fasterxml.jackson.core")
7468 (("@projectartifactid@") "jackson-core")))
7469 #t))
7470 (add-before 'build 'copy-resources
7471 (lambda _
7472 (copy-recursively "src/main/resources"
7473 "build/classes")
7474 #t))
7475 (add-before 'check 'copy-test-resources
7476 (lambda _
7477 (copy-recursively "src/test/resources"
7478 "build/test-classes")
7479 #t)))))
7480 (native-inputs
7481 `(("junit" ,java-junit)
7482 ("hamcrest" ,java-hamcrest-core)))
7483 (home-page "https://github.com/FasterXML/jackson-core")
7484 (synopsis "")
7485 (description "")
7486 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7487
7488 (define-public java-fasterxml-jackson-databind
7489 (package
7490 (name "java-fasterxml-jackson-databind")
7491 (version "2.9.4")
7492 (source (origin
7493 (method url-fetch)
7494 (uri (string-append "https://github.com/FasterXML/"
7495 "jackson-databind/archive/"
7496 "jackson-databind-" version ".tar.gz"))
7497 (sha256
7498 (base32
7499 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7500 (build-system ant-build-system)
7501 (arguments
7502 `(#:jar-name "jackson-databind.jar"
7503 #:source-dir "src/main/java"
7504 #:tests? #f; requires javax.measures for which I can't find a free implementation
7505 #:phases
7506 (modify-phases %standard-phases
7507 (add-before 'configure 'generate-PackageVersion.java
7508 (lambda _
7509 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7510 (in (string-append out ".in")))
7511 (copy-file in out)
7512 (substitute* out
7513 (("@package@") "com.fasterxml.jackson.databind.cfg")
7514 (("@projectversion@") ,version)
7515 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7516 (("@projectartifactid@") "jackson-databind")))
7517 #t))
7518 (add-before 'build 'copy-resources
7519 (lambda _
7520 (copy-recursively "src/main/resources" "build/classes")
7521 #t)))))
7522 (inputs
7523 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7524 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7525 (home-page "https://github.com/FasterXML/jackson-databind")
7526 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7527 (description "This package contains the general-purpose data-binding
7528 functionality and tree-model for Jackson Data Processor. It builds on core
7529 streaming parser/generator package, and uses Jackson Annotations for
7530 configuration.")
7531 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7532
7533 (define-public java-fasterxml-jackson-modules-base-jaxb
7534 (package
7535 (name "java-fasterxml-jackson-modules-base-jaxb")
7536 (version "2.9.4")
7537 (source (origin
7538 (method url-fetch)
7539 (uri (string-append "https://github.com/FasterXML/"
7540 "jackson-modules-base/archive/"
7541 "jackson-modules-base-" version ".tar.gz"))
7542 (sha256
7543 (base32
7544 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7545 (build-system ant-build-system)
7546 (arguments
7547 `(#:jar-name "jackson-modules-base-jaxb.jar"
7548 #:source-dir "jaxb/src/main/java"
7549 #:test-dir "jaxb/src/test"
7550 #:test-exclude
7551 ;; Base class for tests
7552 (list "**/BaseJaxbTest.java")
7553 #:phases
7554 (modify-phases %standard-phases
7555 (add-before 'configure 'generate-PackageVersion.java
7556 (lambda _
7557 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7558 "jackson/module/jaxb/PackageVersion.java"))
7559 (in (string-append out ".in")))
7560 (copy-file in out)
7561 (substitute* out
7562 (("@package@") "com.fasterxml.jackson.module.jaxb")
7563 (("@projectversion@") ,version)
7564 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7565 (("@projectartifactid@") "jackson-module-jaxb")))
7566 #t))
7567 (add-before 'build 'copy-resources
7568 (lambda _
7569 (copy-recursively "jaxb/src/main/resources" "build/classes")
7570 #t)))))
7571 (inputs
7572 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7573 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7574 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7575 (native-inputs
7576 `(("java-junit" ,java-junit)))
7577 (home-page "https://github.com/FasterXML/jackson-modules-base")
7578 (synopsis "Jaxb annotations jackson module")
7579 (description "This package is the jaxb annotations module for jackson.")
7580 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7581
7582 (define-public java-snakeyaml
7583 (package
7584 (name "java-snakeyaml")
7585 (version "1.18")
7586 (source (origin
7587 (method url-fetch)
7588 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7589 version ".tar.gz"))
7590 (file-name (string-append name "-" version ".tar.gz"))
7591 (sha256
7592 (base32
7593 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7594 (build-system ant-build-system)
7595 (arguments
7596 `(#:jar-name "java-snakeyaml.jar"
7597 #:source-dir "src/main/java"
7598 ;; Tests require velocity, a cyclic dependency, and
7599 ;; java-spring-framework-context which is not packaged.
7600 #:tests? #f))
7601 (home-page "https://bitbucket.org/asomov/snakeyaml")
7602 (synopsis "YAML processor")
7603 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7604 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7605
7606 (define-public java-fasterxml-jackson-dataformat-yaml
7607 (package
7608 (name "java-fasterxml-jackson-dataformat-yaml")
7609 (version "2.9.4")
7610 (source (origin
7611 (method url-fetch)
7612 (uri (string-append "https://github.com/FasterXML/"
7613 "jackson-dataformats-text/archive/"
7614 "jackson-dataformats-text-" version ".tar.gz"))
7615 (sha256
7616 (base32
7617 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
7618 (build-system ant-build-system)
7619 (arguments
7620 `(#:jar-name "jackson-dataformat-yaml.jar"
7621 #:source-dir "yaml/src/main/java"
7622 #:test-dir "yaml/src/test"
7623 #:test-exclude (list "**/failing/**.java")
7624 #:phases
7625 (modify-phases %standard-phases
7626 (add-before 'configure 'generate-PackageVersion.java
7627 (lambda _
7628 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7629 (in (string-append out ".in")))
7630 (copy-file in out)
7631 (substitute* out
7632 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7633 (("@projectversion@") ,version)
7634 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7635 (("@projectartifactid@") "jackson-dataformat-yaml")))
7636 #t)))))
7637 (inputs
7638 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7639 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7640 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7641 ("java-snakeyaml" ,java-snakeyaml)))
7642 (native-inputs
7643 `(("junit" ,java-junit)
7644 ("hamcrest" ,java-hamcrest-core)
7645 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7646 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7647 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7648 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7649 (synopsis "Yaml backend for Jackson")
7650 (description "Dataformat backends are used to support format alternatives
7651 to JSON, supported by default. This is done by sub-classing Jackson core
7652 abstractions.")
7653 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7654
7655 (define-public java-stax2-api
7656 (package
7657 (name "java-stax2-api")
7658 (version "4.0.0")
7659 (source (origin
7660 (method url-fetch)
7661 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7662 "stax2-api-" version ".tar.gz"))
7663 (sha256
7664 (base32
7665 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7666 (build-system ant-build-system)
7667 (arguments
7668 `(#:jar-name "java-stax2-api.jar"
7669 #:source-dir "src/main/java"
7670 #:tests? #f)); no tests
7671 (home-page "https://github.com/FasterXML/stax2-api")
7672 (synopsis "Stax2 API")
7673 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7674 significant new functionalities, such as full-featured bi-direction validation
7675 interface and high-performance Typed Access API.")
7676 (license license:bsd-2)))
7677
7678 (define-public java-woodstox-core
7679 (package
7680 (name "java-woodstox-core")
7681 (version "5.0.3")
7682 (source (origin
7683 (method url-fetch)
7684 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7685 "woodstox-core-" version ".tar.gz"))
7686 (sha256
7687 (base32
7688 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7689 (build-system ant-build-system)
7690 (arguments
7691 `(#:jar-name "woodstox.jar"
7692 #:test-exclude
7693 (list "**/Base*.java" "failing/**")
7694 #:phases
7695 (modify-phases %standard-phases
7696 (add-before 'build 'remove-msv-dep
7697 (lambda _
7698 ;; we don't need osgi, and it depends on msv
7699 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7700 ;; msv's latest release is from 2011 and we don't need it
7701 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7702 (delete-file-recursively "src/test/java/wstxtest/osgi")
7703 (delete-file-recursively "src/test/java/wstxtest/msv")
7704 #t))
7705 (add-before 'build 'copy-resources
7706 (lambda _
7707 (copy-recursively "src/main/resources" "build/classes")
7708 #t)))))
7709 (inputs
7710 `(("stax2" ,java-stax2-api)))
7711 (native-inputs
7712 `(("junit" ,java-junit)))
7713 (home-page "https://github.com/FasterXML/woodstox")
7714 (synopsis "Stax XML API implementation")
7715 (description "Woodstox is a stax XML API implementation.")
7716 (license license:asl2.0)))
7717
7718 (define-public java-fasterxml-jackson-dataformat-xml
7719 (package
7720 (name "java-fasterxml-jackson-dataformat-xml")
7721 (version "2.9.4")
7722 (source (origin
7723 (method url-fetch)
7724 (uri (string-append "https://github.com/FasterXML/"
7725 "jackson-dataformat-xml/archive/"
7726 "jackson-dataformat-xml-" version ".tar.gz"))
7727 (sha256
7728 (base32
7729 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
7730 (build-system ant-build-system)
7731 (arguments
7732 `(#:jar-name "jackson-dataformat-xml.jar"
7733 #:source-dir "src/main/java"
7734 #:test-exclude
7735 (list "**/failing/**")
7736 #:phases
7737 (modify-phases %standard-phases
7738 (add-before 'configure 'generate-PackageVersion.java
7739 (lambda _
7740 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7741 (in (string-append out ".in")))
7742 (copy-file in out)
7743 (newline)
7744 (substitute* out
7745 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7746 (("@projectversion@") ,version)
7747 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7748 (("@projectartifactid@") "jackson-dataformat-xml")))
7749 #t))
7750 (add-before 'build 'copy-resources
7751 (lambda _
7752 (copy-recursively "src/main/resources" "build/classes")
7753 #t)))))
7754 (inputs
7755 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7756 ("jackson-core" ,java-fasterxml-jackson-core)
7757 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7758 ("jackson-databind" ,java-fasterxml-jackson-databind)
7759 ("stax2-api" ,java-stax2-api)
7760 ("woodstox" ,java-woodstox-core)))
7761 (native-inputs
7762 `(("junit" ,java-junit)
7763 ("hamcrest" ,java-hamcrest-core)))
7764 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7765 (synopsis "Read and write XML")
7766 (description "This package contains Jackson extension component for reading
7767 and writing XML encoded data.
7768
7769 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7770 approach (that is, no support is added for \"Schema-first\" approach). Support
7771 for JAXB annotations is provided by JAXB annotation module; this module
7772 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7773 @code{JsonFactory}) as well as small number of higher level overrides needed to
7774 make data-binding work.")
7775 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7776
7777 (define-public java-hdrhistogram
7778 (package
7779 (name "java-hdrhistogram")
7780 (version "2.1.9")
7781 (source (origin
7782 (method url-fetch)
7783 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7784 "archive/HdrHistogram-" version ".tar.gz"))
7785 (sha256
7786 (base32
7787 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7788 (build-system ant-build-system)
7789 (arguments
7790 `(#:jar-name "java-hdrhistogram.jar"
7791 #:source-dir "src/main/java"
7792 #:phases
7793 (modify-phases %standard-phases
7794 (add-before 'configure 'set-version
7795 (lambda _
7796 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7797 (template (string-append version-java ".template")))
7798 (copy-file template version-java)
7799 (substitute* version-java
7800 (("\\$VERSION\\$") ,version)
7801 (("\\$BUILD_TIME\\$") "0"))
7802 #t))))))
7803 (native-inputs
7804 `(("junit" ,java-junit)
7805 ("hamcrest" ,java-hamcrest-core)))
7806 (home-page "https://hdrhistogram.github.io/HdrHistogram")
7807 (synopsis "High dynamic range histogram")
7808 (description "Hdrhistogram allows to create histograms that support
7809 recording and analyzing sampled data value counts across a configurable integer
7810 value range with configurable value precision within the range. Value precision
7811 is expressed as the number of significant digits in the value recording, and
7812 provides control over value quantization behavior across the value range and
7813 the subsequent value resolution at any given level.")
7814 (license license:public-domain)))
7815
7816 (define-public java-cofoja
7817 (package
7818 (name "java-cofoja")
7819 (version "1.3")
7820 (source (origin
7821 (method git-fetch)
7822 (uri (git-reference
7823 (url "https://github.com/nhatminhle/cofoja.git")
7824 (commit (string-append "v" version))))
7825 (file-name (string-append "java-cofoja-" version "-checkout"))
7826 (sha256
7827 (base32
7828 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
7829 (build-system ant-build-system)
7830 (arguments
7831 `(#:build-target "dist"
7832 #:test-target "test"
7833 #:jdk ,icedtea-8
7834 #:make-flags
7835 (list "-Ddist.dir=dist")
7836 #:modules ((guix build ant-build-system)
7837 (guix build java-utils)
7838 (guix build utils)
7839 (srfi srfi-1)
7840 (ice-9 match))
7841 #:phases
7842 (modify-phases %standard-phases
7843 ;; The bulid system ignores the class path the ant-build-system sets
7844 ;; up and instead expects to find all dependencies in the "lib"
7845 ;; directory.
7846 (add-after 'unpack 'create-libdir
7847 (lambda* (#:key inputs #:allow-other-keys)
7848 (mkdir-p "lib")
7849 (for-each
7850 (lambda (file)
7851 (let ((target (string-append "lib/" (basename file))))
7852 (unless (file-exists? target)
7853 (symlink file target))))
7854 (append-map (match-lambda
7855 ((label . dir)
7856 (find-files dir "\\.jar$")))
7857 inputs))
7858 #t))
7859 (replace 'install (install-jars "dist")))))
7860 (inputs
7861 `(("java-asm" ,java-asm)))
7862 (native-inputs
7863 `(("java-junit" ,java-junit)))
7864 (home-page "https://github.com/nhatminhle/cofoja")
7865 (synopsis "Contracts for Java")
7866 (description "Contracts for Java, or Cofoja for short, is a contract
7867 programming framework and test tool for Java, which uses annotation processing
7868 and bytecode instrumentation to provide run-time checking. (In particular,
7869 this is not a static analysis tool.)")
7870 (license license:lgpl3+)))
7871
7872 (define-public java-aopalliance
7873 (package
7874 (name "java-aopalliance")
7875 (version "1.0")
7876 (source (origin
7877 (method git-fetch)
7878 ;; Note: this git repository is not official, but contains the
7879 ;; source code that is in the CVS repository. Downloading the
7880 ;; tarball from sourceforge is undeterministic, and the cvs download
7881 ;; fails.
7882 (uri (git-reference
7883 (url "https://github.com/hoverruan/aopalliance")
7884 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
7885 (file-name (string-append name "-" version))
7886 (sha256
7887 (base32
7888 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
7889 (build-system ant-build-system)
7890 (arguments
7891 `(#:jar-name "java-aopalliance.jar"
7892 #:jdk ,icedtea-8
7893 #:tests? #f; no tests
7894 #:source-dir "aopalliance/src/main"))
7895 (home-page "http://aopalliance.sourceforge.net")
7896 (synopsis "Aspect-Oriented Programming")
7897 (description "The AOP Alliance project is a joint project between several
7898 software engineering people who are interested in Aspect-Oriented Programming
7899 (AOP) and Java.")
7900 (license license:public-domain)))
7901
7902 (define-public java-javax-inject
7903 (package
7904 (name "java-javax-inject")
7905 (version "tck-1")
7906 (source (origin
7907 (method url-fetch)
7908 (uri (string-append "https://github.com/javax-inject/javax-inject/"
7909 "archive/javax.inject-" version ".tar.gz"))
7910 (sha256
7911 (base32
7912 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
7913 (build-system ant-build-system)
7914 (arguments
7915 `(#:jar-name "java-javax-inject.jar"
7916 #:jdk ,icedtea-8
7917 #:tests? #f)); no tests
7918 (home-page "http://github.com/javax-inject/javax-inject")
7919 (synopsis "JSR-330: Dependency Injection for Java")
7920 (description "This package specifies a means for obtaining objects in such
7921 a way as to maximize reusability, testability and maintainability compared to
7922 traditional approaches such as constructors, factories, and service locators
7923 (e.g., JNDI). This process, known as dependency injection, is beneficial to
7924 most nontrivial applications.
7925
7926 Many types depend on other types. For example, a @var{Stopwatch} might depend
7927 on a @var{TimeSource}. The types on which a type depends are known as its
7928 dependencies. The process of finding an instance of a dependency to use at run
7929 time is known as resolving the dependency. If no such instance can be found,
7930 the dependency is said to be unsatisfied, and the application is broken.")
7931 (license license:asl2.0)))
7932
7933 (define-public java-guice
7934 (package
7935 (name "java-guice")
7936 (version "4.1")
7937 (source (origin
7938 (method url-fetch)
7939 (uri (string-append "https://github.com/google/guice/archive/"
7940 version ".tar.gz"))
7941 (file-name (string-append name "-" version ".tar.gz"))
7942 (modules '((guix build utils)))
7943 (snippet
7944 `(begin
7945 (for-each delete-file (find-files "." ".*.jar"))))
7946 (sha256
7947 (base32
7948 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
7949 (build-system ant-build-system)
7950 (arguments
7951 `(#:jar-name "java-guice.jar"
7952 #:jdk ,icedtea-8
7953 #:tests? #f; FIXME: tests are not in a java sub directory
7954 #:source-dir "core/src"))
7955 (inputs
7956 `(("guava" ,java-guava)
7957 ("java-cglib" ,java-cglib)
7958 ("java-aopalliance" ,java-aopalliance)
7959 ("java-javax-inject" ,java-javax-inject)
7960 ("java-asm" ,java-asm)))
7961 (home-page "https://github.com/google/guice")
7962 (synopsis "Lightweight dependency injection framework")
7963 (description "Guice is a lightweight dependency injection framework fo
7964 Java 6 and above.")
7965 (license license:asl2.0)))
7966
7967 (define-public java-guice-servlet
7968 (package
7969 (inherit java-guice)
7970 (name "java-guice-servlet")
7971 (arguments
7972 `(#:jar-name "guice-servlet.jar"
7973 #:source-dir "extensions/servlet/src/"
7974 #:jdk ,icedtea-8
7975 #:tests? #f)); FIXME: not in a java subdir
7976 (inputs
7977 `(("guice" ,java-guice)
7978 ("servlet" ,java-classpathx-servletapi)
7979 ,@(package-inputs java-guice)))))
7980
7981 (define-public java-assertj
7982 (package
7983 (name "java-assertj")
7984 (version "3.8.0")
7985 (source (origin
7986 (method url-fetch)
7987 (uri (string-append "https://github.com/joel-costigliola/"
7988 "assertj-core/archive/"
7989 "assertj-core-" version ".tar.gz"))
7990 (sha256
7991 (base32
7992 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
7993 (build-system ant-build-system)
7994 (arguments
7995 `(#:jar-name "java-assertj.jar"
7996 #:jdk ,icedtea-8
7997 #:source-dir "src/main/java"
7998 #:tests? #f)); depends on tng-junit which depends on assertj
7999 (inputs
8000 `(("cglib" ,java-cglib)
8001 ("junit" ,java-junit)
8002 ("hamcrest" ,java-hamcrest-core)))
8003 (native-inputs
8004 `(("mockito" ,java-mockito-1)))
8005 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8006 (synopsis "Fluent assertions for java")
8007 (description "AssertJ core is a Java library that provides a fluent
8008 interface for writing assertions. Its main goal is to improve test code
8009 readability and make maintenance of tests easier.")
8010 (license license:asl2.0)))
8011
8012 (define-public java-jboss-javassist
8013 (package
8014 (name "java-jboss-javassist")
8015 (version "3.21.0")
8016 (source (origin
8017 (method url-fetch)
8018 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8019 "archive/rel_"
8020 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8021 "_ga.tar.gz"))
8022 (sha256
8023 (base32
8024 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8025 (build-system ant-build-system)
8026 (arguments
8027 `(#:jar-name "java-jboss-javassist.jar"
8028 #:jdk ,icedtea-8
8029 #:source-dir "src/main"
8030 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8031 #:phases
8032 (modify-phases %standard-phases
8033 (add-before 'configure 'remove-binary
8034 (lambda _
8035 (delete-file "javassist.jar")
8036 #t)))))
8037 (native-inputs
8038 `(("junit" ,java-junit)))
8039 (home-page "https://github.com/jboss-javassist/javassist")
8040 (synopsis "Java bytecode engineering toolkit")
8041 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8042 manipulation simple. It is a class library for editing bytecodes in Java; it
8043 enables Java programs to define a new class at runtime and to modify a class
8044 file when the JVM loads it.")
8045 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8046
8047 (define-public java-jcommander
8048 (package
8049 (name "java-jcommander")
8050 (version "1.71")
8051 (source (origin
8052 (method url-fetch)
8053 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8054 version ".tar.gz"))
8055 (file-name (string-append name "-" version ".tar.gz"))
8056 (sha256
8057 (base32
8058 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8059 (build-system ant-build-system)
8060 (arguments
8061 `(#:jar-name "java-jcommander.jar"
8062 #:jdk ,icedtea-8
8063 #:tests? #f; requires testng which depends on jcommander
8064 #:source-dir "src/main/java"))
8065 (home-page "http://jcommander.org")
8066 (synopsis "Command line parameters parser")
8067 (description "JCommander is a very small Java framework that makes it
8068 trivial to parse command line parameters. Parameters are declared with
8069 annotations.")
8070 (license license:asl2.0)))
8071
8072 (define-public java-bsh
8073 (package
8074 (name "java-bsh")
8075 (version "2.0b6")
8076 (source (origin
8077 (method url-fetch)
8078 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8079 version ".tar.gz"))
8080 (file-name (string-append name "-" version ".tar.gz"))
8081 (sha256
8082 (base32
8083 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8084 (build-system ant-build-system)
8085 (arguments
8086 `(#:build-target "jarall"
8087 #:test-target "junit-tests-all"
8088 #:phases
8089 (modify-phases %standard-phases
8090 (replace 'install
8091 (lambda* (#:key outputs #:allow-other-keys)
8092 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8093 (mkdir-p share)
8094 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8095 #t))))))
8096 (home-page "http://beanshell.org/")
8097 (synopsis "Lightweight Scripting for Java")
8098 (description "BeanShell is a small, free, embeddable Java source
8099 interpreter with object scripting language features, written in Java.
8100 BeanShell dynamically executes standard Java syntax and extends it with common
8101 scripting conveniences such as loose types, commands, and method closures like
8102 those in Perl and JavaScript.")
8103 (license license:asl2.0)))
8104
8105 (define-public java-fest-util
8106 (package
8107 (name "java-fest-util")
8108 (version "1.2.5")
8109 (source (origin
8110 (method url-fetch)
8111 (uri (string-append "https://github.com/alexruiz/fest-util/"
8112 "archive/fest-util-" version ".tar.gz"))
8113 (sha256
8114 (base32
8115 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8116 (build-system ant-build-system)
8117 (arguments
8118 `(#:jar-name "java-fest-util.jar"
8119 #:source-dir "src/main/java"))
8120 (native-inputs
8121 `(("junit" ,java-junit)
8122 ("hamcrest" ,java-hamcrest-core)))
8123 (home-page "https://github.com/alexruiz/fest-util")
8124 (synopsis "FEST common utilities")
8125 (description "Common utilities used in all FEST module.")
8126 (license license:asl2.0)))
8127
8128 (define-public java-fest-test
8129 (package
8130 (name "java-fest-test")
8131 (version "2.1.0")
8132 (source (origin
8133 (method url-fetch)
8134 (uri (string-append "https://github.com/alexruiz/fest-test/"
8135 "archive/fest-test-" version ".tar.gz"))
8136 (sha256
8137 (base32
8138 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8139 (build-system ant-build-system)
8140 (arguments
8141 `(#:jar-name "java-fest-test.jar"
8142 #:source-dir "src/main/java"
8143 #:tests? #f)); no tests
8144 (inputs
8145 `(("junit" ,java-junit)))
8146 (home-page "https://github.com/alexruiz/fest-test")
8147 (synopsis "Common FEST testing infrastructure")
8148 (description "Fest-test contains the common FEST testing infrastructure.")
8149 (license license:asl2.0)))
8150
8151 (define-public java-fest-assert
8152 (package
8153 (name "java-fest-assert")
8154 (version "2.0M10")
8155 (source (origin
8156 (method url-fetch)
8157 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8158 "archive/fest-assert-core-" version ".tar.gz"))
8159 (sha256
8160 (base32
8161 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8162 (build-system ant-build-system)
8163 (arguments
8164 `(#:jar-name "java-fest-assert.jar"
8165 #:source-dir "src/main/java"
8166 #:test-exclude
8167 (list
8168 "**/Abstract*.java"
8169 "**/*BaseTest.java"
8170 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8171 "**/MessageFormatter_format_Test.java"
8172 "**/internal/*/*_assert*_Test.java")))
8173 (inputs
8174 `(("java-fest-util" ,java-fest-util)))
8175 (native-inputs
8176 `(("java-junit" ,java-junit)
8177 ("java-fest-test" ,java-fest-test)
8178 ("java-hamcrest-core" ,java-hamcrest-core)
8179 ("java-mockito" ,java-mockito-1)
8180 ("java-cglib" ,java-cglib)
8181 ("java-objenesis" ,java-objenesis)
8182 ("java-asm" ,java-asm)))
8183 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8184 (synopsis "FEST fluent assertions")
8185 (description "FEST-Assert provides a fluent interface for assertions.")
8186 (license license:asl2.0)))
8187
8188 (define-public java-testng
8189 (package
8190 (name "java-testng")
8191 (version "6.14.3")
8192 (source (origin
8193 (method git-fetch)
8194 (uri (git-reference
8195 (url "https://github.com/cbeust/testng.git")
8196 (commit version)))
8197 (file-name (string-append name "-" version "-checkout"))
8198 (sha256
8199 (base32
8200 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8201 (build-system ant-build-system)
8202 (arguments
8203 `(#:jdk ,icedtea-8; java.util.function
8204 #:jar-name "java-testng.jar"
8205 #:source-dir "src/main/java"
8206 #:phases
8207 (modify-phases %standard-phases
8208 ;; FIXME: I don't know why these tests fail
8209 (add-after 'unpack 'delete-failing-tests
8210 (lambda _
8211 (substitute* "src/test/resources/testng.xml"
8212 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8213 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8214 #t))
8215 ;; We don't have groovy
8216 (add-after 'unpack 'delete-groovy-tests
8217 (lambda _
8218 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8219 (substitute* "src/test/resources/testng.xml"
8220 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8221 #t))
8222 (add-before 'build 'copy-resources
8223 (lambda _
8224 (copy-recursively "src/main/resources" "build/classes")
8225 #t))
8226 (add-before 'check 'copy-test-resources
8227 (lambda _
8228 (copy-recursively "src/test/resources" "build/test-classes")
8229 #t))
8230 (replace 'check
8231 (lambda _
8232 (invoke "ant" "compile-tests")
8233 ;; we don't have groovy
8234 (substitute* "src/test/resources/testng.xml"
8235 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8236 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8237 ":build/classes"
8238 ":build/test-classes")
8239 "-Dtest.resources.dir=src/test/resources"
8240 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8241 (propagated-inputs
8242 `(("junit" ,java-junit)
8243 ("java-jsr305" ,java-jsr305)
8244 ("java-bsh" ,java-bsh)
8245 ("java-jcommander" ,java-jcommander)
8246 ("java-guice" ,java-guice)
8247 ("snakeyaml" ,java-snakeyaml)))
8248 (native-inputs
8249 `(("guava" ,java-guava)
8250 ("java-javax-inject" ,java-javax-inject)
8251 ("java-hamcrest" ,java-hamcrest-all)
8252 ("java-assertj" ,java-assertj)
8253 ("java-mockito" ,java-mockito-1)
8254 ("cglib" ,java-cglib)
8255 ("asm" ,java-asm)
8256 ("aopalliance" ,java-aopalliance)))
8257 (home-page "http://testng.org")
8258 (synopsis "Testing framework")
8259 (description "TestNG is a testing framework inspired from JUnit and NUnit
8260 but introducing some new functionalities that make it more powerful and easier
8261 to use.")
8262 (license license:asl2.0)))
8263
8264 (define-public java-jnacl
8265 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8266 (revision "2"))
8267 (package
8268 (name "java-jnacl")
8269 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8270 (source (origin
8271 (method git-fetch)
8272 (uri (git-reference
8273 (url "https://github.com/neilalexander/jnacl.git")
8274 (commit commit)))
8275 (file-name (git-file-name name version))
8276 (sha256
8277 (base32
8278 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8279 (build-system ant-build-system)
8280 (arguments
8281 `(#:jar-name "jnacl.jar"
8282 #:source-dir "src/main/java"
8283 #:jdk ,icedtea-8
8284 #:phases
8285 (modify-phases %standard-phases
8286 (add-before 'build 'fix-tests
8287 (lambda _
8288 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8289 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8290 (("assertions.Assertions") "assertions.api.Assertions"))
8291 #t))
8292 (replace 'check
8293 (lambda _
8294 (invoke "ant" "compile-tests")
8295 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8296 ":build/classes"
8297 ":build/test-classes")
8298 "org.testng.TestNG" "-testclass"
8299 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8300 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8301 ":build/classes"
8302 ":build/test-classes")
8303 "org.testng.TestNG" "-testclass"
8304 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
8305 (native-inputs
8306 `(("java-testng" ,java-testng)
8307 ("java-fest-util" ,java-fest-util)
8308 ("java-fest-assert" ,java-fest-assert)))
8309 (home-page "https://github.com/neilalexander/jnacl")
8310 (synopsis "Java implementation of NaCl")
8311 (description "Pure Java implementation of the NaCl: Networking and
8312 Cryptography library.")
8313 (license license:bsd-2))))
8314
8315 (define-public java-mvel2
8316 (package
8317 (name "java-mvel2")
8318 (version "2.3.1")
8319 (source (origin
8320 (method url-fetch)
8321 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8322 version ".Final.tar.gz"))
8323 (sha256
8324 (base32
8325 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8326 (build-system ant-build-system)
8327 (arguments
8328 `(#:jar-name "mvel2.jar"
8329 #:source-dir "src/main/java"
8330 #:test-exclude
8331 (list "**/Abstract*.java"
8332 ;; Base class with no tests
8333 "**/MVELThreadTest.java")
8334 #:phases
8335 (modify-phases %standard-phases
8336 (add-after 'install 'install-bin
8337 (lambda* (#:key outputs #:allow-other-keys)
8338 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8339 (mkdir-p bin)
8340 (with-output-to-file (string-append bin "/mvel2")
8341 (lambda _
8342 (display
8343 (string-append
8344 "#!" (which "bash") "\n"
8345 "if [ \"$#\" -ne \"2\" ]; then\n"
8346 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8347 "exit\n"
8348 "fi\n"
8349 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8350 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8351 " org.mvel2.sh.Main $1"))))
8352 (chmod (string-append bin "/mvel2") #o755))
8353 #t)))))
8354 (native-inputs
8355 `(("junit" ,java-junit)
8356 ("hamcrest" ,java-hamcrest-core)))
8357 (home-page "https://github.com/mvel/mvel")
8358 (synopsis "MVFLEX Expression Language")
8359 (description "MVEL has largely been inspired by Java syntax, but has some
8360 fundamental differences aimed at making it more efficient as an expression
8361 language, such as operators that directly support collection, array and string
8362 matching, as well as regular expressions. MVEL is used to evaluate expressions
8363 written using Java syntax.
8364
8365 In addition to the expression language, MVEL serves as a templating language for
8366 configuration and string construction.")
8367 (license license:asl2.0)))
8368
8369 (define-public java-commons-jexl-2
8370 (package
8371 (name "java-commons-jexl")
8372 (version "2.1.1")
8373 (source (origin
8374 (method url-fetch)
8375 (uri (string-append "mirror://apache/commons/jexl/source/"
8376 "commons-jexl-" version "-src.tar.gz"))
8377 (sha256
8378 (base32
8379 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8380 (build-system ant-build-system)
8381 (arguments
8382 `(#:jar-name "commons-jexl-2.jar"
8383 #:jdk ,icedtea-8
8384 #:source-dir "src/main/java"
8385 #:phases
8386 (modify-phases %standard-phases
8387 (add-before 'check 'disable-broken-tests
8388 (lambda* (#:key inputs #:allow-other-keys)
8389 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8390 (substitute* "ArithmeticTest.java"
8391 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8392 (("asserter.assertExpression\\(\"imanull") "//"))
8393 ;; This test fails with "ambiguous method invocation"
8394 (delete-file "CacheTest.java")
8395 ;; This test doesn't have access to the temp directory
8396 (substitute* "ClassCreatorTest.java"
8397 (("java.io.tmpdir") "user.dir"))
8398 ;; This test fails in trying to detect whether it can run.
8399 (substitute* "ClassCreator.java"
8400 (("boolean canRun =.*") "boolean canRun = false;\n"))
8401 ;; ...and these tests depend on it.
8402 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8403 (delete-file "scripting/JexlScriptEngineTest.java"))
8404 #t))
8405 (add-before 'build 'run-javacc
8406 (lambda _
8407 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
8408 (invoke "java" "jjtree" "Parser.jjt")
8409 (invoke "java" "javacc" "Parser.jj"))
8410 #t)))))
8411 (inputs
8412 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8413 (native-inputs
8414 `(("java-junit" ,java-junit)
8415 ("java-hamcrest-core" ,java-hamcrest-core)
8416 ("javacc" ,javacc-4)))
8417 (home-page "https://commons.apache.org/proper/commons-jexl/")
8418 (synopsis "Java Expression Language ")
8419 (description "JEXL is a library intended to facilitate the implementation
8420 of dynamic and scripting features in applications and frameworks written in
8421 Java. JEXL implements an Expression Language based on some extensions to the
8422 JSTL Expression Language supporting most of the constructs seen in
8423 shell-script or ECMAScript. Its goal is to expose scripting features usable
8424 by technical operatives or consultants working with enterprise platforms.")
8425 (license license:asl2.0)))
8426
8427 (define-public java-lz4
8428 (package
8429 (name "java-lz4")
8430 (version "1.4.0")
8431 (source (origin
8432 (method url-fetch)
8433 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8434 version ".tar.gz"))
8435 (file-name (string-append name "-" version ".tar.gz"))
8436 (sha256
8437 (base32
8438 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8439 (build-system ant-build-system)
8440 (arguments
8441 `(#:jar-name "lz4.jar"
8442 #:jdk ,icedtea-8
8443 #:source-dir "src/java:src/java-unsafe"
8444 #:tests? #f; FIXME: requires more dependencies
8445 #:phases
8446 (modify-phases %standard-phases
8447 (add-before 'configure 'generate-source
8448 (lambda _
8449 (with-directory-excursion "src/build/source_templates"
8450 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8451 #t)))))
8452 (native-inputs
8453 `(("mvel" ,java-mvel2)))
8454 (home-page "https://jpountz.github.io/lz4-java")
8455 (synopsis "Compression algorithm")
8456 (description "LZ4 - Java is a Java port of the popular lz4 compression
8457 algorithms and xxHash hashing algorithm.")
8458 (license license:asl2.0)))
8459
8460 (define-public java-bouncycastle
8461 (package
8462 (name "java-bouncycastle")
8463 (version "1.60")
8464 (source (origin
8465 (method url-fetch)
8466 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
8467 (substring version 0 1) "v"
8468 (substring version 2 4) ".tar.gz"))
8469 (sha256
8470 (base32
8471 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
8472 (modules '((guix build utils)))
8473 (snippet
8474 '(begin
8475 (for-each delete-file
8476 (find-files "." "\\.jar$"))
8477 #t))))
8478 (build-system ant-build-system)
8479 (arguments
8480 `(#:jdk ,icedtea-8
8481 #:tests? #f
8482 #:phases
8483 (modify-phases %standard-phases
8484 (replace 'build
8485 (lambda _
8486 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
8487 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
8488 ;; FIXME: the tests freeze.
8489 ;; (replace 'check
8490 ;; (lambda _
8491 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
8492 (replace 'install
8493 (install-jars "build/artifacts/jdk1.5/jars")))))
8494 (inputs
8495 `(("java-javax-mail" ,java-javax-mail)))
8496 (native-inputs
8497 `(("unzip" ,unzip)
8498 ("junit" ,java-junit)
8499 ("java-native-access" ,java-native-access)
8500 ("java-native-access-platform" ,java-native-access-platform)))
8501 (home-page "https://www.bouncycastle.org")
8502 (synopsis "Cryptographic library")
8503 (description "Bouncy Castle is a cryptographic library for the Java
8504 programming language.")
8505 (license license:expat)))
8506
8507 (define-public java-lmax-disruptor
8508 (package
8509 (name "java-lmax-disruptor")
8510 (version "3.3.7")
8511 (source (origin
8512 (method url-fetch)
8513 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8514 "archive/" version ".tar.gz"))
8515 (file-name (string-append name "-" version ".tar.gz"))
8516 (sha256
8517 (base32
8518 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8519 (build-system ant-build-system)
8520 (arguments
8521 `(#:jar-name "java-lmax-disruptor.jar"
8522 #:jdk ,icedtea-8
8523 #:tests? #f)); tests hang
8524 (inputs
8525 `(("junit" ,java-junit)
8526 ("java-hdrhistogram" ,java-hdrhistogram)
8527 ("java-jmock" ,java-jmock)
8528 ("java-jmock-legacy" ,java-jmock-legacy)
8529 ("java-jmock-junit4" ,java-jmock-junit4)
8530 ("java-hamcrest-all" ,java-hamcrest-all)))
8531 (native-inputs
8532 `(("cglib" ,java-cglib)
8533 ("objenesis" ,java-objenesis)
8534 ("asm" ,java-asm)))
8535 (home-page "https://www.lmax.com/disruptor")
8536 (synopsis "High performance inter-thread communication")
8537 (description "LMAX Disruptor is a software pattern and software component
8538 for high performance inter-thread communication that avoids the need for
8539 message queues or resource locking.")
8540 (license license:asl2.0)))
8541
8542 (define-public java-commons-bcel
8543 (package
8544 (name "java-commons-bcel")
8545 (version "6.1")
8546 (source (origin
8547 (method url-fetch)
8548 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8549 version "-src.tar.gz"))
8550 (sha256
8551 (base32
8552 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8553 (build-system ant-build-system)
8554 (arguments
8555 `(#:jar-name "bcel.jar"
8556 #:jdk ,icedtea-8
8557 #:source-dir "src/main/java"
8558 #:test-dir "src/test/java"
8559 ;; FIXME: Tests require the unpackaged jna.
8560 #:tests? #f))
8561 (home-page "https://commons.apache.org/proper/commons-bcel/")
8562 (synopsis "Byte code engineering library")
8563 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8564 intended to give users a convenient way to analyze, create, and
8565 manipulate (binary) Java class files. Classes are represented by objects
8566 which contain all the symbolic information of the given class: methods, fields
8567 and byte code instructions, in particular.
8568
8569 Such objects can be read from an existing file, be transformed by a
8570 program (e.g. a class loader at run-time) and written to a file again. An
8571 even more interesting application is the creation of classes from scratch at
8572 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8573 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8574 of Java @code{.class} files.")
8575 (license license:asl2.0)))
8576
8577 (define-public java-xerial-core
8578 (package
8579 (name "java-xerial-core")
8580 (version "2.1")
8581 (source (origin
8582 (method url-fetch)
8583 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8584 version ".tar.gz"))
8585 (file-name (string-append name "-" version ".tar.gz"))
8586 (sha256
8587 (base32
8588 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8589 (build-system ant-build-system)
8590 (arguments
8591 `(#:jar-name "xerial-core.jar"
8592 #:source-dir "xerial-core/src/main/java"
8593 #:test-dir "xerial-core/src/test"
8594 #:phases
8595 (modify-phases %standard-phases
8596 (add-before 'build 'copy-resources
8597 (lambda _
8598 (copy-recursively "xerial-core/src/main/resources"
8599 "build/classes")
8600 #t)))))
8601 (native-inputs
8602 `(("junit" ,java-junit)
8603 ("hamcrest" ,java-hamcrest-core)))
8604 (home-page "https://github.com/xerial/xerial-java")
8605 (synopsis "Data management libraries for Java")
8606 (description "Xerial is a set of data management libraries for the Java
8607 programming language. The ultimate goal of the Xerial project is to manage
8608 everything as database, including class objects, text format data, data
8609 streams, etc.")
8610 (license license:asl2.0)))
8611
8612 (define-public java-powermock-reflect
8613 (package
8614 (name "java-powermock-reflect")
8615 (version "1.7.3")
8616 (source (origin
8617 (method url-fetch)
8618 (uri (string-append "https://github.com/powermock/powermock/"
8619 "archive/powermock-" version ".tar.gz"))
8620 (file-name (string-append name "-" version ".tar.gz"))
8621 (sha256
8622 (base32
8623 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8624 (patches
8625 (search-patches "java-powermock-fix-java-files.patch"))))
8626 (build-system ant-build-system)
8627 (arguments
8628 `(#:jar-name "java-powermock-reflect.jar"
8629 #:jdk ,icedtea-8
8630 #:source-dir "powermock-reflect/src/main/java"
8631 #:test-dir "powermock-reflect/src/test"))
8632 (inputs
8633 `(("java-objenesis" ,java-objenesis)))
8634 (native-inputs
8635 `(("junit" ,java-junit)
8636 ("cglib" ,java-cglib)
8637 ("asm" ,java-asm)
8638 ("hamcrest" ,java-hamcrest-core)
8639 ("assertj" ,java-assertj)))
8640 (home-page "https://github.com/powermock/powermock")
8641 (synopsis "Mock library extension framework")
8642 (description "PowerMock is a framework that extends other mock libraries
8643 such as EasyMock with more powerful capabilities. PowerMock uses a custom
8644 classloader and bytecode manipulation to enable mocking of static methods,
8645 constructors, final classes and methods, private methods, removal of static
8646 initializers and more. By using a custom classloader no changes need to be
8647 done to the IDE or continuous integration servers which simplifies adoption.")
8648 (license license:asl2.0)))
8649
8650 (define-public java-powermock-core
8651 (package
8652 (inherit java-powermock-reflect)
8653 (name "java-powermock-core")
8654 (arguments
8655 `(#:jar-name "java-powermock-core.jar"
8656 #:source-dir "powermock-core/src/main/java"
8657 #:test-dir "powermock-core/src/test"
8658 #:tests? #f; requires powermock-api
8659 #:jdk ,icedtea-8
8660 #:phases
8661 (modify-phases %standard-phases
8662 (add-before 'build 'copy-resources
8663 (lambda _
8664 (copy-recursively "powermock-core/src/main/resources"
8665 "build/classes")
8666 #t)))))
8667 (inputs
8668 `(("reflect" ,java-powermock-reflect)
8669 ("javassist" ,java-jboss-javassist)))
8670 (native-inputs
8671 `(("junit" ,java-junit)
8672 ("assertj" ,java-assertj)
8673 ("mockito" ,java-mockito-1)))))
8674
8675 (define-public java-powermock-api-support
8676 (package
8677 (inherit java-powermock-reflect)
8678 (name "java-powermock-api-support")
8679 (build-system ant-build-system)
8680 (arguments
8681 `(#:jar-name "java-powermock-api-support.jar"
8682 #:jdk ,icedtea-8
8683 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8684 #:tests? #f)); no tests
8685 (inputs
8686 `(("core" ,java-powermock-core)
8687 ("reflect" ,java-powermock-reflect)))))
8688
8689 (define-public java-powermock-modules-junit4-common
8690 (package
8691 (inherit java-powermock-reflect)
8692 (name "java-powermock-modules-junit4-common")
8693 (build-system ant-build-system)
8694 (arguments
8695 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8696 #:jdk ,icedtea-8
8697 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8698 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8699 (inputs
8700 `(("core" ,java-powermock-core)
8701 ("easymock" ,java-easymock)
8702 ("reflect" ,java-powermock-reflect)
8703 ("hamcrest" ,java-hamcrest-core)
8704 ("cglib" ,java-cglib)))))
8705
8706 (define-public java-powermock-modules-junit4
8707 (package
8708 (inherit java-powermock-reflect)
8709 (name "java-powermock-modules-junit4")
8710 (build-system ant-build-system)
8711 (arguments
8712 `(#:jar-name "java-powermock-modules-junit4.jar"
8713 #:jdk ,icedtea-8
8714 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
8715 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8716 #:phases
8717 (modify-phases %standard-phases
8718 (add-before 'build 'fix-junit-detection
8719 (lambda _
8720 ;; Our junit version is 4.12-SNAPSHOT
8721 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8722 "PowerMockJUnit4MethodValidator.java")
8723 (("4.12") "4.12-SNAPSHOT"))
8724 #t)))))
8725 (inputs
8726 `(("core" ,java-powermock-core)
8727 ("reflect" ,java-powermock-reflect)
8728 ("common" ,java-powermock-modules-junit4-common)
8729 ("cglib" ,java-cglib)))
8730 (native-inputs
8731 `(("easymock" ,java-easymock)
8732 ("hamcrest" ,java-hamcrest-core)
8733 ("objenesis" ,java-objenesis)
8734 ("asm" ,java-asm)
8735 ("junit" ,java-junit)))))
8736
8737 (define-public java-powermock-api-easymock
8738 (package
8739 (inherit java-powermock-reflect)
8740 (name "java-powermock-api-easymock")
8741 (build-system ant-build-system)
8742 (arguments
8743 `(#:jar-name "java-powermock-api-easymock.jar"
8744 #:jdk ,icedtea-8
8745 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8746 #:tests? #f; no tests
8747 #:phases
8748 (modify-phases %standard-phases
8749 (add-before 'build 'fix-file
8750 (lambda _
8751 ;; FIXME: This looks wrong, but it fixes a build error.
8752 (with-directory-excursion "powermock-api/powermock-api-easymock"
8753 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8754 (("classLoader instanceof MockClassLoader") "false")
8755 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8756 #t)))))
8757 (inputs
8758 `(("core" ,java-powermock-core)
8759 ("easymock" ,java-easymock)
8760 ("reflect" ,java-powermock-reflect)
8761 ("support" ,java-powermock-api-support)
8762 ("cglib" ,java-cglib)))))
8763
8764 (define-public java-jboss-jms-api-spec
8765 (package
8766 (name "java-jboss-jms-api-spec")
8767 (version "2.0")
8768 (source (origin
8769 (method url-fetch)
8770 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8771 "archive/jboss-jms-api_" version
8772 "_spec-1.0.1.Final.tar.gz"))
8773 (sha256
8774 (base32
8775 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8776 (build-system ant-build-system)
8777 (arguments
8778 `(#:jar-name "java-jboss-jms-api_spec.jar"
8779 #:jdk ,icedtea-8
8780 #:source-dir "."
8781 #:tests? #f)); no tests
8782 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8783 (synopsis "Java Message Service API specification")
8784 (description "Java Message Service (JMS) API is used to send messages
8785 messages between two or more clients. It is a messaging standard that allows
8786 application components to create, send, receive, and read messages.")
8787 ; either gpl2 only with GPL Classpath Exception, or cddl.
8788 (license (list license:gpl2 license:cddl1.0))))
8789
8790 (define-public java-mail
8791 (package
8792 (name "java-mail")
8793 (version "1.6.0")
8794 (source (origin
8795 (method url-fetch)
8796 (uri (string-append "https://github.com/javaee/javamail/archive/"
8797 "JAVAMAIL-1_6_0.tar.gz"))
8798 (sha256
8799 (base32
8800 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8801 (build-system ant-build-system)
8802 (arguments
8803 `(#:jar-name "java-mail.jar"
8804 #:jdk ,icedtea-8
8805 #:source-dir "mail/src/main/java"
8806 #:test-dir "mail/src/test"
8807 #:test-exclude
8808 (list "**/CollectorFormatterTest.java"
8809 "**/CompactFormatterTest.java"
8810 "**/DurationFilterTest.java"
8811 "**/MailHandlerTest.java"
8812 "**/GetLocalAddressTest.java"
8813 ;; FIXME: both end with:
8814 ;; java.lang.ClassNotFoundException:
8815 ;; javax.mail.internet.MimeMultipartParseTest
8816 "**/MimeMultipartParseTest.java"
8817 "**/SearchTermSerializationTest.java")
8818 #:phases
8819 (modify-phases %standard-phases
8820 (add-before 'configure 'move-version.java
8821 (lambda _
8822 (copy-file "mail/src/main/resources/javax/mail/Version.java"
8823 "mail/src/main/java/javax/mail/Version.java")
8824 #t))
8825 (add-before 'build 'copy-resources
8826 (lambda _
8827 (copy-recursively "mail/src/main/resources/META-INF"
8828 "build/classes/META-INF")
8829 #t)))))
8830 (native-inputs
8831 `(("junit" ,java-junit)
8832 ("hamcrest" ,java-hamcrest-core)))
8833 (home-page "https://javaee.github.io/javamail/")
8834 (synopsis "Mail-related functionnalities in Java")
8835 (description "The JavaMail API provides a platform-independent and
8836 protocol-independent framework to build mail and messaging applications.")
8837 ;; General Public License Version 2 only ("GPL") or the Common Development
8838 ;; and Distribution License("CDDL")
8839 (license (list license:cddl1.1
8840 license:gpl2)))); with classpath exception
8841
8842 (define-public java-jeromq
8843 (package
8844 (name "java-jeromq")
8845 (version "0.4.3")
8846 (source (origin
8847 (method git-fetch)
8848 (uri (git-reference
8849 (url "https://github.com/zeromq/jeromq.git")
8850 (commit (string-append "v" version))))
8851 (file-name (string-append name "-" version "-checkout"))
8852 (sha256
8853 (base32
8854 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
8855 (patches (search-patches "java-jeromq-fix-tests.patch"))))
8856 (build-system ant-build-system)
8857 (arguments
8858 `(#:jar-name "java-jeromq.jar"
8859 #:source-dir "src/main/java"
8860 #:jdk ,icedtea-8
8861 #:test-exclude
8862 (list
8863 "**/Abstract*.java"
8864 ;; Requires network
8865 "**/ZBeaconTest.java"
8866 ;; Failures
8867 "**/DealerSpecTest.java"
8868 "**/CustomDecoderTest.java"
8869 "**/CustomEncoderTest.java"
8870 "**/ConnectRidTest.java"
8871 "**/ReqSpecTest.java"
8872 "**/PushPullSpecTest.java"
8873 "**/PubSubHwmTest.java"
8874 "**/RouterSpecTest.java"
8875 "**/ProxyTest.java")))
8876 (inputs
8877 `(("java-jnacl" ,java-jnacl)))
8878 (native-inputs
8879 `(("java-hamcrest-core" ,java-hamcrest-core)
8880 ("junit" ,java-junit)))
8881 (home-page "http://zeromq.org/bindings:java")
8882 (synopsis "Java binding for 0MQ")
8883 (description "Jeromq provides the java bindings for 0MQ.")
8884 (license license:mpl2.0)))
8885
8886 (define-public java-kafka-clients
8887 (package
8888 (name "java-kafka-clients")
8889 (version "1.0.0")
8890 (source (origin
8891 (method url-fetch)
8892 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
8893 version "-src.tgz"))
8894 (sha256
8895 (base32
8896 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
8897 (build-system ant-build-system)
8898 (arguments
8899 `(#:jar-name "java-kafka-clients.jar"
8900 #:jdk ,icedtea-8
8901 #:source-dir "clients/src/main/java"
8902 #:test-dir "clients/src/test"
8903 #:test-exclude
8904 (list
8905 ;; This file does not contain a class
8906 "**/IntegrationTest.java"
8907 ;; Requires network
8908 "**/ClientUtilsTest.java"
8909 ;; End with errors that seem related to our powermock
8910 "**/KafkaProducerTest.java"
8911 "**/BufferPoolTest.java")))
8912 (inputs
8913 `(("java-slf4j-api" ,java-slf4j-api)
8914 ("java-lz4" ,java-lz4)))
8915 (native-inputs
8916 `(("junit" ,java-junit)
8917 ("hamcrest" ,java-hamcrest-all)
8918 ("objenesis" ,java-objenesis)
8919 ("asm" ,java-asm)
8920 ("cglib" ,java-cglib)
8921 ("javassist" ,java-jboss-javassist)
8922 ("snappy" ,java-snappy)
8923 ("easymock" ,java-easymock)
8924 ("powermock" ,java-powermock-core)
8925 ("powermock-easymock" ,java-powermock-api-easymock)
8926 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
8927 ("powermock-junit4" ,java-powermock-modules-junit4)
8928 ("powermock-support" ,java-powermock-api-support)
8929 ("java-bouncycastle" ,java-bouncycastle)))
8930 (home-page "https://kafka.apache.org")
8931 (synopsis "Distributed streaming platform")
8932 (description "Kafka is a distributed streaming platform, which means:
8933 @itemize
8934 @item it can publish and subscribe to streams of records;
8935 @item it can store streams of records in a fault-tolerant way;
8936 @item it can process streams of records as they occur.
8937 @end itemize")
8938 ;; Either cddl or gpl2 only.
8939 (license (list license:cddl1.1; actually cddl1.1
8940 license:gpl2)))); with classpath exception
8941
8942 (define-public java-jdom
8943 (package
8944 (name "java-jdom")
8945 (version "1.1.3")
8946 (source (origin
8947 (method url-fetch)
8948 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
8949 version ".tar.gz"))
8950 (sha256
8951 (base32
8952 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
8953 (build-system ant-build-system)
8954 (arguments
8955 `(#:build-target "package"
8956 #:tests? #f; tests are run as part of the build process
8957 #:phases
8958 (modify-phases %standard-phases
8959 (replace 'install
8960 (install-jars "build")))))
8961 (home-page "http://jdom.org/")
8962 (synopsis "Access, manipulate, and output XML data")
8963 (description "Java-based solution for accessing, manipulating, and
8964 outputting XML data from Java code.")
8965 (license license:bsd-4)))
8966
8967 (define-public java-geronimo-xbean-reflect
8968 (package
8969 (name "java-geronimo-xbean-reflect")
8970 (version "4.5")
8971 (source (origin
8972 (method svn-fetch)
8973 (uri (svn-reference
8974 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
8975 (revision 1807396)))
8976 (file-name (string-append name "-" version))
8977 (sha256
8978 (base32
8979 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
8980 (build-system ant-build-system)
8981 (arguments
8982 `(#:jar-name "geronimo-xbean-reflect.jar"
8983 #:source-dir "xbean-reflect/src/main/java"
8984 #:test-dir "xbean-reflect/src/test"
8985 #:jdk ,icedtea-8
8986 #:test-exclude
8987 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
8988 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
8989 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
8990 #:phases
8991 (modify-phases %standard-phases
8992 (add-before 'build 'fix-source
8993 (lambda _
8994 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
8995 ;; org.apache.xbean.asm6 is actually repackaged java-asm
8996 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
8997 (("org.apache.xbean.asm5") "org.objectweb.asm"))
8998 #t))))))
8999 (inputs
9000 `(("asm" ,java-asm)
9001 ("log4j" ,java-log4j-api)
9002 ("log4j-1.2" ,java-log4j-1.2-api)
9003 ("log4j-core" ,java-log4j-core)
9004 ("logging" ,java-commons-logging-minimal)))
9005 (native-inputs
9006 `(("junit" ,java-junit)))
9007 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9008 (synopsis "Dependency injection helper")
9009 (description "Xbean-reflect provides very flexible ways to create objects
9010 and graphs of objects for dependency injection frameworks")
9011 (license license:asl2.0)))
9012
9013 (define-public java-geronimo-xbean-bundleutils
9014 (package
9015 (inherit java-geronimo-xbean-reflect)
9016 (name "java-geronimo-xbean-bundleutils")
9017 (arguments
9018 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9019 #:source-dir "xbean-bundleutils/src/main/java"
9020 #:test-dir "xbean-bundleutils/src/test"
9021 #:phases
9022 (modify-phases %standard-phases
9023 (add-before 'build 'fix-java
9024 (lambda _
9025 ;; We use a more recent version of osgi, so this file requires
9026 ;; more interface method implementations.
9027 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9028 (("import org.osgi.framework.ServiceRegistration;")
9029 "import org.osgi.framework.ServiceRegistration;
9030 import org.osgi.framework.ServiceFactory;
9031 import java.util.Collection;
9032 import org.osgi.framework.ServiceObjects;")
9033 (("public Bundle getBundle\\(\\)")
9034 "@Override
9035 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9036 throw new UnsupportedOperationException();
9037 }
9038 @Override
9039 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9040 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9041 throw new UnsupportedOperationException();
9042 }
9043 public Bundle getBundle()"))
9044 #t)))))
9045 (inputs
9046 `(("java-slf4j" ,java-slf4j-api)
9047 ("java-asm" ,java-asm)
9048 ("java-osgi-framework" ,java-osgi-framework)
9049 ("java-eclipse-osgi" ,java-eclipse-osgi)
9050 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9051
9052 (define-public java-geronimo-xbean-asm-util
9053 (package
9054 (inherit java-geronimo-xbean-reflect)
9055 (name "java-geronimo-xbean-asm-util")
9056 (arguments
9057 `(#:jar-name "geronimo-xbean-asm-util.jar"
9058 #:source-dir "xbean-asm-util/src/main/java"
9059 #:tests? #f)); no tests
9060 (inputs
9061 `(("java-asm" ,java-asm)))
9062 (native-inputs '())))
9063
9064 (define-public java-geronimo-xbean-finder
9065 (package
9066 (inherit java-geronimo-xbean-reflect)
9067 (name "java-geronimo-xbean-finder")
9068 (arguments
9069 `(#:jar-name "geronimo-xbean-finder.jar"
9070 #:source-dir "xbean-finder/src/main/java"
9071 #:test-dir "xbean-finder/src/test"))
9072 (inputs
9073 `(("java-slf4j-api" ,java-slf4j-api)
9074 ("java-asm" ,java-asm)
9075 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9076 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9077 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9078 ("java-osgi-framework" ,java-osgi-framework)))
9079 (native-inputs
9080 `(("java-junit" ,java-junit)
9081 ("java-hamcrest-core" ,java-hamcrest-core)))))
9082
9083 (define-public java-gson
9084 (package
9085 (name "java-gson")
9086 (version "2.8.2")
9087 (source (origin
9088 (method url-fetch)
9089 (uri (string-append "https://github.com/google/gson/archive/"
9090 "gson-parent-" version ".tar.gz"))
9091 (sha256
9092 (base32
9093 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9094 (build-system ant-build-system)
9095 (arguments
9096 `(#:jar-name "gson.jar"
9097 #:source-dir "gson/src/main/java"
9098 #:test-dir "gson/src/test"))
9099 (native-inputs
9100 `(("java-junit" ,java-junit)
9101 ("java-hamcrest-core" ,java-hamcrest-core)))
9102 (home-page "https://github.com/google/gson")
9103 (synopsis "Java serialization/deserialization library from/to JSON")
9104 (description "Gson is a Java library that can be used to convert Java
9105 Objects into their JSON representation. It can also be used to convert a JSON
9106 string to an equivalent Java object. Gson can work with arbitrary Java objects
9107 including pre-existing objects that you do not have source-code of.")
9108 (license license:asl2.0)))
9109
9110 (define-public java-hawtjni
9111 (package
9112 (name "java-hawtjni")
9113 (version "1.15")
9114 (source (origin
9115 (method url-fetch)
9116 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9117 "hawtjni-project-" version ".tar.gz"))
9118 (sha256
9119 (base32
9120 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9121 (build-system ant-build-system)
9122 (arguments
9123 `(#:jar-name "hawtjni.jar"
9124 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9125 #:tests? #f; no tests
9126 #:phases
9127 (modify-phases %standard-phases
9128 (add-before 'build 'build-native
9129 (lambda* (#:key inputs #:allow-other-keys)
9130 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9131 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9132 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9133 "-fPIC" "-O2" include)
9134 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9135 "-fPIC" "-O2" include)
9136 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9137 "hawtjni.o" "hawtjni-callback.o")))
9138 #t))
9139 (add-after 'install 'install-native
9140 (lambda* (#:key outputs #:allow-other-keys)
9141 (let* ((out (assoc-ref outputs "out"))
9142 (lib (string-append out "/lib"))
9143 (inc (string-append out "/include")))
9144 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9145 (install-file "libhawtjni.so" lib)
9146 (install-file "hawtjni.h" inc)))
9147 #t)))))
9148 (inputs
9149 `(("java-commons-cli" ,java-commons-cli)
9150 ("java-asm" ,java-asm)
9151 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9152 (home-page "https://fusesource.github.io/hawtjni/")
9153 (synopsis "JNI code generator")
9154 (description "HawtJNI is a code generator that produces the JNI code needed
9155 to implement Java native methods. It is based on the jnigen code generator
9156 that is part of the SWT Tools project.")
9157 (license license:asl2.0)))
9158
9159 (define-public java-jansi-native
9160 (package
9161 (name "java-jansi-native")
9162 (version "1.7")
9163 (source (origin
9164 (method url-fetch)
9165 (uri (string-append "https://github.com/fusesource/jansi-native/"
9166 "archive/jansi-native-" version ".tar.gz"))
9167 (sha256
9168 (base32
9169 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9170 (build-system ant-build-system)
9171 (arguments
9172 `(#:jar-name "jansi-native.jar"
9173 #:source-dir "src/main/java"
9174 #:tests? #f; no tests
9175 #:phases
9176 (modify-phases %standard-phases
9177 (add-before 'build 'build-native
9178 (lambda* (#:key inputs #:allow-other-keys)
9179 ;; there are more required files for windows in windows/
9180 (with-directory-excursion "src/main/native-package/src"
9181 (substitute* "jansi_ttyname.c"
9182 (("#include \"jansi_.*") ""))
9183 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9184 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9185 "/include")
9186 (string-append "-I" (assoc-ref inputs "jdk")
9187 "/include/linux")
9188 "-fPIC" "-O2")
9189 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9190 (add-before 'build 'install-native
9191 (lambda _
9192 (let ((dir (string-append "build/classes/META-INF/native/"
9193 ,(match (%current-system)
9194 ((or "i686-linux" "armhf-linux")
9195 "linux32")
9196 ((or "x86_64-linux" "aarch64-linux")
9197 "linux64")))))
9198 (install-file "src/main/native-package/src/libjansi.so" dir))
9199 #t))
9200 (add-after 'install 'install-native
9201 (lambda* (#:key outputs #:allow-other-keys)
9202 (install-file "src/main/native-package/src/jansi.h"
9203 (string-append (assoc-ref outputs "out") "/include"))
9204 #t)))))
9205 (inputs
9206 `(("java-hawtjni" ,java-hawtjni)))
9207 (home-page "https://fusesource.github.io/jansi/")
9208 (synopsis "Native library for jansi")
9209 (description "This package provides the native library for jansi, a small
9210 Java library that allows you to use ANSI escape sequences to format your
9211 console output.")
9212 (license license:asl2.0)))
9213
9214 (define-public java-jansi
9215 (package
9216 (name "java-jansi")
9217 (version "1.16")
9218 (source (origin
9219 (method url-fetch)
9220 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9221 "jansi-project-" version ".tar.gz"))
9222 (sha256
9223 (base32
9224 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9225 (build-system ant-build-system)
9226 (arguments
9227 `(#:jar-name "jansi.jar"
9228 #:source-dir "jansi/src/main/java"
9229 #:test-dir "jansi/src/test"
9230 #:phases
9231 (modify-phases %standard-phases
9232 (add-after 'check 'clear-term
9233 (lambda _
9234 (invoke "echo" "-e" "\\e[0m"))))))
9235 (inputs
9236 `(("java-jansi-native" ,java-jansi-native)))
9237 (native-inputs
9238 `(("java-junit" ,java-junit)
9239 ("java-hamcrest-core" ,java-hamcrest-core)))
9240 (home-page "https://fusesource.github.io/jansi/")
9241 (synopsis "Portable ANSI escape sequences")
9242 (description "Jansi is a Java library that allows you to use ANSI escape
9243 sequences to format your console output which works on every platform.")
9244 (license license:asl2.0)))
9245
9246 (define-public java-jboss-el-api-spec
9247 (package
9248 (name "java-jboss-el-api-spec")
9249 (version "3.0")
9250 (source (origin
9251 (method url-fetch)
9252 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9253 "archive/jboss-el-api_" version
9254 "_spec-1.0.7.Final.tar.gz"))
9255 (sha256
9256 (base32
9257 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9258 (build-system ant-build-system)
9259 (arguments
9260 `(#:jar-name "java-jboss-el-api_spec.jar"
9261 #:jdk ,icedtea-8))
9262 (inputs
9263 `(("java-junit" ,java-junit)))
9264 (home-page "https://github.com/jboss/jboss-el-api_spec")
9265 (synopsis "JSR-341 expression language 3.0 API")
9266 (description "This package contains an implementation of the JSR-341
9267 specification for the expression language 3.0. It implements an expression
9268 language inspired by ECMAScript and XPath. This language is used with
9269 JavaServer Pages (JSP).")
9270 ;; Either GPL2 only or CDDL.
9271 (license (list license:gpl2 license:cddl1.1))))
9272
9273 (define-public java-jboss-interceptors-api-spec
9274 (package
9275 (name "java-jboss-interceptors-api-spec")
9276 (version "1.2")
9277 (source (origin
9278 (method url-fetch)
9279 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9280 "archive/jboss-interceptors-api_" version
9281 "_spec-1.0.0.Final.tar.gz"))
9282 (sha256
9283 (base32
9284 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9285 (build-system ant-build-system)
9286 (arguments
9287 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9288 #:jdk ,icedtea-8
9289 #:source-dir "."
9290 #:tests? #f)); no tests
9291 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9292 (synopsis "Interceptors 1.2 API classes from JSR 318")
9293 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9294 API. Interceptors are used to interpose on business method invocations and
9295 specific events.")
9296 ;; Either GPL2 only or CDDL.
9297 (license (list license:gpl2 license:cddl1.1))))
9298
9299 (define-public java-cdi-api
9300 (package
9301 (name "java-cdi-api")
9302 (version "2.0")
9303 (source (origin
9304 (method url-fetch)
9305 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9306 version ".tar.gz"))
9307 (file-name (string-append name "-" version ".tar.gz"))
9308 (sha256
9309 (base32
9310 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9311 (build-system ant-build-system)
9312 (arguments
9313 `(#:source-dir "api/src/main/java"
9314 #:jar-name "java-cdi-api.jar"
9315 #:test-dir "api/src/test"
9316 #:jdk ,icedtea-8
9317 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9318 (inputs
9319 `(("java-javax-inject" ,java-javax-inject)
9320 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9321 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9322 (native-inputs
9323 `(("java-testng" ,java-testng)
9324 ("java-hamcrest-core" ,java-hamcrest-core)))
9325 (home-page "http://cdi-spec.org/")
9326 (synopsis "Contexts and Dependency Injection APIs")
9327 (description "Java-cdi-api contains the required APIs for Contexts and
9328 Dependency Injection (CDI).")
9329 (license license:asl2.0)))
9330
9331 (define-public java-joda-convert
9332 (package
9333 (name "java-joda-convert")
9334 (version "1.9.2")
9335 (source (origin
9336 (method url-fetch)
9337 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9338 version ".tar.gz"))
9339 (file-name (string-append name "-" version ".tar.gz"))
9340 (sha256
9341 (base32
9342 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9343 (build-system ant-build-system)
9344 (arguments
9345 `(#:jar-name (string-append ,name "-" ,version ".jar")
9346 #:source-dir "src/main/java"
9347 #:test-include (list "**/Test*.java")
9348 ;; Contains only interfaces and base classes (no test)
9349 #:test-exclude (list "**/test*/**.java")))
9350 (inputs
9351 `(("java-guava" ,java-guava)))
9352 (native-inputs
9353 `(("java-junit" ,java-junit)
9354 ("java-hamcrest-core" ,java-hamcrest-core)))
9355 (home-page "http://www.joda.org/joda-convert/")
9356 (synopsis "Conversion between Objects and Strings")
9357 (description "Joda-Convert provides a small set of classes to aid
9358 conversion between Objects and Strings. It is not intended to tackle the
9359 wider problem of Object to Object transformation.")
9360 (license license:asl2.0)))
9361
9362 (define-public java-joda-time
9363 (package
9364 (name "java-joda-time")
9365 (version "2.9.9")
9366 (source (origin
9367 (method url-fetch)
9368 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9369 version ".tar.gz"))
9370 (file-name (string-append name "-" version ".tar.gz"))
9371 (sha256
9372 (base32
9373 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9374 (build-system ant-build-system)
9375 (arguments
9376 `(#:jar-name "java-joda-time.jar"
9377 #:source-dir "src/main/java"
9378 #:test-include (list "**/Test*.java")
9379 ;; There is no runnable test in these files
9380 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9381 #:phases
9382 (modify-phases %standard-phases
9383 (add-after 'build 'build-resources
9384 (lambda _
9385 (mkdir-p "build/classes/org/joda/time/tz/data")
9386 (mkdir-p "build/classes/org/joda/time/format")
9387 ;; This will produce the following exception:
9388 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9389 ;; which is normal, because it doesn't exist yet. It still generates
9390 ;; the same file as in the binary one can find on maven.
9391 (invoke "java" "-cp"
9392 (string-append "build/classes:" (getenv "CLASSPATH"))
9393 "org.joda.time.tz.ZoneInfoCompiler"
9394 "-src" "src/main/java/org/joda/time/tz/src"
9395 "-dst" "build/classes/org/joda/time/tz/data"
9396 "africa" "antarctica" "asia" "australasia"
9397 "europe" "northamerica" "southamerica"
9398 "pacificnew" "etcetera" "backward" "systemv")
9399 (for-each (lambda (f)
9400 (copy-file f (string-append
9401 "build/classes/org/joda/time/format/"
9402 (basename f))))
9403 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9404 #t))
9405 (add-before 'install 'regenerate-jar
9406 (lambda _
9407 ;; We need to regenerate the jar file to add generated data.
9408 (delete-file "build/jar/java-joda-time.jar")
9409 (invoke "ant" "jar")))
9410 (add-before 'check 'copy-test-resources
9411 (lambda _
9412 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9413 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9414 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9415 (copy-recursively "src/test/resources" "build/test-classes")
9416 #t)))))
9417 (inputs
9418 `(("java-joda-convert" ,java-joda-convert)))
9419 (native-inputs
9420 `(("java-junit" ,java-junit)
9421 ("java-hamcrest-core" ,java-hamcrest-core)
9422 ("tzdata" ,tzdata)))
9423 (home-page "http://www.joda.org/joda-time/")
9424 (synopsis "Replacement for the Java date and time classes")
9425 (description "Joda-Time is a replacement for the Java date and time
9426 classes prior to Java SE 8.")
9427 (license license:asl2.0)))
9428
9429 (define-public java-xerces
9430 (package
9431 (name "java-xerces")
9432 (version "2.11.0")
9433 (source
9434 (origin
9435 (method url-fetch)
9436 (uri (string-append "mirror://apache/xerces/j/source/"
9437 "Xerces-J-src." version ".tar.gz"))
9438 (sha256
9439 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9440 (patches (search-patches
9441 "java-xerces-xjavac_taskdef.patch"
9442 "java-xerces-build_dont_unzip.patch"
9443 "java-xerces-bootclasspath.patch"))))
9444 (build-system ant-build-system)
9445 (arguments
9446 `(#:tests? #f;; Test files are not present
9447 #:test-target "test"
9448 #:jdk ,icedtea-8
9449 #:phases
9450 (modify-phases %standard-phases
9451 (add-after 'unpack 'create-build.properties
9452 (lambda* (#:key inputs #:allow-other-keys)
9453 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9454 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9455 (with-output-to-file "build.properties"
9456 (lambda _
9457 (format #t
9458 "jar.jaxp = ~a/share/java/jaxp.jar~@
9459 jar.apis-ext = ~a/share/java/jaxp.jar~@
9460 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9461 jaxp jaxp resolver)))
9462 ;; Make xerces use our version of jaxp in tests
9463 (substitute* "build.xml"
9464 (("xml-apis.jar")
9465 (string-append jaxp "/share/java/jaxp.jar"))
9466 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9467 "${jar.apis}")))
9468 #t))
9469 (replace 'install (install-jars "build")))))
9470 (inputs
9471 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9472 ("java-jaxp" ,java-jaxp)))
9473 (home-page "https://xerces.apache.org/xerces2-j/")
9474 (synopsis "Validating XML parser for Java with DOM level 3 support")
9475 (description "The Xerces2 Java parser is the reference implementation of
9476 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9477 processor.
9478
9479 Xerces2-J supports the following standards and APIs:
9480
9481 @itemize
9482 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9483 @item Namespaces in XML Recommendation
9484 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9485 Range Recommendations
9486 @item Simple API for XML (SAX) 2.0.1 Core and Extension
9487 @item Java APIs for XML Processing (JAXP) 1.2.01
9488 @item XML Schema 1.0 Structures and Datatypes Recommendations
9489 @item Experimental implementation of the Document Object Model (DOM) Level 3
9490 Core and Load/Save Working Drafts
9491 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9492 Candidate Recommendation
9493 @end itemize
9494
9495 Xerces is now able to parse documents written according to the XML 1.1
9496 Candidate Recommendation, except that it does not yet provide an option to
9497 enable normalization checking as described in section 2.13 of this
9498 specification. It also handles namespaces according to the XML Namespaces 1.1
9499 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9500 the DOM level 3 load/save API's are in use.")
9501 (license license:asl2.0)))
9502
9503 (define-public java-jline
9504 (package
9505 (name "java-jline")
9506 (version "1.0")
9507 (source (origin
9508 (method url-fetch)
9509 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9510 version ".tar.gz"))
9511 (sha256
9512 (base32
9513 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9514 (build-system ant-build-system)
9515 (arguments
9516 `(#:jar-name "jline.jar"
9517 #:source-dir "src/main/java"
9518 #:test-dir "src/test"
9519 #:phases
9520 (modify-phases %standard-phases
9521 (add-before 'build 'copy-resources
9522 (lambda _
9523 (copy-recursively "src/main/resources" "build/classes")
9524 #t)))))
9525 (native-inputs
9526 `(("java-junit" ,java-junit)))
9527 (home-page "https://jline.github.io")
9528 (synopsis "Console input handling library")
9529 (description "JLine is a Java library for handling console input. It is
9530 similar in functionality to BSD editline and GNU readline but with additional
9531 features that bring it on par with the Z shell line editor.")
9532 (license license:bsd-3)))
9533
9534 (define-public java-jline-2
9535 (package
9536 (inherit java-jline)
9537 (version "2.14.5")
9538 (source (origin
9539 (method url-fetch)
9540 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
9541 version ".tar.gz"))
9542 (sha256
9543 (base32
9544 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
9545 (arguments
9546 `(#:jdk ,icedtea-8
9547 ,@(package-arguments java-jline)))
9548 (inputs
9549 `(("java-jansi" ,java-jansi)
9550 ("java-jansi-native" ,java-jansi-native)))
9551 (native-inputs
9552 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
9553 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
9554 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
9555 ("java-powermock-api-support" ,java-powermock-api-support)
9556 ("java-powermock-core" ,java-powermock-core)
9557 ("java-powermock-reflect" ,java-powermock-reflect)
9558 ("java-easymock" ,java-easymock)
9559 ("java-jboss-javassist" ,java-jboss-javassist)
9560 ("java-objenesis" ,java-objenesis)
9561 ("java-asm" ,java-asm)
9562 ("java-hamcrest-core" ,java-hamcrest-core)
9563 ("java-cglib" ,java-cglib)
9564 ("java-junit" ,java-junit)
9565 ("java-hawtjni" ,java-hawtjni)))))
9566
9567 (define-public java-xmlunit
9568 (package
9569 (name "java-xmlunit")
9570 (version "2.5.1")
9571 (source (origin
9572 (method url-fetch)
9573 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9574 version ".tar.gz"))
9575 (file-name (string-append name "-" version ".tar.gz"))
9576 (sha256
9577 (base32
9578 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9579 (build-system ant-build-system)
9580 (arguments
9581 `(#:jar-name "java-xmlunit.jar"
9582 #:source-dir "xmlunit-core/src/main/java"
9583 #:test-dir "xmlunit-core/src/test"
9584 #:phases
9585 (modify-phases %standard-phases
9586 (add-before 'check 'copy-test-resources
9587 (lambda* (#:key inputs #:allow-other-keys)
9588 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9589 #t)))))
9590 (native-inputs
9591 `(("java-junit" ,java-junit)
9592 ("java-mockito-1" ,java-mockito-1)
9593 ("java-hamcrest-all" ,java-hamcrest-all)
9594 ("java-objenesis" ,java-objenesis)
9595 ("java-asm" ,java-asm)
9596 ("java-cglib" ,java-cglib)
9597 ("resources"
9598 ,(origin
9599 (method git-fetch)
9600 (uri (git-reference
9601 (url "https://github.com/xmlunit/test-resources.git")
9602 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9603 (file-name "java-xmlunit-test-resources")
9604 (sha256
9605 (base32
9606 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9607 (home-page "http://www.xmlunit.org/")
9608 (synopsis "XML output testing")
9609 (description "XMLUnit provides you with the tools to verify the XML you
9610 emit is the one you want to create. It provides helpers to validate against
9611 an XML Schema, assert the values of XPath queries or compare XML documents
9612 against expected outcomes.")
9613 (license license:asl2.0)))
9614
9615 (define-public java-xmlunit-legacy
9616 (package
9617 (inherit java-xmlunit)
9618 (name "java-xmlunit-legacy")
9619 (arguments
9620 `(#:jar-name "java-xmlunit-legacy.jar"
9621 #:source-dir "xmlunit-legacy/src/main/java"
9622 #:test-dir "xmlunit-legacy/src/test"))
9623 (inputs
9624 `(("java-xmlunit" ,java-xmlunit)
9625 ("java-junit" ,java-junit)))
9626 (native-inputs
9627 `(("java-mockito-1" ,java-mockito-1)))))
9628
9629 (define-public java-openchart2
9630 (package
9631 (name "java-openchart2")
9632 (version "1.4.3")
9633 (source (origin
9634 (method url-fetch)
9635 (uri (string-append "http://download.approximatrix.com/openchart2/"
9636 "openchart2-" version ".source.zip"))
9637 (sha256
9638 (base32
9639 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9640 (build-system ant-build-system)
9641 (arguments
9642 `(#:test-target "test"
9643 #:phases
9644 (modify-phases %standard-phases
9645 (add-after 'unpack 'fix-junit-errors
9646 (lambda _
9647 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9648 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9649 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9650 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9651 "model/DefaultChartDataModelConstraintsTest.java"
9652 "model/MultiScatterDataModelConstraintsTest.java"
9653 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9654 (("(assertEquals[^;]+);" before _)
9655 (string-append (string-drop-right before 2) ", 1E-6);"))))
9656 #t))
9657 (replace 'install (install-jars ".")))))
9658 (native-inputs
9659 `(("unzip" ,unzip)
9660 ("java-junit" ,java-junit)
9661 ("java-hamcrest-core" ,java-hamcrest-core)))
9662 (home-page "http://approximatrix.com/products/openchart2/")
9663 (synopsis "Simple plotting for Java")
9664 (description "Openchart2 provides a simple, yet powerful, interface for
9665 Java programmers to create two-dimensional charts and plots. The library
9666 features an assortment of graph styles, including advanced scatter plots, bar
9667 graphs, and pie charts.")
9668 (license license:lgpl2.1+)))
9669
9670 (define-public java-commons-httpclient
9671 (package
9672 (name "java-commons-httpclient")
9673 (version "3.1")
9674 (source (origin
9675 (method url-fetch)
9676 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
9677 "commons-httpclient/source/commons-httpclient-"
9678 version "-src.tar.gz"))
9679 (sha256
9680 (base32
9681 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
9682 (build-system ant-build-system)
9683 (arguments
9684 `(#:build-target "compile"
9685 #:test-target "test"
9686 #:tests? #f; requires junit-textui (junit 3)
9687 #:phases
9688 (modify-phases %standard-phases
9689 (add-before 'build 'fix-accent
9690 (lambda _
9691 (for-each (lambda (file)
9692 (with-fluids ((%default-port-encoding "ISO-8859-1"))
9693 (substitute* file
9694 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
9695 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
9696 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
9697 "src/test/org/apache/commons/httpclient/TestHttps.java"
9698 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
9699 #t))
9700 (replace 'install
9701 (lambda* (#:key outputs #:allow-other-keys)
9702 (invoke "ant" "dist"
9703 (string-append "-Ddist.home=" (assoc-ref outputs "out")
9704 "/share/java"))
9705 #t)))))
9706 (propagated-inputs
9707 `(("java-commons-logging" ,java-commons-logging-minimal)
9708 ("java-commons-codec" ,java-commons-codec)))
9709 (home-page "https://hc.apache.org")
9710 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
9711 (description "This package contains an HTTP/1.1 compliant HTTP agent
9712 implementation. It also provides reusable components for client-side
9713 authentication, HTTP state management, and HTTP connection management.")
9714 (license license:asl2.0)))
9715
9716 (define-public java-commons-vfs
9717 (package
9718 (name "java-commons-vfs")
9719 (version "2.2")
9720 (source (origin
9721 (method url-fetch)
9722 (uri (string-append "mirror://apache/commons/vfs/source/"
9723 "commons-vfs2-distribution-" version "-src.tar.gz"))
9724 (file-name (string-append name "-" version ".tar.gz"))
9725 (sha256
9726 (base32
9727 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
9728 (modules '((guix build utils)))
9729 (snippet
9730 '(begin
9731 (for-each delete-file
9732 (find-files "." "\\.jar$"))
9733 #t))))
9734 (build-system ant-build-system)
9735 (arguments
9736 `(#:jar-name "commons-vfs.jar"
9737 #:source-dir "commons-vfs2/src/main/java"
9738 #:test-dir "commons-vfs2/src/test"
9739 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
9740 #:tests? #f
9741 #:phases
9742 (modify-phases %standard-phases
9743 (add-before 'build 'remove-hadoop-and-webdav
9744 ; Remove these files as they are not required and depend on difficult
9745 ; packages.
9746 (lambda _
9747 (for-each delete-file-recursively
9748 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
9749 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
9750 #t)))))
9751 (inputs
9752 `(("java-commons-collections4" ,java-commons-collections4)
9753 ("java-commons-compress" ,java-commons-compress)
9754 ("java-commons-httpclient" ,java-commons-httpclient)
9755 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
9756 ("java-commons-net" ,java-commons-net)
9757 ("java-jsch" ,java-jsch)))
9758 (home-page "http://commons.apache.org/proper/commons-vfs/")
9759 (synopsis "Java filesystem library")
9760 (description "Commons VFS provides a single API for accessing various
9761 different file systems. It presents a uniform view of the files from various
9762 different sources, such as the files on local disk, on an HTTP server, or
9763 inside a Zip archive.")
9764 (license license:asl2.0)))
9765
9766 (define-public java-jakarta-oro
9767 (package
9768 (name "java-jakarta-oro")
9769 (version "2.0.8")
9770 (source (origin
9771 (method url-fetch)
9772 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
9773 "jakarta-oro-" version ".tar.gz"))
9774 (sha256
9775 (base32
9776 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
9777 (modules '((guix build utils)))
9778 (snippet
9779 `(begin
9780 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
9781 #t))))
9782 (build-system ant-build-system)
9783 (arguments
9784 `(#:build-target "package"
9785 #:tests? #f; tests are run as part of the build process
9786 #:phases
9787 (modify-phases %standard-phases
9788 (replace 'install
9789 (install-jars ,(string-append "jakarta-oro-" version))))))
9790 (home-page "https://jakarta.apache.org/oro/")
9791 (synopsis "Text-processing for Java")
9792 (description "The Jakarta-ORO Java classes are a set of text-processing
9793 Java classes that provide Perl5 compatible regular expressions, AWK-like
9794 regular expressions, glob expressions, and utility classes for performing
9795 substitutions, splits, filtering filenames, etc. This library is the successor
9796 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
9797 from ORO, Inc.")
9798 (license license:asl1.1)))
9799
9800 (define-public java-native-access
9801 (package
9802 (name "java-native-access")
9803 (version "4.5.1")
9804 (source (origin
9805 (method url-fetch)
9806 (uri (string-append "https://github.com/java-native-access/jna/"
9807 "archive/" version ".tar.gz"))
9808 (file-name (string-append name "-" version ".tar.gz"))
9809 (sha256
9810 (base32
9811 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
9812 (modules '((guix build utils)))
9813 (snippet
9814 `(begin
9815 (for-each delete-file (find-files "." ".*.jar"))
9816 (delete-file-recursively "native/libffi")
9817 (delete-file-recursively "dist")
9818 #t))))
9819 (build-system ant-build-system)
9820 (arguments
9821 `(#:tests? #f; FIXME: tests require reflections.jar
9822 #:test-target "test"
9823 #:make-flags (list "-Ddynlink.native=true")
9824 #:phases
9825 (modify-phases %standard-phases
9826 (add-before 'build 'fix-build.xml
9827 (lambda* (#:key inputs #:allow-other-keys)
9828 (substitute* "build.xml"
9829 ;; Since we removed the bundled ant.jar, give the correct path
9830 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
9831 ;; We removed generated native libraries. We can only rebuild one
9832 ;; so don't fail if we can't find a native library for another architecture.
9833 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
9834 ;; Copy test dependencies
9835 (copy-file (string-append (assoc-ref inputs "java-junit")
9836 "/share/java/junit.jar")
9837 "lib/junit.jar")
9838 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
9839 "/share/java/hamcrest-core.jar")
9840 "lib/hamcrest-core.jar")
9841 ;; FIXME: once reflections.jar is built, copy it to lib/test.
9842 #t))
9843 (add-before 'build 'build-native
9844 (lambda _
9845 (invoke "ant" "-Ddynlink.native=true" "native")
9846 #t))
9847 (replace 'install
9848 (install-jars "build")))))
9849 (inputs
9850 `(("libffi" ,libffi)
9851 ("libx11" ,libx11)
9852 ("libxt" ,libxt)))
9853 (native-inputs
9854 `(("java-junit" ,java-junit)
9855 ("java-hamcrest-core" ,java-hamcrest-core)))
9856 (home-page "https://github.com/java-native-access/jna")
9857 (synopsis "Access to native shared libraries from Java")
9858 (description "JNA provides Java programs easy access to native shared
9859 libraries without writing anything but Java code - no JNI or native code is
9860 required. JNA allows you to call directly into native functions using natural
9861 Java method invocation.")
9862 ;; Java Native Access project (JNA) is dual-licensed under 2
9863 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
9864 (license (list
9865 license:asl2.0
9866 license:lgpl2.1+))))
9867
9868 (define-public java-native-access-platform
9869 (package
9870 (inherit java-native-access)
9871 (name "java-native-access-platform")
9872 (arguments
9873 `(#:test-target "test"
9874 #:tests? #f; require jna-test.jar
9875 #:phases
9876 (modify-phases %standard-phases
9877 (add-before 'build 'chdir
9878 (lambda _
9879 (chdir "contrib/platform")
9880 #t))
9881 (add-after 'chdir 'fix-ant
9882 (lambda* (#:key inputs #:allow-other-keys)
9883 (substitute* "nbproject/project.properties"
9884 (("../../build/jna.jar")
9885 (string-append (assoc-ref inputs "java-native-access")
9886 "/share/java/jna.jar"))
9887 (("../../lib/hamcrest-core-.*.jar")
9888 (string-append (assoc-ref inputs "java-hamcrest-core")
9889 "/share/java/hamcrest-core.jar"))
9890 (("../../lib/junit.jar")
9891 (string-append (assoc-ref inputs "java-junit")
9892 "/share/java/junit.jar")))
9893 #t))
9894 (replace 'install
9895 (install-jars "dist")))))
9896 (inputs
9897 `(("java-native-access" ,java-native-access)))
9898 (synopsis "Cross-platform mappings for jna")
9899 (description "java-native-access-platfrom has cross-platform mappings
9900 and mappings for a number of commonly used platform functions, including a
9901 large number of Win32 mappings as well as a set of utility classes that
9902 simplify native access.")))
9903
9904 (define-public java-jsch-agentproxy-core
9905 (package
9906 (name "java-jsch-agentproxy-core")
9907 (version "0.0.8")
9908 (source (origin
9909 (method url-fetch)
9910 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
9911 version ".tar.gz"))
9912 (file-name (string-append name "-" version ".tar.gz"))
9913 (sha256
9914 (base32
9915 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
9916 (build-system ant-build-system)
9917 (arguments
9918 `(#:jar-name "jsch-agentproxy-core.jar"
9919 #:source-dir "jsch-agent-proxy-core/src/main/java"
9920 #:tests? #f)); no tests
9921 (home-page "https://github.com/ymnk/jsch-agent-proxy")
9922 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
9923 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9924 and Pageant included Putty. It will be easily integrated into JSch, and users
9925 will be allowed to use these programs for authentication.")
9926 (license license:bsd-3)))
9927
9928 (define-public java-jsch-agentproxy-sshagent
9929 (package
9930 (inherit java-jsch-agentproxy-core)
9931 (name "java-jsch-agentproxy-sshagent")
9932 (arguments
9933 `(#:jar-name "jsch-agentproxy-sshagent.jar"
9934 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
9935 #:tests? #f)); no tests
9936 (inputs
9937 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9938 (synopsis "Proxy to ssh-agent")
9939 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9940 and Pageant included in Putty. This component contains the code for a proxy to
9941 ssh-agent.")))
9942
9943 (define-public java-jsch-agentproxy-usocket-jna
9944 (package
9945 (inherit java-jsch-agentproxy-core)
9946 (name "java-jsch-agentproxy-usocket-jna")
9947 (arguments
9948 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
9949 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
9950 #:tests? #f)); no tests
9951 (inputs
9952 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9953 ("java-native-access" ,java-native-access)))
9954 (synopsis "USocketFactory implementation using JNA")
9955 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9956 and Pageant included in Putty. This component contains an implementation of
9957 USocketFactory using @dfn{JNA} (Java Native Access).")))
9958
9959 (define-public java-jsch-agentproxy-pageant
9960 (package
9961 (inherit java-jsch-agentproxy-core)
9962 (name "java-jsch-agentproxy-pageant")
9963 (arguments
9964 `(#:jar-name "jsch-agentproxy-pageant.jar"
9965 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
9966 #:tests? #f)); no tests
9967 (inputs
9968 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9969 ("java-native-access" ,java-native-access)
9970 ("java-native-access-platform" ,java-native-access-platform)))
9971 (synopsis "Proxy to pageant")
9972 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9973 and Pageant included in Putty. This component contains the code for a proxy to
9974 pageant.")))
9975
9976 (define-public java-jsch-agentproxy-usocket-nc
9977 (package
9978 (inherit java-jsch-agentproxy-core)
9979 (name "java-jsch-agentproxy-usocket-nc")
9980 (arguments
9981 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
9982 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
9983 #:tests? #f)); no tests
9984 (inputs
9985 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9986 (synopsis "USocketFactory implementation using netcat")
9987 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9988 and Pageant included in Putty. This component contains an implementation of
9989 USocketFactory using netcat.")))
9990
9991 (define-public java-jsch-agentproxy-connector-factory
9992 (package
9993 (inherit java-jsch-agentproxy-core)
9994 (name "java-jsch-agentproxy-connector-factory")
9995 (arguments
9996 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
9997 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
9998 #:tests? #f)); no tests
9999 (inputs
10000 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10001 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10002 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10003 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10004 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10005 (synopsis "Connector factory for jsch agent proxy")
10006 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10007 and Pageant included in Putty. This component contains a connector factory.")))
10008
10009 (define-public java-jsch-agentproxy-jsch
10010 (package
10011 (inherit java-jsch-agentproxy-core)
10012 (name "java-jsch-agentproxy-jsch")
10013 (arguments
10014 `(#:jar-name "jsch-agentproxy-jsch.jar"
10015 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10016 #:tests? #f)); no tests
10017 (inputs
10018 `(("java-jsch" ,java-jsch)
10019 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10020 (synopsis "JSch integration library for agentproxy")
10021 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10022 and Pageant included in Putty. This component contains a library to use
10023 jsch-agent-proxy with JSch.")))
10024
10025 (define-public java-apache-ivy
10026 (package
10027 (name "java-apache-ivy")
10028 (version "2.4.0")
10029 (source (origin
10030 (method url-fetch)
10031 (uri (string-append "mirror://apache//ant/ivy/" version
10032 "/apache-ivy-" version "-src.tar.gz"))
10033 (sha256
10034 (base32
10035 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10036 (patches
10037 (search-patches
10038 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10039 (build-system ant-build-system)
10040 (arguments
10041 `(#:jar-name "ivy.jar"
10042 #:tests? #f
10043 #:phases
10044 (modify-phases %standard-phases
10045 (add-before 'build 'remove-example
10046 (lambda _
10047 (delete-file-recursively "src/example")
10048 #t))
10049 (add-before 'build 'copy-resources
10050 (lambda _
10051 (with-directory-excursion "src/java"
10052 (for-each (lambda (file)
10053 (install-file file (string-append "../../build/classes/" (dirname file))))
10054 (append
10055 (find-files "." ".*.css")
10056 (find-files "." ".*.ent")
10057 (find-files "." ".*.html")
10058 (find-files "." ".*.properties")
10059 (find-files "." ".*.xsd")
10060 (find-files "." ".*.xsl")
10061 (find-files "." ".*.xml"))))
10062 #t))
10063 (add-before 'build 'fix-vfs
10064 (lambda _
10065 (substitute*
10066 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10067 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10068 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10069 #t))
10070 (add-before 'install 'copy-manifest
10071 (lambda _
10072 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10073 #t))
10074 (add-before 'install 'repack
10075 (lambda _
10076 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10077 "-C" "build/classes" ".")))
10078 (add-after 'install 'install-bin
10079 (lambda* (#:key outputs #:allow-other-keys)
10080 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10081 (ivy (string-append bin "/ivy"))
10082 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10083 (mkdir-p bin)
10084 (with-output-to-file ivy
10085 (lambda _
10086 (display (string-append
10087 "#!" (which "sh") "\n"
10088 "if [[ -z $CLASSPATH ]]; then\n"
10089 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10090 "else\n"
10091 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10092 "fi\n"
10093 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10094 (chmod ivy #o755)
10095 #t))))))
10096 (inputs
10097 `(("java-bouncycastle" ,java-bouncycastle)
10098 ("java-commons-cli" ,java-commons-cli)
10099 ("java-commons-collections" ,java-commons-collections)
10100 ("java-commons-httpclient" ,java-commons-httpclient)
10101 ("java-commons-lang" ,java-commons-lang)
10102 ("java-commons-vfs" ,java-commons-vfs)
10103 ("java-jakarta-oro" ,java-jakarta-oro)
10104 ("java-jsch" ,java-jsch)
10105 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10106 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10107 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10108 ("java-junit" ,java-junit)))
10109 (home-page "https://ant.apache.org/ivy")
10110 (synopsis "Dependency manager for the Java programming language")
10111 (description "Ivy is a tool for managing (recording, tracking, resolving
10112 and reporting) project dependencies. It is characterized by the following:
10113
10114 @itemize
10115 @item flexibility and configurability - Ivy is essentially process agnostic
10116 and is not tied to any methodology or structure. Instead it provides the
10117 necessary flexibility and configurability to be adapted to a broad range
10118 of dependency management and build processes.
10119 @item tight integration with Apache Ant - while available as a standalone tool,
10120 Ivy works particularly well with Apache Ant providing a number of
10121 powerful Ant tasks ranging from dependency resolution to dependency
10122 reporting and publication.
10123 @end itemize")
10124 (license license:asl2.0)))
10125
10126 (define-public java-eclipse-sisu-inject
10127 (package
10128 (name "java-eclipse-sisu-inject")
10129 (version "0.3.3")
10130 (source (origin
10131 (method url-fetch)
10132 (uri (string-append "https://github.com/eclipse/sisu.inject/"
10133 "archive/releases/" version ".tar.gz"))
10134 (sha256
10135 (base32
10136 "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn"))))
10137 (build-system ant-build-system)
10138 (arguments
10139 `(#:jar-name "eclipse-sisu-inject.jar"
10140 #:source-dir "org.eclipse.sisu.inject/src"
10141 #:jdk ,icedtea-8
10142 #:tests? #f)); no tests
10143 (inputs
10144 `(("java-guice" ,java-guice)
10145 ("java-guice-servlet" ,java-guice-servlet)
10146 ("java-javax-inject" ,java-javax-inject)
10147 ("java-javaee-servletapi" ,java-javaee-servletapi)
10148 ("java-junit" ,java-junit)
10149 ("java-slf4j-api" ,java-slf4j-api)
10150 ("java-jsr305" ,java-jsr305)
10151 ("java-jsr250" ,java-jsr250)
10152 ("java-cdi-api" ,java-cdi-api)
10153 ("java-osgi-framework" ,java-osgi-framework)
10154 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10155 ("java-testng" ,java-testng)))
10156 (home-page "https://www.eclipse.org/sisu/")
10157 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10158 (description "Sisu is a modular JSR330-based container that supports
10159 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10160 Google-Guice to perform dependency injection and provide the core JSR330
10161 support, but removes the need to write explicit bindings in Guice modules.
10162 Integration with other containers via the Eclipse Extension Registry and the
10163 OSGi Service Registry is a goal of this project.")
10164 (license license:epl1.0)))
10165
10166 (define-public java-eclipse-sisu-plexus
10167 (package
10168 (name "java-eclipse-sisu-plexus")
10169 (version "0.3.3")
10170 (source (origin
10171 (method url-fetch)
10172 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10173 "archive/releases/" version ".tar.gz"))
10174 (sha256
10175 (base32
10176 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10177 (modules '((guix build utils)))
10178 (snippet
10179 '(begin
10180 (for-each delete-file (find-files "." ".*.jar"))
10181 (rename-file "org.eclipse.sisu.plexus.tests/src"
10182 "org.eclipse.sisu.plexus.tests/java")
10183 #t))))
10184 (build-system ant-build-system)
10185 (arguments
10186 `(#:jar-name "eclipse-sisu-plexus.jar"
10187 #:source-dir "org.eclipse.sisu.plexus/src"
10188 #:test-dir "org.eclipse.sisu.plexus.tests"
10189 #:test-exclude
10190 (list
10191 ;; This test fails probably because we can't generate the necessary
10192 ;; meta-inf files.
10193 "**/PlexusLoggingTest.*"
10194 ;; FIXME: This test fails because of some injection error
10195 "**/PlexusRequirementTest.*")
10196 #:jdk ,icedtea-8
10197 #:phases
10198 (modify-phases %standard-phases
10199 (add-before 'build 'copy-resources
10200 (lambda _
10201 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10202 "build/classes/META-INF/plexus")
10203 #t))
10204 (add-before 'check 'build-test-jar
10205 (lambda _
10206 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10207 (mkdir "build")
10208 (with-directory-excursion "java"
10209 (apply invoke "javac" "-cp"
10210 (string-append (getenv "CLASSPATH")
10211 ":../../../../../build/classes")
10212 (find-files "." ".*.java"))
10213 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10214 (find-files "." ".*.jar")))
10215 (mkdir-p "build/META-INF/plexus")
10216 (copy-file "resources/META-INF/plexus/components.xml"
10217 "build/META-INF/plexus/components.xml")
10218 (with-directory-excursion "build"
10219 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10220 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10221 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10222 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10223 (("resources/component-jar")
10224 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10225 #t)))))
10226 (inputs
10227 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10228 ("java-plexus-util" ,java-plexus-utils)
10229 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10230 ("java-osgi-framework" ,java-osgi-framework)
10231 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10232 ("java-guice" ,java-guice)
10233 ("java-javax-inject" ,java-javax-inject)
10234 ("java-slf4j-api" ,java-slf4j-api)
10235 ("java-junit" ,java-junit)))
10236 (native-inputs
10237 `(("java-guava" ,java-guava)
10238 ("java-aopalliance" ,java-aopalliance)
10239 ("java-cglib" ,java-cglib)
10240 ("java-asm" ,java-asm)))
10241 (home-page "https://www.eclipse.org/sisu/")
10242 (synopsis "Plexus support for the sisu container")
10243 (description "Sisu is a modular JSR330-based container that supports
10244 classpath scanning, auto-binding, and dynamic auto-wiring. This package
10245 adds Plexus support to the Sisu-Inject container.")
10246 (license license:epl1.0)))
10247
10248 (define-public java-commons-compiler
10249 (package
10250 (name "java-commons-compiler")
10251 (version "3.0.8")
10252 (source (origin
10253 (method git-fetch)
10254 (uri (git-reference
10255 (url "https://github.com/janino-compiler/janino")
10256 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10257 (file-name (string-append name "-" version))
10258 (sha256
10259 (base32
10260 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10261 (modules '((guix build utils)))
10262 (snippet
10263 '(begin
10264 (for-each delete-file
10265 (find-files "." "\\.jar$"))
10266 #t))))
10267 (build-system ant-build-system)
10268 (arguments
10269 `(#:jar-name "commons-compiler.jar"
10270 #:source-dir "commons-compiler/src/main"
10271 #:tests? #f)); no tests
10272 (home-page "https://github.com/janino-compiler/janino")
10273 (synopsis "Java compiler")
10274 (description "Commons-compiler contains an API for janino, including the
10275 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10276 and @code{ISimpleCompiler} interfaces.")
10277 (license license:bsd-3)))
10278
10279 (define-public java-janino
10280 (package
10281 (inherit java-commons-compiler)
10282 (name "java-janino")
10283 (arguments
10284 `(#:jar-name "janino.jar"
10285 #:source-dir "src/main/java"
10286 #:phases
10287 (modify-phases %standard-phases
10288 (add-before 'configure 'chdir
10289 (lambda _
10290 (chdir "janino")
10291 #t)))))
10292 (inputs
10293 `(("java-commons-compiler" ,java-commons-compiler)))
10294 (native-inputs
10295 `(("java-junit" ,java-junit)
10296 ("java-hamcrest-core" ,java-hamcrest-core)))
10297 (description "Janino is a Java compiler. Janino can compile a set of
10298 source files to a set of class files like @code{javac}, but also compile a
10299 Java expression, block, class body or source file in memory, load the bytecode
10300 and execute it directly in the same JVM. @code{janino} can also be used for
10301 static code analysis or code manipulation.")))
10302
10303 (define-public java-logback-core
10304 (package
10305 (name "java-logback-core")
10306 (version "1.2.3")
10307 (source (origin
10308 (method url-fetch)
10309 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10310 version ".tar.gz"))
10311 (file-name (string-append name "-" version ".tar.gz"))
10312 (sha256
10313 (base32
10314 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10315 (modules '((guix build utils)))
10316 (snippet
10317 '(begin
10318 (delete-file-recursively "logback-access/lib")
10319 #t))))
10320 (build-system ant-build-system)
10321 (arguments
10322 `(#:jar-name "logback.jar"
10323 #:source-dir "src/main/java"
10324 #:test-dir "src/test"
10325 #:test-exclude
10326 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10327 ;; which creates FastClasses
10328 (list "**/AllCoreTest.*"
10329 "**/AutoFlushingObjectWriterTest.*"
10330 "**/PackageTest.*"
10331 "**/ResilientOutputStreamTest.*"
10332 ;; And we still don't want to run abstract classes
10333 "**/Abstract*.*")
10334 #:phases
10335 (modify-phases %standard-phases
10336 (add-before 'configure 'chdir
10337 (lambda _
10338 (chdir "logback-core")
10339 #t)))))
10340 (inputs
10341 `(("java-javax-mail" ,java-javax-mail)
10342 ("servlet" ,java-javaee-servletapi)
10343 ("java-commons-compiler" ,java-commons-compiler)
10344 ("java-janino" ,java-janino)))
10345 (native-inputs
10346 `(("java-junit" ,java-junit)
10347 ("java-hamcrest-core" ,java-hamcrest-core)
10348 ("java-mockito-1" ,java-mockito-1)
10349 ("java-cglib" ,java-cglib)
10350 ("java-asm" ,java-asm)
10351 ("java-objenesis" ,java-objenesis)
10352 ("java-joda-time" ,java-joda-time)))
10353 (home-page "https://logback.qos.ch")
10354 (synopsis "Logging for java")
10355 (description "Logback is intended as a successor to the popular log4j project.
10356 This module lays the groundwork for the other two modules.")
10357 ;; Either epl1.0 or lgpl2.1
10358 (license (list license:epl1.0
10359 license:lgpl2.1))))
10360
10361 (define-public java-logback-classic
10362 (package
10363 (inherit java-logback-core)
10364 (name "java-logback-classic")
10365 (arguments
10366 `(#:jar-name "logback-classic.jar"
10367 #:source-dir "src/main/java"
10368 #:test-dir "src/test"
10369 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10370 #:jdk ,icedtea-8
10371 #:phases
10372 (modify-phases %standard-phases
10373 (add-before 'configure 'chdir
10374 (lambda _
10375 (chdir "logback-classic")
10376 #t))
10377 (replace 'build
10378 (lambda* (#:key inputs #:allow-other-keys)
10379 (mkdir-p "build/classes")
10380 (setenv "CLASSPATH"
10381 (string-join
10382 (apply append (map (lambda (input)
10383 (find-files (assoc-ref inputs input)
10384 ".*.jar"))
10385 '("java-logback-core" "java-slf4j-api"
10386 "java-commons-compiler" "servlet"
10387 "groovy")))
10388 ":"))
10389 (apply invoke "groovyc" "-d" "build/classes" "-j"
10390 (find-files "src/main/" ".*\\.(groovy|java)$"))
10391 (invoke "ant" "jar")
10392 #t)))))
10393 (inputs
10394 `(("java-logback-core" ,java-logback-core)
10395 ("java-slf4j-api" ,java-slf4j-api)
10396 ,@(package-inputs java-logback-core)))
10397 (native-inputs
10398 `(("groovy" ,groovy)))
10399 (description "Logback is intended as a successor to the popular log4j project.
10400 This module can be assimilated to a significantly improved version of log4j.
10401 Moreover, @code{logback-classic} natively implements the slf4j API so that you
10402 can readily switch back and forth between logback and other logging frameworks
10403 such as log4j or @code{java.util.logging} (JUL).")))
10404
10405 (define-public java-qdox
10406 (package
10407 (name "java-qdox")
10408 ; Newer version exists, but this version is required by java-plexus-component-metadata
10409 (version "2.0-M2")
10410 (source (origin
10411 (method url-fetch)
10412 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10413 ;; Older releases at https://github.com/codehaus/qdox/
10414 ;; Note: The release at maven is pre-generated. The release at
10415 ;; github requires jflex.
10416 (uri (string-append "http://central.maven.org/maven2/"
10417 "com/thoughtworks/qdox/qdox/" version
10418 "/qdox-" version "-sources.jar"))
10419 (sha256
10420 (base32
10421 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10422 (build-system ant-build-system)
10423 (arguments
10424 `(#:jar-name "qdox.jar"
10425 #:tests? #f)); no tests
10426 (home-page "http://qdox.codehaus.org/")
10427 (synopsis "Parse definitions from Java source files")
10428 (description "QDox is a high speed, small footprint parser for extracting
10429 class/interface/method definitions from source files complete with JavaDoc
10430 @code{@@tags}. It is designed to be used by active code generators or
10431 documentation tools.")
10432 (license license:asl2.0)))