projects/guix·blob version-1.4.0 · refs

14329 lines · 594.2 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <[email protected]>
3;;; Copyright © 2016 Leo Famulari <[email protected]>
4;;; Copyright © 2016, 2017 Roel Janssen <[email protected]>
5;;; Copyright © 2017, 2019, 2021 Carlo Zancanaro <[email protected]>
6;;; Copyright © 2017-2022 Julien Lepiller <[email protected]>
7;;; Copyright © 2017 Thomas Danckaert <[email protected]>
8;;; Copyright © 2016, 2017, 2018 Alex Vong <[email protected]>
9;;; Copyright © 2017, 2019, 2021 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2018, 2019 Gábor Boskovits <[email protected]>
11;;; Copyright © 2018 Chris Marusich <[email protected]>
12;;; Copyright © 2018, 2019, 2020, 2021, 2022 Efraim Flashner <[email protected]>
13;;; Copyright © 2019, 2020, 2021 Björn Höfling <[email protected]>
14;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <[email protected]>
15;;; Copyright © 2020 Raghav Gururajan <[email protected]>
16;;; Copyright © 2020, 2022 Maxim Cournoyer <[email protected]>
17;;; Copyright © 2021 Vincent Legoll <[email protected]>
18;;; Copyright © 2021 Mike Gerwitz <[email protected]>
19;;; Copyright © 2021 Pierre Langlois <[email protected]>
20;;; Copyright © 2021 Guillaume Le Vaillant <[email protected]>
21;;; Copyright © 2022 Artyom V. Poptsov <[email protected]>
22;;;
23;;; This file is part of GNU Guix.
24;;;
25;;; GNU Guix is free software; you can redistribute it and/or modify it
26;;; under the terms of the GNU General Public License as published by
27;;; the Free Software Foundation; either version 3 of the License, or (at
28;;; your option) any later version.
29;;;
30;;; GNU Guix is distributed in the hope that it will be useful, but
31;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33;;; GNU General Public License for more details.
34;;;
35;;; You should have received a copy of the GNU General Public License
36;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37
38(define-module (gnu packages java)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix hg-download)
43 #:use-module (guix git-download)
44 #:use-module (guix svn-download)
45 #:use-module ((guix build utils) #:select (alist-replace))
46 #:use-module (guix utils)
47 #:use-module (guix gexp)
48 #:use-module (guix build-system ant)
49 #:use-module (guix build-system cmake)
50 #:use-module (guix build-system gnu)
51 #:use-module (guix build-system maven)
52 #:use-module (guix build-system trivial)
53 #:use-module (gnu packages)
54 #:use-module (gnu packages attr)
55 #:use-module (gnu packages autotools)
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages certs)
59 #:use-module (gnu packages cpio)
60 #:use-module (gnu packages cups)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages elf)
63 #:use-module (gnu packages fontutils)
64 #:use-module (gnu packages gawk)
65 #:use-module (gnu packages gcc)
66 #:use-module (gnu packages gettext)
67 #:use-module (gnu packages gl)
68 #:use-module (gnu packages ghostscript) ;lcms
69 #:use-module (gnu packages gnome)
70 #:use-module (gnu packages groovy)
71 #:use-module (gnu packages gtk)
72 #:use-module (gnu packages guile)
73 #:use-module (gnu packages icu4c)
74 #:use-module (gnu packages image)
75 #:use-module (gnu packages java-compression)
76 #:use-module (gnu packages libffi)
77 #:use-module (gnu packages linux) ;alsa
78 #:use-module (gnu packages maths)
79 #:use-module (gnu packages maven)
80 #:use-module (gnu packages maven-parent-pom)
81 #:use-module (gnu packages ncurses)
82 #:use-module (gnu packages nss)
83 #:use-module (gnu packages onc-rpc)
84 #:use-module (gnu packages web)
85 #:use-module (gnu packages wget)
86 #:use-module (gnu packages pkg-config)
87 #:use-module (gnu packages perl)
88 #:use-module (gnu packages popt)
89 #:use-module (gnu packages kerberos)
90 #:use-module (gnu packages security-token)
91 #:use-module (gnu packages xml)
92 #:use-module (gnu packages xorg)
93 #:use-module (gnu packages texinfo)
94 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
95 #:use-module (srfi srfi-11)
96 #:use-module (ice-9 match))
97
98
99;;;
100;;; Java bootstrap toolchain.
101;;;
102
103;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
104;; use it to build a simple version of GNU Classpath, the Java standard
105;; library. We chose version 0.93 because it is the last version that can be
106;; built with Jikes. With Jikes and this version of GNU Classpath we can
107;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
108;; the last version of JamVM that works with a version of GNU classpath that
109;; does not require ECJ. These three packages make up the bootstrap JDK.
110
111;; This is sufficient to build an older version of Ant, which is needed to
112;; build an older version of ECJ, an incremental Java compiler, both of which
113;; are written in Java.
114;;
115;; ECJ is needed to build the latest release (0.99) and the development
116;; version of GNU Classpath. The development version of GNU Classpath has
117;; much more support for Java 1.6 than the latest release, but we need to
118;; build 0.99 first to get a working version of javah. ECJ, the development
119;; version of GNU Classpath, and the latest version of JamVM make up the
120;; second stage JDK with which we can build the OpenJDK with the Icedtea 2.x
121;; build framework. We then build the more recent JDK Icedtea 3.x, and all
122;; other versions of OpenJDK.
123
124(define jikes
125 (package
126 (name "jikes")
127 (version "1.22")
128 (source (origin
129 (method url-fetch)
130 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
131 version "/jikes-" version ".tar.bz2"))
132 (sha256
133 (base32
134 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
135 (build-system gnu-build-system)
136 (home-page "http://jikes.sourceforge.net/")
137 (synopsis "Compiler for the Java language")
138 (description "Jikes is a compiler that translates Java source files as
139defined in The Java Language Specification into the bytecoded instruction set
140and binary format defined in The Java Virtual Machine Specification.")
141 (license license:ibmpl1.0)))
142
143;; This is the last version of GNU Classpath that can be built without ECJ.
144(define classpath-bootstrap
145 (package
146 (name "classpath")
147 (version "0.93")
148 (source (origin
149 (method url-fetch)
150 (uri (string-append "mirror://gnu/classpath/classpath-"
151 version ".tar.gz"))
152 (sha256
153 (base32
154 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
155 (patches (search-patches "classpath-aarch64-support.patch"
156 "classpath-miscompilation.patch"))))
157 (build-system gnu-build-system)
158 (arguments
159 `(#:configure-flags
160 (list (string-append "JAVAC="
161 (search-input-file %build-inputs "/bin/jikes"))
162 "--disable-Werror"
163 "--disable-gmp"
164 "--disable-gtk-peer"
165 "--disable-gconf-peer"
166 "--disable-plugin"
167 "--disable-dssi"
168 "--disable-alsa"
169 "--disable-gjdoc")
170 #:phases
171 (modify-phases %standard-phases
172 (add-after 'install 'install-data
173 (lambda _ (invoke "make" "install-data"))))))
174 (native-inputs
175 (list jikes fastjar libltdl pkg-config))
176 (home-page "https://www.gnu.org/software/classpath/")
177 (synopsis "Essential libraries for Java")
178 (description "GNU Classpath is a project to create core class libraries
179for use with runtimes, compilers and tools for the Java programming
180language.")
181 ;; GPLv2 or later, with special linking exception.
182 (license license:gpl2+)))
183
184;; This is the last version of JamVM that works with a version of GNU
185;; classpath that does not require ECJ.
186(define jamvm-1-bootstrap
187 (package
188 (name "jamvm")
189 (version "1.5.1")
190 (source (origin
191 (method url-fetch)
192 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
193 "JamVM%20" version "/jamvm-"
194 version ".tar.gz"))
195 (patches (search-patches "jamvm-1.5.1-aarch64-support.patch"
196 "jamvm-1.5.1-armv7-support.patch"))
197 (sha256
198 (base32
199 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
200 ;; Remove precompiled software.
201 (snippet
202 '(delete-file "lib/classes.zip"))))
203 (build-system gnu-build-system)
204 (arguments
205 `(#:configure-flags
206 (list (string-append "--with-classpath-install-dir="
207 (assoc-ref %build-inputs "classpath"))
208 "--disable-int-caching"
209 "--enable-runtime-reloc-checks"
210 "--enable-ffi")
211 #:phases
212 ,(if (string-prefix? "aarch64" (or (%current-system)
213 (%current-target-system)))
214 ;; Makefiles and the configure script need to be regenerated to
215 ;; incorporate support for AArch64.
216 '(modify-phases %standard-phases
217 (replace 'bootstrap
218 (lambda _ (invoke "autoreconf" "-vif"))))
219 '%standard-phases)))
220 (inputs
221 (list classpath-bootstrap jikes libffi zip zlib))
222 (native-inputs
223 (if (string-prefix? "aarch64" (or (%current-system)
224 (%current-target-system)))
225 ;; Additional packages needed for autoreconf.
226 `(("autoconf" ,autoconf)
227 ("automake" ,automake)
228 ("libtool" ,libtool))
229 '()))
230 (home-page "http://jamvm.sourceforge.net/")
231 (synopsis "Small Java Virtual Machine")
232 (description "JamVM is a Java Virtual Machine conforming to the JVM
233specification edition 2 (blue book). It is extremely small. However, unlike
234other small VMs it supports the full spec, including object finalisation and
235JNI.")
236 (license license:gpl2+)))
237
238(define ant-bootstrap
239 (package
240 (name "ant-bootstrap")
241 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
242 ;; are not supported. The 1.8.x series is the last to use only features
243 ;; supported by Jikes.
244 (version "1.8.4")
245 (source (origin
246 (method url-fetch)
247 (uri (string-append "mirror://apache/"
248 "ant/source/apache-ant-"
249 version "-src.tar.bz2"))
250 (sha256
251 (base32
252 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
253 (build-system gnu-build-system)
254 (arguments
255 `(#:modules ((srfi srfi-1)
256 (guix build gnu-build-system)
257 (guix build utils))
258 #:tests? #f ; no "check" target
259 #:phases
260 (modify-phases %standard-phases
261 (delete 'bootstrap)
262 (delete 'configure)
263 (add-before 'build 'define-java-environment-variables
264 (lambda* (#:key inputs #:allow-other-keys)
265 ;; First, set environment variables (eases debugging on -K).
266 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
267 (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm"))
268 (setenv "JAVAC" (search-input-file inputs "/bin/jikes"))
269 (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar"))))
270 (replace 'build
271 (lambda* (#:key inputs outputs #:allow-other-keys)
272 ;; Ant complains if this file doesn't exist.
273 (setenv "HOME" "/tmp")
274 (with-output-to-file "/tmp/.ant.properties"
275 (lambda _ (display "")))
276
277 ;; Use jikes instead of javac for <javac ...> tags in build.xml
278 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
279
280 ;; jikes produces lots of warnings, but they are not very
281 ;; interesting, so we silence them.
282 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
283
284 ;; Without these JamVM options the build may freeze.
285 (substitute* "bootstrap.sh"
286 (("^\"\\$\\{JAVACMD\\}\" " m)
287 ,@(if (string-prefix? "armhf" (or (%current-system)
288 (%current-target-system)))
289 `((string-append m "-Xnocompact "))
290 `((string-append m "-Xnocompact -Xnoinlining ")))))
291
292 ;; Disable tests because we are bootstrapping and thus don't have
293 ;; any of the dependencies required to build and run the tests.
294 (substitute* "build.xml"
295 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
296 (invoke "bash" "bootstrap.sh"
297 (string-append "-Ddist.dir="
298 (assoc-ref outputs "out")))))
299 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
300 (lambda* (#:key outputs #:allow-other-keys)
301 (define (repack-archive jar)
302 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
303 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
304 (with-directory-excursion dir
305 (invoke "unzip" jar))
306 (delete-file jar)
307 ;; XXX: copied from (gnu build install)
308 (for-each (lambda (file)
309 (let ((s (lstat file)))
310 (unless (eq? (stat:type s) 'symlink)
311 (utime file 0 0 0 0))))
312 (find-files dir #:directories? #t))
313 ;; It is important that the manifest appears first.
314 (with-directory-excursion dir
315 (let* ((files (find-files "." ".*" #:directories? #t))
316 ;; To ensure that the reference scanner can
317 ;; detect all store references in the jars
318 ;; we disable compression with the "-0" option.
319 (command (if (file-exists? manifest)
320 `("zip" "-0" "-X" ,jar ,manifest
321 ,@files)
322 `("zip" "-0" "-X" ,jar ,@files))))
323 (apply invoke command)))))
324 (for-each repack-archive
325 (find-files
326 (string-append (assoc-ref %outputs "out") "/lib")
327 "\\.jar$"))))
328 (delete 'install))))
329 (native-inputs
330 (list jikes jamvm-1-bootstrap unzip zip))
331 (home-page "https://ant.apache.org")
332 (synopsis "Build tool for Java")
333 (description
334 "Ant is a platform-independent build tool for Java. It is similar to
335make but is implemented using the Java language, requires the Java platform,
336and is best suited to building Java projects. Ant uses XML to describe the
337build process and its dependencies, whereas Make uses Makefile format.")
338 (license license:asl2.0)))
339
340;; Version 3.2.2 is the last version without a dependency on a full-fledged
341;; compiler for Java 1.5.
342(define ecj-bootstrap
343 (package
344 (name "ecj-bootstrap")
345 (version "3.2.2")
346 (source (origin
347 (method url-fetch)
348 (uri (string-append "http://archive.eclipse.org/eclipse/"
349 "downloads/drops/R-" version
350 "-200702121330/ecjsrc.zip"))
351 (sha256
352 (base32
353 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
354 ;; It would be so much easier if we could use the ant-build-system, but we
355 ;; cannot as we don't have ant at this point. We use ecj for
356 ;; bootstrapping the JDK.
357 (build-system gnu-build-system)
358 (arguments
359 `(#:tests? #f ; there are no tests
360 #:phases
361 (modify-phases %standard-phases
362 (replace 'configure
363 (lambda* (#:key inputs #:allow-other-keys)
364 (setenv "CLASSPATH"
365 (string-join
366 (cons (search-input-file inputs "/lib/rt.jar")
367 (find-files (string-append
368 (assoc-ref inputs "ant-bootstrap")
369 "/lib")
370 "\\.jar$"))
371 ":"))))
372 (replace 'build
373 (lambda* (#:key inputs #:allow-other-keys)
374 ;; The unpack phase enters the "org" directory by mistake.
375 (chdir "..")
376
377 ;; Create a simple manifest to make ecj executable.
378 (with-output-to-file "manifest"
379 (lambda _
380 (display "Manifest-Version: 1.0
381Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
382
383 ;; Compile it all!
384 (and (apply invoke "jikes"
385 (find-files "." "\\.java$"))
386 (invoke "fastjar" "cvfm"
387 "ecj-bootstrap.jar" "manifest" "."))))
388 (replace 'install
389 (lambda* (#:key outputs #:allow-other-keys)
390 (let ((share (string-append (assoc-ref outputs "out")
391 "/share/java/")))
392 (mkdir-p share)
393 (install-file "ecj-bootstrap.jar" share)))))))
394 (native-inputs
395 (list ant-bootstrap unzip jikes jamvm-1-bootstrap fastjar))
396 (home-page "https://eclipse.org")
397 (synopsis "Eclipse Java development tools core batch compiler")
398 (description "This package provides the Eclipse Java core batch compiler
399for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
400requirement for all GNU Classpath releases after version 0.93.")
401 (license license:epl1.0)))
402
403(define ecj-javac-wrapper
404 (package (inherit ecj-bootstrap)
405 (name "ecj-javac-wrapper")
406 (source #f)
407 (build-system trivial-build-system)
408 (arguments
409 `(#:modules ((guix build utils))
410 #:builder
411 ,#~(begin
412 (use-modules (guix build utils))
413 (let* ((bin (string-append #$output "/bin"))
414 (target (string-append bin "/javac"))
415 (guile (string-append (assoc-ref %build-inputs "guile")
416 "/bin/guile"))
417 (ecj (string-append #$(this-package-native-input "ecj-bootstrap")
418 "/share/java/ecj-bootstrap.jar"))
419 (java (string-append #$(this-package-native-input "jamvm")
420 "/bin/jamvm"))
421 (bootcp (let ((jvmlib (string-append
422 #$(this-package-native-input "classpath")
423 "/share/classpath")))
424 (string-append jvmlib "/glibj.zip:"
425 jvmlib "/tools.zip"))))
426 (mkdir-p bin)
427 (with-output-to-file target
428 (lambda _
429 (format #t "#!~a --no-auto-compile\n!#\n" guile)
430 (write
431 `(begin (use-modules (ice-9 match)
432 (ice-9 receive)
433 (ice-9 hash-table)
434 (srfi srfi-1)
435 (srfi srfi-26))
436 (define defaults
437 '(("-bootclasspath" ,bootcp)
438 ("-source" "1.5")
439 ("-target" "1.5")
440 ("-cp" ".")))
441 (define (main args)
442 (let ((classpath (getenv "CLASSPATH")))
443 (setenv "CLASSPATH"
444 (string-join (list ,ecj (or classpath ""))
445 ":")))
446 (receive (vm-args other-args)
447 ;; Separate VM arguments from arguments to ECJ.
448 (partition (cut string-prefix? "-J" <>)
449 (fold (lambda (default acc)
450 (if (member (first default) acc)
451 acc (append default acc)))
452 args defaults))
453 (apply system* ,java
454 (append
455 ;; Remove "-J" prefix
456 (map (cut string-drop <> 2) vm-args)
457 '("org.eclipse.jdt.internal.compiler.batch.Main")
458 (cons "-nowarn" other-args)))))
459 ;; Entry point
460 (let ((args (cdr (command-line))))
461 (if (null? args)
462 (format (current-error-port) "javac: no arguments given!\n")
463 (main args)))))))
464 (chmod target #o755)))))
465 (native-inputs
466 (list guile-3.0 ecj-bootstrap jamvm-1-bootstrap classpath-bootstrap))
467 (description "This package provides a wrapper around the @dfn{Eclipse
468compiler for Java} (ecj) with a command line interface that is compatible with
469the standard javac executable.")))
470
471;; The classpath-bootstrap was built without a virtual machine, so it does not
472;; provide a wrapper for javah. We cannot build the development version of
473;; Classpath without javah.
474(define classpath-0.99
475 (package (inherit classpath-bootstrap)
476 (version "0.99")
477 (source (origin
478 (method url-fetch)
479 (uri (string-append "mirror://gnu/classpath/classpath-"
480 version ".tar.gz"))
481 (sha256
482 (base32
483 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
484 (patches (search-patches "classpath-aarch64-support.patch"))))
485 (arguments
486 `(#:configure-flags
487 (list (string-append "--with-ecj-jar="
488 (assoc-ref %build-inputs "ecj-bootstrap")
489 "/share/java/ecj-bootstrap.jar")
490 (string-append "JAVAC="
491 (assoc-ref %build-inputs "ecj-javac-wrapper")
492 "/bin/javac")
493 (string-append "JAVA="
494 (assoc-ref %build-inputs "jamvm")
495 "/bin/jamvm")
496 "GCJ_JAVAC_TRUE=no"
497 "ac_cv_prog_java_works=yes" ; trust me
498 "--disable-Werror"
499 "--disable-gmp"
500 "--disable-gtk-peer"
501 "--disable-gconf-peer"
502 "--disable-plugin"
503 "--disable-dssi"
504 "--disable-alsa"
505 "--disable-gjdoc")
506 #:phases
507 (modify-phases %standard-phases
508 (add-after 'install 'install-data
509 (lambda _ (invoke "make" "install-data"))))))
510 (native-inputs
511 (list classpath-bootstrap
512 ecj-bootstrap ecj-javac-wrapper
513 fastjar jamvm-1-bootstrap
514 libltdl pkg-config))))
515
516;; We need this because classpath-bootstrap does not provide all of the tools
517;; we need to build classpath-devel.
518(define classpath-jamvm-wrappers
519 (package (inherit classpath-0.99)
520 (name "classpath-jamvm-wrappers")
521 (source #f)
522 (build-system trivial-build-system)
523 (arguments
524 (list
525 #:modules '((guix build utils))
526 #:builder
527 #~(begin
528 (use-modules (guix build utils))
529 (let ((bash #$(this-package-native-input "bash-minimal"))
530 (jamvm #$(this-package-native-input "jamvm"))
531 (classpath #$(this-package-native-input "classpath"))
532 (bin (string-append #$output "/bin/")))
533 (mkdir-p bin)
534 (for-each (lambda (tool)
535 (with-output-to-file (string-append bin tool)
536 (lambda _
537 #$@(if (string-prefix? "armhf" (or (%current-system)
538 (%current-target-system)))
539 `((format #t "#!~a/bin/sh
540~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
541gnu.classpath.tools.~a.~a $@"
542 bash jamvm classpath tool
543 (if (string=? "native2ascii" tool)
544 "Native2ASCII" "Main")))
545 `((format #t "#!~a/bin/sh
546~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
547gnu.classpath.tools.~a.~a $@"
548 bash jamvm classpath tool
549 (if (string=? "native2ascii" tool)
550 "Native2ASCII" "Main"))))))
551 (chmod (string-append bin tool) #o755))
552 (list "javah"
553 "rmic"
554 "rmid"
555 "orbd"
556 "rmiregistry"
557 "native2ascii"))))))
558 (native-inputs
559 (list bash-minimal jamvm-1-bootstrap classpath-0.99))
560 (inputs '())
561 (synopsis "Executables from GNU Classpath")
562 (description "This package provides wrappers around the tools provided by
563the GNU Classpath library. They are executed by the JamVM virtual
564machine.")))
565
566;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
567;; then Classpath has gained much more support for Java 1.6.
568(define-public classpath-devel
569 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
570 (revision "1"))
571 (package (inherit classpath-bootstrap)
572 (version (string-append "0.99-" revision "." (string-take commit 9)))
573 (source (origin
574 (method git-fetch)
575 (uri (git-reference
576 (url "https://git.savannah.gnu.org/git/classpath.git")
577 (commit commit)))
578 (file-name (string-append "classpath-" version "-checkout"))
579 (sha256
580 (base32
581 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))
582 (patches (search-patches "classpath-aarch64-support.patch"))))
583 (arguments
584 `(#:make-flags
585 ;; Ensure that the initial heap size is smaller than the maximum
586 ;; size. By default only Xmx is set, which can lead to invalid
587 ;; memory settings on some machines with a lot of memory.
588 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
589 #:configure-flags
590 (list (string-append "--with-ecj-jar="
591 (assoc-ref %build-inputs "ecj-bootstrap")
592 "/share/java/ecj-bootstrap.jar")
593 (string-append "--with-javac="
594 (assoc-ref %build-inputs "ecj-javac-wrapper")
595 "/bin/javac")
596 (string-append "JAVA="
597 (assoc-ref %build-inputs "jamvm")
598 "/bin/jamvm")
599 "GCJ_JAVAC_TRUE=no"
600 "ac_cv_prog_java_works=yes" ; trust me
601 "--disable-Werror"
602 "--disable-gmp"
603 "--disable-gtk-peer"
604 "--disable-gconf-peer"
605 "--disable-plugin"
606 "--disable-dssi"
607 "--disable-alsa"
608 "--disable-gjdoc")
609 #:phases
610 (modify-phases %standard-phases
611 ;; XXX The bootstrap phase executes autogen.sh, which fails after
612 ;; complaining about the lack of gettext.
613 (replace 'bootstrap
614 (lambda _ (invoke "autoreconf" "-vif")))
615 (add-after 'unpack 'remove-unsupported-annotations
616 (lambda _
617 (substitute* (find-files "java" "\\.java$")
618 (("@Override") ""))))
619 (add-after 'install 'install-data
620 (lambda _ (invoke "make" "install-data"))))))
621 (native-inputs
622 (list autoconf automake libltdl libtool gettext-minimal texinfo
623 pkg-config
624 classpath-jamvm-wrappers ;for javah
625 ecj-bootstrap ecj-javac-wrapper fastjar
626 jamvm-1-bootstrap)))))
627
628(define jamvm
629 (package (inherit jamvm-1-bootstrap)
630 (version "2.0.0")
631 (source (origin
632 (method url-fetch)
633 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
634 "JamVM%20" version "/jamvm-"
635 version ".tar.gz"))
636 (sha256
637 (base32
638 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
639 (patches
640 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"
641 "jamvm-2.0.0-opcode-guard.patch"
642 "jamvm-2.0.0-aarch64-support.patch"))
643 ;; Remove precompiled software.
644 (snippet
645 '(delete-file "src/classlib/gnuclasspath/lib/classes.zip"))))
646 (build-system gnu-build-system)
647 (arguments
648 (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap)
649 ((#:configure-flags _)
650 '(list (string-append "--with-classpath-install-dir="
651 (assoc-ref %build-inputs "classpath"))))))
652 (inputs
653 `(("classpath" ,classpath-devel)
654 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
655 ("zip" ,zip)
656 ("zlib" ,zlib)))))
657
658(define ecj-javac-wrapper-final
659 (package (inherit ecj-javac-wrapper)
660 (native-inputs
661 (list guile-3.0 ecj-bootstrap jamvm classpath-devel))))
662
663;; We jump ahead by patching the sources of ECJ 4.2.1 so that our bootstrap
664;; JDK can build it. ECJ 4 allows us to skip the build of the first version
665;; of icedtea and build icedtea 2.x directly.
666(define-public ecj4-bootstrap
667 (package
668 (name "ecj-bootstrap")
669 (version "4.2.1")
670 (source (origin
671 (method url-fetch)
672 (uri (string-append "http://archive.eclipse.org/eclipse/"
673 "downloads/drops4/R-" version
674 "-201209141800/ecjsrc-" version ".jar"))
675 (sha256
676 (base32
677 "1x281p87m14zylvinkiz6gc23ss7pzlx419qjbql11jriwav4qfj"))))
678 ;; It would be so much easier if we could use the ant-build-system, but we
679 ;; cannot as we don't have ant at this point. We use ecj for
680 ;; bootstrapping the JDK.
681 (build-system gnu-build-system)
682 (arguments
683 `(#:tests? #f ; there are no tests
684 #:phases
685 (modify-phases %standard-phases
686 (replace 'unpack
687 (lambda* (#:key source #:allow-other-keys)
688 (mkdir "src")
689 (with-directory-excursion "src"
690 (invoke "gjar" "-xf" source))
691 (chdir "src")))
692 (replace 'configure
693 (lambda* (#:key inputs #:allow-other-keys)
694 (setenv "CLASSPATH"
695 (string-join
696 (cons (search-input-file inputs "/lib/rt.jar")
697 (find-files (string-append
698 (assoc-ref inputs "ant-bootstrap")
699 "/lib")
700 "\\.jar$"))
701 ":"))
702 ;; This directive is not supported by our simple bootstrap JDK.
703 (substitute* (find-files "." "\\.java$")
704 (("@Override") ""))))
705 (replace 'build
706 (lambda* (#:key inputs #:allow-other-keys)
707 ;; We can't compile these yet, but we don't need them at this
708 ;; point anyway.
709 (delete-file "org/eclipse/jdt/core/JDTCompilerAdapter.java")
710 (delete-file-recursively "org/eclipse/jdt/internal/antadapter")
711
712 ;; Create a simple manifest to make ecj executable.
713 (mkdir-p "META-INF")
714 (with-output-to-file "META-INF/MANIFESTS.MF"
715 (lambda _
716 (display "Manifest-Version: 1.0
717Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
718
719 ;; Compile it all!
720 (apply invoke "javac"
721 (find-files "." "\\.java$"))
722
723 ;; Pack it all up! We don't use "jar" here, because
724 ;; it doesn't produce reproducible zip archives.
725 ;; XXX: copied from (gnu build install)
726 (for-each (lambda (file)
727 (let ((s (lstat file)))
728 (unless (eq? (stat:type s) 'symlink)
729 (utime file 0 0 0 0))))
730 (find-files "." #:directories? #t))
731
732 ;; It is important that the manifest appears first.
733 (apply invoke "zip" "-0" "-X" "ecj-bootstrap.jar"
734 "META-INF/MANIFESTS.MF"
735 (delete "./META-INF/MANIFESTS.MF"
736 (find-files "." ".*" #:directories? #t)))))
737 (replace 'install
738 (lambda* (#:key outputs #:allow-other-keys)
739 (let ((share (string-append (assoc-ref outputs "out")
740 "/share/java/")))
741 (mkdir-p share)
742 (install-file "ecj-bootstrap.jar" share)))))))
743 (native-inputs
744 (list ant-bootstrap classpath-devel ecj-javac-wrapper-final jamvm
745 unzip zip))
746 (home-page "https://eclipse.org")
747 (synopsis "Eclipse Java development tools core batch compiler")
748 (description "This package provides the Eclipse Java core batch compiler
749for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
750requirement for all GNU Classpath releases after version 0.93. This version
751supports sufficient parts of Java 7 to build Icedtea 2.x.")
752 (license license:epl1.0)))
753
754(define ecj4-javac-wrapper
755 (package
756 (inherit ecj-javac-wrapper)
757 (native-inputs
758 (list guile-3.0 ecj4-bootstrap jamvm classpath-devel))))
759
760(define jamvm-with-ecj4
761 (package
762 (inherit jamvm)
763 (inputs
764 (modify-inputs (package-inputs jamvm)
765 (replace "ecj-javac-wrapper" ecj4-javac-wrapper)))))
766
767(define-public icedtea-7
768 (let* ((version "2.6.13")
769 (drop (lambda (name hash)
770 (origin
771 (method url-fetch)
772 (uri (string-append
773 "http://icedtea.classpath.org/download/drops"
774 "/icedtea7/" version "/" name ".tar.bz2"))
775 (sha256 (base32 hash))))))
776 (package
777 (name "icedtea")
778 (version version)
779 (source (origin
780 (method url-fetch)
781 (uri (string-append
782 "http://icedtea.wildebeest.org/download/source/icedtea-"
783 version ".tar.xz"))
784 (sha256
785 (base32
786 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
787 (modules '((guix build utils)))
788 (snippet
789 '(begin
790 (substitute* "Makefile.in"
791 ;; do not leak information about the build host
792 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
793 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
794 #t))))
795 (build-system gnu-build-system)
796 (outputs '("out" ; Java Runtime Environment
797 "jdk" ; Java Development Kit
798 "doc")) ; all documentation
799 (arguments
800 `(;; There are many test failures. Some are known to
801 ;; fail upstream, others relate to not having an X
802 ;; server running at test time, yet others are a
803 ;; complete mystery to me.
804
805 ;; hotspot: passed: 241; failed: 45; error: 2
806 ;; langtools: passed: 1,934; failed: 26
807 ;; jdk: unknown
808 #:tests? #f
809
810 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
811 ;; gremlin) doesn't support it yet, so skip this phase.
812 #:validate-runpath? #f
813
814 #:modules ((guix build utils)
815 (guix build gnu-build-system)
816 (ice-9 match)
817 (ice-9 popen)
818 (srfi srfi-19)
819 (srfi srfi-26))
820
821 #:configure-flags
822 ;; TODO: package sctp and add to inputs
823 `("--disable-system-sctp"
824 "--enable-system-pcsc"
825 "--enable-system-lcms"
826 "--enable-bootstrap"
827 "--enable-nss"
828 "--without-rhino"
829 ,(string-append "--with-parallel-jobs="
830 (number->string (parallel-job-count)))
831 "--disable-downloading"
832 "--disable-tests" ;they are run in the check phase instead
833 "--with-openjdk-src-dir=./openjdk.src"
834 ,(string-append "--with-ecj="
835 (assoc-ref %build-inputs "ecj4-javac-wrapper")
836 "/bin/javac")
837 ,(string-append "--with-jdk-home="
838 (assoc-ref %build-inputs "classpath"))
839 ,(string-append "--with-java="
840 (assoc-ref %build-inputs "jamvm")
841 "/bin/jamvm")
842 ,(string-append "--with-jar="
843 (assoc-ref %build-inputs "classpath")
844 "/bin/gjar"))
845 #:phases
846 (modify-phases %standard-phases
847 (replace 'unpack
848 (lambda* (#:key source inputs #:allow-other-keys)
849 (let ((target (string-append "icedtea-" ,version))
850 (unpack (lambda* (name #:optional dir)
851 (let ((dir (or dir
852 (string-drop-right name 5))))
853 (mkdir dir)
854 (invoke "tar" "xvf"
855 (assoc-ref inputs name)
856 "-C" dir
857 "--strip-components=1")))))
858 (mkdir target)
859 (invoke "tar" "xvf" source
860 "-C" target "--strip-components=1")
861 (chdir target)
862 (unpack "openjdk-src" "openjdk.src")
863 (with-directory-excursion "openjdk.src"
864 (for-each unpack
865 (filter (cut string-suffix? "-drop" <>)
866 (map (match-lambda
867 ((name . _) name))
868 inputs)))))))
869 (add-after 'unpack 'use-classpath
870 (lambda* (#:key inputs #:allow-other-keys)
871 (let ((tools (search-input-file inputs "/share/classpath/tools.zip"))
872 (rt.jar (search-input-file inputs "/lib/rt.jar")))
873 ;; GNU Classpath does not provide rt.jar, but jamvm provides
874 ;; Classpath's glibj.zip as rt.jar, so we just use that.
875 (substitute* "Makefile.in"
876 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") rt.jar))
877 ;; Make sure we can find all classes.
878 (setenv "CLASSPATH"
879 (string-append rt.jar ":" tools))
880 (setenv "JAVACFLAGS"
881 (string-append "-cp " rt.jar ":" tools)))))
882 (add-after 'unpack 'patch-bitrot
883 (lambda _
884 (substitute* '("patches/boot/revert-6973616.patch"
885 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
886 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
887 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
888 ;; As of attr 2.4.48 this header is no longer
889 ;; included. It is provided by the libc instead.
890 (substitute* '("configure"
891 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
892 (("attr/xattr.h") "sys/xattr.h"))))
893 (add-after 'unpack 'fix-openjdk
894 (lambda _
895 (substitute* "openjdk.src/jdk/make/common/Defs-linux.gmk"
896 (("CFLAGS_COMMON = -fno-strict-aliasing" all)
897 (string-append all " -fcommon")))
898 (substitute*
899 '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
900 "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
901 (("#include <sys/sysctl.h>")
902 "#include <linux/sysctl.h>"))
903 ;; It looks like the "h = 31 * h + c" line of the jsum()
904 ;; function gets miscompiled. After a few iterations of the loop
905 ;; the result of "31 * h" is always 0x8000000000000000.
906 ;; Bad optimization maybe...
907 ;; Transform "31 * h + c" into a convoluted "32 * h + c - h"
908 ;; as a workaround.
909 (substitute* "openjdk.src/hotspot/src/share/vm/memory/dump.cpp"
910 (("h = 31 \\* h \\+ c;")
911 "jlong h0 = h;\nfor(int i = 0; i < 5; i++) h += h;\nh += c - h0;"))))
912 (add-after 'unpack 'fix-x11-extension-include-path
913 (lambda* (#:key inputs #:allow-other-keys)
914 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
915 (((string-append "\\$\\(firstword \\$\\(wildcard "
916 "\\$\\(OPENWIN_HOME\\)"
917 "/include/X11/extensions\\).*$"))
918 (string-append (assoc-ref inputs "libxrender")
919 "/include/X11/extensions"
920 " -I" (assoc-ref inputs "libxtst")
921 "/include/X11/extensions"
922 " -I" (assoc-ref inputs "libxinerama")
923 "/include/X11/extensions"))
924 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))))
925 (add-after 'unpack 'patch-paths
926 (lambda* (#:key inputs #:allow-other-keys)
927 ;; buildtree.make generates shell scripts, so we need to replace
928 ;; the generated shebang
929 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
930 (("/bin/sh") (which "bash")))
931
932 (let ((corebin (string-append
933 (assoc-ref inputs "coreutils") "/bin/"))
934 (binbin (string-append
935 (assoc-ref inputs "binutils") "/bin/"))
936 (grepbin (string-append
937 (assoc-ref inputs "grep") "/bin/")))
938 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
939 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
940 (("UNIXCOMMAND_PATH = /bin/")
941 (string-append "UNIXCOMMAND_PATH = " corebin))
942 (("USRBIN_PATH = /usr/bin/")
943 (string-append "USRBIN_PATH = " corebin))
944 (("DEVTOOLS_PATH *= */usr/bin/")
945 (string-append "DEVTOOLS_PATH = " corebin))
946 (("COMPILER_PATH *= */usr/bin/")
947 (string-append "COMPILER_PATH = "
948 (assoc-ref inputs "gcc") "/bin/"))
949 (("DEF_OBJCOPY *=.*objcopy")
950 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
951
952 ;; fix path to alsa header
953 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
954 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
955 (string-append "ALSA_INCLUDE="
956 (assoc-ref inputs "alsa-lib")
957 "/include/alsa/version.h")))
958
959 ;; fix hard-coded utility paths
960 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
961 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
962 (("ECHO *=.*echo")
963 (string-append "ECHO = " (which "echo")))
964 (("^GREP *=.*grep")
965 (string-append "GREP = " (which "grep")))
966 (("EGREP *=.*egrep")
967 (string-append "EGREP = " (which "egrep")))
968 (("CPIO *=.*cpio")
969 (string-append "CPIO = " (which "cpio")))
970 (("READELF *=.*readelf")
971 (string-append "READELF = " (which "readelf")))
972 (("^ *AR *=.*ar")
973 (string-append "AR = " (which "ar")))
974 (("^ *TAR *=.*tar")
975 (string-append "TAR = " (which "tar")))
976 (("AS *=.*as")
977 (string-append "AS = " (which "as")))
978 (("LD *=.*ld")
979 (string-append "LD = " (which "ld")))
980 (("STRIP *=.*strip")
981 (string-append "STRIP = " (which "strip")))
982 (("NM *=.*nm")
983 (string-append "NM = " (which "nm")))
984 (("^SH *=.*sh")
985 (string-append "SH = " (which "bash")))
986 (("^FIND *=.*find")
987 (string-append "FIND = " (which "find")))
988 (("LDD *=.*ldd")
989 (string-append "LDD = " (which "ldd")))
990 (("NAWK *=.*(n|g)awk")
991 (string-append "NAWK = " (which "gawk")))
992 (("XARGS *=.*xargs")
993 (string-append "XARGS = " (which "xargs")))
994 (("UNZIP *=.*unzip")
995 (string-append "UNZIP = " (which "unzip")))
996 (("ZIPEXE *=.*zip")
997 (string-append "ZIPEXE = " (which "zip")))
998 (("SED *=.*sed")
999 (string-append "SED = " (which "sed"))))
1000
1001 ;; Some of these timestamps cause problems as they are more than
1002 ;; 10 years ago, failing the build process.
1003 (substitute*
1004 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1005 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1006 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1007 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1008 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))))
1009 (add-before 'configure 'set-additional-paths
1010 (lambda* (#:key inputs #:allow-other-keys)
1011 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1012 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1013 (string-append "ALSA_INCLUDE="
1014 (assoc-ref inputs "alsa-lib")
1015 "/include/alsa/version.h")))
1016 (setenv "CC" "gcc")
1017 (setenv "CPATH"
1018 (string-append (assoc-ref inputs "libxcomposite")
1019 "/include/X11/extensions" ":"
1020 (assoc-ref inputs "libxrender")
1021 "/include/X11/extensions" ":"
1022 (assoc-ref inputs "libxtst")
1023 "/include/X11/extensions" ":"
1024 (assoc-ref inputs "libxinerama")
1025 "/include/X11/extensions" ":"
1026 (or (getenv "CPATH") "")))
1027 (setenv "ALT_OBJCOPY" (which "objcopy"))
1028 (setenv "ALT_CUPS_HEADERS_PATH"
1029 (string-append (assoc-ref inputs "cups")
1030 "/include"))
1031 (setenv "ALT_FREETYPE_HEADERS_PATH"
1032 (string-append (assoc-ref inputs "freetype")
1033 "/include"))
1034 (setenv "ALT_FREETYPE_LIB_PATH"
1035 (string-append (assoc-ref inputs "freetype")
1036 "/lib"))))
1037 (add-before 'build 'disable-os-version-check
1038 ;; allow build on linux major version change
1039 (lambda _
1040 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")))
1041 (add-before 'check 'fix-test-framework
1042 (lambda _
1043 ;; Fix PATH in test environment
1044 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1045 (("PATH=/bin:/usr/bin")
1046 (string-append "PATH=" (getenv "PATH"))))
1047 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1048 (("/usr/bin/env") (which "env")))
1049 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1050 (("/bin/rm") (which "rm"))
1051 (("/bin/cp") (which "cp"))
1052 (("/bin/mv") (which "mv")))))
1053 (add-before 'check 'fix-hotspot-tests
1054 (lambda _
1055 (with-directory-excursion "openjdk.src/hotspot/test/"
1056 (substitute* "jprt.config"
1057 (("PATH=\"\\$\\{path4sdk\\}\"")
1058 (string-append "PATH=" (getenv "PATH")))
1059 (("make=/usr/bin/make")
1060 (string-append "make=" (which "make"))))
1061 (substitute* '("runtime/6626217/Test6626217.sh"
1062 "runtime/7110720/Test7110720.sh")
1063 (("/bin/rm") (which "rm"))
1064 (("/bin/cp") (which "cp"))
1065 (("/bin/mv") (which "mv"))))))
1066 (add-before 'check 'fix-jdk-tests
1067 (lambda _
1068 (with-directory-excursion "openjdk.src/jdk/test/"
1069 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1070 (("/bin/pwd") (which "pwd")))
1071 (substitute* "com/sun/jdi/ShellScaffold.sh"
1072 (("/bin/kill") (which "kill")))
1073 (substitute* "start-Xvfb.sh"
1074 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1075 (("/usr/bin/nohup") (which "nohup")))
1076 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1077 (("/bin/rm") (which "rm")))
1078 (substitute* "tools/launcher/MultipleJRE.sh"
1079 (("echo \"#!/bin/sh\"")
1080 (string-append "echo \"#!" (which "rm") "\""))
1081 (("/usr/bin/zip") (which "zip")))
1082 (substitute* "com/sun/jdi/OnThrowTest.java"
1083 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1084 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1085 (("/usr/bin/uptime") (which "uptime")))
1086 (substitute* "java/lang/ProcessBuilder/Basic.java"
1087 (("/usr/bin/env") (which "env"))
1088 (("/bin/false") (which "false"))
1089 (("/bin/true") (which "true"))
1090 (("/bin/cp") (which "cp"))
1091 (("/bin/sh") (which "sh")))
1092 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1093 (("/bin/sh") (which "sh")))
1094 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1095 (("/usr/bin/perl") (which "perl"))
1096 (("/bin/ps") (which "ps"))
1097 (("/bin/true") (which "true")))
1098 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1099 (("/usr/bin/tee") (which "tee")))
1100 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1101 (("/bin/true") (which "true")))
1102 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1103 (("/bin/cat") (which "cat")))
1104 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1105 (("/bin/sh") (which "sh"))
1106 (("/bin/true") (which "true"))
1107 (("/bin/kill") (which "kill")))
1108 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1109 (("/usr/bin/echo") (which "echo")))
1110 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1111 (("/usr/bin/cat") (which "cat")))
1112 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1113 (("/bin/cat") (which "cat"))
1114 (("/bin/sleep") (which "sleep"))
1115 (("/bin/sh") (which "sh")))
1116 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1117 (("/bin/cat") (which "cat")))
1118 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1119 (("/bin/chmod") (which "chmod")))
1120 (substitute* "java/util/zip/ZipFile/Assortment.java"
1121 (("/bin/sh") (which "sh"))))))
1122 (replace 'check
1123 (lambda* (#:key tests? #:allow-other-keys)
1124 ;; The "make check-*" targets always return zero, so we need to
1125 ;; check for errors in the associated log files to determine
1126 ;; whether any tests have failed.
1127 (when tests?
1128 (use-modules (ice-9 rdelim))
1129 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1130 (checker (lambda (port)
1131 (let loop ()
1132 (let ((line (read-line port)))
1133 (cond
1134 ((eof-object? line) #t)
1135 ((regexp-exec error-pattern line)
1136 (error "test failed"))
1137 (else (loop)))))))
1138 (run-test (lambda (test)
1139 (invoke "make" test)
1140 (call-with-input-file
1141 (string-append "test/" test ".log")
1142 checker))))
1143 (run-test "check-hotspot")
1144 (run-test "check-langtools")
1145 (run-test "check-jdk")))))
1146 (replace 'install
1147 (lambda* (#:key outputs #:allow-other-keys)
1148 (let ((doc (string-append (assoc-ref outputs "doc")
1149 "/share/doc/icedtea"))
1150 (jre (assoc-ref outputs "out"))
1151 (jdk (assoc-ref outputs "jdk")))
1152 (copy-recursively "openjdk.build/docs" doc)
1153 (copy-recursively "openjdk.build/j2re-image" jre)
1154 (copy-recursively "openjdk.build/j2sdk-image" jdk))))
1155 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1156 ;; But that shared object is located in the server/ folder, so it
1157 ;; cannot be found. This phase creates a symbolic link in the
1158 ;; lib/amd64 folder so that the other libraries can find it.
1159 ;;
1160 ;; See:
1161 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1162 ;;
1163 ;; FIXME: Find the bug in the build system, so that this symlink is
1164 ;; not needed.
1165 (add-after 'install 'install-libjvm
1166 (lambda* (#:key inputs outputs #:allow-other-keys)
1167 (let* ((lib-path (string-append (assoc-ref outputs "out")
1168 ;; See 'INSTALL_ARCH_DIR' in
1169 ;; 'configure'.
1170 ,(match (%current-system)
1171 ("i686-linux"
1172 "/lib/i386")
1173 ("x86_64-linux"
1174 "/lib/amd64")
1175 ("armhf-linux"
1176 "/lib/arm")
1177 ("aarch64-linux"
1178 "/lib/aarch64")
1179 ;; We need a catch-all, dropping
1180 ;; '-linux' works in most cases.
1181 (_
1182 (string-append
1183 "/lib/"
1184 (string-drop-right
1185 (%current-system) 6)))))))
1186 (symlink (string-append lib-path "/server/libjvm.so")
1187 (string-append lib-path "/libjvm.so")))))
1188 ;; By default IcedTea only generates an empty keystore. In order to
1189 ;; be able to use certificates in Java programs we need to generate a
1190 ;; keystore from a set of certificates. For convenience we use the
1191 ;; certificates from the nss-certs package.
1192 (add-after 'install 'install-keystore
1193 (lambda* (#:key inputs outputs #:allow-other-keys)
1194 (use-modules (ice-9 rdelim))
1195 (let* ((keystore "cacerts")
1196 (certs-dir (search-input-directory inputs
1197 "etc/ssl/certs"))
1198 (keytool (string-append (assoc-ref outputs "jdk")
1199 "/bin/keytool")))
1200 (define (extract-cert file target)
1201 (call-with-input-file file
1202 (lambda (in)
1203 (call-with-output-file target
1204 (lambda (out)
1205 (let loop ((line (read-line in 'concat))
1206 (copying? #f))
1207 (cond
1208 ((eof-object? line) #t)
1209 ((string-prefix? "-----BEGIN" line)
1210 (display line out)
1211 (loop (read-line in 'concat) #t))
1212 ((string-prefix? "-----END" line)
1213 (display line out)
1214 #t)
1215 (else
1216 (when copying? (display line out))
1217 (loop (read-line in 'concat) copying?)))))))))
1218 (define (import-cert cert)
1219 (format #t "Importing certificate ~a\n" (basename cert))
1220 (let ((temp "tmpcert"))
1221 (extract-cert cert temp)
1222 (let ((port (open-pipe* OPEN_WRITE keytool
1223 "-import"
1224 "-alias" (basename cert)
1225 "-keystore" keystore
1226 "-storepass" "changeit"
1227 "-file" temp)))
1228 (display "yes\n" port)
1229 (when (not (zero? (status:exit-val (close-pipe port))))
1230 (format #t "failed to import ~a\n" cert)))
1231 (delete-file temp)))
1232
1233 ;; This is necessary because the certificate directory contains
1234 ;; files with non-ASCII characters in their names.
1235 (setlocale LC_ALL "en_US.utf8")
1236 (setenv "LC_ALL" "en_US.utf8")
1237
1238 (for-each import-cert (find-files certs-dir "\\.pem$"))
1239 (mkdir-p (string-append (assoc-ref outputs "out")
1240 "/lib/security"))
1241 (mkdir-p (string-append (assoc-ref outputs "jdk")
1242 "/jre/lib/security"))
1243
1244 ;; The cacerts files we are going to overwrite are chmod'ed as
1245 ;; read-only (444) in icedtea-8 (which derives from this
1246 ;; package). We have to change this so we can overwrite them.
1247 (chmod (string-append (assoc-ref outputs "out")
1248 "/lib/security/" keystore) #o644)
1249 (chmod (string-append (assoc-ref outputs "jdk")
1250 "/jre/lib/security/" keystore) #o644)
1251
1252 (install-file keystore
1253 (string-append (assoc-ref outputs "out")
1254 "/lib/security"))
1255 (install-file keystore
1256 (string-append (assoc-ref outputs "jdk")
1257 "/jre/lib/security"))))))))
1258 (native-inputs
1259 `(("openjdk-src"
1260 ,(drop "openjdk"
1261 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1262 ("corba-drop"
1263 ,(drop "corba"
1264 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1265 ("jaxp-drop"
1266 ,(drop "jaxp"
1267 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1268 ("jaxws-drop"
1269 ,(drop "jaxws"
1270 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1271 ("jdk-drop"
1272 ,(drop "jdk"
1273 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1274 ("langtools-drop"
1275 ,(drop "langtools"
1276 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1277 ("hotspot-drop"
1278 ,(origin
1279 (method url-fetch)
1280 (uri (string-append
1281 "http://icedtea.classpath.org/downloads/drops"
1282 "/icedtea7/" version "/hotspot.tar.bz2"))
1283 (sha256
1284 (base32
1285 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1286 (patches (search-patches
1287 "icedtea-7-hotspot-aarch64-use-c++98.patch"))))
1288 ("ant" ,ant-bootstrap)
1289 ("attr" ,attr)
1290 ("classpath" ,classpath-devel)
1291 ("coreutils" ,coreutils)
1292 ("diffutils" ,diffutils) ;for tests
1293 ("ecj4-javac-wrapper" ,ecj4-javac-wrapper)
1294 ("fastjar" ,fastjar) ;only for the configure phase; we actually use gjar
1295 ("gawk" ,gawk)
1296 ("grep" ,grep)
1297 ("jamvm" ,jamvm-with-ecj4)
1298 ("libtool" ,libtool)
1299 ("pkg-config" ,pkg-config)
1300 ("wget" ,wget)
1301 ("which" ,which)
1302 ("cpio" ,cpio)
1303 ("zip" ,zip)
1304 ("unzip" ,unzip)
1305 ("libxslt" ,libxslt) ;for xsltproc
1306 ("nss-certs" ,nss-certs)
1307 ("perl" ,perl)
1308 ("procps" ,procps))) ;for "free", even though I'm not sure we should use it
1309 (inputs
1310 (list alsa-lib
1311 cups
1312 fontconfig
1313 freetype
1314 giflib
1315 gtk+-2
1316 lcms
1317 libjpeg-turbo
1318 libpng
1319 libx11
1320 libxcomposite
1321 libxi
1322 libxinerama
1323 libxrender
1324 libxt
1325 libxtst
1326 mit-krb5
1327 nss
1328 pcsc-lite
1329 zlib))
1330 (home-page "http://icedtea.classpath.org")
1331 (synopsis "Java development kit")
1332 (description
1333 "This package provides the Java development kit OpenJDK built with the
1334IcedTea build harness.")
1335
1336 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1337 (supported-systems (delete "mips64el-linux" %supported-systems))
1338
1339 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1340 ;; same license as both GNU Classpath and OpenJDK.
1341 (license license:gpl2+))))
1342
1343(define-public icedtea-8
1344 (let* ((version "3.19.0")
1345 (drop (lambda (name hash)
1346 (origin
1347 (method url-fetch)
1348 (uri (string-append
1349 "http://icedtea.classpath.org/download/drops"
1350 "/icedtea8/" version "/" name ".tar.xz"))
1351 (sha256 (base32 hash))))))
1352 (package (inherit icedtea-7)
1353 (version "3.19.0")
1354 (source (origin
1355 (method url-fetch)
1356 (uri (string-append
1357 "http://icedtea.wildebeest.org/download/source/icedtea-"
1358 version ".tar.xz"))
1359 (sha256
1360 (base32
1361 "1cmms7cb2sav3ywc36ynqmybzx73sl279rm6j8i5nqrmp98ixmpf"))
1362 (modules '((guix build utils)))
1363 (snippet
1364 '(substitute* '("configure"
1365 "acinclude.m4")
1366 ;; Do not embed build time
1367 (("(DIST_ID=\"Custom build).*$" _ prefix)
1368 (string-append prefix "\"\n"))
1369 ;; Do not leak information about the build host
1370 (("DIST_NAME=\"\\$build_os\"")
1371 "DIST_NAME=\"guix\"")))))
1372 (arguments
1373 `(#:imported-modules
1374 ((guix build ant-build-system)
1375 ,@%gnu-build-system-modules)
1376
1377 #:disallowed-references ,(list (gexp-input icedtea-7 "jdk"))
1378
1379 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1380 ((#:modules modules)
1381 `((guix build utils)
1382 (guix build gnu-build-system)
1383 ((guix build ant-build-system) #:prefix ant:)
1384 (ice-9 match)
1385 (ice-9 popen)
1386 (srfi srfi-19)
1387 (srfi srfi-26)))
1388 ((#:configure-flags flags)
1389 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1390 `("CFLAGS=-fcommon"
1391 "CXXFLAGS=-fcommon"
1392 "--enable-bootstrap"
1393 "--enable-nss"
1394 ,(string-append "--with-parallel-jobs="
1395 (number->string (parallel-job-count)))
1396 "--disable-downloading"
1397 "--disable-system-pcsc"
1398 "--disable-system-sctp"
1399 "--disable-tests" ;they are run in the check phase instead
1400 "--with-openjdk-src-dir=./openjdk.src"
1401 ,(string-append "--with-jdk-home=" jdk))))
1402 ((#:phases phases)
1403 `(modify-phases ,phases
1404 (delete 'fix-x11-extension-include-path)
1405 (delete 'patch-paths)
1406 (delete 'set-additional-paths)
1407 (delete 'patch-patches)
1408 (delete 'patch-bitrot)
1409 (delete 'use-classpath)
1410 ;; Prevent the keytool from recording the current time when
1411 ;; adding certificates at build time.
1412 (add-after 'unpack 'patch-keystore
1413 (lambda _
1414 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1415 (("date = new Date\\(\\);")
1416 "\
1417date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1418new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1419new Date();"))
1420 #t))
1421 (add-after 'unpack 'patch-jni-libs
1422 ;; Hardcode dynamically loaded libraries.
1423 (lambda _
1424 (define remove
1425 (@ (srfi srfi-1) remove))
1426
1427 (define (icedtea-or-openjdk? path)
1428 (or (string-contains path "openjdk")
1429 (string-contains path "icedtea")))
1430
1431 (let* ((library-path (remove icedtea-or-openjdk?
1432 (search-path-as-string->list
1433 (getenv "LIBRARY_PATH"))))
1434 (find-library (lambda (name)
1435 (or (search-path
1436 library-path
1437 (string-append "lib" name ".so"))
1438 (string-append "lib" name ".so")))))
1439 (for-each
1440 (lambda (file)
1441 (catch 'decoding-error
1442 (lambda ()
1443 (substitute* file
1444 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1445 _ name version)
1446 (string-append "\"" (find-library name) "\""))
1447 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1448 (string-append "\"" (find-library name) "\""))))
1449 (lambda _
1450 ;; Those are safe to skip.
1451 (format (current-error-port)
1452 "warning: failed to substitute: ~a~%"
1453 file))))
1454 (find-files "openjdk.src/jdk/src/solaris/native"
1455 "\\.c|\\.h")))))
1456 (replace 'fix-openjdk
1457 (lambda _
1458 (substitute*
1459 '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
1460 "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
1461 (("#include <sys/sysctl.h>")
1462 "#include <linux/sysctl.h>"))))
1463 (replace 'install
1464 (lambda* (#:key outputs #:allow-other-keys)
1465 (let ((doc (string-append (assoc-ref outputs "doc")
1466 "/share/doc/icedtea"))
1467 (jre (assoc-ref outputs "out"))
1468 (jdk (assoc-ref outputs "jdk")))
1469 (copy-recursively "openjdk.build/docs" doc)
1470 (copy-recursively "openjdk.build/images/j2re-image" jre)
1471 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1472 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1473 ;; support via NSS.
1474 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1475 (string-append jre "/lib/security/nss.cfg")))))
1476 (add-after 'install 'strip-jar-timestamps
1477 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1478 (native-inputs
1479 `(("jdk" ,icedtea-7 "jdk")
1480 ("openjdk-src"
1481 ,(drop "openjdk"
1482 "1l3bzmd3s38scxpwamfhnwbv7vndgjq6hz3bl58437fgl9kgbl69"))
1483 ("aarch32-drop"
1484 ,(drop "aarch32"
1485 "0k4dwpi3x3lj41rj32xyxbn76r7cb2g2whh44r1z4iwhw1xd2lpq"))
1486 ("corba-drop"
1487 ,(drop "corba"
1488 "0xhh6gf5gh5c6vf1607xcy49wnp5prch2rim13x14wvsn817xf0r"))
1489 ("jaxp-drop"
1490 ,(drop "jaxp"
1491 "043g335rgi5ipl8dp3q2cc3gcfhxk77ipxs43sv344z71bn8xmxr"))
1492 ("jaxws-drop"
1493 ,(drop "jaxws"
1494 "1pc0pv4v2mn2mjc0vp19d94v2150xigyhxsmckqasy647zcm6w0r"))
1495 ("jdk-drop"
1496 ,(drop "jdk"
1497 "1742lcm55l8zhi522x83v65ccr0rd6511q9rj7crw44x3ymdrhrv"))
1498 ("langtools-drop"
1499 ,(drop "langtools"
1500 "08iz7p2xcddlphipf6gahyabr5cawlnydap12p1n4f0md069b50b"))
1501 ("hotspot-drop"
1502 ,(drop "hotspot"
1503 "1ffaxfnb3yn1i7crivqigc1r1q0z6cp044i6nfring4z6c8pfhd2"))
1504 ("nashorn-drop"
1505 ,(drop "nashorn"
1506 "15fn7cpm2i1npa88h57njxg0f8qkrqhrc30pb54d3hxlx5zyjl94"))
1507 ("shenandoah-drop"
1508 ,(drop "shenandoah"
1509 "1jjzjjx1ykyhbc4llh8249dlr8j5g1ki6r7g9baj2mxyb9whc5nq"))
1510 ,@(fold alist-delete (package-native-inputs icedtea-7)
1511 '("openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1512 "jdk-drop" "langtools-drop" "hotspot-drop"
1513 "classpath" "ecj4-javac-wrapper" "jamvm" "fastjar")))))))
1514
1515(define-public openjdk9
1516 (package
1517 (name "openjdk")
1518 (version "9.181")
1519 (source (origin
1520 (method url-fetch)
1521 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1522 (file-name (string-append name "-" version ".tar.bz2"))
1523 (sha256
1524 (base32
1525 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1526 (modules '((guix build utils)))
1527 (snippet
1528 `(begin
1529 (for-each delete-file
1530 (find-files "." ".*.(bin|exe|jar)$"))
1531 #t))))
1532 (build-system gnu-build-system)
1533 (outputs '("out" "jdk" "doc"))
1534 (arguments
1535 `(#:tests? #f; require jtreg
1536 #:make-flags '("all")
1537 #:disallowed-references ,(list (gexp-input icedtea-8)
1538 (gexp-input icedtea-8 "jdk"))
1539
1540 #:phases
1541 (modify-phases %standard-phases
1542 (add-after 'patch-source-shebangs 'fix-java-shebangs
1543 (lambda _
1544 ;; This file was "fixed" by patch-source-shebangs, but it requires
1545 ;; this exact first line.
1546 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1547 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1548 #t))
1549 (replace 'configure
1550 (lambda* (#:key inputs outputs #:allow-other-keys)
1551 ;; TODO: unbundle libpng and lcms
1552 (invoke "bash" "./configure"
1553 ;; Add flags for compilation with gcc >= 10
1554 ,(string-append "--with-extra-cflags=-fcommon"
1555 " -fno-delete-null-pointer-checks"
1556 " -fno-lifetime-dse")
1557 (string-append "--with-freetype="
1558 (assoc-ref inputs "freetype"))
1559 "--disable-freetype-bundling"
1560 "--disable-warnings-as-errors"
1561 "--disable-hotspot-gtest"
1562 "--with-giflib=system"
1563 "--with-libjpeg=system"
1564 (string-append "--prefix=" (assoc-ref outputs "out")))
1565 #t))
1566 (add-before 'build 'write-source-revision-file
1567 (lambda _
1568 (with-output-to-file ".src-rev"
1569 (lambda _
1570 (display ,version)))
1571 #t))
1572 (replace 'build
1573 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1574 (apply invoke "make"
1575 `(,@(if parallel-build?
1576 (list (string-append "JOBS="
1577 (number->string (parallel-job-count))))
1578 '())
1579 ,@make-flags))))
1580 (add-after 'unpack 'patch-jni-libs
1581 ;; Hardcode dynamically loaded libraries.
1582 (lambda _
1583 (define remove
1584 (@ (srfi srfi-1) remove))
1585
1586 (define (icedtea-or-openjdk? path)
1587 (or (string-contains path "openjdk")
1588 (string-contains path "icedtea")))
1589
1590 (let* ((library-path (remove icedtea-or-openjdk?
1591 (search-path-as-string->list
1592 (getenv "LIBRARY_PATH"))))
1593 (find-library (lambda (name)
1594 (or (search-path
1595 library-path
1596 (string-append "lib" name ".so"))
1597 (string-append "lib" name ".so")))))
1598 (for-each
1599 (lambda (file)
1600 (catch 'decoding-error
1601 (lambda ()
1602 (substitute* file
1603 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1604 _ name version)
1605 (string-append "\"" (find-library name) "\""))
1606 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1607 (string-append "\"" (find-library name) "\""))))
1608 (lambda _
1609 ;; Those are safe to skip.
1610 (format (current-error-port)
1611 "warning: failed to substitute: ~a~%"
1612 file))))
1613 (find-files "."
1614 "\\.c$|\\.h$"))
1615 #t)))
1616 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1617 ;; But that shared object is located in the server/ folder, so it
1618 ;; cannot be found. This phase creates a symbolic link in the
1619 ;; lib/ folder so that the other libraries can find it.
1620 ;;
1621 ;; See:
1622 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1623 ;;
1624 ;; FIXME: Find the bug in the build system, so that this symlink is
1625 ;; not needed.
1626 (add-after 'install 'install-libjvm
1627 (lambda* (#:key inputs outputs #:allow-other-keys)
1628 (let* ((lib-out (string-append (assoc-ref outputs "out")
1629 "/lib"))
1630 (lib-jdk (string-append (assoc-ref outputs "jdk")
1631 "/lib")))
1632 (symlink (string-append lib-jdk "/server/libjvm.so")
1633 (string-append lib-jdk "/libjvm.so"))
1634 (symlink (string-append lib-out "/server/libjvm.so")
1635 (string-append lib-out "/libjvm.so")))
1636 #t))
1637 (replace 'install
1638 (lambda* (#:key outputs #:allow-other-keys)
1639 (let ((out (assoc-ref outputs "out"))
1640 (jdk (assoc-ref outputs "jdk"))
1641 (doc (assoc-ref outputs "doc"))
1642 (images (car (find-files "build" ".*-server-release"
1643 #:directories? #t))))
1644 (copy-recursively (string-append images "/images/jdk") jdk)
1645 (copy-recursively (string-append images "/images/jre") out)
1646 (copy-recursively (string-append images "/images/docs") doc))
1647 #t))
1648 (add-after 'install 'strip-zip-timestamps
1649 (lambda* (#:key outputs #:allow-other-keys)
1650 (for-each (lambda (zip)
1651 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1652 (with-directory-excursion dir
1653 (invoke "unzip" zip))
1654 (delete-file zip)
1655 (for-each (lambda (file)
1656 (let ((s (lstat file)))
1657 (unless (eq? (stat:type s) 'symlink)
1658 (format #t "reset ~a~%" file)
1659 (utime file 0 0 0 0))))
1660 (find-files dir #:directories? #t))
1661 (with-directory-excursion dir
1662 (let ((files (find-files "." ".*" #:directories? #t)))
1663 (apply invoke "zip" "-0" "-X" zip files)))))
1664 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1665 #t)))))
1666 (inputs
1667 `(("alsa-lib" ,alsa-lib)
1668 ("cups" ,cups)
1669 ("fontconfig" ,fontconfig)
1670 ("freetype" ,freetype)
1671 ("giflib" ,giflib)
1672 ("lcms" ,lcms)
1673 ("libelf" ,libelf)
1674 ("libjpeg" ,libjpeg-turbo)
1675 ("libice" ,libice)
1676 ("libpng" ,libpng)
1677 ("libx11" ,libx11)
1678 ("libxcomposite" ,libxcomposite)
1679 ("libxi" ,libxi)
1680 ("libxinerama" ,libxinerama)
1681 ("libxrender" ,libxrender)
1682 ("libxt" ,libxt)
1683 ("libxtst" ,libxtst)))
1684 (native-inputs
1685 `(("icedtea-8" ,icedtea-8)
1686 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1687 ;; XXX: The build system fails with newer versions of GNU Make.
1688 ("[email protected]" ,gnu-make-4.2)
1689 ("unzip" ,unzip)
1690 ("which" ,which)
1691 ("zip" ,zip)))
1692 (home-page "https://openjdk.java.net/projects/jdk9/")
1693 (synopsis "Java development kit")
1694 (description
1695 "This package provides the Java development kit OpenJDK.")
1696 (license license:gpl2+)))
1697
1698(define-public openjdk10
1699 (package
1700 (inherit openjdk9)
1701 (name "openjdk")
1702 (version "10.46")
1703 (source (origin
1704 (method url-fetch)
1705 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1706 (file-name (string-append name "-" version ".tar.bz2"))
1707 (sha256
1708 (base32
1709 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1710 (patches (search-patches
1711 "openjdk-10-idlj-reproducibility.patch"))
1712 (modules '((guix build utils)))
1713 (snippet
1714 `(begin
1715 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
1716 #t))))
1717 (arguments
1718 (substitute-keyword-arguments (package-arguments openjdk9)
1719 ((#:phases phases)
1720 `(modify-phases ,phases
1721 (replace 'fix-java-shebangs
1722 (lambda _
1723 ;; This file was "fixed" by patch-source-shebangs, but it requires
1724 ;; this exact first line.
1725 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1726 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1727 #t))
1728 (replace 'configure
1729 (lambda* (#:key inputs outputs #:allow-other-keys)
1730 (invoke "bash" "./configure"
1731 ;; Add flags for compilation with gcc >= 10
1732 ,(string-append "--with-extra-cflags=-fcommon"
1733 " -fno-delete-null-pointer-checks"
1734 " -fno-lifetime-dse")
1735 (string-append "--with-freetype="
1736 (assoc-ref inputs "freetype"))
1737 "--disable-freetype-bundling"
1738 "--disable-warnings-as-errors"
1739 "--disable-hotspot-gtest"
1740 "--with-giflib=system"
1741 "--with-libjpeg=system"
1742 "--with-native-debug-symbols=zipped"
1743 (string-append "--prefix=" (assoc-ref outputs "out")))))
1744 (add-after 'unpack 'disable-warnings-as-errors
1745 (lambda _
1746 ;; It looks like the "--disable-warnings-as-errors" option of
1747 ;; the 'configure' phase is not working.
1748 (substitute* "make/autoconf/generated-configure.sh"
1749 (("-Werror") ""))))))
1750 ((#:disallowed-references _ '())
1751 `(,(gexp-input openjdk9)
1752 ,(gexp-input openjdk9 "jdk")))))
1753 (native-inputs
1754 `(("openjdk9" ,openjdk9)
1755 ("openjdk9:jdk" ,openjdk9 "jdk")
1756 ("[email protected]" ,gnu-make-4.2)
1757 ("unzip" ,unzip)
1758 ("which" ,which)
1759 ("zip" ,zip)))))
1760
1761(define-public openjdk11
1762 (package
1763 (name "openjdk")
1764 (version "11.0.15")
1765 (source (origin
1766 (method url-fetch)
1767 (uri (string-append "https://openjdk-sources.osci.io/openjdk11/openjdk-"
1768 version "-ga.tar.xz"))
1769 (file-name (string-append name "-" version ".tar.bz2"))
1770 (sha256
1771 (base32
1772 "0di91nnms2iq1svgq72r5y17am17r4vh2lq43k0bkcwpc84d6nd8"))
1773 (modules '((guix build utils)))
1774 (snippet
1775 '(for-each delete-file (find-files "." ".*.(bin|exe|jar)$")))))
1776 (build-system gnu-build-system)
1777 (outputs '("out" "jdk" "doc"))
1778 (arguments
1779 (list
1780 #:modules `((guix build gnu-build-system)
1781 (guix build utils)
1782 (ice-9 match)
1783 (srfi srfi-1)
1784 (srfi srfi-26))
1785 #:disallowed-references (list (gexp-input openjdk10)
1786 (gexp-input openjdk10 "jdk"))
1787
1788 #:tests? #f ; requires jtreg
1789 ;; TODO package jtreg
1790 #:configure-flags
1791 #~(list
1792 ;; Add flags for compilation with gcc >= 10.
1793 #$(string-append "--with-extra-cflags=-fcommon"
1794 " -fno-delete-null-pointer-checks"
1795 " -fno-lifetime-dse")
1796 ;; Otherwise, the '--enable-fast-install' causes an error.
1797 "--disable-option-checking"
1798 "--disable-warnings-as-errors"
1799 ;; Make validate-runpath pass (see:
1800 ;; http://issues.guix.info/issue/32894).
1801 "--with-native-debug-symbols=zipped"
1802 ;; Do not use the bundled libraries.
1803 "--with-giflib=system"
1804 "--with-lcms=system"
1805 "--with-libjpeg=system"
1806 "--with-libpng=system"
1807 "--with-version-pre="
1808 ;; Allow the build system to locate the system freetype.
1809 (string-append "--with-freetype-include="
1810 #$(this-package-input "freetype") "/include")
1811 (string-append "--with-freetype-lib="
1812 #$(this-package-input "freetype") "/lib"))
1813 #:phases
1814 #~(modify-phases %standard-phases
1815 (add-after 'patch-source-shebangs 'fix-java-shebangs
1816 (lambda _
1817 ;; This file was "fixed" by patch-source-shebangs, but it requires
1818 ;; this exact first line.
1819 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1820 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1821 (add-after 'unpack 'patch-jni-libs
1822 ;; Hardcode dynamically loaded libraries.
1823 (lambda _
1824 (define remove
1825 (@ (srfi srfi-1) remove))
1826
1827 (define (icedtea-or-openjdk? path)
1828 (or (string-contains path "openjdk")
1829 (string-contains path "icedtea")))
1830
1831 (let* ((library-path (remove icedtea-or-openjdk?
1832 (search-path-as-string->list
1833 (getenv "LIBRARY_PATH"))))
1834 (find-library (lambda (name)
1835 (or (search-path
1836 library-path
1837 (string-append "lib" name ".so"))
1838 (string-append "lib" name ".so")))))
1839 (for-each
1840 (lambda (file)
1841 (catch 'decoding-error
1842 (lambda ()
1843 (substitute* file
1844 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1845 _ name version)
1846 (string-append "\"" (find-library name) "\""))
1847 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1848 (string-append "\"" (find-library name) "\""))))
1849 (lambda _
1850 ;; Those are safe to skip.
1851 (format (current-error-port)
1852 "warning: failed to substitute: ~a~%"
1853 file))))
1854 (find-files "."
1855 "\\.c$|\\.h$")))))
1856 (add-before 'build 'write-source-revision-file
1857 (lambda _
1858 (with-output-to-file ".src-rev"
1859 (lambda _
1860 (display #$version)))))
1861 (replace 'build
1862 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
1863 (apply invoke "make" "all"
1864 `(,@(if parallel-build?
1865 (list (string-append "JOBS="
1866 (number->string (parallel-job-count))))
1867 '())
1868 ,@make-flags))))
1869 ;; jdk 11 does not build jre by default any more; so explicitly build
1870 ;; it (see:
1871 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356).
1872 (add-after 'build 'build-jre
1873 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
1874 (apply invoke "make" "legacy-jre-image"
1875 `(,@(if parallel-build?
1876 (list (string-append "JOBS="
1877 (number->string (parallel-job-count))))
1878 '())
1879 ,@make-flags))))
1880 (replace 'install
1881 (lambda _
1882 (let ((images (car (find-files "build" ".*-server-release"
1883 #:directories? #t))))
1884 (copy-recursively (string-append images "/images/jdk")
1885 #$output:jdk)
1886 (copy-recursively (string-append images "/images/jre")
1887 #$output)
1888 (copy-recursively (string-append images "/images/docs")
1889 #$output:doc))))
1890 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1891 ;; But that shared object is located in the server/ folder, so it
1892 ;; cannot be found. This phase creates a symbolic link in the
1893 ;; lib/ folder so that the other libraries can find it.
1894 ;;
1895 ;; See:
1896 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1897 ;;
1898 ;; FIXME: Find the bug in the build system, so that this symlink is
1899 ;; not needed.
1900 (add-after 'install 'install-libjvm
1901 (lambda _
1902 (let ((lib-out (string-append #$output "/lib"))
1903 (lib-jdk (string-append #$output:jdk "/lib")))
1904 (symlink (string-append lib-jdk "/server/libjvm.so")
1905 (string-append lib-jdk "/libjvm.so"))
1906 (symlink (string-append lib-out "/server/libjvm.so")
1907 (string-append lib-out "/libjvm.so")))))
1908 (add-after 'install 'strip-character-data-timestamps
1909 (lambda _
1910 (let ((archive (string-append #$output:jdk "/lib/src.zip"))
1911 (dir (mkdtemp "zip-contents.XXXXXX")))
1912 (with-directory-excursion dir
1913 (invoke "unzip" archive))
1914 (delete-file archive)
1915 (with-directory-excursion dir
1916 (let ((char-data-files (find-files "." "CharacterData.*")))
1917 (for-each (lambda (file)
1918 (substitute* file
1919 (((string-append "This file was generated "
1920 "AUTOMATICALLY from a template "
1921 "file.*"))
1922 (string-append "This file was generated "
1923 "AUTOMATICALLY from a template "
1924 "file"))))
1925 char-data-files)))
1926 (with-directory-excursion dir
1927 (let ((files (find-files "." ".*" #:directories? #t)))
1928 (apply invoke "zip" "-0" "-X" archive files))))))
1929 (add-after 'strip-character-data-timestamps 'remove-extraneous-files
1930 (lambda* (#:key outputs #:allow-other-keys)
1931 ;; Remove the *.diz and src.zip files for space considerations.
1932 ;; The former are compressed debuginfo files not typically
1933 ;; shipped with Java distributions, while the later corresponds
1934 ;; to Java core API source files.
1935 (for-each delete-file
1936 (append-map (cut find-files <> "(^src\\.zip|\\.diz)$")
1937 (map (match-lambda
1938 ((name . dir)
1939 dir))
1940 outputs)))))
1941 (add-after 'remove-diz-file 'strip-archive-timestamps
1942 (lambda _
1943 (use-modules (ice-9 binary-ports)
1944 (rnrs bytevectors))
1945 (letrec ((repack-archive
1946 (lambda (archive)
1947 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1948 (with-directory-excursion dir
1949 (invoke "unzip" archive))
1950 (delete-file archive)
1951 (for-each (compose repack-archive canonicalize-path)
1952 (find-files dir "(ct.sym|\\.jar)$"))
1953 (let ((reset-file-timestamp
1954 (lambda (file)
1955 (let ((s (lstat file)))
1956 (unless (eq? (stat:type s) 'symlink)
1957 (format #t "reset ~a~%" file)
1958 (utime file 0 0 0 0))))))
1959 (for-each reset-file-timestamp
1960 (find-files dir #:directories? #t)))
1961 (with-directory-excursion dir
1962 (let ((files (find-files "." ".*" #:directories? #t)))
1963 (apply invoke "zip" "-0" "-X" archive files)))))))
1964 (for-each repack-archive
1965 (find-files #$output:doc "\\.zip$"))
1966 (for-each repack-archive
1967 (find-files #$output:jdk "\\.(zip|jar)$"))
1968 (repack-archive (string-append #$output:jdk "/lib/ct.sym"))
1969 (let ((repack-jmod
1970 (lambda (file-name)
1971 (call-with-input-file file-name
1972 (lambda (file)
1973 (let ((header #vu8(#x4a #x4d #x01 #x00)))
1974 (if (equal? (get-bytevector-n
1975 file (bytevector-length header))
1976 header)
1977 (let* ((header-length (bytevector-length header))
1978 (temp-file (mkstemp!
1979 (string-copy
1980 "temp-file.XXXXXX")))
1981 (temp-filename (port-filename temp-file))
1982 (content-length
1983 (- (stat:size (stat file))
1984 header-length)))
1985 (sendfile temp-file file content-length header-length)
1986 (delete-file file-name)
1987 (close-port temp-file)
1988 (repack-archive (canonicalize-path temp-filename))
1989 (call-with-output-file file-name
1990 (lambda (file)
1991 (put-bytevector file header)
1992 (call-with-input-file temp-filename
1993 (lambda (temp-file)
1994 (sendfile
1995 file temp-file
1996 (stat:size (stat temp-file)) 0)))))))))))))
1997 (for-each repack-jmod
1998 (find-files #$output:jdk "\\.jmod$"))))))
1999 (add-after 'install 'remove-timestamp-from-api-summary
2000 (lambda _
2001 (substitute* (string-append #$output:doc
2002 "/api/overview-summary.html")
2003 (("Generated by javadoc \\(11-internal\\).*$")
2004 "Generated by javadoc (11-internal) -->\n")))))))
2005 (inputs
2006 (list alsa-lib
2007 cups
2008 fontconfig
2009 freetype
2010 giflib
2011 lcms
2012 libjpeg-turbo
2013 libpng
2014 libx11
2015 libxext
2016 libxrandr
2017 libxrender
2018 libxt
2019 libxtst))
2020 (native-inputs
2021 (list autoconf
2022 openjdk10
2023 `(,openjdk10 "jdk")
2024 gnu-make-4.2
2025 pkg-config
2026 unzip
2027 which
2028 zip))
2029 (home-page "https://openjdk.java.net/projects/jdk/11/")
2030 (synopsis "Java development kit")
2031 (description
2032 "This package provides the Java development kit OpenJDK.")
2033 (license license:gpl2+)))
2034
2035(define-syntax make-openjdk
2036 ;; Return an OpenJDK package at VERSION with checksum HASH, using BOOTSTRAP,
2037 ;; the bootstrap package. One or more FIELD can be provided to further
2038 ;; refine the package definition; for convenience, the BASE, NAME and
2039 ;; VERSION are defined in their scope.
2040 (lambda (x)
2041 (syntax-case x ()
2042 ((_ bootstrap version* hash field ...)
2043 (with-syntax ((base (datum->syntax x 'base))
2044 (name (datum->syntax x 'name))
2045 (version (datum->syntax x 'version)))
2046 #'(let ((base (package
2047 (inherit bootstrap)
2048 (name "openjdk")
2049 (version version*)
2050 (source
2051 (origin
2052 (inherit (package-source bootstrap))
2053 (method git-fetch)
2054 (uri (git-reference
2055 (url (format
2056 #f "https://github.com/openjdk/jdk~au"
2057 (version-major version*)))
2058 (commit (string-append "jdk-" version*
2059 "-ga"))))
2060 (file-name (git-file-name name version))
2061 (sha256 (base32 hash))))
2062 (native-inputs
2063 (modify-inputs (package-native-inputs bootstrap)
2064 (replace "openjdk" bootstrap)))
2065 (home-page (string-append
2066 "https://openjdk.java.net/projects/jdk/"
2067 (version-major version)))))
2068 (name "openjdk")
2069 (version version*))
2070 (package
2071 (inherit base)
2072 field
2073 ...)))))))
2074
2075(define-public openjdk12
2076 (make-openjdk
2077 openjdk11 "12.33" "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"
2078 (source
2079 (origin
2080 (method url-fetch)
2081 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2082 (file-name (string-append name "-" version ".tar.bz2"))
2083 (sha256
2084 (base32
2085 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2086 (modules '((guix build utils)))
2087 (snippet
2088 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))))
2089 (arguments
2090 (substitute-keyword-arguments (package-arguments openjdk11)
2091 ((#:phases phases)
2092 #~(modify-phases #$phases
2093 (replace 'fix-java-shebangs
2094 (lambda _
2095 ;; 'blocked' was renamed to 'blacklisted' in this version for
2096 ;; some reason.
2097 (substitute* "make/data/blacklistedcertsconverter/\
2098blacklisted.certs.pem"
2099 (("^#!.*")
2100 "#! java BlacklistedCertsConverter SHA-256\n"))))))))))
2101
2102(define-public openjdk13
2103 (make-openjdk openjdk12 "13.0.7"
2104 "0wrrr0d7lz1v8qqm752mn4gz5l2vpl2kmx4ac3ysvk4mljc924hp"))
2105
2106(define-public openjdk14
2107 (make-openjdk
2108 openjdk13 "14.0.2"
2109 "07k9bsbxwyf2z2n50z96nvhsdai916mxdxcr5lm44jz7f6xrwfq6"
2110 (source (origin
2111 (inherit (package-source base))
2112 (snippet ;override snippet
2113 '(begin
2114 ;; The m4 macro uses 'help' to search for builtins, which is
2115 ;; not available in bash-minimal
2116 (substitute* "make/autoconf/basics.m4"
2117 (("if help") "if command -v"))
2118 (for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))))))))
2119
2120(define-public openjdk15
2121 (make-openjdk
2122 openjdk14 "15.0.3"
2123 "168cr08nywp0q3vyj8njkhsmmnyd8rz9r58hk4xhzdzc6bdfkl1i"
2124 (source (origin
2125 (inherit (package-source base))
2126 (modules '())
2127 (snippet #f)
2128 (patches
2129 (search-patches "openjdk-15-xcursor-no-dynamic.patch"))))
2130 (inputs
2131 (modify-inputs (package-inputs base)
2132 (append libxcursor))) ;for our patch to work
2133 (native-inputs
2134 (modify-inputs (package-native-inputs base)
2135 (delete "make" ;remove old gnu-make-4.2
2136 "openjdk") ;to remove non-jdk output
2137 (append `(,openjdk14 "jdk"))))))
2138
2139(define-public openjdk16
2140 (make-openjdk openjdk15 "16.0.1"
2141 "1ggddsbsar4dj2fycfqqqagqil7prhb30afvq6933rz7pa9apm2f"))
2142
2143(define-public openjdk17
2144 (make-openjdk
2145 openjdk16 "17.0.3"
2146 "0slmd6ww947gxpp4yr2wmr5z975bg86qh7zqfp2radf2q77ql65b"
2147 (arguments
2148 (substitute-keyword-arguments (package-arguments openjdk16)
2149 ((#:phases phases)
2150 #~(modify-phases #$phases
2151 (replace 'fix-java-shebangs
2152 (lambda _
2153 ;; 'blacklisted' was renamed back to 'blocked'.
2154 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
2155 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))))
2156
2157(define-public openjdk18
2158 (make-openjdk openjdk17 "18"
2159 "1bv6bdhkmwvn10l0xy8yi9xibds640hs5zsvx0jp7wrxa3qw4qy8"))
2160
2161;;; Convenience alias to point to the latest version of OpenJDK.
2162(define-public openjdk openjdk18)
2163
2164(define-public icedtea icedtea-8)
2165
2166
2167(define-public ant/java8
2168 (package (inherit ant-bootstrap)
2169 (name "ant")
2170 (version "1.10.10")
2171 (source (origin
2172 (method url-fetch)
2173 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2174 version "-src.tar.gz"))
2175 (sha256
2176 (base32
2177 "1dhkk9ajc378cln6sj9q0ya8bl9dpyji5xcrl1zq41zx1k6j54g5"))
2178 (modules '((guix build utils)))
2179 (snippet
2180 '(begin
2181 (for-each delete-file
2182 (find-files "lib/optional" "\\.jar$"))
2183 #t))))
2184 (arguments
2185 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2186 ((#:phases phases)
2187 `(modify-phases ,phases
2188 (delete 'define-java-environment-variables)
2189 (add-after 'unpack 'remove-scripts
2190 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2191 ;; wrappers.
2192 (lambda _
2193 (for-each delete-file
2194 (find-files "src/script"
2195 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2196 #t))
2197 (replace 'build
2198 (lambda* (#:key inputs outputs #:allow-other-keys)
2199 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2200
2201 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2202 ;; Ant to build. This is necessary in addition to disabling the
2203 ;; "check" phase, because the dependency on "test-jar" would always
2204 ;; result in the tests to be run.
2205 (substitute* "build.xml"
2206 (("depends=\"jars,test-jar") "depends=\"jars"))
2207 (invoke "bash" "bootstrap.sh"
2208 (string-append "-Ddist.dir="
2209 (assoc-ref outputs "out")))))))))
2210 (native-inputs
2211 `(("jdk" ,icedtea-8 "jdk")
2212 ("zip" ,zip)
2213 ("unzip" ,unzip)))))
2214
2215;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2216;; requires Java 8.
2217(define-public ant
2218 (package (inherit ant/java8)
2219 (version "1.9.15")
2220 (source (origin
2221 (method url-fetch)
2222 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2223 version "-src.tar.gz"))
2224 (sha256
2225 (base32
2226 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2227 (native-inputs
2228 `(("jdk" ,icedtea-7 "jdk")
2229 ("zip" ,zip)
2230 ("unzip" ,unzip)))))
2231
2232(define-public ant-apache-bcel
2233 (package
2234 (inherit ant/java8)
2235 (name "ant-apache-bcel")
2236 (arguments
2237 (substitute-keyword-arguments (package-arguments ant/java8)
2238 ((#:phases phases)
2239 `(modify-phases ,phases
2240 (add-after 'unpack 'link-bcel
2241 (lambda* (#:key inputs #:allow-other-keys)
2242 (for-each (lambda (file)
2243 (symlink file
2244 (string-append "lib/optional/"
2245 (basename file))))
2246 (find-files (assoc-ref inputs "java-commons-bcel")
2247 "\\.jar$"))
2248 #t))
2249 (add-after 'build 'install
2250 (lambda* (#:key outputs #:allow-other-keys)
2251 (let* ((out (assoc-ref outputs "out"))
2252 (share (string-append out "/share/java"))
2253 (bin (string-append out "/bin"))
2254 (lib (string-append out "/lib")))
2255 (mkdir-p share)
2256 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2257 (delete-file-recursively bin)
2258 (delete-file-recursively lib)
2259 #t)))))))
2260 (inputs
2261 (modify-inputs (package-inputs ant/java8)
2262 (prepend java-commons-bcel)))))
2263
2264(define-public ant-junit
2265 (package
2266 (inherit ant/java8)
2267 (name "ant-junit")
2268 (arguments
2269 (substitute-keyword-arguments (package-arguments ant/java8)
2270 ((#:phases phases)
2271 `(modify-phases ,phases
2272 (add-after 'unpack 'link-junit
2273 (lambda* (#:key inputs #:allow-other-keys)
2274 (for-each (lambda (file)
2275 (symlink file
2276 (string-append "lib/optional/"
2277 (basename file))))
2278 (find-files (assoc-ref inputs "java-junit")
2279 "\\.jar$"))
2280 #t))
2281 (add-after 'build 'install
2282 (lambda* (#:key outputs #:allow-other-keys)
2283 (let* ((out (assoc-ref outputs "out"))
2284 (share (string-append out "/share/java"))
2285 (bin (string-append out "/bin"))
2286 (lib (string-append out "/lib")))
2287 (mkdir-p share)
2288 (install-file (string-append lib "/ant-junit.jar") share)
2289 (delete-file-recursively bin)
2290 (delete-file-recursively lib)
2291 #t)))))))
2292 (inputs
2293 (modify-inputs (package-inputs ant/java8)
2294 (prepend java-junit)))))
2295
2296(define-public libantlr3c
2297 (package
2298 (name "libantlr3c")
2299 (version "3.4")
2300 (source
2301 (origin
2302 (method url-fetch)
2303 (uri
2304 (string-append "https://www.antlr3.org/download/C/"
2305 name "-" version ".tar.gz"))
2306 (sha256
2307 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
2308 (build-system gnu-build-system)
2309 (arguments
2310 `(#:configure-flags (list "--enable-debuginfo"
2311 "--disable-static"
2312 ,@(if (target-64bit?)
2313 `("--enable-64bit")
2314 '()))))
2315 (synopsis "ANTLR C Library")
2316 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
2317Tool for Language Recognition v3).")
2318 (home-page "https://www.antlr3.org/")
2319 (license license:bsd-3)))
2320
2321(define-public drip
2322 ;; Last release is from 2014, with a few important commits afterwards.
2323 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
2324 (package
2325 (name "drip")
2326 (version (git-version "0.2.4" "1" commit))
2327 (source (origin
2328 (method git-fetch)
2329 (uri (git-reference
2330 (url "https://github.com/ninjudd/drip")
2331 (commit commit)))
2332 (file-name (git-file-name name version))
2333 (sha256
2334 (base32
2335 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
2336 (build-system gnu-build-system)
2337 (native-inputs
2338 `(("jdk" ,icedtea "jdk")))
2339 (arguments
2340 `(#:tests? #f ; No tests.
2341 #:phases
2342 (modify-phases %standard-phases
2343 (delete 'configure)
2344 (add-before 'install 'fix-wrapper
2345 (lambda* (#:key inputs #:allow-other-keys)
2346 (let ((jps (search-input-file inputs "/bin/jps")))
2347 (substitute* "bin/drip"
2348 (("jps") jps)
2349 (("brew update && brew upgrade drip") "guix pull && guix install drip")
2350 ;; No need to make:
2351 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
2352 ;; No need to include source:
2353 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
2354 "true"))
2355 #t)))
2356 (replace 'install
2357 (lambda* (#:key outputs #:allow-other-keys)
2358 (let* ((out (assoc-ref outputs "out"))
2359 (bin (string-append out "/bin"))
2360 (share (string-append out "/share/drip")))
2361 (mkdir-p bin)
2362 (for-each
2363 (lambda (file)
2364 (install-file (string-append "bin/" file) bin))
2365 '("drip" "drip_daemon" "drip_proxy"))
2366 (install-file "drip.jar" share)
2367 (substitute* (string-append bin "/drip")
2368 (("drip_dir=\\$bin_dir/..")
2369 (string-append "drip_dir=" share)))
2370 #t))))))
2371 (home-page "https://github.com/ninjudd/drip")
2372 (synopsis "Faster Java Virtual Machine launching")
2373 (description "Drip is a launcher for the Java Virtual Machine that
2374provides much faster startup times than the @command{java} command. The @command{drip}
2375script is intended to be a drop-in replacement for the @command{java} command,
2376only faster.")
2377 (license license:epl1.0))))
2378
2379(define-public java-openjfx-build
2380 (package
2381 (name "java-openjfx-build")
2382 ;; This is a java-8 version
2383 (version "8.202")
2384 (source (origin
2385 (method hg-fetch)
2386 (uri (hg-reference
2387 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2388 (changeset (string-append
2389 (string-join (string-split version #\.) "u")
2390 "-ga"))))
2391 (file-name (string-append name "-" version "-checkout"))
2392 (modules '((guix build utils)))
2393 (snippet
2394 '(begin
2395 ;; Delete included gradle jar
2396 (delete-file-recursively "gradle/wrapper")
2397 #t))
2398 (sha256
2399 (base32
2400 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2401 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2402 (build-system ant-build-system)
2403 (arguments
2404 `(#:jar-name "java-openjfx.jar"
2405 #:source-dir "buildSrc/src/main/java"
2406 #:test-dir "buildSrc/src/test"
2407 #:phases
2408 (modify-phases %standard-phases
2409 (add-before 'configure 'generate-jsl-parser
2410 (lambda _
2411 (invoke "antlr3" "-o"
2412 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2413 "buildSrc/src/main/antlr/JSL.g"))))))
2414 (inputs
2415 (list antlr3 java-stringtemplate))
2416 (native-inputs
2417 (list java-junit java-hamcrest-core))
2418 (home-page "https://openjfx.io")
2419 (synopsis "Graphical application toolkit in Java")
2420 (description "OpenJFX is a client application platform for desktop,
2421mobile and embedded systems built on Java. Its goal is to produce a
2422modern, efficient, and fully featured toolkit for developing rich client
2423applications. This package contains base classes for the OpenJFX
2424distribution and helper classes for building other parts of the
2425distribution.")
2426 (license license:gpl2))) ;gpl2 only, with classpath exception
2427
2428(define-public java-openjfx-base
2429 (package (inherit java-openjfx-build)
2430 (name "java-openjfx-base")
2431 (arguments
2432 `(#:jar-name "java-openjfx-base.jar"
2433 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2434 #:test-dir "modules/base/src/test"
2435 #:phases
2436 (modify-phases %standard-phases
2437 (add-before 'check 'remove-empty-file
2438 (lambda _
2439 (with-directory-excursion "modules/base/src/test/java"
2440 ;; These files are completely commented, but junit expects them to
2441 ;; contain a class, so tests fail.
2442 (delete-file
2443 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2444 (delete-file
2445 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2446 (delete-file "javafx/beans/property/PropertiesTest.java")
2447 (delete-file
2448 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2449 ;; This one fails
2450 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2451 #t)))))
2452 (propagated-inputs
2453 (list java-openjfx-build))
2454 (description "OpenJFX is a client application platform for desktop,
2455mobile and embedded systems built on Java. Its goal is to produce a
2456modern, efficient, and fully featured toolkit for developing rich client
2457applications. This package contains base classes for the OpenJFX
2458distribution.")))
2459
2460(define-public java-openjfx-graphics
2461 (package (inherit java-openjfx-build)
2462 (name "java-openjfx-graphics")
2463 (arguments
2464 `(#:jar-name "java-openjfx-graphics.jar"
2465 #:source-dir "modules/graphics/src/main/java"
2466 #:tests? #f; require X
2467 #:test-dir "modules/graphics/src/test"
2468 #:phases
2469 (modify-phases %standard-phases
2470 (add-after 'unpack 'copy-missing-file
2471 (lambda* (#:key inputs #:allow-other-keys)
2472 (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
2473 (copy-file (assoc-ref inputs "JNativeSurface.c") target)
2474 ;; XXX: looks like the missing file we found isn't *quite*
2475 ;; compatible...
2476 (substitute* target
2477 (("case TYPE_INT_ARGB:") "")))))
2478 (add-after 'build 'build-native
2479 (lambda* (#:key inputs outputs #:allow-other-keys)
2480 (let ((jdk (assoc-ref inputs "jdk"))
2481 (class-file->class-name
2482 (lambda (class-file)
2483 (string-map (lambda (c)
2484 (if (char=? c #\/) #\. c))
2485 (string-drop-right class-file
2486 (string-length ".class"))))))
2487 (setenv "CPPFLAGS"
2488 (string-append "-DINLINE=inline "
2489 "-DLINUX "
2490 "-I" jdk "/include "
2491 "-I" jdk "/include/linux "
2492 "-I " (getcwd) "/build/classes/include "
2493 "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
2494
2495 ;; Instructions have been adapted from buildSrc/linux.gradle
2496 (with-directory-excursion "build/classes"
2497 ;; Build prism
2498 (mkdir-p "include")
2499
2500 ;; Generate headers for prism
2501 (apply invoke "javah" "-d" "include" "-cp" "."
2502 (map class-file->class-name
2503 (append (find-files "com/sun/prism/impl" "\\.class$")
2504 (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
2505
2506 ;; ...then for prism_sw
2507 (apply invoke "javah" "-d" "include" "-cp" "."
2508 (map class-file->class-name
2509 (find-files "com/sun/pisces" "\\.class$")))
2510
2511 ;; ...and for prism_es2
2512 (apply invoke "javah" "-d" "include" "-cp" "."
2513 (map class-file->class-name
2514 (find-files "com/sun/prism/es2" "\\.class$")))))
2515
2516 (with-directory-excursion "netbeans/native-prism"
2517 (invoke "make" "CONF=Release"))
2518 (with-directory-excursion "netbeans/native-prism-sw"
2519 (invoke "make" "CONF=Release"))
2520 ;; TODO: This fails due to unknown EGL procedure names
2521 #;
2522 (with-directory-excursion "netbeans/native-prism-es2"
2523 (invoke "make" "CONF=Release"))
2524
2525 (let* ((out (assoc-ref outputs "out"))
2526 (dir ,(match (%current-system)
2527 ("i686-linux"
2528 "i386")
2529 ((or "armhf-linux" "aarch64-linux")
2530 "arm")
2531 ((or "x86_64-linux")
2532 "amd64")
2533 (_ "unknown")))
2534 (target (string-append out "/share/" dir "/")))
2535 (mkdir-p target)
2536 (for-each (lambda (file)
2537 (let ((new-name
2538 (string-append "lib"
2539 (string-map
2540 (lambda (c)
2541 (if (char=? c #\-) #\_ c))
2542 (string-drop (basename file)
2543 (string-length "libnative-"))))))
2544 (copy-file file
2545 (string-append target new-name))))
2546 (find-files "netbeans" "\\.so$"))))))))
2547 (propagated-inputs
2548 (list java-openjfx-base java-swt))
2549 ;; XXX: for unknown reasons
2550 ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
2551 ;; in this revision.
2552 (native-inputs
2553 `(("JNativeSurface.c"
2554 ,(origin
2555 (method url-fetch)
2556 (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
2557/modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
2558 (sha256
2559 (base32
2560 "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
2561 (description "OpenJFX is a client application platform for desktop,
2562mobile and embedded systems built on Java. Its goal is to produce a
2563modern, efficient, and fully featured toolkit for developing rich client
2564applications. This package contains graphics-related classes for the
2565OpenJFX distribution.")))
2566
2567(define-public java-openjfx-media
2568 (package (inherit java-openjfx-build)
2569 (name "java-openjfx-media")
2570 (propagated-inputs
2571 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2572 (arguments
2573 `(#:jar-name "java-openjfx-media.jar"
2574 #:source-dir "modules/media/src/main/java"
2575 #:tests? #f)); no tests
2576 (description "OpenJFX is a client application platform for desktop,
2577mobile and embedded systems built on Java. Its goal is to produce a
2578modern, efficient, and fully featured toolkit for developing rich client
2579applications. This package contains media-related classes for the
2580OpenJFX distribution.")))
2581
2582(define-public java-openjfx-controls
2583 (package (inherit java-openjfx-build)
2584 (name "java-openjfx-controls")
2585 (propagated-inputs
2586 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2587 (arguments
2588 `(#:jar-name "java-openjfx-controls.jar"
2589 #:source-dir "modules/controls/src/main/java"
2590 #:test-dir "modules/controls/src/test"
2591 ;; TODO: tests require com.sun.javafx.pgstub,
2592 ;; javafx.collections.MockSetObserver, and
2593 ;; com.sun.javafx.binding.ExpressionHelperUtility
2594 #:tests? #false
2595 #:phases
2596 (modify-phases %standard-phases
2597 (add-after 'unpack 'copy-resources
2598 (lambda _
2599 (copy-recursively "modules/controls/src/test/resources"
2600 "build/test-classes")
2601 (copy-recursively "modules/controls/src/main/resources"
2602 "build/classes"))))))
2603 (description "OpenJFX is a client application platform for desktop,
2604mobile and embedded systems built on Java. Its goal is to produce a
2605modern, efficient, and fully featured toolkit for developing rich client
2606applications. This package contains UI control classes for the
2607OpenJFX distribution.")))
2608
2609(define-public javacc-4
2610 (package
2611 (name "javacc")
2612 (version "4.1")
2613 (source (origin
2614 (method git-fetch)
2615 (uri (git-reference
2616 (url "https://github.com/javacc/javacc")
2617 (commit "release_41")))
2618 (file-name (string-append "javacc-" version "-checkout"))
2619 (sha256
2620 (base32
2621 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2622 (modules '((guix build utils)))
2623 ;; delete bundled jars
2624 (snippet '(begin (delete-file-recursively "lib") #t))))
2625 (build-system ant-build-system)
2626 ;; Tests fail with
2627 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2628 ;; JAVACODE failed
2629 (arguments
2630 `(#:tests? #f
2631 #:phases
2632 (modify-phases %standard-phases
2633 ;; Delete tests to avoid build failure (we don't run them anyway).
2634 (add-after 'unpack 'delete-tests
2635 (lambda _
2636 (for-each delete-file
2637 '("src/org/javacc/JavaCCTestCase.java"
2638 "src/org/javacc/parser/ExpansionTest.java"
2639 "src/org/javacc/parser/OptionsTest.java"
2640 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2641 (for-each delete-file-recursively
2642 '("src/org/javacc/parser/test"
2643 "src/org/javacc/jjdoc/test"))
2644 #t))
2645 (replace 'install (install-jars "bin/lib")))))
2646 (home-page "https://javacc.org/")
2647 (synopsis "Java parser generator")
2648 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2649generator for use with Java applications. A parser generator is a tool that
2650reads a grammar specification and converts it to a Java program that can
2651recognize matches to the grammar. In addition to the parser generator itself,
2652JavaCC provides other standard capabilities related to parser generation such
2653as tree building (via a tool called JJTree included with JavaCC), actions,
2654debugging, etc.")
2655 (license license:bsd-3)))
2656
2657;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2658;; in the bootstrap/ directory.
2659(define-public javacc-3
2660 (package
2661 (inherit javacc-4)
2662 (version "3.2")
2663 (source (origin
2664 (method git-fetch)
2665 (uri (git-reference
2666 (url "https://github.com/javacc/javacc")
2667 (commit "release_32")))
2668 (file-name (string-append "javacc-" version "-checkout"))
2669 (sha256
2670 (base32
2671 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2672 (arguments
2673 `(#:tests? #f
2674 #:phases
2675 (modify-phases %standard-phases
2676 (add-before 'build 'set-java-version
2677 (lambda _
2678 (for-each
2679 (lambda (file)
2680 (substitute* file
2681 (("debug=") "source=\"1.4\" debug=")))
2682 (find-files "." "build.xml"))
2683 #t))
2684 (replace 'install (install-jars "bin/lib")))))))
2685
2686(define-public javacc
2687 (package
2688 (inherit javacc-4)
2689 (version "7.0.4")
2690 (source
2691 (origin
2692 (method git-fetch)
2693 (uri (git-reference
2694 (url "https://github.com/javacc/javacc")
2695 (commit version)))
2696 (file-name (git-file-name "javacc" version))
2697 (sha256
2698 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2699 (modules '((guix build utils)))
2700 ;; Delete bundled jars.
2701 (snippet '(begin (for-each delete-file-recursively
2702 '("bootstrap" "lib"))
2703 #t))))
2704 (arguments
2705 `(#:make-flags ; bootstrap from javacc-4
2706 ,#~(list (string-append "-Dbootstrap-jar="
2707 #$(this-package-native-input "javacc")
2708 "/share/java/javacc.jar"))
2709 #:test-target "test"
2710 #:phases
2711 (modify-phases %standard-phases
2712 (replace 'install (install-jars "target"))
2713 (add-after 'install 'install-bin
2714 (lambda* (#:key outputs inputs #:allow-other-keys)
2715 (let* ((out (assoc-ref outputs "out"))
2716 (dir (string-append out "/share/java"))
2717 (bin (string-append out "/bin"))
2718 (javacc (string-append bin "/javacc")))
2719 (mkdir-p bin)
2720 (with-output-to-file javacc
2721 (lambda _
2722 (display
2723 (string-append "#!/bin/sh\n"
2724 (assoc-ref inputs "jdk") "/bin/java"
2725 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2726 (chmod javacc #o755)
2727 ;; symlink to different names to affect the first argument and
2728 ;; change the behavior of the jar file.
2729 (symlink javacc (string-append bin "/jjdoc"))
2730 (symlink javacc (string-append bin "/jjtree"))
2731 #t))))))
2732
2733 (native-inputs
2734 (list javacc-4))))
2735
2736;; This is the last 3.x release of ECJ
2737(define-public java-ecj-3
2738 (package
2739 (name "java-ecj")
2740 (version "3.8.2")
2741 (source (origin
2742 (method url-fetch)
2743 (uri (string-append "http://archive.eclipse.org/eclipse/"
2744 "downloads/drops/R-" version
2745 "-201301310800/ecjsrc-" version ".jar"))
2746 (sha256
2747 (base32
2748 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2749 (build-system ant-build-system)
2750 (arguments
2751 `(#:tests? #f ; none included
2752 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2753 #:make-flags (list "-f" "src/build.xml")
2754 #:build-target "build"
2755 #:phases
2756 (modify-phases %standard-phases
2757 (add-after 'unpack 'fix-manifest
2758 (lambda _
2759 ;; Record the main class to make ecj executable.
2760 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2761 (lambda (in out)
2762 (display "Manifest-Version: 1.0
2763Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2764 out)))
2765 #t))
2766 (replace 'install (install-jars ".")))))
2767 (home-page "https://eclipse.org")
2768 (synopsis "Eclipse Java development tools core batch compiler")
2769 (description "This package provides the Eclipse Java core batch compiler.")
2770 (license license:epl1.0)))
2771
2772;; This is needed for java-cisd-args4j
2773(define-public java-ecj-3.5
2774 (package (inherit java-ecj-3)
2775 (version "3.5.1")
2776 (source (origin
2777 (method url-fetch/zipbomb)
2778 (uri (string-append "http://archive.eclipse.org/eclipse/"
2779 "downloads/drops/R-" version
2780 "-200909170800/ecjsrc-" version ".zip"))
2781 (sha256
2782 (base32
2783 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2784 (build-system ant-build-system)
2785 (arguments
2786 `(#:tests? #f ; none included
2787 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2788 #:build-target "build"
2789 #:phases
2790 (modify-phases %standard-phases
2791 (add-after 'unpack 'fix-manifest
2792 (lambda _
2793 ;; Record the main class to make ecj executable.
2794 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2795 (lambda (in out)
2796 (dump-port in out)
2797 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2798 out)))
2799 #t))
2800 (replace 'install (install-jars ".")))))
2801 (native-inputs
2802 (list unzip))))
2803
2804(define-public java-ecj
2805 (package (inherit java-ecj-3)
2806 (version "4.6.3")
2807 (source
2808 (origin
2809 (method url-fetch)
2810 (uri (string-append
2811 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2812 version
2813 "-201703010400/ecjsrc-"
2814 version
2815 ".jar"))
2816 (sha256
2817 (base32
2818 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2819 (arguments
2820 `(#:tests? #f ; none included
2821 #:build-target "build"
2822 #:phases
2823 (modify-phases %standard-phases
2824 (add-after 'unpack 'fix-build.xml
2825 (lambda _
2826 (substitute* "src/build.xml"
2827 (("^.*MANIFEST.*$")
2828 ""))
2829 #t))
2830 (add-after 'unpack 'fix-prop
2831 (lambda _
2832 (substitute* "src/build.xml"
2833 (("^.*properties.*$")
2834 "<include name=\"**/*.properties\"/>
2835 <include name=\"**/*.props\"/>"))
2836 #t))
2837 (add-before 'build 'chdir
2838 (lambda _
2839 (chdir "src")
2840 #t))
2841 (replace 'install (install-jars ".")))))))
2842
2843(define-public java-cisd-base
2844 (let ((revision 38938)
2845 (base-version "14.12.0"))
2846 (package
2847 (name "java-cisd-base")
2848 (version (string-append base-version "-" (number->string revision)))
2849 (source (origin
2850 (method svn-fetch)
2851 (uri (svn-reference
2852 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2853 "base/tags/release/"
2854 (version-major+minor base-version)
2855 ".x/" base-version "/base/"))
2856 (revision revision)))
2857 (file-name (string-append "java-cisd-base-" version "-checkout"))
2858 (sha256
2859 (base32
2860 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2861 (modules '((guix build utils)))
2862 (snippet
2863 '(begin
2864 ;; Delete included gradle jar
2865 (delete-file-recursively "gradle/wrapper")
2866 ;; Delete pre-built native libraries
2867 (delete-file-recursively "libs")
2868 #t))))
2869 (build-system ant-build-system)
2870 (arguments
2871 `(#:make-flags '("-file" "build/build.xml")
2872 #:test-target "jar-test"
2873 #:jdk ,icedtea-8
2874 #:phases
2875 (modify-phases %standard-phases
2876 (add-after 'unpack 'unpack-build-resources
2877 (lambda* (#:key inputs #:allow-other-keys)
2878 (copy-recursively (assoc-ref inputs "build-resources")
2879 "../build_resources")
2880 #t))
2881 (add-after 'unpack-build-resources 'fix-dependencies
2882 (lambda* (#:key inputs #:allow-other-keys)
2883 (substitute* "build/build.xml"
2884 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2885 (search-input-file inputs
2886 "/share/java/java-testng.jar"))
2887 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2888 (search-input-file inputs
2889 (string-append
2890 "/share/java/commons-lang-"
2891 ,(package-version java-commons-lang)
2892 ".jar")))
2893 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2894 (search-input-file inputs
2895 (string-append
2896 "/lib/m2/commons-io/commons-io/"
2897 ,(package-version java-commons-io)
2898 "/commons-io-"
2899 ,(package-version java-commons-io)
2900 ".jar")))
2901 ;; Remove dependency on svn
2902 (("<build-info.*") "")
2903 (("\\$\\{revision.number\\}")
2904 ,(number->string revision))
2905 (("\\$\\{version.number\\}") ,base-version))
2906 ;; Remove dependency on classycle
2907 (substitute* "../build_resources/ant/build-common.xml"
2908 (("<taskdef name=\"dependency-checker.*") "")
2909 (("classname=\"classycle.*") "")
2910 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2911 #t))
2912 ;; A few tests fail because of the lack of a proper /etc/groups and
2913 ;; /etc/passwd file in the build container.
2914 (add-after 'unpack 'disable-broken-tests
2915 (lambda _
2916 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2917 (("Unix.isOperational\\(\\)") "false"))
2918 #t))
2919 ;; These decorators are almost useless and pull in an unpackaged
2920 ;; dependency.
2921 (add-after 'unpack 'remove-useless-decorators
2922 (lambda _
2923 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2924 (("@Private") "")
2925 (("import ch.rinn.restrictions.Private;") ""))
2926 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2927 (("@Friend.*") "")
2928 (("import ch.rinn.restrictions.Friend;") ""))
2929 #t))
2930 (add-before 'configure 'build-native-code
2931 (lambda* (#:key inputs #:allow-other-keys)
2932 (let ((jdk (assoc-ref inputs "jdk"))
2933 (dir ,(match (%current-system)
2934 ("i686-linux"
2935 "i386-Linux")
2936 ((or "armhf-linux" "aarch64-linux")
2937 "arm-Linux")
2938 ((or "x86_64-linux")
2939 "amd64-Linux")
2940 (_ "unknown-Linux"))))
2941 (with-directory-excursion "source/c"
2942 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2943 (string-append "-I" jdk "/include")
2944 (string-append "-I" jdk "/include/linux")
2945 "-o" "libunix.so")
2946 (invoke "gcc" "-shared" "-O3" "-fPIC"
2947 "-DMACHINE_BYTE_ORDER=1"
2948 "copyCommon.c"
2949 "copyByteChar.c"
2950 "copyByteDouble.c"
2951 "copyByteFloat.c"
2952 "copyByteInt.c"
2953 "copyByteLong.c"
2954 "copyByteShort.c"
2955 (string-append "-I" jdk "/include")
2956 (string-append "-I" jdk "/include/linux")
2957 "-o" "libnativedata.so"))
2958 (install-file "source/c/libunix.so"
2959 (string-append "libs/native/unix/" dir))
2960 (install-file "source/c/libnativedata.so"
2961 (string-append "libs/native/nativedata/" dir))
2962 #t)))
2963 ;; In the "check" phase we only build the test executable.
2964 (add-after 'check 'run-tests
2965 (lambda _
2966 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2967 (delete-file "targets/dist/sis-base-test.jar")
2968 #t))
2969 (replace 'install (install-jars "targets/dist")))))
2970 (native-inputs
2971 `(("jdk" ,icedtea-8)
2972 ("java-commons-lang" ,java-commons-lang)
2973 ("java-commons-io" ,java-commons-io)
2974 ("java-testng" ,java-testng)
2975 ("build-resources"
2976 ,(origin
2977 (method svn-fetch)
2978 (uri (svn-reference
2979 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2980 "base/tags/release/"
2981 (version-major+minor base-version)
2982 ".x/" base-version
2983 "/build_resources/"))
2984 (revision revision)))
2985 (sha256
2986 (base32
2987 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2988 (home-page "http://svnsis.ethz.ch")
2989 (synopsis "Utility classes for libraries from ETH Zurich")
2990 (description "This library supplies some utility classes needed for
2991libraries from the SIS division at ETH Zurich like jHDF5.")
2992 ;; The C sources are under a non-copyleft license, which looks like a
2993 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2994 (license (list license:asl2.0
2995 (license:non-copyleft "file://source/c/COPYING"))))))
2996
2997(define-public java-cisd-args4j
2998 (let ((revision 39162)
2999 (base-version "9.11.2"))
3000 (package
3001 (name "java-cisd-args4j")
3002 (version (string-append base-version "-" (number->string revision)))
3003 (source (origin
3004 (method svn-fetch)
3005 (uri (svn-reference
3006 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3007 "args4j/tags/release/"
3008 (version-major+minor base-version)
3009 ".x/" base-version "/args4j/"))
3010 (revision revision)))
3011 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3012 (sha256
3013 (base32
3014 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3015 (build-system ant-build-system)
3016 (arguments
3017 `(#:make-flags '("-file" "build/build.xml")
3018 #:tests? #f ; there are no tests
3019 ;; There are weird build failures with JDK8, such as: "The type
3020 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3021 ;; referenced from required .class files"
3022 #:jdk ,icedtea-7
3023 #:modules ((guix build ant-build-system)
3024 (guix build utils)
3025 (guix build java-utils)
3026 (sxml simple)
3027 (sxml transform)
3028 (sxml xpath))
3029 #:phases
3030 (modify-phases %standard-phases
3031 (add-after 'unpack 'unpack-build-resources
3032 (lambda* (#:key inputs #:allow-other-keys)
3033 (mkdir-p "../build_resources")
3034 (copy-recursively (assoc-ref inputs "build-resources")
3035 "../build_resources")
3036 (mkdir-p "../build_resources/lib")))
3037 (add-after 'unpack-build-resources 'fix-dependencies
3038 (lambda* (#:key inputs #:allow-other-keys)
3039 ;; FIXME: There should be a more convenient abstraction for
3040 ;; editing XML files.
3041 (with-directory-excursion "../build_resources/ant/"
3042 (chmod "build-common.xml" #o664)
3043 (call-with-output-file "build-common.xml.new"
3044 (lambda (port)
3045 (sxml->xml
3046 (pre-post-order
3047 (with-input-from-file "build-common.xml"
3048 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3049 `(;; Remove dependency on classycle and custom ant tasks
3050 (taskdef . ,(lambda (tag . kids)
3051 (let ((name ((sxpath '(name *text*)) kids)))
3052 (if (or (member "build-info" name)
3053 (member "dependency-checker" name)
3054 (member "build-java-subprojects" name)
3055 (member "project-classpath" name))
3056 '() ; skip
3057 `(,tag ,@kids)))))
3058 (typedef . ,(lambda (tag . kids)
3059 (let ((name ((sxpath '(name *text*)) kids)))
3060 (if (member "recursive-jar" name)
3061 '() ; skip
3062 `(,tag ,@kids)))))
3063 (build-java-subprojects . ,(lambda _ '()))
3064 ;; Ignore everything else
3065 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3066 (*text* . ,(lambda (_ txt) txt))))
3067 port)))
3068 (rename-file "build-common.xml.new" "build-common.xml"))
3069 (substitute* "build/build.xml"
3070 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3071 (search-input-file inputs "/share/java/sis-base.jar"))
3072 ;; Remove dependency on svn
3073 (("<build-info.*") "")
3074 (("\\$\\{revision.number\\}")
3075 ,(number->string revision))
3076 (("\\$\\{version.number\\}") ,base-version)
3077 ;; Don't use custom ant tasks.
3078 (("recursive-jar") "jar")
3079 (("<project-classpath.*") ""))
3080 #t))
3081 (replace 'install (install-jars "targets/dist")))))
3082 (inputs
3083 (list java-cisd-base))
3084 (native-inputs
3085 `(("ecj" ,java-ecj-3.5)
3086 ("build-resources"
3087 ,(origin
3088 (method svn-fetch)
3089 (uri (svn-reference
3090 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3091 "args4j/tags/release/"
3092 (version-major+minor base-version)
3093 ".x/" base-version
3094 "/build_resources/"))
3095 (revision revision)))
3096 (sha256
3097 (base32
3098 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3099 (modules '((guix build utils)))
3100 ;; Delete bundled pre-built jars.
3101 (snippet
3102 '(begin (delete-file-recursively "lib/") #t))))))
3103 (home-page "http://svnsis.ethz.ch")
3104 (synopsis "Command line parser library")
3105 (description "This package provides a parser for command line arguments.")
3106 (license license:asl2.0))))
3107
3108(define-public java-cisd-jhdf5
3109 (let ((revision 39162)
3110 (base-version "14.12.6"))
3111 (package
3112 (name "java-cisd-jhdf5")
3113 (version (string-append base-version "-" (number->string revision)))
3114 (source (origin
3115 (method svn-fetch)
3116 (uri (svn-reference
3117 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3118 "jhdf5/tags/release/"
3119 (version-major+minor base-version)
3120 ".x/" base-version "/jhdf5/"))
3121 (revision revision)))
3122 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3123 (sha256
3124 (base32
3125 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3126 (modules '((guix build utils)))
3127 (snippet
3128 '(begin
3129 ;; Delete included gradle jar
3130 (delete-file-recursively "gradle/wrapper")
3131 ;; Delete pre-built native libraries
3132 (delete-file-recursively "libs")
3133 #t))))
3134 (build-system ant-build-system)
3135 (arguments
3136 `(#:make-flags '("-file" "build/build.xml")
3137 #:build-target "jar-all"
3138 #:test-target "jar-test"
3139 #:jdk ,icedtea-8
3140 #:phases
3141 (modify-phases %standard-phases
3142 ;; FIXME: this build phase fails.
3143 (delete 'generate-jar-indices)
3144 ;; Don't erase results from the build phase when building tests.
3145 (add-after 'unpack 'separate-test-target-from-clean
3146 (lambda _
3147 (substitute* "build/build.xml"
3148 (("\"jar-test\" depends=\"clean, ")
3149 "\"jar-test\" depends=\""))
3150 #t))
3151 (add-after 'unpack 'unpack-build-resources
3152 (lambda* (#:key inputs #:allow-other-keys)
3153 (copy-recursively (assoc-ref inputs "build-resources")
3154 "../build_resources")
3155 (delete-file-recursively "../build_resources/lib/")
3156 (mkdir-p "../build_resources/lib")
3157 ;; Remove dependency on classycle
3158 (substitute* "../build_resources/ant/build-common.xml"
3159 (("<taskdef name=\"dependency-checker.*") "")
3160 (("classname=\"classycle.*") "")
3161 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3162 ;; Remove dependency on svn
3163 (substitute* "build/build.xml"
3164 (("<build-info.*") "")
3165 (("\\$\\{revision.number\\}")
3166 ,(number->string revision))
3167 (("\\$\\{version.number\\}") ,base-version))
3168 #t))
3169 (add-after 'unpack-build-resources 'fix-dependencies
3170 (lambda* (#:key inputs #:allow-other-keys)
3171 (substitute* "../build_resources/ant/build-common.xml"
3172 (("../libraries/testng/testng-jdk15.jar")
3173 (search-input-file inputs
3174 "/share/java/java-testng.jar")))
3175 (substitute* "build/build.xml"
3176 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3177 (search-input-file inputs
3178 "/share/java/sis-base.jar"))
3179 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3180 (search-input-file inputs
3181 "/share/java/cisd-args4j.jar"))
3182 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3183 (search-input-file inputs
3184 (string-append
3185 "/share/java/commons-lang-"
3186 ,(package-version java-commons-lang)
3187 ".jar")))
3188 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3189 (search-input-file inputs
3190 (string-append
3191 "/lib/m2/commons-io/commons-io/"
3192 ,(package-version java-commons-io)
3193 "/commons-io-"
3194 ,(package-version java-commons-io)
3195 ".jar")))
3196 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3197 (search-input-file inputs
3198 "/share/java/java-testng.jar"))
3199 (("\\$\\{lib\\}/junit4/junit.jar")
3200 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3201 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3202 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3203 "jar$"))))
3204 ;; Remove dependency on ch.rinn.restrictions
3205 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3206 (substitute* '("BitSetConversionUtils.java"
3207 "HDF5Utils.java")
3208 (("import ch.rinn.restrictions.Private;") "")
3209 (("@Private") "")))
3210 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3211 (substitute* '("BitSetConversionTest.java"
3212 "h5ar/HDF5ArchiverTest.java")
3213 (("import ch.rinn.restrictions.Friend;") "")
3214 (("@Friend.*") ""))
3215 ;; Remove leftovers from removing @Friend
3216 (substitute* "h5ar/HDF5ArchiverTest.java"
3217 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3218 "")))
3219 #t))
3220 (add-before 'configure 'build-native-library
3221 (lambda* (#:key inputs #:allow-other-keys)
3222 (let ((jdk (assoc-ref inputs "jdk"))
3223 (hdf5 (assoc-ref inputs "hdf5"))
3224 (dir ,(match (%current-system)
3225 ("i686-linux"
3226 "i386-Linux")
3227 ((or "armhf-linux" "aarch64-linux")
3228 "arm-Linux")
3229 ((or "x86_64-linux")
3230 "amd64-Linux")
3231 (_ "unknown-Linux"))))
3232 (with-directory-excursion "source/c"
3233 (apply invoke `("gcc" "-shared" "-O3"
3234 "-fPIC"
3235 "-Wl,--exclude-libs,ALL"
3236 ,@(find-files "jhdf5" "\\.c$")
3237 ,@(find-files "hdf-java" "\\.c$")
3238 ,(string-append "-I" hdf5 "/include")
3239 ,(string-append "-I" jdk "/include")
3240 ,(string-append "-I" jdk "/include/linux")
3241 ,(string-append hdf5 "/lib/libhdf5.a")
3242 "-o" "libjhdf5.so" "-lz")))
3243 (install-file "source/c/libjhdf5.so"
3244 (string-append "libs/native/jhdf5/" dir))
3245 #t)))
3246 ;; In the "check" phase we only build the test executable.
3247 (add-after 'check 'run-tests
3248 (lambda _
3249 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3250 (delete-file "targets/dist/sis-jhdf5-test.jar")
3251 #t))
3252 (replace 'install
3253 (install-jars "targets/dist")))))
3254 (inputs
3255 (list java-cisd-base
3256 java-cisd-args4j
3257 java-commons-lang
3258 java-commons-io
3259 hdf5-1.8
3260 zlib))
3261 (native-inputs
3262 `(("jdk" ,icedtea-8)
3263 ("java-testng" ,java-testng)
3264 ("java-junit" ,java-junit)
3265 ("java-jmock" ,java-jmock)
3266 ("java-hamcrest-core" ,java-hamcrest-core)
3267 ("build-resources"
3268 ,(origin
3269 (method svn-fetch)
3270 (uri (svn-reference
3271 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3272 "jhdf5/tags/release/"
3273 (version-major+minor base-version)
3274 ".x/" base-version
3275 "/build_resources/"))
3276 (revision revision)))
3277 (sha256
3278 (base32
3279 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3280 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3281 (synopsis "Java binding for HDF5")
3282 (description "JHDF5 is a high-level API in Java for reading and writing
3283HDF5 files, building on the libraries provided by the HDF Group.")
3284 ;; The C sources are under a non-copyleft license, which looks like a
3285 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3286 (license (list license:asl2.0
3287 (license:non-copyleft "file://source/c/COPYING"))))))
3288
3289(define-public java-classpathx-servletapi
3290 (package
3291 (name "java-classpathx-servletapi")
3292 (version "3.0.1")
3293 (source (origin
3294 (method url-fetch)
3295 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3296 "servletapi-" version ".tar.gz"))
3297 (sha256
3298 (base32
3299 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3300 (build-system ant-build-system)
3301 (arguments
3302 `(#:tests? #f ; there is no test target
3303 #:build-target "compile"
3304 #:make-flags
3305 ,#~(list "-Dbuild.compiler=javac1.8"
3306 (string-append "-Ddist=" #$output))
3307 #:phases
3308 (modify-phases %standard-phases
3309 (replace 'install
3310 (lambda* (#:key make-flags #:allow-other-keys)
3311 (apply invoke `("ant" "dist" ,@make-flags)))))))
3312 (home-page "https://www.gnu.org/software/classpathx/")
3313 (synopsis "Java servlet API implementation")
3314 (description "This is the GNU servlet API distribution, part of the
3315ClasspathX project. It provides implementations of version 3.0 of the servlet
3316API and version 2.1 of the Java ServerPages API.")
3317 (license license:gpl3+)))
3318
3319(define-public java-javaee-servletapi
3320 (package
3321 (name "java-javaee-servletapi")
3322 (version "3.1.0")
3323 (source (origin
3324 (method git-fetch)
3325 (uri (git-reference
3326 (url "https://github.com/javaee/servlet-spec")
3327 (commit version)))
3328 (file-name (git-file-name name version))
3329 (sha256
3330 (base32
3331 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3332 (build-system ant-build-system)
3333 (arguments
3334 `(#:jar-name "javax-servletapi.jar"
3335 ;; no tests
3336 #:tests? #f
3337 #:source-dir "src/main/java"
3338 #:phases
3339 (modify-phases %standard-phases
3340 (add-before 'build 'copy-resources
3341 (lambda _
3342 (mkdir-p "build/classes/javax/servlet/http")
3343 (let ((from-prefix "src/main/java/javax/servlet/")
3344 (to-prefix "build/classes/javax/servlet/"))
3345 (for-each (lambda (f)
3346 (copy-file (string-append from-prefix f)
3347 (string-append to-prefix f)))
3348 (list "LocalStrings_ja.properties"
3349 "LocalStrings.properties"
3350 "LocalStrings_fr.properties"
3351 "http/LocalStrings_es.properties"
3352 "http/LocalStrings_ja.properties"
3353 "http/LocalStrings.properties"
3354 "http/LocalStrings_fr.properties")))
3355 #t)))))
3356 (native-inputs
3357 (list unzip))
3358 (home-page "https://javaee.github.io/servlet-spec/")
3359 (synopsis "Java servlet API")
3360 (description "Java Servlet is the foundation web specification in the
3361Java Enterprise Platform. Developers can build web applications using the
3362Servlet API to interact with the request/response workflow. This project
3363provides information on the continued development of the Java Servlet
3364specification.")
3365 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3366 ;; Some files are licensed under ASL 2.0.
3367 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3368
3369(define-public java-swt
3370 (package
3371 (name "java-swt")
3372 (version "4.7.1a")
3373 (source
3374 ;; The types of many variables and procedures differ in the sources
3375 ;; dependent on whether the target architecture is a 32-bit system or a
3376 ;; 64-bit system. Instead of patching the sources on demand in a build
3377 ;; phase we download either the 32-bit archive (which mostly uses "int"
3378 ;; types) or the 64-bit archive (which mostly uses "long" types).
3379 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3380 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3381 (file32 "x86")
3382 (file64 "x86_64"))
3383 (let-values (((hash file)
3384 (match (or (%current-target-system) (%current-system))
3385 ("x86_64-linux" (values hash64 file64))
3386 (_ (values hash32 file32)))))
3387 (origin
3388 (method url-fetch)
3389 (uri (string-append
3390 "http://download.eclipse.org/eclipse/downloads/drops4/"
3391 "R-" version "-201710090410/swt-" version
3392 "-gtk-linux-" file ".zip"))
3393 (sha256 (base32 hash))))))
3394 (build-system ant-build-system)
3395 (arguments
3396 `(#:jar-name "swt.jar"
3397 #:jdk ,icedtea-8
3398 #:tests? #f ; no "check" target
3399 #:phases
3400 (modify-phases %standard-phases
3401 (replace 'unpack
3402 (lambda* (#:key source #:allow-other-keys)
3403 (mkdir "swt")
3404 (invoke "unzip" source "-d" "swt")
3405 (chdir "swt")
3406 (mkdir "src")
3407 (invoke "unzip" "src.zip" "-d" "src")))
3408 ;; The classpath contains invalid icecat jars. Since we don't need
3409 ;; anything other than the JDK on the classpath, we can simply unset
3410 ;; it.
3411 (add-after 'configure 'unset-classpath
3412 (lambda _ (unsetenv "CLASSPATH") #t))
3413 (add-before 'build 'build-native
3414 (lambda* (#:key inputs outputs #:allow-other-keys)
3415 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3416 ;; Build shared libraries. Users of SWT have to set the system
3417 ;; property swt.library.path to the "lib" directory of this
3418 ;; package output.
3419 (mkdir-p lib)
3420 (setenv "OUTPUT_DIR" lib)
3421 (with-directory-excursion "src"
3422 (invoke "bash" "build.sh")))))
3423 (add-after 'install 'install-native
3424 (lambda* (#:key outputs #:allow-other-keys)
3425 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3426 (for-each (lambda (file)
3427 (install-file file lib))
3428 (find-files "." "\\.so$"))
3429 #t))))))
3430 (inputs
3431 `(("gtk" ,gtk+-2)
3432 ("libxtst" ,libxtst)
3433 ("libxt" ,libxt)
3434 ("mesa" ,mesa)
3435 ("glu" ,glu)))
3436 (native-inputs
3437 (list pkg-config unzip))
3438 (home-page "https://www.eclipse.org/swt/")
3439 (synopsis "Widget toolkit for Java")
3440 (description
3441 "SWT is a widget toolkit for Java designed to provide efficient, portable
3442access to the user-interface facilities of the operating systems on which it
3443is implemented.")
3444 ;; SWT code is licensed under EPL1.0
3445 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3446 ;; Cairo bindings contain code under MPL1.1
3447 ;; XULRunner 1.9 bindings contain code under MPL2.0
3448 (license (list
3449 license:epl1.0
3450 license:mpl1.1
3451 license:mpl2.0
3452 license:lgpl2.1+))))
3453
3454;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3455;; of the latest release.
3456(define-public java-qdox-1.12
3457 (package
3458 (name "java-qdox")
3459 (version "1.12.1")
3460 (source (origin
3461 (method url-fetch)
3462 (uri (string-append "https://repo1.maven.org/maven2/"
3463 "com/thoughtworks/qdox/qdox/" version
3464 "/qdox-" version "-sources.jar"))
3465 (sha256
3466 (base32
3467 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3468 (build-system ant-build-system)
3469 (arguments
3470 `(;; Tests require junit
3471 #:tests? #f
3472 #:jar-name "qdox.jar"
3473 #:phases
3474 (modify-phases %standard-phases
3475 (replace 'unpack
3476 (lambda* (#:key source #:allow-other-keys)
3477 (mkdir "src")
3478 (with-directory-excursion "src"
3479 (invoke "jar" "-xf" source))))
3480 ;; At this point we don't have junit, so we must remove the API
3481 ;; tests.
3482 (add-after 'unpack 'delete-tests
3483 (lambda _
3484 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3485 #t)))))
3486 (home-page "https://github.com/codehaus/qdox")
3487 (synopsis "Parse definitions from Java source files")
3488 (description
3489 "QDox is a high speed, small footprint parser for extracting
3490class/interface/method definitions from source files complete with JavaDoc
3491@code{@@tags}. It is designed to be used by active code generators or
3492documentation tools.")
3493 (license license:asl2.0)))
3494
3495(define-public java-qdox
3496 (package
3497 (name "java-qdox")
3498 ; Newer version exists, but this version is required by java-plexus-component-metadata
3499 (version "2.0-M2")
3500 (source (origin
3501 (method url-fetch)
3502 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3503 ;; Older releases at https://github.com/codehaus/qdox/
3504 ;; Note: The release at maven is pre-generated. The release at
3505 ;; github requires jflex.
3506 (uri (string-append "https://repo1.maven.org/maven2/"
3507 "com/thoughtworks/qdox/qdox/" version
3508 "/qdox-" version "-sources.jar"))
3509 (sha256
3510 (base32
3511 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3512 (build-system ant-build-system)
3513 (arguments
3514 `(#:jar-name "qdox.jar"
3515 #:tests? #f; no tests
3516 #:phases
3517 (modify-phases %standard-phases
3518 (add-before 'install 'create-pom
3519 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3520 #:name "QDox"))
3521 (replace 'install
3522 (install-from-pom "pom.xml")))))
3523 (home-page "https://github.com/codehaus/qdox")
3524 (synopsis "Parse definitions from Java source files")
3525 (description "QDox is a high speed, small footprint parser for extracting
3526class/interface/method definitions from source files complete with JavaDoc
3527@code{@@tags}. It is designed to be used by active code generators or
3528documentation tools.")
3529 (license license:asl2.0)))
3530
3531(define-public java-qdox-2-M9
3532 (package
3533 (inherit java-qdox)
3534 (version "2.0-M9"); required by plexus-java
3535 (source (origin
3536 (method url-fetch)
3537 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3538 ;; Older releases at https://github.com/codehaus/qdox/
3539 ;; Note: The release at maven is pre-generated. The release at
3540 ;; github requires jflex.
3541 (uri (string-append "https://repo1.maven.org/maven2/"
3542 "com/thoughtworks/qdox/qdox/" version
3543 "/qdox-" version "-sources.jar"))
3544 (sha256
3545 (base32
3546 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))
3547 (arguments
3548 (substitute-keyword-arguments (package-arguments java-qdox)
3549 ((#:phases phases)
3550 `(modify-phases ,phases
3551 (replace 'create-pom
3552 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3553 #:name "QDox"))))))))
3554
3555(define-public java-jarjar
3556 (package
3557 (name "java-jarjar")
3558 (version "1.4")
3559 (source (origin
3560 (method url-fetch)
3561 (uri (string-append
3562 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3563 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3564 (sha256
3565 (base32
3566 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3567 (modules '((guix build utils)))
3568 (snippet
3569 '(begin
3570 ;; Delete bundled thirds-party jar archives.
3571 (delete-file-recursively "lib")
3572 (delete-file "src/test/enumtest.jar")
3573 ;; the CLASSPATH needs this directory, create an empty one
3574 (mkdir-p "lib")
3575 #t))))
3576 (build-system ant-build-system)
3577 (arguments
3578 `(;; Tests require junit, which ultimately depends on this package.
3579 #:tests? #f
3580 #:build-target "jar"
3581 #:phases
3582 (modify-phases %standard-phases
3583 (add-before 'build 'do-not-use-bundled-asm
3584 (lambda* (#:key inputs #:allow-other-keys)
3585 (substitute* "build.xml"
3586 (("<path id=\"path.build\">")
3587 (string-append "<path id=\"path.build\"><fileset dir=\""
3588 (assoc-ref inputs "java-asm-bootstrap")
3589 "/lib/m2\" includes=\"**/*.jar\"/>"))
3590 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3591 (("lib/asm-commons-4.0.jar")
3592 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3593 "asm-6.0.jar")))
3594 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3595 (string-append "<include name=\"org/objectweb/asm/"
3596 "commons/Remap*.class\"/>"
3597 "<include name=\"org/objectweb/asm/*.class\"/>"
3598 "<include name=\"org/objectweb/asm/"
3599 "signature/*.class\"/>"
3600 "<include name=\"org/objectweb/asm/"
3601 "commons/SignatureRemapper.class\"/>")))
3602 #t))
3603 (add-before 'build 'remove-maven-dependency
3604 (lambda _
3605 ;; We do not need to build jarjar as a maven plugin just yet, so
3606 ;; remove this file. Maven requires jarjar (but not that plugin),
3607 ;; so removing it improves the bootstrap.
3608 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3609 #t))
3610 (replace 'install
3611 (lambda* (#:key outputs #:allow-other-keys)
3612 (let ((target (string-append (assoc-ref outputs "out")
3613 "/share/java")))
3614 (install-file (string-append "dist/jarjar-" ,version ".jar")
3615 target))
3616 #t)))))
3617 (inputs
3618 (list java-asm-bootstrap))
3619 (native-inputs
3620 (list unzip))
3621 (home-page "https://code.google.com/archive/p/jarjar/")
3622 (synopsis "Repackage Java libraries")
3623 (description
3624 "Jar Jar Links is a utility that makes it easy to repackage Java
3625libraries and embed them into your own distribution. Jar Jar Links includes
3626an Ant task that extends the built-in @code{jar} task.")
3627 (license license:asl2.0)))
3628
3629(define-public java-hamcrest-core
3630 (package
3631 (name "java-hamcrest-core")
3632 (version "1.3")
3633 (source (origin
3634 (method git-fetch)
3635 (uri (git-reference
3636 (url "https://github.com/hamcrest/JavaHamcrest/")
3637 (commit (string-append "hamcrest-java-" version))))
3638 (file-name (git-file-name name version))
3639 (sha256
3640 (base32
3641 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3642 (modules '((guix build utils)))
3643 (snippet
3644 '(begin
3645 ;; Delete bundled thirds-party jar archives.
3646 (delete-file-recursively "lib")
3647 #t))))
3648 (build-system ant-build-system)
3649 (arguments
3650 `(#:tests? #f ; Tests require junit
3651 #:modules ((guix build ant-build-system)
3652 (guix build java-utils)
3653 (guix build utils)
3654 (srfi srfi-1))
3655 #:make-flags (list (string-append "-Dversion=" ,version))
3656 #:test-target "unit-test"
3657 #:build-target "core"
3658 #:phases
3659 (modify-phases %standard-phases
3660 ;; Disable unit tests, because they require junit, which requires
3661 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3662 ;; attribute from the manifest for reproducibility.
3663 (add-before 'configure 'patch-build.xml
3664 (lambda _
3665 (substitute* "build.xml"
3666 (("unit-test, ") "")
3667 (("\\$\\{build.timestamp\\}") "guix"))
3668 #t))
3669 ;; Java's "getMethods()" returns methods in an unpredictable order.
3670 ;; To make the output of the generated code deterministic we must
3671 ;; sort the array of methods.
3672 (add-after 'unpack 'make-method-order-deterministic
3673 (lambda _
3674 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3675 (("import java\\.util\\.Iterator;" line)
3676 (string-append line "\n"
3677 "import java.util.Arrays; import java.util.Comparator;"))
3678 (("allMethods = cls\\.getMethods\\(\\);" line)
3679 (string-append "_" line
3680 "
3681private Method[] getSortedMethods() {
3682 Arrays.sort(_allMethods, new Comparator<Method>() {
3683 @Override
3684 public int compare(Method a, Method b) {
3685 return a.toString().compareTo(b.toString());
3686 }
3687 });
3688 return _allMethods;
3689}
3690
3691private Method[] allMethods = getSortedMethods();")))
3692 #t))
3693 (add-before 'build 'do-not-use-bundled-qdox
3694 (lambda* (#:key inputs #:allow-other-keys)
3695 (substitute* "build.xml"
3696 (("lib/generator/qdox-1.12.jar")
3697 (string-append (assoc-ref inputs "java-qdox-1.12")
3698 "/share/java/qdox.jar")))
3699 #t))
3700 ;; build.xml searches for .jar files in this directoy, which
3701 ;; we remove from the source archive.
3702 (add-before 'build 'create-dummy-directories
3703 (lambda _
3704 (mkdir-p "lib/integration")
3705 #t))
3706 (add-before 'build 'create-pom
3707 (lambda _
3708 (substitute* "pom/hamcrest-core.pom"
3709 (("@VERSION@") ,version))
3710 #t))
3711 (replace 'install
3712 (install-from-pom "pom/hamcrest-core.pom")))))
3713 (native-inputs
3714 `(("java-qdox-1.12" ,java-qdox-1.12)
3715 ("java-jarjar" ,java-jarjar)))
3716 (propagated-inputs
3717 (list java-hamcrest-parent-pom))
3718 (home-page "http://hamcrest.org/")
3719 (synopsis "Library of matchers for building test expressions")
3720 (description
3721 "This package provides a library of matcher objects (also known as
3722constraints or predicates) allowing @code{match} rules to be defined
3723declaratively, to be used in other frameworks. Typical scenarios include
3724testing frameworks, mocking libraries and UI validation rules.")
3725 (license license:bsd-2)))
3726
3727(define java-hamcrest-parent-pom
3728 (package
3729 (inherit java-hamcrest-core)
3730 (name "java-hamcrest-parent-pom")
3731 (propagated-inputs '())
3732 (native-inputs '())
3733 (arguments
3734 `(#:tests? #f
3735 #:phases
3736 (modify-phases %standard-phases
3737 (delete 'configure)
3738 (replace 'build
3739 (lambda _
3740 (substitute* "pom/hamcrest-parent.pom"
3741 (("@VERSION@") ,(package-version java-hamcrest-core)))
3742 #t))
3743 (replace 'install
3744 (install-pom-file "pom/hamcrest-parent.pom")))))))
3745
3746(define-public java-hamcrest-library
3747 (package
3748 (inherit java-hamcrest-core)
3749 (name "java-hamcrest-library")
3750 (arguments
3751 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3752 ((#:build-target _) "library")
3753 ((#:phases phases)
3754 `(modify-phases ,phases
3755 (add-after 'unpack 'patch-classpath-for-integration
3756 (lambda* (#:key inputs #:allow-other-keys)
3757 (substitute* "build.xml"
3758 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3759 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3760 "jar$"))))
3761 #t))
3762 (replace 'create-pom
3763 (lambda _
3764 (substitute* "pom/hamcrest-library.pom"
3765 (("@VERSION@") ,(package-version java-hamcrest-core)))
3766 #t))
3767 (replace 'install
3768 (install-from-pom "pom/hamcrest-library.pom"))))))
3769 (propagated-inputs
3770 (list java-hamcrest-core java-hamcrest-parent-pom))))
3771
3772(define-public java-junit
3773 (package
3774 (name "java-junit")
3775 (version "4.12")
3776 (source (origin
3777 (method git-fetch)
3778 (uri (git-reference
3779 (url "https://github.com/junit-team/junit/")
3780 (commit (string-append "r" version))))
3781 (file-name (git-file-name name version))
3782 (sha256
3783 (base32
3784 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3785 (modules '((guix build utils)))
3786 (snippet
3787 '(begin
3788 ;; Delete bundled jar archives.
3789 (delete-file-recursively "lib")
3790 #t))))
3791 (build-system ant-build-system)
3792 (arguments
3793 `(#:jar-name "junit.jar"
3794 #:source-dir "src/main/java"
3795 #:test-dir "src/test"
3796 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3797 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3798 #:phases
3799 (modify-phases %standard-phases
3800 (add-before 'check 'copy-test-resources
3801 (lambda _
3802 (copy-recursively "src/test/resources" "build/test-classes")
3803 #t))
3804 (replace 'install
3805 (install-from-pom "pom.xml")))))
3806 (propagated-inputs
3807 (list java-hamcrest-core))
3808 (native-inputs
3809 (list java-hamcrest-library))
3810 (home-page "https://junit.org/junit4/")
3811 (synopsis "Test framework for Java")
3812 (description
3813 "JUnit is a simple framework to write repeatable tests for Java projects.
3814JUnit provides assertions for testing expected results, test fixtures for
3815sharing common test data, and test runners for running tests.")
3816 (license license:epl1.0)))
3817
3818(define-public java-junitparams
3819 (package
3820 (name "java-junitparams")
3821 (version "1.1.1")
3822 (source (origin
3823 (method git-fetch)
3824 (uri (git-reference
3825 (url "https://github.com/Pragmatists/JUnitParams")
3826 (commit (string-append "JUnitParams-" version))))
3827 (file-name (git-file-name name version))
3828 (sha256
3829 (base32
3830 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3831 (build-system ant-build-system)
3832 (arguments
3833 `(#:jar-name "junitparams.jar"
3834 #:source-dir "src/main/java"
3835 #:test-dir "src/test"
3836 #:test-exclude (list "**/SuperclassTest.java")))
3837 (inputs
3838 (list java-junit))
3839 (native-inputs
3840 (list java-junit java-hamcrest-core java-assertj))
3841 (home-page "https://github.com/Pragmatists/JUnitParams")
3842 (synopsis "Parameterised test support for JUnit")
3843 (description "The JUnitParams project adds a new runner to JUnit and
3844provides much easier and readable parametrised tests for JUnit.")
3845 (license license:asl2.0)))
3846
3847(define-public java-plexus-utils
3848 (package
3849 (name "java-plexus-utils")
3850 (version "3.3.0")
3851 (source (origin
3852 (method git-fetch)
3853 (uri (git-reference
3854 (url "https://github.com/codehaus-plexus/plexus-utils")
3855 (commit (string-append "plexus-utils-" version))))
3856 (file-name (git-file-name name version))
3857 (sha256
3858 (base32
3859 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))
3860 (build-system ant-build-system)
3861 ;; FIXME: The default build.xml does not include a target to install
3862 ;; javadoc files.
3863 (arguments
3864 `(#:jar-name "plexus-utils.jar"
3865 #:source-dir "src/main"
3866 #:phases
3867 (modify-phases %standard-phases
3868 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3869 (lambda _
3870 (substitute* "src/main/java/org/codehaus/plexus/util/\
3871cli/shell/BourneShell.java"
3872 (("/bin/sh") (which "sh"))
3873 (("/usr/") (getcwd)))
3874 #t))
3875 (add-after 'unpack 'fix-or-disable-broken-tests
3876 (lambda _
3877 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3878 (substitute* '("cli/CommandlineTest.java"
3879 "cli/shell/BourneShellTest.java")
3880 (("/bin/sh") (which "sh"))
3881 (("/bin/echo") (which "echo")))
3882
3883 ;; This test depends on MavenProjectStub, but we don't have
3884 ;; a package for Maven.
3885 (delete-file "introspection/ReflectionValueExtractorTest.java")
3886
3887 ;; FIXME: The command line tests fail, maybe because they use
3888 ;; absolute paths.
3889 (delete-file "cli/CommandlineTest.java")
3890
3891 ;; These tests require openjdk jmh, which is not packaged yet
3892 (for-each delete-file (find-files "." "PerfTest.java$")))
3893 #t))
3894 (add-before 'build 'copy-resources
3895 (lambda _
3896 (copy-recursively "src/main/resources" "build/classes")
3897 #t))
3898 (replace 'install (install-from-pom "pom.xml")))))
3899 (native-inputs
3900 (list java-hamcrest-core java-junit))
3901 (propagated-inputs
3902 (list plexus-parent-pom-5.1))
3903 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3904 (synopsis "Common utilities for the Plexus framework")
3905 (description "This package provides various Java utility classes for the
3906Plexus framework to ease working with strings, files, command lines, XML and
3907more.")
3908 (license license:asl2.0)))
3909
3910(define-public java-plexus-utils-3.2.1
3911 (package
3912 (inherit java-plexus-utils)
3913 ;; plexus-build-api needs this version, later versions don't work
3914 (version "3.2.1")
3915 (source (origin
3916 (method git-fetch)
3917 (uri (git-reference
3918 (url "https://github.com/codehaus-plexus/plexus-utils")
3919 (commit (string-append "plexus-utils-" version))))
3920 (file-name (git-file-name "java-plexus-utils" version))
3921 (sha256
3922 (base32
3923 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))))
3924
3925(define-public java-plexus-interpolation
3926 (package
3927 (name "java-plexus-interpolation")
3928 (version "1.26")
3929 (source (origin
3930 (method git-fetch)
3931 (uri (git-reference
3932 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3933 (commit (string-append "plexus-interpolation-" version))))
3934 (file-name (git-file-name name version))
3935 (sha256
3936 (base32
3937 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
3938 (build-system ant-build-system)
3939 (arguments
3940 `(#:jar-name "plexus-interpolation.jar"
3941 #:source-dir "src/main"
3942 #:phases
3943 (modify-phases %standard-phases
3944 (replace 'install (install-from-pom "pom.xml")))))
3945 (propagated-inputs
3946 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3947 (native-inputs
3948 (list java-junit java-hamcrest-core))
3949 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3950 (synopsis "Java components for interpolating ${} strings and the like")
3951 (description "Plexus interpolator is a modular, flexible interpolation
3952framework for the expression language style commonly seen in Maven, Plexus,
3953and other related projects.
3954
3955It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3956package within @code{plexus-utils}, but has been separated in order to allow
3957these two libraries to vary independently of one another.")
3958 (license license:asl2.0)))
3959
3960(define-public java-plexus-classworlds
3961 (package
3962 (name "java-plexus-classworlds")
3963 (version "2.6.0")
3964 (source (origin
3965 (method git-fetch)
3966 (uri (git-reference
3967 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3968 (commit (string-append "plexus-classworlds-" version))))
3969 (file-name (git-file-name name version))
3970 (sha256
3971 (base32
3972 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
3973 (build-system ant-build-system)
3974 (arguments
3975 `(#:jar-name "plexus-classworlds.jar"
3976 #:source-dir "src/main"
3977 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
3978 #:phases
3979 (modify-phases %standard-phases
3980 (replace 'install (install-from-pom "pom.xml")))))
3981 (propagated-inputs
3982 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3983 (native-inputs
3984 (list java-junit))
3985 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
3986 (synopsis "Java class loader framework")
3987 (description "Plexus classworlds replaces the native @code{ClassLoader}
3988mechanism of Java. It is especially useful for dynamic loading of application
3989components.")
3990 (license license:asl2.0)))
3991
3992(define java-plexus-container-default-bootstrap
3993 (package
3994 (name "java-plexus-container-default-bootstrap")
3995 (version "2.1.0")
3996 (source (origin
3997 (method git-fetch)
3998 (uri (git-reference
3999 (url "https://github.com/codehaus-plexus/plexus-containers")
4000 (commit (string-append "plexus-containers-" version))))
4001 (file-name (git-file-name name version))
4002 (sha256
4003 (base32
4004 "0r9yq67c1hvi1pz5wmx6x6hk5fmavp8a7yal3j5hkaad757firn1"))))
4005 (build-system ant-build-system)
4006 (arguments
4007 `(#:jar-name "container-default.jar"
4008 #:source-dir "plexus-container-default/src/main/java"
4009 #:test-dir "plexus-container-default/src/test"
4010 #:tests? #f; requires plexus-archiver, which depends on this package
4011 #:phases
4012 (modify-phases %standard-phases
4013 (add-before 'build 'fix-google-collections
4014 (lambda _
4015 ;; Google collections are now replaced with guava
4016 (substitute* "plexus-container-default/pom.xml"
4017 (("google-collections") "guava")
4018 (("com.google.collections") "com.google.guava"))
4019 #t))
4020 (add-before 'build 'copy-resources
4021 (lambda _
4022 (copy-recursively
4023 "plexus-container-default/src/main/resources/"
4024 "build/classes")
4025 #t))
4026 (replace 'install
4027 (install-from-pom "plexus-container-default/pom.xml")))))
4028 (propagated-inputs
4029 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4030 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4031 ("java-plexus-utils" ,java-plexus-utils)
4032 ("java-junit" ,java-junit)
4033 ("java-guava" ,java-guava)
4034 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4035 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4036 (synopsis "Inversion-of-control container")
4037 (description "Plexus-default-container is Plexus' inversion-of-control
4038(@dfn{IoC}) container. It is composed of its public API and its default
4039implementation.")
4040 (license license:asl2.0)))
4041
4042(define java-plexus-containers-parent-pom
4043 (package
4044 (inherit java-plexus-container-default-bootstrap)
4045 (name "java-plexus-containers-parent-pom")
4046 (arguments
4047 `(#:tests? #f
4048 #:phases
4049 (modify-phases %standard-phases
4050 (delete 'configure)
4051 (delete 'build)
4052 (replace 'install
4053 (install-pom-file "pom.xml")))))
4054 (propagated-inputs
4055 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4056
4057(define-public java-plexus-io
4058 (package
4059 (name "java-plexus-io")
4060 (version "3.2.0")
4061 (source (origin
4062 (method git-fetch)
4063 (uri (git-reference
4064 (url "https://github.com/codehaus-plexus/plexus-io")
4065 (commit (string-append "plexus-io-" version))))
4066 (file-name (git-file-name name version))
4067 (sha256
4068 (base32
4069 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4070 (build-system ant-build-system)
4071 (arguments
4072 `(#:jar-name "plexus-io.jar"
4073 #:source-dir "src/main/java"
4074 #:test-dir "src/test"
4075 #:phases
4076 (modify-phases %standard-phases
4077 (add-before 'build 'copy-resources
4078 (lambda _
4079 (mkdir-p "build/classes")
4080 (copy-recursively "src/main/resources" "build/classes")
4081 (mkdir-p "build/test-classes")
4082 (copy-recursively "src/test/resources" "build/test-classes")
4083 #t))
4084 (replace 'install (install-from-pom "pom.xml")))))
4085 (propagated-inputs
4086 (list java-plexus-utils java-commons-io plexus-parent-pom-5.1))
4087 (inputs
4088 (list java-jsr305))
4089 (native-inputs
4090 `(("junit" ,java-junit)
4091 ("hamcrest" ,java-hamcrest-core)
4092 ("guava" ,java-guava)
4093 ("classworlds" ,java-plexus-classworlds)
4094 ("xbean" ,java-geronimo-xbean-reflect)
4095 ("container-default" ,java-plexus-container-default-bootstrap)))
4096 (home-page "https://github.com/codehaus-plexus/plexus-io")
4097 (synopsis "I/O plexus components")
4098 (description "Plexus IO is a set of plexus components, which are designed
4099for use in I/O operations. This implementation using plexus components allows
4100reusing it in maven.")
4101 (license license:asl2.0)))
4102
4103(define-public java-plexus-archiver
4104 (package
4105 (name "java-plexus-archiver")
4106 (version "4.2.2")
4107 (source (origin
4108 (method url-fetch)
4109 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4110 "/archive/plexus-archiver-" version ".tar.gz"))
4111 (sha256
4112 (base32
4113 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4114 (build-system ant-build-system)
4115 (arguments
4116 `(#:jar-name "plexus-archiver.jar"
4117 #:source-dir "src/main/java"
4118 #:test-dir "src/test"
4119 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4120 #:phases
4121 (modify-phases %standard-phases
4122 (add-before 'check 'remove-failing
4123 (lambda _
4124 ;; Requires an older version of plexus container
4125 (delete-file
4126 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4127 #t))
4128 (add-before 'check 'fix-test-building
4129 (lambda _
4130 (substitute* "build.xml"
4131 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4132 #t))
4133 (add-before 'build 'copy-resources
4134 (lambda _
4135 (mkdir-p "build/classes")
4136 (copy-recursively "src/main/resources" "build/classes")
4137 (mkdir-p "build/test-classes")
4138 (copy-recursively "src/test/resources" "build/test-classes")
4139 #t))
4140 (replace 'install (install-from-pom "pom.xml")))))
4141 (propagated-inputs
4142 (list java-plexus-utils java-plexus-io java-iq80-snappy
4143 java-commons-compress plexus-parent-pom-6.1))
4144 (inputs
4145 `(("java-jsr305" ,java-jsr305)
4146 ("java-plexus-container-default"
4147 ,java-plexus-container-default-bootstrap)))
4148 (native-inputs
4149 `(("java-hamcrest-core" ,java-hamcrest-core)
4150 ("junit" ,java-junit)
4151 ("classworld" ,java-plexus-classworlds)
4152 ("xbean" ,java-geronimo-xbean-reflect)
4153 ("xz" ,java-xz)
4154 ("guava" ,java-guava)))
4155 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4156 (synopsis "Archiver component of the Plexus project")
4157 (description "Plexus-archiver contains a component to deal with project
4158archives (jar).")
4159 (license license:asl2.0)))
4160
4161(define-public java-plexus-container-default
4162 (package
4163 (inherit java-plexus-container-default-bootstrap)
4164 (name "java-plexus-container-default")
4165 (arguments
4166 `(#:jar-name "container-default.jar"
4167 #:source-dir "plexus-container-default/src/main/java"
4168 #:test-dir "plexus-container-default/src/test"
4169 #:test-exclude (list ;"**/*Test.java"
4170 "**/Abstract*.java"
4171 ;; Requires plexus-hierarchy
4172 "**/PlexusHierarchyTest.java"
4173 ;; Failures
4174 "**/ComponentRealmCompositionTest.java"
4175 "**/PlexusContainerTest.java")
4176 #:phases
4177 (modify-phases %standard-phases
4178 (add-before 'build 'fix-google-collections
4179 (lambda _
4180 ;; Google collections are now replaced with guava
4181 (substitute* "plexus-container-default/pom.xml"
4182 (("google-collections") "guava")
4183 (("com.google.collections") "com.google.guava"))
4184 #t))
4185 (add-before 'build 'copy-resources
4186 (lambda _
4187 (copy-recursively
4188 "plexus-container-default/src/main/resources/"
4189 "build/classes")
4190 #t))
4191 (add-before 'check 'fix-paths
4192 (lambda _
4193 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4194 (substitute*
4195 (string-append
4196 dir "/plexus/component/composition/"
4197 "ComponentRealmCompositionTest.java")
4198 (("src/test") "plexus-container-default/src/test"))
4199 #t)))
4200 (replace 'install
4201 (install-from-pom "plexus-container-default/pom.xml")))))
4202 (inputs
4203 `(("worldclass" ,java-plexus-classworlds)
4204 ("xbean" ,java-geronimo-xbean-reflect)
4205 ("utils" ,java-plexus-utils)
4206 ("junit" ,java-junit)
4207 ("guava" ,java-guava)))
4208 (native-inputs
4209 `(("archiver" ,java-plexus-archiver)
4210 ("hamcrest" ,java-hamcrest-core)))))
4211
4212(define-public java-plexus-component-annotations
4213 (package
4214 (inherit java-plexus-container-default)
4215 (name "java-plexus-component-annotations")
4216 (arguments
4217 `(#:jar-name "plexus-component-annotations.jar"
4218 #:source-dir "plexus-component-annotations/src/main/java"
4219 #:tests? #f; no tests
4220 #:phases
4221 (modify-phases %standard-phases
4222 (replace 'install
4223 (install-from-pom "plexus-component-annotations/pom.xml")))))
4224 (propagated-inputs
4225 (list java-plexus-containers-parent-pom))
4226 (inputs '())
4227 (native-inputs '())
4228 (synopsis "Plexus descriptors generator")
4229 (description "This package is a Maven plugin to generate Plexus descriptors
4230from source tags and class annotations.")))
4231
4232(define-public java-plexus-component-metadata
4233 (package
4234 (inherit java-plexus-container-default)
4235 (name "java-plexus-component-metadata")
4236 (arguments
4237 `(#:jar-name "plexus-component-metadata.jar"
4238 #:source-dir "src/main/java"
4239 #:test-dir "src/test"
4240 #:jdk ,icedtea-8
4241 #:phases
4242 (modify-phases %standard-phases
4243 (add-before 'configure 'chdir
4244 (lambda _
4245 (chdir "plexus-component-metadata")
4246 #t))
4247 (add-before 'build 'copy-resources
4248 (lambda _
4249 (copy-recursively "src/main/resources"
4250 "build/classes/")
4251 #t))
4252 (add-before 'build 'fix-jdom
4253 (lambda _
4254 ;; The newer version of jdom now sets multiple features by default
4255 ;; that are not supported.
4256 ;; Skip these features
4257 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4258 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4259 "// skip"))))
4260 (add-before 'build 'reinstate-cli
4261 ;; The CLI was removed in 2.1.0, but we still need it to build some
4262 ;; maven dependencies, and some parts of maven itself. We can't use
4263 ;; the maven plugin for that yet.
4264 (lambda _
4265 (with-output-to-file "src/main/java/org/codehaus/plexus/metadata/PlexusMetadataGeneratorCli.java"
4266 (lambda _
4267 ;; Copied from a previous version of this package.
4268 (display "package org.codehaus.plexus.metadata;
4269
4270import java.io.File;
4271import java.util.Arrays;
4272import java.util.Collections;
4273
4274import org.apache.commons.cli.CommandLine;
4275import org.apache.commons.cli.OptionBuilder;
4276import org.apache.commons.cli.Options;
4277import org.codehaus.plexus.PlexusContainer;
4278import org.codehaus.plexus.tools.cli.AbstractCli;
4279
4280public class PlexusMetadataGeneratorCli
4281 extends AbstractCli
4282{
4283 public static final char SOURCE_DIRECTORY = 's';
4284 public static final char SOURCE_ENCODING = 'e';
4285 public static final char CLASSES_DIRECTORY = 'c';
4286 public static final char OUTPUT_FILE = 'o';
4287 public static final char DESCRIPTORS_DIRECTORY = 'm';
4288
4289 public static void main( String[] args )
4290 throws Exception
4291 {
4292 new PlexusMetadataGeneratorCli().execute( args );
4293 }
4294
4295 @Override
4296 public String getPomPropertiesPath()
4297 {
4298 return \"META-INF/maven/org.codehaus.plexus/plexus-metadata-generator/pom.properties\";
4299 }
4300
4301 @Override
4302 @SuppressWarnings(\"static-access\")
4303 public Options buildCliOptions( Options options )
4304 {
4305 options.addOption( OptionBuilder.withLongOpt( \"source\" ).hasArg().withDescription( \"Source directory.\" ).create( SOURCE_DIRECTORY ) );
4306 options.addOption( OptionBuilder.withLongOpt( \"encoding\" ).hasArg().withDescription( \"Source file encoding.\" ).create( SOURCE_ENCODING ) );
4307 options.addOption( OptionBuilder.withLongOpt( \"classes\" ).hasArg().withDescription( \"Classes directory.\" ).create( CLASSES_DIRECTORY ) );
4308 options.addOption( OptionBuilder.withLongOpt( \"output\" ).hasArg().withDescription( \"Output directory.\" ).create( OUTPUT_FILE ) );
4309 options.addOption( OptionBuilder.withLongOpt( \"descriptors\" ).hasArg().withDescription( \"Descriptors directory.\" ).create( DESCRIPTORS_DIRECTORY ) );
4310 return options;
4311 }
4312
4313 public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus )
4314 throws Exception
4315 {
4316 MetadataGenerator metadataGenerator = plexus.lookup( MetadataGenerator.class );
4317
4318 MetadataGenerationRequest request = new MetadataGenerationRequest();
4319 request.classesDirectory = new File( cli.getOptionValue( CLASSES_DIRECTORY ) );
4320 request.classpath = Collections.emptyList();
4321 request.sourceDirectories = Arrays.asList( new String[]{ new File( cli.getOptionValue( SOURCE_DIRECTORY ) ).getAbsolutePath() } );
4322 request.sourceEncoding = cli.getOptionValue( SOURCE_ENCODING );
4323 request.useContextClassLoader = true;
4324 request.outputFile = new File( cli.getOptionValue( OUTPUT_FILE ) );
4325 request.componentDescriptorDirectory = new File( cli.getOptionValue( DESCRIPTORS_DIRECTORY ) );
4326
4327 metadataGenerator.generateDescriptor( request );
4328 }
4329}")))))
4330 (add-before 'check 'fix-test-location
4331 (lambda _
4332 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4333 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4334 (("target") "build")))))))
4335 (propagated-inputs
4336 `(("java-plexus-container-default" ,java-plexus-container-default)
4337 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4338 ("java-plexus-utils" ,java-plexus-utils)
4339 ("java-plexus-cli" ,java-plexus-cli)
4340 ("java-plexus-classworlds" ,java-plexus-classworlds)
4341 ("maven-plugin-api" ,maven-plugin-api)
4342 ("maven-plugin-annotations" ,maven-plugin-annotations)
4343 ("maven-core-bootstrap" ,maven-core-bootstrap)
4344 ("maven-model" ,maven-model)
4345 ("java-commons-cli" ,java-commons-cli)
4346 ("java-qdox" ,java-qdox)
4347 ("java-jdom2" ,java-jdom2)
4348 ("java-asm-8" ,java-asm-8)))
4349 (native-inputs
4350 (list java-junit java-guava java-geronimo-xbean-reflect))
4351 (synopsis "Inversion-of-control container for Maven")
4352 (description "The Plexus project provides a full software stack for creating
4353and executing software projects. Based on the Plexus container, the
4354applications can utilise component-oriented programming to build modular,
4355reusable components that can easily be assembled and reused. This package
4356provides the Maven plugin generating the component metadata.")))
4357
4358(define-public java-plexus-container-default-1.7
4359 (package
4360 (inherit java-plexus-container-default)
4361 (version "1.7.1")
4362 (source (origin
4363 (method git-fetch)
4364 (uri (git-reference
4365 (url "https://github.com/codehaus-plexus/plexus-containers")
4366 (commit (string-append "plexus-containers-" version))))
4367 (file-name (git-file-name "java-plexus-container-default" version))
4368 (sha256
4369 (base32
4370 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))))
4371
4372(define java-plexus-containers-parent-pom-1.7
4373 (package
4374 (inherit java-plexus-container-default-1.7)
4375 (name "java-plexus-containers-parent-pom")
4376 (arguments
4377 `(#:tests? #f
4378 #:phases
4379 (modify-phases %standard-phases
4380 (delete 'configure)
4381 (delete 'build)
4382 (replace 'install
4383 (install-pom-file "pom.xml")))))
4384 (propagated-inputs
4385 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4386
4387(define-public java-plexus-component-annotations-1.7
4388 (package
4389 (inherit java-plexus-container-default-1.7)
4390 (name "java-plexus-component-annotations")
4391 (arguments
4392 `(#:jar-name "plexus-component-annotations.jar"
4393 #:source-dir "plexus-component-annotations/src/main/java"
4394 #:tests? #f; no tests
4395 #:phases
4396 (modify-phases %standard-phases
4397 (replace 'install
4398 (install-from-pom "plexus-component-annotations/pom.xml")))))
4399 (propagated-inputs
4400 `(("java-plexus-containers-parent-pom-1.7" ,java-plexus-containers-parent-pom-1.7)))
4401 (inputs '())
4402 (native-inputs '())
4403 (synopsis "Plexus descriptors generator")
4404 (description "This package is a Maven plugin to generate Plexus descriptors
4405from source tags and class annotations.")))
4406
4407(define-public java-plexus-component-metadata-1.7
4408 (package
4409 (inherit java-plexus-container-default-1.7)
4410 (name "java-plexus-component-metadata")
4411 (arguments
4412 `(#:jar-name "plexus-component-metadata.jar"
4413 #:source-dir "src/main/java"
4414 #:test-dir "src/test"
4415 #:phases
4416 (modify-phases %standard-phases
4417 (add-before 'configure 'chdir
4418 (lambda _
4419 (chdir "plexus-component-metadata")
4420 #t))
4421 (add-before 'build 'copy-resources
4422 (lambda _
4423 (copy-recursively "src/main/resources"
4424 "build/classes/")
4425 #t))
4426 (add-before 'build 'fix-jdom
4427 (lambda _
4428 ;; The newer version of jdom now sets multiple features by default
4429 ;; that are not supported.
4430 ;; Skip these features
4431 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4432 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4433 "// skip"))))
4434 (add-before 'check 'fix-test-location
4435 (lambda _
4436 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4437 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4438 (("target") "build")))))))
4439 (propagated-inputs
4440 (list java-plexus-container-default-1.7
4441 java-plexus-component-annotations-1.7
4442 java-plexus-utils
4443 java-plexus-cli
4444 java-plexus-cli
4445 java-plexus-classworlds
4446 maven-plugin-api
4447 maven-plugin-annotations
4448 maven-core-bootstrap
4449 maven-model
4450 java-commons-cli
4451 java-qdox
4452 java-jdom2
4453 java-asm))
4454 (native-inputs
4455 (list java-junit java-guava java-geronimo-xbean-reflect))
4456 (synopsis "Inversion-of-control container for Maven")
4457 (description "The Plexus project provides a full software stack for creating
4458and executing software projects. Based on the Plexus container, the
4459applications can utilise component-oriented programming to build modular,
4460reusable components that can easily be assembled and reused. This package
4461provides the Maven plugin generating the component metadata.")))
4462
4463(define-public java-plexus-cipher
4464 (package
4465 (name "java-plexus-cipher")
4466 (version "2.0")
4467 (source (origin
4468 (method git-fetch)
4469 (uri (git-reference
4470 (url "https://github.com/codehaus-plexus/plexus-cipher")
4471 (commit (string-append "plexus-cipher-" version))))
4472 (file-name (git-file-name name version))
4473 (sha256
4474 (base32
4475 "01fipdsm090n8j4207fl8kbxznkgkmkkgyazf53hm1nwn6na5aai"))))
4476 (build-system ant-build-system)
4477 (arguments
4478 `(#:jar-name "plexus-cipher.jar"
4479 #:source-dir "src/main/java"
4480 #:phases
4481 (modify-phases %standard-phases
4482 (add-before 'build 'generate-javax.inject.Named
4483 (lambda _
4484 (mkdir-p "build/classes/META-INF/sisu")
4485 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4486 (lambda _
4487 (display
4488 "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4489 #t))
4490 (replace 'install (install-from-pom "pom.xml")))))
4491 (inputs
4492 `(("java-cdi-api" ,java-cdi-api)
4493 ("java-javax-inject" ,java-javax-inject)))
4494 (propagated-inputs
4495 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)
4496 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)))
4497 (native-inputs
4498 `(("java-junit" ,java-junit)))
4499 (home-page "https://github.com/sonatype/plexus-cipher")
4500 (synopsis "Encryption/decryption Component")
4501 (description "Plexus-cipher contains a component to deal with encryption
4502and decryption.")
4503 (license license:asl2.0)))
4504
4505(define-public java-plexus-cipher-1.7
4506 (package
4507 (inherit java-plexus-cipher)
4508 (version "1.7")
4509 (source (origin
4510 (method git-fetch)
4511 (uri (git-reference
4512 (url "https://github.com/codehaus-plexus/plexus-cipher")
4513 (commit (string-append "plexus-cipher-" version))))
4514 (file-name (git-file-name "java-plexus-cipher" version))
4515 (sha256
4516 (base32
4517 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4518 (arguments
4519 `(#:jar-name "plexus-cipher.jar"
4520 #:source-dir "src/main/java"
4521 #:tests? #f; FIXME: requires sisu-inject-bean
4522 #:phases
4523 (modify-phases %standard-phases
4524 (add-before 'build 'copy-resources
4525 (lambda _
4526 (copy-recursively "src/main/resources" "build/classes")
4527 (mkdir-p "build/classes/META-INF/sisu")
4528 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4529 (lambda _
4530 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4531 #t))
4532 (add-before 'install 'fix-test-dependency
4533 (lambda _
4534 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4535 (substitute* "pom.xml"
4536 (("provided") "test"))
4537 #t))
4538 (replace 'install (install-from-pom "pom.xml")))))
4539 (propagated-inputs
4540 (list java-sonatype-spice-parent-pom-15))))
4541
4542(define-public java-plexus-java
4543 (package
4544 (name "java-plexus-java")
4545 (version "0.9.10")
4546 (source (origin
4547 (method git-fetch)
4548 (uri (git-reference
4549 (url "https://github.com/codehaus-plexus/plexus-languages")
4550 (commit (string-append "plexus-languages-" version))))
4551 (file-name (git-file-name name version))
4552 (sha256
4553 (base32
4554 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4555 (modules '((guix build utils)))
4556 (snippet
4557 `(begin
4558 (for-each delete-file (find-files "." ".*.jar$"))
4559 #t))))
4560 (build-system ant-build-system)
4561 (arguments
4562 `(#:jar-name "plexus-java.java"
4563 #:source-dir "plexus-java/src/main/java"
4564 #:test-dir "plexus-java/src/test"
4565 #:tests? #f; require mockito 2
4566 #:phases
4567 (modify-phases %standard-phases
4568 (add-after 'build 'generate-metadata
4569 (lambda _
4570 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4571 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4572 "--source" "plexus-java/src/main/java"
4573 "--output" "build/classes/META-INF/plexus/components.xml"
4574 "--classes" "build/classes"
4575 "--descriptors" "build/classes/META-INF")
4576 (invoke "ant" "jar")
4577 #t))
4578 (add-before 'install 'install-parent
4579 (install-pom-file "pom.xml"))
4580 (replace 'install
4581 (install-from-pom "plexus-java/pom.xml")))))
4582 (propagated-inputs
4583 (list java-asm java-qdox-2-M9 java-javax-inject
4584 plexus-parent-pom-4.0))
4585 (inputs
4586 (list java-plexus-component-annotations-1.7))
4587 (native-inputs
4588 (list java-plexus-component-metadata-1.7 java-junit))
4589 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4590 (synopsis "Shared language features for Java")
4591 (description "This package contains shared language features of the Java
4592language, for the plexus project.")
4593 (license license:asl2.0)))
4594
4595(define-public java-plexus-compiler-api
4596 (package
4597 (name "java-plexus-compiler-api")
4598 (version "2.8.4")
4599 (source (origin
4600 (method git-fetch)
4601 (uri (git-reference
4602 (url "https://github.com/codehaus-plexus/plexus-compiler")
4603 (commit (string-append "plexus-compiler-" version))))
4604 (file-name (git-file-name name version))
4605 (sha256
4606 (base32
4607 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4608 (build-system ant-build-system)
4609 (arguments
4610 `(#:jar-name "plexus-compiler-api.jar"
4611 #:source-dir "plexus-compiler-api/src/main/java"
4612 #:test-dir "plexus-compiler-api/src/test"
4613 #:phases
4614 (modify-phases %standard-phases
4615 (replace 'install
4616 (install-from-pom "plexus-compiler-api/pom.xml")))))
4617 (propagated-inputs
4618 `(("java-plexus-container-default" ,java-plexus-container-default)
4619 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4620 ("java-plexus-util" ,java-plexus-utils)))
4621 (native-inputs
4622 (list java-junit))
4623 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4624 (synopsis "Plexus Compilers component's API to manipulate compilers")
4625 (description "This package contains the API used by components to manipulate
4626compilers.")
4627 (license (list license:asl2.0
4628 license:expat))))
4629
4630(define java-plexus-compiler-pom
4631 (package
4632 (inherit java-plexus-compiler-api)
4633 (name "java-plexus-compiler-pom")
4634 (arguments
4635 `(#:tests? #f
4636 #:phases
4637 (modify-phases %standard-phases
4638 (delete 'configure)
4639 (delete 'build)
4640 (replace 'install
4641 (install-pom-file "pom.xml"))
4642 (add-after 'install 'install-compilers
4643 (install-pom-file "plexus-compilers/pom.xml")))))
4644 (propagated-inputs
4645 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4646
4647(define plexus-components-parent-pom-4.0
4648 (package
4649 (name "plexus-components-parent-pom")
4650 (version "4.0")
4651 (source (origin
4652 (method git-fetch)
4653 (uri (git-reference
4654 (url "https://github.com/codehaus-plexus/plexus-components")
4655 (commit (string-append "plexus-components-" version))))
4656 (file-name (git-file-name name version))
4657 (sha256
4658 (base32
4659 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4660 (build-system ant-build-system)
4661 (arguments
4662 `(#:tests? #f
4663 #:phases
4664 (modify-phases %standard-phases
4665 (delete 'configure)
4666 (delete 'build)
4667 (replace 'install
4668 (install-pom-file "pom.xml")))))
4669 (propagated-inputs
4670 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4671 (home-page "https://codehaus-plexus.github.io/plexus-components")
4672 (synopsis "Plexus parent pom")
4673 (description "This package contains the Plexus components parent POM.")
4674 (license license:asl2.0)))
4675
4676(define-public java-plexus-compiler-manager
4677 (package
4678 (inherit java-plexus-compiler-api)
4679 (name "java-plexus-compiler-manager")
4680 (arguments
4681 `(#:jar-name "compiler-compiler-manager.java"
4682 #:source-dir "plexus-compiler-manager/src/main/java"
4683 #:test-dir "plexus-compiler-manager/src/test"
4684 #:tests? #f
4685 #:phases
4686 (modify-phases %standard-phases
4687 (add-after 'build 'generate-metadata
4688 (lambda _
4689 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4690 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4691 "--source" "plexus-compiler-manager/src/main/java"
4692 "--output" "build/classes/META-INF/plexus/components.xml"
4693 "--classes" "build/classes"
4694 "--descriptors" "build/classes/META-INF")
4695 (invoke "ant" "jar")
4696 #t))
4697 (add-after 'generate-metadata 'rebuild
4698 (lambda _
4699 (invoke "ant" "jar")
4700 #t))
4701 (replace 'install
4702 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4703 (propagated-inputs
4704 (list java-plexus-compiler-api java-plexus-compiler-pom
4705 java-plexus-container-default-1.7))
4706 (native-inputs
4707 (list unzip java-plexus-component-metadata-1.7))
4708 (synopsis "Compiler management for Plexus Compiler component")
4709 (description "Plexus Compiler is a Plexus component to use different
4710compilers through a uniform API. This component chooses the compiler
4711implementation to use in a project.")))
4712
4713(define-public java-plexus-compiler-javac
4714 (package
4715 (inherit java-plexus-compiler-api)
4716 (name "java-plexus-compiler-javac")
4717 (arguments
4718 `(#:jar-name "plexus-compiler-javac.jar"
4719 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4720 #:jdk ,icedtea-8
4721 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4722 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4723 #:modules ((guix build ant-build-system)
4724 (guix build utils)
4725 (guix build java-utils)
4726 (sxml simple))
4727 #:phases
4728 (modify-phases %standard-phases
4729 ;; We cannot use java-plexus-component-metadata to generate the metadata
4730 ;; because it ultimately depends on this package.
4731 ;; Create it manually instead
4732 (add-before 'build 'create-metadata
4733 (lambda _
4734 (let* ((dir "build/classes/META-INF/plexus")
4735 (file (string-append dir "/components.xml")))
4736 (mkdir-p dir)
4737 (with-output-to-file file
4738 (lambda _
4739 (sxml->xml
4740 `(component-set
4741 (components
4742 (component
4743 (role "org.codehaus.plexus.compiler.Compiler")
4744 (role-hint "javac")
4745 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4746 (isolated-realm "false"))))))))
4747 #t))
4748 (replace 'install
4749 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4750 (propagated-inputs
4751 (list java-plexus-compiler-api java-plexus-utils
4752 java-plexus-container-default))
4753 (synopsis "Javac Compiler support for Plexus Compiler component")
4754 (description "This package contains the Javac Compiler support for Plexus
4755Compiler component.")))
4756
4757(define plexus-components-pom-1.1.20
4758 (package
4759 (name "plexus-components-pom-1.1.20")
4760 (version "1.1.20")
4761 (source (origin
4762 (method git-fetch)
4763 (uri (git-reference
4764 (url "https://github.com/codehaus-plexus/plexus-components")
4765 (commit (string-append "plexus-components-" version))))
4766 (file-name (git-file-name name version))
4767 (sha256
4768 (base32
4769 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4770 (build-system ant-build-system)
4771 (arguments
4772 `(#:tests? #f
4773 #:phases
4774 (modify-phases %standard-phases
4775 (delete 'configure)
4776 (delete 'build)
4777 (replace 'install
4778 (install-pom-file "pom.xml")))))
4779 (propagated-inputs
4780 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4781 (home-page "https://github.com/codehaus-plexus/plexus-components")
4782 (synopsis "Maven parent pom for plexus packages")
4783 (description "This package contains the parent pom for plexus component
4784packages.")
4785 (license license:asl2.0)))
4786
4787(define-public java-plexus-digest
4788 (package
4789 (name "java-plexus-digest")
4790 (version "1.2")
4791 (source (origin
4792 (method git-fetch)
4793 (uri (git-reference
4794 (url "https://github.com/codehaus-plexus/plexus-digest")
4795 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4796 (file-name (git-file-name name version))
4797 (sha256
4798 (base32
4799 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4800 (build-system ant-build-system)
4801 (arguments
4802 `(#:jar-name "plexus-digest.jar"
4803 #:source-dir "src/main/java"
4804 #:tests? #f
4805 #:phases
4806 (modify-phases %standard-phases
4807 (replace 'install
4808 (install-from-pom "pom.xml")))))
4809 (propagated-inputs
4810 (list java-plexus-utils plexus-components-pom-1.1.20))
4811 (native-inputs
4812 (list java-junit))
4813 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4814 (synopsis "Hash function utilities for Java")
4815 (description "This package is a plexus component that contains hash
4816function utilities.")
4817 (license license:asl2.0)))
4818
4819(define-public java-plexus-sec-dispatcher
4820 (package
4821 (name "java-plexus-sec-dispatcher")
4822 (version "2.0")
4823 (source (origin
4824 (method git-fetch)
4825 (uri (git-reference
4826 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
4827 (commit (string-append "plexus-sec-dispatcher-" version))))
4828 (sha256
4829 (base32
4830 "0665zcyxkv2knydxgv2dn64zvy1dx9j9af12ds9s64qmzd1rk6pk"))
4831 (file-name (git-file-name name version))))
4832 (arguments
4833 `(#:jar-name "plexus-sec-dispatcher.jar"
4834 #:source-dir "src/main/java"
4835 #:phases
4836 (modify-phases %standard-phases
4837 (add-before 'build 'generate-models
4838 (lambda* (#:key inputs #:allow-other-keys)
4839 (define (modello-single-mode file version mode)
4840 (invoke "java"
4841 "org.codehaus.modello.ModelloCli"
4842 file mode "src/main/java" version
4843 "false" "true"))
4844 (let ((file "src/main/mdo/settings-security.mdo"))
4845 (modello-single-mode file "1.0.0" "java")
4846 (modello-single-mode file "1.0.0" "xpp3-reader")
4847 (modello-single-mode file "1.0.0" "xpp3-writer"))
4848 #t))
4849 (add-before 'build 'generate-javax.inject.Named
4850 (lambda _
4851 (mkdir-p "build/classes/META-INF/sisu")
4852 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4853 (lambda _
4854 (display
4855 "org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher\n")))
4856 #t))
4857 (add-before 'check 'fix-paths
4858 (lambda _
4859 (copy-recursively "src/test/resources" "target")
4860 #t))
4861 (replace 'install (install-from-pom "pom.xml")))))
4862 (propagated-inputs
4863 (list java-plexus-utils java-plexus-cipher plexus-parent-pom-8))
4864 (native-inputs
4865 (list java-javax-inject
4866 java-modello-core
4867 ;; for modello
4868 java-plexus-container-default
4869 java-plexus-classworlds
4870 java-plexus-utils
4871 java-guava
4872 java-geronimo-xbean-reflect
4873 ;; modello plugins
4874 java-modello-plugins-java
4875 java-modello-plugins-xml
4876 java-modello-plugins-xpp3
4877 ;; for tests
4878 java-junit))
4879 (build-system ant-build-system)
4880 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4881 (synopsis "Plexus Security Dispatcher Component")
4882 (description "This package is the Plexus Security Dispatcher Component.
4883This component decrypts a string passed to it.")
4884 (license license:asl2.0)))
4885
4886(define-public java-plexus-sec-dispatcher-1.4
4887 (package
4888 (inherit java-plexus-sec-dispatcher)
4889 (version "1.4")
4890 (source (origin
4891 (method git-fetch)
4892 (uri (git-reference
4893 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
4894 (commit (string-append "sec-dispatcher-" version))))
4895 (sha256
4896 (base32
4897 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4898 (file-name (git-file-name "java-plexus-sec-dispatcher" version))))
4899 (arguments
4900 (substitute-keyword-arguments (package-arguments java-plexus-sec-dispatcher)
4901 ((#:phases phases)
4902 `(modify-phases ,phases
4903 (delete 'generate-javax.inject.Named)
4904 (add-before 'build 'generate-components.xml
4905 (lambda _
4906 (mkdir-p "build/classes/META-INF/plexus")
4907 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4908 (lambda _
4909 (display
4910 "<component-set>\n
4911 <components>\n
4912 <component>\n
4913 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4914 <role-hint>default</role-hint>\n
4915 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4916 <description></description>\n
4917 <requirements>\n
4918 <requirement>\n
4919 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4920 <field-name>_cipher</field-name>\n
4921 </requirement>\n
4922 <requirement>\n
4923 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4924 <field-name>_decryptors</field-name>\n
4925 </requirement>\n
4926 </requirements>\n
4927 <configuration>\n
4928 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4929 </configuration>\n
4930 </component>\n
4931 </components>\n
4932</component-set>\n")))))))))
4933 (propagated-inputs
4934 (list java-plexus-utils java-plexus-cipher-1.7
4935 java-sonatype-spice-parent-pom-12))))
4936
4937(define-public java-plexus-cli
4938 (package
4939 (name "java-plexus-cli")
4940 (version "1.7")
4941 (source (origin
4942 (method git-fetch)
4943 (uri (git-reference
4944 (url "https://github.com/sonatype/plexus-cli")
4945 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4946 (file-name (string-append name "-" version))
4947 (sha256
4948 (base32
4949 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4950 (build-system ant-build-system)
4951 (arguments
4952 `(#:jar-name "plexus-cli.jar"
4953 #:source-dir "src/main/java"
4954 #:jdk ,icedtea-8
4955 #:test-dir "src/test"))
4956 (inputs
4957 (list java-commons-cli java-plexus-container-default
4958 java-plexus-classworlds))
4959 (native-inputs
4960 (list java-plexus-utils java-junit java-guava))
4961 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4962 (synopsis "CLI building library for plexus")
4963 (description "This package is a library to help creating CLI around
4964Plexus components.")
4965 (license license:asl2.0)))
4966
4967(define-public java-plexus-build-api
4968 (package
4969 (name "java-plexus-build-api")
4970 (version "0.0.7")
4971 (source (origin
4972 (method git-fetch)
4973 (uri (git-reference
4974 (url "https://github.com/codehaus-plexus/plexus-build-api")
4975 (commit (string-append "plexus-build-api-" version))))
4976 (file-name (git-file-name name version))
4977 (sha256
4978 (base32
4979 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4980 (build-system ant-build-system)
4981 (arguments
4982 `(#:jar-name "plexus-build-api.jar"
4983 #:source-dir "src/main/java"
4984 #:jdk ,icedtea-8
4985 #:tests? #f; FIXME: how to run the tests?
4986 #:phases
4987 (modify-phases %standard-phases
4988 (add-before 'build 'copy-resources
4989 (lambda _
4990 (copy-recursively "src/main/resources" "build/classes")
4991 (substitute* (find-files "build/classes")
4992 (("\\$\\{project.version\\}") ,version))
4993 #t))
4994 (add-before 'build 'generate-plexus-compontent
4995 (lambda _
4996 (mkdir-p "build/classes/META-INF/plexus")
4997 ;; This file is required for plexus to inject this package.
4998 ;; FIXME: how is it generated?
4999 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
5000 (lambda _
5001 (display
5002 "<component-set>\n
5003 <components>\n
5004 <component>\n
5005 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
5006 <role-hint>default</role-hint>\n
5007 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
5008 <description>Filesystem based non-incremental build context implementation\n
5009which behaves as if all files were just created.</description>\n
5010 </component>\n
5011 </components>\n
5012</component-set>\n")))
5013 #t))
5014 (replace 'install
5015 (install-from-pom "pom.xml")))))
5016 (inputs
5017 (list java-plexus-utils-3.2.1 java-plexus-container-default))
5018 (home-page "https://github.com/codehaus-plexus/plexus-build-api/")
5019 (synopsis "Base build API for maven")
5020 (description "This package contains the base build API for maven and
5021a default implementation of it. This API is about scanning files in a
5022project and determining what files need to be rebuilt.")
5023 (license license:asl2.0)))
5024
5025(define-public java-modello-core
5026 (package
5027 (name "java-modello-core")
5028 (version "1.11")
5029 (source (origin
5030 (method git-fetch)
5031 (uri (git-reference
5032 (url "https://github.com/codehaus-plexus/modello")
5033 (commit (string-append "modello-" version))))
5034 (file-name (git-file-name name version))
5035 (sha256
5036 (base32
5037 "18885sim7z9j3wy19i9083y9kc8l9xxl2px823a96q4rnqj5z8s2"))))
5038 (build-system ant-build-system)
5039 (arguments
5040 `(#:jar-name "modello-core.jar"
5041 #:source-dir "modello-core/src/main/java"
5042 #:test-dir "modello-core/src/test"
5043 #:main-class "org.codehaus.modello.ModelloCli"
5044 #:jdk ,icedtea-8
5045 #:phases
5046 (modify-phases %standard-phases
5047 (add-before 'build 'copy-resources
5048 (lambda _
5049 (mkdir-p "build/classes/META-INF/plexus")
5050 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
5051 "build/classes/META-INF/plexus/components.xml")
5052 #t))
5053 (add-before 'check 'fix-tests
5054 (lambda _
5055 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
5056 (substitute* '("modello/core/DefaultModelloCoreTest.java"
5057 "modello/core/io/ModelReaderTest.java")
5058 (("src/test") "modello-core/src/test")))
5059 #t)))))
5060 (propagated-inputs
5061 (list java-plexus-utils java-plexus-container-default
5062 java-plexus-build-api))
5063 (native-inputs
5064 (list java-junit java-plexus-classworlds java-geronimo-xbean-reflect
5065 java-guava))
5066 (home-page "https://codehaus-plexus.github.io/modello/")
5067 (synopsis "Framework for code generation from a simple model")
5068 (description "Modello is a framework for code generation from a simple model.
5069
5070Modello generates code from a simple model format: based on a plugin
5071architecture, various types of code and descriptors can be generated from the
5072single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
5073XSD and documentation.")
5074 (license (list
5075 license:expat
5076 ;; Although this package uses only files licensed under expat,
5077 ;; other parts of the source are licensed under different
5078 ;; licenses. We include them to be inherited by other packages.
5079 license:asl2.0
5080 ;; Some files in modello-plugin-java are licensed under a
5081 ;; 5-clause BSD license.
5082 (license:non-copyleft
5083 (string-append "file:///modello-plugins/modello-plugin-java/"
5084 "src/main/java/org/codehaus/modello/plugin/"
5085 "java/javasource/JNaming.java"))))))
5086
5087(define-public java-modello-plugins-java
5088 (package
5089 (inherit java-modello-core)
5090 (name "java-modello-plugins-java")
5091 (arguments
5092 `(#:jar-name "modello-plugins-java.jar"
5093 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
5094 #:test-dir "modello-plugins/modello-plugin-java/src/test"
5095 #:jdk ,icedtea-8
5096 #:tests? #f; requires maven-model, which depends on this package
5097 #:phases
5098 (modify-phases %standard-phases
5099 (add-before 'build 'copy-resources
5100 (lambda _
5101 (mkdir-p "build/classes")
5102 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
5103 "build/classes")
5104 #t)))))
5105 (inputs
5106 (list java-modello-core))
5107 (synopsis "Modello Java Plugin")
5108 (description "Modello Java Plugin generates Java objects for the model.")))
5109
5110(define-public java-modello-plugins-xml
5111 (package
5112 (inherit java-modello-core)
5113 (name "java-modello-plugins-xml")
5114 (arguments
5115 `(#:jar-name "modello-plugins-xml.jar"
5116 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
5117 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
5118 #:jdk ,icedtea-8
5119 #:phases
5120 (modify-phases %standard-phases
5121 (add-before 'build 'copy-resources
5122 (lambda _
5123 (mkdir-p "build/classes")
5124 (copy-recursively
5125 "modello-plugins/modello-plugin-xml/src/main/resources"
5126 "build/classes")
5127 #t))
5128 (add-before 'check 'fix-paths
5129 (lambda _
5130 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
5131 (substitute*
5132 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
5133 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
5134 #t)))))
5135 (propagated-inputs
5136 (list java-modello-core java-modello-plugins-java))
5137 (synopsis "Modello XML Plugin")
5138 (description "Modello XML Plugin contains shared code for every plugins
5139working on XML representation of the model.")))
5140
5141(define-public java-modello-test
5142 (package
5143 (inherit java-modello-core)
5144 (name "java-modello-test")
5145 (arguments
5146 `(#:jar-name "modello-test.jar"
5147 #:source-dir "modello-test/src/main/java"
5148 #:tests? #f; no tests
5149 #:jdk ,icedtea-8))
5150 (inputs
5151 (list java-plexus-utils java-plexus-compiler-api
5152 java-plexus-compiler-javac java-plexus-container-default))
5153 (synopsis "Modello test package")
5154 (description "The modello test package contains the basis to create
5155Modello generator unit-tests, including sample models and xml files to test
5156every feature for every plugin.")))
5157
5158(define-public java-modello-plugins-xpp3
5159 (package
5160 (inherit java-modello-core)
5161 (name "java-modello-plugins-xpp3")
5162 (arguments
5163 `(#:jar-name "modello-plugins-xpp3.jar"
5164 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5165 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5166 ;; One of the test dependencies is maven-model which depends on this package.
5167 #:tests? #f
5168 #:jdk ,icedtea-8
5169 #:phases
5170 (modify-phases %standard-phases
5171 (add-before 'build 'copy-resources
5172 (lambda _
5173 (mkdir-p "build/classes")
5174 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5175 "build/classes")
5176 #t)))))
5177 (propagated-inputs
5178 (list java-modello-core java-modello-plugins-java
5179 java-modello-plugins-xml))
5180 (native-inputs
5181 (modify-inputs (package-native-inputs java-modello-core)
5182 (prepend java-xmlunit java-modello-test)))
5183 (synopsis "Modello XPP3 Plugin")
5184 (description "The modello XPP3 plugin generates XML readers and writers based
5185on the XPP3 API (XML Pull Parser).")))
5186
5187(define-public java-ow-util-ant-tasks
5188 (package
5189 (name "java-ow-util-ant-tasks")
5190 (version "1.3.2")
5191 (source (origin
5192 (method url-fetch)
5193 (uri (string-append
5194 "mirror://debian/pool/main/o/ow-util-ant-tasks/"
5195 "ow-util-ant-tasks_" version ".orig.tar.gz"))
5196 (sha256
5197 (base32
5198 "1y5ln1g36aligwcadqksdj18i5ghqnxn523wjbzy2zyd7w58fgy5"))))
5199 (build-system ant-build-system)
5200 (arguments
5201 `(#:jar-name "ow-util-ant-tasks.jar"
5202 #:tests? #f; no tests
5203 #:phases
5204 (modify-phases %standard-phases
5205 (add-before 'build 'delete-cyclic-dependency
5206 (lambda _
5207 ;; This file depends on asm-3, which depends on this package
5208 (delete-file "src/org/objectweb/util/ant/DependencyAnalyzer.java")
5209 ;; This file depends on xalan
5210 (delete-file "src/org/objectweb/util/ant/Xalan2Liaison.java")))
5211 (add-before 'build 'fix-new-ant
5212 (lambda _
5213 (substitute* "src/org/objectweb/util/ant/MultipleCopy.java"
5214 ((", destFile.getAbsolutePath\\(\\)")
5215 ", new String[] { destFile.getAbsolutePath() }")))))))
5216 (home-page "https://packages.debian.org/source/stretch/ow-util-ant-tasks")
5217 (synopsis "Replacement for base ant tasks")
5218 (description "This library is used in the legacy build process of several
5219key frameworks developed by ObjectWeb, among them legacy versions of the
5220ObjectWeb ASM bytecode manipulation framework.")
5221 (license license:lgpl2.0+)))
5222
5223(define-public java-asm
5224 (package
5225 (name "java-asm")
5226 (version "6.0")
5227 (source (origin
5228 (method url-fetch)
5229 (uri (string-append "https://download.forge.ow2.org/asm/"
5230 "asm-" version ".tar.gz"))
5231 (sha256
5232 (base32
5233 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5234 (build-system ant-build-system)
5235 (arguments
5236 `(#:build-target "compile"
5237 ;; The tests require an old version of Janino, which no longer compiles
5238 ;; with the JDK7.
5239 #:tests? #f
5240 #:make-flags
5241 (list
5242 ;; We don't need these extra ant tasks, but the build system asks us to
5243 ;; provide a path anyway.
5244 "-Dobjectweb.ant.tasks.path=dummy-path"
5245 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5246 ;; used during the build automatically by ant-build-system, but
5247 ;; java-asm's build.xml fails unless we provide something here.
5248 "-Dbiz.aQute.bnd.path=dummy-path")
5249 #:phases
5250 (modify-phases %standard-phases
5251 (add-before 'build 'remove-bnd-dependency
5252 (lambda _
5253 ;; This file is the only one to require bnd, and is not needed
5254 ;; because we don't build a bundle.
5255 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5256 #t))
5257 (add-before 'install 'build-jars
5258 (lambda* (#:key make-flags #:allow-other-keys)
5259 ;; We cannot use the "jar" target because it depends on a couple
5260 ;; of unpackaged, complicated tools.
5261 (mkdir "dist")
5262 (invoke "jar"
5263 "-cf" (string-append "dist/asm-" ,version ".jar")
5264 "-C" "output/build/tmp" ".")))
5265 (add-before 'install 'fix-pom
5266 (lambda _
5267 (substitute* (find-files "archive" "\\.pom$")
5268 (("@product.artifact@") ,version))
5269 #t))
5270 (add-before 'install 'install-parent
5271 (install-pom-file "archive/asm-parent.pom"))
5272 (replace 'install
5273 (install-from-pom "archive/asm.pom")))))
5274 (native-inputs
5275 (list java-junit))
5276 (propagated-inputs
5277 (list java-org-ow2-parent-pom-1.3))
5278 (home-page "https://asm.ow2.io/")
5279 (synopsis "Very small and fast Java bytecode manipulation framework")
5280 (description "ASM is an all purpose Java bytecode manipulation and
5281analysis framework. It can be used to modify existing classes or dynamically
5282generate classes, directly in binary form. The provided common
5283transformations and analysis algorithms allow easily assembling custom
5284complex transformations and code analysis tools.")
5285 (license license:bsd-3)))
5286
5287(define java-org-ow2-parent-pom-1.3
5288 (package
5289 (name "java-org-ow2-parent-pom")
5290 (version "1.3")
5291 (source (origin
5292 (method url-fetch)
5293 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5294 (sha256
5295 (base32
5296 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5297 (build-system ant-build-system)
5298 (arguments
5299 `(#:tests? #f
5300 #:phases
5301 (modify-phases %standard-phases
5302 (delete 'unpack)
5303 (delete 'build)
5304 (delete 'configure)
5305 (replace 'install
5306 ,#~(install-pom-file #$source)))))
5307 (home-page "https://ow2.org")
5308 (synopsis "Ow2.org parent pom")
5309 (description "This package contains the parent pom for projects from ow2.org,
5310including java-asm.")
5311 (license license:lgpl2.1+)))
5312
5313(define java-asm-bootstrap
5314 (package
5315 (inherit java-asm)
5316 (name "java-asm-bootstrap")
5317 (arguments
5318 (substitute-keyword-arguments (package-arguments java-asm)
5319 ((#:tests? _) #f)))
5320 (native-inputs `())))
5321
5322(define-public java-asm-3
5323 (package
5324 (inherit java-asm)
5325 (version "3.1")
5326 (source (origin
5327 (method git-fetch)
5328 (uri (git-reference
5329 (url "https://gitlab.ow2.org/asm/asm")
5330 (commit "ASM_3_1")))
5331 (file-name (git-file-name "java-asm" version))
5332 (sha256
5333 (base32
5334 "0xbyf2sl8j6mrvfpg2da0vjdp906rac62l66gkk82x5cn3vc30h4"))
5335 (modules '((guix build utils)))
5336 (snippet `(for-each delete-file (find-files "." "\\.jar$")))))
5337 (arguments
5338 `(#:build-target "jar"
5339 #:test-target "test"
5340 #:tests? #f; require legacy test software
5341 #:phases
5342 (modify-phases %standard-phases
5343 (replace 'install (install-jars "output/dist"))
5344 (delete 'generate-jar-indices))))
5345 (native-inputs (list java-ow-util-ant-tasks))))
5346
5347(define-public java-asm-8
5348 (package
5349 (inherit java-asm)
5350 (version "8.0.1")
5351 (source (origin
5352 (method git-fetch)
5353 (uri (git-reference
5354 (url "https://gitlab.ow2.org/asm/asm")
5355 (commit (string-append
5356 "ASM_" (string-join (string-split version #\.)
5357 "_")))))
5358 (file-name (git-file-name "java-asm" version))
5359 (sha256
5360 (base32
5361 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5362 (arguments
5363 `(#:jar-name "asm8.jar"
5364 #:source-dir "asm/src/main/java"
5365 #:test-dir "asm/src/test"
5366 ;; tests depend on junit5
5367 #:tests? #f))
5368 (propagated-inputs '())
5369 (native-inputs '())))
5370
5371(define-public java-asm-tree-8
5372 (package
5373 (inherit java-asm-8)
5374 (name "java-asm-tree")
5375 (arguments
5376 `(#:jar-name "asm-tree.jar"
5377 #:source-dir "asm-tree/src/main/java"
5378 #:test-dir "asm-tree/src/test"
5379 ;; tests depend on junit5
5380 #:tests? #f))
5381 (inputs
5382 (list java-asm-8))))
5383
5384(define-public java-asm-analysis-8
5385 (package
5386 (inherit java-asm-8)
5387 (name "java-asm-analysis")
5388 (arguments
5389 `(#:jar-name "asm-analysis.jar"
5390 #:source-dir "asm-analysis/src/main/java"
5391 #:test-dir "asm-analysis/src/test"
5392 ;; tests depend on junit5
5393 #:tests? #f))
5394 (inputs
5395 (list java-asm-8 java-asm-tree-8))))
5396
5397(define-public java-asm-util-8
5398 (package
5399 (inherit java-asm-8)
5400 (name "java-asm-util")
5401 (arguments
5402 `(#:jar-name "asm-util8.jar"
5403 #:source-dir "asm-util/src/main/java"
5404 #:test-dir "asm-util/src/test"
5405 ;; tests depend on junit5
5406 #:tests? #f))
5407 (inputs
5408 (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5409
5410(define-public java-asm-commons-8
5411 (package
5412 (inherit java-asm-8)
5413 (name "java-asm-commons")
5414 (arguments
5415 (list #:jar-name "asm-commons8.jar"
5416 #:source-dir "asm-commons/src/main/java"
5417 #:test-dir "asm-commons/src/test"
5418 ;; tests depend on junit5
5419 #:tests? #f))
5420 (inputs (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5421
5422(define-public java-cglib
5423 (package
5424 (name "java-cglib")
5425 (version "3.2.4")
5426 (source
5427 (origin
5428 (method git-fetch)
5429 (uri (git-reference
5430 (url "https://github.com/cglib/cglib")
5431 (commit (string-append
5432 "RELEASE_"
5433 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5434 version)))))
5435 (file-name (git-file-name name version))
5436 (sha256
5437 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5438 (build-system ant-build-system)
5439 (arguments
5440 `(;; FIXME: tests fail because junit runs
5441 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5442 ;; to describe a test at all.
5443 #:tests? #f
5444 #:jar-name "cglib.jar"
5445 #:phases
5446 (modify-phases %standard-phases
5447 (add-after 'unpack 'chdir
5448 (lambda _ (chdir "cglib") #t)))))
5449 (inputs
5450 (list java-asm java-junit))
5451 (home-page "https://github.com/cglib/cglib/")
5452 (synopsis "Java byte code generation library")
5453 (description "The byte code generation library CGLIB is a high level API
5454to generate and transform Java byte code.")
5455 (license license:asl2.0)))
5456
5457(define-public java-objenesis
5458 (package
5459 (name "java-objenesis")
5460 (version "2.5.1")
5461 (source (origin
5462 (method git-fetch)
5463 (uri (git-reference
5464 (url "https://github.com/easymock/objenesis")
5465 (commit version)))
5466 (file-name (git-file-name name version))
5467 (sha256
5468 (base32
5469 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5470 (build-system ant-build-system)
5471 (arguments
5472 `(#:jar-name "objenesis.jar"
5473 #:source-dir "main/src/"
5474 #:test-dir "main/src/test/"))
5475 (native-inputs
5476 (list java-junit java-hamcrest-core))
5477 (home-page "http://objenesis.org/")
5478 (synopsis "Bypass the constructor when creating an object")
5479 (description "Objenesis is a small Java library that serves one purpose:
5480to instantiate a new object of a particular class. It is common to see
5481restrictions in libraries stating that classes must require a default
5482constructor. Objenesis aims to overcome these restrictions by bypassing the
5483constructor on object instantiation.")
5484 (license license:asl2.0)))
5485
5486(define-public java-easymock
5487 (package
5488 (name "java-easymock")
5489 (version "3.4")
5490 (source (origin
5491 (method git-fetch)
5492 (uri (git-reference
5493 (url "https://github.com/easymock/easymock/")
5494 (commit (string-append "easymock-" version))))
5495 (file-name (git-file-name name version))
5496 (sha256
5497 (base32
5498 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5499 (build-system ant-build-system)
5500 (arguments
5501 `(#:jar-name "easymock.jar"
5502 #:source-dir "core/src/main"
5503 #:test-dir "core/src/test"
5504 #:phases
5505 (modify-phases %standard-phases
5506 ;; FIXME: Android support requires the following packages to be
5507 ;; available: com.google.dexmaker.stock.ProxyBuilder
5508 (add-after 'unpack 'delete-android-support
5509 (lambda _
5510 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5511 (substitute* "MocksControl.java"
5512 (("AndroidSupport.isAndroid\\(\\)") "false")
5513 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5514 (delete-file "AndroidClassProxyFactory.java"))
5515 #t))
5516 (add-after 'unpack 'delete-broken-tests
5517 (lambda _
5518 (with-directory-excursion "core/src/test/java/org/easymock"
5519 ;; This test depends on dexmaker.
5520 (delete-file "tests2/ClassExtensionHelperTest.java")
5521
5522 ;; This is not a test.
5523 (delete-file "tests/BaseEasyMockRunnerTest.java")
5524
5525 ;; This test should be executed with a different runner...
5526 (delete-file "tests2/EasyMockAnnotationsTest.java")
5527 ;; ...but deleting it means that we also have to delete these
5528 ;; dependent files.
5529 (delete-file "tests2/EasyMockRunnerTest.java")
5530 (delete-file "tests2/EasyMockRuleTest.java")
5531
5532 ;; This test fails because the file "easymock.properties" does
5533 ;; not exist.
5534 (delete-file "tests2/EasyMockPropertiesTest.java"))
5535 #t)))))
5536 (inputs
5537 (list java-asm java-cglib java-objenesis))
5538 (native-inputs
5539 (list java-junit java-hamcrest-core))
5540 (home-page "https://easymock.org/")
5541 (synopsis "Java library providing mock objects for unit tests")
5542 (description "EasyMock is a Java library that provides an easy way to use
5543mock objects in unit testing.")
5544 (license license:asl2.0)))
5545
5546(define-public java-jmock-1
5547 (package
5548 (name "java-jmock")
5549 (version "1.2.0")
5550 (source (origin
5551 (method git-fetch)
5552 (uri (git-reference
5553 (url "https://github.com/jmock-developers/jmock-library")
5554 (commit version)))
5555 (file-name (git-file-name name version))
5556 (sha256
5557 (base32
5558 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5559 (build-system ant-build-system)
5560 (arguments
5561 `(#:build-target "jars"
5562 #:test-target "run.tests"
5563 #:phases
5564 (modify-phases %standard-phases
5565 (replace 'install (install-jars "build")))))
5566 (home-page "http://jmock.org/")
5567 (synopsis "Mock object library for test-driven development")
5568 (description "JMock is a library that supports test-driven development of
5569Java code with mock objects. Mock objects help you design and test the
5570interactions between the objects in your programs.
5571
5572The jMock library
5573
5574@itemize
5575@item makes it quick and easy to define mock objects
5576@item lets you precisely specify the interactions between
5577 your objects, reducing the brittleness of your tests
5578@item plugs into your favourite test framework
5579@item is easy to extend.
5580@end itemize\n")
5581 (license license:bsd-3)))
5582
5583(define-public java-jmock
5584 (package
5585 (inherit java-jmock-1)
5586 (name "java-jmock")
5587 (version "2.8.2")
5588 (source (origin
5589 (method git-fetch)
5590 (uri (git-reference
5591 (url "https://github.com/jmock-developers/jmock-library")
5592 (commit version)))
5593 (file-name (git-file-name name version))
5594 (sha256
5595 (base32
5596 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5597 (inputs
5598 (list java-hamcrest-all java-asm java-bsh java-junit))
5599 (native-inputs
5600 `(("cglib" ,java-cglib)))
5601 (arguments
5602 `(#:jar-name "java-jmock.jar"
5603 #:source-dir "jmock/src/main/java"
5604 #:test-dir "jmock/src/test"))))
5605
5606(define-public java-jmock-junit4
5607 (package
5608 (inherit java-jmock)
5609 (name "java-jmock-junit4")
5610 (arguments
5611 `(#:jar-name "java-jmock-junit4.jar"
5612 #:source-dir "jmock-junit4/src/main/java"
5613 #:test-dir "jmock-junit4/src/test"))
5614 (inputs
5615 `(("java-hamcrest-all" ,java-hamcrest-all)
5616 ("java-asm" ,java-asm)
5617 ("java-bsh" ,java-bsh)
5618 ("java-jmock" ,java-jmock)
5619 ("java-jumit" ,java-junit)))))
5620
5621(define-public java-jmock-legacy
5622 (package
5623 (inherit java-jmock)
5624 (name "java-jmock-legacy")
5625 (arguments
5626 `(#:jar-name "java-jmock-legacy.jar"
5627 #:source-dir "jmock-legacy/src/main/java"
5628 #:test-dir "jmock-legacy/src/test"
5629 #:phases
5630 (modify-phases %standard-phases
5631 (add-before 'check 'copy-tests
5632 (lambda _
5633 ;; This file is a dependancy of some tests
5634 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5635 (copy-file (string-append "jmock/src/test/java/" file)
5636 (string-append "jmock-legacy/src/test/java/" file))
5637 #t))))))
5638 (inputs
5639 (list java-hamcrest-all
5640 java-objenesis
5641 java-cglib
5642 java-jmock
5643 java-asm
5644 java-bsh
5645 java-junit))
5646 (native-inputs
5647 (list java-jmock-junit4))))
5648
5649(define-public java-hamcrest-all
5650 (package (inherit java-hamcrest-core)
5651 (name "java-hamcrest-all")
5652 (arguments
5653 `(#:jdk ,icedtea-8
5654 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5655 ((#:build-target _) "bigjar")
5656 ((#:phases phases)
5657 `(modify-phases ,phases
5658 ;; Some build targets override the classpath, so we need to patch
5659 ;; the build.xml to ensure that required dependencies are on the
5660 ;; classpath.
5661 (add-after 'unpack 'patch-classpath-for-integration
5662 (lambda* (#:key inputs #:allow-other-keys)
5663 (substitute* "build.xml"
5664 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5665 (string-join
5666 (cons line
5667 (append
5668 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5669 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5670 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5671 ";"))
5672 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5673 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5674 "jar$"))))
5675 #t))
5676 (replace 'install
5677 (lambda* (#:key outputs #:allow-other-keys)
5678 (let* ((target (string-append (assoc-ref outputs "out")
5679 "/share/java/"))
5680 (version-suffix
5681 ,(string-append
5682 "-" (package-version java-hamcrest-core) ".jar"))
5683 (install-without-version-suffix
5684 (lambda (jar)
5685 (copy-file jar
5686 (string-append target
5687 (basename jar version-suffix)
5688 ".jar")))))
5689 (mkdir-p target)
5690 (for-each
5691 install-without-version-suffix
5692 (find-files "build"
5693 (lambda (name _)
5694 (and (string-suffix? ".jar" name)
5695 (not (string-suffix? "-sources.jar" name)))))))
5696 #t)))))))
5697 (inputs
5698 (modify-inputs (package-inputs java-hamcrest-core)
5699 (prepend java-junit
5700 java-jmock-1
5701 ;; This is necessary because of what seems to be a race condition.
5702 ;; This package would sometimes fail to build because hamcrest-core.jar
5703 ;; could not be found, even though it is built as part of this package.
5704 ;; Adding java-hamcrest-core appears to fix this problem. See
5705 ;; https://debbugs.gnu.org/31390 for more information.
5706 java-hamcrest-core
5707 java-easymock)))))
5708
5709(define-public java-jopt-simple
5710 (package
5711 (name "java-jopt-simple")
5712 (version "5.0.3")
5713 (source (origin
5714 (method url-fetch)
5715 (uri (string-append "http://repo1.maven.org/maven2/"
5716 "net/sf/jopt-simple/jopt-simple/"
5717 version "/jopt-simple-"
5718 version "-sources.jar"))
5719 (sha256
5720 (base32
5721 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5722 (build-system ant-build-system)
5723 (arguments
5724 `(#:tests? #f ; there are no tests
5725 #:jar-name "jopt-simple.jar"
5726 #:phases
5727 (modify-phases %standard-phases
5728 (add-before 'install 'create-pom
5729 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" ,version))
5730 (replace 'install
5731 (install-from-pom "pom.xml")))))
5732 (home-page "https://pholser.github.io/jopt-simple/")
5733 (synopsis "Java library for parsing command line options")
5734 (description "JOpt Simple is a Java library for parsing command line
5735options, such as those you might pass to an invocation of @code{javac}. In
5736the interest of striving for simplicity, as closely as possible JOpt Simple
5737attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5738GNU @code{getopt_long}. It also aims to make option parser configuration and
5739retrieval of options and their arguments simple and expressive, without being
5740overly clever.")
5741 (license license:expat)))
5742
5743;; Required by jmh
5744(define-public java-jopt-simple-4
5745 (package
5746 (inherit java-jopt-simple)
5747 (version "4.6")
5748 (source (origin
5749 (method url-fetch)
5750 (uri (string-append "https://repo1.maven.org/maven2/"
5751 "net/sf/jopt-simple/jopt-simple/"
5752 version "/jopt-simple-"
5753 version "-sources.jar"))
5754 (sha256
5755 (base32
5756 "0ny82zczxkn201ld0b7rps0ifzjhfs8m1ncdmy1f50145ciszkpd"))))
5757 (arguments
5758 (substitute-keyword-arguments (package-arguments java-jopt-simple)
5759 ((#:phases phases)
5760 `(modify-phases ,phases
5761 (replace 'create-pom
5762 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple"
5763 ,version))))))))
5764
5765(define-public java-commons-math3
5766 (package
5767 (name "java-commons-math3")
5768 (version "3.6.1")
5769 (source (origin
5770 (method url-fetch)
5771 (uri (string-append "mirror://apache/commons/math/source/"
5772 "commons-math3-" version "-src.tar.gz"))
5773 (sha256
5774 (base32
5775 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5776 (build-system ant-build-system)
5777 (arguments
5778 `(#:build-target "jar"
5779 #:test-target "test"
5780 #:make-flags
5781 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
5782 (junit #$(this-package-native-input "java-junit")))
5783 (list (string-append "-Djunit.jar="
5784 (car (find-files junit "jar$")))
5785 (string-append "-Dhamcrest.jar="
5786 (car (find-files hamcrest ".*.jar$")))))
5787 #:phases
5788 (modify-phases %standard-phases
5789 ;; We want to build the jar in the build phase and run the tests
5790 ;; later in a separate phase.
5791 (add-after 'unpack 'untangle-targets
5792 (lambda _
5793 (substitute* "build.xml"
5794 (("name=\"jar\" depends=\"test\"")
5795 "name=\"jar\" depends=\"compile\""))))
5796 ;; There is no install target.
5797 (replace 'install
5798 (install-from-pom "pom.xml")))))
5799 (native-inputs
5800 (list java-junit java-hamcrest-core))
5801 (home-page "https://commons.apache.org/math/")
5802 (synopsis "Apache Commons mathematics library")
5803 (description "Commons Math is a library of lightweight, self-contained
5804mathematics and statistics components addressing the most common problems not
5805available in the Java programming language or Commons Lang.")
5806 (license license:asl2.0)))
5807
5808(define-public java-jmh
5809 (package
5810 (name "java-jmh")
5811 (version "1.32")
5812 (source (origin
5813 (method git-fetch)
5814 (uri (git-reference
5815 (url "https://github.com/openjdk/jmh")
5816 (commit version)))
5817 (file-name (git-file-name name version))
5818 (sha256
5819 (base32
5820 "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0"))))
5821 (build-system maven-build-system)
5822 (arguments
5823 `(#:exclude
5824 (("org.apache.maven.plugins" .
5825 ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin"
5826 "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin"))
5827 ("com.mycila.maven-license-plugin" . ("maven-license-plugin"))
5828 ("org.apache.maven.wagon" . ("wagon-ssh")))
5829 #:maven-plugins
5830 (("maven-enforcer-plugin" ,maven-enforcer-plugin)
5831 ,@(default-maven-plugins))
5832 #:phases
5833 (modify-phases %standard-phases
5834 (add-after 'unpack 'remove-unnecessary
5835 (lambda _
5836 ;; requires org.apache.maven.archetype:archetype-packaging.
5837 ;; Its subprojects also require groovy, kotlin and scala,
5838 ;; respectively.
5839 (delete-file-recursively "jmh-archetypes"))))))
5840 (propagated-inputs
5841 (list java-jopt-simple-4 java-commons-math3))
5842 (native-inputs
5843 (list java-junit java-hamcrest-core))
5844 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5845 (synopsis "Benchmark harness for the JVM")
5846 (description "JMH is a Java harness for building, running, and analysing
5847nano/micro/milli/macro benchmarks written in Java and other languages
5848targeting the JVM.")
5849 ;; GPLv2 only
5850 (license license:gpl2)))
5851
5852(define-public java-commons-collections4
5853 (package
5854 (name "java-commons-collections4")
5855 (version "4.1")
5856 (source (origin
5857 (method url-fetch)
5858 (uri (string-append "mirror://apache/commons/collections/source/"
5859 "commons-collections4-" version "-src.tar.gz"))
5860 (sha256
5861 (base32
5862 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5863 (build-system ant-build-system)
5864 (arguments
5865 `(#:test-target "test"
5866 #:make-flags
5867 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
5868 (junit #$(this-package-native-input "java-junit"))
5869 (easymock #$(this-package-native-input "java-easymock")))
5870 (list (string-append "-Djunit.jar="
5871 (car (find-files junit "jar$")))
5872 (string-append "-Dhamcrest.jar="
5873 (car (find-files hamcrest "jar$")))
5874 (string-append "-Deasymock.jar=" easymock
5875 "/share/java/easymock.jar")))
5876 #:phases
5877 (modify-phases %standard-phases
5878 (replace 'install
5879 (install-jars "target")))))
5880 (native-inputs
5881 (list java-junit java-hamcrest-core java-easymock))
5882 (home-page "https://commons.apache.org/collections/")
5883 (synopsis "Collections framework")
5884 (description "The Java Collections Framework is the recognised standard
5885for collection handling in Java. Commons-Collections seek to build upon the
5886JDK classes by providing new interfaces, implementations and utilities. There
5887are many features, including:
5888
5889@itemize
5890@item @code{Bag} interface for collections that have a number of copies of
5891 each object
5892@item @code{BidiMap} interface for maps that can be looked up from value to
5893 key as well and key to value
5894@item @code{MapIterator} interface to provide simple and quick iteration over
5895 maps
5896@item Transforming decorators that alter each object as it is added to the
5897 collection
5898@item Composite collections that make multiple collections look like one
5899@item Ordered maps and sets that retain the order elements are added in,
5900 including an LRU based map
5901@item Reference map that allows keys and/or values to be garbage collected
5902 under close control
5903@item Many comparator implementations
5904@item Many iterator implementations
5905@item Adapter classes from array and enumerations to collections
5906@item Utilities to test or create typical set-theory properties of collections
5907 such as union, intersection, and closure.
5908@end itemize\n")
5909 (license license:asl2.0)))
5910
5911(define-public java-commons-collections
5912 (package
5913 (inherit java-commons-collections4)
5914 (name "java-commons-collections")
5915 (version "3.2.2")
5916 (source (origin
5917 (method url-fetch)
5918 (uri (string-append "mirror://apache/commons/collections/source/"
5919 "commons-collections-" version "-src.tar.gz"))
5920 (sha256
5921 (base32
5922 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5923 (patches
5924 (search-patches "java-commons-collections-fix-java8.patch"))))
5925 (arguments
5926 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5927 ((#:phases phases)
5928 `(modify-phases ,phases
5929 ;; The manifest is required by the build procedure
5930 (add-before 'build 'add-manifest
5931 (lambda _
5932 (mkdir-p "build/conf")
5933 (call-with-output-file "build/conf/MANIFEST.MF"
5934 (lambda (file)
5935 (format file "Manifest-Version: 1.0\n")))
5936 #t))
5937 (replace 'install
5938 (install-jars "build"))))))))
5939
5940(define java-commons-collections-test-classes
5941 (package
5942 (inherit java-commons-collections)
5943 (arguments
5944 `(#:jar-name "commons-collections-test-classes.jar"
5945 #:source-dir "src/test"
5946 #:tests? #f))
5947 (inputs
5948 `(("collection" ,java-commons-collections)))))
5949
5950(define-public java-commons-beanutils
5951 (package
5952 (name "java-commons-beanutils")
5953 (version "1.9.3")
5954 (source (origin
5955 (method url-fetch)
5956 (uri (string-append "mirror://apache/commons/beanutils/source/"
5957 "commons-beanutils-" version "-src.tar.gz"))
5958 (sha256
5959 (base32
5960 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5961 (build-system ant-build-system)
5962 (arguments
5963 `(#:test-target "test"
5964 #:tests? #f
5965 #:phases
5966 (modify-phases %standard-phases
5967 (replace 'install
5968 (lambda* (#:key outputs #:allow-other-keys)
5969 (rename-file (string-append "dist/commons-beanutils-" ,version
5970 "-SNAPSHOT.jar")
5971 "commons-beanutils.jar")
5972 (install-file "commons-beanutils.jar"
5973 (string-append (assoc-ref outputs "out") "/share/java/"))
5974 #t)))))
5975 (inputs
5976 `(("logging" ,java-commons-logging-minimal)
5977 ("collections" ,java-commons-collections)))
5978 (native-inputs
5979 `(("junit" ,java-junit)
5980 ("collections-test" ,java-commons-collections-test-classes)))
5981 (home-page "https://commons.apache.org/beanutils/")
5982 (synopsis "Dynamically set or get properties in Java")
5983 (description "BeanUtils provides a simplified interface to reflection and
5984introspection to set or get dynamically determined properties through their
5985setter and getter method.")
5986 (license license:asl2.0)))
5987
5988(define-public java-commons-io
5989 (package
5990 (name "java-commons-io")
5991 (version "2.5")
5992 (source
5993 (origin
5994 (method url-fetch)
5995 (uri (string-append "mirror://apache/commons/io/source/"
5996 "commons-io-" version "-src.tar.gz"))
5997 (sha256
5998 (base32
5999 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
6000 (build-system ant-build-system)
6001 (outputs '("out" "doc"))
6002 (arguments
6003 `(#:test-target "test"
6004 #:make-flags
6005 ,#~(list (string-append "-Djunit.jar="
6006 (car (find-files #$(this-package-native-input "java-junit")
6007 "jar$"))))
6008 #:phases
6009 (modify-phases %standard-phases
6010 (add-after 'build 'build-javadoc ant-build-javadoc)
6011 (replace 'install (install-from-pom "pom.xml"))
6012 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6013 (native-inputs
6014 (list java-junit java-hamcrest-core))
6015 (propagated-inputs
6016 (list apache-commons-parent-pom-39))
6017 (home-page "https://commons.apache.org/io/")
6018 (synopsis "Common useful IO related classes")
6019 (description "Commons-IO contains utility classes, stream implementations,
6020file filters and endian classes.")
6021 (license license:asl2.0)))
6022
6023(define-public java-commons-exec-1.1
6024 (package
6025 (name "java-commons-exec")
6026 (version "1.1")
6027 (source
6028 (origin
6029 (method url-fetch)
6030 (uri (string-append "mirror://apache/commons/exec/source/"
6031 "commons-exec-" version "-src.tar.gz"))
6032 (sha256
6033 (base32
6034 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
6035 (build-system ant-build-system)
6036 (arguments
6037 `(#:test-target "test"
6038 #:make-flags
6039 ,#~(list (string-append "-Dmaven.junit.jar="
6040 (car (find-files #$(this-package-native-input "java-junit")
6041 "jar$"))))
6042 #:phases
6043 (modify-phases %standard-phases
6044 (add-before 'build 'delete-network-tests
6045 (lambda _
6046 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
6047 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
6048 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
6049 #t))
6050 ;; The "build" phase automatically tests.
6051 (delete 'check)
6052 (replace 'install (install-jars "target")))))
6053 (native-inputs
6054 (list java-junit))
6055 (home-page "https://commons.apache.org/proper/commons-exec/")
6056 (synopsis "Common program execution related classes")
6057 (description "Commons-Exec simplifies executing external processes.")
6058 (license license:asl2.0)))
6059
6060(define-public java-commons-exec
6061 (package
6062 (inherit java-commons-exec-1.1)
6063 (version "1.3")
6064 (source
6065 (origin
6066 (method url-fetch)
6067 (uri (string-append "mirror://apache/commons/exec/source/"
6068 "commons-exec-" version "-src.tar.gz"))
6069 (sha256
6070 (base32
6071 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
6072 (arguments
6073 `(#:test-target "test"
6074 #:make-flags
6075 ,#~(list (string-append "-Dmaven.junit.jar="
6076 (car (find-files #$(this-package-native-input "java-junit")
6077 "jar$")))
6078 "-Dmaven.compiler.source=1.7"
6079 "-Dmaven.compiler.target=1.7")
6080 #:phases
6081 (modify-phases %standard-phases
6082 (add-before 'build 'delete-network-tests
6083 (lambda* (#:key inputs #:allow-other-keys)
6084 ;; This test hangs indefinitely.
6085 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
6086 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
6087 (("ping -c 10 127.0.0.1") "sleep 10"))
6088 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
6089 (("/bin/ls") "ls"))
6090 (call-with-output-file "src/test/scripts/ping.sh"
6091 (lambda (port)
6092 (format port "#!~a/bin/sh\nsleep $1\n"
6093 (assoc-ref inputs "bash"))))
6094 #t))
6095 ;; The "build" phase automatically tests.
6096 (delete 'check)
6097 (replace 'install (install-jars "target")))))
6098 (native-inputs
6099 (list java-junit java-hamcrest-core))))
6100
6101(define-public java-commons-lang
6102 (package
6103 (name "java-commons-lang")
6104 (version "2.6")
6105 (source
6106 (origin
6107 (method url-fetch)
6108 (uri (string-append "mirror://apache/commons/lang/source/"
6109 "commons-lang-" version "-src.tar.gz"))
6110 (sha256
6111 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
6112 (build-system ant-build-system)
6113 (outputs '("out" "doc"))
6114 (arguments
6115 `(#:test-target "test"
6116 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
6117 #:phases
6118 (modify-phases %standard-phases
6119 (add-after 'build 'build-javadoc ant-build-javadoc)
6120 (add-before 'check 'disable-failing-test
6121 (lambda _
6122 ;; Disable a failing test
6123 (substitute* "src/test/java/org/apache/commons/lang/\
6124time/FastDateFormatTest.java"
6125 (("public void testFormat\\(\\)")
6126 "public void disabled_testFormat()"))
6127 #t))
6128 (replace 'install (install-jars "target"))
6129 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6130 (native-inputs
6131 (list java-junit))
6132 (home-page "https://commons.apache.org/lang/")
6133 (synopsis "Extension of the java.lang package")
6134 (description "The Commons Lang components contains a set of Java classes
6135that provide helper methods for standard Java classes, especially those found
6136in the @code{java.lang} package in the Sun JDK. The following classes are
6137included:
6138
6139@itemize
6140@item StringUtils - Helper for @code{java.lang.String}.
6141@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
6142 of characters such as @code{[a-z]} and @code{[abcdez]}.
6143@item RandomStringUtils - Helper for creating randomised strings.
6144@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6145@item NumberRange - A range of numbers with an upper and lower bound.
6146@item ObjectUtils - Helper for @code{java.lang.Object}.
6147@item SerializationUtils - Helper for serializing objects.
6148@item SystemUtils - Utility class defining the Java system properties.
6149@item NestedException package - A sub-package for the creation of nested
6150 exceptions.
6151@item Enum package - A sub-package for the creation of enumerated types.
6152@item Builder package - A sub-package for the creation of @code{equals},
6153 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6154@end itemize\n")
6155 (license license:asl2.0)))
6156
6157(define-public java-commons-lang3
6158 (package
6159 (name "java-commons-lang3")
6160 (version "3.12.0")
6161 (source
6162 (origin
6163 (method url-fetch)
6164 (uri (string-append "mirror://apache/commons/lang/source/"
6165 "commons-lang3-" version "-src.tar.gz"))
6166 (sha256
6167 (base32 "09dcv1pkdx3hpf06py8p9511f1wkin6jpacdll0c8vxpbi3yfwzv"))
6168 (patches
6169 (search-patches "java-commons-lang-fix-dependency.patch"))))
6170 (build-system ant-build-system)
6171 (arguments
6172 `(#:jar-name "commons-lang3.jar"
6173 #:source-dir "src/main/java"
6174 #:tests? #f; require junit5
6175 #:phases
6176 (modify-phases %standard-phases
6177 (replace 'install (install-from-pom "pom.xml")))))
6178 (propagated-inputs
6179 (list apache-commons-parent-pom-48))
6180 (home-page "https://commons.apache.org/lang/")
6181 (synopsis "Extension of the java.lang package")
6182 (description "The Commons Lang components contains a set of Java classes
6183that provide helper methods for standard Java classes, especially those found
6184in the @code{java.lang} package. The following classes are included:
6185
6186@itemize
6187@item StringUtils - Helper for @code{java.lang.String}.
6188@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
6189 characters such as @code{[a-z]} and @code{[abcdez]}.
6190@item RandomStringUtils - Helper for creating randomised strings.
6191@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6192@item NumberRange - A range of numbers with an upper and lower bound.
6193@item ObjectUtils - Helper for @code{java.lang.Object}.
6194@item SerializationUtils - Helper for serializing objects.
6195@item SystemUtils - Utility class defining the Java system properties.
6196@item NestedException package - A sub-package for the creation of nested
6197 exceptions.
6198@item Enum package - A sub-package for the creation of enumerated types.
6199@item Builder package - A sub-package for the creation of @code{equals},
6200 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6201@end itemize\n")
6202 (license license:asl2.0)))
6203
6204(define-public java-commons-bsf
6205 (package
6206 (name "java-commons-bsf")
6207 (version "2.4.0")
6208 (source (origin
6209 (method url-fetch)
6210 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
6211 version ".tar.gz"))
6212 (sha256
6213 (base32
6214 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
6215 (modules '((guix build utils)))
6216 (snippet
6217 '(begin
6218 (for-each delete-file
6219 (find-files "." "\\.jar$"))
6220 #t))))
6221 (build-system ant-build-system)
6222 (arguments
6223 `(#:build-target "jar"
6224 #:tests? #f; No test file
6225 #:modules ((guix build ant-build-system)
6226 (guix build utils)
6227 (guix build java-utils)
6228 (sxml simple))
6229 #:phases
6230 (modify-phases %standard-phases
6231 (add-before 'build 'create-properties
6232 (lambda _
6233 ;; This file is missing from the distribution
6234 (call-with-output-file "build-properties.xml"
6235 (lambda (port)
6236 (sxml->xml
6237 `(project (@ (basedir ".") (name "build-properties") (default ""))
6238 (property (@ (name "project.name") (value "bsf")))
6239 (property (@ (name "source.level") (value "1.5")))
6240 (property (@ (name "build.lib") (value "build/jar")))
6241 (property (@ (name "src.dir") (value "src")))
6242 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6243 (property (@ (name "build.tests") (value "build/test-classes")))
6244 (property (@ (name "build.dest") (value "build/classes"))))
6245 port)))
6246 #t))
6247 (replace 'install (install-jars "build")))))
6248 (native-inputs
6249 (list java-junit))
6250 (inputs
6251 (list java-commons-logging-minimal))
6252 (home-page "https://commons.apache.org/proper/commons-bsf")
6253 (synopsis "Bean Scripting Framework")
6254 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6255which provides scripting language support within Java applications, and access
6256to Java objects and methods from scripting languages. BSF allows one to write
6257JSPs in languages other than Java while providing access to the Java class
6258library. In addition, BSF permits any Java application to be implemented in
6259part (or dynamically extended) by a language that is embedded within it. This
6260is achieved by providing an API that permits calling scripting language engines
6261from within Java, as well as an object registry that exposes Java objects to
6262these scripting language engines.")
6263 (license license:asl2.0)))
6264
6265(define-public java-commons-jxpath
6266 (package
6267 (name "java-commons-jxpath")
6268 (version "1.3")
6269 (source (origin
6270 (method url-fetch)
6271 (uri (string-append "mirror://apache/commons/jxpath/source/"
6272 "commons-jxpath-" version "-src.tar.gz"))
6273 (sha256
6274 (base32
6275 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6276 (build-system ant-build-system)
6277 (arguments
6278 `(#:jar-name "commons-jxpath.jar"
6279 ;; tests require more dependencies, including mockrunner which depends on old software
6280 #:tests? #f
6281 #:source-dir "src/java"))
6282 (inputs
6283 `(("servlet" ,java-classpathx-servletapi)
6284 ("java-jdom" ,java-jdom)
6285 ("java-commons-beanutils" ,java-commons-beanutils)))
6286 (native-inputs
6287 (list java-junit))
6288 (home-page "https://commons.apache.org/jxpath/")
6289 (synopsis "Simple interpreter of an expression language called XPath")
6290 (description "The org.apache.commons.jxpath package defines a simple
6291interpreter of an expression language called XPath. JXPath applies XPath
6292expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6293contexts, DOM etc, including mixtures thereof.")
6294 (license license:asl2.0)))
6295
6296(define-public java-commons-pool
6297 (package
6298 (name "java-commons-pool")
6299 (version "2.6.2")
6300 (source (origin
6301 (method url-fetch)
6302 (uri (string-append "mirror://apache/commons/pool/source/"
6303 "commons-pool2-" version "-src.tar.gz"))
6304 (sha256
6305 (base32
6306 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6307 (arguments
6308 `(#:jar-name "common-pool.jar"
6309 #:source-dir "src/main/java"
6310 #:test-exclude
6311 (list "**/PerformanceTest.java")))
6312 (build-system ant-build-system)
6313 (inputs
6314 (list java-cglib))
6315 (native-inputs
6316 (list java-junit java-hamcrest-core java-asm java-objenesis))
6317 (home-page "https://commons.apache.org/proper/commons-pool/")
6318 (synopsis "Object-pooling API in Java")
6319 (description "The commons-pool package provides an object-pooling API
6320and a number of object pool implementations. This package defines a
6321handful of pooling interfaces and some base classes that may be useful when
6322creating new pool implementations.")
6323 (license license:asl2.0)))
6324
6325(define-public java-commons-dbcp
6326 (package
6327 (name "java-commons-dbcp")
6328 (version "2.6.0")
6329 (source (origin
6330 (method url-fetch)
6331 (uri (string-append "mirror://apache/commons/dbcp/source/"
6332 "commons-dbcp2-" version "-src.tar.gz"))
6333 (sha256
6334 (base32
6335 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6336 (arguments
6337 `(#:source-dir "src/main/java"
6338 #:jar-name "java-commons-dbcp.jar"
6339 #:tests? #f)); requires apache-geronimo
6340 (inputs
6341 `(("java-commons-pool" ,java-commons-pool)
6342 ("java-commons-logging" ,java-commons-logging-minimal)
6343 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6344 (native-inputs
6345 (list java-junit))
6346 (build-system ant-build-system)
6347 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6348 (synopsis "Database Connection Pool for Java")
6349 (description "Commons-dbcp allows you to share a pool of database
6350connections between users. Creating a new connection for each user can be
6351time consuming and even unfeasible when the number of simultaneous users is
6352very large. This package provides a way to share a poole of connections to
6353reduce that load.")
6354 (license license:asl2.0)))
6355
6356(define-public java-commons-jcs
6357 (package
6358 (name "java-commons-jcs")
6359 (version "3.1")
6360 (source (origin
6361 (method url-fetch)
6362 (uri (string-append "mirror://apache/commons/jcs/source/"
6363 "commons-jcs3-dist-" version "-src.tar.gz"))
6364 (sha256
6365 (base32
6366 "0y1lm1xnsj99bf7y9mkvbzqfy8dr7ac8zcbkpsjgzb9vhabfsbac"))))
6367 (build-system ant-build-system)
6368 (arguments
6369 `(#:jar-name "commons-jcs.jar"
6370 #:source-dir "commons-jcs-core/src/main/java"
6371 #:test-dir "commons-jcs-core/src/test"
6372 #:tests? #f; requires hsqldb
6373 #:phases
6374 (modify-phases %standard-phases
6375 (add-before 'build 'copy-resources
6376 (lambda _
6377 (copy-recursively "commons-jcs-core/src/main/resources"
6378 "build/classes"))))))
6379 (propagated-inputs
6380 (list java-classpathx-servletapi
6381 java-commons-dbcp
6382 java-httpcomponents-httpclient
6383 java-httpcomponents-httpcore
6384 java-log4j-api))
6385 (native-inputs
6386 (list java-junit))
6387 (home-page "https://commons.apache.org/proper/commons-jcs/")
6388 (synopsis "Distributed caching system in Java")
6389 (description "JCS is a distributed caching system written in Java. It
6390is intended to speed up applications by providing a means to manage cached
6391data of various dynamic natures. Like any caching system, JCS is most useful
6392for high read, low put applications. Latency times drop sharply and
6393bottlenecks move away from the database in an effectively cached system.")
6394 (license license:asl2.0)))
6395
6396(define-public java-jsr250
6397 (package
6398 (name "java-jsr250")
6399 (version "1.3")
6400 (source (origin
6401 (method git-fetch)
6402 (uri (git-reference
6403 (url "https://github.com/javaee/javax.annotation")
6404 (commit version)))
6405 (file-name (git-file-name name version))
6406 (sha256
6407 (base32
6408 "1g22a9d75g01s9yxgdig0ss7i30j4ysnnp08gn4krn0wly4lpqq0"))))
6409 (build-system ant-build-system)
6410 (arguments
6411 `(#:tests? #f ; no tests included
6412 #:jdk ,icedtea-8
6413 #:jar-name "jsr250.jar"
6414 #:phases
6415 (modify-phases %standard-phases
6416 (replace 'install
6417 (install-from-pom "pom.xml")))))
6418 (propagated-inputs (list java-jvnet-parent-pom-3))
6419 (home-page "https://jcp.org/en/jsr/detail?id=250")
6420 (synopsis "Security-related annotations")
6421 (description "This package provides annotations for security. It provides
6422packages in the @code{javax.annotation} and @code{javax.annotation.security}
6423namespaces.")
6424 ;; either cddl or gpl2 only, with classpath exception
6425 (license (list license:cddl1.0
6426 license:gpl2))))
6427
6428(define-public java-jsr305
6429 (package
6430 (name "java-jsr305")
6431 (version "3.0.1")
6432 (source (origin
6433 (method url-fetch)
6434 (uri (string-append "https://repo1.maven.org/maven2/"
6435 "com/google/code/findbugs/"
6436 "jsr305/" version "/jsr305-"
6437 version "-sources.jar"))
6438 (sha256
6439 (base32
6440 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6441 (build-system ant-build-system)
6442 (arguments
6443 `(#:tests? #f ; no tests included
6444 #:jar-name "jsr305.jar"
6445 #:phases
6446 (modify-phases %standard-phases
6447 (add-before 'install 'create-pom
6448 (generate-pom.xml "pom.xml" "com.google.code.findbugs" "jsr305" ,version))
6449 (replace 'install
6450 (install-from-pom "pom.xml")))))
6451 (home-page "http://findbugs.sourceforge.net/")
6452 (synopsis "Annotations for the static analyzer called findbugs")
6453 (description "This package provides annotations for the findbugs package.
6454It provides packages in the @code{javax.annotations} namespace.")
6455 (license license:asl2.0)))
6456
6457(define-public java-guava
6458 (package
6459 (name "java-guava")
6460 ;; This is the last release of Guava that can be built with Java 7.
6461 (version "20.0")
6462 (source (origin
6463 (method git-fetch)
6464 (uri (git-reference
6465 (url "https://github.com/google/guava/")
6466 (commit (string-append "v" version))))
6467 (file-name (git-file-name name version))
6468 (sha256
6469 (base32
6470 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6471 (build-system ant-build-system)
6472 (arguments
6473 `(#:tests? #f ; no tests included
6474 #:jar-name "guava.jar"
6475 #:source-dir "guava/src"
6476 #:phases
6477 (modify-phases %standard-phases
6478 (add-after 'unpack 'trim-sources
6479 (lambda _
6480 (with-directory-excursion "guava/src/com/google/common"
6481 ;; Remove annotations to avoid extra dependencies:
6482 ;; * "j2objc" annotations are used when converting Java to
6483 ;; Objective C;
6484 ;; * "errorprone" annotations catch common Java mistakes at
6485 ;; compile time;
6486 ;; * "IgnoreJRERequirement" is used for Android.
6487 (substitute* (find-files "." "\\.java$")
6488 (("import com.google.j2objc.*") "")
6489 (("import com.google.errorprone.annotation.*") "")
6490 (("import org.codehaus.mojo.animal_sniffer.*") "")
6491 (("@CanIgnoreReturnValue") "")
6492 (("@LazyInit") "")
6493 (("@WeakOuter") "")
6494 (("@RetainedWith") "")
6495 (("@Weak") "")
6496 (("@ForOverride") "")
6497 (("@J2ObjCIncompatible") "")
6498 (("@IgnoreJRERequirement") "")))
6499 #t))
6500 (replace 'install (install-from-pom "guava/pom.xml")))))
6501 (inputs
6502 (list java-jsr305))
6503 (propagated-inputs
6504 (list java-guava-parent-pom))
6505 (home-page "https://github.com/google/guava")
6506 (synopsis "Google core libraries for Java")
6507 (description "Guava is a set of core libraries that includes new
6508collection types (such as multimap and multiset), immutable collections, a
6509graph library, functional types, an in-memory cache, and APIs/utilities for
6510concurrency, I/O, hashing, primitives, reflection, string processing, and much
6511more!")
6512 (license license:asl2.0)))
6513
6514(define java-guava-parent-pom
6515 (package
6516 (inherit java-guava)
6517 (name "java-guava-parent-pom")
6518 (arguments
6519 `(#:tests? #f
6520 #:phases
6521 (modify-phases %standard-phases
6522 (delete 'configure)
6523 (delete 'build)
6524 (replace 'install
6525 (install-pom-file "pom.xml")))))
6526 (propagated-inputs
6527 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6528
6529;; The java-commons-logging package provides adapters to many different
6530;; logging frameworks. To avoid an excessive dependency graph we try to build
6531;; it with only a minimal set of adapters.
6532(define-public java-commons-logging-minimal
6533 (package
6534 (name "java-commons-logging-minimal")
6535 (version "1.2")
6536 (source (origin
6537 (method url-fetch)
6538 (uri (string-append "mirror://apache/commons/logging/source/"
6539 "commons-logging-" version "-src.tar.gz"))
6540 (sha256
6541 (base32
6542 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6543 (build-system ant-build-system)
6544 (arguments
6545 `(#:tests? #f ; avoid dependency on logging frameworks
6546 #:jar-name "commons-logging-minimal.jar"
6547 #:phases
6548 (modify-phases %standard-phases
6549 (add-after 'unpack 'delete-adapters-and-tests
6550 (lambda _
6551 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6552 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6553 ;; is used by applications; SimpleLog is the only actually usable
6554 ;; implementation that does not depend on another logging
6555 ;; framework.
6556 (for-each
6557 (lambda (file)
6558 (delete-file (string-append
6559 "src/main/java/org/apache/commons/logging/impl/" file)))
6560 (list "Jdk13LumberjackLogger.java"
6561 "WeakHashtable.java"
6562 "Log4JLogger.java"
6563 "ServletContextCleaner.java"
6564 "Jdk14Logger.java"
6565 "AvalonLogger.java"
6566 "LogKitLogger.java"))
6567 (delete-file-recursively "src/test")
6568 #t)))))
6569 (home-page "https://commons.apache.org/logging/")
6570 (synopsis "Common API for logging implementations")
6571 (description "The Logging package is a thin bridge between different
6572logging implementations. A library that uses the commons-logging API can be
6573used with any logging implementation at runtime.")
6574 (license license:asl2.0)))
6575
6576;; This is the last release of the 1.x series.
6577(define-public java-mockito-1
6578 (package
6579 (name "java-mockito")
6580 (version "1.10.19")
6581 (source (origin
6582 (method url-fetch)
6583 (uri (string-append "http://repo1.maven.org/maven2/"
6584 "org/mockito/mockito-core/" version
6585 "/mockito-core-" version "-sources.jar"))
6586 (sha256
6587 (base32
6588 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6589 (build-system ant-build-system)
6590 (arguments
6591 `(#:jar-name "mockito.jar"
6592 #:tests? #f ; no tests included
6593 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6594 ;; patches in build phases.
6595 #:phases
6596 (modify-phases %standard-phases
6597 ;; Mockito was developed against a different version of hamcrest,
6598 ;; which does not require matcher implementations to provide an
6599 ;; implementation of the "describeMismatch" method. We add this
6600 ;; simple definition to pass the build with our version of hamcrest.
6601 (add-after 'unpack 'fix-hamcrest-build-error
6602 (lambda _
6603 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6604 (("public Matcher getActualMatcher\\(\\) .*" line)
6605 (string-append "
6606 public void describeMismatch(Object item, Description description) {
6607 actualMatcher.describeMismatch(item, description);
6608 }"
6609 line)))
6610 #t))
6611 ;; Mockito bundles cglib. We have a cglib package, so let's use
6612 ;; that instead.
6613 (add-after 'unpack 'use-system-libraries
6614 (lambda _
6615 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6616 (substitute* '("CGLIBHacker.java"
6617 "CglibMockMaker.java"
6618 "ClassImposterizer.java"
6619 "DelegatingMockitoMethodProxy.java"
6620 "MethodInterceptorFilter.java"
6621 "MockitoNamingPolicy.java"
6622 "SerializableMockitoMethodProxy.java"
6623 "SerializableNoOp.java")
6624 (("import org.mockito.cglib") "import net.sf.cglib")))
6625 #t)))))
6626 (inputs
6627 (list java-junit java-objenesis java-cglib java-hamcrest-core))
6628 (home-page "http://mockito.org")
6629 (synopsis "Mockito is a mock library for Java")
6630 (description "Mockito is a mocking library for Java which lets you write
6631tests with a clean and simple API. It generates mocks using reflection, and
6632it records all mock invocations, including methods arguments.")
6633 (license license:asl2.0)))
6634
6635(define-public java-httpcomponents-httpcore
6636 (package
6637 (name "java-httpcomponents-httpcore")
6638 (version "4.4.6")
6639 (source (origin
6640 (method url-fetch)
6641 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6642 "source/httpcomponents-core-"
6643 version "-src.tar.gz"))
6644 (sha256
6645 (base32
6646 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6647 (build-system ant-build-system)
6648 (arguments
6649 `(#:jar-name "httpcomponents-httpcore.jar"
6650 #:phases
6651 (modify-phases %standard-phases
6652 (add-after 'unpack 'chdir
6653 (lambda _ (chdir "httpcore") #t)))))
6654 (inputs
6655 (list java-commons-logging-minimal java-commons-lang3))
6656 (native-inputs
6657 (list java-junit java-mockito-1))
6658 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6659 (synopsis "Low level HTTP transport components")
6660 (description "HttpCore is a set of low level HTTP transport components
6661that can be used to build custom client and server side HTTP services with a
6662minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6663on the classic Java I/O and non-blocking, event driven I/O model based on Java
6664NIO.
6665
6666This package provides the blocking I/O model library.")
6667 (license license:asl2.0)))
6668
6669(define-public java-httpcomponents-httpcore-nio
6670 (package (inherit java-httpcomponents-httpcore)
6671 (name "java-httpcomponents-httpcore-nio")
6672 (arguments
6673 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6674 #:phases
6675 (modify-phases %standard-phases
6676 (add-after 'unpack 'chdir
6677 (lambda _ (chdir "httpcore-nio") #t)))))
6678 (inputs
6679 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6680 (prepend java-httpcomponents-httpcore java-hamcrest-core)))
6681 (description "HttpCore is a set of low level HTTP transport components
6682that can be used to build custom client and server side HTTP services with a
6683minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6684on the classic Java I/O and non-blocking, event driven I/O model based on Java
6685NIO.
6686
6687This package provides the non-blocking I/O model library based on Java
6688NIO.")))
6689
6690(define-public java-httpcomponents-httpcore-ab
6691 (package (inherit java-httpcomponents-httpcore)
6692 (name "java-httpcomponents-httpcore-ab")
6693 (arguments
6694 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6695 #:phases
6696 (modify-phases %standard-phases
6697 (add-after 'unpack 'chdir
6698 (lambda _ (chdir "httpcore-ab") #t)))))
6699 (inputs
6700 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6701 (prepend java-httpcomponents-httpcore java-commons-cli
6702 java-hamcrest-core)))
6703 (synopsis "Apache HttpCore benchmarking tool")
6704 (description "This package provides the HttpCore benchmarking tool. It is
6705an Apache AB clone based on HttpCore.")))
6706
6707(define-public java-httpcomponents-httpclient
6708 (package
6709 (name "java-httpcomponents-httpclient")
6710 (version "4.5.12")
6711 (source (origin
6712 (method url-fetch)
6713 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6714 "source/httpcomponents-client-"
6715 version "-src.tar.gz"))
6716 (sha256
6717 (base32
6718 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6719 (build-system ant-build-system)
6720 (arguments
6721 `(#:jar-name "httpcomponents-httpclient.jar"
6722 #:phases
6723 (modify-phases %standard-phases
6724 (add-after 'unpack 'chdir
6725 (lambda _ (chdir "httpclient") #t)))))
6726 (inputs
6727 (list java-commons-logging-minimal
6728 java-commons-codec
6729 java-hamcrest-core
6730 java-httpcomponents-httpcore
6731 java-mockito-1
6732 java-junit))
6733 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6734 (synopsis "HTTP client library for Java")
6735 (description "Although the @code{java.net} package provides basic
6736functionality for accessing resources via HTTP, it doesn't provide the full
6737flexibility or functionality needed by many applications. @code{HttpClient}
6738seeks to fill this void by providing an efficient, up-to-date, and
6739feature-rich package implementing the client side of the most recent HTTP
6740standards and recommendations.")
6741 (license license:asl2.0)))
6742
6743(define-public java-httpcomponents-httpmime
6744 (package (inherit java-httpcomponents-httpclient)
6745 (name "java-httpcomponents-httpmime")
6746 (arguments
6747 `(#:jar-name "httpcomponents-httpmime.jar"
6748 #:phases
6749 (modify-phases %standard-phases
6750 (add-after 'unpack 'chdir
6751 (lambda _ (chdir "httpmime") #t)))))
6752 (inputs
6753 (list java-httpcomponents-httpclient java-httpcomponents-httpcore
6754 java-junit java-hamcrest-core))))
6755
6756(define-public java-commons-net
6757 (package
6758 (name "java-commons-net")
6759 (version "3.6")
6760 (source (origin
6761 (method url-fetch)
6762 (uri (string-append "mirror://apache/commons/net/source/"
6763 "commons-net-" version "-src.tar.gz"))
6764 (sha256
6765 (base32
6766 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6767 (build-system ant-build-system)
6768 (arguments
6769 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6770 ;; should be "resources/examples/examples.properties"), but gets "null"
6771 ;; instead.
6772 #:tests? #f
6773 #:jar-name "commons-net.jar"))
6774 (native-inputs
6775 (list java-junit java-hamcrest-core))
6776 (home-page "https://commons.apache.org/net/")
6777 (synopsis "Client library for many basic Internet protocols")
6778 (description "The Apache Commons Net library implements the client side of
6779many basic Internet protocols. The purpose of the library is to provide
6780fundamental protocol access, not higher-level abstractions.")
6781 (license license:asl2.0)))
6782
6783(define-public java-jsch
6784 (package
6785 (name "java-jsch")
6786 (version "0.1.55")
6787 (source (origin
6788 (method url-fetch)
6789 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6790 version "/jsch-" version ".zip"))
6791 (sha256
6792 (base32
6793 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6794 (build-system ant-build-system)
6795 (arguments
6796 `(#:build-target "dist"
6797 #:tests? #f ; no tests included
6798 #:phases
6799 (modify-phases %standard-phases
6800 (replace 'install (install-jars "dist")))))
6801 (native-inputs
6802 (list unzip))
6803 (home-page "http://www.jcraft.com/jsch/")
6804 (synopsis "Pure Java implementation of SSH2")
6805 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6806to connect to an SSH server and use port forwarding, X11 forwarding, file
6807transfer, etc., and you can integrate its functionality into your own Java
6808programs.")
6809 (license license:bsd-3)))
6810
6811(define-public java-commons-compress
6812 (package
6813 (name "java-commons-compress")
6814 (version "1.21")
6815 (source (origin
6816 (method url-fetch)
6817 (uri (string-append "mirror://apache/commons/compress/source/"
6818 "commons-compress-" version "-src.tar.gz"))
6819 (sha256
6820 (base32
6821 "1rkpb6xcyly1wnbx4q6iq6p5hrr0h1d0ppb5r07psc75cbmizjry"))))
6822 (build-system ant-build-system)
6823 (arguments
6824 `(#:jar-name "commons-compress.jar"
6825 #:source-dir "src/main/java"
6826 #:tests? #f; requires java-mockito-3
6827 #:phases
6828 (modify-phases %standard-phases
6829 (replace 'install (install-from-pom "pom.xml")))))
6830 (propagated-inputs
6831 (list java-asm-3
6832 java-brotli
6833 java-osgi-core
6834 java-xz
6835 java-zstd
6836 apache-commons-parent-pom-52))
6837 (home-page "https://commons.apache.org/proper/commons-compress/")
6838 (synopsis "Java library for working with compressed files")
6839 (description "The Apache Commons Compress library defines an API for
6840working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6841Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6842 (license license:asl2.0)))
6843
6844(define-public java-commons-csv
6845 (package
6846 (name "java-commons-csv")
6847 (version "1.4")
6848 (source (origin
6849 (method url-fetch)
6850 (uri (string-append "mirror://apache/commons/csv/source/"
6851 "commons-csv-" version "-src.tar.gz"))
6852 (sha256
6853 (base32
6854 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6855 (build-system ant-build-system)
6856 (arguments
6857 `(#:jar-name "commons-csv.jar"
6858 #:source-dir "src/main/java"
6859 #:tests? #f)); FIXME: requires java-h2
6860 (inputs
6861 `(("java-hamcrest-core" ,java-hamcrest-core)
6862 ("java-commons-io" ,java-commons-io)
6863 ("java-commons-lang3" ,java-commons-lang3)
6864 ("junit" ,java-junit)))
6865 (home-page "https://commons.apache.org/proper/commons-csv/")
6866 (synopsis "Read and write CSV documents")
6867 (description "Commons CSV reads and writes files in variations of the Comma
6868Separated Value (CSV) format. The most common CSV formats are predefined in the
6869CSVFormat class:
6870
6871@itemize
6872@item Microsoft Excel
6873@item Informix UNLOAD
6874@item Informix UNLOAD CSV
6875@item MySQL
6876@item RFC 4180
6877@item TDF
6878@end itemize
6879
6880Custom formats can be created using a fluent style API.")
6881 (license license:asl2.0)))
6882
6883(define-public java-osgi-annotation
6884 (package
6885 (name "java-osgi-annotation")
6886 (version "6.0.0")
6887 (source (origin
6888 (method url-fetch)
6889 (uri (string-append "https://repo1.maven.org/maven2/"
6890 "org/osgi/org.osgi.annotation/" version "/"
6891 "org.osgi.annotation-" version "-sources.jar"))
6892 (sha256
6893 (base32
6894 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6895 (build-system ant-build-system)
6896 (arguments
6897 `(#:tests? #f ; no tests
6898 #:jar-name "osgi-annotation.jar"
6899 #:phases
6900 (modify-phases %standard-phases
6901 (add-before 'install 'create-pom
6902 (generate-pom.xml "pom.xml" "osgi" "osgi-annotation" ,version))
6903 (replace 'install (install-from-pom "pom.xml")))))
6904 (home-page "https://www.osgi.org")
6905 (synopsis "Annotation module of OSGi framework")
6906 (description
6907 "OSGi, for Open Services Gateway initiative framework, is a module system
6908and service platform for the Java programming language. This package contains
6909the OSGi annotation module, providing additional services to help dynamic
6910components.")
6911 (license license:asl2.0)))
6912
6913(define-public java-osgi-core
6914 (package
6915 (name "java-osgi-core")
6916 (version "6.0.0")
6917 (source (origin
6918 (method url-fetch)
6919 (uri (string-append "https://repo1.maven.org/maven2/"
6920 "org/osgi/org.osgi.core/" version "/"
6921 "org.osgi.core-" version "-sources.jar"))
6922 (sha256
6923 (base32
6924 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6925 (build-system ant-build-system)
6926 (arguments
6927 `(#:tests? #f ; no tests
6928 #:jar-name "osgi-core.jar"
6929 #:phases
6930 (modify-phases %standard-phases
6931 (add-before 'install 'create-pom
6932 (generate-pom.xml "pom.xml" "org.osgi" "org.osgi.core" ,version))
6933 (replace 'install (install-from-pom "pom.xml")))))
6934 (inputs
6935 (list java-osgi-annotation))
6936 (home-page "https://www.osgi.org")
6937 (synopsis "Core module of OSGi framework")
6938 (description
6939 "OSGi, for Open Services Gateway initiative framework, is a module system
6940and service platform for the Java programming language. This package contains
6941the OSGi Core module.")
6942 (license license:asl2.0)))
6943
6944(define-public java-osgi-service-event
6945 (package
6946 (name "java-osgi-service-event")
6947 (version "1.3.1")
6948 (source (origin
6949 (method url-fetch)
6950 (uri (string-append "https://repo1.maven.org/maven2/"
6951 "org/osgi/org.osgi.service.event/"
6952 version "/org.osgi.service.event-"
6953 version "-sources.jar"))
6954 (sha256
6955 (base32
6956 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6957 (build-system ant-build-system)
6958 (arguments
6959 `(#:tests? #f ; no tests
6960 #:jar-name "osgi-service-event.jar"))
6961 (inputs
6962 (list java-osgi-annotation java-osgi-core))
6963 (home-page "https://www.osgi.org")
6964 (synopsis "OSGi service event module")
6965 (description
6966 "OSGi, for Open Services Gateway initiative framework, is a module system
6967and service platform for the Java programming language. This package contains
6968the OSGi @code{org.osgi.service.event} module.")
6969 (license license:asl2.0)))
6970
6971(define-public java-eclipse-osgi
6972 (package
6973 (name "java-eclipse-osgi")
6974 (version "3.11.3")
6975 (source (origin
6976 (method url-fetch)
6977 (uri (string-append "https://repo1.maven.org/maven2/"
6978 "org/eclipse/platform/org.eclipse.osgi/"
6979 version "/org.eclipse.osgi-"
6980 version "-sources.jar"))
6981 (sha256
6982 (base32
6983 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6984 (build-system ant-build-system)
6985 (arguments
6986 `(#:tests? #f ; no tests included
6987 #:jar-name "eclipse-equinox-osgi.jar"))
6988 (inputs
6989 (list java-osgi-annotation))
6990 (home-page "http://www.eclipse.org/equinox/")
6991 (synopsis "Eclipse Equinox OSGi framework")
6992 (description "This package provides an implementation of the OSGi Core
6993specification.")
6994 (license license:epl1.0)))
6995
6996(define-public java-eclipse-equinox-common
6997 (package
6998 (name "java-eclipse-equinox-common")
6999 (version "3.10.200")
7000 (source (origin
7001 (method url-fetch)
7002 (uri (string-append "https://repo1.maven.org/maven2/"
7003 "org/eclipse/platform/org.eclipse.equinox.common/"
7004 version "/org.eclipse.equinox.common-"
7005 version "-sources.jar"))
7006 (sha256
7007 (base32
7008 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
7009 (build-system ant-build-system)
7010 (arguments
7011 `(#:tests? #f ; no tests included
7012 #:jar-name "eclipse-equinox-common.jar"))
7013 (inputs
7014 (list java-eclipse-osgi))
7015 (home-page "http://www.eclipse.org/equinox/")
7016 (synopsis "Common Eclipse runtime")
7017 (description "This package provides the common Eclipse runtime.")
7018 (license license:epl1.0)))
7019
7020(define-public java-eclipse-core-jobs
7021 (package
7022 (name "java-eclipse-core-jobs")
7023 (version "3.8.0")
7024 (source (origin
7025 (method url-fetch)
7026 (uri (string-append "https://repo1.maven.org/maven2/"
7027 "org/eclipse/platform/org.eclipse.core.jobs/"
7028 version "/org.eclipse.core.jobs-"
7029 version "-sources.jar"))
7030 (sha256
7031 (base32
7032 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
7033 (build-system ant-build-system)
7034 (arguments
7035 `(#:tests? #f ; no tests included
7036 #:jar-name "eclipse-core-jobs.jar"))
7037 (inputs
7038 (list java-eclipse-equinox-common java-eclipse-osgi))
7039 (home-page "http://www.eclipse.org/equinox/")
7040 (synopsis "Eclipse jobs mechanism")
7041 (description "This package provides the Eclipse jobs mechanism.")
7042 (license license:epl1.0)))
7043
7044(define-public java-eclipse-equinox-registry
7045 (package
7046 (name "java-eclipse-equinox-registry")
7047 (version "3.6.100")
7048 (source (origin
7049 (method url-fetch)
7050 (uri (string-append "https://repo1.maven.org/maven2/"
7051 "org/eclipse/platform/org.eclipse.equinox.registry/"
7052 version "/org.eclipse.equinox.registry-"
7053 version "-sources.jar"))
7054 (sha256
7055 (base32
7056 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
7057 (build-system ant-build-system)
7058 (arguments
7059 `(#:tests? #f ; no tests included
7060 #:jar-name "eclipse-equinox-registry.jar"))
7061 (inputs
7062 (list java-eclipse-core-jobs java-eclipse-equinox-common
7063 java-eclipse-osgi))
7064 (home-page "http://www.eclipse.org/equinox/")
7065 (synopsis "Eclipse extension registry support")
7066 (description "This package provides support for the Eclipse extension
7067registry.")
7068 (license license:epl1.0)))
7069
7070(define-public java-eclipse-equinox-app
7071 (package
7072 (name "java-eclipse-equinox-app")
7073 (version "1.3.400")
7074 (source (origin
7075 (method url-fetch)
7076 (uri (string-append "https://repo1.maven.org/maven2/"
7077 "org/eclipse/platform/org.eclipse.equinox.app/"
7078 version "/org.eclipse.equinox.app-"
7079 version "-sources.jar"))
7080 (sha256
7081 (base32
7082 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
7083 (build-system ant-build-system)
7084 (arguments
7085 `(#:tests? #f ; no tests included
7086 #:jar-name "eclipse-equinox-app.jar"))
7087 (inputs
7088 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7089 java-eclipse-osgi java-osgi-service-event))
7090 (home-page "http://www.eclipse.org/equinox/")
7091 (synopsis "Equinox application container")
7092 (description "This package provides the Equinox application container for
7093Eclipse.")
7094 (license license:epl1.0)))
7095
7096(define-public java-eclipse-equinox-preferences
7097 (package
7098 (name "java-eclipse-equinox-preferences")
7099 (version "3.6.1")
7100 (source (origin
7101 (method url-fetch)
7102 (uri (string-append "https://repo1.maven.org/maven2/"
7103 "org/eclipse/platform/org.eclipse.equinox.preferences/"
7104 version "/org.eclipse.equinox.preferences-"
7105 version "-sources.jar"))
7106 (sha256
7107 (base32
7108 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
7109 (build-system ant-build-system)
7110 (arguments
7111 `(#:tests? #f ; no tests included
7112 #:jar-name "eclipse-equinox-preferences.jar"))
7113 (inputs
7114 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7115 java-eclipse-osgi))
7116 (home-page "http://www.eclipse.org/equinox/")
7117 (synopsis "Eclipse preferences mechanism")
7118 (description "This package provides the Eclipse preferences mechanism with
7119the module @code{org.eclipse.equinox.preferences}.")
7120 (license license:epl1.0)))
7121
7122(define-public java-eclipse-core-contenttype
7123 (package
7124 (name "java-eclipse-core-contenttype")
7125 (version "3.5.100")
7126 (source (origin
7127 (method url-fetch)
7128 (uri (string-append "https://repo1.maven.org/maven2/"
7129 "org/eclipse/platform/org.eclipse.core.contenttype/"
7130 version "/org.eclipse.core.contenttype-"
7131 version "-sources.jar"))
7132 (sha256
7133 (base32
7134 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
7135 (build-system ant-build-system)
7136 (arguments
7137 `(#:tests? #f ; no tests included
7138 #:jar-name "eclipse-core-contenttype.jar"))
7139 (inputs
7140 (list java-eclipse-equinox-common java-eclipse-equinox-preferences
7141 java-eclipse-equinox-registry java-eclipse-osgi))
7142 (home-page "http://www.eclipse.org/")
7143 (synopsis "Eclipse content mechanism")
7144 (description "This package provides the Eclipse content mechanism in the
7145@code{org.eclipse.core.contenttype} module.")
7146 (license license:epl1.0)))
7147
7148(define-public java-eclipse-core-runtime
7149 (package
7150 (name "java-eclipse-core-runtime")
7151 (version "3.15.100")
7152 (source (origin
7153 (method url-fetch)
7154 (uri (string-append "https://repo1.maven.org/maven2/"
7155 "org/eclipse/platform/org.eclipse.core.runtime/"
7156 version "/org.eclipse.core.runtime-"
7157 version "-sources.jar"))
7158 (sha256
7159 (base32
7160 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
7161 (build-system ant-build-system)
7162 (arguments
7163 `(#:tests? #f ; no tests included
7164 #:jar-name "eclipse-core-runtime.jar"))
7165 (inputs
7166 (list java-eclipse-core-contenttype
7167 java-eclipse-core-jobs
7168 java-eclipse-equinox-app
7169 java-eclipse-equinox-common
7170 java-eclipse-equinox-registry
7171 java-eclipse-equinox-preferences
7172 java-eclipse-osgi))
7173 (home-page "https://www.eclipse.org/")
7174 (synopsis "Eclipse core runtime")
7175 (description "This package provides the Eclipse core runtime with the
7176module @code{org.eclipse.core.runtime}.")
7177 (license license:epl1.0)))
7178
7179(define-public java-eclipse-core-filesystem
7180 (package
7181 (name "java-eclipse-core-filesystem")
7182 (version "1.6.1")
7183 (source (origin
7184 (method url-fetch)
7185 (uri (string-append "https://repo1.maven.org/maven2/"
7186 "org/eclipse/platform/org.eclipse.core.filesystem/"
7187 version "/org.eclipse.core.filesystem-"
7188 version "-sources.jar"))
7189 (sha256
7190 (base32
7191 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7192 (build-system ant-build-system)
7193 (arguments
7194 `(#:tests? #f ; no tests included
7195 #:jar-name "eclipse-core-filesystem.jar"))
7196 (inputs
7197 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7198 java-eclipse-osgi))
7199 (home-page "https://www.eclipse.org/")
7200 (synopsis "Eclipse core file system")
7201 (description "This package provides the Eclipse core file system with the
7202module @code{org.eclipse.core.filesystem}.")
7203 (license license:epl1.0)))
7204
7205(define-public java-eclipse-core-expressions
7206 (package
7207 (name "java-eclipse-core-expressions")
7208 (version "3.5.100")
7209 (source (origin
7210 (method url-fetch)
7211 (uri (string-append "https://repo1.maven.org/maven2/"
7212 "org/eclipse/platform/org.eclipse.core.expressions/"
7213 version "/org.eclipse.core.expressions-"
7214 version "-sources.jar"))
7215 (sha256
7216 (base32
7217 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7218 (build-system ant-build-system)
7219 (arguments
7220 `(#:tests? #f ; no tests included
7221 #:jar-name "eclipse-core-expressions.jar"))
7222 (inputs
7223 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7224 java-eclipse-equinox-preferences java-eclipse-core-runtime
7225 java-eclipse-osgi))
7226 (home-page "https://www.eclipse.org/")
7227 (synopsis "Eclipse core expression language")
7228 (description "This package provides the Eclipse core expression language
7229with the @code{org.eclipse.core.expressions} module.")
7230 (license license:epl1.0)))
7231
7232(define-public java-eclipse-core-variables
7233 (package
7234 (name "java-eclipse-core-variables")
7235 (version "3.3.0")
7236 (source (origin
7237 (method url-fetch)
7238 (uri (string-append "https://repo1.maven.org/maven2/"
7239 "org/eclipse/platform/org.eclipse.core.variables/"
7240 version "/org.eclipse.core.variables-"
7241 version "-sources.jar"))
7242 (sha256
7243 (base32
7244 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7245 (build-system ant-build-system)
7246 (arguments
7247 `(#:tests? #f ; no tests included
7248 #:jar-name "eclipse-core-variables.jar"))
7249 (inputs
7250 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7251 java-eclipse-equinox-preferences java-eclipse-core-runtime
7252 java-eclipse-osgi))
7253 (home-page "https://www.eclipse.org/platform")
7254 (synopsis "Eclipse core variables")
7255 (description "This package provides the Eclipse core variables module
7256@code{org.eclipse.core.variables}.")
7257 (license license:epl1.0)))
7258
7259(define-public java-eclipse-ant-core
7260 (package
7261 (name "java-eclipse-ant-core")
7262 (version "3.4.100")
7263 (source (origin
7264 (method url-fetch)
7265 (uri (string-append "https://repo1.maven.org/maven2/"
7266 "org/eclipse/platform/org.eclipse.ant.core/"
7267 version "/org.eclipse.ant.core-"
7268 version "-sources.jar"))
7269 (sha256
7270 (base32
7271 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7272 (build-system ant-build-system)
7273 (arguments
7274 `(#:tests? #f ; no tests included
7275 #:jar-name "eclipse-ant-core.jar"))
7276 (inputs
7277 (list java-eclipse-equinox-app
7278 java-eclipse-equinox-common
7279 java-eclipse-equinox-registry
7280 java-eclipse-equinox-preferences
7281 java-eclipse-core-contenttype
7282 java-eclipse-core-runtime
7283 java-eclipse-core-variables
7284 java-eclipse-osgi))
7285 (home-page "https://www.eclipse.org/platform")
7286 (synopsis "Ant build tool core libraries")
7287 (description "This package provides the ant build tool core libraries with
7288the module @code{org.eclipse.ant.core}.")
7289 (license license:epl1.0)))
7290
7291(define-public java-eclipse-core-resources
7292 (package
7293 (name "java-eclipse-core-resources")
7294 (version "3.13.200")
7295 (source (origin
7296 (method url-fetch)
7297 (uri (string-append "https://repo1.maven.org/maven2/"
7298 "org/eclipse/platform/org.eclipse.core.resources/"
7299 version "/org.eclipse.core.resources-"
7300 version "-sources.jar"))
7301 (sha256
7302 (base32
7303 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7304 (build-system ant-build-system)
7305 (arguments
7306 `(#:tests? #f ; no tests included
7307 #:jar-name "eclipse-core-resources.jar"))
7308 (inputs
7309 (list java-eclipse-equinox-common
7310 java-eclipse-equinox-preferences
7311 java-eclipse-equinox-registry
7312 java-eclipse-core-contenttype
7313 java-eclipse-core-expressions
7314 java-eclipse-core-filesystem
7315 java-eclipse-core-jobs
7316 java-eclipse-core-runtime
7317 java-eclipse-ant-core
7318 java-eclipse-osgi))
7319 (home-page "https://www.eclipse.org/")
7320 (synopsis "Eclipse core resource management")
7321 (description "This package provides the Eclipse core resource management
7322module @code{org.eclipse.core.resources}.")
7323 (license license:epl1.0)))
7324
7325(define-public java-eclipse-compare-core
7326 (package
7327 (name "java-eclipse-compare-core")
7328 (version "3.6.0")
7329 (source (origin
7330 (method url-fetch)
7331 (uri (string-append "https://repo1.maven.org/maven2/"
7332 "org/eclipse/platform/org.eclipse.compare.core/"
7333 version "/org.eclipse.compare.core-"
7334 version "-sources.jar"))
7335 (sha256
7336 (base32
7337 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7338 (build-system ant-build-system)
7339 (arguments
7340 `(#:tests? #f ; no tests included
7341 #:jar-name "eclipse-compare-core.jar"))
7342 (inputs
7343 (list java-eclipse-core-runtime java-eclipse-equinox-common
7344 java-eclipse-osgi java-icu4j))
7345 (home-page "https://www.eclipse.org/")
7346 (synopsis "Eclipse core compare support")
7347 (description "This package provides the Eclipse core compare support
7348module @code{org.eclipse.compare.core}.")
7349 (license license:epl1.0)))
7350
7351(define-public java-eclipse-team-core
7352 (package
7353 (name "java-eclipse-team-core")
7354 (version "3.8.0")
7355 (source (origin
7356 (method url-fetch)
7357 (uri (string-append "https://repo1.maven.org/maven2/"
7358 "org/eclipse/platform/org.eclipse.team.core/"
7359 version "/org.eclipse.team.core-"
7360 version "-sources.jar"))
7361 (sha256
7362 (base32
7363 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7364 (build-system ant-build-system)
7365 (arguments
7366 `(#:tests? #f ; no tests included
7367 #:jar-name "eclipse-team-core.jar"))
7368 (inputs
7369 (list java-eclipse-compare-core
7370 java-eclipse-core-contenttype
7371 java-eclipse-core-filesystem
7372 java-eclipse-core-jobs
7373 java-eclipse-core-resources
7374 java-eclipse-core-runtime
7375 java-eclipse-equinox-common
7376 java-eclipse-equinox-registry
7377 java-eclipse-equinox-preferences
7378 java-eclipse-osgi))
7379 (home-page "https://www.eclipse.org/platform")
7380 (synopsis "Eclipse team support core")
7381 (description "This package provides the Eclipse team support core module
7382@code{org.eclipse.team.core}.")
7383 (license license:epl1.0)))
7384
7385(define-public java-eclipse-core-commands
7386 (package
7387 (name "java-eclipse-core-commands")
7388 (version "3.8.1")
7389 (source (origin
7390 (method url-fetch)
7391 (uri (string-append "https://repo1.maven.org/maven2/"
7392 "org/eclipse/platform/org.eclipse.core.commands/"
7393 version "/org.eclipse.core.commands-"
7394 version "-sources.jar"))
7395 (sha256
7396 (base32
7397 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7398 (build-system ant-build-system)
7399 (arguments
7400 `(#:tests? #f ; no tests included
7401 #:jar-name "eclipse-core-commands.jar"))
7402 (inputs
7403 (list java-eclipse-equinox-common))
7404 (home-page "https://www.eclipse.org/platform")
7405 (synopsis "Eclipse core commands")
7406 (description "This package provides Eclipse core commands in the module
7407@code{org.eclipse.core.commands}.")
7408 (license license:epl1.0)))
7409
7410(define-public java-eclipse-text
7411 (package
7412 (name "java-eclipse-text")
7413 (version "3.6.0")
7414 (source (origin
7415 (method url-fetch)
7416 (uri (string-append "https://repo1.maven.org/maven2/"
7417 "org/eclipse/platform/org.eclipse.text/"
7418 version "/org.eclipse.text-"
7419 version "-sources.jar"))
7420 (sha256
7421 (base32
7422 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7423 (build-system ant-build-system)
7424 (arguments
7425 `(#:tests? #f ; no tests included
7426 #:jar-name "eclipse-text.jar"
7427 #:phases
7428 (modify-phases %standard-phases
7429 ;; When creating a new category we must make sure that the new list
7430 ;; matches List<Position>. By default it seems to be too generic
7431 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7432 ;; Without this we get this error:
7433 ;;
7434 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7435 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7436 ;; [javac] fPositions.put(category, new ArrayList<>());
7437 ;; [javac] ^
7438 ;; [javac] required: String,List<Position>
7439 ;; [javac] found: String,ArrayList<Object>
7440 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7441 ;; to List<Position> by method invocation conversion
7442 ;; [javac] where K,V are type-variables:
7443 ;; [javac] K extends Object declared in interface Map
7444 ;; [javac] V extends Object declared in interface Map
7445 ;;
7446 ;; I don't know if this is a good fix. I suspect it is not, but it
7447 ;; seems to work.
7448 (add-after 'unpack 'fix-compilation-error
7449 (lambda _
7450 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7451 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7452 "Positions.put(category, new ArrayList<Position>());"))
7453 #t)))))
7454 (inputs
7455 (list java-eclipse-equinox-common java-eclipse-core-commands
7456 java-icu4j))
7457 (home-page "http://www.eclipse.org/platform")
7458 (synopsis "Eclipse text library")
7459 (description "Platform Text is part of the Platform UI project and
7460provides the basic building blocks for text and text editors within Eclipse
7461and contributes the Eclipse default text editor.")
7462 (license license:epl1.0)))
7463
7464(define-public java-eclipse-jdt-core
7465 (package
7466 (name "java-eclipse-jdt-core")
7467 (version "3.16.0")
7468 (source (origin
7469 (method url-fetch)
7470 (uri (string-append "https://repo1.maven.org/maven2/"
7471 "org/eclipse/jdt/org.eclipse.jdt.core/"
7472 version "/org.eclipse.jdt.core-"
7473 version "-sources.jar"))
7474 (sha256
7475 (base32
7476 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7477 (build-system ant-build-system)
7478 (arguments
7479 `(#:tests? #f ; no tests included
7480 #:jar-name "eclipse-jdt-core.jar"
7481 #:phases
7482 (modify-phases %standard-phases
7483 (add-after 'unpack 'move-sources
7484 (lambda _
7485 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7486 (for-each (lambda (file)
7487 (install-file file (string-append "../" (dirname file))))
7488 (find-files "." ".*")))
7489 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7490 #t))
7491 (add-before 'build 'copy-resources
7492 (lambda _
7493 (with-directory-excursion "src"
7494 (for-each (lambda (file)
7495 (install-file file (string-append "../build/classes/" (dirname file))))
7496 (find-files "." ".*.(props|properties|rsc)")))
7497 #t)))))
7498 (inputs
7499 (list java-eclipse-core-contenttype
7500 java-eclipse-core-filesystem
7501 java-eclipse-core-jobs
7502 java-eclipse-core-resources
7503 java-eclipse-core-runtime
7504 java-eclipse-equinox-app
7505 java-eclipse-equinox-common
7506 java-eclipse-equinox-preferences
7507 java-eclipse-equinox-registry
7508 java-eclipse-osgi
7509 java-eclipse-text))
7510 (home-page "https://www.eclipse.org/jdt")
7511 (synopsis "Java development tools core libraries")
7512 (description "This package provides the core libraries of the Eclipse Java
7513development tools.")
7514 (license license:epl1.0)))
7515
7516(define-public java-eclipse-jdt-compiler-apt
7517 (package
7518 (name "java-eclipse-jdt-compiler-apt")
7519 (version "1.3.400")
7520 (source (origin
7521 (method url-fetch)
7522 (uri (string-append "https://repo1.maven.org/maven2/"
7523 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7524 version "/org.eclipse.jdt.compiler.apt-"
7525 version "-sources.jar"))
7526 (sha256
7527 (base32
7528 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7529 (build-system ant-build-system)
7530 (arguments
7531 `(#:tests? #f ; no tests included
7532 #:jar-name "eclipse-jdt-compiler-apt.jar"
7533 #:jdk ,openjdk11))
7534 (inputs
7535 (list java-eclipse-jdt-core))
7536 (home-page "https://www.eclipse.org/jdt/apt/")
7537 (synopsis "Annotation processing tool")
7538 (description "APT stands for Annotation Processing Tool. APT provides a
7539means for generating files and compiling new Java classes based on annotations
7540found in your source code.")
7541 (license license:epl2.0)))
7542
7543(define-public java-eclipse-lsp4j-common
7544 (package
7545 (name "java-eclipse-lsp4j-common")
7546 (version "0.10.0")
7547 (source (origin
7548 (method git-fetch)
7549 (uri (git-reference
7550 (url "https://github.com/eclipse/lsp4j")
7551 (commit (string-append "v" version))))
7552 (file-name (git-file-name name version))
7553 (sha256
7554 (base32
7555 "17srrac0pkpybwwc21rzdvn762zzl9m80rlqihc9b4l55hkqpk98"))))
7556 (build-system ant-build-system)
7557 (home-page "https://eclipse.org/lsp4j/")
7558 (synopsis "LSP4J common package")
7559 (description "Eclipse LSP4J provides Java bindings for the Language
7560Server Protocol and the Debug Adapter Protocol. This package is a common
7561definition intended to be inherited by other packages.")
7562 (license license:epl2.0)))
7563
7564(define-public java-eclipse-lsp4j-debug
7565 (package
7566 (inherit java-eclipse-lsp4j-common)
7567 (name "java-eclipse-lsp4j-debug")
7568 (arguments
7569 `(#:jar-name "eclipse-lsp4j-debug.jar"
7570 #:jdk ,openjdk11
7571 #:tests? #f; tests fail with reflection errors
7572 #:source-dir "org.eclipse.lsp4j.debug/src/main/java"
7573 #:test-dir "org.eclipse.lsp4j.debug/src/test"
7574 #:phases
7575 (modify-phases %standard-phases
7576 (add-before 'build 'copy-xtend
7577 (lambda _
7578 (copy-recursively "org.eclipse.lsp4j.debug/src/main/xtend-gen"
7579 "org.eclipse.lsp4j.debug/src/main/java"))))))
7580 (native-inputs
7581 (list java-junit))
7582 (inputs
7583 `(("java-gson" ,java-gson-2.8.6)
7584 ("java-eclipse-lsp4j-generaor" ,java-eclipse-lsp4j-generator)
7585 ("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc)
7586 ("java-eclipse-lsp4j-jsonrpc-debug" ,java-eclipse-lsp4j-jsonrpc-debug)
7587 ("java-eclipse-xtext-xbase-lib" ,java-eclipse-xtext-xbase-lib)))
7588 (synopsis "Eclipse LSP4J Java bindings for the Debug Server Protocol")
7589 (description "Eclipse LSP4J provides Java bindings for the Language
7590Server Protocol and the Debug Adapter Protocol. This package contains its
7591LSP4J Java bindings for the Debug Server Protocol.")))
7592
7593(define-public java-eclipse-lsp4j-generator
7594 (package
7595 (inherit java-eclipse-lsp4j-common)
7596 (name "java-eclipse-lsp4j-generator")
7597 (arguments
7598 `(#:jar-name "eclipse-lsp4j-generator.jar"
7599 #:jdk ,openjdk11
7600 #:tests? #f; no tests
7601 #:source-dir "org.eclipse.lsp4j.generator/src/main/java"))
7602 (inputs
7603 (list java-eclipse-lsp4j-jsonrpc))
7604 (synopsis "Eclipse LSP4J Generator")
7605 (description "Eclipse LSP4J provides Java bindings for the Language
7606Server Protocol and the Debug Adapter Protocol. This package contains its
7607LSP4J code generator for Language Server Protocol classes.")))
7608
7609(define-public java-eclipse-lsp4j-jsonrpc
7610 (package
7611 (inherit java-eclipse-lsp4j-common)
7612 (name "java-eclipse-lsp4j-jsonrpc")
7613 (arguments
7614 `(#:jar-name "eclipse-lsp4j-jsonrpc.jar"
7615 #:jdk ,openjdk11
7616 #:source-dir "org.eclipse.lsp4j.jsonrpc/src/main/java"
7617 #:test-dir "org.eclipse.lsp4j.jsonrpc/src/test"))
7618 (native-inputs
7619 (list java-junit))
7620 (inputs
7621 (list java-gson-2.8.6))
7622 (synopsis "Java JSON-RPC implementation")
7623 (description "Eclipse LSP4J provides Java bindings for the Language
7624Server Protocol and the Debug Adapter Protocol. This package contains its
7625JSON-RPC implementation.")))
7626
7627(define-public java-eclipse-lsp4j-jsonrpc-debug
7628 (package
7629 (inherit java-eclipse-lsp4j-common)
7630 (name "java-eclipse-lsp4j-jsonrpc-debug")
7631 (arguments
7632 `(#:jar-name "eclipse-lsp4j-jsonrpc-debug.jar"
7633 #:jdk ,openjdk11
7634 #:source-dir "org.eclipse.lsp4j.jsonrpc.debug/src/main/java"
7635 #:test-dir "org.eclipse.lsp4j.jsonrpc.debug/src/test"))
7636 (native-inputs
7637 (list java-junit))
7638 (inputs
7639 (list java-eclipse-lsp4j-jsonrpc java-gson-2.8.6))
7640 (synopsis "Java JSON-RPC implementation (debug protocol)")
7641 (description "Eclipse LSP4J provides Java bindings for the Language
7642Server Protocol and the Debug Adapter Protocol. This package contains its
7643JSON-RPC implementation's debug protocol.")))
7644
7645(define-public java-eclipse-xtext-xbase-lib
7646 (package
7647 (name "java-eclipse-xtext-xbase-lib")
7648 (version "2.25.0")
7649 (source (origin
7650 (method git-fetch)
7651 (uri (git-reference
7652 (url "https://github.com/eclipse/xtext-lib")
7653 (commit (string-append "v" version))))
7654 (file-name (git-file-name name version))
7655 (sha256
7656 (base32
7657 "13b9lf6lnsprkik665m1qcyyc8cs16k33xm7as4rjcfcpn4pln71"))))
7658 (build-system ant-build-system)
7659 (arguments
7660 `(#:jar-name "eclipse-xtext-xbase-lib.jar"
7661 #:jdk ,openjdk11
7662 #:tests? #f; TODO (maybe needs newer guava version?)
7663 #:source-dir "org.eclipse.xtext.xbase.lib/src"
7664 #:test-dir "org.eclipse.xtext.xbase.lib.tests/src"))
7665 (native-inputs
7666 (list java-junit))
7667 (inputs
7668 (list java-guava))
7669 (home-page "https://www.eclipse.org/Xtext/")
7670 (synopsis "Eclipse Xbase Runtime Library")
7671 (description "This package contains runtime libraries for Xbase languages
7672such as Xtend.")
7673 (license license:epl2.0)))
7674
7675(define-public java-javax-mail
7676 (package
7677 (name "java-javax-mail")
7678 (version "1.5.6")
7679 (source (origin
7680 (method url-fetch)
7681 (uri (string-append "https://repo1.maven.org/maven2/"
7682 "com/sun/mail/javax.mail/"
7683 version "/javax.mail-"
7684 version "-sources.jar"))
7685 (sha256
7686 (base32
7687 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7688 (build-system ant-build-system)
7689 (arguments
7690 `(#:tests? #f ; no tests
7691 #:jar-name "javax-mail.jar"))
7692 (home-page "https://javamail.java.net")
7693 (synopsis "Reference implementation of the JavaMail API")
7694 (description
7695 "This package provides versions of the JavaMail API implementation, IMAP,
7696SMTP, and POP3 service providers, some examples, and documentation for the
7697JavaMail API.")
7698 ;; GPLv2 only with "classpath exception".
7699 (license license:gpl2)))
7700
7701(define-public java-log4j-api
7702 (package
7703 (name "java-log4j-api")
7704 (version "2.17.1")
7705 (source (origin
7706 (method url-fetch)
7707 (uri (string-append "mirror://apache/logging/log4j/" version
7708 "/apache-log4j-" version "-src.tar.gz"))
7709 (sha256
7710 (base32
7711 "05xssljdgxfv8ql42db8ydjfsvvbdqmsgip75phybm259ydzbsd6"))))
7712 (build-system ant-build-system)
7713 (arguments
7714 `(#:tests? #f ; tests require unpackaged software
7715 #:jar-name "log4j-api.jar"
7716 #:make-flags
7717 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
7718 #:phases
7719 (modify-phases %standard-phases
7720 (add-after 'unpack 'enter-dir
7721 (lambda _ (chdir "log4j-api") #t))
7722 ;; FIXME: The tests require additional software that has not been
7723 ;; packaged yet, such as
7724 ;; * org.apache.maven
7725 ;; * org.apache.felix
7726 (add-after 'enter-dir 'delete-tests
7727 (lambda _ (delete-file-recursively "src/test") #t)))))
7728 (inputs
7729 (list java-osgi-core java-hamcrest-core java-junit))
7730 (properties '((cpe-name . "log4j")))
7731 (home-page "https://logging.apache.org/log4j/2.x/")
7732 (synopsis "API module of the Log4j logging framework for Java")
7733 (description
7734 "This package provides the API module of the Log4j logging framework for
7735Java.")
7736 (license license:asl2.0)))
7737
7738(define-public java-log4j-core
7739 (package
7740 (inherit java-log4j-api)
7741 (name "java-log4j-core")
7742 (inputs
7743 `(("java-osgi-core" ,java-osgi-core)
7744 ("java-hamcrest-core" ,java-hamcrest-core)
7745 ("java-log4j-api" ,java-log4j-api)
7746 ("java-mail" ,java-mail)
7747 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7748 ("java-conversant-disruptor" ,java-conversant-disruptor)
7749 ("java-lmax-disruptor" ,java-lmax-disruptor)
7750 ("java-jctools-core" ,java-jctools-core-1)
7751 ("java-stax2-api" ,java-stax2-api)
7752 ("java-jansi" ,java-jansi)
7753 ("java-kafka" ,java-kafka-clients)
7754 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7755 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7756 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7757 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7758 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7759 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7760 ("java-commons-compress" ,java-commons-compress)
7761 ("java-commons-csv" ,java-commons-csv)
7762 ("java-jeromq" ,java-jeromq)
7763 ("java-junit" ,java-junit)))
7764 (native-inputs
7765 `(("hamcrest" ,java-hamcrest-all)
7766 ("java-commons-io" ,java-commons-io)
7767 ("java-commons-lang3" ,java-commons-lang3)
7768 ("slf4j" ,java-slf4j-api)))
7769 (arguments
7770 `(#:tests? #f ; tests require more dependencies
7771 #:test-dir "src/test"
7772 #:source-dir "src/main/java"
7773 #:jar-name "log4j-core.jar"
7774 #:jdk ,icedtea-8
7775 #:make-flags
7776 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
7777 #:phases
7778 (modify-phases %standard-phases
7779 (add-after 'unpack 'enter-dir
7780 (lambda _ (chdir "log4j-core") #t)))))
7781 (synopsis "Core component of the Log4j framework")
7782 (description "This package provides the core component of the Log4j
7783logging framework for Java.")))
7784
7785(define-public java-log4j-1.2-api
7786 (package
7787 (inherit java-log4j-api)
7788 (name "java-log4j-1.2-api")
7789 (arguments
7790 `(#:jar-name "java-log4j-1.2-api.jar"
7791 #:source-dir "log4j-1.2-api/src/main/java"
7792 #:jdk ,icedtea-8
7793 ;; Tests require maven-model (and other maven subprojects), which is a
7794 ;; cyclic dependency.
7795 #:tests? #f))
7796 (inputs
7797 `(("log4j-api" ,java-log4j-api)
7798 ("log4j-core" ,java-log4j-core)
7799 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7800 ("osgi-core" ,java-osgi-core)
7801 ("eclipse-osgi" ,java-eclipse-osgi)
7802 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7803
7804(define-public java-commons-cli
7805 (package
7806 (name "java-commons-cli")
7807 (version "1.4")
7808 (source (origin
7809 (method url-fetch)
7810 (uri (string-append "mirror://apache/commons/cli/source/"
7811 "commons-cli-" version "-src.tar.gz"))
7812 (sha256
7813 (base32
7814 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7815 (build-system ant-build-system)
7816 ;; TODO: javadoc
7817 (arguments
7818 `(#:jar-name "commons-cli.jar"
7819 #:phases
7820 (modify-phases %standard-phases
7821 (replace 'install
7822 (install-from-pom "pom.xml")))))
7823 (native-inputs
7824 (list java-junit java-hamcrest-core))
7825 (home-page "https://commons.apache.org/cli/")
7826 (synopsis "Command line arguments and options parsing library")
7827 (description "The Apache Commons CLI library provides an API for parsing
7828command line options passed to programs. It is also able to print help
7829messages detailing the options available for a command line tool.
7830
7831Commons CLI supports different types of options:
7832
7833@itemize
7834@item POSIX like options (ie. tar -zxvf foo.tar.gz)
7835@item GNU like long options (ie. du --human-readable --max-depth=1)
7836@item Java like properties (ie. java -Djava.awt.headless=true Foo)
7837@item Short options with value attached (ie. gcc -O2 foo.c)
7838@item long options with single hyphen (ie. ant -projecthelp)
7839@end itemize
7840
7841This is a part of the Apache Commons Project.")
7842 (license license:asl2.0)))
7843
7844(define-public java-commons-text
7845 (package
7846 (name "java-commons-text")
7847 (version "1.9")
7848 (source (origin
7849 (method url-fetch)
7850 (uri (string-append "mirror://apache/commons/text/source/"
7851 "commons-text-" version "-src.tar.gz"))
7852 (sha256
7853 (base32
7854 "1k99ib2dxlqxb5y94kpzf4ix8xgxz1j3n9kq3ddssqqcccsp5ik2"))))
7855 (build-system ant-build-system)
7856 (arguments
7857 (list #:jar-name "java-commons-text.jar"
7858 #:source-dir "src/main/java"
7859 #:test-dir "src/test"
7860 #:tests? #f ; Tests require JUnit5.
7861 #:phases
7862 #~(modify-phases %standard-phases
7863 (replace 'install
7864 (install-from-pom "pom.xml")))))
7865 (inputs
7866 (list java-commons-io))
7867 (propagated-inputs
7868 (list java-commons-lang3
7869 apache-commons-parent-pom-51))
7870 (home-page "https://commons.apache.org/text/")
7871 (synopsis "Library focused on algorithms working on strings")
7872 (description "Apache Commons Text is a library focused on algorithms
7873working on strings.
7874
7875This is a part of the Apache Commons Project.")
7876 (license license:asl2.0)))
7877
7878(define-public java-commons-codec
7879 (package
7880 (name "java-commons-codec")
7881 (version "1.15")
7882 (source (origin
7883 (method url-fetch)
7884 (uri (string-append "mirror://apache/commons/codec/source/"
7885 "commons-codec-" version "-src.tar.gz"))
7886 (sha256
7887 (base32
7888 "01z9qmg8fd8d7p7xxipwj1vi9bmvpgqyi29kldjz2x6vzwm171jj"))))
7889 (build-system ant-build-system)
7890 (arguments
7891 `(#:jar-name "java-commons-codec.jar"
7892 #:source-dir "src/main/java"
7893 #:test-dir "src/test"
7894 #:test-exclude (list "**/*AbstractTest.java")
7895 #:phases
7896 (modify-phases %standard-phases
7897 (add-before 'build 'copy-resources
7898 (lambda _
7899 (copy-recursively "src/main/resources"
7900 "build/classes")))
7901 (add-before 'check 'copy-test-resources
7902 (lambda _
7903 (copy-recursively "src/test/resources"
7904 "build/test-classes")))
7905 (add-before 'check 'skip-ravenous-test
7906 (lambda _
7907 ;; This test admits to being "memory hungry", but reliably fails
7908 ;; even on a machine that should have plenty (12 GiB). Skip it.
7909 (substitute*
7910 "src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java"
7911 (("\\bassertEnsureBufferSizeExpandsToMaxBufferSize.*;")
7912 "return;"))))
7913 (replace 'install (install-from-pom "pom.xml")))))
7914 (native-inputs
7915 (list java-commons-lang3 java-junit))
7916 (propagated-inputs
7917 (list apache-commons-parent-pom-52))
7918 (home-page "https://commons.apache.org/codec/")
7919 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7920 (description "The codec package contains simple encoder and decoders for
7921various formats such as Base64 and Hexadecimal. In addition to these widely
7922used encoders and decoders, the codec package also maintains a collection of
7923phonetic encoding utilities.
7924
7925This is a part of the Apache Commons Project.")
7926 (license license:asl2.0)))
7927
7928(define-public java-commons-daemon
7929 (package
7930 (name "java-commons-daemon")
7931 (version "1.1.0")
7932 (source (origin
7933 (method url-fetch)
7934 (uri (string-append "mirror://apache/commons/daemon/source/"
7935 "commons-daemon-" version "-src.tar.gz"))
7936 (sha256
7937 (base32
7938 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7939 (build-system ant-build-system)
7940 (arguments
7941 `(#:test-target "test"
7942 #:phases
7943 (modify-phases %standard-phases
7944 (add-after 'build 'build-javadoc ant-build-javadoc)
7945 (replace 'install (install-jars "dist"))
7946 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7947 (native-inputs
7948 (list java-junit))
7949 (home-page "https://commons.apache.org/daemon/")
7950 (synopsis "Library to launch Java applications as daemons")
7951 (description "The Daemon package from Apache Commons can be used to
7952implement Java applications which can be launched as daemons. For example the
7953program will be notified about a shutdown so that it can perform cleanup tasks
7954before its process of execution is destroyed by the operation system.
7955
7956This package contains the Java library. You will also need the actual binary
7957for your architecture which is provided by the jsvc package.
7958
7959This is a part of the Apache Commons Project.")
7960 (license license:asl2.0)))
7961
7962(define-public java-javaewah
7963 (package
7964 (name "java-javaewah")
7965 (version "1.1.6")
7966 (source (origin
7967 (method git-fetch)
7968 (uri (git-reference
7969 (url "https://github.com/lemire/javaewah/")
7970 (commit (string-append "JavaEWAH-" version))))
7971 (file-name (git-file-name name version))
7972 (sha256
7973 (base32
7974 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7975 (build-system ant-build-system)
7976 (arguments `(#:jar-name "javaewah.jar"))
7977 (inputs
7978 (list java-junit java-hamcrest-core))
7979 (home-page "https://github.com/lemire/javaewah")
7980 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7981 (description "This is a word-aligned compressed variant of the Java
7982@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7983compression scheme. It can be used to implement bitmap indexes.
7984
7985The goal of word-aligned compression is not to achieve the best compression,
7986but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7987cycles, maybe at the expense of storage. However, the EWAH scheme is always
7988more efficient storage-wise than an uncompressed bitmap (as implemented in the
7989@code{BitSet} class by Sun).")
7990 ;; GPL2.0 derivates are explicitly allowed.
7991 (license license:asl2.0)))
7992
7993(define-public java-slf4j-api
7994 (package
7995 (name "java-slf4j-api")
7996 (version "1.7.25")
7997 (source (origin
7998 (method git-fetch)
7999 (uri (git-reference
8000 (url "https://github.com/qos-ch/slf4j")
8001 (commit (string-append "v_" version))))
8002 (file-name (git-file-name name version))
8003 (sha256
8004 (base32
8005 "15n42zq3k1iyn752nwdcbs44hxns2rmxhglwjfr4np7lxx56apjl"))
8006 (modules '((guix build utils)))
8007 ;; Delete bundled jars.
8008 (snippet
8009 '(begin
8010 (for-each delete-file (find-files "." "\\.jar$"))
8011 #t))))
8012 (build-system ant-build-system)
8013 (arguments
8014 `(#:jar-name "slf4j-api.jar"
8015 #:source-dir "slf4j-api/src/main"
8016 #:test-dir "slf4j-api/src/test"
8017 #:phases
8018 (modify-phases %standard-phases
8019 (add-after 'build 'regenerate-jar
8020 (lambda _
8021 ;; pom.xml ignores these files in the jar creation process. If we don't,
8022 ;; we get the error "This code should have never made it into slf4j-api.jar"
8023 (delete-file-recursively "build/classes/org/slf4j/impl")
8024 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
8025 "build/classes" ".")))
8026 (add-before 'check 'dont-test-abstract-classes
8027 (lambda _
8028 ;; abstract classes are not meant to be run with junit
8029 (substitute* "build.xml"
8030 (("<include name=\"\\*\\*/\\*Test.java\" />")
8031 (string-append "<include name=\"**/*Test.java\" />"
8032 "<exclude name=\"**/MultithreadedInitializationTest"
8033 ".java\" />")))
8034 #t))
8035 (replace 'install
8036 (install-from-pom "slf4j-api/pom.xml")))))
8037 (propagated-inputs
8038 (list java-slf4j-parent))
8039 (native-inputs
8040 (list java-junit java-hamcrest-core))
8041 (home-page "https://www.slf4j.org/")
8042 (synopsis "Simple logging facade for Java")
8043 (description "The Simple Logging Facade for Java (SLF4J) serves as a
8044simple facade or abstraction for various logging
8045frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
8046allowing the end user to plug in the desired logging framework at deployment
8047time.")
8048 (license license:expat)))
8049
8050(define java-slf4j-parent
8051 (package
8052 (inherit java-slf4j-api)
8053 (name "java-slf4j-parent")
8054 (native-inputs `())
8055 (propagated-inputs '())
8056 (arguments
8057 `(#:tests? #f
8058 #:phases
8059 (modify-phases %standard-phases
8060 (delete 'build)
8061 (delete 'configure)
8062 (replace 'install
8063 (install-pom-file "pom.xml")))))))
8064
8065(define-public java-slf4j-simple
8066 (package
8067 (name "java-slf4j-simple")
8068 (version "1.7.25")
8069 (source (package-source java-slf4j-api))
8070 (build-system ant-build-system)
8071 (arguments
8072 `(#:jar-name "slf4j-simple.jar"
8073 #:source-dir "slf4j-simple/src/main"
8074 #:test-dir "slf4j-simple/src/test"
8075 #:test-exclude (list "**/*SimpleLoggerMultithreadedInitializationTest.java")
8076 #:phases
8077 (modify-phases %standard-phases
8078 ;; The tests need some test classes from slf4j-api
8079 (add-before 'check 'build-slf4j-api-test-helpers
8080 (lambda _
8081 ;; Add current dir to CLASSPATH ...
8082 (setenv "CLASSPATH"
8083 (string-append (getcwd) ":" (getenv "CLASSPATH")))
8084 ;; ... and build test helper classes here:
8085 (apply invoke
8086 `("javac" "-d" "."
8087 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
8088 (replace 'install
8089 (install-from-pom "slf4j-simple/pom.xml")))))
8090 (propagated-inputs
8091 (list java-slf4j-api))
8092 (native-inputs
8093 (list java-junit java-hamcrest-core))
8094 (home-page "https://www.slf4j.org/")
8095 (synopsis "Simple implementation of simple logging facade for Java")
8096 (description "SLF4J binding for the Simple implementation, which outputs
8097all events to System.err. Only messages of level INFO and higher are
8098printed.")
8099 (license license:expat)))
8100
8101(define-public java-slf4j-nop
8102 (package
8103 (name "java-slf4j-nop")
8104 (version "1.7.25")
8105 (source (package-source java-slf4j-api))
8106 (build-system ant-build-system)
8107 (arguments
8108 `(#:jar-name "slf4j-nop.jar"
8109 #:source-dir "slf4j-nop/src/main"
8110 #:test-dir "slf4j-nop/src/test"
8111 #:phases (modify-phases %standard-phases
8112 ;; The tests need some test classes from slf4j-api
8113 (add-before 'check 'build-slf4j-api-test-helpers
8114 (lambda _
8115 ;; Add current dir to CLASSPATH ...
8116 (setenv "CLASSPATH"
8117 (string-append (getcwd) ":"
8118 (getenv "CLASSPATH")))
8119 ;; ... and build test helper classes here:
8120 (apply invoke
8121 `("javac" "-d" "."
8122 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
8123 (replace 'install
8124 (install-from-pom "slf4j-nop/pom.xml")))))
8125 (propagated-inputs (list java-slf4j-api))
8126 (native-inputs (list java-junit java-hamcrest-core))
8127 (home-page "https://www.slf4j.org/")
8128 (synopsis "SLF4J binding that silently discards all logging messages")
8129 (description "Binding/provider for NOP, an implementation that silently
8130discards all logging messages.")
8131 (license license:expat)))
8132
8133(define-public antlr2
8134 (package
8135 (name "antlr2")
8136 (version "2.7.7")
8137 (source (origin
8138 (method url-fetch)
8139 (uri (string-append "https://www.antlr2.org/download/antlr-"
8140 version ".tar.gz"))
8141 (sha256
8142 (base32
8143 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
8144 (modules '((guix build utils)))
8145 (snippet
8146 '(begin
8147 (delete-file "antlr.jar")
8148 (substitute* "lib/cpp/antlr/CharScanner.hpp"
8149 (("#include <map>")
8150 (string-append
8151 "#include <map>\n"
8152 "#define EOF (-1)\n"
8153 "#include <strings.h>")))
8154 (substitute* "configure"
8155 (("/bin/sh") "sh"))
8156 #t))))
8157 (build-system gnu-build-system)
8158 (arguments
8159 `(#:tests? #f ; no test target
8160 #:imported-modules ((guix build ant-build-system)
8161 ,@%gnu-build-system-modules)
8162 #:modules (((guix build ant-build-system) #:prefix ant:)
8163 (guix build gnu-build-system)
8164 (guix build utils))
8165 #:phases
8166 (modify-phases %standard-phases
8167 (add-after 'install 'strip-jar-timestamps
8168 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
8169 (add-before 'configure 'fix-timestamp
8170 (lambda _
8171 (substitute* "configure"
8172 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
8173 #t))
8174 (add-after 'configure 'fix-bin-ls
8175 (lambda _
8176 (substitute* (find-files "." "Makefile")
8177 (("/bin/ls") "ls"))
8178 #t)))))
8179 (native-inputs
8180 `(("which" ,which)
8181 ("zip" ,zip)
8182 ("java" ,icedtea "jdk")))
8183 (inputs
8184 `(("java" ,icedtea)))
8185 (home-page "https://www.antlr2.org")
8186 (synopsis "Framework for constructing recognizers, compilers, and translators")
8187 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8188is a language tool that provides a framework for constructing recognizers,
8189compilers, and translators from grammatical descriptions containing Java, C#,
8190C++, or Python actions. ANTLR provides excellent support for tree construction,
8191tree walking, and translation.")
8192 (license license:public-domain)))
8193
8194(define-public java-stringtemplate-3
8195 (package
8196 (name "java-stringtemplate")
8197 (version "3.2.1")
8198 (source (origin
8199 (method url-fetch)
8200 (uri (string-append "https://github.com/antlr/website-st4/raw/"
8201 "gh-pages/download/stringtemplate-"
8202 version ".tar.gz"))
8203 (sha256
8204 (base32
8205 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
8206 (build-system ant-build-system)
8207 (arguments
8208 `(#:jar-name (string-append ,name "-" ,version ".jar")
8209 #:test-dir "test"
8210 #:modules ((guix build ant-build-system)
8211 (guix build utils)
8212 (srfi srfi-1))
8213 #:phases
8214 (modify-phases %standard-phases
8215 (add-before 'check 'fix-tests
8216 (lambda _
8217 (substitute* "build.xml"
8218 (("\\$\\{test.home\\}/java")
8219 "${test.home}/org"))
8220 #t))
8221 (add-before 'build 'generate-grammar
8222 (lambda _
8223 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
8224 (for-each (lambda (file)
8225 (format #t "~a\n" file)
8226 (invoke "antlr" file))
8227 '("template.g" "angle.bracket.template.g" "action.g"
8228 "eval.g" "group.g" "interface.g")))
8229 #t)))))
8230 (native-inputs
8231 `(("antlr" ,antlr2)
8232 ("java-junit" ,java-junit)))
8233 (home-page "https://www.stringtemplate.org")
8234 (synopsis "Template engine to generate formatted text output")
8235 (description "StringTemplate is a java template engine (with ports for C#,
8236Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
8237or any other formatted text output. StringTemplate is particularly good at
8238code generators, multiple site skins, and internationalization / localization.
8239StringTemplate also powers ANTLR.")
8240 (license license:bsd-3)))
8241
8242;; antlr3 is partially written using antlr3 grammar files. It also depends on
8243;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
8244;; files and uses antlr3 at runtime. The latest version requires a recent version
8245;; of antlr3 at runtime.
8246;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
8247;; This version of ST4 is sufficient for the latest antlr3.
8248;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
8249;; the latest ST4 with it. Then we build our final antlr3 that will be linked
8250;; against the latest ST4.
8251;; antlr3.3 still depends on antlr3 to generate some files, so we use an
8252;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
8253;; only grammar files with the antlr2 syntax.
8254;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
8255
8256(define-public java-stringtemplate
8257 (package (inherit java-stringtemplate-3)
8258 (name "java-stringtemplate")
8259 (version "4.0.8")
8260 (source (origin
8261 (method url-fetch)
8262 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
8263 version ".tar.gz"))
8264 (file-name (string-append name "-" version ".tar.gz"))
8265 (sha256
8266 (base32
8267 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
8268 (build-system ant-build-system)
8269 (arguments
8270 `(#:jar-name (string-append ,name "-" ,version ".jar")
8271 #:tests? #f ; FIXME: tests fail for unknown reasons
8272 #:test-dir "test"
8273 #:modules ((guix build ant-build-system)
8274 (guix build utils)
8275 (srfi srfi-1))
8276 #:phases
8277 (modify-phases %standard-phases
8278 (add-before 'check 'fix-test-target
8279 (lambda _
8280 (substitute* "build.xml"
8281 (("\\$\\{test.home\\}/java") "${test.home}/")
8282 (("\\*Test.java") "Test*.java"))
8283 #t))
8284 (add-before 'build 'generate-grammar
8285 (lambda _
8286 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
8287 (for-each (lambda (file)
8288 (format #t "~a\n" file)
8289 (invoke "antlr3" file))
8290 '("STParser.g" "Group.g" "CodeGenerator.g")))
8291 #t)))))
8292 (inputs
8293 `(("antlr3" ,antlr3-bootstrap)
8294 ("antlr2" ,antlr2)
8295 ("java-stringtemplate" ,java-stringtemplate-3)
8296 ("java-junit" ,java-junit)))))
8297
8298(define java-stringtemplate-4.0.6
8299 (package (inherit java-stringtemplate)
8300 (name "java-stringtemplate")
8301 (version "4.0.6")
8302 (source (origin
8303 (method url-fetch)
8304 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
8305 version ".tar.gz"))
8306 (file-name (string-append name "-" version ".tar.gz"))
8307 (sha256
8308 (base32
8309 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
8310 (inputs
8311 `(("antlr3" ,antlr3-3.3)
8312 ("antlr2" ,antlr2)
8313 ("java-stringtemplate" ,java-stringtemplate-3)))))
8314
8315(define-public antlr3
8316 (package
8317 (name "antlr3")
8318 (version "3.5.2")
8319 (source (origin
8320 (method git-fetch)
8321 (uri (git-reference
8322 (url "https://github.com/antlr/antlr3")
8323 (commit version)))
8324 (file-name (git-file-name name version))
8325 (sha256
8326 (base32
8327 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
8328 (build-system ant-build-system)
8329 (arguments
8330 `(#:jar-name (string-append ,name "-" ,version ".jar")
8331 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
8332 #:tests? #f
8333 #:phases
8334 (modify-phases %standard-phases
8335 (add-after 'install 'bin-install
8336 (lambda* (#:key inputs outputs #:allow-other-keys)
8337 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8338 (bin (string-append (assoc-ref outputs "out") "/bin")))
8339 (mkdir-p bin)
8340 (with-output-to-file (string-append bin "/antlr3")
8341 (lambda _
8342 (display
8343 (string-append "#!" (which "sh") "\n"
8344 "java -cp " jar "/" ,name "-" ,version ".jar:"
8345 (string-concatenate
8346 (find-files (assoc-ref inputs "stringtemplate")
8347 ".*\\.jar"))
8348 ":"
8349 (string-concatenate
8350 (find-files (assoc-ref inputs "stringtemplate4")
8351 ".*\\.jar"))
8352 ":"
8353 (string-concatenate
8354 (find-files (string-append
8355 (assoc-ref inputs "antlr")
8356 "/lib")
8357 ".*\\.jar"))
8358 " org.antlr.Tool $*"))))
8359 (chmod (string-append bin "/antlr3") #o755))
8360 #t))
8361 (add-before 'build 'generate-grammar
8362 (lambda _
8363 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8364 (for-each (lambda (file)
8365 (display file)
8366 (newline)
8367 (invoke "antlr3" file))
8368 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8369 "AssignTokenTypesWalker.g"
8370 "ActionTranslator.g" "TreeToNFAConverter.g"
8371 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8372 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8373 (substitute* "ANTLRParser.java"
8374 (("public Object getTree") "public GrammarAST getTree"))
8375 (substitute* "ANTLRv3Parser.java"
8376 (("public Object getTree") "public CommonTree getTree"))
8377 (chdir "../../../../../java")
8378 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8379 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8380import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8381 (substitute* "org/antlr/tool/ErrorManager.java"
8382 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8383 (chdir "../../../..")
8384 #t))
8385 (add-before 'build 'fix-build-xml
8386 (lambda _
8387 (substitute* "build.xml"
8388 (("target name=\"compile\">")
8389 "target name=\"compile\">
8390<copy todir=\"${classes.dir}\">
8391<fileset dir=\"tool/src/main/resources\">
8392<include name=\"**/*.stg\"/>
8393<include name=\"**/*.st\"/>
8394<include name=\"**/*.sti\"/>
8395<include name=\"**/STLexer.tokens\"/>
8396</fileset>
8397</copy>"))
8398 #t)))))
8399 (native-inputs
8400 `(("antlr" ,antlr2)
8401 ("antlr3" ,antlr3-bootstrap)))
8402 (inputs
8403 `(("junit" ,java-junit)
8404 ("stringtemplate" ,java-stringtemplate-3)
8405 ("stringtemplate4" ,java-stringtemplate)))
8406 (propagated-inputs
8407 `(("stringtemplate" ,java-stringtemplate-3)
8408 ("antlr" ,antlr2)
8409 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8410 (home-page "https://www.antlr3.org")
8411 (synopsis "Framework for constructing recognizers, compilers, and translators")
8412 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8413is a language tool that provides a framework for constructing recognizers,
8414compilers, and translators from grammatical descriptions containing Java, C#,
8415C++, or Python actions. ANTLR provides excellent support for tree construction,
8416tree walking, and translation.")
8417 (license license:bsd-3)))
8418
8419(define antlr3-bootstrap
8420 (package
8421 (inherit antlr3)
8422 (name "antlr3-bootstrap")
8423 (native-inputs
8424 `(("antlr" ,antlr2)
8425 ("antlr3" ,antlr3-3.3)))
8426 (inputs
8427 `(("junit" ,java-junit)))))
8428
8429(define-public antlr3-3.3
8430 (package
8431 (inherit antlr3)
8432 (name "antlr3")
8433 (version "3.3")
8434 (source (origin
8435 (method url-fetch)
8436 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8437 "gh-pages/download/antlr-"
8438 version ".tar.gz"))
8439 (sha256
8440 (base32
8441 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8442 (patches
8443 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8444 (arguments
8445 `(#:jar-name (string-append ,name "-" ,version ".jar")
8446 #:source-dir (string-join '("tool/src/main/java"
8447 "runtime/Java/src/main/java"
8448 "tool/src/main/antlr2"
8449 "tool/src/main/antlr3")
8450 ":")
8451 #:tests? #f ; FIXME: tests seem to require maven plugin
8452 #:modules ((guix build ant-build-system)
8453 (guix build utils)
8454 (srfi srfi-1))
8455 #:phases
8456 (modify-phases %standard-phases
8457 (add-after 'install 'bin-install
8458 (lambda* (#:key inputs outputs #:allow-other-keys)
8459 (let* ((out (assoc-ref outputs "out"))
8460 (jar (string-append out "/share/java"))
8461 (bin (string-append out "/bin")))
8462 (mkdir-p bin)
8463 (with-output-to-file (string-append bin "/antlr3")
8464 (lambda _
8465 (display
8466 (string-append
8467 "#!" (which "sh") "\n"
8468 "java -cp " jar "/antlr3-3.3.jar:"
8469 (string-join
8470 (append (find-files (assoc-ref inputs "java-stringtemplate")
8471 ".*\\.jar$")
8472 (find-files (string-append (assoc-ref inputs "antlr")
8473 "/lib")
8474 ".*\\.jar$"))
8475 ":")
8476 " org.antlr.Tool $*"))))
8477 (chmod (string-append bin "/antlr3") #o755)
8478 #t)))
8479 (add-before 'build 'generate-grammar
8480 (lambda _
8481 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8482 (("import org.antlr.grammar.v2.\\*;")
8483 "import org.antlr.grammar.v2.*;\n
8484import org.antlr.grammar.v2.TreeToNFAConverter;\n
8485import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8486import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8487 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8488 (for-each (lambda (file)
8489 (format #t "~a\n" file)
8490 (invoke "antlr" file))
8491 '("antlr.g" "antlr.print.g" "assign.types.g"
8492 "buildnfa.g" "codegen.g" "define.g")))
8493 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8494 (for-each (lambda (file)
8495 (format #t "~a\n" file)
8496 (invoke "antlr3" file))
8497 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8498 "ANTLRv3Tree.g")))
8499 #t))
8500 (add-before 'build 'fix-build-xml
8501 (lambda _
8502 (substitute* "build.xml"
8503 (("target name=\"compile\">")
8504 "target name=\"compile\">
8505<copy todir=\"${classes.dir}\">
8506<fileset dir=\"tool/src/main/resources\">
8507<include name=\"**/*.stg\"/>
8508<include name=\"**/*.st\"/>
8509<include name=\"**/*.sti\"/>
8510<include name=\"**/STLexer.tokens\"/>
8511</fileset>
8512</copy>"))
8513 #t)))))
8514 (native-inputs
8515 `(("antlr" ,antlr2)
8516 ("antlr3" ,antlr3-3.1)))
8517 (inputs
8518 `(("junit" ,java-junit)))
8519 (propagated-inputs
8520 `(("java-stringtemplate" ,java-stringtemplate-3)
8521 ("antlr" ,antlr2)))))
8522
8523(define-public antlr3-3.1
8524 (package
8525 (inherit antlr3)
8526 (version "3.1")
8527 (source (origin
8528 (method url-fetch)
8529 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8530 "gh-pages/download/antlr-"
8531 version ".tar.gz"))
8532 (sha256
8533 (base32
8534 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8535 (patches
8536 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8537 (arguments
8538 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8539 #:source-dir "src:runtime/Java/src"
8540 #:tests? #f
8541 #:phases
8542 (modify-phases %standard-phases
8543 (add-after 'install 'bin-install
8544 (lambda* (#:key inputs outputs #:allow-other-keys)
8545 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8546 (bin (string-append (assoc-ref outputs "out") "/bin")))
8547 (mkdir-p bin)
8548 (with-output-to-file (string-append bin "/antlr3")
8549 (lambda _
8550 (display
8551 (string-append "#!" (which "sh") "\n"
8552 "java -cp " jar "/antlr3-3.1.jar:"
8553 (string-concatenate
8554 (find-files (assoc-ref inputs "stringtemplate")
8555 ".*\\.jar"))
8556 ":"
8557 (string-concatenate
8558 (find-files (string-append
8559 (assoc-ref inputs "antlr")
8560 "/lib")
8561 ".*\\.jar"))
8562 " org.antlr.Tool $*"))))
8563 (chmod (string-append bin "/antlr3") #o755))
8564 #t))
8565 (add-before 'build 'generate-grammar
8566 (lambda _
8567 (let ((dir "src/org/antlr/tool/"))
8568 (for-each (lambda (file)
8569 (display file)
8570 (newline)
8571 (invoke "antlr" "-o" dir (string-append dir file)))
8572 '("antlr.g" "antlr.print.g" "assign.types.g"
8573 "buildnfa.g" "define.g")))
8574 (format #t "codegen.g\n")
8575 (invoke "antlr" "-o" "src/org/antlr/codegen"
8576 "src/org/antlr/codegen/codegen.g")
8577 #t))
8578 (add-before 'build 'fix-build-xml
8579 (lambda _
8580 (substitute* "build.xml"
8581 (("target name=\"compile\">")
8582 "target name=\"compile\">
8583<copy todir=\"${classes.dir}\">
8584<fileset dir=\"src\">
8585<include name=\"**/*.stg\"/>
8586<include name=\"**/*.st\"/>
8587<include name=\"**/*.sti\"/>
8588<include name=\"**/STLexer.tokens\"/>
8589</fileset>
8590</copy>"))
8591 #t)))))
8592 (native-inputs
8593 `(("antlr" ,antlr2)))
8594 (inputs
8595 `(("junit" ,java-junit)))
8596 (propagated-inputs
8597 `(("stringtemplate" ,java-stringtemplate-3)))))
8598
8599(define-public java-treelayout
8600 (package
8601 (name "java-treelayout")
8602 (version "1.0.3")
8603 (source (origin
8604 (method git-fetch)
8605 (uri (git-reference
8606 (url "https://github.com/abego/treelayout")
8607 (commit (string-append "v" version))))
8608 (file-name (git-file-name name version))
8609 (sha256
8610 (base32
8611 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8612 (build-system ant-build-system)
8613 (arguments
8614 `(#:jar-name (string-append ,name "-" ,version ".jar")
8615 #:source-dir "org.abego.treelayout/src/main/java"
8616 #:test-dir "org.abego.treelayout/src/test"))
8617 (inputs
8618 (list java-junit))
8619 (native-inputs
8620 (list java-hamcrest-core))
8621 (home-page "http://treelayout.sourceforge.net")
8622 (synopsis "Tree Layout Algorithm in Java")
8623 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8624not restricted to a specific output or format, but can be used for any kind of
8625two dimensional diagram. Examples are Swing based components, SVG files, etc.
8626This is possible because TreeLayout separates the layout of a tree from the
8627actual rendering.")
8628 (license license:bsd-3)))
8629
8630(define-public java-antlr4-runtime
8631 (package
8632 (name "java-antlr4-runtime")
8633 (version "4.10.1")
8634 (source (origin
8635 (method git-fetch)
8636 (uri (git-reference
8637 (url "https://github.com/antlr/antlr4")
8638 (commit version)))
8639 (file-name (git-file-name name version))
8640 (sha256
8641 (base32
8642 "0ldvd9jm4nrivaw7i7wh1q40q6xgzmzirsywiakbhg8sppagqlv7"))
8643 (patches
8644 (search-patches "java-antlr4-Add-standalone-generator.patch"))))
8645 (build-system ant-build-system)
8646 (arguments
8647 `(#:jar-name "java-antlr4-runtime.jar"
8648 #:source-dir "runtime/Java/src/org"
8649 #:tests? #f; tests depend on java-antlr4 itself
8650 #:phases
8651 (modify-phases %standard-phases
8652 (add-before 'build 'copy-resources
8653 (lambda _
8654 (copy-recursively "runtime/Java/src/main/dot"
8655 "build/classes")
8656 #t)))))
8657 (home-page "https://www.antlr.org")
8658 (synopsis "ANTLR runtime library")
8659 (description "This package contains the runtime library used with generated
8660sources by ANTLR.")
8661 (license license:bsd-3)))
8662
8663(define-public java-antlr4-runtime-cpp
8664 (package
8665 (inherit java-antlr4-runtime)
8666 (name "java-antlr4-runtime-cpp")
8667 (outputs '("out" "static"))
8668 (build-system cmake-build-system)
8669 (arguments
8670 (list
8671 ;; TODO: try to run the tests under
8672 ;; runtime-testsuite/test/org/antlr/v4/test/runtime/cpp with antlr4.
8673 #:tests? #f ;no CMake test target
8674 ;; TODO: Building the tests wants to download googletest.
8675 #:configure-flags #~'("-DANTLR_BUILD_CPP_TESTS=OFF")
8676 #:phases
8677 #~(modify-phases %standard-phases
8678 (add-after 'unpack 'chdir
8679 (lambda _
8680 (chdir "runtime/Cpp")))
8681 (add-after 'install 'move-static-library
8682 (lambda* (#:key outputs #:allow-other-keys)
8683 (let ((static (assoc-ref outputs "static"))
8684 (libantlr4-runtime.a (search-input-file
8685 outputs "lib/libantlr4-runtime.a")))
8686 (mkdir-p (string-append static "/lib"))
8687 (rename-file
8688 libantlr4-runtime.a
8689 (string-append static "/lib/"
8690 (basename libantlr4-runtime.a)))))))))
8691 (native-inputs (list pkg-config))
8692 (inputs (list `(,util-linux "lib"))) ;libuuid
8693 (synopsis "ANTL C++ runtime library")
8694 (description "This package contains the C++ runtime library used with C++
8695generated sources by ANTLR.")))
8696
8697(define-public antlr4
8698 (package
8699 (inherit java-antlr4-runtime)
8700 (name "antlr4")
8701 (arguments
8702 `(#:jar-name "antlr4.jar"
8703 #:source-dir "tool/src"
8704 #:test-dir "tool-testsuite/test:runtime-testsuite/test"
8705 #:test-include (list "**/Test*.java")
8706 #:test-exclude (list
8707 ;; These have no runnable methods and fail because
8708 ;; test-include above is too broad.
8709 "**/TestContext.java"
8710 "**/TestOutputReading.java"
8711 ;; no @Test methods
8712 "**/TestParserErrors.java"
8713 "**/TestSemPredEvalParser.java"
8714 "**/TestSets.java"
8715 "**/TestListeners.java"
8716 "**/TestParseTrees.java"
8717 "**/TestParserExec.java"
8718 "**/TestLexerErrors.java"
8719 "**/TestPerformance.java"
8720 "**/TestCompositeParsers.java"
8721 "**/TestLexerExec.java"
8722 "**/TestSemPredEvalLexer.java"
8723 "**/TestLeftRecursion.java"
8724 "**/TestFullContextParsing.java"
8725 "**/TestCompositeLexers.java"
8726 ;; Null pointer exception
8727 "**/TestCompositeGrammars.java")
8728 #:phases
8729 (modify-phases %standard-phases
8730 (add-before 'build 'fix-build.xml
8731 (lambda _
8732 ;; tests are not in a java subdirectory
8733 (substitute* "build.xml"
8734 (("\\$\\{test.home\\}/java") "${test.home}"))
8735 #t))
8736 ;; tests require to have a working antlr4 binary
8737 (delete 'check)
8738 (add-after 'bin-install 'check
8739 (lambda _
8740 (invoke "ant" "compile-tests")
8741 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8742 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8743 #t))
8744 (add-before 'check 'remove-unrelated-languages
8745 (lambda _
8746 ;; There are tests for other languages that ANTLR can generate, but
8747 ;; we don't have the infrastructure for that yet. Let's test Java
8748 ;; generation only.
8749 (for-each
8750 (lambda (language)
8751 (delete-file-recursively
8752 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8753 language)))
8754 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8755 "python3" "swift"))
8756 #t))
8757 (add-before 'check 'generate-test-parsers
8758 (lambda* (#:key outputs #:allow-other-keys)
8759 (define (run-antlr dir filename package)
8760 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8761 "-package" package (string-append dir "/" filename)
8762 "-Xlog"))
8763 (setenv "PATH" (string-append (getenv "PATH") ":"
8764 (assoc-ref outputs "out") "/bin"))
8765 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8766 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8767 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8768 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8769 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8770 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8771 #t))
8772 (add-before 'check 'remove-graphemes
8773 (lambda _
8774 ;; When running antlr on grahemes.g4, we get a runtime exception:
8775 ;; set is empty. So delete the file that depends on it.
8776 (delete-file
8777 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8778 #t))
8779 (add-after 'install 'bin-install
8780 (lambda* (#:key inputs outputs #:allow-other-keys)
8781 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8782 (bin (string-append (assoc-ref outputs "out") "/bin")))
8783 (mkdir-p bin)
8784 (with-output-to-file (string-append bin "/antlr4")
8785 (lambda _
8786 (display
8787 (string-append "#!" (which "sh") "\n"
8788 "java -cp " jar "/antlr4.jar:"
8789 (string-join
8790 (apply
8791 append
8792 (map
8793 (lambda (input)
8794 (find-files (assoc-ref inputs input)
8795 ".*\\.jar"))
8796 '("antlr3" "java-stringtemplate"
8797 "java-antlr4-runtime" "java-treelayout"
8798 "java-jsonp-api" "java-icu4j")))
8799 ":")
8800 " org.antlr.v4.Tool $*"))))
8801 (chmod (string-append bin "/antlr4") #o755)
8802 #t)))
8803 (add-before 'build 'copy-resources
8804 (lambda _
8805 (copy-recursively "tool/resources/" "build/classes")
8806 #t))
8807 (add-before 'build 'generate-unicode
8808 (lambda _
8809 ;; First: build the generator
8810 (invoke "javac" "-cp" (getenv "CLASSPATH")
8811 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8812 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8813 ;; Then use it
8814 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8815 ":tool/src:runtime/Java")
8816 "org.antlr.v4.unicode.UnicodeRenderer"
8817 "tool/resources/org/antlr/v4/tool/templates"
8818 "unicodedata"
8819 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8820 ;; It seems there is a bug with our ST4
8821 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8822 (("\\\\>") ">"))
8823 ;; Remove the additional file
8824 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8825 #t))
8826 (add-before 'build 'generate-grammar
8827 (lambda* (#:key inputs #:allow-other-keys)
8828 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8829 (for-each (lambda (file)
8830 (display file)
8831 (newline)
8832 (invoke "antlr3" file))
8833 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8834 "GrammarTreeVisitor.g" "ATNBuilder.g"
8835 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8836 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8837 (install-file "../parse/ANTLRParser.tokens" ".")
8838 (display "SourceGenTriggers.g\n")
8839 (invoke "antlr3" "SourceGenTriggers.g"))
8840 #t)))))
8841 (inputs
8842 (list antlr3
8843 java-antlr4-runtime
8844 java-icu4j
8845 java-jsonp-api
8846 java-stringtemplate
8847 java-treelayout))
8848 (native-inputs
8849 (list java-junit))
8850 (synopsis "Parser and lexer generator in Java")
8851 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8852parser generator for reading, processing, executing, or translating structured
8853text or binary files. It's widely used to build languages, tools, and
8854frameworks. From a grammar, ANTLR generates a parser that can build and walk
8855parse trees.")))
8856
8857(define-public java-antlr4-runtime-4.1
8858 (package
8859 (inherit java-antlr4-runtime)
8860 (version "4.1")
8861 (source (origin
8862 (method git-fetch)
8863 (uri (git-reference
8864 (url "https://github.com/antlr/antlr4")
8865 (commit version)))
8866 (file-name (git-file-name "antlr4" version))
8867 (sha256
8868 (base32
8869 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8870 (arguments
8871 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8872 ((#:phases phases)
8873 `(modify-phases ,phases
8874 (add-before 'configure 'chmod
8875 (lambda _
8876 (chmod "build.xml" #o644)
8877 #t))))))
8878 (inputs
8879 (list java-treelayout))))
8880
8881(define-public antlr4-4.1
8882 (package
8883 (inherit antlr4)
8884 (version (package-version java-antlr4-runtime-4.1))
8885 (source (package-source java-antlr4-runtime-4.1))
8886 (arguments
8887 (substitute-keyword-arguments (package-arguments antlr4)
8888 ((#:test-dir _)
8889 "tool/test")
8890 ((#:test-exclude excludes)
8891 `(list "**/TestParseErrors.java"
8892 "**/TestTopologicalSort.java"
8893 ,@excludes))
8894 ((#:phases phases)
8895 `(modify-phases ,phases
8896 (delete 'generate-unicode)
8897 (replace 'check
8898 (lambda _
8899 (invoke "ant" "check")
8900 #t))
8901 (add-before 'configure 'chmod
8902 (lambda _
8903 (chmod "build.xml" #o644)
8904 #t))
8905 (delete 'remove-graphemes)
8906 (delete 'remove-unrelated-languages)
8907 (delete 'generate-test-parsers)))))
8908 (inputs
8909 (alist-replace
8910 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8911 (package-inputs antlr4)))))
8912
8913(define-public java-tunnelvisionlabs-antlr4-runtime-annotations
8914 (package
8915 (inherit java-antlr4-runtime)
8916 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
8917 (version "4.7.4")
8918 (source (origin
8919 (method git-fetch)
8920 (uri (git-reference
8921 (url "https://github.com/tunnelvisionlabs/antlr4")
8922 (commit (string-append version "-opt"))))
8923 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
8924 (sha256
8925 (base32
8926 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
8927 (patches
8928 (search-patches "java-antlr4-Add-standalone-generator.patch"
8929 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
8930 (arguments
8931 `(#:jar-name "java-antlr4-runtime-annotations.jar"
8932 #:source-dir "runtime/JavaAnnotations/src"
8933 #:tests? #f; no tests
8934 #:phases
8935 (modify-phases %standard-phases
8936 (add-after 'build 'copy-resources
8937 (lambda _
8938 (copy-recursively "runtime/JavaAnnotations/resources"
8939 "build/classes")
8940 #t))
8941 (add-after 'copy-resources 'rebuild-jar
8942 (lambda _
8943 (invoke "ant" "jar")
8944 #t)))))
8945 (inputs '())
8946 (native-inputs '())
8947 (synopsis "Annotations for ANTLR's runtime library")
8948 (description "This package contains annotations used during the build of
8949the runtime library of ANTLR.")))
8950
8951;; the runtime of this library requires a lexer that is generated by antlr4.
8952;; However, antlr4 itself requires this library at build and run-time. We
8953;; use [email protected], the closest version of antlr that doesn't need this
8954;; bootstrap process, to generate the lexer. The generated lexer is built
8955;; for the 4.1 runtime, which is slightly different from this runtime.
8956;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
8957;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
8958;; the proper, working, runtime to build antlr4 again.
8959(define java-tunnelvisionlabs-antlr4-runtime-bootstrap
8960 (package
8961 (inherit java-antlr4-runtime)
8962 (name "java-tunnelvisionlabs-antlr4-runtime")
8963 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8964 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8965 (arguments
8966 `(#:jar-name "java-antlr4-runtime.jar"
8967 #:source-dir "runtime/Java/src"
8968 #:tests? #f; tests require antlr4, but antlr4 depends on this package
8969 #:phases
8970 (modify-phases %standard-phases
8971 (add-before 'build 'generate-xpath-lexer
8972 (lambda _
8973 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
8974 "-visitor" "-no-listener"
8975 "-package" "org.antlr.v4.runtime.tree.xpath"
8976 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
8977 ;; Generated code is for an incompatible version of the runtime
8978 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
8979 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
8980 "LexerATNSimulator(this,_ATN)"))
8981 #t))
8982 (add-before 'build 'copy-resources
8983 (lambda _
8984 (copy-recursively "runtime/Java/src/main/dot"
8985 "build/classes")
8986 #t)))))
8987 (native-inputs
8988 `(("antlr4" ,antlr4-4.1)
8989 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8990 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
8991
8992(define java-tunnelvisionlabs-antlr4-bootstrap
8993 (package
8994 (inherit antlr4)
8995 (name "java-tunnelvisionlabs-antlr4")
8996 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8997 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8998 (arguments
8999 (substitute-keyword-arguments (package-arguments antlr4)
9000 ((#:test-dir _)
9001 "tool/test:runtime-testsuite/src")
9002 ((#:phases phases)
9003 `(modify-phases ,phases
9004 (delete 'remove-unrelated-languages)
9005 (delete 'remove-graphemes)
9006 (delete 'generate-test-parsers)
9007 (delete 'check)))))
9008 (native-inputs '())
9009 (inputs
9010 `(("antlr3" ,antlr3)
9011 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
9012 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
9013 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
9014 ("java-icu4j" ,java-icu4j)
9015 ("java-jsonp-api" ,java-jsonp-api)
9016 ("java-stringtemplate" ,java-stringtemplate)
9017 ("java-treelayout" ,java-treelayout)))))
9018
9019(define-public java-tunnelvisionlabs-antlr4-runtime
9020 (package
9021 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
9022 (native-inputs
9023 (alist-replace
9024 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
9025 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
9026
9027(define-public java-tunnelvisionlabs-antlr4
9028 (package
9029 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
9030 (inputs
9031 (alist-replace
9032 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
9033 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
9034
9035(define-public java-commons-cli-1.2
9036 ;; This is a bootstrap dependency for Maven2.
9037 (package
9038 (inherit java-commons-cli)
9039 (version "1.2")
9040 (source (origin
9041 (method url-fetch)
9042 (uri (string-append "mirror://apache/commons/cli/source/"
9043 "commons-cli-" version "-src.tar.gz"))
9044 (sha256
9045 (base32
9046 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
9047 (arguments
9048 `(#:jar-name "commons-cli.jar"
9049 #:phases
9050 (modify-phases %standard-phases
9051 (add-before 'check 'fix-build-xml
9052 (lambda* (#:key inputs #:allow-other-keys)
9053 (substitute* "build.xml"
9054 (("dir=\"\\$\\{test.home\\}/java\"")
9055 "dir=\"${test.home}\""))
9056 #t)))))
9057 (native-inputs
9058 (list java-junit))))
9059
9060(define-public java-microemulator-cldc
9061 (package
9062 (name "java-microemulator-cldc")
9063 (version "2.0.4")
9064 (source (origin
9065 (method url-fetch)
9066 (uri (string-append "https://github.com/barteo/microemu/archive/"
9067 "microemulator_"
9068 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
9069 version)
9070 ".tar.gz"))
9071 (file-name (string-append name "-" version ".tar.gz"))
9072 (sha256
9073 (base32
9074 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
9075 (build-system ant-build-system)
9076 (arguments
9077 `(#:jar-name "microemulator-cldc.jar"
9078 #:source-dir "microemu-cldc/src/main/java"
9079 #:tests? #f)); Requires even older software
9080 (home-page "https://github.com/barteo/microemu")
9081 (synopsis "J2ME CLDC emulator")
9082 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
9083Emulator. It demonstrates MIDlet based applications in web browser
9084applet and can be run as a standalone java application.")
9085 (license (list license:asl2.0
9086 ;; or altenatively:
9087 license:lgpl2.1+))))
9088
9089(define-public java-datanucleus-javax-persistence
9090 (package
9091 (name "java-datanucleus-javax-persistence")
9092 (version "2.2.0")
9093 (source (origin
9094 (method url-fetch)
9095 (uri (string-append "https://github.com/datanucleus/"
9096 "javax.persistence/archive/javax.persistence-"
9097 version "-release.tar.gz"))
9098 (sha256
9099 (base32
9100 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
9101 (build-system ant-build-system)
9102 (arguments
9103 `(#:jar-name "java-datanucleus-javax-persistence.jar"
9104 #:jdk ,icedtea-8
9105 #:source-dir "src/main/java"
9106 #:tests? #f)); no tests
9107 (home-page "https://github.com/datanucleus/javax.persistence")
9108 (synopsis "JPA API")
9109 (description "This package contains a clean definition of JPA API intended
9110for use with DataNucleus JPA since the JCP haven't provided an official JPA API
9111jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
9112used to generate this API.")
9113 (license (list license:edl1.0 license:epl1.0))))
9114
9115(define-public java-osgi-cmpn
9116 (package
9117 (name "java-osgi-cmpn")
9118 (version "6.0.0")
9119 (source (origin
9120 (method url-fetch)
9121 (uri (string-append "https://repo1.maven.org/maven2/"
9122 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
9123 version "-sources.jar"))
9124 (sha256
9125 (base32
9126 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
9127 (build-system ant-build-system)
9128 (arguments
9129 `(#:jar-name "osgi-cmpn.jar"
9130 #:tests? #f)); no tests
9131 (inputs
9132 `(("annotation" ,java-osgi-annotation)
9133 ("core" ,java-osgi-core)
9134 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
9135 ("microemulator" ,java-microemulator-cldc)
9136 ("servlet" ,java-classpathx-servletapi)))
9137 (home-page "https://www.osgi.org")
9138 (synopsis "Compendium specification module of OSGi framework")
9139 (description
9140 "OSGi, for Open Services Gateway initiative framework, is a module system
9141and service platform for the Java programming language. This package contains
9142the compendium specification module, providing interfaces and classes for use
9143in compiling bundles.")
9144 (license license:asl2.0)))
9145
9146(define-public java-osgi-service-component-annotations
9147 (package
9148 (name "java-osgi-service-component-annotations")
9149 (version "1.3.0")
9150 (source (origin
9151 (method url-fetch)
9152 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9153 "org.osgi.service.component.annotations/"
9154 version "/org.osgi.service.component.annotations-"
9155 version "-sources.jar"))
9156 (sha256
9157 (base32
9158 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
9159 (build-system ant-build-system)
9160 (arguments
9161 `(#:jar-name "osgi-service-component-annotations.jar"
9162 #:tests? #f)); no tests
9163 (inputs
9164 `(("annotation" ,java-osgi-annotation)))
9165 (home-page "https://www.osgi.org")
9166 (synopsis "Support annotations for osgi-service-component")
9167 (description
9168 "OSGi, for Open Services Gateway initiative framework, is a module system
9169and service platform for the Java programming language. This package contains
9170the support annotations for osgi-service-component.")
9171 (license license:asl2.0)))
9172
9173(define-public java-osgi-dto
9174 (package
9175 (name "java-osgi-dto")
9176 (version "1.0.0")
9177 (source (origin
9178 (method url-fetch)
9179 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9180 "org.osgi.dto/" version "/org.osgi.dto-"
9181 version "-sources.jar"))
9182 (sha256
9183 (base32
9184 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
9185 (build-system ant-build-system)
9186 (arguments
9187 `(#:jar-name "osgi-dto.jar"
9188 #:tests? #f)); no tests
9189 (inputs
9190 `(("annotation" ,java-osgi-annotation)))
9191 (home-page "https://www.osgi.org")
9192 (synopsis "Data Transfer Objects")
9193 (description
9194 "OSGi, for Open Services Gateway initiative framework, is a module system
9195and service platform for the Java programming language. This package contains
9196the Data Transfer Objects. It is easily serializable having only public fields
9197of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
9198Map and array aggregates may also be used. The aggregates must only hold
9199objects of the listed types or aggregates.")
9200 (license license:asl2.0)))
9201
9202(define-public java-osgi-resource
9203 (package
9204 (name "java-osgi-resource")
9205 (version "1.0.0")
9206 (source (origin
9207 (method url-fetch)
9208 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9209 "org.osgi.resource/"
9210 version "/org.osgi.resource-"
9211 version "-sources.jar"))
9212 (sha256
9213 (base32
9214 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
9215 (build-system ant-build-system)
9216 (arguments
9217 `(#:jar-name "osgi-resource.jar"
9218 #:tests? #f)); no tests
9219 (inputs
9220 `(("annotation" ,java-osgi-annotation)
9221 ("dto" ,java-osgi-dto)))
9222 (home-page "https://www.osgi.org")
9223 (synopsis "OSGI Resource")
9224 (description
9225 "OSGi, for Open Services Gateway initiative framework, is a module system
9226and service platform for the Java programming language. This package contains
9227the definition of common types in osgi packages.")
9228 (license license:asl2.0)))
9229
9230(define-public java-osgi-namespace-contract
9231 (package
9232 (name "java-osgi-namespace-contract")
9233 (version "1.0.0")
9234 (source (origin
9235 (method url-fetch)
9236 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9237 "org.osgi.namespace.contract/"
9238 version "/org.osgi.namespace.contract-"
9239 version "-sources.jar"))
9240 (sha256
9241 (base32
9242 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
9243 (build-system ant-build-system)
9244 (inputs
9245 `(("resource" ,java-osgi-resource)
9246 ("annotation" ,java-osgi-annotation)))
9247 (arguments
9248 `(#:jar-name "osgi-namespace-contract.jar"
9249 #:tests? #f)); no tests
9250 (home-page "https://www.osgi.org")
9251 (synopsis "Contract Capability and Requirement Namespace")
9252 (description
9253 "OSGi, for Open Services Gateway initiative framework, is a module system
9254and service platform for the Java programming language. This package contains
9255the names for the attributes and directives for a namespace with contracts.")
9256 (license license:asl2.0)))
9257
9258(define-public java-osgi-namespace-extender
9259 (package
9260 (name "java-osgi-namespace-extender")
9261 (version "1.0.1")
9262 (source (origin
9263 (method url-fetch)
9264 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9265 "org.osgi.namespace.extender/"
9266 version "/org.osgi.namespace.extender-"
9267 version "-sources.jar"))
9268 (sha256
9269 (base32
9270 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
9271 (build-system ant-build-system)
9272 (inputs
9273 `(("resource" ,java-osgi-resource)
9274 ("annotation" ,java-osgi-annotation)))
9275 (arguments
9276 `(#:jar-name "osgi-namespace-extendent.jar"
9277 #:tests? #f)); no tests
9278 (home-page "https://www.osgi.org")
9279 (synopsis "Extender Capability and Requirement Namespace")
9280 (description
9281 "OSGi, for Open Services Gateway initiative framework, is a module system
9282and service platform for the Java programming language. This package contains
9283the names for the attributes and directives for an extender namespace.")
9284 (license license:asl2.0)))
9285
9286(define-public java-osgi-namespace-service
9287 (package
9288 (name "java-osgi-namespace-service")
9289 (version "1.0.0")
9290 (source (origin
9291 (method url-fetch)
9292 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9293 "org.osgi.namespace.service/"
9294 version "/org.osgi.namespace.service-"
9295 version "-sources.jar"))
9296 (sha256
9297 (base32
9298 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
9299 (build-system ant-build-system)
9300 (inputs
9301 `(("resource" ,java-osgi-resource)
9302 ("annotation" ,java-osgi-annotation)))
9303 (arguments
9304 `(#:jar-name "osgi-namespace-service.jar"
9305 #:tests? #f)); no tests
9306 (home-page "https://www.osgi.org")
9307 (synopsis "Service Capability and Requirement Namespace")
9308 (description
9309 "OSGi, for Open Services Gateway initiative framework, is a module system
9310and service platform for the Java programming language. This package contains
9311the names for the attributes and directives for a service namespace.")
9312 (license license:asl2.0)))
9313
9314(define-public java-osgi-util-function
9315 (package
9316 (name "java-osgi-util-function")
9317 (version "1.0.0")
9318 (source (origin
9319 (method url-fetch)
9320 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9321 "org.osgi.util.function/"
9322 version "/org.osgi.util.function-"
9323 version "-sources.jar"))
9324 (sha256
9325 (base32
9326 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
9327 (build-system ant-build-system)
9328 (arguments
9329 `(#:jar-name "osgi-util-function.jar"
9330 #:tests? #f)); no tests
9331 (inputs
9332 `(("annotation" ,java-osgi-annotation)))
9333 (home-page "https://www.osgi.org")
9334 (synopsis "OSGI Util Function")
9335 (description
9336 "OSGi, for Open Services Gateway initiative framework, is a module system
9337and service platform for the Java programming language. This package contains
9338an interface for a function that accepts a single argument and produces a result.")
9339 (license license:asl2.0)))
9340
9341(define-public java-osgi-util-promise
9342 (package
9343 (name "java-osgi-util-promise")
9344 (version "1.0.0")
9345 (source (origin
9346 (method url-fetch)
9347 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9348 "org.osgi.util.promise/"
9349 version "/org.osgi.util.promise-"
9350 version "-sources.jar"))
9351 (sha256
9352 (base32
9353 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
9354 (build-system ant-build-system)
9355 (arguments
9356 `(#:jar-name "osgi-util-promise.jar"
9357 #:tests? #f)); no tests
9358 (inputs
9359 `(("annotation" ,java-osgi-annotation)
9360 ("function" ,java-osgi-util-function)))
9361 (home-page "https://www.osgi.org")
9362 (synopsis "Promise of a value")
9363 (description
9364 "OSGi, for Open Services Gateway initiative framework, is a module system
9365and service platform for the Java programming language. This package contains
9366an interface and utilitary classes for promises. A Promise represents a future
9367value. It handles the interactions for asynchronous processing.")
9368 (license license:asl2.0)))
9369
9370(define-public java-osgi-service-metatype-annotations
9371 (package
9372 (name "java-osgi-service-metatype-annotations")
9373 (version "1.3.0")
9374 (source (origin
9375 (method url-fetch)
9376 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9377 "org.osgi.service.metatype.annotations/"
9378 version "/org.osgi.service.metatype.annotations-"
9379 version "-sources.jar"))
9380 (sha256
9381 (base32
9382 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
9383 (build-system ant-build-system)
9384 (arguments
9385 `(#:jar-name "osgi-service-metatype-annotations.jar"
9386 #:tests? #f)); no tests
9387 (inputs
9388 `(("annotation" ,java-osgi-annotation)))
9389 (home-page "https://www.osgi.org")
9390 (synopsis "Support annotations for metatype")
9391 (description
9392 "OSGi, for Open Services Gateway initiative framework, is a module system
9393and service platform for the Java programming language. This package contains
9394the support annotations for metatype.")
9395 (license license:asl2.0)))
9396
9397(define-public java-osgi-service-repository
9398 (package
9399 (name "java-osgi-service-repository")
9400 (version "1.1.0")
9401 (source (origin
9402 (method url-fetch)
9403 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9404 "org.osgi.service.repository/"
9405 version "/org.osgi.service.repository-"
9406 version "-sources.jar"))
9407 (sha256
9408 (base32
9409 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9410 (build-system ant-build-system)
9411 (arguments
9412 `(#:jar-name "osgi-service-repository.jar"
9413 #:tests? #f)); no tests
9414 (inputs
9415 `(("annotation" ,java-osgi-annotation)
9416 ("promise" ,java-osgi-util-promise)
9417 ("resource" ,java-osgi-resource)))
9418 (home-page "https://www.osgi.org")
9419 (synopsis "OSGI service repository")
9420 (description
9421 "OSGi, for Open Services Gateway initiative framework, is a module system
9422and service platform for the Java programming language. This package contains
9423a repository service that contains resources.")
9424 (license license:asl2.0)))
9425
9426(define-public java-osgi-framework
9427 (package
9428 (name "java-osgi-framework")
9429 (version "1.8.0")
9430 (source (origin
9431 (method url-fetch)
9432 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9433 "org.osgi.framework/" version "/org.osgi.framework-"
9434 version "-sources.jar"))
9435 (sha256
9436 (base32
9437 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9438 (build-system ant-build-system)
9439 (arguments
9440 `(#:jar-name "osgi-framework.jar"
9441 #:tests? #f)); no tests
9442 (inputs
9443 `(("annotation" ,java-osgi-annotation)
9444 ("resource" ,java-osgi-resource)
9445 ("dto" ,java-osgi-dto)))
9446 (home-page "https://www.osgi.org")
9447 (synopsis "OSGi framework")
9448 (description
9449 "OSGi, for Open Services Gateway initiative framework, is a module system
9450and service platform for the Java programming language.")
9451 (license license:asl2.0)))
9452
9453(define-public java-osgi-service-log
9454 (package
9455 (name "java-osgi-service-log")
9456 (version "1.3.0")
9457 (source (origin
9458 (method url-fetch)
9459 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9460 "org.osgi.service.log/"
9461 version "/org.osgi.service.log-"
9462 version "-sources.jar"))
9463 (sha256
9464 (base32
9465 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9466 (build-system ant-build-system)
9467 (arguments
9468 `(#:jar-name "osgi-service-log.jar"
9469 #:tests? #f)); no tests
9470 (inputs
9471 (list java-osgi-framework))
9472 (home-page "https://www.osgi.org")
9473 (synopsis "Provides methods for bundles to write messages to the log")
9474 (description
9475 "OSGi, for Open Services Gateway initiative framework, is a module system
9476and service platform for the Java programming language. This package contains
9477the log service.")
9478 (license license:asl2.0)))
9479
9480(define-public java-osgi-service-jdbc
9481 (package
9482 (name "java-osgi-service-jdbc")
9483 (version "1.0.0")
9484 (source (origin
9485 (method url-fetch)
9486 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9487 "org.osgi.service.jdbc/"
9488 version "/org.osgi.service.jdbc-"
9489 version "-sources.jar"))
9490 (sha256
9491 (base32
9492 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9493 (build-system ant-build-system)
9494 (arguments
9495 `(#:jar-name "osgi-service-jdbc.jar"
9496 #:tests? #f)); no tests
9497 (home-page "https://www.osgi.org")
9498 (synopsis "Factory for JDBC connection factories")
9499 (description
9500 "OSGi, for Open Services Gateway initiative framework, is a module system
9501and service platform for the Java programming language. This package contains
9502a factory for JDBC connection factories. There are 3 preferred connection
9503factories for getting JDBC connections:
9504
9505@itemize
9506@item @code{javax.sql.DataSource};
9507@item @code{javax.sql.ConnectionPoolDataSource};
9508@item @code{javax.sql.XADataSource}.
9509@end itemize")
9510 (license license:asl2.0)))
9511
9512(define-public java-osgi-service-resolver
9513 (package
9514 (name "java-osgi-service-resolver")
9515 (version "1.0.1")
9516 (source (origin
9517 (method url-fetch)
9518 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9519 "org.osgi.service.resolver/"
9520 version "/org.osgi.service.resolver-"
9521 version "-sources.jar"))
9522 (sha256
9523 (base32
9524 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9525 (build-system ant-build-system)
9526 (arguments
9527 `(#:jar-name "osgi-service-resolver.jar"
9528 #:tests? #f)); no tests
9529 (inputs
9530 `(("annotation" ,java-osgi-annotation)
9531 ("resource" ,java-osgi-resource)))
9532 (home-page "https://www.osgi.org")
9533 (synopsis "OSGI Resolver service")
9534 (description
9535 "OSGi, for Open Services Gateway initiative framework, is a module system
9536and service platform for the Java programming language. This package contains
9537a resolver service that resolves the specified resources in the context supplied
9538by the caller.")
9539 (license license:asl2.0)))
9540
9541(define-public java-osgi-util-tracker
9542 (package
9543 (name "java-osgi-util-tracker")
9544 (version "1.5.1")
9545 (source (origin
9546 (method url-fetch)
9547 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9548 "org.osgi.util.tracker/"
9549 version "/org.osgi.util.tracker-"
9550 version "-sources.jar"))
9551 (sha256
9552 (base32
9553 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9554 (build-system ant-build-system)
9555 (arguments
9556 `(#:jar-name "osgi-util-tracker.jar"
9557 #:tests? #f)); no tests
9558 (inputs
9559 `(("framework" ,java-osgi-framework)
9560 ("annotation" ,java-osgi-annotation)))
9561 (home-page "https://www.osgi.org")
9562 (synopsis "Bundle tracking")
9563 (description
9564 "OSGi, for Open Services Gateway initiative framework, is a module system
9565and service platform for the Java programming language. This package contains
9566bundle tracking utility classes.")
9567 (license license:asl2.0)))
9568
9569(define-public java-osgi-service-cm
9570 (package
9571 (name "java-osgi-service-cm")
9572 (version "1.5.0")
9573 (source (origin
9574 (method url-fetch)
9575 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9576 "org.osgi.service.cm/"
9577 version "/org.osgi.service.cm-"
9578 version "-sources.jar"))
9579 (sha256
9580 (base32
9581 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9582 (build-system ant-build-system)
9583 (arguments
9584 `(#:jar-name "osgi-service-cm.jar"
9585 #:tests? #f)); no tests
9586 (inputs
9587 `(("framework" ,java-osgi-framework)
9588 ("annotation" ,java-osgi-annotation)))
9589 (home-page "https://www.osgi.org")
9590 (synopsis "OSGI Configuration Management")
9591 (description
9592 "OSGi, for Open Services Gateway initiative framework, is a module system
9593and service platform for the Java programming language. This package contains
9594utility classes for the configuration of services.")
9595 (license license:asl2.0)))
9596
9597(define-public java-osgi-service-packageadmin
9598 (package
9599 (name "java-osgi-service-packageadmin")
9600 (version "1.2.0")
9601 (source (origin
9602 (method url-fetch)
9603 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9604 "org.osgi.service.packageadmin/"
9605 version "/org.osgi.service.packageadmin-"
9606 version "-sources.jar"))
9607 (sha256
9608 (base32
9609 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9610 (build-system ant-build-system)
9611 (arguments
9612 `(#:jar-name "osgi-service-packageadmin.jar"
9613 #:tests? #f)); no tests
9614 (inputs
9615 `(("framework" ,java-osgi-framework)))
9616 (home-page "https://www.osgi.org")
9617 (synopsis "OSGI Package Administration")
9618 (description
9619 "OSGi, for Open Services Gateway initiative framework, is a module system
9620and service platform for the Java programming language. This package contains
9621the packageadmin service.")
9622 (license license:asl2.0)))
9623
9624(define-public java-ops4j-base-lang
9625 (package
9626 (name "java-ops4j-base-lang")
9627 (version "1.5.0")
9628 (source (origin
9629 (method url-fetch)
9630 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9631 "archive/base-" version ".tar.gz"))
9632 (sha256
9633 (base32
9634 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9635 (build-system ant-build-system)
9636 (arguments
9637 `(#:jar-name "java-ops4j-base-lang.jar"
9638 #:source-dir "ops4j-base-lang/src/main/java"
9639 #:tests? #f; no tests
9640 #:phases
9641 (modify-phases %standard-phases
9642 (add-before 'build 'add-test-file
9643 (lambda _
9644 ;; That file is required by a test in ops4j-pax-exam-core-spi
9645 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9646 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9647 (lambda _
9648 (display
9649 (string-append
9650 "version=" ,version "\n"
9651 "groupId=org.ops4j.base"
9652 "artifactId=ops4j-base-lang\n"))))
9653 #t)))))
9654 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9655 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9656 (description "OPS4J stands for Open Participation Software for Java. This
9657package contains utilities and extensions related to @code{java.lang}.")
9658 (license license:asl2.0)))
9659
9660(define-public java-ops4j-base-monitors
9661 (package
9662 (inherit java-ops4j-base-lang)
9663 (name "java-ops4j-base-monitors")
9664 (arguments
9665 `(#:jar-name "java-ops4j-base-monitors.jar"
9666 #:source-dir "ops4j-base-monitors/src/main/java"
9667 #:tests? #f)); no tests
9668 (inputs
9669 `(("lang" ,java-ops4j-base-lang)))
9670 (description "OPS4J stands for Open Participation Software for Java. This
9671package contains utilities and extensions related to monitoring.")))
9672
9673(define-public java-ops4j-base-io
9674 (package
9675 (inherit java-ops4j-base-lang)
9676 (name "java-ops4j-base-io")
9677 (arguments
9678 `(#:jar-name "java-ops4j-base-io.jar"
9679 #:source-dir "ops4j-base-io/src/main/java"
9680 #:test-dir "ops4j-base-io/src/test"
9681 #:test-exclude
9682 (list "**/ListerTest.java")))
9683 (inputs
9684 `(("lang" ,java-ops4j-base-monitors)
9685 ("lang" ,java-ops4j-base-lang)))
9686 (native-inputs
9687 `(("junit" ,java-junit)
9688 ("hamcrest" ,java-hamcrest-core)))
9689 (description "OPS4J stands for Open Participation Software for Java. This
9690package contains utilities and extensions related to handling streams and files.")))
9691
9692(define-public java-ops4j-base-util
9693 (package
9694 (inherit java-ops4j-base-lang)
9695 (name "java-ops4j-base-util")
9696 (arguments
9697 `(#:jar-name "java-ops4j-base-util.jar"
9698 #:source-dir "ops4j-base-util/src/main/java"
9699 #:test-dir "ops4j-base-util/src/test"))
9700 (inputs
9701 `(("lang" ,java-ops4j-base-lang)))
9702 (native-inputs
9703 `(("junit" ,java-junit)))
9704 (description "OPS4J stands for Open Participation Software for Java. This
9705package contains utilities and extensions related to environment, i18n and
9706mime types.")))
9707
9708(define-public java-ops4j-base-util-property
9709 (package
9710 (inherit java-ops4j-base-lang)
9711 (name "java-ops4j-base-util-property")
9712 (arguments
9713 `(#:jar-name "java-ops4j-base-util-property.jar"
9714 #:source-dir "ops4j-base-util-property/src/main/java"
9715 #:tests? #f)); no tests
9716 (inputs
9717 `(("lang" ,java-ops4j-base-lang)
9718 ("util" ,java-ops4j-base-util)))
9719 (description "OPS4J stands for Open Participation Software for Java. This
9720package contains utilities and extensions related to resolving properties from
9721different sources.")))
9722
9723(define-public java-ops4j-base-store
9724 (package
9725 (inherit java-ops4j-base-lang)
9726 (name "java-ops4j-base-store")
9727 (arguments
9728 `(#:jar-name "java-ops4j-base-store.jar"
9729 #:source-dir "ops4j-base-store/src/main/java"
9730 #:tests? #f)); no tests
9731 (inputs
9732 `(("lang" ,java-ops4j-base-lang)
9733 ("slf4j" ,java-slf4j-api)
9734 ("io" ,java-ops4j-base-io)))
9735 (description "OPS4J stands for Open Participation Software for Java. This
9736package contains utilities for storing and retrieving data from an
9737@code{InputStream}.")))
9738
9739(define-public java-ops4j-base-spi
9740 (package
9741 (inherit java-ops4j-base-lang)
9742 (name "java-ops4j-base-spi")
9743 (arguments
9744 `(#:jar-name "java-ops4j-base-spi.jar"
9745 #:source-dir "ops4j-base-spi/src/main/java"
9746 #:test-dir "ops4j-base-spi/src/test"))
9747 (native-inputs
9748 `(("junit" ,java-junit)
9749 ("hamcrest" ,java-hamcrest-core)))
9750 (description "OPS4J stands for Open Participation Software for Java. This
9751package contains utilities for obtaining services via the Java SE 6
9752@code{ServiceLoader}.")))
9753
9754(define-public java-aqute-bnd-annotation
9755 (package
9756 (name "java-aqute-bnd-annotation")
9757 (version "3.5.0")
9758 (source (origin
9759 (method url-fetch)
9760 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9761 version ".REL.tar.gz"))
9762 (file-name (string-append name "-" version ".tar.gz"))
9763 (sha256
9764 (base32
9765 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9766 (build-system ant-build-system)
9767 (arguments
9768 `(#:jar-name "java-aqute-bnd-annotation.jar"
9769 #:source-dir "biz.aQute.bnd.annotation/src"
9770 #:tests? #f)); empty test dir
9771 (home-page "https://bnd.bndtools.org/")
9772 (synopsis "Tools for OSGi")
9773 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9774headers based on analyzing the class code, it verifies the project settings,
9775it manages project dependencies, gives diffs jars, and much more.")
9776 (license license:asl2.0)))
9777
9778(define-public java-aqute-libg
9779 (package
9780 (inherit java-aqute-bnd-annotation)
9781 (name "java-aqute-libg")
9782 (arguments
9783 `(#:jar-name "java-aqute-libg.jar"
9784 ;; The build fails when source/target more recent than 1.7. This
9785 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9786 ;;
9787 ;; It is closed as won't fix. There is no way to change the source
9788 ;; so that it works on 1.8, and still works on 1.6, the upstream
9789 ;; target. It work fine on 1.7, so we use 1.7.
9790 #:make-flags (list "-Dant.build.javac.source=1.7"
9791 "-Dant.build.javac.target=1.7")
9792 #:phases
9793 (modify-phases %standard-phases
9794 (add-before 'configure 'chdir
9795 ;; Change to aQute.libg directory, so that the relative
9796 ;; paths in the tests aren't broken.
9797 (lambda _
9798 (chdir "aQute.libg")
9799 #t))
9800 (add-before 'check 'create-test-directory
9801 ;; Copy the test directory to test/java, since that's where
9802 ;; ant-build-system's default project in build.xml expects to find
9803 ;; the test classes. Leave a copy in the original place to not
9804 ;; break paths in tests.
9805 (lambda _
9806 (mkdir "src/test")
9807 (copy-recursively "test" "src/test/java")
9808 #t)))))
9809 (inputs
9810 `(("slf4j" ,java-slf4j-api)
9811 ("osgi-annot" ,java-osgi-annotation)
9812 ("java-osgi-cmpn" ,java-osgi-cmpn)
9813 ("osgi" ,java-osgi-core)))
9814 (native-inputs
9815 `(("hamcrest" ,java-hamcrest-core)
9816 ("java-junit" ,java-junit)))))
9817
9818(define-public java-aqute-bndlib
9819 (package
9820 (inherit java-aqute-bnd-annotation)
9821 (name "java-aqute-bndlib")
9822 (arguments
9823 `(#:jar-name "java-bndlib.jar"
9824 #:source-dir "biz.aQute.bndlib/src"
9825 #:tests? #f)); no tests
9826 (inputs
9827 `(("slf4j" ,java-slf4j-api)
9828 ("osgi-annot" ,java-osgi-annotation)
9829 ("java-aqute-libg" ,java-aqute-libg)
9830 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9831 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9832 ("java-osgi-service-repository" ,java-osgi-service-repository)
9833 ("java-osgi-service-log" ,java-osgi-service-log)
9834 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9835 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9836 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9837 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9838 ("promise" ,java-osgi-util-promise)
9839 ("osgi" ,java-osgi-core)))))
9840
9841(define-public java-ops4j-pax-tinybundles
9842 (package
9843 (name "java-ops4j-pax-tinybundles")
9844 (version "2.1.1")
9845 (source (origin
9846 (method url-fetch)
9847 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9848 "archive/tinybundles-" version ".tar.gz"))
9849 (sha256
9850 (base32
9851 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9852 (arguments
9853 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9854 #:source-dir "src/main/java"
9855 #:test-exclude
9856 ;; Abstract base classes for other tests
9857 (list "**/BndTest.java" "**/CoreTest.java")
9858 #:phases
9859 (modify-phases %standard-phases
9860 (add-before 'check 'fix-version
9861 (lambda _
9862 ;; This test has a reference to an old version of bndlib we are not
9863 ;; packaging. It uses the version referenced in pom.xml. We replace
9864 ;; it with our own version.
9865 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9866 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9867 ,(package-version java-aqute-bndlib)))
9868 #t)))))
9869 (inputs
9870 `(("lang" ,java-ops4j-base-lang)
9871 ("io" ,java-ops4j-base-io)
9872 ("store" ,java-ops4j-base-store)
9873 ("slf4j" ,java-slf4j-api)
9874 ("libg" ,java-aqute-libg)
9875 ("bndlib" ,java-aqute-bndlib)))
9876 (native-inputs
9877 `(("junit" ,java-junit)
9878 ("hamcrest" ,java-hamcrest-core)
9879 ("log4j" ,java-log4j-api)
9880 ("bndannotation" ,java-aqute-bnd-annotation)
9881 ("framework" ,java-osgi-framework)))
9882 (build-system ant-build-system)
9883 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9884 (synopsis "Java APIs to create OSGi related artifacts")
9885 (description "Tinybundles is all about creating OSGi related artifacts like
9886Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9887to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9888other hand, this library can be a foundation of real end user tools that need
9889to create those artifacts.")
9890 (license license:asl2.0)))
9891
9892(define-public java-ops4j-pax-exam-core
9893 (package
9894 (name "java-ops4j-pax-exam-core")
9895 (version "4.11.0")
9896 (source (origin
9897 (method url-fetch)
9898 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9899 "archive/exam-reactor-" version ".tar.gz"))
9900 (sha256
9901 (base32
9902 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9903 (arguments
9904 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9905 #:source-dir "core/pax-exam/src/main/java"
9906 #:test-dir "core/pax-exam/src/test"))
9907 (inputs
9908 `(("slf4j" ,java-slf4j-api)
9909 ("lang" ,java-ops4j-base-lang)
9910 ("io" ,java-ops4j-base-io)
9911 ("util-property" ,java-ops4j-base-util-property)
9912 ("util-store" ,java-ops4j-base-store)
9913 ("java-osgi-core" ,java-osgi-core)))
9914 (native-inputs
9915 `(("junit" ,java-junit)
9916 ("hamcrest" ,java-hamcrest-core)))
9917 (build-system ant-build-system)
9918 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9919 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9920 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9921the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9922the system under test at the same time.")
9923 (license license:asl2.0)))
9924
9925(define-public java-ops4j-pax-exam-core-spi
9926 (package
9927 (inherit java-ops4j-pax-exam-core)
9928 (name "java-ops4j-pax-exam-core-spi")
9929 (arguments
9930 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9931 #:source-dir "src/main/java"
9932 #:test-exclude
9933 (list
9934 ;; Abstract base class, not a test
9935 "**/BaseStagedReactorTest.java"
9936 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9937 "**/WarBuilderTest.java")
9938 #:phases
9939 (modify-phases %standard-phases
9940 (add-before 'configure 'chdir
9941 (lambda _
9942 ;; Tests assume we are in this directory
9943 (chdir "core/pax-exam-spi")
9944 #t))
9945 (add-before 'check 'fix-tests
9946 (lambda _
9947 ;; One test checks that this file is present.
9948 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9949 (with-output-to-file
9950 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9951 (lambda _
9952 (display
9953 (string-append "artifactId = pax-exam-spi\n"
9954 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9955 ;; Maven puts compilation results in the target directory, while we
9956 ;; put them in the build directory.
9957 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9958 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9959 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9960 (("target") "build"))
9961 ;; One test is expected to fail, but it doesn't throw the expected exception
9962 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9963 (("AssertionError") "IllegalArgumentException"))
9964 #t)))))
9965 (inputs
9966 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9967 ("lang" ,java-ops4j-base-lang)
9968 ("monitors" ,java-ops4j-base-monitors)
9969 ("store" ,java-ops4j-base-store)
9970 ("io" ,java-ops4j-base-io)
9971 ("spi" ,java-ops4j-base-spi)
9972 ("osgi" ,java-osgi-core)
9973 ("slf4j" ,java-slf4j-api)
9974 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9975 (native-inputs
9976 `(("mockito" ,java-mockito-1)
9977 ("junit" ,java-junit)
9978 ("hamcrest" ,java-hamcrest-core)
9979 ("cglib" ,java-cglib)
9980 ("objenesis" ,java-objenesis)
9981 ("asm" ,java-asm)))))
9982
9983(define-public java-ops4j-pax-exam-core-junit
9984 (package
9985 (inherit java-ops4j-pax-exam-core)
9986 (name "java-ops4j-pax-exam-core-junit")
9987 (arguments
9988 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9989 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9990 #:tests? #f)); no tests
9991 (inputs
9992 `(("junit" ,java-junit)
9993 ("slf4j" ,java-slf4j-api)
9994 ("core" ,java-ops4j-pax-exam-core)
9995 ("spi" ,java-ops4j-pax-exam-core-spi)))
9996 (native-inputs '())))
9997
9998(define-public java-fasterxml-jackson-annotations
9999 (package
10000 (name "java-fasterxml-jackson-annotations")
10001 (version "2.9.4")
10002 (source (origin
10003 (method url-fetch)
10004 (uri (string-append "https://github.com/FasterXML/"
10005 "jackson-annotations/archive/"
10006 "jackson-annotations-" version ".tar.gz"))
10007 (sha256
10008 (base32
10009 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
10010 (build-system ant-build-system)
10011 (arguments
10012 `(#:jar-name "jackson-annotations.jar"
10013 #:source-dir "src/main/java"
10014 #:test-dir "src/test"))
10015 (native-inputs
10016 `(("junit" ,java-junit)))
10017 (home-page "https://github.com/FasterXML/jackson-annotations")
10018 (synopsis "General purpose annotations for the Jackson Data Processor")
10019 (description "This package contains general purpose annotations for the
10020Jackson Data Processor, used on value and handler types. The only annotations
10021not included are ones that require dependency to the Databind package.")
10022 (license license:asl2.0)))
10023
10024(define-public java-fasterxml-jackson-core
10025 (package
10026 (name "java-fasterxml-jackson-core")
10027 (version "2.9.4")
10028 (source (origin
10029 (method url-fetch)
10030 (uri (string-append "https://github.com/FasterXML/"
10031 "jackson-core/archive/"
10032 "jackson-core-" version ".tar.gz"))
10033 (sha256
10034 (base32
10035 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
10036 (build-system ant-build-system)
10037 (arguments
10038 `(#:jar-name "jackson-core.jar"
10039 #:source-dir "src/main/java"
10040 #:test-dir "src/test"
10041 #:test-exclude
10042 (list
10043 ;; Expected failure. pom.xml excludes these
10044 "**/failing/**"
10045 ;; Base classes that have no constructor for junit
10046 "**/BaseTest.java"
10047 "**/ConcurrencyReadTest.java"
10048 "**/ManualCharAccessTest.java"
10049 "**/ManualCharAccessTest.java"
10050 "**/TrailingCommasTest.java"
10051 "**/AsyncMissingValuesInObjectTest.java"
10052 "**/AsyncMissingValuesInArrayTest.java")
10053 #:phases
10054 (modify-phases %standard-phases
10055 (add-before 'configure 'generate-PackageVersion.java
10056 (lambda _
10057 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
10058 (in (string-append out ".in")))
10059 (copy-file in out)
10060 (substitute* out
10061 (("@package@") "com.fasterxml.jackson.core.json")
10062 (("@projectversion@") ,version)
10063 (("@projectgroupid@") "com.fasterxml.jackson.core")
10064 (("@projectartifactid@") "jackson-core")))
10065 #t))
10066 (add-before 'build 'copy-resources
10067 (lambda _
10068 (copy-recursively "src/main/resources"
10069 "build/classes")
10070 #t))
10071 (add-before 'check 'copy-test-resources
10072 (lambda _
10073 (copy-recursively "src/test/resources"
10074 "build/test-classes")
10075 #t)))))
10076 (native-inputs
10077 `(("junit" ,java-junit)
10078 ("hamcrest" ,java-hamcrest-core)))
10079 (home-page "https://github.com/FasterXML/jackson-core")
10080 (synopsis "Low-level streaming parser and generator abstractions")
10081 (description "This package contains core low-level incremental
10082(streaming) parser and generator abstractions used by the Jackson Data
10083Processor. It also includes the default implementation of handler types
10084(parser, generator) that handle JSON format.")
10085 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10086
10087(define-public java-fasterxml-jackson-databind
10088 (package
10089 (name "java-fasterxml-jackson-databind")
10090 (version "2.9.4")
10091 (source (origin
10092 (method url-fetch)
10093 (uri (string-append "https://github.com/FasterXML/"
10094 "jackson-databind/archive/"
10095 "jackson-databind-" version ".tar.gz"))
10096 (sha256
10097 (base32
10098 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
10099 (build-system ant-build-system)
10100 (arguments
10101 `(#:jar-name "jackson-databind.jar"
10102 #:source-dir "src/main/java"
10103 #:tests? #f; requires javax.measures for which I can't find a free implementation
10104 #:phases
10105 (modify-phases %standard-phases
10106 (add-before 'configure 'generate-PackageVersion.java
10107 (lambda _
10108 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
10109 (in (string-append out ".in")))
10110 (copy-file in out)
10111 (substitute* out
10112 (("@package@") "com.fasterxml.jackson.databind.cfg")
10113 (("@projectversion@") ,version)
10114 (("@projectgroupid@") "com.fasterxml.jackson.databind")
10115 (("@projectartifactid@") "jackson-databind")))
10116 #t))
10117 (add-before 'build 'copy-resources
10118 (lambda _
10119 (copy-recursively "src/main/resources" "build/classes")
10120 #t)))))
10121 (inputs
10122 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core))
10123 (home-page "https://github.com/FasterXML/jackson-databind")
10124 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
10125 (description "This package contains the general-purpose data-binding
10126functionality and tree-model for Jackson Data Processor. It builds on core
10127streaming parser/generator package, and uses Jackson Annotations for
10128configuration.")
10129 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10130
10131(define-public java-fasterxml-jackson-modules-base-jaxb
10132 (package
10133 (name "java-fasterxml-jackson-modules-base-jaxb")
10134 (version "2.9.4")
10135 (source (origin
10136 (method url-fetch)
10137 (uri (string-append "https://github.com/FasterXML/"
10138 "jackson-modules-base/archive/"
10139 "jackson-modules-base-" version ".tar.gz"))
10140 (sha256
10141 (base32
10142 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
10143 (build-system ant-build-system)
10144 (arguments
10145 `(#:jar-name "jackson-modules-base-jaxb.jar"
10146 #:source-dir "jaxb/src/main/java"
10147 #:test-dir "jaxb/src/test"
10148 #:test-exclude
10149 ;; Base class for tests
10150 (list "**/BaseJaxbTest.java")
10151 #:phases
10152 (modify-phases %standard-phases
10153 (add-before 'configure 'generate-PackageVersion.java
10154 (lambda _
10155 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
10156 "jackson/module/jaxb/PackageVersion.java"))
10157 (in (string-append out ".in")))
10158 (copy-file in out)
10159 (substitute* out
10160 (("@package@") "com.fasterxml.jackson.module.jaxb")
10161 (("@projectversion@") ,version)
10162 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
10163 (("@projectartifactid@") "jackson-module-jaxb")))
10164 #t))
10165 (add-before 'build 'copy-resources
10166 (lambda _
10167 (copy-recursively "jaxb/src/main/resources" "build/classes")
10168 #t)))))
10169 (inputs
10170 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
10171 java-fasterxml-jackson-databind))
10172 (native-inputs
10173 (list java-junit))
10174 (home-page "https://github.com/FasterXML/jackson-modules-base")
10175 (synopsis "Jaxb annotations jackson module")
10176 (description "This package is the jaxb annotations module for jackson.")
10177 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10178
10179(define-public java-fasterxml-jackson-modules-base-mrbean
10180 (package
10181 (name "java-fasterxml-jackson-modules-base-mrbean")
10182 (version "2.9.4")
10183 (source (origin
10184 (method url-fetch)
10185 (uri (string-append "https://github.com/FasterXML/"
10186 "jackson-modules-base/archive/"
10187 "jackson-modules-base-" version ".tar.gz"))
10188 (sha256
10189 (base32
10190 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
10191 (build-system ant-build-system)
10192 (arguments
10193 `(#:jar-name "jackson-modules-base-mrbean.jar"
10194 #:source-dir "mrbean/src/main/java"
10195 #:test-dir "mrbean/src/test"
10196 #:test-exclude
10197 ;; Base class for tests
10198 (list "**/BaseTest.java")
10199 #:phases
10200 (modify-phases %standard-phases
10201 (add-before 'configure 'generate-PackageVersion.java
10202 (lambda _
10203 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
10204 "jackson/module/mrbean/PackageVersion.java"))
10205 (in (string-append out ".in")))
10206 (copy-file in out)
10207 (substitute* out
10208 (("@package@") "com.fasterxml.jackson.module.mrbean")
10209 (("@projectversion@") ,version)
10210 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
10211 (("@projectartifactid@") "jackson-module-mrbean")))
10212 #t)))))
10213 (inputs
10214 (list java-asm java-fasterxml-jackson-annotations
10215 java-fasterxml-jackson-core java-fasterxml-jackson-databind))
10216 (native-inputs
10217 (list java-junit))
10218 (home-page "https://github.com/FasterXML/jackson-modules-base")
10219 (synopsis "POJO type materialization for Java")
10220 (description "This package implements POJO type materialization.
10221Databinders can construct implementation classes for Java interfaces as part
10222of deserialization.")
10223 (license license:asl2.0)))
10224
10225(define-public java-snakeyaml
10226 (package
10227 (name "java-snakeyaml")
10228 (version "1.18")
10229 (source (origin
10230 (method url-fetch)
10231 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
10232 version ".tar.gz"))
10233 (file-name (string-append name "-" version ".tar.gz"))
10234 (sha256
10235 (base32
10236 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
10237 (build-system ant-build-system)
10238 (arguments
10239 `(#:jar-name "java-snakeyaml.jar"
10240 #:source-dir "src/main/java"
10241 ;; Tests require velocity, a cyclic dependency, and
10242 ;; java-spring-framework-context which is not packaged.
10243 #:tests? #f))
10244 (home-page "https://bitbucket.org/asomov/snakeyaml")
10245 (synopsis "YAML processor")
10246 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
10247 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10248
10249(define-public java-fasterxml-jackson-dataformat-yaml
10250 (package
10251 (name "java-fasterxml-jackson-dataformat-yaml")
10252 (version "2.9.4")
10253 (source (origin
10254 (method url-fetch)
10255 (uri (string-append "https://github.com/FasterXML/"
10256 "jackson-dataformats-text/archive/"
10257 "jackson-dataformats-text-" version ".tar.gz"))
10258 (sha256
10259 (base32
10260 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
10261 (build-system ant-build-system)
10262 (arguments
10263 `(#:jar-name "jackson-dataformat-yaml.jar"
10264 #:source-dir "yaml/src/main/java"
10265 #:test-dir "yaml/src/test"
10266 #:test-exclude (list "**/failing/**.java")
10267 #:phases
10268 (modify-phases %standard-phases
10269 (add-before 'configure 'generate-PackageVersion.java
10270 (lambda _
10271 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
10272 (in (string-append out ".in")))
10273 (copy-file in out)
10274 (substitute* out
10275 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
10276 (("@projectversion@") ,version)
10277 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
10278 (("@projectartifactid@") "jackson-dataformat-yaml")))
10279 #t)))))
10280 (inputs
10281 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
10282 java-fasterxml-jackson-databind java-snakeyaml))
10283 (native-inputs
10284 `(("junit" ,java-junit)
10285 ("hamcrest" ,java-hamcrest-core)
10286 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
10287 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
10288 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
10289 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
10290 (synopsis "Yaml backend for Jackson")
10291 (description "Dataformat backends are used to support format alternatives
10292to JSON, supported by default. This is done by sub-classing Jackson core
10293abstractions.")
10294 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10295
10296(define-public java-stax2-api
10297 (package
10298 (name "java-stax2-api")
10299 (version "4.0.0")
10300 (source (origin
10301 (method url-fetch)
10302 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
10303 "stax2-api-" version ".tar.gz"))
10304 (sha256
10305 (base32
10306 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
10307 (build-system ant-build-system)
10308 (arguments
10309 `(#:jar-name "java-stax2-api.jar"
10310 #:source-dir "src/main/java"
10311 #:tests? #f)); no tests
10312 (home-page "https://github.com/FasterXML/stax2-api")
10313 (synopsis "Stax2 API")
10314 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
10315significant new functionalities, such as full-featured bi-direction validation
10316interface and high-performance Typed Access API.")
10317 (license license:bsd-2)))
10318
10319(define-public java-woodstox-core
10320 (package
10321 (name "java-woodstox-core")
10322 (version "5.0.3")
10323 (source (origin
10324 (method git-fetch)
10325 (uri (git-reference
10326 (url "https://github.com/FasterXML/woodstox")
10327 (commit (string-append "woodstox-core-" version))))
10328 (file-name (git-file-name name version))
10329 (sha256
10330 (base32
10331 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
10332 (build-system ant-build-system)
10333 (arguments
10334 `(#:jar-name "woodstox.jar"
10335 #:test-exclude
10336 (list "**/Base*.java" "failing/**")
10337 #:phases
10338 (modify-phases %standard-phases
10339 (add-before 'build 'remove-msv-dep
10340 (lambda _
10341 ;; we don't need osgi, and it depends on msv
10342 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
10343 ;; msv's latest release is from 2011 and we don't need it
10344 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
10345 (delete-file-recursively "src/test/java/wstxtest/osgi")
10346 (delete-file-recursively "src/test/java/wstxtest/msv")
10347 #t))
10348 (add-before 'build 'copy-resources
10349 (lambda _
10350 (copy-recursively "src/main/resources" "build/classes")
10351 #t)))))
10352 (inputs
10353 `(("stax2" ,java-stax2-api)))
10354 (native-inputs
10355 `(("junit" ,java-junit)))
10356 (home-page "https://github.com/FasterXML/woodstox")
10357 (synopsis "Stax XML API implementation")
10358 (description "Woodstox is a stax XML API implementation.")
10359 (license license:asl2.0)))
10360
10361(define-public java-fasterxml-jackson-dataformat-xml
10362 (package
10363 (name "java-fasterxml-jackson-dataformat-xml")
10364 (version "2.9.4")
10365 (source (origin
10366 (method git-fetch)
10367 (uri (git-reference
10368 (url "https://github.com/FasterXML/jackson-dataformat-xml")
10369 (commit (string-append "jackson-dataformat-xml-" version))))
10370 (file-name (git-file-name name version))
10371 (sha256
10372 (base32
10373 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
10374 (build-system ant-build-system)
10375 (arguments
10376 `(#:jar-name "jackson-dataformat-xml.jar"
10377 #:source-dir "src/main/java"
10378 #:test-exclude
10379 (list "**/failing/**")
10380 #:phases
10381 (modify-phases %standard-phases
10382 (add-before 'configure 'generate-PackageVersion.java
10383 (lambda _
10384 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
10385 (in (string-append out ".in")))
10386 (copy-file in out)
10387 (newline)
10388 (substitute* out
10389 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10390 (("@projectversion@") ,version)
10391 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10392 (("@projectartifactid@") "jackson-dataformat-xml")))
10393 #t))
10394 (add-before 'build 'copy-resources
10395 (lambda _
10396 (copy-recursively "src/main/resources" "build/classes")
10397 #t)))))
10398 (inputs
10399 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10400 ("jackson-core" ,java-fasterxml-jackson-core)
10401 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10402 ("jackson-databind" ,java-fasterxml-jackson-databind)
10403 ("stax2-api" ,java-stax2-api)
10404 ("woodstox" ,java-woodstox-core)))
10405 (native-inputs
10406 `(("junit" ,java-junit)
10407 ("hamcrest" ,java-hamcrest-core)))
10408 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10409 (synopsis "Read and write XML")
10410 (description "This package contains Jackson extension component for reading
10411and writing XML encoded data.
10412
10413Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10414approach (that is, no support is added for \"Schema-first\" approach). Support
10415for JAXB annotations is provided by JAXB annotation module; this module
10416provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10417@code{JsonFactory}) as well as small number of higher level overrides needed to
10418make data-binding work.")
10419 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10420
10421(define-public java-hdrhistogram
10422 (package
10423 (name "java-hdrhistogram")
10424 (version "2.1.9")
10425 (source (origin
10426 (method git-fetch)
10427 (uri (git-reference
10428 (url "https://github.com/HdrHistogram/HdrHistogram")
10429 (commit (string-append "HdrHistogram-" version))))
10430 (file-name (git-file-name name version))
10431 (sha256
10432 (base32
10433 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10434 (build-system ant-build-system)
10435 (arguments
10436 `(#:jar-name "java-hdrhistogram.jar"
10437 #:source-dir "src/main/java"
10438 #:phases
10439 (modify-phases %standard-phases
10440 (add-after 'unpack 'make-files-writable
10441 (lambda _
10442 (for-each make-file-writable (find-files "."))
10443 #t))
10444 (add-before 'configure 'set-version
10445 (lambda _
10446 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10447 (template (string-append version-java ".template")))
10448 (copy-file template version-java)
10449 (substitute* version-java
10450 (("\\$VERSION\\$") ,version)
10451 (("\\$BUILD_TIME\\$") "0"))
10452 #t))))))
10453 (native-inputs
10454 `(("junit" ,java-junit)
10455 ("hamcrest" ,java-hamcrest-core)))
10456 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10457 (synopsis "High dynamic range histogram")
10458 (description "Hdrhistogram creates histograms that support
10459recording and analyzing sampled data value counts across a configurable integer
10460value range with configurable value precision within the range. Value precision
10461is expressed as the number of significant digits in the value recording, and
10462provides control over value quantization behavior across the value range and
10463the subsequent value resolution at any given level.")
10464 (license license:public-domain)))
10465
10466(define-public java-cofoja
10467 (package
10468 (name "java-cofoja")
10469 (version "1.3")
10470 (source (origin
10471 (method git-fetch)
10472 (uri (git-reference
10473 (url "https://github.com/nhatminhle/cofoja")
10474 (commit (string-append "v" version))))
10475 (file-name (string-append "java-cofoja-" version "-checkout"))
10476 (sha256
10477 (base32
10478 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10479 (build-system ant-build-system)
10480 (arguments
10481 `(#:build-target "dist"
10482 #:test-target "test"
10483 #:jdk ,icedtea-8
10484 #:make-flags
10485 (list "-Ddist.dir=dist")
10486 #:modules ((guix build ant-build-system)
10487 (guix build java-utils)
10488 (guix build utils)
10489 (srfi srfi-1)
10490 (ice-9 match))
10491 #:phases
10492 (modify-phases %standard-phases
10493 ;; The bulid system ignores the class path the ant-build-system sets
10494 ;; up and instead expects to find all dependencies in the "lib"
10495 ;; directory.
10496 (add-after 'unpack 'create-libdir
10497 (lambda* (#:key inputs #:allow-other-keys)
10498 (mkdir-p "lib")
10499 (for-each
10500 (lambda (file)
10501 (let ((target (string-append "lib/" (basename file))))
10502 (unless (file-exists? target)
10503 (symlink file target))))
10504 (append-map (match-lambda
10505 ((label . dir)
10506 (find-files dir "\\.jar$")))
10507 inputs))
10508 #t))
10509 (replace 'install (install-jars "dist")))))
10510 (inputs
10511 (list java-asm))
10512 (native-inputs
10513 (list java-junit))
10514 (home-page "https://github.com/nhatminhle/cofoja")
10515 (synopsis "Contracts for Java")
10516 (description "Contracts for Java, or Cofoja for short, is a contract
10517programming framework and test tool for Java, which uses annotation processing
10518and bytecode instrumentation to provide run-time checking. (In particular,
10519this is not a static analysis tool.)")
10520 (license license:lgpl3+)))
10521
10522(define-public java-aopalliance
10523 (package
10524 (name "java-aopalliance")
10525 (version "1.0")
10526 (source (origin
10527 (method git-fetch)
10528 ;; Note: this git repository is not official, but contains the
10529 ;; source code that is in the CVS repository. Downloading the
10530 ;; tarball from sourceforge is undeterministic, and the cvs download
10531 ;; fails.
10532 (uri (git-reference
10533 (url "https://github.com/hoverruan/aopalliance")
10534 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10535 (file-name (string-append name "-" version))
10536 (sha256
10537 (base32
10538 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10539 (build-system ant-build-system)
10540 (arguments
10541 `(#:jar-name "java-aopalliance.jar"
10542 #:jdk ,icedtea-8
10543 #:tests? #f; no tests
10544 #:source-dir "aopalliance/src/main"
10545 #:phases
10546 (modify-phases %standard-phases
10547 (add-before 'install 'create-pom
10548 (generate-pom.xml "pom.xml" "aopalliance" "aopalliance" ,version))
10549 (replace 'install
10550 (install-from-pom "pom.xml")))))
10551 (home-page "http://aopalliance.sourceforge.net")
10552 (synopsis "Aspect-Oriented Programming")
10553 (description "The AOP Alliance project is a joint project between several
10554software engineering people who are interested in Aspect-Oriented Programming
10555(AOP) and Java.")
10556 (license license:public-domain)))
10557
10558(define-public java-javax-inject
10559 (package
10560 (name "java-javax-inject")
10561 (version "1")
10562 (source (origin
10563 (method git-fetch)
10564 (uri (git-reference
10565 (url "https://github.com/javax-inject/javax-inject")
10566 (commit version)))
10567 (file-name (git-file-name name version))
10568 (sha256
10569 (base32
10570 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10571 (build-system ant-build-system)
10572 (arguments
10573 `(#:jar-name "java-javax-inject.jar"
10574 #:tests? #f; no tests
10575 #:phases
10576 (modify-phases %standard-phases
10577 (replace 'install
10578 (install-from-pom "pom.xml")))))
10579 (home-page "https://github.com/javax-inject/javax-inject")
10580 (synopsis "JSR-330: Dependency Injection for Java")
10581 (description "This package specifies a means for obtaining objects in such
10582a way as to maximize reusability, testability and maintainability compared to
10583traditional approaches such as constructors, factories, and service locators
10584(e.g., JNDI). This process, known as dependency injection, is beneficial to
10585most nontrivial applications.
10586
10587Many types depend on other types. For example, a @var{Stopwatch} might depend
10588on a @var{TimeSource}. The types on which a type depends are known as its
10589dependencies. The process of finding an instance of a dependency to use at run
10590time is known as resolving the dependency. If no such instance can be found,
10591the dependency is said to be unsatisfied, and the application is broken.")
10592 (license license:asl2.0)))
10593
10594(define-public java-guice
10595 (package
10596 (name "java-guice")
10597 (version "4.1")
10598 (source (origin
10599 (method git-fetch)
10600 (uri (git-reference
10601 (url "https://github.com/google/guice")
10602 (commit version)))
10603 (file-name (git-file-name name version))
10604 (modules '((guix build utils)))
10605 (snippet
10606 `(begin
10607 (for-each delete-file (find-files "." ".*.jar")) #t))
10608 (sha256
10609 (base32
10610 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10611 (build-system ant-build-system)
10612 (arguments
10613 `(#:jar-name "java-guice.jar"
10614 #:jdk ,icedtea-8
10615 #:tests? #f; FIXME: tests are not in a java sub directory
10616 #:source-dir "core/src"
10617 #:phases
10618 (modify-phases %standard-phases
10619 (add-after 'unpack 'make-files-writable
10620 (lambda _
10621 (for-each make-file-writable (find-files "."))
10622 #t))
10623 (replace 'install
10624 (install-from-pom "core/pom.xml")))))
10625 (propagated-inputs
10626 (list java-aopalliance
10627 java-asm
10628 java-cglib
10629 java-guava
10630 java-javax-inject
10631 java-guice-parent-pom))
10632 (home-page "https://github.com/google/guice")
10633 (synopsis "Lightweight dependency injection framework")
10634 (description "Guice is a lightweight dependency injection framework for
10635Java 6 and above.")
10636 (license license:asl2.0)))
10637
10638(define-public java-guice-servlet
10639 (package
10640 (inherit java-guice)
10641 (name "java-guice-servlet")
10642 (arguments
10643 `(#:jar-name "guice-servlet.jar"
10644 #:source-dir "extensions/servlet/src/"
10645 #:jdk ,icedtea-8
10646 #:tests? #f ; FIXME: not in a java subdir
10647 #:phases
10648 (modify-phases %standard-phases
10649 (add-after 'unpack 'make-files-writable
10650 (lambda _
10651 (for-each make-file-writable (find-files "."))
10652 #t)))))
10653 (inputs
10654 `(("guice" ,java-guice)
10655 ("servlet" ,java-classpathx-servletapi)
10656 ,@(package-inputs java-guice)))))
10657
10658(define java-guice-parent-pom
10659 (package
10660 (inherit java-guice)
10661 (name "java-guice-parent-pom")
10662 (arguments
10663 `(#:tests? #f
10664 #:phases
10665 (modify-phases %standard-phases
10666 (delete 'configure)
10667 (delete 'build)
10668 (add-after 'install 'install-extensions
10669 (install-pom-file "extensions/pom.xml"))
10670 (replace 'install
10671 (install-pom-file "pom.xml")))))
10672 (propagated-inputs
10673 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10674
10675(define java-google-parent-pom-5
10676 (package
10677 (name "java-google-parent-pom")
10678 (version "5")
10679 (source (origin
10680 (method git-fetch)
10681 (uri (git-reference
10682 (url "https://github.com/google/google-maven-parents")
10683 (commit (string-append "google-" version))))
10684 (file-name (git-file-name name version))
10685 (sha256
10686 (base32
10687 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10688 (build-system ant-build-system)
10689 (arguments
10690 `(#:tests? #f
10691 #:phases
10692 (modify-phases %standard-phases
10693 (delete 'configure)
10694 (delete 'build)
10695 (replace 'install
10696 (install-pom-file "pom.xml")))))
10697 (home-page "https://github.com/google/google-maven-parents")
10698 (synopsis "Google parent pom")
10699 (description "This package contains the Maven parent POM for other Google
10700Java projects.")
10701 (license license:asl2.0)))
10702
10703(define-public java-assertj
10704 (package
10705 (name "java-assertj")
10706 (version "3.8.0")
10707 (source (origin
10708 (method git-fetch)
10709 (uri (git-reference
10710 (url "https://github.com/joel-costigliola/assertj-core")
10711 (commit (string-append "assertj-core-" version))))
10712 (file-name (git-file-name name version))
10713 (sha256
10714 (base32
10715 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10716 (build-system ant-build-system)
10717 (arguments
10718 `(#:jar-name "java-assertj.jar"
10719 #:jdk ,icedtea-8
10720 #:source-dir "src/main/java"
10721 #:tests? #f)); depends on tng-junit which depends on assertj
10722 (inputs
10723 `(("cglib" ,java-cglib)
10724 ("junit" ,java-junit)
10725 ("hamcrest" ,java-hamcrest-core)))
10726 (native-inputs
10727 `(("mockito" ,java-mockito-1)))
10728 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10729 (synopsis "Fluent assertions for java")
10730 (description "AssertJ core is a Java library that provides a fluent
10731interface for writing assertions. Its main goal is to improve test code
10732readability and make maintenance of tests easier.")
10733 (license license:asl2.0)))
10734
10735(define-public java-jboss-javassist
10736 (package
10737 (name "java-jboss-javassist")
10738 (version "3.21.0")
10739 (source (origin
10740 (method git-fetch)
10741 (uri (git-reference
10742 (url "https://github.com/jboss-javassist/javassist")
10743 (commit
10744 (string-append "rel_"
10745 (string-map
10746 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10747 "_ga"))))
10748 (file-name (git-file-name name version))
10749 (sha256
10750 (base32
10751 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10752 (modules '((guix build utils)))
10753 (snippet
10754 '(begin
10755 (delete-file "javassist.jar")))))
10756 (build-system ant-build-system)
10757 (arguments
10758 `(#:jar-name "java-jboss-javassist.jar"
10759 #:jdk ,icedtea-8
10760 #:source-dir "src/main"
10761 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10762 #:phases
10763 (modify-phases %standard-phases
10764 (add-after 'unpack 'make-files-writable
10765 (lambda _
10766 (for-each make-file-writable (find-files "."))
10767 #t)))))
10768 (native-inputs
10769 `(("junit" ,java-junit)))
10770 (home-page "https://github.com/jboss-javassist/javassist")
10771 (synopsis "Java bytecode engineering toolkit")
10772 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10773manipulation simple. It is a class library for editing bytecodes in Java; it
10774enables Java programs to define a new class at runtime and to modify a class
10775file when the JVM loads it.")
10776 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10777
10778(define-public java-jcommander
10779 (package
10780 (name "java-jcommander")
10781 (version "1.71")
10782 (source (origin
10783 (method git-fetch)
10784 (uri (git-reference
10785 (url "https://github.com/cbeust/jcommander")
10786 (commit version)))
10787 (file-name (git-file-name name version))
10788 (sha256
10789 (base32
10790 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10791 (build-system ant-build-system)
10792 (arguments
10793 `(#:jar-name "java-jcommander.jar"
10794 #:jdk ,icedtea-8
10795 #:tests? #f; requires testng which depends on jcommander
10796 #:source-dir "src/main/java"))
10797 (home-page "https://jcommander.org")
10798 (synopsis "Command line parameters parser")
10799 (description "JCommander is a very small Java framework that makes it
10800trivial to parse command line parameters. Parameters are declared with
10801annotations.")
10802 (license license:asl2.0)))
10803
10804(define-public java-bsh
10805 (package
10806 (name "java-bsh")
10807 (version "2.0b6")
10808 (source (origin
10809 (method git-fetch)
10810 (uri (git-reference
10811 (url "https://github.com/beanshell/beanshell")
10812 (commit version)))
10813 (file-name (git-file-name name version))
10814 (sha256
10815 (base32
10816 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10817 (modules '((guix build utils)))
10818 (snippet
10819 '(begin
10820 ;; Delete bundled third-party jar archives.
10821 (for-each delete-file (find-files "." ".*.jar$"))
10822 (for-each (lambda (file) (chmod file #o644))
10823 (find-files "." "."))
10824 #t))))
10825 (build-system ant-build-system)
10826 (arguments
10827 `(#:build-target "jarall"
10828 #:test-target "junit-tests-all"
10829 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10830 #:phases
10831 (modify-phases %standard-phases
10832 (replace 'install
10833 (install-from-pom "pom.xml")))))
10834 (inputs
10835 (list java-classpathx-servletapi java-commons-bsf))
10836 (native-inputs
10837 (list java-junit javacc-3))
10838 (home-page "http://beanshell.org/")
10839 (synopsis "Lightweight Scripting for Java")
10840 (description "BeanShell is a small, free, embeddable Java source
10841interpreter with object scripting language features, written in Java.
10842BeanShell dynamically executes standard Java syntax and extends it with common
10843scripting conveniences such as loose types, commands, and method closures like
10844those in Perl and JavaScript.")
10845 (license license:asl2.0)))
10846
10847(define-public java-fest-util
10848 (package
10849 (name "java-fest-util")
10850 (version "1.2.5")
10851 (source (origin
10852 (method git-fetch)
10853 (uri (git-reference
10854 (url "https://github.com/alexruiz/fest-util/")
10855 (commit (string-append "fest-util-" version))))
10856 (file-name (git-file-name name version))
10857 (sha256
10858 (base32
10859 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10860 (build-system ant-build-system)
10861 (arguments
10862 `(#:jar-name "java-fest-util.jar"
10863 #:source-dir "src/main/java"))
10864 (native-inputs
10865 `(("junit" ,java-junit)
10866 ("hamcrest" ,java-hamcrest-core)))
10867 (home-page "https://github.com/alexruiz/fest-util")
10868 (synopsis "FEST common utilities")
10869 (description "Common utilities used in all FEST module.")
10870 (license license:asl2.0)))
10871
10872(define-public java-fest-test
10873 (package
10874 (name "java-fest-test")
10875 (version "2.1.0")
10876 (source (origin
10877 (method git-fetch)
10878 (uri (git-reference
10879 (url "https://github.com/alexruiz/fest-test/")
10880 (commit (string-append "fest-test-" version))))
10881 (file-name (git-file-name name version))
10882 (sha256
10883 (base32
10884 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10885 (build-system ant-build-system)
10886 (arguments
10887 `(#:jar-name "java-fest-test.jar"
10888 #:source-dir "src/main/java"
10889 #:tests? #f)); no tests
10890 (inputs
10891 `(("junit" ,java-junit)))
10892 (home-page "https://github.com/alexruiz/fest-test")
10893 (synopsis "Common FEST testing infrastructure")
10894 (description "Fest-test contains the common FEST testing infrastructure.")
10895 (license license:asl2.0)))
10896
10897(define-public java-fest-assert
10898 (package
10899 (name "java-fest-assert")
10900 (version "2.0M10")
10901 (source (origin
10902 (method git-fetch)
10903 (uri (git-reference
10904 (url "https://github.com/alexruiz/fest-assert-2.x/")
10905 (commit (string-append "fest-assert-core-" version))))
10906 (file-name (git-file-name name version))
10907 (sha256
10908 (base32
10909 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10910 (build-system ant-build-system)
10911 (arguments
10912 `(#:jar-name "java-fest-assert.jar"
10913 #:source-dir "src/main/java"
10914 #:test-exclude
10915 (list
10916 "**/Abstract*.java"
10917 "**/*BaseTest.java"
10918 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10919 "**/MessageFormatter_format_Test.java"
10920 "**/internal/*/*_assert*_Test.java")))
10921 (inputs
10922 (list java-fest-util))
10923 (native-inputs
10924 (list java-junit
10925 java-fest-test
10926 java-hamcrest-core
10927 java-mockito-1
10928 java-cglib
10929 java-objenesis
10930 java-asm))
10931 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10932 (synopsis "FEST fluent assertions")
10933 (description "FEST-Assert provides a fluent interface for assertions.")
10934 (license license:asl2.0)))
10935
10936(define-public java-testng
10937 (package
10938 (name "java-testng")
10939 (version "6.14.3")
10940 (source (origin
10941 (method git-fetch)
10942 (uri (git-reference
10943 (url "https://github.com/cbeust/testng")
10944 (commit version)))
10945 (file-name (string-append name "-" version "-checkout"))
10946 (sha256
10947 (base32
10948 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10949 (build-system ant-build-system)
10950 (arguments
10951 `(#:jdk ,icedtea-8; java.util.function
10952 #:jar-name "java-testng.jar"
10953 #:source-dir "src/main/java"
10954 #:phases
10955 (modify-phases %standard-phases
10956 ;; FIXME: I don't know why these tests fail
10957 (add-after 'unpack 'delete-failing-tests
10958 (lambda _
10959 (substitute* "src/test/resources/testng.xml"
10960 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10961 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10962 #t))
10963 ;; We don't have groovy
10964 (add-after 'unpack 'delete-groovy-tests
10965 (lambda _
10966 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10967 (substitute* "src/test/resources/testng.xml"
10968 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10969 #t))
10970 (add-before 'build 'copy-resources
10971 (lambda _
10972 (copy-recursively "src/main/resources" "build/classes")
10973 #t))
10974 (add-before 'check 'copy-test-resources
10975 (lambda _
10976 (copy-recursively "src/test/resources" "build/test-classes")
10977 #t))
10978 (replace 'check
10979 (lambda _
10980 (invoke "ant" "compile-tests")
10981 ;; we don't have groovy
10982 (substitute* "src/test/resources/testng.xml"
10983 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10984 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10985 ":build/classes"
10986 ":build/test-classes")
10987 "-Dtest.resources.dir=src/test/resources"
10988 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10989 (propagated-inputs
10990 `(("junit" ,java-junit)
10991 ("java-jsr305" ,java-jsr305)
10992 ("java-bsh" ,java-bsh)
10993 ("java-jcommander" ,java-jcommander)
10994 ("java-guice" ,java-guice)
10995 ("snakeyaml" ,java-snakeyaml)))
10996 (native-inputs
10997 `(("guava" ,java-guava)
10998 ("java-javax-inject" ,java-javax-inject)
10999 ("java-hamcrest" ,java-hamcrest-all)
11000 ("java-assertj" ,java-assertj)
11001 ("java-mockito" ,java-mockito-1)
11002 ("cglib" ,java-cglib)
11003 ("asm" ,java-asm)
11004 ("aopalliance" ,java-aopalliance)))
11005 (home-page "https://testng.org")
11006 (synopsis "Testing framework")
11007 (description "TestNG is a testing framework inspired from JUnit and NUnit
11008but introducing some new functionalities that make it more powerful and easier
11009to use.")
11010 (license license:asl2.0)))
11011
11012(define-public java-jnacl
11013 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
11014 (revision "2"))
11015 (package
11016 (name "java-jnacl")
11017 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
11018 (source (origin
11019 (method git-fetch)
11020 (uri (git-reference
11021 (url "https://github.com/neilalexander/jnacl")
11022 (commit commit)))
11023 (file-name (git-file-name name version))
11024 (sha256
11025 (base32
11026 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
11027 (build-system ant-build-system)
11028 (arguments
11029 `(#:jar-name "jnacl.jar"
11030 #:source-dir "src/main/java"
11031 #:jdk ,icedtea-8
11032 #:phases
11033 (modify-phases %standard-phases
11034 (add-before 'build 'fix-tests
11035 (lambda _
11036 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
11037 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
11038 (("assertions.Assertions") "assertions.api.Assertions"))
11039 #t))
11040 (replace 'check
11041 (lambda _
11042 (invoke "ant" "compile-tests")
11043 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11044 ":build/classes"
11045 ":build/test-classes")
11046 "org.testng.TestNG" "-testclass"
11047 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
11048 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11049 ":build/classes"
11050 ":build/test-classes")
11051 "org.testng.TestNG" "-testclass"
11052 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
11053 (native-inputs
11054 (list java-testng java-fest-util java-fest-assert))
11055 (home-page "https://github.com/neilalexander/jnacl")
11056 (synopsis "Java implementation of NaCl")
11057 (description "Pure Java implementation of the NaCl: Networking and
11058Cryptography library.")
11059 (license license:bsd-2))))
11060
11061(define-public java-mvel2
11062 (package
11063 (name "java-mvel2")
11064 (version "2.3.1")
11065 (source (origin
11066 (method url-fetch)
11067 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
11068 version ".Final.tar.gz"))
11069 (sha256
11070 (base32
11071 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
11072 (build-system ant-build-system)
11073 (arguments
11074 `(#:jar-name "mvel2.jar"
11075 #:source-dir "src/main/java"
11076 #:test-exclude
11077 (list "**/Abstract*.java"
11078 ;; Base class with no tests
11079 "**/MVELThreadTest.java")
11080 #:phases
11081 (modify-phases %standard-phases
11082 (add-after 'install 'install-bin
11083 (lambda* (#:key outputs #:allow-other-keys)
11084 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
11085 (mkdir-p bin)
11086 (with-output-to-file (string-append bin "/mvel2")
11087 (lambda _
11088 (display
11089 (string-append
11090 "#!" (which "bash") "\n"
11091 "if [ \"$#\" -ne \"2\" ]; then\n"
11092 "echo 'Usage: mvel2 <script> <out.dir>'\n"
11093 "exit\n"
11094 "fi\n"
11095 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
11096 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
11097 " org.mvel2.sh.Main $1"))))
11098 (chmod (string-append bin "/mvel2") #o755))
11099 #t)))))
11100 (native-inputs
11101 `(("junit" ,java-junit)
11102 ("hamcrest" ,java-hamcrest-core)))
11103 (home-page "https://github.com/mvel/mvel")
11104 (synopsis "MVFLEX Expression Language")
11105 (description "MVEL has largely been inspired by Java syntax, but has some
11106fundamental differences aimed at making it more efficient as an expression
11107language, such as operators that directly support collection, array and string
11108matching, as well as regular expressions. MVEL is used to evaluate expressions
11109written using Java syntax.
11110
11111In addition to the expression language, MVEL serves as a templating language for
11112configuration and string construction.")
11113 (license license:asl2.0)))
11114
11115(define-public java-commons-jexl-2
11116 (package
11117 (name "java-commons-jexl")
11118 (version "2.1.1")
11119 (source (origin
11120 (method url-fetch)
11121 (uri (string-append "mirror://apache/commons/jexl/source/"
11122 "commons-jexl-" version "-src.tar.gz"))
11123 (sha256
11124 (base32
11125 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
11126 (build-system ant-build-system)
11127 (arguments
11128 `(#:jar-name "commons-jexl-2.jar"
11129 #:jdk ,icedtea-8
11130 #:source-dir "src/main/java"
11131 #:phases
11132 (modify-phases %standard-phases
11133 (add-before 'check 'disable-broken-tests
11134 (lambda* (#:key inputs #:allow-other-keys)
11135 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
11136 (substitute* "ArithmeticTest.java"
11137 (("asserter.assertExpression\\(\"3 / 0\"") "//")
11138 (("asserter.assertExpression\\(\"imanull") "//"))
11139 ;; This test fails with "ambiguous method invocation"
11140 (delete-file "CacheTest.java")
11141 ;; This test doesn't have access to the temp directory
11142 (substitute* "ClassCreatorTest.java"
11143 (("java.io.tmpdir") "user.dir"))
11144 ;; This test fails in trying to detect whether it can run.
11145 (substitute* "ClassCreator.java"
11146 (("boolean canRun =.*") "boolean canRun = false;\n"))
11147 ;; ...and these tests depend on it.
11148 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
11149 (delete-file "scripting/JexlScriptEngineTest.java"))
11150 #t))
11151 (add-before 'build 'run-javacc
11152 (lambda _
11153 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
11154 (invoke "java" "jjtree" "Parser.jjt")
11155 (invoke "java" "javacc" "Parser.jj"))
11156 #t)))))
11157 (inputs
11158 (list java-commons-logging-minimal))
11159 (native-inputs
11160 (list java-junit java-hamcrest-core javacc-4))
11161 (home-page "https://commons.apache.org/proper/commons-jexl/")
11162 (synopsis "Java Expression Language")
11163 (description "JEXL is a library intended to facilitate the implementation
11164of dynamic and scripting features in applications and frameworks written in
11165Java. JEXL implements an Expression Language based on some extensions to the
11166JSTL Expression Language supporting most of the constructs seen in
11167shell-script or ECMAScript. Its goal is to expose scripting features usable
11168by technical operatives or consultants working with enterprise platforms.")
11169 (license license:asl2.0)))
11170
11171(define-public java-lz4
11172 (package
11173 (name "java-lz4")
11174 (version "1.4.0")
11175 (source (origin
11176 (method git-fetch)
11177 (uri (git-reference
11178 (url "https://github.com/lz4/lz4-java")
11179 (commit version)))
11180 (file-name (git-file-name name version))
11181 (sha256
11182 (base32
11183 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
11184 (build-system ant-build-system)
11185 (arguments
11186 `(#:jar-name "lz4.jar"
11187 #:jdk ,icedtea-8
11188 #:source-dir "src/java:src/java-unsafe"
11189 #:tests? #f; FIXME: requires more dependencies
11190 #:phases
11191 (modify-phases %standard-phases
11192 (add-after 'unpack 'make-files-writable
11193 (lambda _
11194 (for-each make-file-writable (find-files "."))
11195 #t))
11196 (add-before 'configure 'generate-source
11197 (lambda _
11198 (with-directory-excursion "src/build/source_templates"
11199 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
11200 #t)))))
11201 (native-inputs
11202 `(("mvel" ,java-mvel2)))
11203 (home-page "https://jpountz.github.io/lz4-java")
11204 (synopsis "Compression algorithm")
11205 (description "LZ4 - Java is a Java port of the popular lz4 compression
11206algorithms and xxHash hashing algorithm.")
11207 (license license:asl2.0)))
11208
11209(define-public java-bouncycastle
11210 (package
11211 (name "java-bouncycastle")
11212 (version "1.67")
11213 (source (origin
11214 (method git-fetch)
11215 (uri (git-reference
11216 (url "http://git.bouncycastle.org/repositories/bc-java")
11217 ;(url "https://github.com/bcgit/bc-java")
11218 (commit (string-append "r1rv" (substring version 2 4)))))
11219 (file-name (git-file-name name version))
11220 (sha256
11221 (base32
11222 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
11223 (modules '((guix build utils)))
11224 (snippet
11225 '(begin
11226 (for-each delete-file
11227 (find-files "." "\\.jar$"))
11228 #t))))
11229 (build-system ant-build-system)
11230 (arguments
11231 `(#:jdk ,icedtea-8
11232 #:tests? #f
11233 #:phases
11234 (modify-phases %standard-phases
11235 (replace 'build
11236 (lambda _
11237 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
11238 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
11239 ;; FIXME: the tests freeze.
11240 ;; (replace 'check
11241 ;; (lambda _
11242 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
11243 (replace 'install
11244 (install-jars "build/artifacts/jdk1.5/jars")))))
11245 (inputs
11246 (list java-javax-mail))
11247 (native-inputs
11248 `(("unzip" ,unzip)
11249 ("junit" ,java-junit)
11250 ("java-native-access" ,java-native-access)
11251 ("java-native-access-platform" ,java-native-access-platform)))
11252 (home-page "https://www.bouncycastle.org")
11253 (synopsis "Cryptographic library")
11254 (description "Bouncy Castle is a cryptographic library for the Java
11255programming language.")
11256 (license license:expat)))
11257
11258(define-public java-lmax-disruptor
11259 (package
11260 (name "java-lmax-disruptor")
11261 (version "3.4.4")
11262 (source (origin
11263 (method git-fetch)
11264 (uri (git-reference
11265 (url "https://github.com/LMAX-Exchange/disruptor")
11266 (commit version)))
11267 (file-name (git-file-name name version))
11268 (sha256
11269 (base32
11270 "02c5kp3n8a73dq9ay7ar53s1k3x61z9yzc5ikqb03m6snr1wpfqn"))))
11271 (build-system ant-build-system)
11272 (arguments
11273 `(#:jar-name "java-lmax-disruptor.jar"
11274 #:jdk ,icedtea-8
11275 #:tests? #f)); tests hang
11276 (inputs
11277 `(("junit" ,java-junit)
11278 ("java-hdrhistogram" ,java-hdrhistogram)
11279 ("java-jmock" ,java-jmock)
11280 ("java-jmock-legacy" ,java-jmock-legacy)
11281 ("java-jmock-junit4" ,java-jmock-junit4)
11282 ("java-hamcrest-all" ,java-hamcrest-all)))
11283 (native-inputs
11284 `(("cglib" ,java-cglib)
11285 ("objenesis" ,java-objenesis)
11286 ("asm" ,java-asm)))
11287 (home-page "https://www.lmax.com/disruptor")
11288 (synopsis "High performance inter-thread communication")
11289 (description "LMAX Disruptor is a software pattern and software component
11290for high performance inter-thread communication that avoids the need for
11291message queues or resource locking.")
11292 (license license:asl2.0)))
11293
11294(define-public java-conversant-disruptor
11295 (package
11296 (name "java-conversant-disruptor")
11297 (version "1.2.19")
11298 (source (origin
11299 (method git-fetch)
11300 (uri (git-reference
11301 (url "https://github.com/conversant/disruptor")
11302 (commit version)))
11303 (file-name (git-file-name name version))
11304 (sha256
11305 (base32
11306 "0gx1dm7sfg7pa05cs4qby10gfcplai5b5lf1f7ik1a76dh3vhl0g"))))
11307 (build-system ant-build-system)
11308 (arguments
11309 `(#:jar-name "java-conversant-disruptor.jar"
11310 #:source-dir "src/main/java"
11311 #:phases
11312 (modify-phases %standard-phases
11313 (add-before 'build 'copy-resources
11314 (lambda _
11315 (copy-recursively "src/main/resources" "build/classes")))
11316 (add-before 'build 'remove-module
11317 (lambda _
11318 (delete-file "src/main/java/module-info.java"))))))
11319 (native-inputs
11320 (list java-junit))
11321 (home-page "https://github.com/conversant/disruptor")
11322 (synopsis "High performance intra-thread communication")
11323 (description "Conversant Disruptor is the highest performing intra-thread
11324transfer mechanism available in Java. Conversant Disruptor is an implementation
11325of this type of ring buffer that has almost no overhead and that exploits a
11326particularly simple design.")
11327 (license license:asl2.0)))
11328
11329(define-public java-jctools-core-1
11330 (package
11331 (name "java-jctools-core")
11332 (version "1.2.1")
11333 (source (origin
11334 (method git-fetch)
11335 (uri (git-reference
11336 (url "https://github.com/JCTools/JCTools")
11337 (commit (string-append "v" version))))
11338 (file-name (git-file-name name version))
11339 (sha256
11340 (base32
11341 "105my29nwd4djvdllmq8s3jdzbyplbkxzwmddxiiilb4yqr1pghb"))))
11342 (build-system ant-build-system)
11343 (arguments
11344 `(#:jar-name "java-jctools-core.jar"
11345 #:source-dir "jctools-core/src/main/java"
11346 #:test-dir "jctools-core/src/test"))
11347 (native-inputs
11348 (list java-junit java-hamcrest-all))
11349 (home-page "https://github.com/JCTools/JCTools")
11350 (synopsis "Concurrency tools for Java")
11351 (description "This library implements concurrent data structures that are
11352not natively available in Java.")
11353 (license license:asl2.0)))
11354
11355(define-public java-commons-bcel
11356 (package
11357 (name "java-commons-bcel")
11358 (version "6.1")
11359 (source (origin
11360 (method url-fetch)
11361 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
11362 version "-src.tar.gz"))
11363 (sha256
11364 (base32
11365 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
11366 (build-system ant-build-system)
11367 (arguments
11368 `(#:jar-name "bcel.jar"
11369 #:jdk ,icedtea-8
11370 #:source-dir "src/main/java"
11371 #:test-dir "src/test/java"
11372 ;; FIXME: Tests require the unpackaged jna.
11373 #:tests? #f))
11374 (home-page "https://commons.apache.org/proper/commons-bcel/")
11375 (synopsis "Byte code engineering library")
11376 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
11377intended to give users a convenient way to analyze, create, and
11378manipulate (binary) Java class files. Classes are represented by objects
11379which contain all the symbolic information of the given class: methods, fields
11380and byte code instructions, in particular.
11381
11382Such objects can be read from an existing file, be transformed by a
11383program (e.g. a class loader at run-time) and written to a file again. An
11384even more interesting application is the creation of classes from scratch at
11385run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
11386if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
11387of Java @code{.class} files.")
11388 (license license:asl2.0)))
11389
11390(define-public java-xerial-core
11391 (package
11392 (name "java-xerial-core")
11393 (version "2.1")
11394 (source (origin
11395 (method url-fetch)
11396 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
11397 version ".tar.gz"))
11398 (file-name (string-append name "-" version ".tar.gz"))
11399 (sha256
11400 (base32
11401 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
11402 (build-system ant-build-system)
11403 (arguments
11404 `(#:jar-name "xerial-core.jar"
11405 #:source-dir "xerial-core/src/main/java"
11406 #:test-dir "xerial-core/src/test"
11407 #:phases
11408 (modify-phases %standard-phases
11409 (add-before 'build 'copy-resources
11410 (lambda _
11411 (copy-recursively "xerial-core/src/main/resources"
11412 "build/classes")
11413 #t)))))
11414 (native-inputs
11415 `(("junit" ,java-junit)
11416 ("hamcrest" ,java-hamcrest-core)))
11417 (home-page "https://github.com/xerial/xerial-java")
11418 (synopsis "Data management libraries for Java")
11419 (description "Xerial is a set of data management libraries for the Java
11420programming language. The ultimate goal of the Xerial project is to manage
11421everything as database, including class objects, text format data, data
11422streams, etc.")
11423 (license license:asl2.0)))
11424
11425(define-public java-powermock-reflect
11426 (package
11427 (name "java-powermock-reflect")
11428 (version "1.7.3")
11429 (source (origin
11430 (method url-fetch)
11431 (uri (string-append "https://github.com/powermock/powermock/"
11432 "archive/powermock-" version ".tar.gz"))
11433 (file-name (string-append name "-" version ".tar.gz"))
11434 (sha256
11435 (base32
11436 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
11437 (patches
11438 (search-patches "java-powermock-fix-java-files.patch"))))
11439 (build-system ant-build-system)
11440 (arguments
11441 `(#:jar-name "java-powermock-reflect.jar"
11442 #:jdk ,icedtea-8
11443 #:source-dir "powermock-reflect/src/main/java"
11444 #:test-dir "powermock-reflect/src/test"))
11445 (inputs
11446 (list java-objenesis))
11447 (native-inputs
11448 `(("junit" ,java-junit)
11449 ("cglib" ,java-cglib)
11450 ("asm" ,java-asm)
11451 ("hamcrest" ,java-hamcrest-core)
11452 ("assertj" ,java-assertj)))
11453 (home-page "https://github.com/powermock/powermock")
11454 (synopsis "Mock library extension framework")
11455 (description "PowerMock is a framework that extends other mock libraries
11456such as EasyMock with more powerful capabilities. PowerMock uses a custom
11457classloader and bytecode manipulation to enable mocking of static methods,
11458constructors, final classes and methods, private methods, removal of static
11459initializers and more. By using a custom classloader no changes need to be
11460done to the IDE or continuous integration servers which simplifies adoption.")
11461 (license license:asl2.0)))
11462
11463(define-public java-powermock-core
11464 (package
11465 (inherit java-powermock-reflect)
11466 (name "java-powermock-core")
11467 (arguments
11468 `(#:jar-name "java-powermock-core.jar"
11469 #:source-dir "powermock-core/src/main/java"
11470 #:test-dir "powermock-core/src/test"
11471 #:tests? #f; requires powermock-api
11472 #:jdk ,icedtea-8
11473 #:phases
11474 (modify-phases %standard-phases
11475 (add-before 'build 'copy-resources
11476 (lambda _
11477 (copy-recursively "powermock-core/src/main/resources"
11478 "build/classes")
11479 #t)))))
11480 (inputs
11481 `(("reflect" ,java-powermock-reflect)
11482 ("javassist" ,java-jboss-javassist)))
11483 (native-inputs
11484 `(("junit" ,java-junit)
11485 ("assertj" ,java-assertj)
11486 ("mockito" ,java-mockito-1)))))
11487
11488(define-public java-powermock-api-support
11489 (package
11490 (inherit java-powermock-reflect)
11491 (name "java-powermock-api-support")
11492 (build-system ant-build-system)
11493 (arguments
11494 `(#:jar-name "java-powermock-api-support.jar"
11495 #:jdk ,icedtea-8
11496 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11497 #:tests? #f)); no tests
11498 (inputs
11499 `(("core" ,java-powermock-core)
11500 ("reflect" ,java-powermock-reflect)))))
11501
11502(define-public java-powermock-modules-junit4-common
11503 (package
11504 (inherit java-powermock-reflect)
11505 (name "java-powermock-modules-junit4-common")
11506 (build-system ant-build-system)
11507 (arguments
11508 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11509 #:jdk ,icedtea-8
11510 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11511 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11512 (inputs
11513 `(("core" ,java-powermock-core)
11514 ("easymock" ,java-easymock)
11515 ("reflect" ,java-powermock-reflect)
11516 ("hamcrest" ,java-hamcrest-core)
11517 ("cglib" ,java-cglib)))))
11518
11519(define-public java-powermock-modules-junit4
11520 (package
11521 (inherit java-powermock-reflect)
11522 (name "java-powermock-modules-junit4")
11523 (build-system ant-build-system)
11524 (arguments
11525 `(#:jar-name "java-powermock-modules-junit4.jar"
11526 #:jdk ,icedtea-8
11527 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11528 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11529 #:phases
11530 (modify-phases %standard-phases
11531 (add-before 'build 'fix-junit-detection
11532 (lambda _
11533 ;; Our junit version is 4.12-SNAPSHOT
11534 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11535 "PowerMockJUnit4MethodValidator.java")
11536 (("4.12") "4.12-SNAPSHOT"))
11537 #t)))))
11538 (inputs
11539 `(("core" ,java-powermock-core)
11540 ("reflect" ,java-powermock-reflect)
11541 ("common" ,java-powermock-modules-junit4-common)
11542 ("cglib" ,java-cglib)))
11543 (native-inputs
11544 `(("easymock" ,java-easymock)
11545 ("hamcrest" ,java-hamcrest-core)
11546 ("objenesis" ,java-objenesis)
11547 ("asm" ,java-asm)
11548 ("junit" ,java-junit)))))
11549
11550(define-public java-powermock-api-easymock
11551 (package
11552 (inherit java-powermock-reflect)
11553 (name "java-powermock-api-easymock")
11554 (build-system ant-build-system)
11555 (arguments
11556 `(#:jar-name "java-powermock-api-easymock.jar"
11557 #:jdk ,icedtea-8
11558 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11559 #:tests? #f; no tests
11560 #:phases
11561 (modify-phases %standard-phases
11562 (add-before 'build 'fix-file
11563 (lambda _
11564 ;; FIXME: This looks wrong, but it fixes a build error.
11565 (with-directory-excursion "powermock-api/powermock-api-easymock"
11566 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11567 (("classLoader instanceof MockClassLoader") "false")
11568 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11569 #t)))))
11570 (inputs
11571 `(("core" ,java-powermock-core)
11572 ("easymock" ,java-easymock)
11573 ("reflect" ,java-powermock-reflect)
11574 ("support" ,java-powermock-api-support)
11575 ("cglib" ,java-cglib)))))
11576
11577(define-public java-jboss-jms-api-spec
11578 (package
11579 (name "java-jboss-jms-api-spec")
11580 (version "2.0")
11581 (source (origin
11582 (method url-fetch)
11583 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11584 "archive/jboss-jms-api_" version
11585 "_spec-1.0.1.Final.tar.gz"))
11586 (sha256
11587 (base32
11588 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11589 (build-system ant-build-system)
11590 (arguments
11591 `(#:jar-name "java-jboss-jms-api_spec.jar"
11592 #:jdk ,icedtea-8
11593 #:source-dir "."
11594 #:tests? #f)); no tests
11595 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11596 (synopsis "Java Message Service API specification")
11597 (description "Java Message Service (JMS) API is used to send messages
11598messages between two or more clients. It is a messaging standard that allows
11599application components to create, send, receive, and read messages.")
11600 ; either gpl2 only with GPL Classpath Exception, or cddl.
11601 (license (list license:gpl2 license:cddl1.0))))
11602
11603(define-public java-mail
11604 (package
11605 (name "java-mail")
11606 (version "1.6.0")
11607 (source (origin
11608 (method url-fetch)
11609 (uri (string-append "https://github.com/javaee/javamail/archive/"
11610 "JAVAMAIL-1_6_0.tar.gz"))
11611 (sha256
11612 (base32
11613 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11614 (build-system ant-build-system)
11615 (arguments
11616 `(#:jar-name "java-mail.jar"
11617 #:jdk ,icedtea-8
11618 #:source-dir "mail/src/main/java"
11619 #:test-dir "mail/src/test"
11620 #:test-exclude
11621 (list "**/CollectorFormatterTest.java"
11622 "**/CompactFormatterTest.java"
11623 "**/DurationFilterTest.java"
11624 "**/MailHandlerTest.java"
11625 "**/GetLocalAddressTest.java"
11626 ;; SSLHandshakeException: No appropriate protocol
11627 "**/WriteTimeoutSocketTest.java"
11628 ;; FIXME: both end with:
11629 ;; java.lang.ClassNotFoundException:
11630 ;; javax.mail.internet.MimeMultipartParseTest
11631 "**/MimeMultipartParseTest.java"
11632 "**/SearchTermSerializationTest.java")
11633 #:phases
11634 (modify-phases %standard-phases
11635 (add-before 'configure 'move-version.java
11636 (lambda _
11637 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11638 "mail/src/main/java/javax/mail/Version.java")))
11639 (add-before 'build 'copy-resources
11640 (lambda _
11641 (copy-recursively "mail/src/main/resources/META-INF"
11642 "build/classes/META-INF"))))))
11643 (native-inputs
11644 (list java-junit java-hamcrest-core))
11645 (home-page "https://javaee.github.io/javamail/")
11646 (synopsis "Mail-related functionality in Java")
11647 (description "The JavaMail API provides a platform-independent and
11648protocol-independent framework to build mail and messaging applications.")
11649 ;; General Public License Version 2 only ("GPL") or the Common Development
11650 ;; and Distribution License("CDDL")
11651 (license (list license:cddl1.1
11652 license:gpl2)))); with classpath exception
11653
11654(define-public java-jeromq
11655 (package
11656 (name "java-jeromq")
11657 (version "0.4.3")
11658 (source (origin
11659 (method git-fetch)
11660 (uri (git-reference
11661 (url "https://github.com/zeromq/jeromq")
11662 (commit (string-append "v" version))))
11663 (file-name (string-append name "-" version "-checkout"))
11664 (sha256
11665 (base32
11666 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11667 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11668 (build-system ant-build-system)
11669 (arguments
11670 `(#:jar-name "java-jeromq.jar"
11671 #:source-dir "src/main/java"
11672 #:jdk ,icedtea-8
11673 #:test-exclude
11674 (list
11675 "**/Abstract*.java"
11676 ;; Requires network
11677 "**/ZBeaconTest.java"
11678 ;; Failures
11679 "**/DealerSpecTest.java"
11680 "**/CustomDecoderTest.java"
11681 "**/CustomEncoderTest.java"
11682 "**/ConnectRidTest.java"
11683 "**/ReqSpecTest.java"
11684 "**/PushPullSpecTest.java"
11685 "**/PubSubHwmTest.java"
11686 "**/RouterSpecTest.java"
11687 "**/ProxyTest.java")))
11688 (inputs
11689 (list java-jnacl))
11690 (native-inputs
11691 `(("java-hamcrest-core" ,java-hamcrest-core)
11692 ("junit" ,java-junit)))
11693 (home-page "http://zeromq.org/bindings:java")
11694 (synopsis "Java binding for 0MQ")
11695 (description "Jeromq provides the java bindings for 0MQ.")
11696 (license license:mpl2.0)))
11697
11698(define-public java-kafka-clients
11699 (package
11700 (name "java-kafka-clients")
11701 (version "1.1.1")
11702 (source (origin
11703 (method url-fetch)
11704 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11705 version "-src.tgz"))
11706 (sha256
11707 (base32
11708 "1jn62q7z383nwhzv4ippsddf98sa1gnkszjjncj4ii3r8rzgw566"))))
11709 (build-system ant-build-system)
11710 (arguments
11711 `(#:jar-name "java-kafka-clients.jar"
11712 #:jdk ,icedtea-8
11713 #:source-dir "clients/src/main/java"
11714 #:test-dir "clients/src/test"
11715 #:test-exclude
11716 (list
11717 ;; This file does not contain a class
11718 "**/IntegrationTest.java"
11719 ;; Requires network
11720 "**/ClientUtilsTest.java"
11721 ;; This test fails on i686
11722 "**/SerializationTest.java"
11723 ;; "protocol is disabled or cipher suites are inappropriate"
11724 "**/SslTransportLayerTest.java"
11725 ;; End with errors that seem related to our powermock
11726 "**/KafkaProducerTest.java"
11727 "**/BufferPoolTest.java"
11728 ;; Undeterministic failure, seems to affect mostly ci
11729 "**/GarbageCollectedMemoryPoolTest.java")))
11730 (inputs
11731 (list java-slf4j-api java-lz4))
11732 (native-inputs
11733 (list java-asm
11734 java-bouncycastle
11735 java-cglib
11736 java-easymock
11737 java-hamcrest-all
11738 java-jboss-javassist
11739 java-junit
11740 java-objenesis
11741 java-powermock-api-easymock
11742 java-powermock-api-support
11743 java-powermock-core
11744 java-powermock-modules-junit4
11745 java-powermock-modules-junit4-common
11746 java-snappy))
11747 (home-page "https://kafka.apache.org")
11748 (synopsis "Distributed streaming platform")
11749 (description "Kafka is a distributed streaming platform, which means:
11750@itemize
11751@item it can publish and subscribe to streams of records;
11752@item it can store streams of records in a fault-tolerant way;
11753@item it can process streams of records as they occur.
11754@end itemize")
11755 ;; Either cddl or gpl2 only.
11756 (license (list license:cddl1.1; actually cddl1.1
11757 license:gpl2)))); with classpath exception
11758
11759(define-public java-jdom
11760 (package
11761 (name "java-jdom")
11762 (version "1.1.3")
11763 (source (origin
11764 (method url-fetch)
11765 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11766 version ".tar.gz"))
11767 (sha256
11768 (base32
11769 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11770 (build-system ant-build-system)
11771 (arguments
11772 `(#:build-target "package"
11773 #:tests? #f; tests are run as part of the build process
11774 #:phases
11775 (modify-phases %standard-phases
11776 (replace 'install
11777 (install-jars "build")))))
11778 (home-page "http://jdom.org/")
11779 (synopsis "Access, manipulate, and output XML data")
11780 (description "Java-based solution for accessing, manipulating, and
11781outputting XML data from Java code.")
11782 (license license:bsd-4)))
11783
11784(define-public java-geronimo-xbean-reflect
11785 (package
11786 (name "java-geronimo-xbean-reflect")
11787 (version "4.5")
11788 (source (origin
11789 (method svn-fetch)
11790 (uri (svn-reference
11791 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11792 (revision 1807396)))
11793 (file-name (string-append name "-" version))
11794 (sha256
11795 (base32
11796 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11797 (build-system ant-build-system)
11798 (arguments
11799 `(#:jar-name "geronimo-xbean-reflect.jar"
11800 #:source-dir "xbean-reflect/src/main/java"
11801 #:test-dir "xbean-reflect/src/test"
11802 #:jdk ,icedtea-8
11803 #:test-exclude
11804 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11805 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11806 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11807 #:phases
11808 (modify-phases %standard-phases
11809 (add-before 'build 'fix-source
11810 (lambda _
11811 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11812 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11813 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11814 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11815 #t)))
11816 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11817 (inputs
11818 `(("asm" ,java-asm)
11819 ("log4j" ,java-log4j-api)
11820 ("log4j-1.2" ,java-log4j-1.2-api)
11821 ("log4j-core" ,java-log4j-core)
11822 ("logging" ,java-commons-logging-minimal)))
11823 (propagated-inputs
11824 (list java-geronimo-parent-pom))
11825 (native-inputs
11826 `(("junit" ,java-junit)))
11827 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11828 (synopsis "Dependency injection helper")
11829 (description "Xbean-reflect provides very flexible ways to create objects
11830and graphs of objects for dependency injection frameworks")
11831 (license license:asl2.0)))
11832
11833(define java-geronimo-genesis-2.1
11834 (package
11835 (name "java-geronimo-genesis")
11836 (version "2.1")
11837 (source (origin
11838 (method svn-fetch)
11839 (uri (svn-reference
11840 (url (string-append "https://svn.apache.org/repos/asf/"
11841 "geronimo/genesis/tags/genesis-"
11842 version))
11843 (revision 1807396)))
11844 (file-name (string-append name "-" version "-source"))
11845 (sha256
11846 (base32
11847 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11848 (build-system ant-build-system)
11849 (arguments
11850 `(#:tests? #f
11851 #:phases
11852 (modify-phases %standard-phases
11853 (delete 'configure)
11854 (delete 'build)
11855 (replace 'install
11856 (install-pom-file "pom.xml"))
11857 (add-after 'install 'install-enforcer-rules
11858 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11859 (add-after 'install 'install-flava
11860 (install-pom-file "genesis-default-flava/pom.xml"))
11861 (add-after 'install 'install-packaging
11862 (install-pom-file "genesis-packaging/pom.xml"))
11863 (add-after 'install-flava 'install-flava-java4
11864 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11865 (add-after 'install-flava 'install-flava-java5
11866 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11867 (add-after 'install-flava 'install-flava-java6
11868 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11869 (propagated-inputs
11870 `(("apache-parent-pom" ,apache-parent-pom-13)))
11871 (home-page "https://geronimo.apache.org")
11872 (synopsis "Collection of maven POM files for the Geronimo project")
11873 (description "Apache Geronimo is a server runtime. This package contains
11874only pom files used by other components in the Geronimo project.")
11875 (license license:asl2.0)))
11876
11877(define java-geronimo-parent-pom
11878 (package
11879 (inherit java-geronimo-xbean-reflect)
11880 (name "java-geronimo-parent-pom")
11881 (arguments
11882 `(#:tests? #f
11883 #:phases
11884 (modify-phases %standard-phases
11885 (delete 'configure)
11886 (delete 'build)
11887 (replace 'install
11888 (install-pom-file "pom.xml")))))
11889 (propagated-inputs
11890 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11891
11892(define-public java-geronimo-xbean-bundleutils
11893 (package
11894 (inherit java-geronimo-xbean-reflect)
11895 (name "java-geronimo-xbean-bundleutils")
11896 (arguments
11897 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11898 #:source-dir "xbean-bundleutils/src/main/java"
11899 #:test-dir "xbean-bundleutils/src/test"
11900 #:phases
11901 (modify-phases %standard-phases
11902 (add-before 'build 'fix-java
11903 (lambda _
11904 ;; We use a more recent version of osgi, so this file requires
11905 ;; more interface method implementations.
11906 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11907 (("import org.osgi.framework.ServiceRegistration;")
11908 "import org.osgi.framework.ServiceRegistration;
11909import org.osgi.framework.ServiceFactory;
11910import java.util.Collection;
11911import org.osgi.framework.ServiceObjects;")
11912 (("public Bundle getBundle\\(\\)")
11913 "@Override
11914public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11915 throw new UnsupportedOperationException();
11916}
11917@Override
11918public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11919 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11920 throw new UnsupportedOperationException();
11921}
11922public Bundle getBundle()"))
11923 #t)))))
11924 (inputs
11925 `(("java-slf4j" ,java-slf4j-api)
11926 ("java-asm" ,java-asm)
11927 ("java-osgi-framework" ,java-osgi-framework)
11928 ("java-eclipse-osgi" ,java-eclipse-osgi)
11929 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11930
11931(define-public java-geronimo-xbean-asm-util
11932 (package
11933 (inherit java-geronimo-xbean-reflect)
11934 (name "java-geronimo-xbean-asm-util")
11935 (arguments
11936 `(#:jar-name "geronimo-xbean-asm-util.jar"
11937 #:source-dir "xbean-asm-util/src/main/java"
11938 #:tests? #f)); no tests
11939 (inputs
11940 (list java-asm))
11941 (native-inputs '())))
11942
11943(define-public java-geronimo-xbean-finder
11944 (package
11945 (inherit java-geronimo-xbean-reflect)
11946 (name "java-geronimo-xbean-finder")
11947 (arguments
11948 `(#:jar-name "geronimo-xbean-finder.jar"
11949 #:source-dir "xbean-finder/src/main/java"
11950 #:test-dir "xbean-finder/src/test"))
11951 (inputs
11952 (list java-slf4j-api
11953 java-asm
11954 java-geronimo-xbean-bundleutils
11955 java-geronimo-xbean-asm-util
11956 java-osgi-service-packageadmin
11957 java-osgi-framework))
11958 (native-inputs
11959 (list java-junit java-hamcrest-core))))
11960
11961(define-public java-gson
11962 (package
11963 (name "java-gson")
11964 (version "2.8.2")
11965 (source (origin
11966 (method url-fetch)
11967 (uri (string-append "https://github.com/google/gson/archive/"
11968 "gson-parent-" version ".tar.gz"))
11969 (sha256
11970 (base32
11971 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11972 (build-system ant-build-system)
11973 (arguments
11974 `(#:jar-name "gson.jar"
11975 #:source-dir "gson/src/main/java"
11976 #:test-dir "gson/src/test"))
11977 (native-inputs
11978 (list java-junit java-hamcrest-core))
11979 (home-page "https://github.com/google/gson")
11980 (synopsis "Java serialization/deserialization library from/to JSON")
11981 (description "Gson is a Java library that can be used to convert Java
11982Objects into their JSON representation. It can also be used to convert a JSON
11983string to an equivalent Java object. Gson can work with arbitrary Java objects
11984including pre-existing objects that you do not have source-code of.")
11985 (license license:asl2.0)))
11986
11987;; This requires a different Java version than 2.8.2 above
11988(define-public java-gson-2.8.6
11989 (package
11990 (inherit java-gson)
11991 (name "java-gson")
11992 (version "2.8.6")
11993 (source (origin
11994 (method git-fetch)
11995 (uri (git-reference
11996 (url "https://github.com/google/gson")
11997 (commit (string-append "gson-parent-" version))))
11998 (file-name (git-file-name name version))
11999 (sha256
12000 (base32
12001 "0kk5p3vichdb0ph1lzknrcpbklgnmq455mngmjpxvvj29p3rgpk3"))))
12002 (arguments
12003 `(#:jar-name "gson.jar"
12004 #:jdk ,openjdk11
12005 #:source-dir "gson/src/main/java"
12006 #:test-dir "gson/src/test"
12007 #:phases
12008 (modify-phases %standard-phases
12009 ;; avoid Maven dependency
12010 (add-before 'build 'fill-template
12011 (lambda _
12012 (with-directory-excursion "gson/src/main"
12013 (copy-file "java-templates/com/google/gson/internal/GsonBuildConfig.java"
12014 "java/com/google/gson/internal/GsonBuildConfig.java")
12015 (substitute* "java/com/google/gson/internal/GsonBuildConfig.java"
12016 (("\\$\\{project.version\\}") ,version))))))))))
12017
12018(define-public java-hawtjni
12019 (package
12020 (name "java-hawtjni")
12021 (version "1.15")
12022 (source (origin
12023 (method url-fetch)
12024 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
12025 "hawtjni-project-" version ".tar.gz"))
12026 (sha256
12027 (base32
12028 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
12029 (build-system ant-build-system)
12030 (arguments
12031 `(#:jar-name "hawtjni.jar"
12032 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
12033 #:tests? #f; no tests
12034 #:phases
12035 (modify-phases %standard-phases
12036 (add-before 'build 'build-native
12037 (lambda* (#:key inputs #:allow-other-keys)
12038 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
12039 (with-directory-excursion "hawtjni-generator/src/main/resources/"
12040 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
12041 "-fPIC" "-O2" include)
12042 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
12043 "-fPIC" "-O2" include)
12044 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
12045 "hawtjni.o" "hawtjni-callback.o")))
12046 #t))
12047 (add-after 'install 'install-native
12048 (lambda* (#:key outputs #:allow-other-keys)
12049 (let* ((out (assoc-ref outputs "out"))
12050 (lib (string-append out "/lib"))
12051 (inc (string-append out "/include")))
12052 (with-directory-excursion "hawtjni-generator/src/main/resources/"
12053 (install-file "libhawtjni.so" lib)
12054 (install-file "hawtjni.h" inc)))
12055 #t))
12056 (add-before 'install 'install-parent
12057 (install-pom-file "pom.xml"))
12058 (replace 'install
12059 (install-from-pom "hawtjni-runtime/pom.xml")))))
12060 (inputs
12061 (list java-commons-cli java-asm java-geronimo-xbean-finder))
12062 (home-page "https://fusesource.github.io/hawtjni/")
12063 (synopsis "JNI code generator")
12064 (description "HawtJNI is a code generator that produces the JNI code needed
12065to implement Java native methods. It is based on the jnigen code generator
12066that is part of the SWT Tools project.")
12067 (license license:asl2.0)))
12068
12069(define-public java-jansi-native
12070 (package
12071 (name "java-jansi-native")
12072 (version "1.7")
12073 (source (origin
12074 (method url-fetch)
12075 (uri (string-append "https://github.com/fusesource/jansi-native/"
12076 "archive/jansi-native-" version ".tar.gz"))
12077 (sha256
12078 (base32
12079 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
12080 (build-system ant-build-system)
12081 (arguments
12082 `(#:jar-name "jansi-native.jar"
12083 #:source-dir "src/main/java"
12084 #:tests? #f; no tests
12085 #:phases
12086 (modify-phases %standard-phases
12087 (add-before 'build 'build-native
12088 (lambda* (#:key inputs #:allow-other-keys)
12089 ;; there are more required files for windows in windows/
12090 (with-directory-excursion "src/main/native-package/src"
12091 (substitute* "jansi_ttyname.c"
12092 (("#include \"jansi_.*") ""))
12093 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
12094 (string-append "-I" (assoc-ref inputs "java-hawtjni")
12095 "/include")
12096 (string-append "-I" (assoc-ref inputs "jdk")
12097 "/include/linux")
12098 "-fPIC" "-O2")
12099 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
12100 (add-before 'build 'install-native
12101 (lambda _
12102 (let ((dir (string-append "build/classes/META-INF/native/"
12103 ,(match (%current-system)
12104 ((or "i686-linux" "armhf-linux")
12105 "linux32")
12106 ((or "x86_64-linux" "aarch64-linux"
12107 "mips64el-linux")
12108 "linux64")
12109 (_ "unknown-kernel")))))
12110 (install-file "src/main/native-package/src/libjansi.so" dir))
12111 #t))
12112 (add-after 'install 'install-native
12113 (lambda* (#:key outputs #:allow-other-keys)
12114 (install-file "src/main/native-package/src/jansi.h"
12115 (string-append (assoc-ref outputs "out") "/include"))
12116 #t))
12117 (add-before 'install 'fix-pom
12118 (lambda _
12119 ;; pom contains variables to complete name, but we don't support that
12120 (substitute* "pom.xml"
12121 (("\\$\\{platform\\}") "native"))
12122 #t))
12123 (replace 'install
12124 (install-from-pom "pom.xml")))))
12125 (propagated-inputs
12126 (list java-hawtjni))
12127 (home-page "https://fusesource.github.io/jansi/")
12128 (synopsis "Native library for jansi")
12129 (description "This package provides the native library for jansi, a small
12130Java library that allows you to use ANSI escape sequences to format your
12131console output.")
12132 (license license:asl2.0)))
12133
12134(define-public java-jansi
12135 (package
12136 (name "java-jansi")
12137 (version "2.4.0")
12138 (source (origin
12139 (method git-fetch)
12140 (uri (git-reference
12141 (url "https://github.com/fusesource/jansi")
12142 (commit (string-append "jansi-" version))))
12143 (file-name (git-file-name name version))
12144 (sha256
12145 (base32
12146 "1s6fva06990798b5fyxqzr30zwyj1byq5wrm54j2larcydaryggf"))
12147 (modules '((guix build utils)))
12148 (snippet
12149 ;; contains pre-compiled libraries
12150 '(delete-file-recursively
12151 "src/main/resources/org/fusesource/jansi/internal"))))
12152 (build-system ant-build-system)
12153 (arguments
12154 `(#:jar-name "jansi.jar"
12155 #:source-dir "src/main/java"
12156 #:test-dir "src/test"
12157 #:tests? #f; require junit 3
12158 #:phases
12159 (modify-phases %standard-phases
12160 (add-before 'build 'build-native
12161 (lambda* (#:key inputs #:allow-other-keys)
12162 (with-directory-excursion "src/main/native"
12163 (for-each
12164 (lambda (cfile)
12165 (let ((cfile (basename cfile))
12166 (ofile (string-append (basename cfile ".c") ".o")))
12167 (invoke ,(cc-for-target) "-c" cfile "-o" ofile
12168 (string-append "-I" (assoc-ref inputs "jdk")
12169 "/include/linux")
12170 "-fPIC" "-O2")))
12171 (find-files "." "\\.c$"))
12172 (apply invoke ,(cc-for-target) "-o" "libjansi.so" "-shared"
12173 (find-files "." "\\.o$")))))
12174 (add-before 'build 'install-native
12175 (lambda _
12176 (let ((dir (string-append "build/classes/org/fusesource/"
12177 "jansi/internal/native/"
12178 ,(match (or (%current-target-system) (%current-system))
12179 ("i686-linux" "Linux/x86")
12180 ("x86_64-linux" "Linux/x86_64")
12181 ("armhf-linux" "Linux/armv7")
12182 ("aarch64-linux" "Linux/arm64")
12183 ("mips64el-linux" "Linux/mips64")
12184 (_ "unknown-kernel")))))
12185 (install-file "src/main/native/libjansi.so" dir))))
12186 (add-before 'build 'copy-resources
12187 (lambda _
12188 (copy-recursively "src/main/resources" "build/classes")))
12189 (replace 'install
12190 (install-from-pom "pom.xml")))))
12191 (home-page "https://fusesource.github.io/jansi/")
12192 (synopsis "Portable ANSI escape sequences")
12193 (description "Jansi is a Java library that allows you to use ANSI escape
12194sequences to format your console output which works on every platform.")
12195 (license license:asl2.0)))
12196
12197(define-public java-jansi-1
12198 (package
12199 (inherit java-jansi)
12200 (version "1.16")
12201 (source (origin
12202 (method git-fetch)
12203 (uri (git-reference
12204 (url "https://github.com/fusesource/jansi")
12205 (commit (string-append "jansi-project-" version))))
12206 (file-name (git-file-name "jansi" version))
12207 (sha256
12208 (base32
12209 "0ikk0x352gh30b42qn1jd89xwsjj0mavrc5kms7fss15bd8vsayx"))))
12210 (arguments
12211 `(#:jar-name "jansi.jar"
12212 #:source-dir "jansi/src/main/java"
12213 #:test-dir "jansi/src/test"
12214 #:phases
12215 (modify-phases %standard-phases
12216 (add-after 'check 'clear-term
12217 (lambda _
12218 (invoke "echo" "-e" "\\e[0m")))
12219 (add-before 'install 'install-parent
12220 (install-pom-file "pom.xml"))
12221 (add-before 'install 'fix-pom
12222 (lambda _
12223 ;; pom adds jansi native versions for different platforms, but we
12224 ;; only need one, so use native instead
12225 (substitute* "jansi/pom.xml"
12226 (("windows32") "native")
12227 (("windows64") "native")
12228 (("osx") "native")
12229 (("linux32") "native")
12230 (("linux64") "native")
12231 (("freebsd32") "native")
12232 (("freebsd64") "native"))
12233 #t))
12234 (replace 'install
12235 (install-from-pom "jansi/pom.xml")))))
12236 (propagated-inputs
12237 (list java-jansi-native))
12238 (native-inputs
12239 (list java-junit java-hamcrest-core))))
12240
12241(define-public java-jboss-el-api-spec
12242 (package
12243 (name "java-jboss-el-api-spec")
12244 (version "3.0")
12245 (source (origin
12246 (method url-fetch)
12247 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
12248 "archive/jboss-el-api_" version
12249 "_spec-1.0.7.Final.tar.gz"))
12250 (sha256
12251 (base32
12252 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
12253 (build-system ant-build-system)
12254 (arguments
12255 `(#:jar-name "java-jboss-el-api_spec.jar"
12256 #:phases
12257 (modify-phases %standard-phases
12258 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
12259 ;; instead, which implements the same thing. We override the pom file
12260 ;; to "rename" the package so it can be found by maven.
12261 (add-before 'install 'override-pom
12262 (generate-pom.xml "pom.xml" "javax.el" "javax.el-api" "3.0"
12263 #:name "el-api"))
12264 (replace 'install
12265 (install-from-pom "pom.xml")))))
12266 (inputs
12267 (list java-junit))
12268 (home-page "https://github.com/jboss/jboss-el-api_spec")
12269 (synopsis "JSR-341 expression language 3.0 API")
12270 (description "This package contains an implementation of the JSR-341
12271specification for the expression language 3.0. It implements an expression
12272language inspired by ECMAScript and XPath. This language is used with
12273JavaServer Pages (JSP).")
12274 ;; Either GPL2 only or CDDL.
12275 (license (list license:gpl2 license:cddl1.1))))
12276
12277(define-public java-jboss-interceptors-api-spec
12278 (package
12279 (name "java-jboss-interceptors-api-spec")
12280 (version "1.2")
12281 (source (origin
12282 (method url-fetch)
12283 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
12284 "archive/jboss-interceptors-api_" version
12285 "_spec-1.0.0.Final.tar.gz"))
12286 (sha256
12287 (base32
12288 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
12289 (build-system ant-build-system)
12290 (arguments
12291 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
12292 #:jdk ,icedtea-8
12293 #:source-dir "."
12294 #:tests? #f; no tests
12295 #:phases
12296 (modify-phases %standard-phases
12297 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
12298 ;; so we use this package instead, which implements the same thing.
12299 ;; We override the pom file to "rename" the package so it can be found
12300 ;; by maven.
12301 (add-before 'install 'override-pom
12302 (generate-pom.xml "pom.xml" "javax.interceptor" "javax.interceptor-api"
12303 "3.0" #:name "interceptor-api"))
12304 (replace 'install
12305 (install-from-pom "pom.xml")))))
12306 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
12307 (synopsis "Interceptors 1.2 API classes from JSR 318")
12308 (description "Java-jboss-interceptors-api-spec implements the Interceptors
12309API. Interceptors are used to interpose on business method invocations and
12310specific events.")
12311 ;; Either GPL2 only or CDDL.
12312 (license (list license:gpl2 license:cddl1.1))))
12313
12314(define-public java-cdi-api
12315 (package
12316 (name "java-cdi-api")
12317 (version "2.0")
12318 (source (origin
12319 (method url-fetch)
12320 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
12321 version ".tar.gz"))
12322 (file-name (string-append name "-" version ".tar.gz"))
12323 (sha256
12324 (base32
12325 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
12326 (build-system ant-build-system)
12327 (arguments
12328 `(#:source-dir "api/src/main/java"
12329 #:jar-name "java-cdi-api.jar"
12330 #:test-dir "api/src/test"
12331 #:jdk ,icedtea-8
12332 #:tests? #f; Tests fail because we don't have a CDI provider yet
12333 #:phases
12334 (modify-phases %standard-phases
12335 (replace 'install
12336 (install-from-pom "api/pom.xml")))))
12337 (propagated-inputs
12338 (list java-javax-inject java-jboss-el-api-spec
12339 java-jboss-interceptors-api-spec java-weld-parent-pom))
12340 (native-inputs
12341 (list java-testng java-hamcrest-core))
12342 (home-page "http://cdi-spec.org/")
12343 (synopsis "Contexts and Dependency Injection APIs")
12344 (description "Java-cdi-api contains the required APIs for Contexts and
12345Dependency Injection (CDI).")
12346 (license license:asl2.0)))
12347
12348(define-public java-joda-convert
12349 (package
12350 (name "java-joda-convert")
12351 (version "1.9.2")
12352 (source (origin
12353 (method url-fetch)
12354 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
12355 version ".tar.gz"))
12356 (file-name (string-append name "-" version ".tar.gz"))
12357 (sha256
12358 (base32
12359 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
12360 (build-system ant-build-system)
12361 (arguments
12362 `(#:jar-name (string-append ,name "-" ,version ".jar")
12363 #:source-dir "src/main/java"
12364 #:test-include (list "**/Test*.java")
12365 ;; Contains only interfaces and base classes (no test)
12366 #:test-exclude (list "**/test*/**.java")))
12367 (inputs
12368 (list java-guava))
12369 (native-inputs
12370 (list java-junit java-hamcrest-core))
12371 (home-page "https://www.joda.org/joda-convert/")
12372 (synopsis "Conversion between Objects and Strings")
12373 (description "Joda-Convert provides a small set of classes to aid
12374conversion between Objects and Strings. It is not intended to tackle the
12375wider problem of Object to Object transformation.")
12376 (license license:asl2.0)))
12377
12378(define-public java-joda-time
12379 (package
12380 (name "java-joda-time")
12381 (version "2.9.9")
12382 (source (origin
12383 (method url-fetch)
12384 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
12385 version ".tar.gz"))
12386 (file-name (string-append name "-" version ".tar.gz"))
12387 (sha256
12388 (base32
12389 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
12390 (build-system ant-build-system)
12391 (arguments
12392 `(#:jar-name "java-joda-time.jar"
12393 #:source-dir "src/main/java"
12394 #:test-include (list "**/Test*.java")
12395 ;; There is no runnable test in these files
12396 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
12397 #:phases
12398 (modify-phases %standard-phases
12399 (add-after 'build 'build-resources
12400 (lambda _
12401 (mkdir-p "build/classes/org/joda/time/tz/data")
12402 (mkdir-p "build/classes/org/joda/time/format")
12403 ;; This will produce the following exception:
12404 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
12405 ;; which is normal, because it doesn't exist yet. It still generates
12406 ;; the same file as in the binary one can find on maven.
12407 (invoke "java" "-cp"
12408 (string-append "build/classes:" (getenv "CLASSPATH"))
12409 "org.joda.time.tz.ZoneInfoCompiler"
12410 "-src" "src/main/java/org/joda/time/tz/src"
12411 "-dst" "build/classes/org/joda/time/tz/data"
12412 "africa" "antarctica" "asia" "australasia"
12413 "europe" "northamerica" "southamerica"
12414 "pacificnew" "etcetera" "backward" "systemv")
12415 (for-each (lambda (f)
12416 (copy-file f (string-append
12417 "build/classes/org/joda/time/format/"
12418 (basename f))))
12419 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
12420 #t))
12421 (add-before 'install 'regenerate-jar
12422 (lambda _
12423 ;; We need to regenerate the jar file to add generated data.
12424 (delete-file "build/jar/java-joda-time.jar")
12425 (invoke "ant" "jar")))
12426 (add-before 'check 'copy-test-resources
12427 (lambda _
12428 (mkdir-p "build/test-classes/org/joda/time/tz/data")
12429 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
12430 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
12431 (copy-recursively "src/test/resources" "build/test-classes")
12432 #t)))))
12433 (inputs
12434 (list java-joda-convert))
12435 (native-inputs
12436 (list java-junit java-hamcrest-core tzdata))
12437 (home-page "https://www.joda.org/joda-time/")
12438 (synopsis "Replacement for the Java date and time classes")
12439 (description "Joda-Time is a replacement for the Java date and time
12440classes prior to Java SE 8.")
12441 (license license:asl2.0)))
12442
12443(define-public java-xerces
12444 (package
12445 (name "java-xerces")
12446 (version "2.12.1")
12447 (source
12448 (origin
12449 (method url-fetch)
12450 (uri (string-append "mirror://apache/xerces/j/source/"
12451 "Xerces-J-src." version ".tar.gz"))
12452 (sha256
12453 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
12454 (patches (search-patches
12455 "java-xerces-xjavac_taskdef.patch"
12456 "java-xerces-build_dont_unzip.patch"
12457 "java-xerces-bootclasspath.patch"))))
12458 (build-system ant-build-system)
12459 (arguments
12460 `(#:tests? #f;; Test files are not present
12461 #:test-target "test"
12462 #:jdk ,icedtea-8
12463 #:phases
12464 (modify-phases %standard-phases
12465 (add-after 'unpack 'create-build.properties
12466 (lambda* (#:key inputs #:allow-other-keys)
12467 (let ((jaxp (assoc-ref inputs "java-jaxp"))
12468 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
12469 (with-output-to-file "build.properties"
12470 (lambda _
12471 (format #t
12472 "jar.jaxp = ~a/share/java/jaxp.jar~@
12473 jar.apis-ext = ~a/share/java/jaxp.jar~@
12474 jar.resolver = ~a/share/java/xml-resolver.jar~%"
12475 jaxp jaxp resolver)))
12476 ;; Make xerces use our version of jaxp in tests
12477 (substitute* "build.xml"
12478 (("xml-apis.jar")
12479 (string-append jaxp "/share/java/jaxp.jar"))
12480 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12481 "${jar.apis}")))
12482 #t))
12483 (replace 'install (install-jars "build")))))
12484 (inputs
12485 (list java-apache-xml-commons-resolver java-jaxp))
12486 (home-page "https://xerces.apache.org/xerces2-j/")
12487 (synopsis "Validating XML parser for Java with DOM level 3 support")
12488 (description "The Xerces2 Java parser is the reference implementation of
12489XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12490processor.
12491
12492Xerces2-J supports the following standards and APIs:
12493
12494@itemize
12495@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12496@item Namespaces in XML Recommendation
12497@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12498 Range Recommendations
12499@item Simple API for XML (SAX) 2.0.1 Core and Extension
12500@item Java APIs for XML Processing (JAXP) 1.2.01
12501@item XML Schema 1.0 Structures and Datatypes Recommendations
12502@item Experimental implementation of the Document Object Model (DOM) Level 3
12503 Core and Load/Save Working Drafts
12504@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12505 Candidate Recommendation
12506@end itemize
12507
12508Xerces is now able to parse documents written according to the XML 1.1
12509Candidate Recommendation, except that it does not yet provide an option to
12510enable normalization checking as described in section 2.13 of this
12511specification. It also handles namespaces according to the XML Namespaces 1.1
12512Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12513the DOM level 3 load/save API's are in use.")
12514 (license license:asl2.0)))
12515
12516(define-public java-jakarta-regexp
12517 (package
12518 (name "java-jakarta-regexp")
12519 (version "1.5")
12520 (source
12521 (origin
12522 (method url-fetch)
12523 (uri (string-append
12524 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12525 version ".tar.gz"))
12526 (sha256
12527 (base32
12528 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12529 (build-system ant-build-system)
12530 (arguments
12531 `(#:test-target "test"
12532 #:phases
12533 (modify-phases %standard-phases
12534 (replace 'install
12535 (lambda* (#:key outputs #:allow-other-keys)
12536 (let* ((out (assoc-ref outputs "out"))
12537 (out-share (string-append out "/share/java")))
12538 (mkdir-p out-share)
12539 (for-each (lambda (name)
12540 (install-file name out-share))
12541 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12542 #t))))))
12543 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12544 (synopsis "Regular expression parser generator for Java")
12545 (description "@code{jakarta-regexp} is an old regular expression parser
12546generator for Java.")
12547 (license license:asl2.0)))
12548
12549(define-public java-jline
12550 (package
12551 (name "java-jline")
12552 (version "1.0")
12553 (source (origin
12554 (method url-fetch)
12555 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12556 version ".tar.gz"))
12557 (sha256
12558 (base32
12559 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12560 (build-system ant-build-system)
12561 (arguments
12562 `(#:jar-name "jline.jar"
12563 #:source-dir "src/main/java"
12564 #:test-dir "src/test"
12565 #:phases
12566 (modify-phases %standard-phases
12567 (add-before 'build 'copy-resources
12568 (lambda _
12569 (copy-recursively "src/main/resources" "build/classes")
12570 #t)))))
12571 (native-inputs
12572 (list java-junit))
12573 (home-page "https://jline.github.io")
12574 (synopsis "Console input handling library")
12575 (description "JLine is a Java library for handling console input. It is
12576similar in functionality to BSD editline and GNU readline but with additional
12577features that bring it on par with the Z shell line editor.")
12578 (license license:bsd-3)))
12579
12580(define-public java-jline-2
12581 (package
12582 (inherit java-jline)
12583 (version "2.14.5")
12584 (source (origin
12585 (method url-fetch)
12586 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12587 version ".tar.gz"))
12588 (sha256
12589 (base32
12590 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12591 (arguments
12592 `(#:jdk ,icedtea-8
12593 ,@(package-arguments java-jline)))
12594 (inputs
12595 (list java-jansi-1 java-jansi-native))
12596 (native-inputs
12597 (list java-powermock-modules-junit4
12598 java-powermock-modules-junit4-common
12599 java-powermock-api-easymock
12600 java-powermock-api-support
12601 java-powermock-core
12602 java-powermock-reflect
12603 java-easymock
12604 java-jboss-javassist
12605 java-objenesis
12606 java-asm
12607 java-hamcrest-core
12608 java-cglib
12609 java-junit
12610 java-hawtjni))))
12611
12612(define-public java-jline-terminal
12613 (package
12614 (name "java-jline-terminal")
12615 (version "3.14.1")
12616 (source (origin
12617 (method git-fetch)
12618 (uri (git-reference
12619 (url "https://github.com/jline/jline3")
12620 (commit (string-append "jline-parent-" version))))
12621 (file-name (git-file-name name version))
12622 (sha256
12623 (base32
12624 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
12625 (build-system ant-build-system)
12626 (arguments
12627 `(#:jar-name "jline-terminal.jar"
12628 #:jdk ,openjdk11
12629 #:tests? #f; TODO: tests fail on *.caps resource lookups
12630 #:source-dir "terminal/src/main/java"
12631 #:test-dir "terminal/src/test"
12632 #:phases
12633 (modify-phases %standard-phases
12634 (add-after 'unpack 'remove-build-file
12635 (lambda _
12636 ;; Conflicts with build directory generated by ant-build-system.
12637 (delete-file "build")))
12638 (add-after 'unpack 'patch-paths
12639 (lambda* (#:key inputs #:allow-other-keys)
12640 (substitute* "terminal/src/main/java/org/jline/utils/OSUtils.java"
12641 (("= \"infocmp\"")
12642 (string-append "= \"" (assoc-ref inputs "ncurses")
12643 "/bin/infocmp\""))
12644 (("= \"(s?tty)\"" _ cmd)
12645 (string-append "= \"" (assoc-ref inputs "coreutils")
12646 "/bin/" cmd "\"")))))
12647 ;; Resources are not added to the JAR by ant-build-system.
12648 (add-after 'build 'add-resources
12649 (lambda* (#:key jar-name source-dir #:allow-other-keys)
12650 (let ((build (string-append (getcwd) "/build")))
12651 (with-directory-excursion
12652 (string-append source-dir "/../resources")
12653 (apply invoke "jar" "-uvf"
12654 (string-append build "/jar/" jar-name)
12655 (find-files ".")))))))))
12656 (inputs
12657 (list ncurses)); infocmp
12658 (home-page "https://github.com/jline/jline3")
12659 (synopsis "Java JLine Terminal API and implementations")
12660 (description "JLine is a Java library for handling console input. It is
12661similar in functionality to BSD editline and GNU readline but with additional
12662features that bring it in par with ZSH line editor. People familiar with the
12663readline/editline capabilities for modern shells (such as bash and tcsh) will
12664find most of the command editing features of JLine to be familiar.
12665
12666This package includes the @var{Terminal} API and implementations.")
12667 (license license:bsd-3)))
12668
12669(define-public java-jline-reader
12670 (package
12671 (name "java-jline-reader")
12672 (version "3.14.1")
12673 (source (origin
12674 (method git-fetch)
12675 (uri (git-reference
12676 (url "https://github.com/jline/jline3")
12677 (commit (string-append "jline-parent-" version))))
12678 (file-name (git-file-name name version))
12679 (sha256
12680 (base32
12681 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
12682 (build-system ant-build-system)
12683 (arguments
12684 `(#:jar-name "jline-reader.jar"
12685 #:jdk ,openjdk11
12686 #:source-dir "reader/src/main/java"
12687 #:test-dir "reader/src/test"
12688 #:phases
12689 (modify-phases %standard-phases
12690 (add-before 'build 'remove-build-file
12691 (lambda _
12692 ;; conflicts with build directory generated by ant-build-system
12693 (delete-file "build"))))))
12694 (native-inputs
12695 (list java-junit java-easymock))
12696 (inputs
12697 (list java-jline-terminal))
12698 (home-page "https://github.com/jline/jline3")
12699 (synopsis "Java JLine line reader")
12700 (description "JLine is a Java library for handling console input. It is
12701similar in functionality to BSD editline and GNU readline but with additional
12702features that bring it in par with ZSH line editor. People familiar with the
12703readline/editline capabilities for modern shells (such as bash and tcsh) will
12704find most of the command editing features of JLine to be familiar.
12705
12706This package includes the line reader.")
12707 (license license:bsd-3)))
12708
12709(define-public java-xmlunit
12710 (package
12711 (name "java-xmlunit")
12712 (version "2.5.1")
12713 (source (origin
12714 (method url-fetch)
12715 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12716 version ".tar.gz"))
12717 (file-name (string-append name "-" version ".tar.gz"))
12718 (sha256
12719 (base32
12720 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12721 (build-system ant-build-system)
12722 (arguments
12723 `(#:jar-name "java-xmlunit.jar"
12724 #:source-dir "xmlunit-core/src/main/java"
12725 #:test-dir "xmlunit-core/src/test"
12726 #:phases
12727 (modify-phases %standard-phases
12728 (add-before 'check 'copy-test-resources
12729 (lambda* (#:key inputs #:allow-other-keys)
12730 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12731 #t)))))
12732 (native-inputs
12733 `(("java-junit" ,java-junit)
12734 ("java-mockito-1" ,java-mockito-1)
12735 ("java-hamcrest-all" ,java-hamcrest-all)
12736 ("java-objenesis" ,java-objenesis)
12737 ("java-asm" ,java-asm)
12738 ("java-cglib" ,java-cglib)
12739 ("resources"
12740 ,(origin
12741 (method git-fetch)
12742 (uri (git-reference
12743 (url "https://github.com/xmlunit/test-resources")
12744 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12745 (file-name "java-xmlunit-test-resources")
12746 (sha256
12747 (base32
12748 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12749 (home-page "https://www.xmlunit.org/")
12750 (synopsis "XML output testing")
12751 (description "XMLUnit provides you with the tools to verify the XML you
12752emit is the one you want to create. It provides helpers to validate against
12753an XML Schema, assert the values of XPath queries or compare XML documents
12754against expected outcomes.")
12755 (license license:asl2.0)))
12756
12757(define-public java-xmlunit-legacy
12758 (package
12759 (inherit java-xmlunit)
12760 (name "java-xmlunit-legacy")
12761 (arguments
12762 `(#:jar-name "java-xmlunit-legacy.jar"
12763 #:source-dir "xmlunit-legacy/src/main/java"
12764 #:test-dir "xmlunit-legacy/src/test"))
12765 (inputs
12766 (list java-xmlunit java-junit))
12767 (native-inputs
12768 `(("java-mockito-1" ,java-mockito-1)))))
12769
12770(define-public java-xmlunit-matchers
12771 (package
12772 (inherit java-xmlunit)
12773 (name "java-xmlunit-matchers")
12774 (arguments
12775 `(#:jar-name "java-xmlunit-matchers.jar"
12776 #:source-dir "xmlunit-matchers/src/main/java"
12777 #:test-dir "xmlunit-matchers/src/test"
12778 #:test-exclude
12779 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12780 (list "**/ValidationMatcherTest.java")
12781 #:phases
12782 (modify-phases %standard-phases
12783 (add-before 'build 'copy-test-class
12784 (lambda _
12785 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12786 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12787 #t))
12788 (add-before 'build 'fix-test-resources-path
12789 (lambda _
12790 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12791 (("../test-resources") "test-resources"))
12792 #t))
12793 (add-before 'check 'copy-test-resources
12794 (lambda* (#:key inputs #:allow-other-keys)
12795 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12796 #t)))))
12797 (inputs
12798 (list java-xmlunit java-junit))))
12799
12800(define-public java-openchart2
12801 (package
12802 (name "java-openchart2")
12803 (version "1.4.3")
12804 (source (origin
12805 (method url-fetch)
12806 (uri (string-append "http://download.approximatrix.com/openchart2/"
12807 "openchart2-" version ".source.zip"))
12808 (sha256
12809 (base32
12810 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12811 (build-system ant-build-system)
12812 (arguments
12813 `(#:test-target "test"
12814 #:phases
12815 (modify-phases %standard-phases
12816 (add-after 'unpack 'fix-junit-errors
12817 (lambda _
12818 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12819 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12820 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12821 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12822 "model/DefaultChartDataModelConstraintsTest.java"
12823 "model/MultiScatterDataModelConstraintsTest.java"
12824 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12825 (("(assertEquals[^;]+);" before _)
12826 (string-append (string-drop-right before 2) ", 1E-6);"))))
12827 #t))
12828 (replace 'install (install-jars ".")))))
12829 (native-inputs
12830 (list unzip java-junit java-hamcrest-core))
12831 (home-page "https://approximatrix.com/products/openchart2/")
12832 (synopsis "Simple plotting for Java")
12833 (description "Openchart2 provides a simple, yet powerful, interface for
12834Java programmers to create two-dimensional charts and plots. The library
12835features an assortment of graph styles, including advanced scatter plots, bar
12836graphs, and pie charts.")
12837 (license license:lgpl2.1+)))
12838
12839(define-public java-commons-httpclient
12840 (package
12841 (name "java-commons-httpclient")
12842 (version "3.1")
12843 (source (origin
12844 (method url-fetch)
12845 (uri (string-append "mirror://apache/httpcomponents/"
12846 "commons-httpclient/source/commons-httpclient-"
12847 version "-src.tar.gz"))
12848 (sha256
12849 (base32
12850 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12851 (build-system ant-build-system)
12852 (arguments
12853 `(#:build-target "compile"
12854 #:test-target "test"
12855 #:tests? #f; requires junit-textui (junit 3)
12856 #:phases
12857 (modify-phases %standard-phases
12858 (add-before 'build 'fix-accent
12859 (lambda _
12860 (for-each (lambda (file)
12861 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12862 (substitute* file
12863 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12864 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12865 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12866 "src/test/org/apache/commons/httpclient/TestHttps.java"
12867 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12868 #t))
12869 (replace 'install
12870 (lambda* (#:key outputs #:allow-other-keys)
12871 (invoke "ant" "dist"
12872 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12873 "/share/java"))
12874 #t)))))
12875 (propagated-inputs
12876 `(("java-commons-logging" ,java-commons-logging-minimal)
12877 ("java-commons-codec" ,java-commons-codec)))
12878 (home-page "https://hc.apache.org")
12879 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12880 (description "This package contains an HTTP/1.1 compliant HTTP agent
12881implementation. It also provides reusable components for client-side
12882authentication, HTTP state management, and HTTP connection management.")
12883 (license license:asl2.0)))
12884
12885(define-public java-commons-vfs
12886 (package
12887 (name "java-commons-vfs")
12888 (version "2.2")
12889 (source (origin
12890 (method url-fetch)
12891 (uri (string-append "mirror://apache/commons/vfs/source/"
12892 "commons-vfs2-distribution-" version "-src.tar.gz"))
12893 (file-name (string-append name "-" version ".tar.gz"))
12894 (sha256
12895 (base32
12896 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12897 (modules '((guix build utils)))
12898 (snippet
12899 '(begin
12900 (for-each delete-file
12901 (find-files "." "\\.jar$"))
12902 #t))))
12903 (build-system ant-build-system)
12904 (arguments
12905 `(#:jar-name "commons-vfs.jar"
12906 #:source-dir "commons-vfs2/src/main/java"
12907 #:test-dir "commons-vfs2/src/test"
12908 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12909 #:tests? #f
12910 #:phases
12911 (modify-phases %standard-phases
12912 (add-before 'build 'remove-hadoop-and-webdav
12913 ; Remove these files as they are not required and depend on difficult
12914 ; packages.
12915 (lambda _
12916 (for-each delete-file-recursively
12917 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12918 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12919 #t)))))
12920 (inputs
12921 (list java-commons-collections4
12922 java-commons-compress
12923 java-commons-httpclient
12924 java-commons-logging-minimal
12925 java-commons-net
12926 java-jsch))
12927 (home-page "https://commons.apache.org/proper/commons-vfs/")
12928 (synopsis "Java file system library")
12929 (description "Commons VFS provides a single API for accessing various
12930different file systems. It presents a uniform view of the files from various
12931different sources, such as the files on local disk, on an HTTP server, or
12932inside a Zip archive.")
12933 (license license:asl2.0)))
12934
12935(define-public java-jakarta-oro
12936 (package
12937 (name "java-jakarta-oro")
12938 (version "2.0.8")
12939 (source (origin
12940 (method url-fetch)
12941 (uri (string-append "mirror://apache/jakarta/oro/"
12942 "jakarta-oro-" version ".tar.gz"))
12943 (sha256
12944 (base32
12945 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12946 (modules '((guix build utils)))
12947 (snippet
12948 `(begin
12949 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12950 #t))))
12951 (build-system ant-build-system)
12952 (arguments
12953 `(#:build-target "package"
12954 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12955 #:tests? #f; tests are run as part of the build process
12956 #:phases
12957 (modify-phases %standard-phases
12958 (replace 'install
12959 (install-jars ,(string-append "jakarta-oro-" version))))))
12960 (home-page "https://jakarta.apache.org/oro/")
12961 (synopsis "Text-processing for Java")
12962 (description "The Jakarta-ORO Java classes are a set of text-processing
12963Java classes that provide Perl5 compatible regular expressions, AWK-like
12964regular expressions, glob expressions, and utility classes for performing
12965substitutions, splits, filtering filenames, etc. This library is the successor
12966of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12967from ORO, Inc.")
12968 (license license:asl1.1)))
12969
12970(define-public java-native-access
12971 (package
12972 (name "java-native-access")
12973 (version "4.5.1")
12974 (source (origin
12975 (method url-fetch)
12976 (uri (string-append "https://github.com/java-native-access/jna/"
12977 "archive/" version ".tar.gz"))
12978 (file-name (string-append name "-" version ".tar.gz"))
12979 (sha256
12980 (base32
12981 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12982 (modules '((guix build utils)))
12983 (snippet
12984 `(begin
12985 (for-each delete-file (find-files "." ".*.jar"))
12986 (delete-file-recursively "native/libffi")
12987 (delete-file-recursively "dist")
12988 #t))))
12989 (build-system ant-build-system)
12990 (arguments
12991 `(#:tests? #f; FIXME: tests require reflections.jar
12992 #:test-target "test"
12993 #:make-flags (list "-Ddynlink.native=true")
12994 #:phases
12995 (modify-phases %standard-phases
12996 (add-before 'build 'fix-build.xml
12997 (lambda* (#:key inputs #:allow-other-keys)
12998 (substitute* "build.xml"
12999 ;; Since we removed the bundled ant.jar, give the correct path
13000 (("lib/ant.jar") (search-input-file inputs "/lib/ant.jar"))
13001 ;; We removed generated native libraries. We can only rebuild one
13002 ;; so don't fail if we can't find a native library for another architecture.
13003 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
13004 ;; Copy test dependencies
13005 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
13006 "lib/junit.jar")
13007 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
13008 "jar$"))
13009 "lib/hamcrest-core.jar")
13010 ;; FIXME: once reflections.jar is built, copy it to lib/test.
13011 #t))
13012 (add-before 'build 'build-native
13013 (lambda _
13014 (invoke "ant" "-Ddynlink.native=true" "native")
13015 #t))
13016 (replace 'install
13017 (install-jars "build")))))
13018 (inputs
13019 (list libffi libx11 libxt))
13020 (native-inputs
13021 (list gcc-7 java-junit java-hamcrest-core))
13022 (home-page "https://github.com/java-native-access/jna")
13023 (synopsis "Access to native shared libraries from Java")
13024 (description "JNA provides Java programs easy access to native shared
13025libraries without writing anything but Java code - no JNI or native code is
13026required. JNA allows you to call directly into native functions using natural
13027Java method invocation.")
13028 ;; Java Native Access project (JNA) is dual-licensed under 2
13029 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
13030 (license (list
13031 license:asl2.0
13032 license:lgpl2.1+))))
13033
13034(define-public java-native-access-platform
13035 (package
13036 (inherit java-native-access)
13037 (name "java-native-access-platform")
13038 (arguments
13039 `(#:test-target "test"
13040 #:tests? #f; require jna-test.jar
13041 #:phases
13042 (modify-phases %standard-phases
13043 (add-before 'build 'chdir
13044 (lambda _
13045 (chdir "contrib/platform")
13046 #t))
13047 (add-after 'chdir 'fix-ant
13048 (lambda* (#:key inputs #:allow-other-keys)
13049 (substitute* "nbproject/project.properties"
13050 (("../../build/jna.jar")
13051 (search-input-file inputs "/share/java/jna.jar"))
13052 (("../../lib/hamcrest-core-.*.jar")
13053 (car (find-files (assoc-ref inputs "java-hamcrest-core")
13054 "jar$")))
13055 (("../../lib/junit.jar")
13056 (car (find-files (assoc-ref inputs "java-junit")
13057 "jar$"))))
13058 #t))
13059 (replace 'install
13060 (install-jars "dist")))))
13061 (inputs
13062 (list java-native-access))
13063 (synopsis "Cross-platform mappings for jna")
13064 (description "java-native-access-platform has cross-platform mappings
13065and mappings for a number of commonly used platform functions, including a
13066large number of Win32 mappings as well as a set of utility classes that
13067simplify native access.")))
13068
13069(define-public java-jsch-agentproxy-core
13070 (package
13071 (name "java-jsch-agentproxy-core")
13072 (version "0.0.8")
13073 (source (origin
13074 (method url-fetch)
13075 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
13076 version ".tar.gz"))
13077 (file-name (string-append name "-" version ".tar.gz"))
13078 (sha256
13079 (base32
13080 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
13081 (build-system ant-build-system)
13082 (arguments
13083 `(#:jar-name "jsch-agentproxy-core.jar"
13084 #:source-dir "jsch-agent-proxy-core/src/main/java"
13085 #:tests? #f)); no tests
13086 (home-page "https://github.com/ymnk/jsch-agent-proxy")
13087 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
13088 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13089and Pageant included Putty. It will be easily integrated into JSch, and users
13090will be allowed to use these programs for authentication.")
13091 (license license:bsd-3)))
13092
13093(define-public java-jsch-agentproxy-sshagent
13094 (package
13095 (inherit java-jsch-agentproxy-core)
13096 (name "java-jsch-agentproxy-sshagent")
13097 (arguments
13098 `(#:jar-name "jsch-agentproxy-sshagent.jar"
13099 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
13100 #:tests? #f)); no tests
13101 (inputs
13102 (list java-jsch-agentproxy-core))
13103 (synopsis "Proxy to ssh-agent")
13104 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13105and Pageant included in Putty. This component contains the code for a proxy to
13106ssh-agent.")))
13107
13108(define-public java-jsch-agentproxy-usocket-jna
13109 (package
13110 (inherit java-jsch-agentproxy-core)
13111 (name "java-jsch-agentproxy-usocket-jna")
13112 (arguments
13113 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
13114 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
13115 #:tests? #f)); no tests
13116 (inputs
13117 (list java-jsch-agentproxy-core java-native-access))
13118 (synopsis "USocketFactory implementation using JNA")
13119 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13120and Pageant included in Putty. This component contains an implementation of
13121USocketFactory using @dfn{JNA} (Java Native Access).")))
13122
13123(define-public java-jsch-agentproxy-pageant
13124 (package
13125 (inherit java-jsch-agentproxy-core)
13126 (name "java-jsch-agentproxy-pageant")
13127 (arguments
13128 `(#:jar-name "jsch-agentproxy-pageant.jar"
13129 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
13130 #:tests? #f)); no tests
13131 (inputs
13132 (list java-jsch-agentproxy-core java-native-access
13133 java-native-access-platform))
13134 (synopsis "Proxy to pageant")
13135 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13136and Pageant included in Putty. This component contains the code for a proxy to
13137pageant.")))
13138
13139(define-public java-jsch-agentproxy-usocket-nc
13140 (package
13141 (inherit java-jsch-agentproxy-core)
13142 (name "java-jsch-agentproxy-usocket-nc")
13143 (arguments
13144 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
13145 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
13146 #:tests? #f)); no tests
13147 (inputs
13148 (list java-jsch-agentproxy-core))
13149 (synopsis "USocketFactory implementation using netcat")
13150 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13151and Pageant included in Putty. This component contains an implementation of
13152USocketFactory using netcat.")))
13153
13154(define-public java-jsch-agentproxy-connector-factory
13155 (package
13156 (inherit java-jsch-agentproxy-core)
13157 (name "java-jsch-agentproxy-connector-factory")
13158 (arguments
13159 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
13160 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
13161 #:tests? #f)); no tests
13162 (inputs
13163 (list java-jsch-agentproxy-core java-jsch-agentproxy-sshagent
13164 java-jsch-agentproxy-usocket-jna java-jsch-agentproxy-pageant
13165 java-jsch-agentproxy-usocket-nc))
13166 (synopsis "Connector factory for jsch agent proxy")
13167 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13168and Pageant included in Putty. This component contains a connector factory.")))
13169
13170(define-public java-jsch-agentproxy-jsch
13171 (package
13172 (inherit java-jsch-agentproxy-core)
13173 (name "java-jsch-agentproxy-jsch")
13174 (arguments
13175 `(#:jar-name "jsch-agentproxy-jsch.jar"
13176 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
13177 #:tests? #f)); no tests
13178 (inputs
13179 (list java-jsch java-jsch-agentproxy-core))
13180 (synopsis "JSch integration library for agentproxy")
13181 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13182and Pageant included in Putty. This component contains a library to use
13183jsch-agent-proxy with JSch.")))
13184
13185(define-public java-apache-ivy
13186 (package
13187 (name "java-apache-ivy")
13188 (version "2.4.0")
13189 (source (origin
13190 (method url-fetch)
13191 (uri (string-append "mirror://apache//ant/ivy/" version
13192 "/apache-ivy-" version "-src.tar.gz"))
13193 (sha256
13194 (base32
13195 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
13196 (patches
13197 (search-patches
13198 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
13199 (build-system ant-build-system)
13200 (arguments
13201 `(#:jar-name "ivy.jar"
13202 #:tests? #f
13203 #:phases
13204 (modify-phases %standard-phases
13205 (add-before 'build 'remove-example
13206 (lambda _
13207 (delete-file-recursively "src/example")
13208 #t))
13209 (add-before 'build 'copy-resources
13210 (lambda _
13211 (with-directory-excursion "src/java"
13212 (for-each (lambda (file)
13213 (install-file file (string-append "../../build/classes/" (dirname file))))
13214 (append
13215 (find-files "." ".*.css")
13216 (find-files "." ".*.ent")
13217 (find-files "." ".*.html")
13218 (find-files "." ".*.properties")
13219 (find-files "." ".*.xsd")
13220 (find-files "." ".*.xsl")
13221 (find-files "." ".*.xml"))))
13222 #t))
13223 (add-before 'build 'fix-vfs
13224 (lambda _
13225 (substitute*
13226 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
13227 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
13228 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
13229 #t))
13230 (add-before 'install 'copy-manifest
13231 (lambda _
13232 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
13233 #t))
13234 (add-before 'install 'repack
13235 (lambda _
13236 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
13237 "-C" "build/classes" ".")))
13238 (add-after 'install 'install-bin
13239 (lambda* (#:key outputs #:allow-other-keys)
13240 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
13241 (ivy (string-append bin "/ivy"))
13242 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
13243 (mkdir-p bin)
13244 (with-output-to-file ivy
13245 (lambda _
13246 (display (string-append
13247 "#!" (which "sh") "\n"
13248 "if [[ -z $CLASSPATH ]]; then\n"
13249 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
13250 "else\n"
13251 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
13252 "fi\n"
13253 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
13254 (chmod ivy #o755)
13255 #t))))))
13256 (inputs
13257 (list java-bouncycastle
13258 java-commons-cli
13259 java-commons-collections
13260 java-commons-httpclient
13261 java-commons-lang
13262 java-commons-vfs
13263 java-jakarta-oro
13264 java-jsch
13265 java-jsch-agentproxy-core
13266 java-jsch-agentproxy-connector-factory
13267 java-jsch-agentproxy-jsch
13268 java-junit))
13269 (home-page "https://ant.apache.org/ivy")
13270 (synopsis "Dependency manager for the Java programming language")
13271 (description "Ivy is a tool for managing (recording, tracking, resolving
13272and reporting) project dependencies. It is characterized by the following:
13273
13274@itemize
13275@item flexibility and configurability - Ivy is essentially process agnostic
13276 and is not tied to any methodology or structure. Instead it provides the
13277 necessary flexibility and configurability to be adapted to a broad range
13278 of dependency management and build processes.
13279@item tight integration with Apache Ant - while available as a standalone tool,
13280 Ivy works particularly well with Apache Ant providing a number of
13281 powerful Ant tasks ranging from dependency resolution to dependency
13282 reporting and publication.
13283@end itemize")
13284 (license license:asl2.0)))
13285
13286(define-public java-eclipse-sisu-inject
13287 (package
13288 (name "java-eclipse-sisu-inject")
13289 (version "0.3.5")
13290 (source (origin
13291 (method git-fetch)
13292 (uri (git-reference
13293 (url "https://github.com/eclipse/sisu.inject/")
13294 (commit (string-append "releases/" version))))
13295 (file-name (git-file-name name version))
13296 (sha256
13297 (base32
13298 "1yh434b8pi8cwmpk825fbvbnkkk2cwd4gxxjaygg8i9j0q3l9zp3"))))
13299 (build-system ant-build-system)
13300 (arguments
13301 `(#:jar-name "eclipse-sisu-inject.jar"
13302 #:source-dir "org.eclipse.sisu.inject/src"
13303 #:tests? #f; no tests
13304 #:phases
13305 (modify-phases %standard-phases
13306 (replace 'install
13307 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
13308 (propagated-inputs
13309 (list java-guice java-sisu-inject-parent-pom))
13310 (inputs
13311 (list java-guice-servlet
13312 java-javax-inject
13313 java-javaee-servletapi
13314 java-junit
13315 java-slf4j-api
13316 java-jsr305
13317 java-jsr250
13318 java-cdi-api
13319 java-osgi-framework
13320 java-osgi-util-tracker
13321 java-testng))
13322 (home-page "https://www.eclipse.org/sisu/")
13323 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
13324 (description "Sisu is a modular JSR330-based container that supports
13325classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
13326Google-Guice to perform dependency injection and provide the core JSR330
13327support, but removes the need to write explicit bindings in Guice modules.
13328Integration with other containers via the Eclipse Extension Registry and the
13329OSGi Service Registry is a goal of this project.")
13330 (license license:epl1.0)))
13331
13332(define java-sisu-inject-parent-pom
13333 (package
13334 (inherit java-eclipse-sisu-inject)
13335 (name "java-sisu-inject-parent-pom")
13336 (arguments
13337 `(#:tests? #f
13338 #:phases
13339 (modify-phases %standard-phases
13340 (delete 'configure)
13341 (delete 'build)
13342 (replace 'install
13343 (install-pom-file "pom.xml")))))
13344 (propagated-inputs '())))
13345
13346(define-public java-eclipse-sisu-plexus
13347 (package
13348 (name "java-eclipse-sisu-plexus")
13349 (version "0.3.5")
13350 (source (origin
13351 (method git-fetch)
13352 (uri (git-reference
13353 (url "https://github.com/eclipse/sisu.plexus")
13354 (commit (string-append "releases/" version))))
13355 (file-name (git-file-name name version))
13356 (sha256
13357 (base32
13358 "0lm5h0dmh41ffcwd32qnk3a87d360am36yq7168ikkyqa8jxkx28"))
13359 (modules '((guix build utils)))
13360 (snippet
13361 '(begin
13362 (for-each delete-file (find-files "." ".*.jar"))
13363 (rename-file "org.eclipse.sisu.plexus.tests/src"
13364 "org.eclipse.sisu.plexus.tests/java")
13365 #t))))
13366 (build-system ant-build-system)
13367 (arguments
13368 `(#:jar-name "eclipse-sisu-plexus.jar"
13369 #:source-dir "org.eclipse.sisu.plexus/src"
13370 #:test-dir "org.eclipse.sisu.plexus.tests"
13371 #:test-exclude
13372 (list
13373 ;; This test fails probably because we can't generate the necessary
13374 ;; meta-inf files.
13375 "**/PlexusLoggingTest.*"
13376 ;; FIXME: This test fails because of some injection error
13377 "**/PlexusRequirementTest.*")
13378 #:jdk ,icedtea-8
13379 #:phases
13380 (modify-phases %standard-phases
13381 (add-before 'build 'copy-resources
13382 (lambda _
13383 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
13384 "build/classes/META-INF/plexus")
13385 #t))
13386 (add-before 'check 'build-test-jar
13387 (lambda _
13388 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
13389 (mkdir "build")
13390 (with-directory-excursion "java"
13391 (apply invoke "javac" "-cp"
13392 (string-append (getenv "CLASSPATH")
13393 ":../../../../../build/classes")
13394 (find-files "." ".*.java"))
13395 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
13396 (find-files "." ".*.jar")))
13397 (mkdir-p "build/META-INF/plexus")
13398 (copy-file "resources/META-INF/plexus/components.xml"
13399 "build/META-INF/plexus/components.xml")
13400 (with-directory-excursion "build"
13401 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
13402 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
13403 (copy-recursively "META-INF" "../build/test-classes/META-INF")
13404 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
13405 (("resources/component-jar")
13406 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
13407 #t))
13408 (replace 'install
13409 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
13410 (propagated-inputs
13411 (list java-jsr250
13412 java-plexus-classworlds
13413 java-plexus-utils
13414 java-plexus-component-annotations
13415 java-cdi-api
13416 java-eclipse-sisu-inject
13417 java-sisu-plexus-parent-pom))
13418 (inputs
13419 (list java-osgi-framework
13420 java-slf4j-api
13421 java-javax-inject
13422 java-guice
13423 java-guava
13424 java-aopalliance
13425 java-asm
13426 java-cglib))
13427 (native-inputs
13428 (list java-junit))
13429 (home-page "https://www.eclipse.org/sisu/")
13430 (synopsis "Plexus support for the sisu container")
13431 (description "Sisu is a modular JSR330-based container that supports
13432classpath scanning, auto-binding, and dynamic auto-wiring. This package
13433adds Plexus support to the Sisu-Inject container.")
13434 (license license:epl1.0)))
13435
13436(define java-sisu-plexus-parent-pom
13437 (package
13438 (inherit java-eclipse-sisu-plexus)
13439 (name "java-sisu-plexus-parent-pom")
13440 (arguments
13441 `(#:tests? #f
13442 #:phases
13443 (modify-phases %standard-phases
13444 (delete 'configure)
13445 (delete 'build)
13446 (replace 'install
13447 (install-pom-file "pom.xml")))))
13448 (propagated-inputs
13449 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
13450
13451(define-public java-commons-compiler
13452 (package
13453 (name "java-commons-compiler")
13454 (version "3.0.8")
13455 (source (origin
13456 (method git-fetch)
13457 (uri (git-reference
13458 (url "https://github.com/janino-compiler/janino")
13459 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
13460 (file-name (string-append name "-" version))
13461 (sha256
13462 (base32
13463 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
13464 (modules '((guix build utils)))
13465 (snippet
13466 '(begin
13467 (for-each delete-file
13468 (find-files "." "\\.jar$"))
13469 #t))))
13470 (build-system ant-build-system)
13471 (arguments
13472 `(#:jar-name "commons-compiler.jar"
13473 #:source-dir "commons-compiler/src/main"
13474 #:tests? #f)); no tests
13475 (home-page "https://github.com/janino-compiler/janino")
13476 (synopsis "Java compiler")
13477 (description "Commons-compiler contains an API for janino, including the
13478@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
13479and @code{ISimpleCompiler} interfaces.")
13480 (license license:bsd-3)))
13481
13482(define-public java-janino
13483 (package
13484 (inherit java-commons-compiler)
13485 (name "java-janino")
13486 (arguments
13487 `(#:jar-name "janino.jar"
13488 #:source-dir "src/main/java"
13489 #:phases
13490 (modify-phases %standard-phases
13491 (add-before 'configure 'chdir
13492 (lambda _
13493 (chdir "janino")
13494 #t)))))
13495 (inputs
13496 (list java-commons-compiler))
13497 (native-inputs
13498 (list java-junit java-hamcrest-core))
13499 (description "Janino is a Java compiler. Janino can compile a set of
13500source files to a set of class files like @code{javac}, but also compile a
13501Java expression, block, class body or source file in memory, load the bytecode
13502and execute it directly in the same JVM. @code{janino} can also be used for
13503static code analysis or code manipulation.")))
13504
13505(define-public java-logback-core
13506 (package
13507 (name "java-logback-core")
13508 (version "1.2.3")
13509 (source (origin
13510 (method url-fetch)
13511 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
13512 version ".tar.gz"))
13513 (file-name (string-append name "-" version ".tar.gz"))
13514 (sha256
13515 (base32
13516 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
13517 (modules '((guix build utils)))
13518 (snippet
13519 '(begin
13520 (delete-file-recursively "logback-access/lib")
13521 #t))))
13522 (build-system ant-build-system)
13523 (arguments
13524 `(#:jar-name "logback.jar"
13525 #:source-dir "src/main/java"
13526 #:test-dir "src/test"
13527 #:test-exclude
13528 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
13529 ;; which creates FastClasses
13530 (list "**/AllCoreTest.*"
13531 "**/AutoFlushingObjectWriterTest.*"
13532 "**/PackageTest.*"
13533 "**/ResilientOutputStreamTest.*"
13534 ;; And we still don't want to run abstract classes
13535 "**/Abstract*.*")
13536 #:phases
13537 (modify-phases %standard-phases
13538 (add-before 'configure 'chdir
13539 (lambda _
13540 (chdir "logback-core")
13541 #t)))))
13542 (inputs
13543 `(("java-javax-mail" ,java-javax-mail)
13544 ("servlet" ,java-javaee-servletapi)
13545 ("java-commons-compiler" ,java-commons-compiler)
13546 ("java-janino" ,java-janino)))
13547 (native-inputs
13548 `(("java-junit" ,java-junit)
13549 ("java-hamcrest-core" ,java-hamcrest-core)
13550 ("java-mockito-1" ,java-mockito-1)
13551 ("java-cglib" ,java-cglib)
13552 ("java-asm" ,java-asm)
13553 ("java-objenesis" ,java-objenesis)
13554 ("java-joda-time" ,java-joda-time)))
13555 (home-page "https://logback.qos.ch")
13556 (synopsis "Logging for java")
13557 (description "Logback is intended as a successor to the popular log4j project.
13558This module lays the groundwork for the other two modules.")
13559 ;; Either epl1.0 or lgpl2.1
13560 (license (list license:epl1.0
13561 license:lgpl2.1))))
13562
13563(define-public java-logback-classic
13564 (package
13565 (inherit java-logback-core)
13566 (name "java-logback-classic")
13567 (arguments
13568 `(#:jar-name "logback-classic.jar"
13569 #:source-dir "src/main/java"
13570 #:test-dir "src/test"
13571 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13572 #:jdk ,icedtea-8
13573 #:phases
13574 (modify-phases %standard-phases
13575 (add-before 'configure 'chdir
13576 (lambda _
13577 (chdir "logback-classic")
13578 #t))
13579 (replace 'build
13580 (lambda* (#:key inputs #:allow-other-keys)
13581 (mkdir-p "build/classes")
13582 (setenv "CLASSPATH"
13583 (string-join
13584 (apply append (map (lambda (input)
13585 (find-files (assoc-ref inputs input)
13586 ".*.jar"))
13587 '("java-logback-core" "java-slf4j-api"
13588 "java-commons-compiler" "servlet"
13589 "groovy")))
13590 ":"))
13591 (apply invoke "groovyc" "-d" "build/classes" "-j"
13592 (find-files "src/main/" ".*\\.(groovy|java)$"))
13593 (invoke "ant" "jar")
13594 #t)))))
13595 (inputs
13596 (modify-inputs (package-inputs java-logback-core)
13597 (prepend java-logback-core java-slf4j-api)))
13598 (native-inputs
13599 (list groovy))
13600 (description "Logback is intended as a successor to the popular log4j project.
13601This module can be assimilated to a significantly improved version of log4j.
13602Moreover, @code{logback-classic} natively implements the slf4j API so that you
13603can readily switch back and forth between logback and other logging frameworks
13604such as log4j or @code{java.util.logging} (JUL).")))
13605
13606(define-public java-jgit
13607 (package
13608 (name "java-jgit")
13609 (version "4.7.0.201704051617-r")
13610 (source (origin
13611 (method url-fetch)
13612 (uri (string-append "https://repo1.maven.org/maven2/"
13613 "org/eclipse/jgit/org.eclipse.jgit/"
13614 version "/org.eclipse.jgit-"
13615 version "-sources.jar"))
13616 (sha256
13617 (base32
13618 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13619 (build-system ant-build-system)
13620 (arguments
13621 `(#:tests? #f ; There are no tests to run.
13622 #:jar-name "jgit.jar"
13623 ;; JGit must be built with a JDK supporting Java 8.
13624 #:jdk ,icedtea-8
13625 ;; Target our older default JDK.
13626 #:make-flags (list "-Dtarget=1.7")
13627 #:phases
13628 (modify-phases %standard-phases
13629 ;; The jar file generated by the default build.xml does not include
13630 ;; the text properties files, so we need to add them.
13631 (add-after 'build 'add-properties
13632 (lambda* (#:key jar-name #:allow-other-keys)
13633 (with-directory-excursion "src"
13634 (apply invoke "jar" "-uf"
13635 (string-append "../build/jar/" jar-name)
13636 (find-files "." "\\.properties$")))
13637 #t)))))
13638 (inputs
13639 (list java-classpathx-servletapi java-javaewah java-jsch
13640 java-slf4j-api))
13641 (home-page "https://eclipse.org/jgit/")
13642 (synopsis "Java library implementing the Git version control system")
13643 (description "JGit is a lightweight, pure Java library implementing the
13644Git version control system, providing repository access routines, support for
13645network protocols, and core version control algorithms.")
13646 (license license:edl1.0)))
13647
13648;; For axoloti. This package can still be built with icedtea-7, which is
13649;; currently used as the default JDK.
13650(define-public java-jgit-4.2
13651 (package (inherit java-jgit)
13652 (version "4.2.0.201601211800-r")
13653 (source (origin
13654 (method url-fetch)
13655 (uri (string-append "https://repo1.maven.org/maven2/"
13656 "org/eclipse/jgit/org.eclipse.jgit/"
13657 version "/org.eclipse.jgit-"
13658 version "-sources.jar"))
13659 (sha256
13660 (base32
13661 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13662 (build-system ant-build-system)
13663 (arguments
13664 (substitute-keyword-arguments (package-arguments java-jgit)
13665 ;; Build for default JDK.
13666 ((#:jdk _) icedtea-7)
13667 ((#:phases phases)
13668 `(modify-phases ,phases
13669 (add-after 'unpack 'use-latest-javaewah-API
13670 (lambda _
13671 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13672 (("wordinbits") "WORD_IN_BITS"))
13673 #t))))))
13674 (inputs
13675 (list java-javaewah java-jsch java-slf4j-api))))
13676
13677(define-public abcl
13678 (package
13679 (name "abcl")
13680 (version "1.9.0")
13681 (source
13682 (origin
13683 (method url-fetch)
13684 (uri (string-append "https://abcl.org/releases/"
13685 version "/abcl-src-" version ".tar.gz"))
13686 (sha256
13687 (base32
13688 "0scqq5c7201xhp0g6i4y3m2nrk6l5any1nisiscbsd48ya25qax1"))
13689 (patches
13690 (search-patches
13691 "abcl-fix-build-xml.patch"))))
13692 (build-system ant-build-system)
13693 (native-inputs
13694 (list java-junit))
13695 (arguments
13696 `(#:build-target "abcl.jar"
13697 #:test-target "abcl.test"
13698 #:phases
13699 (modify-phases %standard-phases
13700 (replace 'install
13701 (lambda* (#:key outputs #:allow-other-keys)
13702 (let ((share (string-append (assoc-ref outputs "out")
13703 "/share/java/"))
13704 (bin (string-append (assoc-ref outputs "out")
13705 "/bin/")))
13706 (mkdir-p share)
13707 (install-file "dist/abcl.jar" share)
13708 (install-file "dist/abcl-contrib.jar" share)
13709 (mkdir-p bin)
13710 (with-output-to-file (string-append bin "abcl")
13711 (lambda _
13712 (let ((classpath (string-append
13713 share "abcl.jar"
13714 ":"
13715 share "abcl-contrib.jar")))
13716 (display (string-append
13717 "#!" (which "sh") "\n"
13718 "if [[ -z $CLASSPATH ]]; then\n"
13719 " cp=\"" classpath "\"\n"
13720 "else\n"
13721 " cp=\"" classpath ":$CLASSPATH\"\n"
13722 "fi\n"
13723 "exec " (which "java")
13724 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13725 (chmod (string-append bin "abcl") #o755)
13726 #t))))))
13727 (home-page "https://abcl.org/")
13728 (synopsis "Common Lisp Implementation on the JVM")
13729 (description
13730 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13731Lisp language featuring both an interpreter and a compiler, running in the
13732JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13733in any Java application. Additionally, it can be used to implement (parts of)
13734the application using Java to Lisp integration APIs.")
13735 (native-search-paths
13736 (list (search-path-specification
13737 (variable "XDG_DATA_DIRS")
13738 (files '("share")))))
13739 (license (list license:gpl2+
13740 ;; named-readtables is released under 3 clause BSD
13741 license:bsd-3
13742 ;; jfli is released under CPL 1.0
13743 license:cpl1.0))))
13744
13745(define-public java-jsonp-api
13746 (package
13747 (name "java-jsonp-api")
13748 (version "1.1.6")
13749 (source (origin
13750 (method git-fetch)
13751 (uri (git-reference
13752 (url "https://github.com/eclipse-ee4j/jsonp")
13753 (commit (string-append "1.1-" version "-RELEASE"))))
13754 (file-name (git-file-name name version))
13755 (sha256
13756 (base32
13757 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13758 (build-system ant-build-system)
13759 (arguments
13760 `(#:jar-name "jsonp-api.jar"
13761 #:tests? #f
13762 #:source-dir "api/src/main/java"
13763 #:test-dir "api/src/test"))
13764 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13765 (synopsis "JSON Processing in Java")
13766 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13767parse, generate, transform and query) JSON messages. It produces and
13768consumes JSON text in a streaming fashion (similar to StAX API for XML)
13769and allows building a Java object model for JSON text using API classes
13770(similar to DOM API for XML).")
13771 ;; either gpl2 only with classpath exception, or epl2.0.
13772 (license (list license:gpl2
13773 license:epl2.0))))
13774
13775(define-public java-jsonp-impl
13776 (package
13777 (inherit java-jsonp-api)
13778 (name "java-jsonp-impl")
13779 (arguments
13780 `(#:jar-name "jsonp-impl.jar"
13781 #:tests? #f
13782 #:source-dir "impl/src/main/java"
13783 #:test-dir "impl/src/test"
13784 #:phases
13785 (modify-phases %standard-phases
13786 (add-before 'build 'copy-resources
13787 (lambda _
13788 (copy-recursively
13789 "impl/src/main/resources/"
13790 "build/classes")
13791 #t)))))
13792 (propagated-inputs
13793 (list java-jsonp-api))
13794 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13795parse, generate, transform and query) JSON messages. This package contains
13796a reference implementation of that API.")))
13797
13798(define-public java-xmp
13799 (package
13800 (name "java-xmp")
13801 (version "5.1.3")
13802 (source (origin
13803 (method url-fetch)
13804 (uri (string-append "http://download.macromedia.com/pub/developer"
13805 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13806 (sha256
13807 (base32
13808 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13809 (build-system ant-build-system)
13810 (arguments
13811 `(#:build-target "build"
13812 #:tests? #f; no tests
13813 #:phases
13814 (modify-phases %standard-phases
13815 (add-after 'unpack 'chdir
13816 (lambda _
13817 (chdir "XMPCore")
13818 #t))
13819 (add-before 'build 'fix-timestamp
13820 (lambda _
13821 (substitute* "build.xml"
13822 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13823 #t))
13824 (replace 'install
13825 (install-jars "."))
13826 (add-after 'install 'install-doc
13827 (lambda* (#:key outputs #:allow-other-keys)
13828 (copy-recursively
13829 "docs"
13830 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13831 #t)))))
13832 (native-inputs
13833 (list unzip))
13834 (home-page "https://www.adobe.com/devnet/xmp.html")
13835 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13836 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13837technology that allows you to embed data about a file, known as metadata,
13838into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13839library and the API is similar.")
13840 (license license:bsd-3)))
13841
13842(define-public java-args4j
13843 (package
13844 (name "java-args4j")
13845 (version "2.33")
13846 (source (origin
13847 (method git-fetch)
13848 (uri (git-reference
13849 (url "https://github.com/kohsuke/args4j")
13850 (commit (string-append "args4j-site-" version))))
13851 (file-name (git-file-name name version))
13852 (sha256
13853 (base32
13854 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
13855 (build-system ant-build-system)
13856 (arguments
13857 `(#:jar-name "args4j.jar"
13858 #:source-dir "args4j/src"
13859 #:test-dir "args4j/test"
13860 #:test-exclude
13861 (list "**/ExampleTest.*"
13862 "**/ExternalConfiguredTest.*" ; fails to find a file
13863 ;; We still don't want to run abstract classes
13864 "**/Abstract*.*")
13865 #:phases
13866 (modify-phases %standard-phases
13867 (add-before 'check 'fix-test-dir
13868 (lambda _
13869 (substitute* "build.xml"
13870 (("/java\">") "\">"))
13871 #t))
13872 (add-before 'build 'copy-resources
13873 (lambda _
13874 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
13875 (to-prefix "build/classes/org/kohsuke/args4j/"))
13876 (for-each (lambda (f)
13877 (install-file
13878 (string-append from-prefix f)
13879 (string-append to-prefix (dirname f))))
13880 (list "Messages.properties"
13881 "Messages_de.properties"
13882 "Messages_en.properties"
13883 "Messages_ru.properties"
13884 "spi/Messages.properties"
13885 "spi/Messages_de.properties"
13886 "spi/Messages_en.properties"
13887 "spi/Messages_ru.properties")))
13888 #t)))))
13889 (native-inputs
13890 (list java-junit))
13891 (home-page "https://args4j.kohsuke.org/")
13892 (synopsis "Command line parser library")
13893 (description "Args4j is a small Java class library that makes it easy to
13894parse command line options/arguments in your CUI application.")
13895 (license license:expat)))
13896
13897(define-public java-argparse4j
13898 (package
13899 (name "java-argparse4j")
13900 (version "0.9.0")
13901 (source (origin
13902 (method git-fetch)
13903 (uri (git-reference
13904 (url "https://github.com/argparse4j/argparse4j")
13905 (commit (string-append "argparse4j-" version))))
13906 (file-name (git-file-name name version))
13907 (sha256
13908 (base32
13909 "1i0j3zs1ln48n0g8a90vqbv6528mcswhzys6252yp0c8w1ai64fb"))))
13910 (build-system ant-build-system)
13911 (arguments
13912 (list #:jar-name "java-argparse4j.jar"
13913 #:source-dir "main/src/main/"
13914 #:test-dir "main/src/test/"
13915 #:jdk openjdk11
13916 #:phases #~(modify-phases %standard-phases
13917 (add-after 'unpack 'copy-resources
13918 (lambda _
13919 (copy-recursively "main/src/test/resources"
13920 "target/test-classes")
13921 (copy-recursively "main/src/main/resources"
13922 "build/classes")))
13923 (replace 'install
13924 (install-from-pom "pom.xml")))))
13925 (inputs (list java-junit))
13926 (home-page "https://argparse4j.github.io/")
13927 (synopsis "Java command-line argument parser library")
13928 (description "Argparse4j is a command line argument parser library for
13929Java based on Python's @code{argparse} module.")
13930 (license license:expat)))
13931
13932(define-public java-metadata-extractor
13933 (package
13934 (name "java-metadata-extractor")
13935 (version "2.11.0")
13936 (source (origin
13937 (method git-fetch)
13938 (uri (git-reference
13939 (url "https://github.com/drewnoakes/metadata-extractor")
13940 (commit version)))
13941 (file-name (git-file-name name version))
13942 (sha256
13943 (base32
13944 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13945 (build-system ant-build-system)
13946 (arguments
13947 `(#:jar-name "metadata-extractor.jar"
13948 #:source-dir "Source"
13949 #:test-dir "Tests"
13950 #:phases
13951 (modify-phases %standard-phases
13952 (add-before 'check 'fix-test-dir
13953 (lambda _
13954 (substitute* "build.xml"
13955 (("/java\">") "\">"))
13956 #t)))))
13957 (propagated-inputs
13958 (list java-xmp))
13959 (native-inputs
13960 (list java-hamcrest-core java-junit))
13961 (home-page "https://github.com/drewnoakes/metadata-extractor")
13962 (synopsis "Extract metadata from image and video files")
13963 (description "Metadata-extractor is a straightforward Java library for
13964reading metadata from image files. It is able to read metadata in Exif,
13965IPTC, XMP, ICC and more formats.")
13966 (license license:asl2.0)))
13967
13968(define-public java-svg-salamander
13969 (package
13970 (name "java-svg-salamander")
13971 (version "1.1.2")
13972 (source (origin
13973 (method git-fetch)
13974 (uri (git-reference
13975 (url "https://github.com/blackears/svgSalamander")
13976 (commit (string-append "v" version))))
13977 (file-name (git-file-name name version))
13978 (sha256
13979 (base32
13980 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13981 (modules '((guix build utils)))
13982 (snippet
13983 '(begin
13984 (for-each delete-file (find-files "." ".*.jar"))
13985 #t))
13986 (patches
13987 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13988 (build-system ant-build-system)
13989 (arguments
13990 `(#:tests? #f; no tests
13991 #:phases
13992 (modify-phases %standard-phases
13993 (add-after 'unpack 'chdir
13994 (lambda _
13995 (chdir "svg-core")
13996 #t))
13997 (add-before 'build 'copy-jars
13998 (lambda* (#:key inputs #:allow-other-keys)
13999 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
14000 "../libraries/javacc.jar")
14001 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
14002 "../libraries/ant.jar")
14003 #t))
14004 (replace 'install
14005 (install-jars "dist")))))
14006 (native-inputs
14007 (list javacc))
14008 (home-page "https://github.com/blackears/svgSalamander")
14009 (synopsis "SVG engine for Java")
14010 (description "SVG Salamander is an SVG engine for Java that's designed
14011to be small, fast, and allow programmers to use it with a minimum of fuss.
14012It's in particular targeted for making it easy to integrate SVG into Java
14013games and making it much easier for artists to design 2D game content - from
14014rich interactive menus to charts and graphcs to complex animations.")
14015 (license license:bsd-2)))
14016
14017(define-public java-jboss-transaction-api-spec
14018 (package
14019 (name "java-jboss-transaction-api-spec")
14020 (version "1.2+1.1.1")
14021 (source (origin
14022 (method git-fetch)
14023 (uri (git-reference
14024 (url "https://github.com/jboss/jboss-transaction-api_spec")
14025 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
14026 (file-name (git-file-name name version))
14027 (sha256
14028 (base32
14029 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
14030 (build-system ant-build-system)
14031 (arguments
14032 `(#:jar-name "java-jboss-transaction-api_spec.jar"
14033 #:source-dir "src/main/java"
14034 #:tests? #f)); no tests
14035 (inputs
14036 (list java-cdi-api java-jboss-interceptors-api-spec))
14037 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
14038 (synopsis "Generic transaction management API in Java")
14039 (description "Java-jboss-transaction-api-spec implements the Transactions
14040API. A transaction is a unit of work containing one or more operations
14041involving one or more shared resources having ACID (Atomicity, Consistency,
14042Isolation and Durability) properties.")
14043 ;; either gpl2 only with classpath exception or cddl.
14044 (license (list license:gpl2 license:cddl1.0))))
14045
14046(define-public java-picocli
14047 (package
14048 (name "java-picocli")
14049 (version "4.3.2")
14050 (source (origin
14051 (method git-fetch)
14052 (uri (git-reference
14053 (url "https://github.com/remkop/picocli")
14054 (commit (string-append "v" version))))
14055 (file-name (git-file-name name version))
14056 (sha256
14057 (base32
14058 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
14059 (build-system ant-build-system)
14060 (arguments
14061 `(#:jar-name "picocli.jar"
14062 #:source-dir "src/main/java"
14063 ;; Tests require missing dependencies (junitparams, system-rules)
14064 #:tests? #f))
14065 (home-page "https://picocli.info")
14066 (synopsis "REPL for the JVM")
14067 (description "Picocli is a framework for building command line applications
14068for the JVM. It supports colors, autocompletion, subcommands, and more. Written
14069in Java, usable from Groovy, Kotlin, Scala, etc.")
14070 (license license:asl2.0)))
14071
14072(define-public java-jetbrains-annotations
14073 (package
14074 (name "java-jetbrains-annotations")
14075 (version "19.0.0")
14076 (source (origin
14077 (method git-fetch)
14078 (uri (git-reference
14079 (url "https://github.com/JetBrains/java-annotations")
14080 (commit version)))
14081 (file-name (git-file-name name version))
14082 (sha256
14083 (base32
14084 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
14085 (build-system ant-build-system)
14086 (arguments
14087 `(#:jar-name "jetbrains-annotations.jar"
14088 #:source-dir "common/src/main/java:java8/src/main/java"
14089 #:tests? #f)); no tests
14090 (home-page "https://github.com/JetBrains/java-annotations")
14091 (synopsis "Annotations for Java and other JVM languages")
14092 (description "This package contains a set of Java annotations which can be
14093used in JVM-based languages. They serve as an additional documentation and
14094can be interpreted by IDEs and static analysis tools to improve code analysis.")
14095 (license license:expat)))
14096
14097(define-public java-javaparser
14098 (package
14099 (name "java-javaparser")
14100 (version "3.16.1")
14101 (source (origin
14102 (method git-fetch)
14103 (uri (git-reference
14104 (url "https://github.com/javaparser/javaparser")
14105 (commit (string-append "javaparser-parent-" version))))
14106 (file-name (git-file-name name version))
14107 (sha256
14108 (base32
14109 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
14110 (modules '((guix build utils)))
14111 (snippet
14112 '(begin
14113 (for-each delete-file
14114 (find-files "." "\\.jar$"))
14115 #t))))
14116 (build-system ant-build-system)
14117 (arguments
14118 `(#:tests? #f; tests require jbehave and junit5
14119 #:phases
14120 (modify-phases %standard-phases
14121 (add-before 'build 'fill-template
14122 (lambda _
14123 (with-directory-excursion "javaparser-core/src/main"
14124 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
14125 "java/com/github/javaparser/JavaParserBuild.java")
14126 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
14127 (("\\$\\{project.version\\}") ,version)
14128 (("\\$\\{project.name\\}") "javaparser")
14129 (("\\$\\{project.build.finalName\\}") "javaparser")
14130 (("\\$\\{maven.version\\}") "fake")
14131 (("\\$\\{maven.build.version\\}") "fake")
14132 (("\\$\\{build.timestamp\\}") "0")
14133 (("\\$\\{java.vendor\\}") "Guix")
14134 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
14135 (("\\$\\{java.version\\}") "1.8")
14136 (("\\$\\{os.arch\\}") "any")
14137 (("\\$\\{os.name\\}") "Guix")
14138 (("\\$\\{os.version\\}") "not available")))
14139 #t))
14140 (add-before 'build 'generate-javacc
14141 (lambda _
14142 (with-directory-excursion "javaparser-core/src/main/java"
14143 (invoke "java" "javacc" "../javacc/java.jj"))
14144 #t))
14145 (add-before 'build 'copy-javacc-support
14146 (lambda _
14147 (with-directory-excursion "javaparser-core/src/main"
14148 (copy-recursively "javacc-support" "java"))
14149 #t))
14150 (replace 'build
14151 (lambda _
14152 (define (build name)
14153 (format #t "Building ~a~%" name)
14154 (delete-file-recursively "build/classes")
14155 (mkdir-p "build/classes")
14156 (apply invoke "javac"
14157 "-cp" (string-append (getenv "CLASSPATH") ":"
14158 (string-join (find-files "build/jar" ".")
14159 ":"))
14160 "-d" "build/classes"
14161 (find-files (string-append name "/src/main/java")
14162 ".*.java"))
14163 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
14164 "-C" "build/classes" "."))
14165 (mkdir-p "build/classes")
14166 (mkdir-p "build/test-classes")
14167 (mkdir-p "build/jar")
14168 (build "javaparser-core")
14169 (build "javaparser-core-serialization")
14170 (build "javaparser-core-generators")
14171 (build "javaparser-core-metamodel-generator")
14172 (build "javaparser-symbol-solver-core")
14173 #t))
14174 (replace 'install
14175 (install-jars "build/jar")))))
14176 (inputs
14177 (list java-guava java-jboss-javassist java-jsonp-api))
14178 (native-inputs
14179 (list javacc))
14180 (home-page "http://javaparser.org/")
14181 (synopsis "Parser for Java")
14182 (description
14183 "This project contains a set of libraries implementing a Java 1.0 - Java
1418411 Parser with advanced analysis functionalities.")
14185 (license (list
14186 ;; either lgpl or asl
14187 license:lgpl3+
14188 license:asl2.0))))
14189
14190(define-public tla2tools
14191 ;; This package was originally based on the "v1.8.0" tag, but that merely
14192 ;; points to the moving master branch. That might be because the ‘latest
14193 ;; release’ at GitHub is currently 1.7.1. We'll see! For now, rather than
14194 ;; downgrade to 1.7.1 proper, use the commit that we originally dubbed 1.8.0.
14195 (let* ((release "1.7.1")
14196 (revision "0")
14197 (commit "6932e19083fc6df42473464857fc1280cb5aaecc"))
14198 (package
14199 (name "tla2tools")
14200 (version (git-version release revision commit))
14201 (source (origin
14202 (method git-fetch)
14203 (uri (git-reference
14204 (url "https://github.com/tlaplus/tlaplus")
14205 (commit commit)))
14206 (file-name (git-file-name name version))
14207 (sha256
14208 (base32
14209 "1hhx8gmn81k8qrkx4p7ppinmygxga9fqffd626wkvhjgg2ky8lhs"))
14210 (patches
14211 (search-patches "tla2tools-build-xml.patch"))
14212 (modules '((guix build utils)))
14213 (snippet
14214 '(begin
14215 ;; Remove packaged libraries (see 'replace-libs below)
14216 (for-each delete-file (find-files "." ".*.jar$"))))))
14217 (build-system ant-build-system)
14218 (arguments
14219 (let* ((tlatools "tlatools/org.lamport.tlatools/")
14220 (build-xml (string-append tlatools "customBuild.xml")))
14221 `(#:jdk ,openjdk11
14222 #:modules ((guix build ant-build-system)
14223 (guix build utils)
14224 (ice-9 match)
14225 (srfi srfi-26))
14226 #:make-flags '("-f" ,build-xml)
14227 #:phases
14228 (modify-phases %standard-phases
14229 ;; Replace packed libs with references to jars in store
14230 (add-after 'unpack 'replace-libs
14231 (lambda* (#:key inputs #:allow-other-keys)
14232 (define (input-jar input)
14233 (car (find-files (assoc-ref inputs input) "\\.jar$")))
14234 (for-each
14235 (match-lambda
14236 ((file . input)
14237 (symlink (input-jar input)
14238 (string-append ,tlatools "/lib/" file))))
14239 '(("gson/gson-2.8.6.jar" . "java-gson")
14240 ("javax.mail/mailapi-1.6.3.jar" . "java-javax-mail")
14241 ("jline/jline-terminal-3.14.1.jar" . "java-jline-terminal")
14242 ("jline/jline-reader-3.14.1.jar" . "java-jline-reader")
14243 ("lsp/org.eclipse.lsp4j.debug-0.10.0.jar" .
14244 "java-eclipse-lsp4j-debug")
14245 ("lsp/org.eclipse.lsp4j.jsonrpc-0.10.0.jar" .
14246 "java-eclipse-lsp4j-jsonrpc")
14247 ("lsp/org.eclipse.lsp4j.jsonrpc.debug-0.10.0.jar" .
14248 "java-eclipse-lsp4j-jsonrpc-debug")
14249 ("junit-4.12.jar" . "java-junit")
14250 ("easymock-3.3.1.jar" . "java-easymock")))
14251 ;; Retain a tiny subset of the original X-Git-*
14252 ;; manifest values just to aid in debugging.
14253 (substitute* ,build-xml
14254 (("\\$\\{git.tag\\}") (string-append "v" ,release)))))
14255 (add-before 'check 'prepare-tests
14256 (lambda _
14257 ;; The pcal tests write to .cfg files.
14258 (for-each (cut chmod <> #o644)
14259 (find-files (string-append ,tlatools
14260 "/test-model/pcal")
14261 "\\.cfg$"))))
14262 (replace 'install
14263 (lambda* (#:key inputs outputs #:allow-other-keys)
14264 (let* ((share (string-append (assoc-ref outputs "out") "/share/java"))
14265 (jar-name "tla2tools.jar"); set in project.properties
14266 (jar (string-append ,tlatools
14267 "/dist/" jar-name))
14268 (java-cp (string-append share "/" jar-name))
14269 (bin (string-append (assoc-ref outputs "out") "/bin"))
14270 (java (search-input-file inputs "/bin/java")))
14271 (install-file jar share)
14272 (mkdir-p bin)
14273 ;; Generate wrapper scripts for bin/, which invoke common
14274 ;; commands within tla2tools.jar. Users can still invoke
14275 ;; tla2tools.jar for the rest.
14276 (for-each
14277 (match-lambda
14278 ((wrapper . class)
14279 (let ((file (string-append bin "/" wrapper)))
14280 (begin
14281 (with-output-to-file file
14282 (lambda _
14283 (display
14284 (string-append
14285 "#!/bin/sh\n"
14286 java " -cp " java-cp " " class " \"$@\""))))
14287 (chmod file #o755)))))
14288 ;; bin/wrapper . java-class
14289 '(("pcal" . "pcal.trans")
14290 ("tlatex" . "tla2tex.TLA")
14291 ("tla2sany" . "tla2sany.SANY")
14292 ("tlc2" . "tlc2.TLC")
14293 ("tlc2-repl" . "tlc2.REPL"))))))))))
14294 (native-inputs
14295 (list java-junit java-easymock))
14296 (inputs
14297 (list java-javax-mail
14298 java-gson-2.8.6
14299 java-jline-terminal
14300 java-jline-reader
14301 java-eclipse-lsp4j-jsonrpc
14302 java-eclipse-lsp4j-jsonrpc-debug
14303 java-eclipse-lsp4j-debug))
14304 (home-page "https://lamport.azurewebsites.net/tla/tools.html")
14305 (synopsis "TLA+ tools (analyzer, TLC, TLATeX, PlusCal translator)")
14306 (description "TLA+ is a high-level language for modeling programs and
14307systems---especially concurrent and distributed ones. It's based on the idea
14308that the best way to describe things precisely is with simple
14309mathematics. TLA+ and its tools are useful for eliminating fundamental design
14310errors, which are hard to find and expensive to correct in code.
14311
14312The following TLA+ tools are available in this distribution:
14313
14314@itemize
14315@item The Syntactic Analyzer: A parser and syntax checker for
14316 TLA+ specifications;
14317@item TLC: A model checker and simulator for a subclass of \"executable\" TLA+
14318 specifications;
14319@item TLATeX: A program for typesetting TLA+ specifications;
14320@item Beta test versions of 1-3 for the TLA+2 language; and
14321@item The PlusCal translator.
14322@end itemize")
14323 (license license:expat))))
14324
14325;;;
14326;;; Avoid adding new packages to the end of this file. To reduce the chances
14327;;; of a merge conflict, place them above by existing packages with similar
14328;;; functionality or similar names.
14329;;;