Commit | Line | Data |
---|---|---|
0760e3a1 | 1 | ;;; GNU Guix --- Functional package management for GNU |
8116c9d7 | 2 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net> |
559239af | 3 | ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> |
ea9e58ef | 4 | ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org> |
717b6ba6 | 5 | ;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au> |
30b7704a | 6 | ;;; Copyright © 2017-2020 Julien Lepiller <julien@lepiller.eu> |
88f256a1 | 7 | ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be> |
1d47ea86 | 8 | ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com> |
1c8ba10a | 9 | ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
0bc11cc7 | 10 | ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com> |
d0e9ded7 | 11 | ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com> |
2703d573 | 12 | ;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> |
84805ef2 | 13 | ;;; Copyright © 2019, 2020, 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> |
9820d6ed | 14 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> |
f1cf62f5 RG |
15 | ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org> |
16 | ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> | |
ae018ad9 | 17 | ;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com> |
0760e3a1 RW |
18 | ;;; |
19 | ;;; This file is part of GNU Guix. | |
20 | ;;; | |
21 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
22 | ;;; under the terms of the GNU General Public License as published by | |
23 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
24 | ;;; your option) any later version. | |
25 | ;;; | |
26 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
27 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
28 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
29 | ;;; GNU General Public License for more details. | |
30 | ;;; | |
31 | ;;; You should have received a copy of the GNU General Public License | |
32 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
33 | ||
34 | (define-module (gnu packages java) | |
35 | #:use-module ((guix licenses) #:prefix license:) | |
36 | #:use-module (guix packages) | |
37 | #:use-module (guix download) | |
62c9bfaa | 38 | #:use-module (guix hg-download) |
72885a4c | 39 | #:use-module (guix git-download) |
78745d33 | 40 | #:use-module (guix svn-download) |
77ae4145 | 41 | #:use-module ((guix build utils) #:select (alist-replace)) |
f6789047 | 42 | #:use-module (guix utils) |
068e476f | 43 | #:use-module (guix build-system ant) |
0760e3a1 | 44 | #:use-module (guix build-system gnu) |
6a5829d9 | 45 | #:use-module (guix build-system trivial) |
0760e3a1 RW |
46 | #:use-module (gnu packages) |
47 | #:use-module (gnu packages attr) | |
48 | #:use-module (gnu packages autotools) | |
49 | #:use-module (gnu packages base) | |
50 | #:use-module (gnu packages bash) | |
f21403e2 | 51 | #:use-module (gnu packages certs) |
0760e3a1 RW |
52 | #:use-module (gnu packages cpio) |
53 | #:use-module (gnu packages cups) | |
54 | #:use-module (gnu packages compression) | |
dd741059 | 55 | #:use-module (gnu packages elf) |
0760e3a1 RW |
56 | #:use-module (gnu packages fontutils) |
57 | #:use-module (gnu packages gawk) | |
72885a4c | 58 | #:use-module (gnu packages gettext) |
8581c813 | 59 | #:use-module (gnu packages gl) |
0760e3a1 RW |
60 | #:use-module (gnu packages ghostscript) ;lcms |
61 | #:use-module (gnu packages gnome) | |
3a69f5f2 | 62 | #:use-module (gnu packages groovy) |
0760e3a1 | 63 | #:use-module (gnu packages gtk) |
6a5829d9 | 64 | #:use-module (gnu packages guile) |
afb5858d | 65 | #:use-module (gnu packages icu4c) |
0760e3a1 | 66 | #:use-module (gnu packages image) |
24155bf4 | 67 | #:use-module (gnu packages java-compression) |
c4fd86f9 | 68 | #:use-module (gnu packages libffi) |
0760e3a1 | 69 | #:use-module (gnu packages linux) ;alsa |
2f0d0418 | 70 | #:use-module (gnu packages maths) |
015e8774 | 71 | #:use-module (gnu packages maven) |
b916b638 | 72 | #:use-module (gnu packages maven-parent-pom) |
aff0cce9 | 73 | #:use-module (gnu packages nss) |
bcb078a4 | 74 | #:use-module (gnu packages onc-rpc) |
5766984b | 75 | #:use-module (gnu packages web) |
0760e3a1 | 76 | #:use-module (gnu packages wget) |
0760e3a1 RW |
77 | #:use-module (gnu packages pkg-config) |
78 | #:use-module (gnu packages perl) | |
c4fd86f9 | 79 | #:use-module (gnu packages popt) |
89e34644 | 80 | #:use-module (gnu packages kerberos) |
0760e3a1 RW |
81 | #:use-module (gnu packages xml) |
82 | #:use-module (gnu packages xorg) | |
f6789047 | 83 | #:use-module (gnu packages texinfo) |
2d15f601 RW |
84 | #:use-module ((srfi srfi-1) #:select (fold alist-delete)) |
85 | #:use-module (srfi srfi-11) | |
86 | #:use-module (ice-9 match)) | |
0760e3a1 | 87 | |
e1ae3587 RW |
88 | \f |
89 | ;;; | |
90 | ;;; Java bootstrap toolchain. | |
91 | ;;; | |
92 | ||
93 | ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We | |
269fb7d3 RW |
94 | ;; use it to build a simple version of GNU Classpath, the Java standard |
95 | ;; library. We chose version 0.93 because it is the last version that can be | |
96 | ;; built with Jikes. With Jikes and this version of GNU Classpath we can | |
97 | ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is | |
98 | ;; the last version of JamVM that works with a version of GNU classpath that | |
99 | ;; does not require ECJ. These three packages make up the bootstrap JDK. | |
100 | ||
101 | ;; This is sufficient to build an older version of Ant, which is needed to | |
102 | ;; build an older version of ECJ, an incremental Java compiler, both of which | |
103 | ;; are written in Java. | |
e1ae3587 | 104 | ;; |
269fb7d3 RW |
105 | ;; ECJ is needed to build the latest release (0.99) and the development |
106 | ;; version of GNU Classpath. The development version of GNU Classpath has | |
107 | ;; much more support for Java 1.6 than the latest release, but we need to | |
108 | ;; build 0.99 first to get a working version of javah. ECJ, the development | |
109 | ;; version of GNU Classpath, and the latest version of JamVM make up the | |
110 | ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x | |
111 | ;; build framework. We then build the more recent JDKs Icedtea 2.x and | |
112 | ;; Icedtea 3.x. | |
e1ae3587 | 113 | |
f1cf62f5 RG |
114 | (define-public libantlr3c |
115 | (package | |
116 | (name "libantlr3c") | |
117 | (version "3.4") | |
118 | (source | |
119 | (origin | |
120 | (method url-fetch) | |
121 | (uri | |
122 | (string-append "https://www.antlr3.org/download/C/" | |
123 | name "-" version ".tar.gz")) | |
124 | (sha256 | |
125 | (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa")))) | |
126 | (build-system gnu-build-system) | |
127 | (arguments | |
128 | `(#:configure-flags (list "--enable-debuginfo" "--disable-static") | |
129 | #:phases (modify-phases %standard-phases | |
130 | (replace 'configure | |
131 | (lambda* (#:key build target native-inputs inputs outputs | |
132 | (configure-flags '()) out-of-source? system | |
133 | #:allow-other-keys) | |
134 | (let ((configure (assoc-ref %standard-phases 'configure)) | |
135 | (enable-64bit? (member system '("aarch64-linux" | |
136 | "x86_64-linux" | |
137 | "mips64el-linux")))) | |
138 | (configure #:build build #:target target | |
139 | #:native-inputs native-inputs | |
140 | #:inputs inputs #:outputs outputs | |
141 | #:configure-flags `(,(if enable-64bit? | |
142 | "--enable-64bit" | |
143 | '()) | |
144 | ,@configure-flags) | |
145 | #:out-of-source? out-of-source?))))))) | |
146 | (synopsis "ANTLR C Library") | |
147 | (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother | |
148 | Tool for Language Recognition v3).") | |
149 | (home-page "https://www.antlr3.org/") | |
150 | (license license:bsd-3))) | |
151 | ||
e1ae3587 RW |
152 | (define jikes |
153 | (package | |
154 | (name "jikes") | |
155 | (version "1.22") | |
156 | (source (origin | |
157 | (method url-fetch) | |
158 | (uri (string-append "mirror://sourceforge/jikes/Jikes/" | |
159 | version "/jikes-" version ".tar.bz2")) | |
160 | (sha256 | |
161 | (base32 | |
162 | "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c")))) | |
163 | (build-system gnu-build-system) | |
164 | (home-page "http://jikes.sourceforge.net/") | |
165 | (synopsis "Compiler for the Java language") | |
166 | (description "Jikes is a compiler that translates Java source files as | |
167 | defined in The Java Language Specification into the bytecoded instruction set | |
168 | and binary format defined in The Java Virtual Machine Specification.") | |
169 | (license license:ibmpl1.0))) | |
170 | ||
880939c1 PN |
171 | (define-public drip |
172 | ;; Last release is from 2014, with a few important commits afterwards. | |
173 | (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08")) | |
174 | (package | |
175 | (name "drip") | |
176 | (version (git-version "0.2.4" "1" commit)) | |
177 | (source (origin | |
178 | (method git-fetch) | |
179 | (uri (git-reference | |
180 | (url "https://github.com/ninjudd/drip") | |
181 | (commit commit))) | |
182 | (file-name (git-file-name name version)) | |
183 | (sha256 | |
184 | (base32 | |
185 | "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2")))) | |
186 | (build-system gnu-build-system) | |
187 | (native-inputs | |
188 | `(("jdk" ,icedtea "jdk"))) | |
189 | (arguments | |
190 | `(#:tests? #f ; No tests. | |
191 | #:phases | |
192 | (modify-phases %standard-phases | |
193 | (delete 'configure) | |
194 | (add-before 'install 'fix-wrapper | |
195 | (lambda* (#:key inputs #:allow-other-keys) | |
196 | (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps"))) | |
197 | (substitute* "bin/drip" | |
198 | (("jps") jps) | |
199 | (("brew update && brew upgrade drip") "guix pull && guix install drip") | |
200 | ;; No need to make: | |
201 | (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "") | |
202 | ;; No need to include source: | |
203 | (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]") | |
204 | "true")) | |
205 | #t))) | |
206 | (replace 'install | |
207 | (lambda* (#:key outputs #:allow-other-keys) | |
208 | (let* ((out (assoc-ref outputs "out")) | |
209 | (bin (string-append out "/bin")) | |
210 | (share (string-append out "/share/drip"))) | |
211 | (mkdir-p bin) | |
212 | (for-each | |
213 | (lambda (file) | |
214 | (install-file (string-append "bin/" file) bin)) | |
215 | '("drip" "drip_daemon" "drip_proxy")) | |
216 | (install-file "drip.jar" share) | |
217 | (substitute* (string-append bin "/drip") | |
218 | (("drip_dir=\\$bin_dir/..") | |
219 | (string-append "drip_dir=" share))) | |
220 | #t)))))) | |
221 | (home-page "https://github.com/ninjudd/drip") | |
222 | (synopsis "Faster Java Virtual Machine launching") | |
223 | (description "Drip is a launcher for the Java Virtual Machine that | |
224 | provides much faster startup times than the @command{java} command. The @command{drip} | |
225 | script is intended to be a drop-in replacement for the @command{java} command, | |
226 | only faster.") | |
227 | (license license:epl1.0)))) | |
228 | ||
45f762ee RW |
229 | ;; This is the last version of GNU Classpath that can be built without ECJ. |
230 | (define classpath-bootstrap | |
2551fee8 | 231 | (package |
45f762ee RW |
232 | (name "classpath") |
233 | (version "0.93") | |
2551fee8 RW |
234 | (source (origin |
235 | (method url-fetch) | |
45f762ee RW |
236 | (uri (string-append "mirror://gnu/classpath/classpath-" |
237 | version ".tar.gz")) | |
2551fee8 RW |
238 | (sha256 |
239 | (base32 | |
bab9793f EF |
240 | "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz")) |
241 | (patches (search-patches "classpath-aarch64-support.patch")))) | |
2551fee8 RW |
242 | (build-system gnu-build-system) |
243 | (arguments | |
244 | `(#:configure-flags | |
45f762ee RW |
245 | (list (string-append "JAVAC=" |
246 | (assoc-ref %build-inputs "jikes") | |
247 | "/bin/jikes") | |
2551fee8 RW |
248 | "--disable-Werror" |
249 | "--disable-gmp" | |
250 | "--disable-gtk-peer" | |
45f762ee | 251 | "--disable-gconf-peer" |
2551fee8 RW |
252 | "--disable-plugin" |
253 | "--disable-dssi" | |
254 | "--disable-alsa" | |
45f762ee RW |
255 | "--disable-gjdoc") |
256 | #:phases | |
257 | (modify-phases %standard-phases | |
4fb59c9e RW |
258 | ;; XXX: This introduces a memory leak as we remove a call to free up |
259 | ;; memory for the file name string. This was necessary because of a | |
260 | ;; runtime error that would have prevented us from building | |
261 | ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685 | |
262 | ;; for the gnarly details. | |
263 | (add-after 'unpack 'remove-call-to-free | |
264 | (lambda _ | |
265 | (substitute* "native/jni/java-io/java_io_VMFile.c" | |
266 | (("result = cpio_isFileExists.*" m) | |
267 | (string-append m "\n//"))) | |
268 | #t)) | |
45f762ee | 269 | (add-after 'install 'install-data |
0c66a4eb | 270 | (lambda _ (invoke "make" "install-data")))))) |
2551fee8 RW |
271 | (native-inputs |
272 | `(("jikes" ,jikes) | |
273 | ("fastjar" ,fastjar) | |
45f762ee | 274 | ("libltdl" ,libltdl) |
2551fee8 | 275 | ("pkg-config" ,pkg-config))) |
45f762ee RW |
276 | (home-page "https://www.gnu.org/software/classpath/") |
277 | (synopsis "Essential libraries for Java") | |
278 | (description "GNU Classpath is a project to create core class libraries | |
279 | for use with runtimes, compilers and tools for the Java programming | |
280 | language.") | |
281 | ;; GPLv2 or later, with special linking exception. | |
282 | (license license:gpl2+))) | |
57f6c50d | 283 | |
063629aa RW |
284 | ;; This is the last version of JamVM that works with a version of GNU |
285 | ;; classpath that does not require ECJ. | |
286 | (define jamvm-1-bootstrap | |
57f6c50d | 287 | (package |
063629aa RW |
288 | (name "jamvm") |
289 | (version "1.5.1") | |
57f6c50d RW |
290 | (source (origin |
291 | (method url-fetch) | |
063629aa RW |
292 | (uri (string-append "mirror://sourceforge/jamvm/jamvm/" |
293 | "JamVM%20" version "/jamvm-" | |
294 | version ".tar.gz")) | |
6c9dca5a SS |
295 | (patches (search-patches "jamvm-1.5.1-aarch64-support.patch" |
296 | "jamvm-1.5.1-armv7-support.patch")) | |
57f6c50d RW |
297 | (sha256 |
298 | (base32 | |
cff1e095 AŠ |
299 | "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36")) |
300 | (snippet | |
301 | '(begin | |
302 | ;; Remove precompiled software. | |
303 | (delete-file "lib/classes.zip") | |
304 | #t)))) | |
57f6c50d RW |
305 | (build-system gnu-build-system) |
306 | (arguments | |
c4fd86f9 | 307 | `(#:configure-flags |
063629aa | 308 | (list (string-append "--with-classpath-install-dir=" |
fc37b4af RW |
309 | (assoc-ref %build-inputs "classpath")) |
310 | "--disable-int-caching" | |
311 | "--enable-runtime-reloc-checks" | |
6c9dca5a SS |
312 | "--enable-ffi") |
313 | #:phases | |
314 | ,(if (string-prefix? "aarch64" (or (%current-system) | |
315 | (%current-target-system))) | |
316 | ;; Makefiles and the configure script need to be regenerated to | |
317 | ;; incorporate support for AArch64. | |
318 | '(modify-phases %standard-phases | |
319 | (replace 'bootstrap | |
320 | (lambda _ (invoke "autoreconf" "-vif")))) | |
321 | '%standard-phases))) | |
57f6c50d | 322 | (inputs |
063629aa | 323 | `(("classpath" ,classpath-bootstrap) |
57f6c50d | 324 | ("jikes" ,jikes) |
fc37b4af | 325 | ("libffi" ,libffi) |
cff1e095 | 326 | ("zip" ,zip) |
063629aa | 327 | ("zlib" ,zlib))) |
6c9dca5a SS |
328 | (native-inputs |
329 | (if (string-prefix? "aarch64" (or (%current-system) | |
330 | (%current-target-system))) | |
331 | ;; Additional packages needed for autoreconf. | |
332 | `(("autoconf" ,autoconf) | |
333 | ("automake" ,automake) | |
334 | ("libtool" ,libtool)) | |
335 | '())) | |
063629aa RW |
336 | (home-page "http://jamvm.sourceforge.net/") |
337 | (synopsis "Small Java Virtual Machine") | |
338 | (description "JamVM is a Java Virtual Machine conforming to the JVM | |
339 | specification edition 2 (blue book). It is extremely small. However, unlike | |
340 | other small VMs it supports the full spec, including object finalisation and | |
341 | JNI.") | |
342 | (license license:gpl2+))) | |
2551fee8 | 343 | |
5783bd77 RW |
344 | (define ant-bootstrap |
345 | (package | |
346 | (name "ant-bootstrap") | |
347 | ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which | |
348 | ;; are not supported. The 1.8.x series is the last to use only features | |
ff4d9fdf RW |
349 | ;; supported by Jikes. |
350 | (version "1.8.4") | |
5783bd77 RW |
351 | (source (origin |
352 | (method url-fetch) | |
9a01efa2 | 353 | (uri (string-append "mirror://apache/" |
5783bd77 RW |
354 | "ant/source/apache-ant-" |
355 | version "-src.tar.bz2")) | |
356 | (sha256 | |
357 | (base32 | |
ff4d9fdf | 358 | "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx")))) |
5783bd77 RW |
359 | (build-system gnu-build-system) |
360 | (arguments | |
cded3a75 GB |
361 | `(#:imported-modules ((guix build syscalls) |
362 | ,@%gnu-build-system-modules) | |
363 | #:modules ((srfi srfi-1) | |
364 | (guix build gnu-build-system) | |
365 | (guix build utils) | |
366 | (guix build syscalls)) | |
367 | #:tests? #f ; no "check" target | |
5783bd77 RW |
368 | #:phases |
369 | (modify-phases %standard-phases | |
d4fd4c3a | 370 | (delete 'bootstrap) |
5783bd77 RW |
371 | (delete 'configure) |
372 | (replace 'build | |
373 | (lambda* (#:key inputs #:allow-other-keys) | |
aa432388 | 374 | (setenv "JAVA_HOME" (assoc-ref inputs "jamvm")) |
5783bd77 | 375 | (setenv "JAVACMD" |
aa432388 RW |
376 | (string-append (assoc-ref inputs "jamvm") |
377 | "/bin/jamvm")) | |
5783bd77 | 378 | (setenv "JAVAC" |
aa432388 RW |
379 | (string-append (assoc-ref inputs "jikes") |
380 | "/bin/jikes")) | |
381 | (setenv "CLASSPATH" | |
382 | (string-append (assoc-ref inputs "jamvm") | |
383 | "/lib/rt.jar")) | |
5783bd77 | 384 | |
d4fd4c3a RW |
385 | ;; Ant complains if this file doesn't exist. |
386 | (setenv "HOME" "/tmp") | |
387 | (with-output-to-file "/tmp/.ant.properties" | |
388 | (lambda _ (display ""))) | |
5783bd77 RW |
389 | |
390 | ;; Use jikes instead of javac for <javac ...> tags in build.xml | |
391 | (setenv "ANT_OPTS" "-Dbuild.compiler=jikes") | |
392 | ||
393 | ;; jikes produces lots of warnings, but they are not very | |
394 | ;; interesting, so we silence them. | |
395 | (setenv "$BOOTJAVAC_OPTS" "-nowarn") | |
396 | ||
d4fd4c3a RW |
397 | ;; Without these JamVM options the build may freeze. |
398 | (substitute* "bootstrap.sh" | |
399 | (("^\"\\$\\{JAVACMD\\}\" " m) | |
a495998b EF |
400 | ,@(if (string-prefix? "armhf" (or (%current-system) |
401 | (%current-target-system))) | |
402 | `((string-append m "-Xnocompact ")) | |
403 | `((string-append m "-Xnocompact -Xnoinlining "))))) | |
d4fd4c3a | 404 | |
5783bd77 RW |
405 | ;; Disable tests because we are bootstrapping and thus don't have |
406 | ;; any of the dependencies required to build and run the tests. | |
407 | (substitute* "build.xml" | |
408 | (("depends=\"jars,test-jar\"") "depends=\"jars\"")) | |
8e14634a EF |
409 | (invoke "bash" "bootstrap.sh" |
410 | (string-append "-Ddist.dir=" | |
411 | (assoc-ref %outputs "out"))))) | |
cded3a75 GB |
412 | (add-after 'build 'strip-jar-timestamps ;based on ant-build-system |
413 | (lambda* (#:key outputs #:allow-other-keys) | |
414 | (define (repack-archive jar) | |
415 | (let* ((dir (mkdtemp! "jar-contents.XXXXXX")) | |
416 | (manifest (string-append dir "/META-INF/MANIFESTS.MF"))) | |
417 | (with-directory-excursion dir | |
418 | (invoke "unzip" jar)) | |
419 | (delete-file jar) | |
420 | ;; XXX: copied from (gnu build install) | |
421 | (for-each (lambda (file) | |
422 | (let ((s (lstat file))) | |
423 | (unless (eq? (stat:type s) 'symlink) | |
424 | (utime file 0 0 0 0)))) | |
425 | (find-files dir #:directories? #t)) | |
426 | ;; It is important that the manifest appears first. | |
427 | (with-directory-excursion dir | |
428 | (let* ((files (find-files "." ".*" #:directories? #t)) | |
429 | ;; To ensure that the reference scanner can | |
430 | ;; detect all store references in the jars | |
431 | ;; we disable compression with the "-0" option. | |
432 | (command (if (file-exists? manifest) | |
433 | `("zip" "-0" "-X" ,jar ,manifest | |
434 | ,@files) | |
435 | `("zip" "-0" "-X" ,jar ,@files)))) | |
436 | (apply invoke command))))) | |
437 | (for-each repack-archive | |
438 | (find-files | |
439 | (string-append (assoc-ref %outputs "out") "/lib") | |
440 | "\\.jar$")) | |
441 | #t)) | |
5783bd77 RW |
442 | (delete 'install)))) |
443 | (native-inputs | |
444 | `(("jikes" ,jikes) | |
cded3a75 GB |
445 | ("jamvm" ,jamvm-1-bootstrap) |
446 | ("unzip" ,unzip) | |
b42b5afd | 447 | ("zip" ,zip))) |
0b1d71b2 | 448 | (home-page "https://ant.apache.org") |
5783bd77 RW |
449 | (synopsis "Build tool for Java") |
450 | (description | |
451 | "Ant is a platform-independent build tool for Java. It is similar to | |
452 | make but is implemented using the Java language, requires the Java platform, | |
453 | and is best suited to building Java projects. Ant uses XML to describe the | |
454 | build process and its dependencies, whereas Make uses Makefile format.") | |
455 | (license license:asl2.0))) | |
456 | ||
5461721f RW |
457 | ;; Version 3.2.2 is the last version without a dependency on a full-fledged |
458 | ;; compiler for Java 1.5. | |
459 | (define ecj-bootstrap | |
460 | (package | |
461 | (name "ecj-bootstrap") | |
462 | (version "3.2.2") | |
463 | (source (origin | |
464 | (method url-fetch) | |
465 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
466 | "downloads/drops/R-" version | |
467 | "-200702121330/ecjsrc.zip")) | |
468 | (sha256 | |
469 | (base32 | |
470 | "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307")))) | |
471 | ;; It would be so much easier if we could use the ant-build-system, but we | |
472 | ;; cannot as we don't have ant at this point. We use ecj for | |
473 | ;; bootstrapping the JDK. | |
474 | (build-system gnu-build-system) | |
475 | (arguments | |
476 | `(#:modules ((guix build gnu-build-system) | |
477 | (guix build utils) | |
478 | (srfi srfi-1)) | |
479 | #:tests? #f ; there are no tests | |
480 | #:phases | |
481 | (modify-phases %standard-phases | |
482 | (replace 'configure | |
483 | (lambda* (#:key inputs #:allow-other-keys) | |
484 | (setenv "CLASSPATH" | |
485 | (string-join | |
6c775dc6 RW |
486 | (cons (string-append (assoc-ref inputs "jamvm") |
487 | "/lib/rt.jar") | |
488 | (find-files (string-append | |
489 | (assoc-ref inputs "ant-bootstrap") | |
490 | "/lib") | |
491 | "\\.jar$")) | |
5461721f RW |
492 | ":")) |
493 | #t)) | |
494 | (replace 'build | |
495 | (lambda* (#:key inputs #:allow-other-keys) | |
496 | ;; The unpack phase enters the "org" directory by mistake. | |
497 | (chdir "..") | |
498 | ||
499 | ;; Create a simple manifest to make ecj executable. | |
500 | (with-output-to-file "manifest" | |
501 | (lambda _ | |
502 | (display "Manifest-Version: 1.0 | |
503 | Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"))) | |
504 | ||
505 | ;; Compile it all! | |
0b302a16 EF |
506 | (and (apply invoke "jikes" |
507 | (find-files "." "\\.java$")) | |
508 | (invoke "fastjar" "cvfm" | |
509 | "ecj-bootstrap.jar" "manifest" ".")))) | |
5461721f RW |
510 | (replace 'install |
511 | (lambda* (#:key outputs #:allow-other-keys) | |
512 | (let ((share (string-append (assoc-ref outputs "out") | |
513 | "/share/java/"))) | |
514 | (mkdir-p share) | |
515 | (install-file "ecj-bootstrap.jar" share) | |
516 | #t)))))) | |
517 | (native-inputs | |
518 | `(("ant-bootstrap" ,ant-bootstrap) | |
519 | ("unzip" ,unzip) | |
6c775dc6 RW |
520 | ("jikes" ,jikes) |
521 | ("jamvm" ,jamvm-1-bootstrap) | |
5461721f RW |
522 | ("fastjar" ,fastjar))) |
523 | (home-page "https://eclipse.org") | |
524 | (synopsis "Eclipse Java development tools core batch compiler") | |
525 | (description "This package provides the Eclipse Java core batch compiler | |
526 | for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a | |
527 | requirement for all GNU Classpath releases after version 0.93.") | |
528 | (license license:epl1.0))) | |
529 | ||
6a5829d9 RW |
530 | (define ecj-javac-wrapper |
531 | (package (inherit ecj-bootstrap) | |
532 | (name "ecj-javac-wrapper") | |
533 | (source #f) | |
534 | (build-system trivial-build-system) | |
535 | (arguments | |
536 | `(#:modules ((guix build utils)) | |
537 | #:builder | |
c4f06c11 | 538 | (begin |
6a5829d9 RW |
539 | (use-modules (guix build utils)) |
540 | (let* ((bin (string-append (assoc-ref %outputs "out") "/bin")) | |
541 | (target (string-append bin "/javac")) | |
542 | (guile (string-append (assoc-ref %build-inputs "guile") | |
543 | "/bin/guile")) | |
544 | (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap") | |
545 | "/share/java/ecj-bootstrap.jar")) | |
c4f06c11 RW |
546 | (java (string-append (assoc-ref %build-inputs "jamvm") |
547 | "/bin/jamvm")) | |
548 | (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath") | |
549 | "/share/classpath"))) | |
51602aac RW |
550 | (string-append jvmlib "/glibj.zip:" |
551 | jvmlib "/tools.zip")))) | |
6a5829d9 RW |
552 | (mkdir-p bin) |
553 | (with-output-to-file target | |
554 | (lambda _ | |
555 | (format #t "#!~a --no-auto-compile\n!#\n" guile) | |
556 | (write | |
557 | `(begin (use-modules (ice-9 match) | |
558 | (ice-9 receive) | |
559 | (ice-9 hash-table) | |
560 | (srfi srfi-1) | |
561 | (srfi srfi-26)) | |
562 | (define defaults | |
563 | '(("-bootclasspath" ,bootcp) | |
564 | ("-source" "1.5") | |
565 | ("-target" "1.5") | |
566 | ("-cp" "."))) | |
567 | (define (main args) | |
568 | (let ((classpath (getenv "CLASSPATH"))) | |
569 | (setenv "CLASSPATH" | |
c4f06c11 RW |
570 | (string-join (list ,ecj |
571 | ,(string-append (assoc-ref %build-inputs "jamvm") | |
572 | "/lib/rt.jar") | |
573 | (or classpath "")) | |
574 | ":"))) | |
6a5829d9 RW |
575 | (receive (vm-args other-args) |
576 | ;; Separate VM arguments from arguments to ECJ. | |
577 | (partition (cut string-prefix? "-J" <>) | |
578 | (fold (lambda (default acc) | |
579 | (if (member (first default) acc) | |
580 | acc (append default acc))) | |
581 | args defaults)) | |
582 | (apply system* ,java | |
583 | (append | |
584 | ;; Remove "-J" prefix | |
585 | (map (cut string-drop <> 2) vm-args) | |
586 | '("org.eclipse.jdt.internal.compiler.batch.Main") | |
587 | (cons "-nowarn" other-args))))) | |
588 | ;; Entry point | |
589 | (let ((args (cdr (command-line)))) | |
590 | (if (null? args) | |
591 | (format (current-error-port) "javac: no arguments given!\n") | |
592 | (main args))))))) | |
593 | (chmod target #o755) | |
594 | #t)))) | |
595 | (native-inputs | |
596 | `(("guile" ,guile-2.2) | |
597 | ("ecj-bootstrap" ,ecj-bootstrap) | |
c4f06c11 RW |
598 | ("jamvm" ,jamvm-1-bootstrap) |
599 | ("classpath" ,classpath-bootstrap))) | |
6a5829d9 RW |
600 | (description "This package provides a wrapper around the @dfn{Eclipse |
601 | compiler for Java} (ecj) with a command line interface that is compatible with | |
602 | the standard javac executable."))) | |
603 | ||
8778da03 RW |
604 | ;; The classpath-bootstrap was built without a virtual machine, so it does not |
605 | ;; provide a wrapper for javah. We cannot build the development version of | |
606 | ;; Classpath without javah. | |
607 | (define classpath-0.99 | |
608 | (package (inherit classpath-bootstrap) | |
d3551e86 RW |
609 | (version "0.99") |
610 | (source (origin | |
611 | (method url-fetch) | |
612 | (uri (string-append "mirror://gnu/classpath/classpath-" | |
613 | version ".tar.gz")) | |
614 | (sha256 | |
615 | (base32 | |
bab9793f EF |
616 | "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr")) |
617 | (patches (search-patches "classpath-aarch64-support.patch")))) | |
d3551e86 RW |
618 | (arguments |
619 | `(#:configure-flags | |
620 | (list (string-append "--with-ecj-jar=" | |
621 | (assoc-ref %build-inputs "ecj-bootstrap") | |
622 | "/share/java/ecj-bootstrap.jar") | |
623 | (string-append "JAVAC=" | |
624 | (assoc-ref %build-inputs "ecj-javac-wrapper") | |
625 | "/bin/javac") | |
626 | (string-append "JAVA=" | |
8778da03 RW |
627 | (assoc-ref %build-inputs "jamvm") |
628 | "/bin/jamvm") | |
d3551e86 RW |
629 | "GCJ_JAVAC_TRUE=no" |
630 | "ac_cv_prog_java_works=yes" ; trust me | |
631 | "--disable-Werror" | |
632 | "--disable-gmp" | |
633 | "--disable-gtk-peer" | |
634 | "--disable-gconf-peer" | |
635 | "--disable-plugin" | |
636 | "--disable-dssi" | |
637 | "--disable-alsa" | |
638 | "--disable-gjdoc") | |
639 | #:phases | |
640 | (modify-phases %standard-phases | |
641 | (add-after 'install 'install-data | |
15a59c21 | 642 | (lambda _ (invoke "make" "install-data")))))) |
d3551e86 RW |
643 | (native-inputs |
644 | `(("ecj-bootstrap" ,ecj-bootstrap) | |
645 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) | |
646 | ("fastjar" ,fastjar) | |
8778da03 RW |
647 | ("jamvm" ,jamvm-1-bootstrap) |
648 | ("classpath" ,classpath-bootstrap) | |
d3551e86 | 649 | ("libltdl" ,libltdl) |
8778da03 | 650 | ("pkg-config" ,pkg-config))))) |
d3551e86 | 651 | |
c98d7a66 RW |
652 | ;; We need this because classpath-bootstrap does not provide all of the tools |
653 | ;; we need to build classpath-devel. | |
04d7cae2 | 654 | (define classpath-jamvm-wrappers |
c98d7a66 | 655 | (package (inherit classpath-0.99) |
04d7cae2 RW |
656 | (name "classpath-jamvm-wrappers") |
657 | (source #f) | |
658 | (build-system trivial-build-system) | |
659 | (arguments | |
660 | `(#:modules ((guix build utils)) | |
661 | #:builder | |
662 | (begin | |
663 | (use-modules (guix build utils)) | |
664 | (let* ((bash (assoc-ref %build-inputs "bash")) | |
665 | (jamvm (assoc-ref %build-inputs "jamvm")) | |
666 | (classpath (assoc-ref %build-inputs "classpath")) | |
667 | (bin (string-append (assoc-ref %outputs "out") | |
668 | "/bin/"))) | |
669 | (mkdir-p bin) | |
670 | (for-each (lambda (tool) | |
671 | (with-output-to-file (string-append bin tool) | |
672 | (lambda _ | |
e3ec1258 EF |
673 | ,@(if (string-prefix? "armhf" (or (%current-system) |
674 | (%current-target-system))) | |
675 | `((format #t "#!~a/bin/sh | |
676 | ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \ | |
677 | gnu.classpath.tools.~a.~a $@" | |
678 | bash jamvm classpath tool | |
679 | (if (string=? "native2ascii" tool) | |
680 | "Native2ASCII" "Main"))) | |
681 | `((format #t "#!~a/bin/sh | |
40e3a197 | 682 | ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \ |
04d7cae2 RW |
683 | gnu.classpath.tools.~a.~a $@" |
684 | bash jamvm classpath tool | |
685 | (if (string=? "native2ascii" tool) | |
e3ec1258 | 686 | "Native2ASCII" "Main")))))) |
04d7cae2 RW |
687 | (chmod (string-append bin tool) #o755)) |
688 | (list "javah" | |
689 | "rmic" | |
690 | "rmid" | |
691 | "orbd" | |
692 | "rmiregistry" | |
693 | "native2ascii")) | |
694 | #t)))) | |
695 | (native-inputs | |
696 | `(("bash" ,bash) | |
c98d7a66 RW |
697 | ("jamvm" ,jamvm-1-bootstrap) |
698 | ("classpath" ,classpath-0.99))) | |
04d7cae2 RW |
699 | (inputs '()) |
700 | (synopsis "Executables from GNU Classpath") | |
701 | (description "This package provides wrappers around the tools provided by | |
702 | the GNU Classpath library. They are executed by the JamVM virtual | |
703 | machine."))) | |
704 | ||
72885a4c RW |
705 | ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since |
706 | ;; then Classpath has gained much more support for Java 1.6. | |
707 | (define-public classpath-devel | |
708 | (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103") | |
709 | (revision "1")) | |
8778da03 | 710 | (package (inherit classpath-bootstrap) |
72885a4c RW |
711 | (version (string-append "0.99-" revision "." (string-take commit 9))) |
712 | (source (origin | |
713 | (method git-fetch) | |
714 | (uri (git-reference | |
5f13bf09 | 715 | (url "https://git.savannah.gnu.org/git/classpath.git") |
72885a4c | 716 | (commit commit))) |
51988e3a | 717 | (file-name (string-append "classpath-" version "-checkout")) |
72885a4c RW |
718 | (sha256 |
719 | (base32 | |
2995be77 SS |
720 | "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4")) |
721 | (patches (search-patches "classpath-aarch64-support.patch")))) | |
72885a4c | 722 | (arguments |
93c103ab RW |
723 | `(#:make-flags |
724 | ;; Ensure that the initial heap size is smaller than the maximum | |
725 | ;; size. By default only Xmx is set, which can lead to invalid | |
726 | ;; memory settings on some machines with a lot of memory. | |
727 | '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M") | |
728 | #:configure-flags | |
72885a4c RW |
729 | (list (string-append "--with-ecj-jar=" |
730 | (assoc-ref %build-inputs "ecj-bootstrap") | |
731 | "/share/java/ecj-bootstrap.jar") | |
93c103ab | 732 | (string-append "--with-javac=" |
72885a4c RW |
733 | (assoc-ref %build-inputs "ecj-javac-wrapper") |
734 | "/bin/javac") | |
735 | (string-append "JAVA=" | |
736 | (assoc-ref %build-inputs "jamvm") | |
737 | "/bin/jamvm") | |
738 | "GCJ_JAVAC_TRUE=no" | |
739 | "ac_cv_prog_java_works=yes" ; trust me | |
740 | "--disable-Werror" | |
741 | "--disable-gmp" | |
742 | "--disable-gtk-peer" | |
743 | "--disable-gconf-peer" | |
744 | "--disable-plugin" | |
745 | "--disable-dssi" | |
746 | "--disable-alsa" | |
747 | "--disable-gjdoc") | |
748 | #:phases | |
749 | (modify-phases %standard-phases | |
2a69f48e RW |
750 | ;; XXX The bootstrap phase executes autogen.sh, which fails after |
751 | ;; complaining about the lack of gettext. | |
752 | (replace 'bootstrap | |
753 | (lambda _ (invoke "autoreconf" "-vif"))) | |
72885a4c RW |
754 | (add-after 'unpack 'remove-unsupported-annotations |
755 | (lambda _ | |
756 | (substitute* (find-files "java" "\\.java$") | |
757 | (("@Override") "")) | |
758 | #t)) | |
759 | (add-after 'install 'install-data | |
4c65eb43 | 760 | (lambda _ (invoke "make" "install-data")))))) |
72885a4c RW |
761 | (native-inputs |
762 | `(("autoconf" ,autoconf) | |
763 | ("automake" ,automake) | |
764 | ("libtool" ,libtool) | |
765 | ("gettext" ,gettext-minimal) | |
766 | ("texinfo" ,texinfo) | |
767 | ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah | |
768 | ("ecj-bootstrap" ,ecj-bootstrap) | |
b5a0d427 | 769 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
72885a4c | 770 | ("fastjar" ,fastjar) |
58d2b135 | 771 | ("jamvm" ,jamvm-1-bootstrap) |
72885a4c RW |
772 | ("libltdl" ,libltdl) |
773 | ("pkg-config" ,pkg-config)))))) | |
774 | ||
58d2b135 RW |
775 | (define jamvm |
776 | (package (inherit jamvm-1-bootstrap) | |
777 | (version "2.0.0") | |
778 | (source (origin | |
779 | (method url-fetch) | |
780 | (uri (string-append "mirror://sourceforge/jamvm/jamvm/" | |
781 | "JamVM%20" version "/jamvm-" | |
782 | version ".tar.gz")) | |
783 | (sha256 | |
784 | (base32 | |
cff1e095 | 785 | "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn")) |
a2120060 | 786 | (patches |
2995be77 SS |
787 | (search-patches "jamvm-2.0.0-disable-branch-patching.patch" |
788 | "jamvm-2.0.0-opcode-guard.patch" | |
789 | "jamvm-2.0.0-aarch64-support.patch")) | |
cff1e095 AŠ |
790 | (snippet |
791 | '(begin | |
792 | ;; Remove precompiled software. | |
793 | (delete-file "src/classlib/gnuclasspath/lib/classes.zip") | |
794 | #t)))) | |
58d2b135 RW |
795 | (build-system gnu-build-system) |
796 | (arguments | |
2995be77 SS |
797 | (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap) |
798 | ((#:configure-flags _) | |
799 | '(list (string-append "--with-classpath-install-dir=" | |
800 | (assoc-ref %build-inputs "classpath")))))) | |
8c6091e3 RW |
801 | (inputs |
802 | `(("classpath" ,classpath-devel) | |
b5a0d427 | 803 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
cff1e095 | 804 | ("zip" ,zip) |
8c6091e3 RW |
805 | ("zlib" ,zlib))))) |
806 | ||
b5a0d427 RW |
807 | (define ecj-javac-wrapper-final |
808 | (package (inherit ecj-javac-wrapper) | |
1bf56c72 RW |
809 | (native-inputs |
810 | `(("guile" ,guile-2.2) | |
811 | ("ecj-bootstrap" ,ecj-bootstrap) | |
812 | ("jamvm" ,jamvm) | |
813 | ("classpath" ,classpath-devel))))) | |
814 | ||
98419316 | 815 | ;; The bootstrap JDK consisting of jamvm, classpath-devel, |
b5a0d427 RW |
816 | ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's |
817 | ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x, | |
818 | ;; which uses Java 6 only. | |
98419316 RW |
819 | (define-public icedtea-6 |
820 | (package | |
821 | (name "icedtea") | |
822 | (version "1.13.13") | |
823 | (source (origin | |
824 | (method url-fetch) | |
825 | (uri (string-append | |
826 | "http://icedtea.wildebeest.org/download/source/icedtea6-" | |
827 | version ".tar.xz")) | |
828 | (sha256 | |
829 | (base32 | |
830 | "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg")) | |
2fab54f3 SS |
831 | (patches (search-patches |
832 | "icedtea-6-extend-hotspot-aarch64-support.patch")) | |
98419316 RW |
833 | (modules '((guix build utils))) |
834 | (snippet | |
6cbee49d MW |
835 | '(begin |
836 | (substitute* "Makefile.in" | |
837 | ;; do not leak information about the build host | |
838 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") | |
839 | "DISTRIBUTION_ID=\"\\\"guix\\\"\"")) | |
840 | #t)))) | |
98419316 RW |
841 | (build-system gnu-build-system) |
842 | (outputs '("out" ; Java Runtime Environment | |
843 | "jdk" ; Java Development Kit | |
844 | "doc")) ; all documentation | |
845 | (arguments | |
846 | `(;; There are many failing tests and many are known to fail upstream. | |
847 | #:tests? #f | |
848 | ||
849 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build | |
850 | ;; gremlin) doesn't support it yet, so skip this phase. | |
851 | #:validate-runpath? #f | |
852 | ||
853 | #:modules ((guix build utils) | |
854 | (guix build gnu-build-system) | |
855 | (srfi srfi-19)) | |
856 | ||
857 | #:configure-flags | |
858 | `("--enable-bootstrap" | |
859 | "--enable-nss" | |
860 | "--without-rhino" | |
31ccd551 SS |
861 | ,(string-append "--with-parallel-jobs=" |
862 | (number->string (parallel-job-count))) | |
98419316 RW |
863 | "--disable-downloading" |
864 | "--disable-tests" | |
865 | ,(string-append "--with-ecj=" | |
866 | (assoc-ref %build-inputs "ecj") | |
867 | "/share/java/ecj-bootstrap.jar") | |
868 | ,(string-append "--with-jar=" | |
869 | (assoc-ref %build-inputs "fastjar") | |
870 | "/bin/fastjar") | |
871 | ,(string-append "--with-jdk-home=" | |
872 | (assoc-ref %build-inputs "classpath")) | |
873 | ,(string-append "--with-java=" | |
874 | (assoc-ref %build-inputs "jamvm") | |
875 | "/bin/jamvm")) | |
876 | #:phases | |
877 | (modify-phases %standard-phases | |
878 | (replace 'unpack | |
879 | (lambda* (#:key source inputs #:allow-other-keys) | |
2c8ac364 MW |
880 | (invoke "tar" "xvf" source) |
881 | (chdir (string-append "icedtea6-" ,version)) | |
882 | (mkdir "openjdk") | |
883 | (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk") | |
884 | ;; The convenient OpenJDK source bundle is no longer | |
885 | ;; available for download, so we have to take the sources | |
886 | ;; from the Mercurial repositories and change the Makefile | |
887 | ;; to avoid tests for the OpenJDK zip archive. | |
888 | (with-directory-excursion "openjdk" | |
889 | (for-each (lambda (part) | |
890 | (mkdir part) | |
891 | (copy-recursively | |
892 | (assoc-ref inputs | |
893 | (string-append part "-src")) | |
894 | part)) | |
dc3c2755 | 895 | '("jdk" "hotspot" "corba" |
2c8ac364 | 896 | "langtools" "jaxp" "jaxws"))) |
306c1e61 RW |
897 | (substitute* "patches/freetypeversion.patch" |
898 | (("REQUIRED_FREETYPE_VERSION = 2.2.1") | |
899 | "REQUIRED_FREETYPE_VERSION = 2.10.1")) | |
2c8ac364 MW |
900 | (substitute* "Makefile.in" |
901 | (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;") | |
902 | "echo \"trust me\";") | |
903 | ;; The contents of the bootstrap directory must be | |
904 | ;; writeable but when copying from the store they are | |
905 | ;; not. | |
906 | (("mkdir -p lib/rt" line) | |
907 | (string-append line "; chmod -R u+w $(BOOT_DIR)"))) | |
908 | (invoke "chmod" "-R" "u+w" "openjdk"))) | |
98419316 RW |
909 | (add-after 'unpack 'use-classpath |
910 | (lambda* (#:key inputs #:allow-other-keys) | |
b5a0d427 RW |
911 | (let ((jvmlib (assoc-ref inputs "classpath")) |
912 | (jamvm (assoc-ref inputs "jamvm"))) | |
98419316 RW |
913 | ;; Classpath does not provide rt.jar. |
914 | (substitute* "Makefile.in" | |
915 | (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") | |
916 | (string-append jvmlib "/share/classpath/glibj.zip"))) | |
917 | ;; Make sure we can find all classes. | |
918 | (setenv "CLASSPATH" | |
919 | (string-append jvmlib "/share/classpath/glibj.zip:" | |
b5a0d427 RW |
920 | jvmlib "/share/classpath/tools.zip:" |
921 | jamvm "/lib/rt.jar")) | |
98419316 RW |
922 | (setenv "JAVACFLAGS" |
923 | (string-append "-cp " | |
924 | jvmlib "/share/classpath/glibj.zip:" | |
925 | jvmlib "/share/classpath/tools.zip"))) | |
926 | #t)) | |
927 | (add-after 'unpack 'patch-patches | |
928 | (lambda _ | |
929 | ;; shebang in patches so that they apply cleanly | |
930 | (substitute* '("patches/jtreg-jrunscript.patch" | |
931 | "patches/hotspot/hs23/drop_unlicensed_test.patch") | |
932 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
933 | #t)) | |
934 | (add-after 'unpack 'patch-paths | |
935 | (lambda* (#:key inputs #:allow-other-keys) | |
936 | ;; buildtree.make generates shell scripts, so we need to replace | |
937 | ;; the generated shebang | |
938 | (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make") | |
939 | (("/bin/sh") (which "bash"))) | |
940 | ||
941 | (let ((corebin (string-append | |
942 | (assoc-ref inputs "coreutils") "/bin/")) | |
943 | (binbin (string-append | |
944 | (assoc-ref inputs "binutils") "/bin/")) | |
945 | (grepbin (string-append | |
946 | (assoc-ref inputs "grep") "/bin/"))) | |
947 | (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk" | |
948 | "openjdk/corba/make/common/shared/Defs-linux.gmk") | |
949 | (("UNIXCOMMAND_PATH = /bin/") | |
950 | (string-append "UNIXCOMMAND_PATH = " corebin)) | |
951 | (("USRBIN_PATH = /usr/bin/") | |
952 | (string-append "USRBIN_PATH = " corebin)) | |
953 | (("DEVTOOLS_PATH *= */usr/bin/") | |
954 | (string-append "DEVTOOLS_PATH = " corebin)) | |
955 | (("COMPILER_PATH *= */usr/bin/") | |
956 | (string-append "COMPILER_PATH = " | |
957 | (assoc-ref inputs "gcc") "/bin/")) | |
958 | (("DEF_OBJCOPY *=.*objcopy") | |
959 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) | |
960 | ||
961 | ;; fix path to alsa header | |
962 | (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk" | |
963 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
964 | (string-append "ALSA_INCLUDE=" | |
965 | (assoc-ref inputs "alsa-lib") | |
966 | "/include/alsa/version.h"))) | |
967 | ||
968 | ;; fix hard-coded utility paths | |
969 | (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk" | |
970 | "openjdk/corba/make/common/shared/Defs-utils.gmk") | |
971 | (("ECHO *=.*echo") | |
972 | (string-append "ECHO = " (which "echo"))) | |
973 | (("^GREP *=.*grep") | |
974 | (string-append "GREP = " (which "grep"))) | |
975 | (("EGREP *=.*egrep") | |
976 | (string-append "EGREP = " (which "egrep"))) | |
977 | (("CPIO *=.*cpio") | |
978 | (string-append "CPIO = " (which "cpio"))) | |
979 | (("READELF *=.*readelf") | |
980 | (string-append "READELF = " (which "readelf"))) | |
981 | (("^ *AR *=.*ar") | |
982 | (string-append "AR = " (which "ar"))) | |
983 | (("^ *TAR *=.*tar") | |
984 | (string-append "TAR = " (which "tar"))) | |
985 | (("AS *=.*as") | |
986 | (string-append "AS = " (which "as"))) | |
987 | (("LD *=.*ld") | |
988 | (string-append "LD = " (which "ld"))) | |
989 | (("STRIP *=.*strip") | |
990 | (string-append "STRIP = " (which "strip"))) | |
991 | (("NM *=.*nm") | |
992 | (string-append "NM = " (which "nm"))) | |
993 | (("^SH *=.*sh") | |
994 | (string-append "SH = " (which "bash"))) | |
995 | (("^FIND *=.*find") | |
996 | (string-append "FIND = " (which "find"))) | |
997 | (("LDD *=.*ldd") | |
998 | (string-append "LDD = " (which "ldd"))) | |
999 | (("NAWK *=.*(n|g)awk") | |
1000 | (string-append "NAWK = " (which "gawk"))) | |
1001 | (("XARGS *=.*xargs") | |
1002 | (string-append "XARGS = " (which "xargs"))) | |
1003 | (("UNZIP *=.*unzip") | |
1004 | (string-append "UNZIP = " (which "unzip"))) | |
1005 | (("ZIPEXE *=.*zip") | |
1006 | (string-append "ZIPEXE = " (which "zip"))) | |
1007 | (("SED *=.*sed") | |
1008 | (string-append "SED = " (which "sed")))) | |
1009 | ||
1010 | ;; Some of these timestamps cause problems as they are more than | |
1011 | ;; 10 years ago, failing the build process. | |
1012 | (substitute* | |
1013 | "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties" | |
1014 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") | |
1015 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") | |
1016 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") | |
1017 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")) | |
1018 | #t))) | |
1019 | (add-before 'configure 'set-additional-paths | |
1020 | (lambda* (#:key inputs #:allow-other-keys) | |
1021 | (setenv "CPATH" | |
1022 | (string-append (assoc-ref inputs "libxrender") | |
1023 | "/include/X11/extensions" ":" | |
1024 | (assoc-ref inputs "libxtst") | |
1025 | "/include/X11/extensions" ":" | |
1026 | (assoc-ref inputs "libxinerama") | |
1027 | "/include/X11/extensions" ":" | |
1028 | (or (getenv "CPATH") ""))) | |
1029 | (setenv "ALT_CUPS_HEADERS_PATH" | |
1030 | (string-append (assoc-ref inputs "cups") | |
1031 | "/include")) | |
1032 | (setenv "ALT_FREETYPE_HEADERS_PATH" | |
1033 | (string-append (assoc-ref inputs "freetype") | |
1034 | "/include")) | |
1035 | (setenv "ALT_FREETYPE_LIB_PATH" | |
1036 | (string-append (assoc-ref inputs "freetype") | |
1037 | "/lib")) | |
1038 | #t)) | |
0bc11cc7 GB |
1039 | (add-before 'build 'disable-os-version-check |
1040 | ;; allow build on linux major version change | |
1041 | (lambda _ | |
1042 | (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok") | |
1043 | #t)) | |
98419316 RW |
1044 | (replace 'install |
1045 | (lambda* (#:key outputs #:allow-other-keys) | |
1046 | (let ((doc (string-append (assoc-ref outputs "doc") | |
1047 | "/share/doc/icedtea")) | |
1048 | (jre (assoc-ref outputs "out")) | |
1049 | (jdk (assoc-ref outputs "jdk"))) | |
1050 | (copy-recursively "openjdk.build/docs" doc) | |
1051 | (copy-recursively "openjdk.build/j2re-image" jre) | |
1052 | (copy-recursively "openjdk.build/j2sdk-image" jdk)) | |
1053 | #t))))) | |
1054 | (native-inputs | |
1055 | `(("ant" ,ant-bootstrap) | |
1056 | ("alsa-lib" ,alsa-lib) | |
1057 | ("attr" ,attr) | |
1058 | ("classpath" ,classpath-devel) | |
1059 | ("coreutils" ,coreutils) | |
1060 | ("cpio" ,cpio) | |
1061 | ("cups" ,cups) | |
1062 | ("ecj" ,ecj-bootstrap) | |
b5a0d427 | 1063 | ("ecj-javac" ,ecj-javac-wrapper-final) |
98419316 RW |
1064 | ("fastjar" ,fastjar) |
1065 | ("fontconfig" ,fontconfig) | |
1066 | ("freetype" ,freetype) | |
1067 | ("gtk" ,gtk+-2) | |
1068 | ("gawk" ,gawk) | |
1069 | ("giflib" ,giflib) | |
1070 | ("grep" ,grep) | |
1071 | ("jamvm" ,jamvm) | |
1072 | ("lcms" ,lcms) | |
4bd428a7 | 1073 | ("libjpeg" ,libjpeg-turbo) |
bcb078a4 | 1074 | ("libnsl" ,libnsl) |
98419316 RW |
1075 | ("libpng" ,libpng) |
1076 | ("libtool" ,libtool) | |
1077 | ("libx11" ,libx11) | |
1078 | ("libxcomposite" ,libxcomposite) | |
1079 | ("libxi" ,libxi) | |
1080 | ("libxinerama" ,libxinerama) | |
1081 | ("libxrender" ,libxrender) | |
1082 | ("libxslt" ,libxslt) ;for xsltproc | |
1083 | ("libxt" ,libxt) | |
1084 | ("libxtst" ,libxtst) | |
1085 | ("mit-krb5" ,mit-krb5) | |
1086 | ("nss" ,nss) | |
1087 | ("nss-certs" ,nss-certs) | |
1088 | ("perl" ,perl) | |
1089 | ("pkg-config" ,pkg-config) | |
1090 | ("procps" ,procps) ;for "free", even though I'm not sure we should use it | |
1091 | ("unzip" ,unzip) | |
1092 | ("wget" ,wget) | |
1093 | ("which" ,which) | |
1094 | ("zip" ,zip) | |
1095 | ("zlib" ,zlib) | |
1096 | ("openjdk-src" | |
1097 | ,(origin | |
1098 | (method hg-fetch) | |
1099 | (uri (hg-reference | |
1100 | (url "http://hg.openjdk.java.net/jdk6/jdk6/") | |
1101 | (changeset "jdk6-b41"))) | |
1102 | (sha256 | |
1103 | (base32 | |
1104 | "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv")))) | |
1105 | ("jdk-src" | |
1106 | ,(origin | |
1107 | (method hg-fetch) | |
1108 | (uri (hg-reference | |
1109 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/") | |
1110 | (changeset "jdk6-b41"))) | |
1111 | (sha256 | |
1112 | (base32 | |
1113 | "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9")))) | |
1114 | ("hotspot-src" | |
1115 | ,(origin | |
1116 | (method hg-fetch) | |
1117 | (uri (hg-reference | |
1118 | (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/") | |
1119 | (changeset "jdk6-b41"))) | |
1120 | (sha256 | |
1121 | (base32 | |
dc3c2755 | 1122 | "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd")))) |
98419316 RW |
1123 | ("corba-src" |
1124 | ,(origin | |
1125 | (method hg-fetch) | |
1126 | (uri (hg-reference | |
1127 | (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/") | |
1128 | (changeset "jdk6-b41"))) | |
1129 | (sha256 | |
1130 | (base32 | |
1131 | "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q")))) | |
1132 | ("langtools-src" | |
1133 | ,(origin | |
1134 | (method hg-fetch) | |
1135 | (uri (hg-reference | |
1136 | (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/") | |
1137 | (changeset "jdk6-b41"))) | |
1138 | (sha256 | |
1139 | (base32 | |
1140 | "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d")))) | |
1141 | ("jaxp-src" | |
1142 | ,(origin | |
1143 | (method hg-fetch) | |
1144 | (uri (hg-reference | |
1145 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/") | |
1146 | (changeset "jdk6-b41"))) | |
1147 | (sha256 | |
1148 | (base32 | |
1149 | "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm")))) | |
1150 | ("jaxws-src" | |
1151 | ,(origin | |
1152 | (method hg-fetch) | |
1153 | (uri (hg-reference | |
1154 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/") | |
1155 | (changeset "jdk6-b41"))) | |
1156 | (sha256 | |
1157 | (base32 | |
1158 | "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0")))))) | |
1159 | (home-page "http://icedtea.classpath.org") | |
1160 | (synopsis "Java development kit") | |
1161 | (description | |
1162 | "This package provides the OpenJDK built with the IcedTea build harness. | |
1163 | This version of the OpenJDK is no longer maintained and is only used for | |
1164 | bootstrapping purposes.") | |
1165 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the | |
1166 | ;; same license as both GNU Classpath and OpenJDK. | |
1167 | (license license:gpl2+))) | |
1168 | ||
a243e12a | 1169 | (define-public icedtea-7 |
7f6485e7 | 1170 | (let* ((version "2.6.13") |
f6789047 RW |
1171 | (drop (lambda (name hash) |
1172 | (origin | |
1173 | (method url-fetch) | |
1174 | (uri (string-append | |
d30ce4a7 | 1175 | "http://icedtea.classpath.org/download/drops" |
f6789047 RW |
1176 | "/icedtea7/" version "/" name ".tar.bz2")) |
1177 | (sha256 (base32 hash)))))) | |
71053e14 RW |
1178 | (package |
1179 | (name "icedtea") | |
f6789047 RW |
1180 | (version version) |
1181 | (source (origin | |
1182 | (method url-fetch) | |
1183 | (uri (string-append | |
1184 | "http://icedtea.wildebeest.org/download/source/icedtea-" | |
1185 | version ".tar.xz")) | |
1186 | (sha256 | |
1187 | (base32 | |
7f6485e7 | 1188 | "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh")) |
f6789047 RW |
1189 | (modules '((guix build utils))) |
1190 | (snippet | |
6cbee49d MW |
1191 | '(begin |
1192 | (substitute* "Makefile.in" | |
1193 | ;; do not leak information about the build host | |
1194 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") | |
1195 | "DISTRIBUTION_ID=\"\\\"guix\\\"\"")) | |
1196 | #t)))) | |
71053e14 RW |
1197 | (build-system gnu-build-system) |
1198 | (outputs '("out" ; Java Runtime Environment | |
1199 | "jdk" ; Java Development Kit | |
1200 | "doc")) ; all documentation | |
f6789047 RW |
1201 | (arguments |
1202 | `(;; There are many test failures. Some are known to | |
1203 | ;; fail upstream, others relate to not having an X | |
1204 | ;; server running at test time, yet others are a | |
1205 | ;; complete mystery to me. | |
1206 | ||
1207 | ;; hotspot: passed: 241; failed: 45; error: 2 | |
1208 | ;; langtools: passed: 1,934; failed: 26 | |
1209 | ;; jdk: unknown | |
1210 | #:tests? #f | |
71053e14 RW |
1211 | |
1212 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build | |
1213 | ;; gremlin) doesn't support it yet, so skip this phase. | |
1214 | #:validate-runpath? #f | |
1215 | ||
f6789047 RW |
1216 | ;; Apparently, the C locale is needed for some of the tests. |
1217 | #:locale "C" | |
71053e14 RW |
1218 | |
1219 | #:modules ((guix build utils) | |
1220 | (guix build gnu-build-system) | |
1221 | (ice-9 match) | |
1222 | (ice-9 popen) | |
71053e14 RW |
1223 | (srfi srfi-19) |
1224 | (srfi srfi-26)) | |
1225 | ||
1226 | #:configure-flags | |
e2098e2d RW |
1227 | ;; TODO: package pcsc and sctp, and add to inputs |
1228 | `("--disable-system-pcsc" | |
1229 | "--disable-system-sctp" | |
1230 | "--enable-bootstrap" | |
1231 | "--enable-nss" | |
1232 | "--without-rhino" | |
e3b91b79 SS |
1233 | ,(string-append "--with-parallel-jobs=" |
1234 | (number->string (parallel-job-count))) | |
e2098e2d RW |
1235 | "--disable-downloading" |
1236 | "--disable-tests" ;they are run in the check phase instead | |
1237 | "--with-openjdk-src-dir=./openjdk.src" | |
1238 | ,(string-append "--with-jdk-home=" | |
1239 | (assoc-ref %build-inputs "jdk"))) | |
71053e14 RW |
1240 | |
1241 | #:phases | |
1242 | (modify-phases %standard-phases | |
1243 | (replace 'unpack | |
1244 | (lambda* (#:key source inputs #:allow-other-keys) | |
1245 | (let ((target (string-append "icedtea-" ,version)) | |
1246 | (unpack (lambda* (name #:optional dir) | |
1247 | (let ((dir (or dir | |
1248 | (string-drop-right name 5)))) | |
1249 | (mkdir dir) | |
2c8ac364 MW |
1250 | (invoke "tar" "xvf" |
1251 | (assoc-ref inputs name) | |
1252 | "-C" dir | |
1253 | "--strip-components=1"))))) | |
71053e14 | 1254 | (mkdir target) |
2c8ac364 MW |
1255 | (invoke "tar" "xvf" source |
1256 | "-C" target "--strip-components=1") | |
1257 | (chdir target) | |
1258 | (unpack "openjdk-src" "openjdk.src") | |
1259 | (with-directory-excursion "openjdk.src" | |
1260 | (for-each unpack | |
1261 | (filter (cut string-suffix? "-drop" <>) | |
1262 | (map (match-lambda | |
1263 | ((name . _) name)) | |
1264 | inputs)))) | |
1265 | #t))) | |
6b7e09ae RW |
1266 | (add-after 'unpack 'patch-bitrot |
1267 | (lambda _ | |
1268 | (substitute* '("patches/boot/revert-6973616.patch" | |
1269 | "openjdk.src/jdk/make/common/shared/Defs-versions.gmk") | |
1270 | (("REQUIRED_FREETYPE_VERSION = 2.2.1") | |
1271 | "REQUIRED_FREETYPE_VERSION = 2.10.1")) | |
1272 | ;; As of attr 2.4.48 this header is no longer | |
1273 | ;; included. It is provided by the libc instead. | |
1274 | (substitute* '("configure" | |
1275 | "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c") | |
1276 | (("attr/xattr.h") "sys/xattr.h")) | |
1277 | #t)) | |
71053e14 RW |
1278 | (add-after 'unpack 'fix-x11-extension-include-path |
1279 | (lambda* (#:key inputs #:allow-other-keys) | |
1280 | (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk" | |
1281 | (((string-append "\\$\\(firstword \\$\\(wildcard " | |
1282 | "\\$\\(OPENWIN_HOME\\)" | |
1283 | "/include/X11/extensions\\).*$")) | |
1284 | (string-append (assoc-ref inputs "libxrender") | |
1285 | "/include/X11/extensions" | |
1286 | " -I" (assoc-ref inputs "libxtst") | |
1287 | "/include/X11/extensions" | |
1288 | " -I" (assoc-ref inputs "libxinerama") | |
1289 | "/include/X11/extensions")) | |
1290 | (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") "")) | |
1291 | #t)) | |
1292 | (add-after 'unpack 'patch-paths | |
1293 | (lambda _ | |
1294 | ;; buildtree.make generates shell scripts, so we need to replace | |
1295 | ;; the generated shebang | |
1296 | (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make") | |
1297 | (("/bin/sh") (which "bash"))) | |
1298 | ||
1299 | (let ((corebin (string-append | |
1300 | (assoc-ref %build-inputs "coreutils") "/bin/")) | |
1301 | (binbin (string-append | |
1302 | (assoc-ref %build-inputs "binutils") "/bin/")) | |
1303 | (grepbin (string-append | |
1304 | (assoc-ref %build-inputs "grep") "/bin/"))) | |
1305 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk" | |
1306 | "openjdk.src/corba/make/common/shared/Defs-linux.gmk") | |
1307 | (("UNIXCOMMAND_PATH = /bin/") | |
1308 | (string-append "UNIXCOMMAND_PATH = " corebin)) | |
1309 | (("USRBIN_PATH = /usr/bin/") | |
1310 | (string-append "USRBIN_PATH = " corebin)) | |
1311 | (("DEVTOOLS_PATH *= */usr/bin/") | |
1312 | (string-append "DEVTOOLS_PATH = " corebin)) | |
1313 | (("COMPILER_PATH *= */usr/bin/") | |
1314 | (string-append "COMPILER_PATH = " | |
1315 | (assoc-ref %build-inputs "gcc") "/bin/")) | |
1316 | (("DEF_OBJCOPY *=.*objcopy") | |
1317 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) | |
1318 | ||
1319 | ;; fix path to alsa header | |
1320 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" | |
1321 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
1322 | (string-append "ALSA_INCLUDE=" | |
1323 | (assoc-ref %build-inputs "alsa-lib") | |
1324 | "/include/alsa/version.h"))) | |
1325 | ||
1326 | ;; fix hard-coded utility paths | |
1327 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk" | |
1328 | "openjdk.src/corba/make/common/shared/Defs-utils.gmk") | |
1329 | (("ECHO *=.*echo") | |
1330 | (string-append "ECHO = " (which "echo"))) | |
1331 | (("^GREP *=.*grep") | |
1332 | (string-append "GREP = " (which "grep"))) | |
1333 | (("EGREP *=.*egrep") | |
1334 | (string-append "EGREP = " (which "egrep"))) | |
1335 | (("CPIO *=.*cpio") | |
1336 | (string-append "CPIO = " (which "cpio"))) | |
1337 | (("READELF *=.*readelf") | |
1338 | (string-append "READELF = " (which "readelf"))) | |
1339 | (("^ *AR *=.*ar") | |
1340 | (string-append "AR = " (which "ar"))) | |
1341 | (("^ *TAR *=.*tar") | |
1342 | (string-append "TAR = " (which "tar"))) | |
1343 | (("AS *=.*as") | |
1344 | (string-append "AS = " (which "as"))) | |
1345 | (("LD *=.*ld") | |
1346 | (string-append "LD = " (which "ld"))) | |
1347 | (("STRIP *=.*strip") | |
1348 | (string-append "STRIP = " (which "strip"))) | |
1349 | (("NM *=.*nm") | |
1350 | (string-append "NM = " (which "nm"))) | |
1351 | (("^SH *=.*sh") | |
1352 | (string-append "SH = " (which "bash"))) | |
1353 | (("^FIND *=.*find") | |
1354 | (string-append "FIND = " (which "find"))) | |
1355 | (("LDD *=.*ldd") | |
1356 | (string-append "LDD = " (which "ldd"))) | |
1357 | (("NAWK *=.*(n|g)awk") | |
1358 | (string-append "NAWK = " (which "gawk"))) | |
1359 | (("XARGS *=.*xargs") | |
1360 | (string-append "XARGS = " (which "xargs"))) | |
1361 | (("UNZIP *=.*unzip") | |
1362 | (string-append "UNZIP = " (which "unzip"))) | |
1363 | (("ZIPEXE *=.*zip") | |
1364 | (string-append "ZIPEXE = " (which "zip"))) | |
1365 | (("SED *=.*sed") | |
1366 | (string-append "SED = " (which "sed")))) | |
1367 | ||
1368 | ;; Some of these timestamps cause problems as they are more than | |
1369 | ;; 10 years ago, failing the build process. | |
1370 | (substitute* | |
1371 | "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties" | |
1372 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") | |
1373 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") | |
1374 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") | |
1375 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))) | |
1376 | #t)) | |
1377 | (add-before 'configure 'set-additional-paths | |
1378 | (lambda* (#:key inputs #:allow-other-keys) | |
e2098e2d RW |
1379 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" |
1380 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
1381 | (string-append "ALSA_INCLUDE=" | |
1382 | (assoc-ref inputs "alsa-lib") | |
1383 | "/include/alsa/version.h"))) | |
1384 | (setenv "CC" "gcc") | |
1385 | (setenv "CPATH" | |
1386 | (string-append (assoc-ref inputs "libxcomposite") | |
1387 | "/include/X11/extensions" ":" | |
1388 | (assoc-ref inputs "libxrender") | |
1389 | "/include/X11/extensions" ":" | |
1390 | (assoc-ref inputs "libxtst") | |
1391 | "/include/X11/extensions" ":" | |
1392 | (assoc-ref inputs "libxinerama") | |
1393 | "/include/X11/extensions" ":" | |
1394 | (or (getenv "CPATH") ""))) | |
1395 | (setenv "ALT_OBJCOPY" (which "objcopy")) | |
1396 | (setenv "ALT_CUPS_HEADERS_PATH" | |
1397 | (string-append (assoc-ref inputs "cups") | |
1398 | "/include")) | |
1399 | (setenv "ALT_FREETYPE_HEADERS_PATH" | |
1400 | (string-append (assoc-ref inputs "freetype") | |
1401 | "/include")) | |
1402 | (setenv "ALT_FREETYPE_LIB_PATH" | |
1403 | (string-append (assoc-ref inputs "freetype") | |
1404 | "/lib")) | |
71053e14 | 1405 | #t)) |
59199e1a GB |
1406 | (add-before 'build 'disable-os-version-check |
1407 | ;; allow build on linux major version change | |
1408 | (lambda _ | |
1409 | (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok") | |
1410 | #t)) | |
71053e14 RW |
1411 | (add-before 'check 'fix-test-framework |
1412 | (lambda _ | |
1413 | ;; Fix PATH in test environment | |
1414 | (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java" | |
1415 | (("PATH=/bin:/usr/bin") | |
1416 | (string-append "PATH=" (getenv "PATH")))) | |
1417 | (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java" | |
1418 | (("/usr/bin/env") (which "env"))) | |
1419 | (substitute* "openjdk.src/hotspot/test/test_env.sh" | |
1420 | (("/bin/rm") (which "rm")) | |
1421 | (("/bin/cp") (which "cp")) | |
1422 | (("/bin/mv") (which "mv"))) | |
1423 | #t)) | |
1424 | (add-before 'check 'fix-hotspot-tests | |
1425 | (lambda _ | |
1426 | (with-directory-excursion "openjdk.src/hotspot/test/" | |
1427 | (substitute* "jprt.config" | |
1428 | (("PATH=\"\\$\\{path4sdk\\}\"") | |
1429 | (string-append "PATH=" (getenv "PATH"))) | |
1430 | (("make=/usr/bin/make") | |
1431 | (string-append "make=" (which "make")))) | |
1432 | (substitute* '("runtime/6626217/Test6626217.sh" | |
1433 | "runtime/7110720/Test7110720.sh") | |
1434 | (("/bin/rm") (which "rm")) | |
1435 | (("/bin/cp") (which "cp")) | |
1436 | (("/bin/mv") (which "mv")))) | |
1437 | #t)) | |
1438 | (add-before 'check 'fix-jdk-tests | |
1439 | (lambda _ | |
1440 | (with-directory-excursion "openjdk.src/jdk/test/" | |
1441 | (substitute* "com/sun/jdi/JdbReadTwiceTest.sh" | |
1442 | (("/bin/pwd") (which "pwd"))) | |
1443 | (substitute* "com/sun/jdi/ShellScaffold.sh" | |
1444 | (("/bin/kill") (which "kill"))) | |
1445 | (substitute* "start-Xvfb.sh" | |
1446 | ;;(("/usr/bin/X11/Xvfb") (which "Xvfb")) | |
1447 | (("/usr/bin/nohup") (which "nohup"))) | |
1448 | (substitute* "javax/security/auth/Subject/doAs/Test.sh" | |
1449 | (("/bin/rm") (which "rm"))) | |
1450 | (substitute* "tools/launcher/MultipleJRE.sh" | |
1451 | (("echo \"#!/bin/sh\"") | |
1452 | (string-append "echo \"#!" (which "rm") "\"")) | |
1453 | (("/usr/bin/zip") (which "zip"))) | |
1454 | (substitute* "com/sun/jdi/OnThrowTest.java" | |
1455 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
1456 | (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java" | |
1457 | (("/usr/bin/uptime") (which "uptime"))) | |
1458 | (substitute* "java/lang/ProcessBuilder/Basic.java" | |
1459 | (("/usr/bin/env") (which "env")) | |
1460 | (("/bin/false") (which "false")) | |
1461 | (("/bin/true") (which "true")) | |
1462 | (("/bin/cp") (which "cp")) | |
1463 | (("/bin/sh") (which "sh"))) | |
1464 | (substitute* "java/lang/ProcessBuilder/FeelingLucky.java" | |
1465 | (("/bin/sh") (which "sh"))) | |
1466 | (substitute* "java/lang/ProcessBuilder/Zombies.java" | |
1467 | (("/usr/bin/perl") (which "perl")) | |
1468 | (("/bin/ps") (which "ps")) | |
1469 | (("/bin/true") (which "true"))) | |
1470 | (substitute* "java/lang/Runtime/exec/ConcurrentRead.java" | |
1471 | (("/usr/bin/tee") (which "tee"))) | |
1472 | (substitute* "java/lang/Runtime/exec/ExecWithDir.java" | |
1473 | (("/bin/true") (which "true"))) | |
1474 | (substitute* "java/lang/Runtime/exec/ExecWithInput.java" | |
1475 | (("/bin/cat") (which "cat"))) | |
1476 | (substitute* "java/lang/Runtime/exec/ExitValue.java" | |
1477 | (("/bin/sh") (which "sh")) | |
1478 | (("/bin/true") (which "true")) | |
1479 | (("/bin/kill") (which "kill"))) | |
1480 | (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java" | |
1481 | (("/usr/bin/echo") (which "echo"))) | |
1482 | (substitute* "java/lang/Runtime/exec/LotsOfOutput.java" | |
1483 | (("/usr/bin/cat") (which "cat"))) | |
1484 | (substitute* "java/lang/Runtime/exec/SleepyCat.java" | |
1485 | (("/bin/cat") (which "cat")) | |
1486 | (("/bin/sleep") (which "sleep")) | |
1487 | (("/bin/sh") (which "sh"))) | |
1488 | (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java" | |
1489 | (("/bin/cat") (which "cat"))) | |
1490 | (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java" | |
1491 | (("/bin/chmod") (which "chmod"))) | |
1492 | (substitute* "java/util/zip/ZipFile/Assortment.java" | |
1493 | (("/bin/sh") (which "sh")))) | |
1494 | #t)) | |
1495 | (replace 'check | |
1496 | (lambda _ | |
1497 | ;; The "make check-*" targets always return zero, so we need to | |
1498 | ;; check for errors in the associated log files to determine | |
1499 | ;; whether any tests have failed. | |
1500 | (use-modules (ice-9 rdelim)) | |
1501 | (let* ((error-pattern (make-regexp "^(Error|FAILED):.*")) | |
1502 | (checker (lambda (port) | |
1503 | (let loop () | |
1504 | (let ((line (read-line port))) | |
1505 | (cond | |
1506 | ((eof-object? line) #t) | |
2c8ac364 MW |
1507 | ((regexp-exec error-pattern line) |
1508 | (error "test failed")) | |
71053e14 RW |
1509 | (else (loop))))))) |
1510 | (run-test (lambda (test) | |
2c8ac364 | 1511 | (invoke "make" test) |
71053e14 RW |
1512 | (call-with-input-file |
1513 | (string-append "test/" test ".log") | |
1514 | checker)))) | |
2c8ac364 MW |
1515 | (when #f ; skip tests |
1516 | (run-test "check-hotspot") | |
1517 | (run-test "check-langtools") | |
fa41a089 MW |
1518 | (run-test "check-jdk")) |
1519 | #t))) | |
71053e14 RW |
1520 | (replace 'install |
1521 | (lambda* (#:key outputs #:allow-other-keys) | |
1522 | (let ((doc (string-append (assoc-ref outputs "doc") | |
1523 | "/share/doc/icedtea")) | |
1524 | (jre (assoc-ref outputs "out")) | |
1525 | (jdk (assoc-ref outputs "jdk"))) | |
1526 | (copy-recursively "openjdk.build/docs" doc) | |
1527 | (copy-recursively "openjdk.build/j2re-image" jre) | |
1528 | (copy-recursively "openjdk.build/j2sdk-image" jdk)) | |
1529 | #t)) | |
491dc2fb RJ |
1530 | ;; Some of the libraries in the lib/amd64 folder link to libjvm.so. |
1531 | ;; But that shared object is located in the server/ folder, so it | |
1532 | ;; cannot be found. This phase creates a symbolic link in the | |
1533 | ;; lib/amd64 folder so that the other libraries can find it. | |
1534 | ;; | |
1535 | ;; See: | |
1536 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html | |
1537 | ;; | |
1538 | ;; FIXME: Find the bug in the build system, so that this symlink is | |
1539 | ;; not needed. | |
1540 | (add-after 'install 'install-libjvm | |
1541 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1542 | (let* ((lib-path (string-append (assoc-ref outputs "out") | |
d3e22bcc LC |
1543 | ;; See 'INSTALL_ARCH_DIR' in |
1544 | ;; 'configure'. | |
1b6f99ea RW |
1545 | ,(match (%current-system) |
1546 | ("i686-linux" | |
048d21a8 | 1547 | "/lib/i386") |
1b6f99ea | 1548 | ("x86_64-linux" |
048d21a8 | 1549 | "/lib/amd64") |
d3e22bcc | 1550 | ("armhf-linux" |
048d21a8 | 1551 | "/lib/arm") |
d3e22bcc | 1552 | ("aarch64-linux" |
41763008 EF |
1553 | "/lib/aarch64") |
1554 | ;; We need a catch-all, dropping | |
1555 | ;; '-linux' works in most cases. | |
1556 | (_ | |
1557 | (string-append | |
1558 | "/lib/" | |
1559 | (string-drop-right | |
1560 | (%current-system) 6))))))) | |
491dc2fb RJ |
1561 | (symlink (string-append lib-path "/server/libjvm.so") |
1562 | (string-append lib-path "/libjvm.so"))) | |
1563 | #t)) | |
71053e14 RW |
1564 | ;; By default IcedTea only generates an empty keystore. In order to |
1565 | ;; be able to use certificates in Java programs we need to generate a | |
1566 | ;; keystore from a set of certificates. For convenience we use the | |
1567 | ;; certificates from the nss-certs package. | |
1568 | (add-after 'install 'install-keystore | |
1569 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1570 | (let* ((keystore "cacerts") | |
1571 | (certs-dir (string-append (assoc-ref inputs "nss-certs") | |
1572 | "/etc/ssl/certs")) | |
1573 | (keytool (string-append (assoc-ref outputs "jdk") | |
1574 | "/bin/keytool"))) | |
1575 | (define (extract-cert file target) | |
1576 | (call-with-input-file file | |
1577 | (lambda (in) | |
1578 | (call-with-output-file target | |
1579 | (lambda (out) | |
1580 | (let loop ((line (read-line in 'concat)) | |
1581 | (copying? #f)) | |
1582 | (cond | |
1583 | ((eof-object? line) #t) | |
1584 | ((string-prefix? "-----BEGIN" line) | |
1585 | (display line out) | |
1586 | (loop (read-line in 'concat) #t)) | |
1587 | ((string-prefix? "-----END" line) | |
1588 | (display line out) | |
1589 | #t) | |
1590 | (else | |
1591 | (when copying? (display line out)) | |
1592 | (loop (read-line in 'concat) copying?))))))))) | |
1593 | (define (import-cert cert) | |
1594 | (format #t "Importing certificate ~a\n" (basename cert)) | |
1595 | (let ((temp "tmpcert")) | |
1596 | (extract-cert cert temp) | |
1597 | (let ((port (open-pipe* OPEN_WRITE keytool | |
1598 | "-import" | |
1599 | "-alias" (basename cert) | |
1600 | "-keystore" keystore | |
1601 | "-storepass" "changeit" | |
1602 | "-file" temp))) | |
1603 | (display "yes\n" port) | |
1604 | (when (not (zero? (status:exit-val (close-pipe port)))) | |
1605 | (format #t "failed to import ~a\n" cert))) | |
1606 | (delete-file temp))) | |
1607 | ||
1608 | ;; This is necessary because the certificate directory contains | |
1609 | ;; files with non-ASCII characters in their names. | |
1610 | (setlocale LC_ALL "en_US.utf8") | |
1611 | (setenv "LC_ALL" "en_US.utf8") | |
1612 | ||
1613 | (for-each import-cert (find-files certs-dir "\\.pem$")) | |
1614 | (mkdir-p (string-append (assoc-ref outputs "out") | |
1615 | "/lib/security")) | |
1616 | (mkdir-p (string-append (assoc-ref outputs "jdk") | |
1617 | "/jre/lib/security")) | |
1618 | ||
1619 | ;; The cacerts files we are going to overwrite are chmod'ed as | |
1620 | ;; read-only (444) in icedtea-8 (which derives from this | |
1621 | ;; package). We have to change this so we can overwrite them. | |
1622 | (chmod (string-append (assoc-ref outputs "out") | |
1623 | "/lib/security/" keystore) #o644) | |
1624 | (chmod (string-append (assoc-ref outputs "jdk") | |
1625 | "/jre/lib/security/" keystore) #o644) | |
1626 | ||
1627 | (install-file keystore | |
1628 | (string-append (assoc-ref outputs "out") | |
1629 | "/lib/security")) | |
1630 | (install-file keystore | |
1631 | (string-append (assoc-ref outputs "jdk") | |
1632 | "/jre/lib/security")) | |
1633 | #t)))))) | |
f6789047 | 1634 | (native-inputs |
d9148890 | 1635 | `(("openjdk-src" |
f6789047 | 1636 | ,(drop "openjdk" |
7f6485e7 | 1637 | "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l")) |
f6789047 RW |
1638 | ("corba-drop" |
1639 | ,(drop "corba" | |
7f6485e7 | 1640 | "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz")) |
f6789047 RW |
1641 | ("jaxp-drop" |
1642 | ,(drop "jaxp" | |
7f6485e7 | 1643 | "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl")) |
f6789047 RW |
1644 | ("jaxws-drop" |
1645 | ,(drop "jaxws" | |
7f6485e7 | 1646 | "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk")) |
f6789047 RW |
1647 | ("jdk-drop" |
1648 | ,(drop "jdk" | |
7f6485e7 | 1649 | "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd")) |
f6789047 RW |
1650 | ("langtools-drop" |
1651 | ,(drop "langtools" | |
7f6485e7 | 1652 | "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj")) |
f6789047 | 1653 | ("hotspot-drop" |
db024183 GB |
1654 | ,(origin |
1655 | (method url-fetch) | |
1656 | (uri (string-append | |
1657 | "http://icedtea.classpath.org/downloads/drops" | |
1658 | "/icedtea7/" version "/hotspot.tar.bz2")) | |
1659 | (sha256 | |
1660 | (base32 | |
1661 | "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws")) | |
1662 | (patches (search-patches | |
672ac095 | 1663 | "icedtea-7-hotspot-aarch64-use-c++98.patch")))) |
e2098e2d | 1664 | ("ant" ,ant-bootstrap) |
71053e14 | 1665 | ("attr" ,attr) |
71053e14 RW |
1666 | ("coreutils" ,coreutils) |
1667 | ("diffutils" ,diffutils) ;for tests | |
1668 | ("gawk" ,gawk) | |
1669 | ("grep" ,grep) | |
1670 | ("libtool" ,libtool) | |
1671 | ("pkg-config" ,pkg-config) | |
1672 | ("wget" ,wget) | |
1673 | ("which" ,which) | |
1674 | ("cpio" ,cpio) | |
1675 | ("zip" ,zip) | |
1676 | ("unzip" ,unzip) | |
1677 | ("fastjar" ,fastjar) | |
1678 | ("libxslt" ,libxslt) ;for xsltproc | |
1679 | ("nss-certs" ,nss-certs) | |
1680 | ("perl" ,perl) | |
1681 | ("procps" ,procps) ;for "free", even though I'm not sure we should use it | |
e2098e2d | 1682 | ("jdk" ,icedtea-6 "jdk"))) |
b711df02 | 1683 | (inputs |
71053e14 RW |
1684 | `(("alsa-lib" ,alsa-lib) |
1685 | ("cups" ,cups) | |
1686 | ("libx11" ,libx11) | |
1687 | ("libxcomposite" ,libxcomposite) | |
1688 | ("libxt" ,libxt) | |
1689 | ("libxtst" ,libxtst) | |
1690 | ("libxi" ,libxi) | |
1691 | ("libxinerama" ,libxinerama) | |
1692 | ("libxrender" ,libxrender) | |
4bd428a7 | 1693 | ("libjpeg" ,libjpeg-turbo) |
71053e14 RW |
1694 | ("libpng" ,libpng) |
1695 | ("mit-krb5" ,mit-krb5) | |
1696 | ("nss" ,nss) | |
1697 | ("giflib" ,giflib) | |
1698 | ("fontconfig" ,fontconfig) | |
1699 | ("freetype" ,freetype) | |
1700 | ("lcms" ,lcms) | |
1701 | ("zlib" ,zlib) | |
1702 | ("gtk" ,gtk+-2))) | |
1703 | (home-page "http://icedtea.classpath.org") | |
1704 | (synopsis "Java development kit") | |
1705 | (description | |
1706 | "This package provides the Java development kit OpenJDK built with the | |
1707 | IcedTea build harness.") | |
d3e22bcc LC |
1708 | |
1709 | ;; 'configure' lists "mips" and "mipsel", but not "mips64el'. | |
1710 | (supported-systems (delete "mips64el-linux" %supported-systems)) | |
1711 | ||
71053e14 RW |
1712 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the |
1713 | ;; same license as both GNU Classpath and OpenJDK. | |
1714 | (license license:gpl2+)))) | |
d2540f80 | 1715 | |
349a3147 | 1716 | (define-public icedtea-8 |
1d97d8ff | 1717 | (let* ((version "3.7.0") |
349a3147 RW |
1718 | (drop (lambda (name hash) |
1719 | (origin | |
1720 | (method url-fetch) | |
1721 | (uri (string-append | |
db531f73 | 1722 | "http://icedtea.classpath.org/download/drops" |
349a3147 RW |
1723 | "/icedtea8/" version "/" name ".tar.xz")) |
1724 | (sha256 (base32 hash)))))) | |
1725 | (package (inherit icedtea-7) | |
1d97d8ff | 1726 | (version "3.7.0") |
349a3147 RW |
1727 | (source (origin |
1728 | (method url-fetch) | |
1729 | (uri (string-append | |
1730 | "http://icedtea.wildebeest.org/download/source/icedtea-" | |
1731 | version ".tar.xz")) | |
1732 | (sha256 | |
1733 | (base32 | |
1d97d8ff | 1734 | "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w")) |
349a3147 RW |
1735 | (modules '((guix build utils))) |
1736 | (snippet | |
0c729ef4 | 1737 | '(begin |
f2785bd6 RW |
1738 | (substitute* '("configure" |
1739 | "acinclude.m4") | |
0c729ef4 RW |
1740 | ;; Do not embed build time |
1741 | (("(DIST_ID=\"Custom build).*$" _ prefix) | |
1742 | (string-append prefix "\"\n")) | |
1743 | ;; Do not leak information about the build host | |
1744 | (("DIST_NAME=\"\\$build_os\"") | |
1745 | "DIST_NAME=\"guix\"")) | |
1746 | #t)))) | |
349a3147 | 1747 | (arguments |
f2785bd6 RW |
1748 | `(#:imported-modules |
1749 | ((guix build ant-build-system) | |
1750 | (guix build syscalls) | |
1751 | ,@%gnu-build-system-modules) | |
1752 | ,@(substitute-keyword-arguments (package-arguments icedtea-7) | |
1753 | ((#:modules modules) | |
1754 | `((guix build utils) | |
1755 | (guix build gnu-build-system) | |
1756 | ((guix build ant-build-system) #:prefix ant:) | |
1757 | (ice-9 match) | |
1758 | (ice-9 popen) | |
1759 | (srfi srfi-19) | |
1760 | (srfi srfi-26))) | |
1761 | ((#:configure-flags flags) | |
1762 | `(let ((jdk (assoc-ref %build-inputs "jdk"))) | |
1763 | `( ;;"--disable-bootstrap" | |
1764 | "--enable-bootstrap" | |
1765 | "--enable-nss" | |
cf879925 SS |
1766 | ,(string-append "--with-parallel-jobs=" |
1767 | (number->string (parallel-job-count))) | |
f2785bd6 RW |
1768 | "--disable-downloading" |
1769 | "--disable-system-pcsc" | |
1770 | "--disable-system-sctp" | |
1771 | "--disable-tests" ;they are run in the check phase instead | |
1772 | "--with-openjdk-src-dir=./openjdk.src" | |
1773 | ,(string-append "--with-jdk-home=" jdk)))) | |
1774 | ((#:phases phases) | |
1775 | `(modify-phases ,phases | |
1776 | (delete 'fix-x11-extension-include-path) | |
1777 | (delete 'patch-paths) | |
1778 | (delete 'set-additional-paths) | |
1779 | (delete 'patch-patches) | |
6b7e09ae | 1780 | (delete 'patch-bitrot) |
f2785bd6 RW |
1781 | ;; Prevent the keytool from recording the current time when |
1782 | ;; adding certificates at build time. | |
1783 | (add-after 'unpack 'patch-keystore | |
1784 | (lambda _ | |
1785 | (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java" | |
1786 | (("date = new Date\\(\\);") | |
1787 | "\ | |
1788 | date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\ | |
1789 | new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\ | |
1790 | new Date();")) | |
1791 | #t)) | |
1792 | (add-after 'unpack 'patch-jni-libs | |
1793 | ;; Hardcode dynamically loaded libraries. | |
1794 | (lambda _ | |
1795 | (let* ((library-path (search-path-as-string->list | |
1796 | (getenv "LIBRARY_PATH"))) | |
1797 | (find-library (lambda (name) | |
1798 | (search-path | |
1799 | library-path | |
1800 | (string-append "lib" name ".so"))))) | |
1801 | (for-each | |
1802 | (lambda (file) | |
1803 | (catch 'decoding-error | |
1804 | (lambda () | |
1805 | (substitute* file | |
1806 | (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" | |
1807 | _ name version) | |
1808 | (format #f "\"~a\"" (find-library name))) | |
1809 | (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) | |
1810 | (format #f "\"~a\"" (find-library name))))) | |
1811 | (lambda _ | |
1812 | ;; Those are safe to skip. | |
1813 | (format (current-error-port) | |
1814 | "warning: failed to substitute: ~a~%" | |
1815 | file)))) | |
1816 | (find-files "openjdk.src/jdk/src/solaris/native" | |
1817 | "\\.c|\\.h")) | |
1818 | #t))) | |
1819 | (replace 'install | |
1820 | (lambda* (#:key outputs #:allow-other-keys) | |
1821 | (let ((doc (string-append (assoc-ref outputs "doc") | |
1822 | "/share/doc/icedtea")) | |
1823 | (jre (assoc-ref outputs "out")) | |
1824 | (jdk (assoc-ref outputs "jdk"))) | |
1825 | (copy-recursively "openjdk.build/docs" doc) | |
1826 | (copy-recursively "openjdk.build/images/j2re-image" jre) | |
1827 | (copy-recursively "openjdk.build/images/j2sdk-image" jdk) | |
1828 | ;; Install the nss.cfg file to JRE to enable SSL/TLS | |
1829 | ;; support via NSS. | |
1830 | (copy-file (string-append jdk "/jre/lib/security/nss.cfg") | |
1831 | (string-append jre "/lib/security/nss.cfg")) | |
1832 | #t))) | |
1833 | (add-after 'install 'strip-jar-timestamps | |
1834 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))))) | |
349a3147 RW |
1835 | (native-inputs |
1836 | `(("jdk" ,icedtea-7 "jdk") | |
1837 | ("openjdk-src" | |
1838 | ,(drop "openjdk" | |
1d97d8ff | 1839 | "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p")) |
12eecbf0 LF |
1840 | ("aarch32-drop" |
1841 | ,(drop "aarch32" | |
1d97d8ff | 1842 | "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg")) |
349a3147 RW |
1843 | ("corba-drop" |
1844 | ,(drop "corba" | |
1d97d8ff | 1845 | "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah")) |
349a3147 RW |
1846 | ("jaxp-drop" |
1847 | ,(drop "jaxp" | |
1d97d8ff | 1848 | "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i")) |
349a3147 RW |
1849 | ("jaxws-drop" |
1850 | ,(drop "jaxws" | |
1d97d8ff | 1851 | "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf")) |
349a3147 RW |
1852 | ("jdk-drop" |
1853 | ,(drop "jdk" | |
1d97d8ff | 1854 | "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl")) |
349a3147 RW |
1855 | ("langtools-drop" |
1856 | ,(drop "langtools" | |
1d97d8ff | 1857 | "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw")) |
349a3147 | 1858 | ("hotspot-drop" |
0569a832 SS |
1859 | ,(drop "hotspot" |
1860 | "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm")) | |
349a3147 RW |
1861 | ("nashorn-drop" |
1862 | ,(drop "nashorn" | |
1d97d8ff | 1863 | "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa")) |
fd34d4f4 LF |
1864 | ("shenandoah-drop" |
1865 | ,(drop "shenandoah" | |
1d97d8ff | 1866 | "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy")) |
349a3147 | 1867 | ,@(fold alist-delete (package-native-inputs icedtea-7) |
e2098e2d | 1868 | '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop" |
349a3147 RW |
1869 | "jdk-drop" "langtools-drop" "hotspot-drop"))))))) |
1870 | ||
dd741059 JL |
1871 | (define-public openjdk9 |
1872 | (package | |
1873 | (name "openjdk") | |
1874 | (version "9.181") | |
1875 | (source (origin | |
1876 | (method url-fetch) | |
1877 | (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2") | |
1878 | (file-name (string-append name "-" version ".tar.bz2")) | |
1879 | (sha256 | |
1880 | (base32 | |
1881 | "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq")) | |
1882 | (modules '((guix build utils))) | |
1883 | (snippet | |
fb3b4ffb LP |
1884 | `(begin |
1885 | (for-each delete-file | |
1886 | (find-files "." ".*.(bin|exe|jar)$")) | |
1887 | #t)))) | |
dd741059 JL |
1888 | (build-system gnu-build-system) |
1889 | (outputs '("out" "jdk" "doc")) | |
1890 | (arguments | |
1891 | `(#:tests? #f; require jtreg | |
f5789c26 | 1892 | #:make-flags '("all") |
dd741059 JL |
1893 | #:imported-modules |
1894 | ((guix build syscalls) | |
1895 | ,@%gnu-build-system-modules) | |
1896 | #:phases | |
1897 | (modify-phases %standard-phases | |
1898 | (add-after 'patch-source-shebangs 'fix-java-shebangs | |
1899 | (lambda _ | |
1900 | ;; This file was "fixed" by patch-source-shebangs, but it requires | |
1901 | ;; this exact first line. | |
1902 | (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem" | |
1903 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) | |
1904 | #t)) | |
1905 | (replace 'configure | |
1906 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1907 | ;; TODO: unbundle libpng and lcms | |
1908 | (invoke "bash" "./configure" | |
1909 | (string-append "--with-freetype=" (assoc-ref inputs "freetype")) | |
1910 | "--disable-freetype-bundling" | |
1911 | "--disable-warnings-as-errors" | |
1912 | "--disable-hotspot-gtest" | |
1913 | "--with-giflib=system" | |
1914 | "--with-libjpeg=system" | |
1915 | (string-append "--prefix=" (assoc-ref outputs "out"))) | |
1916 | #t)) | |
f5789c26 | 1917 | (add-before 'build 'write-source-revision-file |
dd741059 JL |
1918 | (lambda _ |
1919 | (with-output-to-file ".src-rev" | |
1920 | (lambda _ | |
1921 | (display ,version))) | |
dd741059 | 1922 | #t)) |
f5789c26 RW |
1923 | (replace 'build |
1924 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) | |
1925 | (apply invoke "make" | |
1926 | `(,@(if parallel-build? | |
1927 | (list (string-append "JOBS=" | |
1928 | (number->string (parallel-job-count)))) | |
1929 | '()) | |
1930 | ,@make-flags)))) | |
84805ef2 BH |
1931 | (add-after 'unpack 'patch-jni-libs |
1932 | ;; Hardcode dynamically loaded libraries. | |
1933 | (lambda _ | |
1934 | (let* ((library-path (search-path-as-string->list | |
1935 | (getenv "LIBRARY_PATH"))) | |
1936 | (find-library (lambda (name) | |
1937 | (search-path | |
1938 | library-path | |
1939 | (string-append "lib" name ".so"))))) | |
1940 | (for-each | |
1941 | (lambda (file) | |
1942 | (catch 'decoding-error | |
1943 | (lambda () | |
1944 | (substitute* file | |
1945 | (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" | |
1946 | _ name version) | |
1947 | (format #f "\"~a\"" (find-library name))) | |
1948 | (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) | |
1949 | (format #f "\"~a\"" (find-library name))))) | |
1950 | (lambda _ | |
1951 | ;; Those are safe to skip. | |
1952 | (format (current-error-port) | |
fb3b4ffb LP |
1953 | "warning: failed to substitute: ~a~%" |
1954 | file)))) | |
84805ef2 BH |
1955 | (find-files "." |
1956 | "\\.c$|\\.h$")) | |
1957 | #t))) | |
dd741059 JL |
1958 | ;; Some of the libraries in the lib/ folder link to libjvm.so. |
1959 | ;; But that shared object is located in the server/ folder, so it | |
1960 | ;; cannot be found. This phase creates a symbolic link in the | |
1961 | ;; lib/ folder so that the other libraries can find it. | |
1962 | ;; | |
1963 | ;; See: | |
1964 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html | |
1965 | ;; | |
1966 | ;; FIXME: Find the bug in the build system, so that this symlink is | |
1967 | ;; not needed. | |
1968 | (add-after 'install 'install-libjvm | |
1969 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1970 | (let* ((lib-out (string-append (assoc-ref outputs "out") | |
fb3b4ffb | 1971 | "/lib")) |
dd741059 | 1972 | (lib-jdk (string-append (assoc-ref outputs "jdk") |
fb3b4ffb | 1973 | "/lib"))) |
dd741059 JL |
1974 | (symlink (string-append lib-jdk "/server/libjvm.so") |
1975 | (string-append lib-jdk "/libjvm.so")) | |
1976 | (symlink (string-append lib-out "/server/libjvm.so") | |
1977 | (string-append lib-out "/libjvm.so"))) | |
1978 | #t)) | |
1979 | (replace 'install | |
1980 | (lambda* (#:key outputs #:allow-other-keys) | |
1981 | (let ((out (assoc-ref outputs "out")) | |
1982 | (jdk (assoc-ref outputs "jdk")) | |
1983 | (doc (assoc-ref outputs "doc")) | |
1984 | (images (car (find-files "build" ".*-server-release" | |
1985 | #:directories? #t)))) | |
1986 | (copy-recursively (string-append images "/images/jdk") jdk) | |
1987 | (copy-recursively (string-append images "/images/jre") out) | |
1988 | (copy-recursively (string-append images "/images/docs") doc)) | |
1989 | #t)) | |
1990 | (add-after 'install 'strip-zip-timestamps | |
1991 | (lambda* (#:key outputs #:allow-other-keys) | |
1992 | (use-modules (guix build syscalls)) | |
1993 | (for-each (lambda (zip) | |
1994 | (let ((dir (mkdtemp! "zip-contents.XXXXXX"))) | |
1995 | (with-directory-excursion dir | |
1996 | (invoke "unzip" zip)) | |
1997 | (delete-file zip) | |
1998 | (for-each (lambda (file) | |
1999 | (let ((s (lstat file))) | |
2000 | (unless (eq? (stat:type s) 'symlink) | |
2001 | (format #t "reset ~a~%" file) | |
2002 | (utime file 0 0 0 0)))) | |
fb3b4ffb | 2003 | (find-files dir #:directories? #t)) |
dd741059 JL |
2004 | (with-directory-excursion dir |
2005 | (let ((files (find-files "." ".*" #:directories? #t))) | |
2006 | (apply invoke "zip" "-0" "-X" zip files))))) | |
fb3b4ffb | 2007 | (find-files (assoc-ref outputs "doc") ".*.zip$")) |
dd741059 JL |
2008 | #t))))) |
2009 | (inputs | |
2010 | `(("alsa-lib" ,alsa-lib) | |
2011 | ("cups" ,cups) | |
2012 | ("fontconfig" ,fontconfig) | |
2013 | ("freetype" ,freetype) | |
2014 | ("giflib" ,giflib) | |
2015 | ("lcms" ,lcms) | |
2016 | ("libelf" ,libelf) | |
4bd428a7 | 2017 | ("libjpeg" ,libjpeg-turbo) |
dd741059 JL |
2018 | ("libice" ,libice) |
2019 | ("libpng" ,libpng) | |
2020 | ("libx11" ,libx11) | |
2021 | ("libxcomposite" ,libxcomposite) | |
2022 | ("libxi" ,libxi) | |
2023 | ("libxinerama" ,libxinerama) | |
2024 | ("libxrender" ,libxrender) | |
2025 | ("libxt" ,libxt) | |
2026 | ("libxtst" ,libxtst))) | |
2027 | (native-inputs | |
2028 | `(("icedtea-8" ,icedtea-8) | |
2029 | ("icedtea-8:jdk" ,icedtea-8 "jdk") | |
f5789c26 | 2030 | ;; XXX: The build system fails with newer versions of GNU Make. |
5fd0c288 | 2031 | ("make@4.2" ,gnu-make-4.2) |
dd741059 JL |
2032 | ("unzip" ,unzip) |
2033 | ("which" ,which) | |
2034 | ("zip" ,zip))) | |
2035 | (home-page "https://openjdk.java.net/projects/jdk9/") | |
2036 | (synopsis "Java development kit") | |
2037 | (description | |
2038 | "This package provides the Java development kit OpenJDK.") | |
2039 | (license license:gpl2+))) | |
2040 | ||
16b89ecc JL |
2041 | (define-public openjdk10 |
2042 | (package | |
2043 | (inherit openjdk9) | |
2044 | (name "openjdk") | |
2045 | (version "10.46") | |
2046 | (source (origin | |
2047 | (method url-fetch) | |
2048 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2") | |
2049 | (file-name (string-append name "-" version ".tar.bz2")) | |
2050 | (sha256 | |
2051 | (base32 | |
2052 | "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4")) | |
accb5c31 GB |
2053 | (patches (search-patches |
2054 | "openjdk-10-idlj-reproducibility.patch")) | |
16b89ecc JL |
2055 | (modules '((guix build utils))) |
2056 | (snippet | |
fb3b4ffb LP |
2057 | `(begin |
2058 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) | |
2059 | #t)))) | |
16b89ecc | 2060 | (arguments |
fb3b4ffb LP |
2061 | (substitute-keyword-arguments (package-arguments openjdk9) |
2062 | ((#:phases phases) | |
2063 | `(modify-phases ,phases | |
2064 | (replace 'fix-java-shebangs | |
2065 | (lambda _ | |
2066 | ;; This file was "fixed" by patch-source-shebangs, but it requires | |
2067 | ;; this exact first line. | |
2068 | (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem" | |
2069 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) | |
2070 | #t)) | |
2071 | (replace 'configure | |
2072 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2073 | (invoke "bash" "./configure" | |
2074 | (string-append "--with-freetype=" (assoc-ref inputs "freetype")) | |
2075 | "--disable-freetype-bundling" | |
2076 | "--disable-warnings-as-errors" | |
2077 | "--disable-hotspot-gtest" | |
2078 | "--with-giflib=system" | |
2079 | "--with-libjpeg=system" | |
2080 | "--with-native-debug-symbols=zipped" | |
2081 | (string-append "--prefix=" (assoc-ref outputs "out"))) | |
2082 | #t)))))) | |
16b89ecc JL |
2083 | (native-inputs |
2084 | `(("openjdk9" ,openjdk9) | |
2085 | ("openjdk9:jdk" ,openjdk9 "jdk") | |
5fd0c288 | 2086 | ("make@4.2" ,gnu-make-4.2) |
16b89ecc JL |
2087 | ("unzip" ,unzip) |
2088 | ("which" ,which) | |
2089 | ("zip" ,zip))))) | |
2090 | ||
95bc85b7 GB |
2091 | (define-public openjdk11 |
2092 | (package | |
2093 | (name "openjdk") | |
2094 | (version "11.28") | |
2095 | (source (origin | |
2096 | (method url-fetch) | |
2097 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2") | |
2098 | (file-name (string-append name "-" version ".tar.bz2")) | |
2099 | (sha256 | |
2100 | (base32 | |
2101 | "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w")) | |
2102 | (modules '((guix build utils))) | |
2103 | (snippet | |
fb3b4ffb LP |
2104 | `(begin |
2105 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) | |
2106 | #t)))) | |
95bc85b7 GB |
2107 | (build-system gnu-build-system) |
2108 | (outputs '("out" "jdk" "doc")) | |
2109 | (arguments | |
77eaf5fc LC |
2110 | `(#:imported-modules ((guix build syscalls) |
2111 | ,@%gnu-build-system-modules) | |
95bc85b7 GB |
2112 | #:tests? #f; requires jtreg |
2113 | ;; TODO package jtreg | |
95bc85b7 GB |
2114 | #:configure-flags |
2115 | `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise | |
2116 | "--disable-warnings-as-errors" | |
2117 | ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894 | |
2118 | "--with-native-debug-symbols=zipped" | |
2119 | ;; do not use the bundled libraries | |
2120 | "--with-giflib=system" | |
2121 | "--with-lcms=system" | |
2122 | "--with-libjpeg=system" | |
2123 | "--with-libpng=system" | |
70d23edf | 2124 | "--with-version-pre=" |
95bc85b7 GB |
2125 | ;; allow the build system to locate the system freetype |
2126 | ,(string-append "--with-freetype-include=" | |
2127 | (assoc-ref %build-inputs "freetype") "/include") | |
2128 | ,(string-append "--with-freetype-lib=" | |
2129 | (assoc-ref %build-inputs "freetype") "/lib")) | |
95bc85b7 GB |
2130 | #:phases |
2131 | (modify-phases %standard-phases | |
2132 | (add-after 'patch-source-shebangs 'fix-java-shebangs | |
2133 | (lambda _ | |
2134 | ;; This file was "fixed" by patch-source-shebangs, but it requires | |
2135 | ;; this exact first line. | |
2136 | (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem" | |
2137 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) | |
2138 | #t)) | |
44425e1f BH |
2139 | (add-after 'unpack 'patch-jni-libs |
2140 | ;; Hardcode dynamically loaded libraries. | |
2141 | (lambda _ | |
2142 | (let* ((library-path (search-path-as-string->list | |
2143 | (getenv "LIBRARY_PATH"))) | |
2144 | (find-library (lambda (name) | |
2145 | (search-path | |
2146 | library-path | |
2147 | (string-append "lib" name ".so"))))) | |
2148 | (for-each | |
2149 | (lambda (file) | |
2150 | (catch 'decoding-error | |
2151 | (lambda () | |
2152 | (substitute* file | |
2153 | (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" | |
2154 | _ name version) | |
2155 | (format #f "\"~a\"" (find-library name))) | |
2156 | (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) | |
2157 | (format #f "\"~a\"" (find-library name))))) | |
2158 | (lambda _ | |
2159 | ;; Those are safe to skip. | |
2160 | (format (current-error-port) | |
fb3b4ffb LP |
2161 | "warning: failed to substitute: ~a~%" |
2162 | file)))) | |
44425e1f BH |
2163 | (find-files "." |
2164 | "\\.c$|\\.h$")) | |
2165 | #t))) | |
7b82e1cd | 2166 | (add-before 'build 'write-source-revision-file |
95bc85b7 GB |
2167 | (lambda _ |
2168 | (with-output-to-file ".src-rev" | |
2169 | (lambda _ | |
2170 | (display ,version))) | |
95bc85b7 | 2171 | #t)) |
7b82e1cd RW |
2172 | (replace 'build |
2173 | (lambda* (#:key parallel-build? make-flags #:allow-other-keys) | |
2174 | (apply invoke "make" "all" | |
2175 | `(,@(if parallel-build? | |
2176 | (list (string-append "JOBS=" | |
2177 | (number->string (parallel-job-count)))) | |
2178 | '()) | |
2179 | ,@make-flags)))) | |
95bc85b7 GB |
2180 | ;; jdk 11 does not build jre by default any more |
2181 | ;; building it anyways | |
2182 | ;; for further information see: | |
2183 | ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356 | |
2184 | (add-after 'build 'build-jre | |
7b82e1cd RW |
2185 | (lambda* (#:key parallel-build? make-flags #:allow-other-keys) |
2186 | (apply invoke "make" "legacy-jre-image" | |
2187 | `(,@(if parallel-build? | |
2188 | (list (string-append "JOBS=" | |
2189 | (number->string (parallel-job-count)))) | |
2190 | '()) | |
2191 | ,@make-flags)))) | |
95bc85b7 GB |
2192 | (replace 'install |
2193 | (lambda* (#:key outputs #:allow-other-keys) | |
2194 | (let ((out (assoc-ref outputs "out")) | |
2195 | (jdk (assoc-ref outputs "jdk")) | |
2196 | (doc (assoc-ref outputs "doc")) | |
2197 | (images (car (find-files "build" ".*-server-release" | |
2198 | #:directories? #t)))) | |
2199 | (copy-recursively (string-append images "/images/jdk") jdk) | |
2200 | (copy-recursively (string-append images "/images/jre") out) | |
2201 | (copy-recursively (string-append images "/images/docs") doc)) | |
2202 | #t)) | |
2203 | ;; Some of the libraries in the lib/ folder link to libjvm.so. | |
2204 | ;; But that shared object is located in the server/ folder, so it | |
2205 | ;; cannot be found. This phase creates a symbolic link in the | |
2206 | ;; lib/ folder so that the other libraries can find it. | |
2207 | ;; | |
2208 | ;; See: | |
2209 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html | |
2210 | ;; | |
2211 | ;; FIXME: Find the bug in the build system, so that this symlink is | |
2212 | ;; not needed. | |
2213 | (add-after 'install 'install-libjvm | |
2214 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2215 | (let* ((lib-out (string-append (assoc-ref outputs "out") | |
fb3b4ffb | 2216 | "/lib")) |
95bc85b7 | 2217 | (lib-jdk (string-append (assoc-ref outputs "jdk") |
fb3b4ffb | 2218 | "/lib"))) |
95bc85b7 GB |
2219 | (symlink (string-append lib-jdk "/server/libjvm.so") |
2220 | (string-append lib-jdk "/libjvm.so")) | |
2221 | (symlink (string-append lib-out "/server/libjvm.so") | |
2222 | (string-append lib-out "/libjvm.so"))) | |
2223 | #t)) | |
2224 | (add-after 'install 'strip-character-data-timestamps | |
2225 | (lambda* (#:key outputs #:allow-other-keys) | |
2226 | (use-modules (guix build syscalls)) | |
2227 | (let ((archive (string-append | |
2228 | (assoc-ref outputs "jdk") "/lib/src.zip")) | |
2229 | (dir (mkdtemp! "zip-contents.XXXXXX"))) | |
2230 | (with-directory-excursion dir | |
2231 | (invoke "unzip" archive)) | |
2232 | (delete-file archive) | |
2233 | (with-directory-excursion dir | |
2234 | (let ((char-data-files (find-files "." "CharacterData.*"))) | |
2235 | (for-each (lambda (file) | |
2236 | (substitute* file | |
2237 | (((string-append "This file was generated " | |
fb3b4ffb LP |
2238 | "AUTOMATICALLY from a template " |
2239 | "file.*")) | |
95bc85b7 GB |
2240 | (string-append "This file was generated " |
2241 | "AUTOMATICALLY from a template " | |
2242 | "file")))) | |
2243 | char-data-files))) | |
2244 | (with-directory-excursion dir | |
2245 | (let ((files (find-files "." ".*" #:directories? #t))) | |
2246 | (apply invoke "zip" "-0" "-X" archive files)))))) | |
2247 | (add-after 'strip-character-data-timestamps 'strip-archive-timestamps | |
2248 | (lambda* (#:key outputs #:allow-other-keys) | |
2249 | (use-modules (guix build syscalls) | |
2250 | (ice-9 binary-ports) | |
2251 | (rnrs bytevectors)) | |
2252 | (letrec ((repack-archive | |
fb3b4ffb LP |
2253 | (lambda (archive) |
2254 | (let ((dir (mkdtemp! "zip-contents.XXXXXX"))) | |
2255 | (with-directory-excursion dir | |
2256 | (invoke "unzip" archive)) | |
2257 | (delete-file archive) | |
2258 | (for-each (compose repack-archive canonicalize-path) | |
2259 | (find-files dir "(ct.sym|.*.jar)$")) | |
2260 | (let ((reset-file-timestamp | |
2261 | (lambda (file) | |
2262 | (let ((s (lstat file))) | |
2263 | (unless (eq? (stat:type s) 'symlink) | |
2264 | (format #t "reset ~a~%" file) | |
2265 | (utime file 0 0 0 0)))))) | |
2266 | (for-each reset-file-timestamp | |
2267 | (find-files dir #:directories? #t))) | |
2268 | (with-directory-excursion dir | |
2269 | (let ((files (find-files "." ".*" #:directories? #t))) | |
2270 | (apply invoke "zip" "-0" "-X" archive files))))))) | |
95bc85b7 GB |
2271 | (for-each repack-archive |
2272 | (find-files (assoc-ref outputs "doc") ".*.zip$")) | |
2273 | (for-each repack-archive | |
2274 | (find-files (assoc-ref outputs "jdk") | |
2275 | ".*.(zip|jar|diz)$")) | |
2276 | (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym")) | |
2277 | (let ((repack-jmod | |
2278 | (lambda (file-name) | |
2279 | (call-with-input-file file-name | |
2280 | (lambda (file) | |
2281 | (let ((header #vu8(#x4a #x4d #x01 #x00))) | |
2282 | (if (equal? (get-bytevector-n | |
2283 | file (bytevector-length header)) | |
2284 | header) | |
2285 | (let* ((header-length (bytevector-length header)) | |
2286 | (temp-file (mkstemp! | |
2287 | (string-copy | |
2288 | "temp-file.XXXXXX"))) | |
2289 | (temp-filename (port-filename temp-file)) | |
2290 | (content-length | |
2291 | (- (stat:size (stat file)) | |
2292 | header-length))) | |
fb3b4ffb LP |
2293 | (sendfile temp-file file content-length header-length) |
2294 | (delete-file file-name) | |
2295 | (close-port temp-file) | |
2296 | (repack-archive (canonicalize-path temp-filename)) | |
2297 | (call-with-output-file file-name | |
2298 | (lambda (file) | |
2299 | (put-bytevector file header) | |
2300 | (call-with-input-file temp-filename | |
2301 | (lambda (temp-file) | |
2302 | (sendfile | |
2303 | file temp-file | |
2304 | (stat:size (stat temp-file)) 0))))))))))))) | |
95bc85b7 GB |
2305 | (for-each repack-jmod |
2306 | (find-files (assoc-ref outputs "jdk") ".*.jmod$"))) | |
fb3b4ffb | 2307 | #t))) |
95bc85b7 GB |
2308 | (add-after 'install 'remove-timestamp-from-api-summary |
2309 | (lambda* (#:key outputs #:allow-other-keys) | |
2310 | (substitute* (string-append (assoc-ref outputs "doc") | |
2311 | "/api/overview-summary.html") | |
2312 | (("Generated by javadoc \\(11-internal\\).*$") | |
2313 | "Generated by javadoc (11-internal) -->\n")) | |
2314 | #t))))) | |
2315 | (inputs | |
2316 | `(("alsa-lib" ,alsa-lib) | |
2317 | ("cups" ,cups) | |
2318 | ("fontconfig" ,fontconfig) | |
2319 | ("freetype" ,freetype) | |
2320 | ("giflib" ,giflib) | |
2321 | ("lcms" ,lcms) | |
4bd428a7 | 2322 | ("libjpeg" ,libjpeg-turbo) |
95bc85b7 GB |
2323 | ("libpng" ,libpng) |
2324 | ("libx11" ,libx11) | |
2325 | ("libxext" ,libxext) | |
2326 | ("libxrender" ,libxrender) | |
2327 | ("libxt" ,libxt) | |
2328 | ("libxtst" ,libxtst))) | |
2329 | (native-inputs | |
2330 | `(("autoconf" ,autoconf) | |
2331 | ("openjdk10" ,openjdk10) | |
2332 | ("openjdk10:jdk" ,openjdk10 "jdk") | |
5fd0c288 | 2333 | ("make" ,gnu-make-4.2) |
95bc85b7 GB |
2334 | ("pkg-config" ,pkg-config) |
2335 | ("unzip" ,unzip) | |
2336 | ("which" ,which) | |
2337 | ("zip" ,zip))) | |
2338 | (home-page "https://openjdk.java.net/projects/jdk/11/") | |
2339 | (synopsis "Java development kit") | |
2340 | (description | |
2341 | "This package provides the Java development kit OpenJDK.") | |
2342 | (license license:gpl2+))) | |
2343 | ||
64dc8e9e GB |
2344 | (define-public openjdk12 |
2345 | (package | |
2346 | (inherit openjdk11) | |
2347 | (name "openjdk") | |
2348 | (version "12.33") | |
2349 | (source (origin | |
2350 | (method url-fetch) | |
2351 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2") | |
2352 | (file-name (string-append name "-" version ".tar.bz2")) | |
2353 | (sha256 | |
2354 | (base32 | |
2355 | "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2")) | |
2356 | (modules '((guix build utils))) | |
2357 | (snippet | |
2358 | `(begin | |
c7c9370d | 2359 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) |
64dc8e9e GB |
2360 | #t)))) |
2361 | (inputs | |
2362 | `(("alsa-lib" ,alsa-lib) | |
2363 | ("cups" ,cups) | |
2364 | ("fontconfig" ,fontconfig) | |
2365 | ("freetype" ,freetype) | |
2366 | ("giflib" ,giflib) | |
2367 | ("lcms" ,lcms) | |
4bd428a7 | 2368 | ("libjpeg" ,libjpeg-turbo) |
64dc8e9e GB |
2369 | ("libpng" ,libpng) |
2370 | ("libx11" ,libx11) | |
2371 | ("libxext" ,libxext) | |
2372 | ("libxrandr" ,libxrandr) | |
2373 | ("libxrender" ,libxrender) | |
2374 | ("libxt" ,libxt) | |
2375 | ("libxtst" ,libxtst))) | |
2376 | (native-inputs | |
2377 | `(("autoconf" ,autoconf) | |
2378 | ("openjdk11" ,openjdk11) | |
2379 | ("openjdk11:jdk" ,openjdk11 "jdk") | |
5fd0c288 | 2380 | ("make@4.2" ,gnu-make-4.2) |
64dc8e9e GB |
2381 | ("pkg-config" ,pkg-config) |
2382 | ("unzip" ,unzip) | |
2383 | ("which" ,which) | |
2384 | ("zip" ,zip))) | |
2385 | (home-page "https://openjdk.java.net/projects/jdk/12"))) | |
2386 | ||
c4618174 NZ |
2387 | (define-public openjdk13 |
2388 | (package | |
2389 | (inherit openjdk12) | |
2390 | (name "openjdk") | |
2391 | (version "13.0") | |
2392 | (source (origin | |
fb3b4ffb LP |
2393 | (method url-fetch) |
2394 | (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2") | |
2395 | (file-name (string-append name "-" version ".tar.bz2")) | |
2396 | (sha256 | |
2397 | (base32 | |
2398 | "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq")) | |
2399 | (modules '((guix build utils))) | |
2400 | (snippet | |
2401 | `(begin | |
2402 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) | |
2403 | #t)))) | |
c4618174 NZ |
2404 | (inputs |
2405 | `(("alsa-lib" ,alsa-lib) | |
2406 | ("cups" ,cups) | |
2407 | ("fontconfig" ,fontconfig) | |
2408 | ("freetype" ,freetype) | |
2409 | ("giflib" ,giflib) | |
2410 | ("lcms" ,lcms) | |
2411 | ("libjpeg" ,libjpeg-turbo) | |
2412 | ("libpng" ,libpng) | |
2413 | ("libx11" ,libx11) | |
2414 | ("libxext" ,libxext) | |
2415 | ("libxrandr" ,libxrandr) | |
2416 | ("libxrender" ,libxrender) | |
2417 | ("libxt" ,libxt) | |
2418 | ("libxtst" ,libxtst))) | |
2419 | (native-inputs | |
2420 | `(("autoconf" ,autoconf) | |
2421 | ("openjdk12:jdk" ,openjdk12 "jdk") | |
2422 | ("make@4.2" ,gnu-make-4.2) | |
2423 | ("pkg-config" ,pkg-config) | |
2424 | ("unzip" ,unzip) | |
2425 | ("which" ,which) | |
2426 | ("zip" ,zip))) | |
2427 | (home-page "https://openjdk.java.net/projects/jdk/13"))) | |
2428 | ||
65a11a59 NZ |
2429 | (define-public openjdk14 |
2430 | (package | |
2431 | (inherit openjdk13) | |
2432 | (name "openjdk") | |
2433 | (version "14.0") | |
2434 | (source (origin | |
fb3b4ffb LP |
2435 | (method url-fetch) |
2436 | (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2") | |
2437 | (file-name (string-append name "-" version ".tar.bz2")) | |
2438 | (sha256 | |
2439 | (base32 | |
2440 | "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch")) | |
2441 | (modules '((guix build utils))) | |
2442 | (snippet | |
2443 | `(begin | |
65a11a59 NZ |
2444 | ;; The m4 macro uses 'help' to search for builtins, which is |
2445 | ;; not available in bash-minimal | |
2446 | (substitute* "make/autoconf/basics.m4" | |
2447 | (("if help") "if command -v")) | |
fb3b4ffb LP |
2448 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) |
2449 | #t)))) | |
65a11a59 NZ |
2450 | (inputs |
2451 | `(("alsa-lib" ,alsa-lib) | |
2452 | ("cups" ,cups) | |
2453 | ("fontconfig" ,fontconfig) | |
2454 | ("freetype" ,freetype) | |
2455 | ("giflib" ,giflib) | |
2456 | ("lcms" ,lcms) | |
2457 | ("libjpeg" ,libjpeg-turbo) | |
2458 | ("libpng" ,libpng) | |
2459 | ("libx11" ,libx11) | |
2460 | ("libxext" ,libxext) | |
2461 | ("libxrandr" ,libxrandr) | |
2462 | ("libxrender" ,libxrender) | |
2463 | ("libxt" ,libxt) | |
2464 | ("libxtst" ,libxtst))) | |
2465 | (native-inputs | |
2466 | `(("autoconf" ,autoconf) | |
2467 | ("make@4.2" ,gnu-make-4.2) | |
2468 | ("openjdk13:jdk" ,openjdk13 "jdk") | |
2469 | ("pkg-config" ,pkg-config) | |
2470 | ("unzip" ,unzip) | |
2471 | ("which" ,which) | |
2472 | ("zip" ,zip))) | |
2473 | (home-page "https://openjdk.java.net/projects/jdk/14"))) | |
2474 | ||
33aa65e0 | 2475 | (define-public icedtea icedtea-8) |
068e476f | 2476 | |
5490480c | 2477 | \f |
8bbd0408 RW |
2478 | (define-public ant/java8 |
2479 | (package (inherit ant-bootstrap) | |
2480 | (name "ant") | |
4e342a56 | 2481 | (version "1.10.9") |
8bbd0408 RW |
2482 | (source (origin |
2483 | (method url-fetch) | |
2484 | (uri (string-append "mirror://apache/ant/source/apache-ant-" | |
2485 | version "-src.tar.gz")) | |
2486 | (sha256 | |
2487 | (base32 | |
4e342a56 | 2488 | "0x78434q5ab193ma7ys27m9kwpdgrfzqj00hrf1szwcgk0lzw01z")) |
8bbd0408 RW |
2489 | (modules '((guix build utils))) |
2490 | (snippet | |
2491 | '(begin | |
2492 | (for-each delete-file | |
2493 | (find-files "lib/optional" "\\.jar$")) | |
2494 | #t)))) | |
2495 | (arguments | |
2496 | (substitute-keyword-arguments (package-arguments ant-bootstrap) | |
2497 | ((#:phases phases) | |
2498 | `(modify-phases ,phases | |
2499 | (add-after 'unpack 'remove-scripts | |
2500 | ;; Remove bat / cmd scripts for DOS as well as the antRun and runant | |
2501 | ;; wrappers. | |
2502 | (lambda _ | |
2503 | (for-each delete-file | |
2504 | (find-files "src/script" | |
2505 | "(.*\\.(bat|cmd)|runant.*|antRun.*)")) | |
2506 | #t)) | |
2507 | (replace 'build | |
2508 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2509 | (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) | |
2510 | ||
2511 | ;; Disable tests to avoid dependency on hamcrest-core, which needs | |
2512 | ;; Ant to build. This is necessary in addition to disabling the | |
2513 | ;; "check" phase, because the dependency on "test-jar" would always | |
2514 | ;; result in the tests to be run. | |
2515 | (substitute* "build.xml" | |
00848717 | 2516 | (("depends=\"jars,test-jar") "depends=\"jars")) |
2c8ac364 MW |
2517 | (invoke "bash" "bootstrap.sh" |
2518 | (string-append "-Ddist.dir=" | |
2519 | (assoc-ref outputs "out"))))))))) | |
8bbd0408 | 2520 | (native-inputs |
1c7ef07e GB |
2521 | `(("jdk" ,icedtea-8 "jdk") |
2522 | ("zip" ,zip) | |
2523 | ("unzip" ,unzip))))) | |
8bbd0408 | 2524 | |
e441fc56 RW |
2525 | ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series |
2526 | ;; requires Java 8. | |
2527 | (define-public ant | |
2528 | (package (inherit ant/java8) | |
2039cf37 | 2529 | (version "1.9.15") |
e441fc56 RW |
2530 | (source (origin |
2531 | (method url-fetch) | |
2532 | (uri (string-append "mirror://apache/ant/source/apache-ant-" | |
2533 | version "-src.tar.gz")) | |
2534 | (sha256 | |
2535 | (base32 | |
2039cf37 | 2536 | "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd")))) |
e441fc56 | 2537 | (native-inputs |
3b6ba18b GB |
2538 | `(("jdk" ,icedtea-7 "jdk") |
2539 | ("zip" ,zip) | |
2540 | ("unzip" ,unzip))))) | |
e441fc56 | 2541 | |
9ce7ac99 RW |
2542 | (define-public ant-apache-bcel |
2543 | (package | |
2544 | (inherit ant/java8) | |
2545 | (name "ant-apache-bcel") | |
2546 | (arguments | |
2547 | (substitute-keyword-arguments (package-arguments ant/java8) | |
2548 | ((#:phases phases) | |
2549 | `(modify-phases ,phases | |
2550 | (add-after 'unpack 'link-bcel | |
2551 | (lambda* (#:key inputs #:allow-other-keys) | |
2552 | (for-each (lambda (file) | |
2553 | (symlink file | |
2554 | (string-append "lib/optional/" | |
2555 | (basename file)))) | |
2556 | (find-files (assoc-ref inputs "java-commons-bcel") | |
2557 | "\\.jar$")) | |
2558 | #t)) | |
2559 | (add-after 'build 'install | |
2560 | (lambda* (#:key outputs #:allow-other-keys) | |
2561 | (let* ((out (assoc-ref outputs "out")) | |
2562 | (share (string-append out "/share/java")) | |
2563 | (bin (string-append out "/bin")) | |
2564 | (lib (string-append out "/lib"))) | |
2565 | (mkdir-p share) | |
2566 | (install-file (string-append lib "/ant-apache-bcel.jar") share) | |
2567 | (delete-file-recursively bin) | |
2568 | (delete-file-recursively lib) | |
2569 | #t))))))) | |
2570 | (inputs | |
2571 | `(("java-commons-bcel" ,java-commons-bcel) | |
2572 | ,@(package-inputs ant/java8))))) | |
2573 | ||
fa6c4213 RW |
2574 | (define-public ant-junit |
2575 | (package | |
2576 | (inherit ant/java8) | |
2577 | (name "ant-junit") | |
2578 | (arguments | |
2579 | (substitute-keyword-arguments (package-arguments ant/java8) | |
2580 | ((#:phases phases) | |
2581 | `(modify-phases ,phases | |
2582 | (add-after 'unpack 'link-junit | |
2583 | (lambda* (#:key inputs #:allow-other-keys) | |
2584 | (for-each (lambda (file) | |
2585 | (symlink file | |
2586 | (string-append "lib/optional/" | |
2587 | (basename file)))) | |
2588 | (find-files (assoc-ref inputs "java-junit") | |
2589 | "\\.jar$")) | |
2590 | #t)) | |
2591 | (add-after 'build 'install | |
2592 | (lambda* (#:key outputs #:allow-other-keys) | |
2593 | (let* ((out (assoc-ref outputs "out")) | |
2594 | (share (string-append out "/share/java")) | |
2595 | (bin (string-append out "/bin")) | |
2596 | (lib (string-append out "/lib"))) | |
2597 | (mkdir-p share) | |
2598 | (install-file (string-append lib "/ant-junit.jar") share) | |
2599 | (delete-file-recursively bin) | |
2600 | (delete-file-recursively lib) | |
2601 | #t))))))) | |
2602 | (inputs | |
2603 | `(("java-junit" ,java-junit) | |
2604 | ,@(package-inputs ant/java8))))) | |
2605 | ||
7214fbd2 JL |
2606 | (define-public java-openjfx-build |
2607 | (package | |
2608 | (name "java-openjfx-build") | |
2609 | ;; This is a java-8 version | |
2610 | (version "8.202") | |
2611 | (source (origin | |
2612 | (method hg-fetch) | |
2613 | (uri (hg-reference | |
c19293ad AA |
2614 | (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt") |
2615 | (changeset (string-append | |
2616 | (string-join (string-split version #\.) "u") | |
2617 | "-ga")))) | |
7214fbd2 | 2618 | (file-name (string-append name "-" version "-checkout")) |
2c2b1ef8 BH |
2619 | (modules '((guix build utils))) |
2620 | (snippet | |
2621 | '(begin | |
2622 | ;; Delete included gradle jar | |
2623 | (delete-file-recursively "gradle/wrapper") | |
2624 | #t)) | |
7214fbd2 JL |
2625 | (sha256 |
2626 | (base32 | |
d9ef5aeb AA |
2627 | "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f")) |
2628 | (patches (search-patches "java-openjfx-build-jdk_version.patch")))) | |
7214fbd2 JL |
2629 | (build-system ant-build-system) |
2630 | (arguments | |
2631 | `(#:jar-name "java-openjfx.jar" | |
2632 | #:source-dir "buildSrc/src/main/java" | |
2633 | #:test-dir "buildSrc/src/test" | |
2634 | #:phases | |
2635 | (modify-phases %standard-phases | |
2636 | (add-before 'configure 'generate-jsl-parser | |
2637 | (lambda _ | |
2638 | (invoke "antlr3" "-o" | |
2639 | "buildSrc/src/main/java/com/sun/scenario/effect/compiler" | |
2640 | "buildSrc/src/main/antlr/JSL.g")))))) | |
2641 | (inputs | |
2642 | `(("antlr3" ,antlr3) | |
2643 | ("java-stringtemplate" ,java-stringtemplate))) | |
2644 | (native-inputs | |
2645 | `(("java-junit" ,java-junit) | |
2646 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
2647 | (home-page "https://openjfx.io") | |
2648 | (synopsis "Graphical application toolkit in Java") | |
2649 | (description "OpenJFX is a client application platform for desktop, | |
2650 | mobile and embedded systems built on Java. Its goal is to produce a | |
2651 | modern, efficient, and fully featured toolkit for developing rich client | |
2652 | applications. This package contains base classes for the OpenJFX | |
2653 | distribution and helper classes for building other parts of the | |
2654 | distribution.") | |
2655 | (license license:gpl2))) ;gpl2 only, with classpath exception | |
2656 | ||
46f05439 JL |
2657 | (define-public java-openjfx-base |
2658 | (package (inherit java-openjfx-build) | |
2659 | (name "java-openjfx-base") | |
2660 | (arguments | |
2661 | `(#:jar-name "java-openjfx-base.jar" | |
2662 | #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info" | |
2663 | #:test-dir "modules/base/src/test" | |
2664 | #:phases | |
2665 | (modify-phases %standard-phases | |
2666 | (add-before 'check 'remove-empty-file | |
2667 | (lambda _ | |
2668 | (with-directory-excursion "modules/base/src/test/java" | |
2669 | ;; These files are completely commented, but junit expects them to | |
2670 | ;; contain a class, so tests fail. | |
2671 | (delete-file | |
2672 | "com/sun/javafx/property/adapter/PropertyDescriptorTest.java") | |
2673 | (delete-file | |
2674 | "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java") | |
2675 | (delete-file "javafx/beans/property/PropertiesTest.java") | |
2676 | (delete-file | |
2677 | "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java") | |
2678 | ;; This one fails | |
2679 | (delete-file "com/sun/javafx/runtime/VersionInfoTest.java")) | |
2680 | #t))))) | |
2681 | (propagated-inputs | |
2682 | `(("java-openjfx-build" ,java-openjfx-build))) | |
2683 | (description "OpenJFX is a client application platform for desktop, | |
2684 | mobile and embedded systems built on Java. Its goal is to produce a | |
2685 | modern, efficient, and fully featured toolkit for developing rich client | |
2686 | applications. This package contains base classes for the OpenJFX | |
2687 | distribution."))) | |
36f73d70 JL |
2688 | |
2689 | (define-public java-openjfx-graphics | |
2690 | (package (inherit java-openjfx-build) | |
2691 | (name "java-openjfx-graphics") | |
2692 | (arguments | |
2693 | `(#:jar-name "java-openjfx-graphics.jar" | |
2694 | #:source-dir "modules/graphics/src/main/java" | |
2695 | #:tests? #f; require X | |
57853d69 RW |
2696 | #:test-dir "modules/graphics/src/test" |
2697 | #:phases | |
2698 | (modify-phases %standard-phases | |
2699 | (add-after 'unpack 'copy-missing-file | |
2700 | (lambda* (#:key inputs #:allow-other-keys) | |
2701 | (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c")) | |
2702 | (copy-file (assoc-ref inputs "JNativeSurface.c") target) | |
2703 | ;; XXX: looks like the missing file we found isn't *quite* | |
2704 | ;; compatible... | |
2705 | (substitute* target | |
2706 | (("case TYPE_INT_ARGB:") ""))))) | |
2707 | (add-after 'build 'build-native | |
2708 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2709 | (let ((jdk (assoc-ref inputs "jdk")) | |
2710 | (class-file->class-name | |
2711 | (lambda (class-file) | |
2712 | (string-map (lambda (c) | |
2713 | (if (char=? c #\/) #\. c)) | |
2714 | (string-drop-right class-file | |
2715 | (string-length ".class")))))) | |
2716 | (setenv "CPPFLAGS" | |
2717 | (string-append "-DINLINE=inline " | |
2718 | "-DLINUX " | |
2719 | "-I" jdk "/include " | |
2720 | "-I" jdk "/include/linux " | |
2721 | "-I " (getcwd) "/build/classes/include " | |
2722 | "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw")) | |
2723 | ||
2724 | ;; Instructions have been adapted from buildSrc/linux.gradle | |
2725 | (with-directory-excursion "build/classes" | |
2726 | ;; Build prism | |
2727 | (mkdir-p "include") | |
2728 | ||
2729 | ;; Generate headers for prism | |
2730 | (apply invoke "javah" "-d" "include" "-cp" "." | |
2731 | (map class-file->class-name | |
2732 | (append (find-files "com/sun/prism/impl" "\\.class$") | |
2733 | (find-files "com/sun/prism" "PresentableState.*\\.class$")))) | |
2734 | ||
2735 | ;; ...then for prism_sw | |
2736 | (apply invoke "javah" "-d" "include" "-cp" "." | |
2737 | (map class-file->class-name | |
2738 | (find-files "com/sun/pisces" "\\.class$"))) | |
2739 | ||
2740 | ;; ...and for prism_es2 | |
2741 | (apply invoke "javah" "-d" "include" "-cp" "." | |
2742 | (map class-file->class-name | |
2743 | (find-files "com/sun/prism/es2" "\\.class$"))))) | |
2744 | ||
2745 | (with-directory-excursion "netbeans/native-prism" | |
2746 | (invoke "make" "CONF=Release")) | |
2747 | (with-directory-excursion "netbeans/native-prism-sw" | |
2748 | (invoke "make" "CONF=Release")) | |
2749 | ;; TODO: This fails due to unknown EGL procedure names | |
2750 | #; | |
2751 | (with-directory-excursion "netbeans/native-prism-es2" | |
2752 | (invoke "make" "CONF=Release")) | |
2753 | ||
2754 | (let* ((out (assoc-ref outputs "out")) | |
2755 | (dir ,(match (%current-system) | |
2756 | ("i686-linux" | |
2757 | "i386") | |
2758 | ((or "armhf-linux" "aarch64-linux") | |
2759 | "arm") | |
2760 | ((or "x86_64-linux") | |
2761 | "amd64") | |
2762 | (_ "unknown"))) | |
2763 | (target (string-append out "/share/" dir "/"))) | |
2764 | (mkdir-p target) | |
2765 | (for-each (lambda (file) | |
2766 | (let ((new-name | |
2767 | (string-append "lib" | |
2768 | (string-map | |
2769 | (lambda (c) | |
2770 | (if (char=? c #\-) #\_ c)) | |
2771 | (string-drop (basename file) | |
2772 | (string-length "libnative-")))))) | |
2773 | (copy-file file | |
2774 | (string-append target new-name)))) | |
2775 | (find-files "netbeans" "\\.so$")))))))) | |
36f73d70 JL |
2776 | (propagated-inputs |
2777 | `(("java-openjfx-base" ,java-openjfx-base) | |
2778 | ("java-swt" ,java-swt))) | |
57853d69 RW |
2779 | ;; XXX: for unknown reasons |
2780 | ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing | |
2781 | ;; in this revision. | |
2782 | (native-inputs | |
2783 | `(("JNativeSurface.c" | |
2784 | ,(origin | |
2785 | (method url-fetch) | |
2786 | (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\ | |
2787 | /modules/graphics/src/main/native-prism-sw/JNativeSurface.c") | |
2788 | (sha256 | |
2789 | (base32 | |
2790 | "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm")))))) | |
36f73d70 JL |
2791 | (description "OpenJFX is a client application platform for desktop, |
2792 | mobile and embedded systems built on Java. Its goal is to produce a | |
2793 | modern, efficient, and fully featured toolkit for developing rich client | |
2794 | applications. This package contains graphics-related classes for the | |
2795 | OpenJFX distribution."))) | |
68a13319 JL |
2796 | |
2797 | (define-public java-openjfx-media | |
2798 | (package (inherit java-openjfx-build) | |
2799 | (name "java-openjfx-media") | |
2800 | (propagated-inputs | |
2801 | `(("java-openjxf-graphics" ,java-openjfx-graphics))) | |
2802 | (arguments | |
2803 | `(#:jar-name "java-openjfx-media.jar" | |
2804 | #:source-dir "modules/media/src/main/java" | |
2805 | #:tests? #f)); no tests | |
2806 | (description "OpenJFX is a client application platform for desktop, | |
2807 | mobile and embedded systems built on Java. Its goal is to produce a | |
2808 | modern, efficient, and fully featured toolkit for developing rich client | |
2809 | applications. This package contains media-related classes for the | |
2810 | OpenJFX distribution."))) | |
46f05439 | 2811 | |
f0971dfd RW |
2812 | (define-public java-openjfx-controls |
2813 | (package (inherit java-openjfx-build) | |
2814 | (name "java-openjfx-controls") | |
2815 | (propagated-inputs | |
2816 | `(("java-openjxf-graphics" ,java-openjfx-graphics))) | |
2817 | (arguments | |
2818 | `(#:jar-name "java-openjfx-controls.jar" | |
2819 | #:source-dir "modules/controls/src/main/java" | |
2820 | #:test-dir "modules/controls/src/test" | |
2821 | ;; TODO: tests require com.sun.javafx.pgstub, | |
2822 | ;; javafx.collections.MockSetObserver, and | |
2823 | ;; com.sun.javafx.binding.ExpressionHelperUtility | |
2824 | #:tests? #false | |
2825 | #:phases | |
2826 | (modify-phases %standard-phases | |
2827 | (add-after 'unpack 'copy-resources | |
2828 | (lambda _ | |
2829 | (copy-recursively "modules/controls/src/test/resources" | |
2830 | "build/test-classes") | |
2831 | (copy-recursively "modules/controls/src/main/resources" | |
2832 | "build/classes")))))) | |
2833 | (description "OpenJFX is a client application platform for desktop, | |
2834 | mobile and embedded systems built on Java. Its goal is to produce a | |
2835 | modern, efficient, and fully featured toolkit for developing rich client | |
2836 | applications. This package contains UI control classes for the | |
2837 | OpenJFX distribution."))) | |
2838 | ||
53fb0476 | 2839 | (define-public javacc-4 |
fc8d100b RW |
2840 | (package |
2841 | (name "javacc") | |
53fb0476 | 2842 | (version "4.1") |
fc8d100b | 2843 | (source (origin |
53fb0476 AV |
2844 | (method git-fetch) |
2845 | (uri (git-reference | |
b0e7b699 | 2846 | (url "https://github.com/javacc/javacc") |
53fb0476 AV |
2847 | (commit "release_41"))) |
2848 | (file-name (string-append "javacc-" version "-checkout")) | |
fc8d100b RW |
2849 | (sha256 |
2850 | (base32 | |
6662d65f AV |
2851 | "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0")) |
2852 | (modules '((guix build utils))) | |
2853 | ;; delete bundled jars | |
2854 | (snippet '(begin (delete-file-recursively "lib") #t)))) | |
fc8d100b | 2855 | (build-system ant-build-system) |
53fb0476 AV |
2856 | ;; Tests fail with |
2857 | ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60: | |
2858 | ;; JAVACODE failed | |
fc8d100b | 2859 | (arguments |
53fb0476 | 2860 | `(#:tests? #f |
fc8d100b RW |
2861 | #:phases |
2862 | (modify-phases %standard-phases | |
6662d65f AV |
2863 | ;; Delete tests to avoid build failure (we don't run them anyway). |
2864 | (add-after 'unpack 'delete-tests | |
fc8d100b | 2865 | (lambda _ |
6662d65f AV |
2866 | (for-each delete-file |
2867 | '("src/org/javacc/JavaCCTestCase.java" | |
2868 | "src/org/javacc/parser/ExpansionTest.java" | |
2869 | "src/org/javacc/parser/OptionsTest.java" | |
2870 | "src/org/javacc/jjtree/JJTreeOptionsTest.java")) | |
2871 | (for-each delete-file-recursively | |
2872 | '("src/org/javacc/parser/test" | |
2873 | "src/org/javacc/jjdoc/test")) | |
2874 | #t)) | |
53fb0476 | 2875 | (replace 'install (install-jars "bin/lib"))))) |
fc8d100b RW |
2876 | (home-page "https://javacc.org/") |
2877 | (synopsis "Java parser generator") | |
2878 | (description "Java Compiler Compiler (JavaCC) is the most popular parser | |
2879 | generator for use with Java applications. A parser generator is a tool that | |
2880 | reads a grammar specification and converts it to a Java program that can | |
2881 | recognize matches to the grammar. In addition to the parser generator itself, | |
2882 | JavaCC provides other standard capabilities related to parser generation such | |
2883 | as tree building (via a tool called JJTree included with JavaCC), actions, | |
2884 | debugging, etc.") | |
2885 | (license license:bsd-3))) | |
2886 | ||
aabaac7d JL |
2887 | ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar |
2888 | ;; in the bootstrap/ directory. | |
2889 | (define-public javacc-3 | |
2890 | (package | |
2891 | (inherit javacc-4) | |
2892 | (version "3.2") | |
2893 | (source (origin | |
2894 | (method git-fetch) | |
2895 | (uri (git-reference | |
8ed4c468 | 2896 | (url "https://github.com/javacc/javacc") |
aabaac7d JL |
2897 | (commit "release_32"))) |
2898 | (file-name (string-append "javacc-" version "-checkout")) | |
2899 | (sha256 | |
2900 | (base32 | |
2901 | "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3")))) | |
2902 | (arguments | |
2903 | `(#:tests? #f | |
2904 | #:phases | |
2905 | (modify-phases %standard-phases | |
2906 | (add-before 'build 'set-java-version | |
2907 | (lambda _ | |
2908 | (for-each | |
2909 | (lambda (file) | |
2910 | (substitute* file | |
2911 | (("debug=") "source=\"1.4\" debug="))) | |
2912 | (find-files "." "build.xml")) | |
2913 | #t)) | |
2914 | (replace 'install (install-jars "bin/lib"))))))) | |
2915 | ||
53fb0476 AV |
2916 | (define-public javacc |
2917 | (package | |
2918 | (inherit javacc-4) | |
6b66e470 | 2919 | (version "7.0.4") |
ebf8048d TGR |
2920 | (source |
2921 | (origin | |
2922 | (method git-fetch) | |
2923 | (uri (git-reference | |
b0e7b699 | 2924 | (url "https://github.com/javacc/javacc") |
ebf8048d TGR |
2925 | (commit version))) |
2926 | (file-name (git-file-name "javacc" version)) | |
2927 | (sha256 | |
2928 | (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i")) | |
2929 | (modules '((guix build utils))) | |
2930 | ;; Delete bundled jars. | |
2931 | (snippet '(begin (for-each delete-file-recursively | |
2932 | '("bootstrap" "lib")) | |
2933 | #t)))) | |
6688c41e | 2934 | (arguments |
6b66e470 | 2935 | `(#:make-flags ; bootstrap from javacc-4 |
33428d12 AV |
2936 | (list (string-append "-Dbootstrap-jar=" |
2937 | (assoc-ref %build-inputs "javacc") | |
2938 | "/share/java/javacc.jar")) | |
2939 | #:test-target "test" | |
6688c41e RW |
2940 | #:phases |
2941 | (modify-phases %standard-phases | |
16fdf2f5 JL |
2942 | (replace 'install (install-jars "target")) |
2943 | (add-after 'install 'install-bin | |
2944 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
2945 | (let* ((out (assoc-ref outputs "out")) | |
2946 | (dir (string-append out "/share/java")) | |
2947 | (bin (string-append out "/bin")) | |
2948 | (javacc (string-append bin "/javacc"))) | |
2949 | (mkdir-p bin) | |
2950 | (with-output-to-file javacc | |
2951 | (lambda _ | |
2952 | (display | |
2953 | (string-append "#!/bin/sh\n" | |
2954 | (assoc-ref inputs "jdk") "/bin/java" | |
2955 | " -cp " dir "/javacc.jar" " `basename $0`" " $*")))) | |
2956 | (chmod javacc #o755) | |
2957 | ;; symlink to different names to affect the first argument and | |
2958 | ;; change the behavior of the jar file. | |
2959 | (symlink javacc (string-append bin "/jjdoc")) | |
2960 | (symlink javacc (string-append bin "/jjtree")) | |
2961 | #t)))))) | |
2962 | ||
33428d12 AV |
2963 | (native-inputs |
2964 | `(("javacc" ,javacc-4))))) | |
6688c41e | 2965 | |
c1cb8576 RW |
2966 | ;; This is the last 3.x release of ECJ |
2967 | (define-public java-ecj-3 | |
2968 | (package | |
2969 | (name "java-ecj") | |
2970 | (version "3.8.2") | |
2971 | (source (origin | |
2972 | (method url-fetch) | |
2973 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
2974 | "downloads/drops/R-" version | |
2975 | "-201301310800/ecjsrc-" version ".jar")) | |
2976 | (sha256 | |
2977 | (base32 | |
2978 | "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04")))) | |
2979 | (build-system ant-build-system) | |
2980 | (arguments | |
2981 | `(#:tests? #f ; none included | |
2982 | #:jdk ,icedtea-7 ; doesn't build with JDK8+ | |
2983 | #:make-flags (list "-f" "src/build.xml") | |
2984 | #:build-target "build" | |
2985 | #:phases | |
2986 | (modify-phases %standard-phases | |
2987 | (add-after 'unpack 'fix-manifest | |
2988 | (lambda _ | |
2989 | ;; Record the main class to make ecj executable. | |
2990 | (with-atomic-file-replacement "src/META-INF/MANIFEST.MF" | |
2991 | (lambda (in out) | |
2992 | (display "Manifest-Version: 1.0 | |
2993 | Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" | |
2c8ac364 MW |
2994 | out))) |
2995 | #t)) | |
c1cb8576 RW |
2996 | (replace 'install (install-jars "."))))) |
2997 | (home-page "https://eclipse.org") | |
2998 | (synopsis "Eclipse Java development tools core batch compiler") | |
2999 | (description "This package provides the Eclipse Java core batch compiler.") | |
3000 | (license license:epl1.0))) | |
3001 | ||
f201b18e RW |
3002 | ;; This is needed for java-cisd-args4j |
3003 | (define-public java-ecj-3.5 | |
3004 | (package (inherit java-ecj-3) | |
3005 | (version "3.5.1") | |
3006 | (source (origin | |
3007 | (method url-fetch/zipbomb) | |
3008 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
3009 | "downloads/drops/R-" version | |
3010 | "-200909170800/ecjsrc-" version ".zip")) | |
3011 | (sha256 | |
3012 | (base32 | |
3013 | "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7")))) | |
3014 | (build-system ant-build-system) | |
3015 | (arguments | |
3016 | `(#:tests? #f ; none included | |
3017 | #:jdk ,icedtea-7 ; doesn't build with JDK8+ | |
3018 | #:build-target "build" | |
3019 | #:phases | |
3020 | (modify-phases %standard-phases | |
3021 | (add-after 'unpack 'fix-manifest | |
3022 | (lambda _ | |
3023 | ;; Record the main class to make ecj executable. | |
3024 | (with-atomic-file-replacement "META-INF/MANIFEST.MF" | |
3025 | (lambda (in out) | |
3026 | (dump-port in out) | |
3027 | (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" | |
2c8ac364 MW |
3028 | out))) |
3029 | #t)) | |
f201b18e RW |
3030 | (replace 'install (install-jars "."))))) |
3031 | (native-inputs | |
3032 | `(("unzip" ,unzip))))) | |
3033 | ||
bc3497a5 BH |
3034 | (define-public java-ecj |
3035 | (package (inherit java-ecj-3) | |
3036 | (version "4.6.3") | |
3037 | (source | |
3038 | (origin | |
3039 | (method url-fetch) | |
3040 | (uri (string-append | |
3041 | "http://archive.eclipse.org/eclipse/downloads/drops4/R-" | |
3042 | version | |
3043 | "-201703010400/ecjsrc-" | |
3044 | version | |
3045 | ".jar")) | |
3046 | (sha256 | |
3047 | (base32 | |
3048 | "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl")))) | |
3049 | (arguments | |
3050 | `(#:tests? #f ; none included | |
3051 | #:build-target "build" | |
3052 | #:phases | |
3053 | (modify-phases %standard-phases | |
3054 | (add-after 'unpack 'fix-build.xml | |
3055 | (lambda _ | |
3056 | (substitute* "src/build.xml" | |
3057 | (("^.*MANIFEST.*$") | |
3058 | "")) | |
3059 | #t)) | |
3060 | (add-after 'unpack 'fix-prop | |
3061 | (lambda _ | |
3062 | (substitute* "src/build.xml" | |
3063 | (("^.*properties.*$") | |
3064 | "<include name=\"**/*.properties\"/> | |
3065 | <include name=\"**/*.props\"/>")) | |
3066 | #t)) | |
3067 | (add-before 'build 'chdir | |
3068 | (lambda _ | |
3069 | (chdir "src") | |
3070 | #t)) | |
3071 | (replace 'install (install-jars "."))))))) | |
3072 | ||
30d55473 RW |
3073 | (define-public java-cisd-base |
3074 | (let ((revision 38938) | |
3075 | (base-version "14.12.0")) | |
3076 | (package | |
3077 | (name "java-cisd-base") | |
3078 | (version (string-append base-version "-" (number->string revision))) | |
3079 | (source (origin | |
3080 | (method svn-fetch) | |
3081 | (uri (svn-reference | |
3082 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
3083 | "base/tags/release/" | |
3084 | (version-major+minor base-version) | |
3085 | ".x/" base-version "/base/")) | |
3086 | (revision revision))) | |
3087 | (file-name (string-append "java-cisd-base-" version "-checkout")) | |
3088 | (sha256 | |
3089 | (base32 | |
3090 | "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy")) | |
3091 | (modules '((guix build utils))) | |
3092 | (snippet | |
3093 | '(begin | |
3094 | ;; Delete included gradle jar | |
3095 | (delete-file-recursively "gradle/wrapper") | |
3096 | ;; Delete pre-built native libraries | |
3097 | (delete-file-recursively "libs") | |
3098 | #t)))) | |
3099 | (build-system ant-build-system) | |
3100 | (arguments | |
3101 | `(#:make-flags '("-file" "build/build.xml") | |
3102 | #:test-target "jar-test" | |
3103 | #:jdk ,icedtea-8 | |
3104 | #:phases | |
3105 | (modify-phases %standard-phases | |
3106 | (add-after 'unpack 'unpack-build-resources | |
3107 | (lambda* (#:key inputs #:allow-other-keys) | |
3108 | (copy-recursively (assoc-ref inputs "build-resources") | |
3109 | "../build_resources") | |
3110 | #t)) | |
3111 | (add-after 'unpack-build-resources 'fix-dependencies | |
3112 | (lambda* (#:key inputs #:allow-other-keys) | |
3113 | (substitute* "build/build.xml" | |
3114 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") | |
3115 | (string-append (assoc-ref inputs "java-testng") | |
3116 | "/share/java/java-testng.jar")) | |
3117 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") | |
3118 | (string-append (assoc-ref inputs "java-commons-lang") | |
3119 | "/share/java/commons-lang-" | |
3120 | ,(package-version java-commons-lang) ".jar")) | |
3121 | (("\\$\\{lib\\}/commons-io/commons-io.jar") | |
3122 | (string-append (assoc-ref inputs "java-commons-io") | |
3448c7ed | 3123 | "/lib/m2/commons-io/commons-io/" |
30d55473 | 3124 | ,(package-version java-commons-io) |
3448c7ed RW |
3125 | "/commons-io-" |
3126 | ,(package-version java-commons-io) | |
3127 | ".jar")) | |
30d55473 RW |
3128 | ;; Remove dependency on svn |
3129 | (("<build-info.*") "") | |
3130 | (("\\$\\{revision.number\\}") | |
3131 | ,(number->string revision)) | |
3132 | (("\\$\\{version.number\\}") ,base-version)) | |
3133 | ;; Remove dependency on classycle | |
3134 | (substitute* "../build_resources/ant/build-common.xml" | |
3135 | (("<taskdef name=\"dependency-checker.*") "") | |
3136 | (("classname=\"classycle.*") "") | |
3137 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) | |
3138 | #t)) | |
3139 | ;; A few tests fail because of the lack of a proper /etc/groups and | |
3140 | ;; /etc/passwd file in the build container. | |
3141 | (add-after 'unpack 'disable-broken-tests | |
3142 | (lambda _ | |
3143 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java" | |
3144 | (("Unix.isOperational\\(\\)") "false")) | |
3145 | #t)) | |
3146 | ;; These decorators are almost useless and pull in an unpackaged | |
3147 | ;; dependency. | |
3148 | (add-after 'unpack 'remove-useless-decorators | |
3149 | (lambda _ | |
3150 | (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java" | |
3151 | (("@Private") "") | |
3152 | (("import ch.rinn.restrictions.Private;") "")) | |
3153 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java" | |
3154 | (("@Friend.*") "") | |
3155 | (("import ch.rinn.restrictions.Friend;") "")) | |
3156 | #t)) | |
3157 | (add-before 'configure 'build-native-code | |
3158 | (lambda* (#:key inputs #:allow-other-keys) | |
3159 | (let ((jdk (assoc-ref inputs "jdk")) | |
3160 | (dir ,(match (%current-system) | |
3161 | ("i686-linux" | |
3162 | "i386-Linux") | |
3163 | ((or "armhf-linux" "aarch64-linux") | |
3164 | "arm-Linux") | |
3165 | ((or "x86_64-linux") | |
3166 | "amd64-Linux") | |
3167 | (_ "unknown-Linux")))) | |
3168 | (with-directory-excursion "source/c" | |
3169 | (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c" | |
3170 | (string-append "-I" jdk "/include") | |
3171 | (string-append "-I" jdk "/include/linux") | |
3172 | "-o" "libunix.so") | |
3173 | (invoke "gcc" "-shared" "-O3" "-fPIC" | |
3174 | "-DMACHINE_BYTE_ORDER=1" | |
3175 | "copyCommon.c" | |
3176 | "copyByteChar.c" | |
3177 | "copyByteDouble.c" | |
3178 | "copyByteFloat.c" | |
3179 | "copyByteInt.c" | |
3180 | "copyByteLong.c" | |
3181 | "copyByteShort.c" | |
3182 | (string-append "-I" jdk "/include") | |
3183 | (string-append "-I" jdk "/include/linux") | |
3184 | "-o" "libnativedata.so")) | |
3185 | (install-file "source/c/libunix.so" | |
3186 | (string-append "libs/native/unix/" dir)) | |
3187 | (install-file "source/c/libnativedata.so" | |
3188 | (string-append "libs/native/nativedata/" dir)) | |
3189 | #t))) | |
3190 | ;; In the "check" phase we only build the test executable. | |
3191 | (add-after 'check 'run-tests | |
3192 | (lambda _ | |
3193 | (invoke "java" "-jar" "targets/dist/sis-base-test.jar") | |
3194 | (delete-file "targets/dist/sis-base-test.jar") | |
3195 | #t)) | |
3196 | (replace 'install (install-jars "targets/dist"))))) | |
3197 | (native-inputs | |
3198 | `(("jdk" ,icedtea-8) | |
3199 | ("java-commons-lang" ,java-commons-lang) | |
3200 | ("java-commons-io" ,java-commons-io) | |
3201 | ("java-testng" ,java-testng) | |
3202 | ("build-resources" | |
3203 | ,(origin | |
3204 | (method svn-fetch) | |
3205 | (uri (svn-reference | |
3206 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
3207 | "base/tags/release/" | |
3208 | (version-major+minor base-version) | |
3209 | ".x/" base-version | |
3210 | "/build_resources/")) | |
3211 | (revision revision))) | |
3212 | (sha256 | |
3213 | (base32 | |
3214 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) | |
3215 | (home-page "http://svnsis.ethz.ch") | |
3216 | (synopsis "Utility classes for libraries from ETH Zurich") | |
3217 | (description "This library supplies some utility classes needed for | |
3218 | libraries from the SIS division at ETH Zurich like jHDF5.") | |
3219 | ;; The C sources are under a non-copyleft license, which looks like a | |
3220 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. | |
3221 | (license (list license:asl2.0 | |
3222 | (license:non-copyleft "file://source/c/COPYING")))))) | |
3223 | ||
04ddca26 RW |
3224 | (define-public java-cisd-args4j |
3225 | (let ((revision 39162) | |
3226 | (base-version "9.11.2")) | |
3227 | (package | |
3228 | (name "java-cisd-args4j") | |
3229 | (version (string-append base-version "-" (number->string revision))) | |
3230 | (source (origin | |
3231 | (method svn-fetch) | |
3232 | (uri (svn-reference | |
3233 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
3234 | "args4j/tags/release/" | |
3235 | (version-major+minor base-version) | |
3236 | ".x/" base-version "/args4j/")) | |
3237 | (revision revision))) | |
3238 | (file-name (string-append "java-cisd-args4j-" version "-checkout")) | |
3239 | (sha256 | |
3240 | (base32 | |
3241 | "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2")))) | |
3242 | (build-system ant-build-system) | |
3243 | (arguments | |
3244 | `(#:make-flags '("-file" "build/build.xml") | |
3245 | #:tests? #f ; there are no tests | |
3246 | ;; There are weird build failures with JDK8, such as: "The type | |
3247 | ;; java.io.ObjectInputStream cannot be resolved. It is indirectly | |
3248 | ;; referenced from required .class files" | |
3249 | #:jdk ,icedtea-7 | |
3250 | #:modules ((guix build ant-build-system) | |
3251 | (guix build utils) | |
3252 | (guix build java-utils) | |
3253 | (sxml simple) | |
3254 | (sxml transform) | |
3255 | (sxml xpath)) | |
3256 | #:phases | |
3257 | (modify-phases %standard-phases | |
3258 | (add-after 'unpack 'unpack-build-resources | |
3259 | (lambda* (#:key inputs #:allow-other-keys) | |
3260 | (mkdir-p "../build_resources") | |
3261 | (invoke "tar" "xf" (assoc-ref inputs "build-resources") | |
3262 | "-C" "../build_resources" | |
3263 | "--strip-components=1") | |
3264 | (mkdir-p "../build_resources/lib") | |
3265 | #t)) | |
3266 | (add-after 'unpack-build-resources 'fix-dependencies | |
3267 | (lambda* (#:key inputs #:allow-other-keys) | |
3268 | ;; FIXME: There should be a more convenient abstraction for | |
3269 | ;; editing XML files. | |
3270 | (with-directory-excursion "../build_resources/ant/" | |
3271 | (chmod "build-common.xml" #o664) | |
3272 | (call-with-output-file "build-common.xml.new" | |
3273 | (lambda (port) | |
3274 | (sxml->xml | |
3275 | (pre-post-order | |
3276 | (with-input-from-file "build-common.xml" | |
3277 | (lambda _ (xml->sxml #:trim-whitespace? #t))) | |
3278 | `(;; Remove dependency on classycle and custom ant tasks | |
3279 | (taskdef . ,(lambda (tag . kids) | |
3280 | (let ((name ((sxpath '(name *text*)) kids))) | |
3281 | (if (or (member "build-info" name) | |
3282 | (member "dependency-checker" name) | |
3283 | (member "build-java-subprojects" name) | |
3284 | (member "project-classpath" name)) | |
3285 | '() ; skip | |
3286 | `(,tag ,@kids))))) | |
3287 | (typedef . ,(lambda (tag . kids) | |
3288 | (let ((name ((sxpath '(name *text*)) kids))) | |
3289 | (if (member "recursive-jar" name) | |
3290 | '() ; skip | |
3291 | `(,tag ,@kids))))) | |
3292 | (build-java-subprojects . ,(lambda _ '())) | |
3293 | ;; Ignore everything else | |
3294 | (*default* . ,(lambda (tag . kids) `(,tag ,@kids))) | |
3295 | (*text* . ,(lambda (_ txt) txt)))) | |
3296 | port))) | |
3297 | (rename-file "build-common.xml.new" "build-common.xml")) | |
3298 | (substitute* "build/build.xml" | |
3299 | (("\\$\\{lib\\}/cisd-base/cisd-base.jar") | |
3300 | (string-append (assoc-ref inputs "java-cisd-base") | |
3301 | "/share/java/sis-base.jar")) | |
3302 | ;; Remove dependency on svn | |
3303 | (("<build-info.*") "") | |
3304 | (("\\$\\{revision.number\\}") | |
3305 | ,(number->string revision)) | |
3306 | (("\\$\\{version.number\\}") ,base-version) | |
3307 | ;; Don't use custom ant tasks. | |
3308 | (("recursive-jar") "jar") | |
3309 | (("<project-classpath.*") "")) | |
3310 | #t)) | |
3311 | (replace 'install (install-jars "targets/dist"))))) | |
3312 | (inputs | |
3313 | `(("java-cisd-base" ,java-cisd-base))) | |
3314 | (native-inputs | |
3315 | `(("ecj" ,java-ecj-3.5) | |
3316 | ("build-resources" | |
3317 | ,(origin | |
3318 | (method svn-fetch) | |
3319 | (uri (svn-reference | |
3320 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
3321 | "args4j/tags/release/" | |
3322 | (version-major+minor base-version) | |
3323 | ".x/" base-version | |
3324 | "/build_resources/")) | |
3325 | (revision revision))) | |
3326 | (sha256 | |
3327 | (base32 | |
3328 | "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf")) | |
3329 | (modules '((guix build utils))) | |
3330 | ;; Delete bundled pre-built jars. | |
3331 | (snippet | |
3332 | '(begin (delete-file-recursively "lib/") #t)))))) | |
3333 | (home-page "http://svnsis.ethz.ch") | |
3334 | (synopsis "Command line parser library") | |
3335 | (description "This package provides a parser for command line arguments.") | |
3336 | (license license:asl2.0)))) | |
3337 | ||
2f0d0418 RW |
3338 | (define-public java-cisd-jhdf5 |
3339 | (let ((revision 39162) | |
3340 | (base-version "14.12.6")) | |
3341 | (package | |
3342 | (name "java-cisd-jhdf5") | |
3343 | (version (string-append base-version "-" (number->string revision))) | |
3344 | (source (origin | |
3345 | (method svn-fetch) | |
3346 | (uri (svn-reference | |
3347 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
3348 | "jhdf5/tags/release/" | |
3349 | (version-major+minor base-version) | |
3350 | ".x/" base-version "/jhdf5/")) | |
3351 | (revision revision))) | |
3352 | (file-name (string-append "java-cisd-jhdf5-" version "-checkout")) | |
3353 | (sha256 | |
3354 | (base32 | |
3355 | "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0")) | |
3356 | (modules '((guix build utils))) | |
3357 | (snippet | |
3358 | '(begin | |
3359 | ;; Delete included gradle jar | |
3360 | (delete-file-recursively "gradle/wrapper") | |
3361 | ;; Delete pre-built native libraries | |
3362 | (delete-file-recursively "libs") | |
3363 | #t)))) | |
3364 | (build-system ant-build-system) | |
3365 | (arguments | |
3366 | `(#:make-flags '("-file" "build/build.xml") | |
3367 | #:build-target "jar-all" | |
3368 | #:test-target "jar-test" | |
3369 | #:jdk ,icedtea-8 | |
3370 | #:phases | |
3371 | (modify-phases %standard-phases | |
1ed386fc RW |
3372 | ;; FIXME: this build phase fails. |
3373 | (delete 'generate-jar-indices) | |
2f0d0418 RW |
3374 | ;; Don't erase results from the build phase when building tests. |
3375 | (add-after 'unpack 'separate-test-target-from-clean | |
3376 | (lambda _ | |
3377 | (substitute* "build/build.xml" | |
3378 | (("\"jar-test\" depends=\"clean, ") | |
3379 | "\"jar-test\" depends=\"")) | |
3380 | #t)) | |
3381 | (add-after 'unpack 'unpack-build-resources | |
3382 | (lambda* (#:key inputs #:allow-other-keys) | |
3383 | (copy-recursively (assoc-ref inputs "build-resources") | |
3384 | "../build_resources") | |
3385 | (delete-file-recursively "../build_resources/lib/") | |
3386 | (mkdir-p "../build_resources/lib") | |
3387 | ;; Remove dependency on classycle | |
3388 | (substitute* "../build_resources/ant/build-common.xml" | |
3389 | (("<taskdef name=\"dependency-checker.*") "") | |
3390 | (("classname=\"classycle.*") "") | |
3391 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) | |
3392 | ;; Remove dependency on svn | |
3393 | (substitute* "build/build.xml" | |
3394 | (("<build-info.*") "") | |
3395 | (("\\$\\{revision.number\\}") | |
3396 | ,(number->string revision)) | |
3397 | (("\\$\\{version.number\\}") ,base-version)) | |
3398 | #t)) | |
3399 | (add-after 'unpack-build-resources 'fix-dependencies | |
3400 | (lambda* (#:key inputs #:allow-other-keys) | |
3401 | (substitute* "../build_resources/ant/build-common.xml" | |
3402 | (("../libraries/testng/testng-jdk15.jar") | |
3403 | (string-append (assoc-ref inputs "java-testng") | |
3404 | "/share/java/java-testng.jar"))) | |
3405 | (substitute* "build/build.xml" | |
3406 | (("\\$\\{lib\\}/sis-base/sis-base.jar") | |
3407 | (string-append (assoc-ref inputs "java-cisd-base") | |
3408 | "/share/java/sis-base.jar")) | |
3409 | (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar") | |
3410 | (string-append (assoc-ref inputs "java-cisd-args4j") | |
3411 | "/share/java/cisd-args4j.jar")) | |
3412 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") | |
3413 | (string-append (assoc-ref inputs "java-commons-lang") | |
3414 | "/share/java/commons-lang-" | |
3415 | ,(package-version java-commons-lang) ".jar")) | |
3416 | (("\\$\\{lib\\}/commons-io/commons-io.jar") | |
3417 | (string-append (assoc-ref inputs "java-commons-io") | |
cd005bfe RW |
3418 | "/lib/m2/commons-io/commons-io/" |
3419 | ,(package-version java-commons-io) | |
3420 | "/commons-io-" | |
2f0d0418 | 3421 | ,(package-version java-commons-io) |
cd005bfe | 3422 | ".jar")) |
2f0d0418 RW |
3423 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") |
3424 | (string-append (assoc-ref inputs "java-testng") | |
3425 | "/share/java/java-testng.jar")) | |
3426 | (("\\$\\{lib\\}/junit4/junit.jar") | |
fff4fcc4 | 3427 | (car (find-files (assoc-ref inputs "java-junit") "jar$"))) |
2f0d0418 | 3428 | (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar") |
fff4fcc4 JL |
3429 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
3430 | "jar$")))) | |
2f0d0418 RW |
3431 | ;; Remove dependency on ch.rinn.restrictions |
3432 | (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/" | |
3433 | (substitute* '("BitSetConversionUtils.java" | |
3434 | "HDF5Utils.java") | |
3435 | (("import ch.rinn.restrictions.Private;") "") | |
3436 | (("@Private") ""))) | |
3437 | (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/" | |
3438 | (substitute* '("BitSetConversionTest.java" | |
3439 | "h5ar/HDF5ArchiverTest.java") | |
3440 | (("import ch.rinn.restrictions.Friend;") "") | |
3441 | (("@Friend.*") "")) | |
3442 | ;; Remove leftovers from removing @Friend | |
3443 | (substitute* "h5ar/HDF5ArchiverTest.java" | |
3444 | (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)") | |
3445 | ""))) | |
3446 | #t)) | |
3447 | (add-before 'configure 'build-native-library | |
3448 | (lambda* (#:key inputs #:allow-other-keys) | |
3449 | (let ((jdk (assoc-ref inputs "jdk")) | |
3450 | (hdf5 (assoc-ref inputs "hdf5")) | |
3451 | (dir ,(match (%current-system) | |
3452 | ("i686-linux" | |
3453 | "i386-Linux") | |
3454 | ((or "armhf-linux" "aarch64-linux") | |
3455 | "arm-Linux") | |
3456 | ((or "x86_64-linux") | |
3457 | "amd64-Linux") | |
3458 | (_ "unknown-Linux")))) | |
3459 | (with-directory-excursion "source/c" | |
3460 | (apply invoke `("gcc" "-shared" "-O3" | |
3461 | "-fPIC" | |
3462 | "-Wl,--exclude-libs,ALL" | |
3463 | ,@(find-files "jhdf5" "\\.c$") | |
3464 | ,@(find-files "hdf-java" "\\.c$") | |
3465 | ,(string-append "-I" hdf5 "/include") | |
3466 | ,(string-append "-I" jdk "/include") | |
3467 | ,(string-append "-I" jdk "/include/linux") | |
3468 | ,(string-append hdf5 "/lib/libhdf5.a") | |
3469 | "-o" "libjhdf5.so" "-lz"))) | |
3470 | (install-file "source/c/libjhdf5.so" | |
3471 | (string-append "libs/native/jhdf5/" dir)) | |
3472 | #t))) | |
3473 | ;; In the "check" phase we only build the test executable. | |
3474 | (add-after 'check 'run-tests | |
3475 | (lambda _ | |
3476 | (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar") | |
3477 | (delete-file "targets/dist/sis-jhdf5-test.jar") | |
3478 | #t)) | |
3479 | (replace 'install | |
3480 | (install-jars "targets/dist"))))) | |
3481 | (inputs | |
3482 | `(("java-cisd-base" ,java-cisd-base) | |
3483 | ("java-cisd-args4j" ,java-cisd-args4j) | |
3484 | ("java-commons-lang" ,java-commons-lang) | |
3485 | ("java-commons-io" ,java-commons-io) | |
c5372cd4 | 3486 | ("hdf5" ,hdf5-1.8) |
2f0d0418 RW |
3487 | ("zlib" ,zlib))) |
3488 | (native-inputs | |
3489 | `(("jdk" ,icedtea-8) | |
3490 | ("java-testng" ,java-testng) | |
3491 | ("java-junit" ,java-junit) | |
3492 | ("java-jmock" ,java-jmock) | |
3493 | ("java-hamcrest-core" ,java-hamcrest-core) | |
3494 | ("build-resources" | |
3495 | ,(origin | |
3496 | (method svn-fetch) | |
3497 | (uri (svn-reference | |
3498 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
3499 | "jhdf5/tags/release/" | |
3500 | (version-major+minor base-version) | |
3501 | ".x/" base-version | |
3502 | "/build_resources/")) | |
3503 | (revision revision))) | |
3504 | (sha256 | |
3505 | (base32 | |
3506 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) | |
3507 | (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/") | |
3508 | (synopsis "Java binding for HDF5") | |
3509 | (description "JHDF5 is a high-level API in Java for reading and writing | |
3510 | HDF5 files, building on the libraries provided by the HDF Group.") | |
3511 | ;; The C sources are under a non-copyleft license, which looks like a | |
3512 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. | |
3513 | (license (list license:asl2.0 | |
3514 | (license:non-copyleft "file://source/c/COPYING")))))) | |
3515 | ||
218d093b RW |
3516 | (define-public java-classpathx-servletapi |
3517 | (package | |
3518 | (name "java-classpathx-servletapi") | |
ae307724 | 3519 | (version "3.0.1") |
218d093b RW |
3520 | (source (origin |
3521 | (method url-fetch) | |
3522 | (uri (string-append "mirror://gnu/classpathx/servletapi/" | |
3523 | "servletapi-" version ".tar.gz")) | |
3524 | (sha256 | |
3525 | (base32 | |
ae307724 | 3526 | "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x")))) |
218d093b RW |
3527 | (build-system ant-build-system) |
3528 | (arguments | |
3529 | `(#:tests? #f ; there is no test target | |
3530 | #:build-target "compile" | |
218d093b | 3531 | #:make-flags |
ae307724 | 3532 | (list "-Dbuild.compiler=javac1.8" |
218d093b RW |
3533 | (string-append "-Ddist=" (assoc-ref %outputs "out"))) |
3534 | #:phases | |
3535 | (modify-phases %standard-phases | |
3536 | (replace 'install | |
3537 | (lambda* (#:key make-flags #:allow-other-keys) | |
2c8ac364 | 3538 | (apply invoke `("ant" "dist" ,@make-flags))))))) |
218d093b RW |
3539 | (home-page "https://www.gnu.org/software/classpathx/") |
3540 | (synopsis "Java servlet API implementation") | |
3541 | (description "This is the GNU servlet API distribution, part of the | |
3542 | ClasspathX project. It provides implementations of version 3.0 of the servlet | |
3543 | API and version 2.1 of the Java ServerPages API.") | |
3544 | (license license:gpl3+))) | |
3545 | ||
10d62a88 BH |
3546 | (define-public java-javaee-servletapi |
3547 | (package | |
3548 | (name "java-javaee-servletapi") | |
3549 | (version "3.1.0") | |
44bac44c BH |
3550 | (source (origin |
3551 | (method git-fetch) | |
3552 | (uri (git-reference | |
b0e7b699 | 3553 | (url "https://github.com/javaee/servlet-spec") |
44bac44c BH |
3554 | (commit version))) |
3555 | (file-name (git-file-name name version)) | |
3556 | (sha256 | |
3557 | (base32 | |
3558 | "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl")))) | |
10d62a88 BH |
3559 | (build-system ant-build-system) |
3560 | (arguments | |
3561 | `(#:jar-name "javax-servletapi.jar" | |
3562 | ;; no tests | |
3563 | #:tests? #f | |
8ea8d607 BH |
3564 | #:source-dir "src/main/java" |
3565 | #:phases | |
3566 | (modify-phases %standard-phases | |
3567 | (add-before 'build 'copy-resources | |
3568 | (lambda _ | |
3569 | (mkdir-p "build/classes/javax/servlet/http") | |
3570 | (let ((from-prefix "src/main/java/javax/servlet/") | |
3571 | (to-prefix "build/classes/javax/servlet/")) | |
3572 | (for-each (lambda (f) | |
3573 | (copy-file (string-append from-prefix f) | |
3574 | (string-append to-prefix f))) | |
3575 | (list "LocalStrings_ja.properties" | |
3576 | "LocalStrings.properties" | |
3577 | "LocalStrings_fr.properties" | |
3578 | "http/LocalStrings_es.properties" | |
3579 | "http/LocalStrings_ja.properties" | |
3580 | "http/LocalStrings.properties" | |
3581 | "http/LocalStrings_fr.properties"))) | |
3582 | #t))))) | |
10d62a88 BH |
3583 | (native-inputs |
3584 | `(("unzip" ,unzip))) | |
3585 | (home-page "https://javaee.github.io/servlet-spec/") | |
3586 | (synopsis "Java servlet API") | |
3587 | (description "Java Servlet is the foundation web specification in the | |
3588 | Java Enterprise Platform. Developers can build web applications using the | |
3589 | Servlet API to interact with the request/response workflow. This project | |
3590 | provides information on the continued development of the Java Servlet | |
3591 | specification.") | |
3592 | ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1. | |
3593 | ;; Some files are licensed under ASL 2.0. | |
3594 | (license (list license:asl2.0 license:gpl2 license:cddl1.1)))) | |
3595 | ||
5490480c RW |
3596 | (define-public java-swt |
3597 | (package | |
3598 | (name "java-swt") | |
8710d4dd | 3599 | (version "4.7.1a") |
5490480c RW |
3600 | (source |
3601 | ;; The types of many variables and procedures differ in the sources | |
3602 | ;; dependent on whether the target architecture is a 32-bit system or a | |
3603 | ;; 64-bit system. Instead of patching the sources on demand in a build | |
3604 | ;; phase we download either the 32-bit archive (which mostly uses "int" | |
3605 | ;; types) or the 64-bit archive (which mostly uses "long" types). | |
8710d4dd RW |
3606 | (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9") |
3607 | (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q") | |
5490480c RW |
3608 | (file32 "x86") |
3609 | (file64 "x86_64")) | |
3610 | (let-values (((hash file) | |
3611 | (match (or (%current-target-system) (%current-system)) | |
3612 | ("x86_64-linux" (values hash64 file64)) | |
3613 | (_ (values hash32 file32))))) | |
3614 | (origin | |
3615 | (method url-fetch) | |
3616 | (uri (string-append | |
8710d4dd RW |
3617 | "http://download.eclipse.org/eclipse/downloads/drops4/" |
3618 | "R-" version "-201710090410/swt-" version | |
3619 | "-gtk-linux-" file ".zip")) | |
5490480c RW |
3620 | (sha256 (base32 hash)))))) |
3621 | (build-system ant-build-system) | |
3622 | (arguments | |
3623 | `(#:jar-name "swt.jar" | |
8710d4dd | 3624 | #:jdk ,icedtea-8 |
5490480c RW |
3625 | #:tests? #f ; no "check" target |
3626 | #:phases | |
3627 | (modify-phases %standard-phases | |
3628 | (replace 'unpack | |
3629 | (lambda* (#:key source #:allow-other-keys) | |
2c8ac364 MW |
3630 | (mkdir "swt") |
3631 | (invoke "unzip" source "-d" "swt") | |
3632 | (chdir "swt") | |
3633 | (mkdir "src") | |
3634 | (invoke "unzip" "src.zip" "-d" "src"))) | |
5490480c RW |
3635 | ;; The classpath contains invalid icecat jars. Since we don't need |
3636 | ;; anything other than the JDK on the classpath, we can simply unset | |
3637 | ;; it. | |
3638 | (add-after 'configure 'unset-classpath | |
3639 | (lambda _ (unsetenv "CLASSPATH") #t)) | |
3640 | (add-before 'build 'build-native | |
3641 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3642 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) | |
3643 | ;; Build shared libraries. Users of SWT have to set the system | |
3644 | ;; property swt.library.path to the "lib" directory of this | |
3645 | ;; package output. | |
3646 | (mkdir-p lib) | |
3647 | (setenv "OUTPUT_DIR" lib) | |
3648 | (with-directory-excursion "src" | |
2c8ac364 | 3649 | (invoke "bash" "build.sh"))))) |
5490480c RW |
3650 | (add-after 'install 'install-native |
3651 | (lambda* (#:key outputs #:allow-other-keys) | |
3652 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) | |
3653 | (for-each (lambda (file) | |
3654 | (install-file file lib)) | |
3655 | (find-files "." "\\.so$")) | |
3656 | #t)))))) | |
3657 | (inputs | |
8710d4dd | 3658 | `(("gtk" ,gtk+-2) |
5490480c RW |
3659 | ("libxtst" ,libxtst) |
3660 | ("libxt" ,libxt) | |
3661 | ("mesa" ,mesa) | |
3662 | ("glu" ,glu))) | |
3663 | (native-inputs | |
3664 | `(("pkg-config" ,pkg-config) | |
3665 | ("unzip" ,unzip))) | |
3666 | (home-page "https://www.eclipse.org/swt/") | |
3667 | (synopsis "Widget toolkit for Java") | |
3668 | (description | |
3669 | "SWT is a widget toolkit for Java designed to provide efficient, portable | |
3670 | access to the user-interface facilities of the operating systems on which it | |
3671 | is implemented.") | |
3672 | ;; SWT code is licensed under EPL1.0 | |
3673 | ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1 | |
3674 | ;; Cairo bindings contain code under MPL1.1 | |
3675 | ;; XULRunner 1.9 bindings contain code under MPL2.0 | |
3676 | (license (list | |
3677 | license:epl1.0 | |
3678 | license:mpl1.1 | |
3679 | license:mpl2.0 | |
3680 | license:lgpl2.1+)))) | |
3681 | ||
04100c3b RW |
3682 | ;; java-hamcrest-core uses qdox version 1.12. We package this version instead |
3683 | ;; of the latest release. | |
3684 | (define-public java-qdox-1.12 | |
3685 | (package | |
3686 | (name "java-qdox") | |
3687 | (version "1.12.1") | |
3688 | (source (origin | |
3689 | (method url-fetch) | |
3344bc49 | 3690 | (uri (string-append "https://repo1.maven.org/maven2/" |
04100c3b RW |
3691 | "com/thoughtworks/qdox/qdox/" version |
3692 | "/qdox-" version "-sources.jar")) | |
3693 | (sha256 | |
3694 | (base32 | |
3695 | "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl")))) | |
3696 | (build-system ant-build-system) | |
3697 | (arguments | |
3698 | `(;; Tests require junit | |
3699 | #:tests? #f | |
3700 | #:jar-name "qdox.jar" | |
3701 | #:phases | |
3702 | (modify-phases %standard-phases | |
3703 | (replace 'unpack | |
3704 | (lambda* (#:key source #:allow-other-keys) | |
3705 | (mkdir "src") | |
3706 | (with-directory-excursion "src" | |
2c8ac364 | 3707 | (invoke "jar" "-xf" source)))) |
04100c3b RW |
3708 | ;; At this point we don't have junit, so we must remove the API |
3709 | ;; tests. | |
3710 | (add-after 'unpack 'delete-tests | |
3711 | (lambda _ | |
3712 | (delete-file-recursively "src/com/thoughtworks/qdox/junit") | |
3713 | #t))))) | |
3344bc49 | 3714 | (home-page "https://github.com/codehaus/qdox") |
04100c3b RW |
3715 | (synopsis "Parse definitions from Java source files") |
3716 | (description | |
3717 | "QDox is a high speed, small footprint parser for extracting | |
3718 | class/interface/method definitions from source files complete with JavaDoc | |
b13cf17f | 3719 | @code{@@tags}. It is designed to be used by active code generators or |
04100c3b RW |
3720 | documentation tools.") |
3721 | (license license:asl2.0))) | |
e7e28510 | 3722 | |
5281ba17 BH |
3723 | (define-public java-qdox |
3724 | (package | |
3725 | (name "java-qdox") | |
3726 | ; Newer version exists, but this version is required by java-plexus-component-metadata | |
3727 | (version "2.0-M2") | |
3728 | (source (origin | |
3729 | (method url-fetch) | |
3730 | ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox | |
3731 | ;; Older releases at https://github.com/codehaus/qdox/ | |
3732 | ;; Note: The release at maven is pre-generated. The release at | |
3733 | ;; github requires jflex. | |
3734 | (uri (string-append "https://repo1.maven.org/maven2/" | |
3735 | "com/thoughtworks/qdox/qdox/" version | |
3736 | "/qdox-" version "-sources.jar")) | |
3737 | (sha256 | |
3738 | (base32 | |
3739 | "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x")))) | |
3740 | (build-system ant-build-system) | |
3741 | (arguments | |
3742 | `(#:jar-name "qdox.jar" | |
0ab9eba7 JL |
3743 | #:tests? #f; no tests |
3744 | #:modules | |
3745 | ((guix build ant-build-system) | |
3746 | (guix build java-utils) | |
3747 | (guix build utils) | |
3748 | (sxml simple)) | |
3749 | #:phases | |
3750 | (modify-phases %standard-phases | |
3751 | (add-before 'install 'create-pom | |
3752 | (lambda _ | |
3753 | (with-output-to-file "pom.xml" | |
3754 | (lambda _ | |
3755 | (sxml->xml | |
3756 | `((project | |
3757 | (modelVersion "4.0.0") | |
3758 | (name "QDox") | |
3759 | (groupId "com.thoughtworks.qdox") | |
3760 | (artifactId "qdox") | |
3761 | (version ,,version)))))) | |
3762 | #t)) | |
3763 | (replace 'install | |
3764 | (install-from-pom "pom.xml"))))) | |
5281ba17 BH |
3765 | (home-page "https://github.com/codehaus/qdox") |
3766 | (synopsis "Parse definitions from Java source files") | |
3767 | (description "QDox is a high speed, small footprint parser for extracting | |
3768 | class/interface/method definitions from source files complete with JavaDoc | |
3769 | @code{@@tags}. It is designed to be used by active code generators or | |
3770 | documentation tools.") | |
3771 | (license license:asl2.0))) | |
3772 | ||
0ab9eba7 JL |
3773 | (define-public java-qdox-2-M9 |
3774 | (package | |
3775 | (inherit java-qdox) | |
3776 | (version "2.0-M9"); required by plexus-java | |
3777 | (source (origin | |
3778 | (method url-fetch) | |
3779 | ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox | |
3780 | ;; Older releases at https://github.com/codehaus/qdox/ | |
3781 | ;; Note: The release at maven is pre-generated. The release at | |
3782 | ;; github requires jflex. | |
3783 | (uri (string-append "https://repo1.maven.org/maven2/" | |
3784 | "com/thoughtworks/qdox/qdox/" version | |
3785 | "/qdox-" version "-sources.jar")) | |
3786 | (sha256 | |
3787 | (base32 | |
3788 | "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg")))))) | |
3789 | ||
e7e28510 RW |
3790 | (define-public java-jarjar |
3791 | (package | |
3792 | (name "java-jarjar") | |
3793 | (version "1.4") | |
3794 | (source (origin | |
3795 | (method url-fetch) | |
3796 | (uri (string-append | |
3797 | "https://storage.googleapis.com/google-code-archive-downloads/v2/" | |
3798 | "code.google.com/jarjar/jarjar-src-" version ".zip")) | |
3799 | (sha256 | |
3800 | (base32 | |
88aa75e9 GB |
3801 | "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl")) |
3802 | (modules '((guix build utils))) | |
3803 | (snippet | |
3804 | '(begin | |
3805 | ;; Delete bundled thirds-party jar archives. | |
e0ee843f JL |
3806 | (delete-file-recursively "lib") |
3807 | (delete-file "src/test/enumtest.jar") | |
3808 | ;; the CLASSPATH needs this directory, create an empty one | |
3809 | (mkdir-p "lib") | |
88aa75e9 | 3810 | #t)))) |
e7e28510 RW |
3811 | (build-system ant-build-system) |
3812 | (arguments | |
3813 | `(;; Tests require junit, which ultimately depends on this package. | |
3814 | #:tests? #f | |
3815 | #:build-target "jar" | |
3816 | #:phases | |
3817 | (modify-phases %standard-phases | |
88aa75e9 GB |
3818 | (add-before 'build 'do-not-use-bundled-asm |
3819 | (lambda* (#:key inputs #:allow-other-keys) | |
3820 | (substitute* "build.xml" | |
3821 | (("<path id=\"path.build\">") | |
3822 | (string-append "<path id=\"path.build\"><fileset dir=\"" | |
3823 | (assoc-ref inputs "java-asm-bootstrap") | |
51087d51 | 3824 | "/lib/m2\" includes=\"**/*.jar\"/>")) |
88aa75e9 GB |
3825 | (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "") |
3826 | (("lib/asm-commons-4.0.jar") | |
51087d51 JL |
3827 | (car (find-files (assoc-ref inputs "java-asm-bootstrap") |
3828 | "asm-6.0.jar"))) | |
88aa75e9 GB |
3829 | (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>") |
3830 | (string-append "<include name=\"org/objectweb/asm/" | |
3831 | "commons/Remap*.class\"/>" | |
3832 | "<include name=\"org/objectweb/asm/*.class\"/>" | |
3833 | "<include name=\"org/objectweb/asm/" | |
3834 | "signature/*.class\"/>" | |
3835 | "<include name=\"org/objectweb/asm/" | |
3836 | "commons/SignatureRemapper.class\"/>"))) | |
3837 | #t)) | |
e0ee843f JL |
3838 | (add-before 'build 'remove-maven-dependency |
3839 | (lambda _ | |
3840 | ;; We do not need to build jarjar as a maven plugin just yet, so | |
3841 | ;; remove this file. Maven requires jarjar (but not that plugin), | |
3842 | ;; so removing it improves the bootstrap. | |
3843 | (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java") | |
3844 | #t)) | |
e7e28510 RW |
3845 | (replace 'install |
3846 | (lambda* (#:key outputs #:allow-other-keys) | |
3847 | (let ((target (string-append (assoc-ref outputs "out") | |
3848 | "/share/java"))) | |
3849 | (install-file (string-append "dist/jarjar-" ,version ".jar") | |
3850 | target)) | |
3851 | #t))))) | |
88aa75e9 GB |
3852 | (inputs |
3853 | `(("java-asm-bootstrap" ,java-asm-bootstrap))) | |
e7e28510 RW |
3854 | (native-inputs |
3855 | `(("unzip" ,unzip))) | |
3856 | (home-page "https://code.google.com/archive/p/jarjar/") | |
3857 | (synopsis "Repackage Java libraries") | |
3858 | (description | |
3859 | "Jar Jar Links is a utility that makes it easy to repackage Java | |
3860 | libraries and embed them into your own distribution. Jar Jar Links includes | |
3861 | an Ant task that extends the built-in @code{jar} task.") | |
3862 | (license license:asl2.0))) | |
87c31a21 RW |
3863 | |
3864 | (define-public java-hamcrest-core | |
3865 | (package | |
3866 | (name "java-hamcrest-core") | |
3867 | (version "1.3") | |
3868 | (source (origin | |
2703d573 EF |
3869 | (method git-fetch) |
3870 | (uri (git-reference | |
3871 | (url "https://github.com/hamcrest/JavaHamcrest/") | |
3872 | (commit (string-append "hamcrest-java-" version)))) | |
3873 | (file-name (git-file-name name version)) | |
87c31a21 RW |
3874 | (sha256 |
3875 | (base32 | |
2703d573 | 3876 | "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63")) |
87c31a21 RW |
3877 | (modules '((guix build utils))) |
3878 | (snippet | |
3879 | '(begin | |
00672896 HG |
3880 | ;; Delete bundled thirds-party jar archives. |
3881 | (delete-file-recursively "lib") | |
87c31a21 RW |
3882 | #t)))) |
3883 | (build-system ant-build-system) | |
3884 | (arguments | |
3885 | `(#:tests? #f ; Tests require junit | |
a8d3cb62 | 3886 | #:modules ((guix build ant-build-system) |
fff4fcc4 | 3887 | (guix build java-utils) |
a8d3cb62 RW |
3888 | (guix build utils) |
3889 | (srfi srfi-1)) | |
87c31a21 | 3890 | #:make-flags (list (string-append "-Dversion=" ,version)) |
fae0b4ca | 3891 | #:test-target "unit-test" |
87c31a21 RW |
3892 | #:build-target "core" |
3893 | #:phases | |
3894 | (modify-phases %standard-phases | |
3895 | ;; Disable unit tests, because they require junit, which requires | |
3896 | ;; hamcrest-core. We also give a fixed value to the "Built-Date" | |
3897 | ;; attribute from the manifest for reproducibility. | |
3898 | (add-before 'configure 'patch-build.xml | |
3899 | (lambda _ | |
3900 | (substitute* "build.xml" | |
3901 | (("unit-test, ") "") | |
3902 | (("\\$\\{build.timestamp\\}") "guix")) | |
3903 | #t)) | |
3904 | ;; Java's "getMethods()" returns methods in an unpredictable order. | |
3905 | ;; To make the output of the generated code deterministic we must | |
3906 | ;; sort the array of methods. | |
3907 | (add-after 'unpack 'make-method-order-deterministic | |
3908 | (lambda _ | |
3909 | (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java" | |
3910 | (("import java\\.util\\.Iterator;" line) | |
3911 | (string-append line "\n" | |
3912 | "import java.util.Arrays; import java.util.Comparator;")) | |
3913 | (("allMethods = cls\\.getMethods\\(\\);" line) | |
3914 | (string-append "_" line | |
3915 | " | |
3916 | private Method[] getSortedMethods() { | |
3917 | Arrays.sort(_allMethods, new Comparator<Method>() { | |
3918 | @Override | |
3919 | public int compare(Method a, Method b) { | |
3920 | return a.toString().compareTo(b.toString()); | |
3921 | } | |
3922 | }); | |
3923 | return _allMethods; | |
3924 | } | |
3925 | ||
2c8ac364 MW |
3926 | private Method[] allMethods = getSortedMethods();"))) |
3927 | #t)) | |
87c31a21 RW |
3928 | (add-before 'build 'do-not-use-bundled-qdox |
3929 | (lambda* (#:key inputs #:allow-other-keys) | |
3930 | (substitute* "build.xml" | |
3931 | (("lib/generator/qdox-1.12.jar") | |
3932 | (string-append (assoc-ref inputs "java-qdox-1.12") | |
3933 | "/share/java/qdox.jar"))) | |
3934 | #t)) | |
fab959d3 HG |
3935 | ;; build.xml searches for .jar files in this directoy, which |
3936 | ;; we remove from the source archive. | |
3937 | (add-before 'build 'create-dummy-directories | |
3938 | (lambda _ | |
3939 | (mkdir-p "lib/integration") | |
3940 | #t)) | |
fff4fcc4 JL |
3941 | (add-before 'build 'create-pom |
3942 | (lambda _ | |
3943 | (substitute* "pom/hamcrest-core.pom" | |
3944 | (("@VERSION@") ,version)) | |
3945 | #t)) | |
87c31a21 | 3946 | (replace 'install |
fff4fcc4 | 3947 | (install-from-pom "pom/hamcrest-core.pom"))))) |
87c31a21 RW |
3948 | (native-inputs |
3949 | `(("java-qdox-1.12" ,java-qdox-1.12) | |
3950 | ("java-jarjar" ,java-jarjar))) | |
fff4fcc4 JL |
3951 | (propagated-inputs |
3952 | `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom))) | |
87c31a21 RW |
3953 | (home-page "http://hamcrest.org/") |
3954 | (synopsis "Library of matchers for building test expressions") | |
3955 | (description | |
3956 | "This package provides a library of matcher objects (also known as | |
3957 | constraints or predicates) allowing @code{match} rules to be defined | |
3958 | declaratively, to be used in other frameworks. Typical scenarios include | |
3959 | testing frameworks, mocking libraries and UI validation rules.") | |
3960 | (license license:bsd-2))) | |
d0184f44 | 3961 | |
fff4fcc4 JL |
3962 | (define java-hamcrest-parent-pom |
3963 | (package | |
3964 | (inherit java-hamcrest-core) | |
3965 | (name "java-hamcrest-parent-pom") | |
3966 | (propagated-inputs '()) | |
3967 | (native-inputs '()) | |
3968 | (arguments | |
3969 | `(#:tests? #f | |
3970 | #:phases | |
3971 | (modify-phases %standard-phases | |
3972 | (delete 'configure) | |
3973 | (replace 'build | |
3974 | (lambda _ | |
3975 | (substitute* "pom/hamcrest-parent.pom" | |
3976 | (("@VERSION@") ,(package-version java-hamcrest-core))) | |
3977 | #t)) | |
3978 | (replace 'install | |
3979 | (install-pom-file "pom/hamcrest-parent.pom"))))))) | |
3980 | ||
031516d6 JL |
3981 | (define-public java-hamcrest-library |
3982 | (package | |
3983 | (inherit java-hamcrest-core) | |
3984 | (name "java-hamcrest-library") | |
3985 | (arguments | |
3986 | (substitute-keyword-arguments (package-arguments java-hamcrest-core) | |
fff4fcc4 JL |
3987 | ((#:build-target _) "library") |
3988 | ((#:phases phases) | |
3989 | `(modify-phases ,phases | |
7bbe61f8 JL |
3990 | (add-after 'unpack 'patch-classpath-for-integration |
3991 | (lambda* (#:key inputs #:allow-other-keys) | |
3992 | (substitute* "build.xml" | |
3993 | (("build/hamcrest-core-\\$\\{version\\}\\.jar") | |
3994 | (car (find-files (assoc-ref inputs "java-hamcrest-core") | |
3995 | "jar$")))) | |
3996 | #t)) | |
fff4fcc4 JL |
3997 | (replace 'create-pom |
3998 | (lambda _ | |
3999 | (substitute* "pom/hamcrest-library.pom" | |
4000 | (("@VERSION@") ,(package-version java-hamcrest-core))) | |
4001 | #t)) | |
4002 | (replace 'install | |
4003 | (install-from-pom "pom/hamcrest-library.pom")))))) | |
031516d6 | 4004 | (propagated-inputs |
fff4fcc4 JL |
4005 | `(("java-hamcrest-core" ,java-hamcrest-core) |
4006 | ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom))))) | |
031516d6 | 4007 | |
d0184f44 RW |
4008 | (define-public java-junit |
4009 | (package | |
4010 | (name "java-junit") | |
4011 | (version "4.12") | |
4012 | (source (origin | |
42c1c59e EF |
4013 | (method git-fetch) |
4014 | (uri (git-reference | |
4015 | (url "https://github.com/junit-team/junit/") | |
4016 | (commit (string-append "r" version)))) | |
4017 | (file-name (git-file-name name version)) | |
d0184f44 RW |
4018 | (sha256 |
4019 | (base32 | |
42c1c59e | 4020 | "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h")) |
d0184f44 RW |
4021 | (modules '((guix build utils))) |
4022 | (snippet | |
4023 | '(begin | |
4024 | ;; Delete bundled jar archives. | |
4025 | (delete-file-recursively "lib") | |
4026 | #t)))) | |
4027 | (build-system ant-build-system) | |
4028 | (arguments | |
29428e10 JL |
4029 | `(#:jar-name "junit.jar" |
4030 | #:source-dir "src/main/java" | |
4031 | #:test-dir "src/test" | |
4032 | #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java" | |
4033 | "**/RuleChainTest.java" "**/TestWatchmanTest.java") | |
4034 | #:phases | |
4035 | (modify-phases %standard-phases | |
4036 | (add-before 'check 'copy-test-resources | |
4037 | (lambda _ | |
4038 | (copy-recursively "src/test/resources" "build/test-classes") | |
fff4fcc4 JL |
4039 | #t)) |
4040 | (replace 'install | |
4041 | (install-from-pom "pom.xml"))))) | |
29428e10 | 4042 | (propagated-inputs |
d0184f44 | 4043 | `(("java-hamcrest-core" ,java-hamcrest-core))) |
29428e10 JL |
4044 | (native-inputs |
4045 | `(("java-hamcrest-library" ,java-hamcrest-library))) | |
42c1c59e | 4046 | (home-page "https://junit.org/junit4/") |
d0184f44 RW |
4047 | (synopsis "Test framework for Java") |
4048 | (description | |
4049 | "JUnit is a simple framework to write repeatable tests for Java projects. | |
4050 | JUnit provides assertions for testing expected results, test fixtures for | |
4051 | sharing common test data, and test runners for running tests.") | |
4052 | (license license:epl1.0))) | |
9fb20d01 | 4053 | |
52a23d8e JL |
4054 | (define-public java-junitparams |
4055 | (package | |
4056 | (name "java-junitparams") | |
4057 | (version "1.1.1") | |
4058 | (source (origin | |
4059 | (method git-fetch) | |
4060 | (uri (git-reference | |
4061 | (url "https://github.com/Pragmatists/JUnitParams") | |
4062 | (commit (string-append "JUnitParams-" version)))) | |
4063 | (file-name (git-file-name name version)) | |
4064 | (sha256 | |
4065 | (base32 | |
4066 | "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b")))) | |
4067 | (build-system ant-build-system) | |
4068 | (arguments | |
4069 | `(#:jar-name "junitparams.jar" | |
4070 | #:source-dir "src/main/java" | |
4071 | #:test-dir "src/test" | |
4072 | #:test-exclude (list "**/SuperclassTest.java"))) | |
4073 | (inputs | |
4074 | `(("java-junit" ,java-junit))) | |
4075 | (native-inputs | |
4076 | `(("java-junit" ,java-junit) | |
4077 | ("java-hamcrest-core" ,java-hamcrest-core) | |
4078 | ("java-assertj" ,java-assertj))) | |
4079 | (home-page "https://github.com/Pragmatists/JUnitParams") | |
4080 | (synopsis "Parameterised test support for JUnit") | |
4081 | (description "The JUnitParams project adds a new runner to JUnit and | |
4082 | provides much easier and readable parametrised tests for JUnit.") | |
4083 | (license license:asl2.0))) | |
4084 | ||
9fb20d01 RW |
4085 | (define-public java-plexus-utils |
4086 | (package | |
4087 | (name "java-plexus-utils") | |
b3971a5c JL |
4088 | ;; sisu-build-api needs this version, later versions don't work |
4089 | (version "3.2.1") | |
9fb20d01 | 4090 | (source (origin |
c53badd4 EF |
4091 | (method git-fetch) |
4092 | (uri (git-reference | |
4093 | (url "https://github.com/codehaus-plexus/plexus-utils") | |
4094 | (commit (string-append "plexus-utils-" version)))) | |
4095 | (file-name (git-file-name name version)) | |
9fb20d01 RW |
4096 | (sha256 |
4097 | (base32 | |
b3971a5c | 4098 | "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b")))) |
9fb20d01 RW |
4099 | (build-system ant-build-system) |
4100 | ;; FIXME: The default build.xml does not include a target to install | |
4101 | ;; javadoc files. | |
4102 | (arguments | |
4103 | `(#:jar-name "plexus-utils.jar" | |
4104 | #:source-dir "src/main" | |
4105 | #:phases | |
4106 | (modify-phases %standard-phases | |
4107 | (add-after 'unpack 'fix-reference-to-/bin-and-/usr | |
4108 | (lambda _ | |
4109 | (substitute* "src/main/java/org/codehaus/plexus/util/\ | |
4110 | cli/shell/BourneShell.java" | |
4111 | (("/bin/sh") (which "sh")) | |
4112 | (("/usr/") (getcwd))) | |
4113 | #t)) | |
4114 | (add-after 'unpack 'fix-or-disable-broken-tests | |
4115 | (lambda _ | |
4116 | (with-directory-excursion "src/test/java/org/codehaus/plexus/util" | |
4117 | (substitute* '("cli/CommandlineTest.java" | |
4118 | "cli/shell/BourneShellTest.java") | |
4119 | (("/bin/sh") (which "sh")) | |
4120 | (("/bin/echo") (which "echo"))) | |
4121 | ||
4122 | ;; This test depends on MavenProjectStub, but we don't have | |
4123 | ;; a package for Maven. | |
4124 | (delete-file "introspection/ReflectionValueExtractorTest.java") | |
4125 | ||
4126 | ;; FIXME: The command line tests fail, maybe because they use | |
4127 | ;; absolute paths. | |
b3971a5c JL |
4128 | (delete-file "cli/CommandlineTest.java") |
4129 | ||
4130 | ;; These tests require openjdk jmh, which is not packaged yet | |
4131 | (for-each delete-file (find-files "." "PerfTest.java$"))) | |
4132 | #t)) | |
4133 | (add-before 'build 'copy-resources | |
4134 | (lambda _ | |
4135 | (copy-recursively "src/main/resources" "build/classes") | |
4136 | #t)) | |
4137 | (replace 'install (install-from-pom "pom.xml"))))) | |
9fb20d01 | 4138 | (native-inputs |
0cd8efcc JL |
4139 | `(("java-hamcrest-core" ,java-hamcrest-core) |
4140 | ("java-junit" ,java-junit))) | |
b3971a5c JL |
4141 | (propagated-inputs |
4142 | `(("plexus-parent-pom" ,plexus-parent-pom-5.1))) | |
1b4d40cf | 4143 | (home-page "https://codehaus-plexus.github.io/plexus-utils/") |
9fb20d01 RW |
4144 | (synopsis "Common utilities for the Plexus framework") |
4145 | (description "This package provides various Java utility classes for the | |
4146 | Plexus framework to ease working with strings, files, command lines, XML and | |
4147 | more.") | |
4148 | (license license:asl2.0))) | |
1e555562 | 4149 | |
2ddf13ae JL |
4150 | (define-public java-plexus-utils-3.3.0 |
4151 | (package | |
4152 | (inherit java-plexus-utils) | |
4153 | (version "3.3.0") | |
4154 | (source (origin | |
4155 | (method git-fetch) | |
4156 | (uri (git-reference | |
4157 | (url "https://github.com/codehaus-plexus/plexus-utils") | |
4158 | (commit (string-append "plexus-utils-" version)))) | |
4159 | (file-name (git-file-name "java-plexus-utils" version)) | |
4160 | (sha256 | |
4161 | (base32 | |
4162 | "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g")))))) | |
4163 | ||
1e555562 HG |
4164 | (define-public java-plexus-interpolation |
4165 | (package | |
4166 | (name "java-plexus-interpolation") | |
6671d6a1 | 4167 | (version "1.26") |
1e555562 | 4168 | (source (origin |
c4b67ba3 EF |
4169 | (method git-fetch) |
4170 | (uri (git-reference | |
4171 | (url "https://github.com/codehaus-plexus/plexus-interpolation") | |
4172 | (commit (string-append "plexus-interpolation-" version)))) | |
4173 | (file-name (git-file-name name version)) | |
1e555562 HG |
4174 | (sha256 |
4175 | (base32 | |
6671d6a1 | 4176 | "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh")))) |
1e555562 HG |
4177 | (build-system ant-build-system) |
4178 | (arguments | |
4179 | `(#:jar-name "plexus-interpolation.jar" | |
6671d6a1 JL |
4180 | #:source-dir "src/main" |
4181 | #:phases | |
4182 | (modify-phases %standard-phases | |
4183 | (replace 'install (install-from-pom "pom.xml"))))) | |
4184 | (propagated-inputs | |
4185 | `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1))) | |
1e555562 HG |
4186 | (native-inputs |
4187 | `(("java-junit" ,java-junit) | |
4188 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
35e74723 | 4189 | (home-page "https://codehaus-plexus.github.io/plexus-interpolation/") |
1e555562 HG |
4190 | (synopsis "Java components for interpolating ${} strings and the like") |
4191 | (description "Plexus interpolator is a modular, flexible interpolation | |
4192 | framework for the expression language style commonly seen in Maven, Plexus, | |
4193 | and other related projects. | |
4194 | ||
4195 | It has its foundation in the @code{org.codehaus.plexus.utils.interpolation} | |
4196 | package within @code{plexus-utils}, but has been separated in order to allow | |
4197 | these two libraries to vary independently of one another.") | |
4198 | (license license:asl2.0))) | |
8f8ed9aa | 4199 | |
bb27eb0d JL |
4200 | (define-public java-plexus-classworlds |
4201 | (package | |
4202 | (name "java-plexus-classworlds") | |
ae913096 | 4203 | (version "2.6.0") |
bb27eb0d | 4204 | (source (origin |
9520b2b1 EF |
4205 | (method git-fetch) |
4206 | (uri (git-reference | |
4207 | (url "https://github.com/codehaus-plexus/plexus-classworlds") | |
4208 | (commit (string-append "plexus-classworlds-" version)))) | |
4209 | (file-name (git-file-name name version)) | |
bb27eb0d JL |
4210 | (sha256 |
4211 | (base32 | |
ae913096 | 4212 | "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s")))) |
bb27eb0d JL |
4213 | (build-system ant-build-system) |
4214 | (arguments | |
4215 | `(#:jar-name "plexus-classworlds.jar" | |
4216 | #:source-dir "src/main" | |
ae913096 JL |
4217 | #:tests? #f;; FIXME: we need to generate some resources as in pom.xml |
4218 | #:phases | |
4219 | (modify-phases %standard-phases | |
4220 | (replace 'install (install-from-pom "pom.xml"))))) | |
4221 | (propagated-inputs | |
4222 | `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1))) | |
bb27eb0d JL |
4223 | (native-inputs |
4224 | `(("java-junit" ,java-junit))) | |
268dc472 | 4225 | (home-page "https://codehaus-plexus.github.io/plexus-classworlds/") |
bb27eb0d | 4226 | (synopsis "Java class loader framework") |
f4548394 TGR |
4227 | (description "Plexus classworlds replaces the native @code{ClassLoader} |
4228 | mechanism of Java. It is especially useful for dynamic loading of application | |
bb27eb0d JL |
4229 | components.") |
4230 | (license license:asl2.0))) | |
4231 | ||
a7ad92ad | 4232 | (define java-plexus-container-default-bootstrap |
0726d4ea JL |
4233 | (package |
4234 | (name "java-plexus-container-default-bootstrap") | |
4235 | (version "1.7.1") | |
4236 | (source (origin | |
3a26ea3a EF |
4237 | (method git-fetch) |
4238 | (uri (git-reference | |
4239 | (url "https://github.com/codehaus-plexus/plexus-containers") | |
4240 | (commit (string-append "plexus-containers-" version)))) | |
4241 | (file-name (git-file-name name version)) | |
0726d4ea JL |
4242 | (sha256 |
4243 | (base32 | |
3a26ea3a | 4244 | "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228")))) |
0726d4ea JL |
4245 | (build-system ant-build-system) |
4246 | (arguments | |
4247 | `(#:jar-name "container-default.jar" | |
4248 | #:source-dir "plexus-container-default/src/main/java" | |
4249 | #:test-dir "plexus-container-default/src/test" | |
0726d4ea JL |
4250 | #:tests? #f; requires plexus-archiver, which depends on this package |
4251 | #:phases | |
4252 | (modify-phases %standard-phases | |
02ed96dc JL |
4253 | (add-before 'build 'fix-google-collections |
4254 | (lambda _ | |
4255 | ;; Google collections are now replaced with guava | |
4256 | (substitute* "plexus-container-default/pom.xml" | |
4257 | (("google-collections") "guava") | |
4258 | (("com.google.collections") "com.google.guava")) | |
4259 | #t)) | |
0726d4ea JL |
4260 | (add-before 'build 'copy-resources |
4261 | (lambda _ | |
4262 | (copy-recursively | |
4263 | "plexus-container-default/src/main/resources/" | |
4264 | "build/classes") | |
02ed96dc JL |
4265 | #t)) |
4266 | (replace 'install | |
4267 | (install-from-pom "plexus-container-default/pom.xml"))))) | |
4268 | (propagated-inputs | |
4269 | `(("java-plexus-worldclass" ,java-plexus-classworlds) | |
4270 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
4271 | ("java-plexus-utils" ,java-plexus-utils) | |
4272 | ("java-junit" ,java-junit) | |
4273 | ("java-guava" ,java-guava) | |
4274 | ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom))) | |
0726d4ea | 4275 | (home-page "https://github.com/codehaus-plexus/plexus-containers") |
f4548394 | 4276 | (synopsis "Inversion-of-control container") |
0726d4ea | 4277 | (description "Plexus-default-container is Plexus' inversion-of-control |
f4548394 | 4278 | (@dfn{IoC}) container. It is composed of its public API and its default |
0726d4ea JL |
4279 | implementation.") |
4280 | (license license:asl2.0))) | |
4281 | ||
02ed96dc JL |
4282 | (define java-plexus-containers-parent-pom |
4283 | (package | |
4284 | (inherit java-plexus-container-default-bootstrap) | |
4285 | (name "java-plexus-containers-parent-pom") | |
4286 | (arguments | |
4287 | `(#:tests? #f | |
4288 | #:phases | |
4289 | (modify-phases %standard-phases | |
4290 | (delete 'configure) | |
4291 | (delete 'build) | |
4292 | (replace 'install | |
4293 | (install-pom-file "pom.xml"))))) | |
4294 | (propagated-inputs | |
4295 | `(("plexus-parent-pom" ,plexus-parent-pom-4.0))))) | |
4296 | ||
0858b9dc JL |
4297 | (define-public java-plexus-io |
4298 | (package | |
4299 | (name "java-plexus-io") | |
79265a45 | 4300 | (version "3.2.0") |
0858b9dc | 4301 | (source (origin |
48fe942c EF |
4302 | (method git-fetch) |
4303 | (uri (git-reference | |
4304 | (url "https://github.com/codehaus-plexus/plexus-io") | |
4305 | (commit (string-append "plexus-io-" version)))) | |
4306 | (file-name (git-file-name name version)) | |
0858b9dc JL |
4307 | (sha256 |
4308 | (base32 | |
79265a45 | 4309 | "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr")))) |
0858b9dc JL |
4310 | (build-system ant-build-system) |
4311 | (arguments | |
4312 | `(#:jar-name "plexus-io.jar" | |
4313 | #:source-dir "src/main/java" | |
4314 | #:test-dir "src/test" | |
0858b9dc JL |
4315 | #:phases |
4316 | (modify-phases %standard-phases | |
4317 | (add-before 'build 'copy-resources | |
4318 | (lambda _ | |
79265a45 JL |
4319 | (mkdir-p "build/classes") |
4320 | (copy-recursively "src/main/resources" "build/classes") | |
4321 | (mkdir-p "build/test-classes") | |
4322 | (copy-recursively "src/test/resources" "build/test-classes") | |
4323 | #t)) | |
4324 | (replace 'install (install-from-pom "pom.xml"))))) | |
4325 | (propagated-inputs | |
4326 | `(("java-plexus-utils" ,java-plexus-utils-3.3.0) | |
4327 | ("java-commons-io" ,java-commons-io) | |
4328 | ("plexus-parent-pom" ,plexus-parent-pom-5.1))) | |
0858b9dc | 4329 | (inputs |
79265a45 | 4330 | `(("java-jsr305" ,java-jsr305))) |
0858b9dc JL |
4331 | (native-inputs |
4332 | `(("junit" ,java-junit) | |
4333 | ("hamcrest" ,java-hamcrest-core) | |
4334 | ("guava" ,java-guava) | |
4335 | ("classworlds" ,java-plexus-classworlds) | |
4336 | ("xbean" ,java-geronimo-xbean-reflect) | |
4337 | ("container-default" ,java-plexus-container-default-bootstrap))) | |
4338 | (home-page "https://github.com/codehaus-plexus/plexus-io") | |
4339 | (synopsis "I/O plexus components") | |
4340 | (description "Plexus IO is a set of plexus components, which are designed | |
4341 | for use in I/O operations. This implementation using plexus components allows | |
4342 | reusing it in maven.") | |
4343 | (license license:asl2.0))) | |
4344 | ||
b51df3ca JL |
4345 | (define-public java-plexus-archiver |
4346 | (package | |
4347 | (name "java-plexus-archiver") | |
02ed96dc | 4348 | (version "4.2.2") |
b51df3ca JL |
4349 | (source (origin |
4350 | (method url-fetch) | |
4351 | (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver" | |
4352 | "/archive/plexus-archiver-" version ".tar.gz")) | |
4353 | (sha256 | |
4354 | (base32 | |
02ed96dc | 4355 | "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys")))) |
b51df3ca JL |
4356 | (build-system ant-build-system) |
4357 | (arguments | |
4358 | `(#:jar-name "plexus-archiver.jar" | |
4359 | #:source-dir "src/main/java" | |
b51df3ca JL |
4360 | #:test-dir "src/test" |
4361 | #:test-exclude (list "**/Abstract*.java" "**/Base*.java") | |
4362 | #:phases | |
4363 | (modify-phases %standard-phases | |
4364 | (add-before 'check 'remove-failing | |
4365 | (lambda _ | |
4366 | ;; Requires an older version of plexus container | |
4367 | (delete-file | |
2c8ac364 MW |
4368 | "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java") |
4369 | #t)) | |
6f737ae6 JL |
4370 | (add-before 'check 'fix-test-building |
4371 | (lambda _ | |
4372 | (substitute* "build.xml" | |
4373 | (("srcdir=\"src/test\"") "srcdir=\"src/test/java\"")) | |
4374 | #t)) | |
b51df3ca JL |
4375 | (add-before 'build 'copy-resources |
4376 | (lambda _ | |
02ed96dc JL |
4377 | (mkdir-p "build/classes") |
4378 | (copy-recursively "src/main/resources" "build/classes") | |
4379 | (mkdir-p "build/test-classes") | |
4380 | (copy-recursively "src/test/resources" "build/test-classes") | |
4381 | #t)) | |
4382 | (replace 'install (install-from-pom "pom.xml"))))) | |
4383 | (propagated-inputs | |
4384 | `(("java-plexus-utils" ,java-plexus-utils-3.3.0) | |
4385 | ("java-plexus-io" ,java-plexus-io) | |
4386 | ("java-iq80-snappy" ,java-iq80-snappy) | |
4387 | ("java-commons-compress" ,java-commons-compress) | |
4388 | ("plexus-parent-pom" ,plexus-parent-pom-6.1))) | |
b51df3ca | 4389 | (inputs |
02ed96dc JL |
4390 | `(("java-jsr305" ,java-jsr305) |
4391 | ("java-plexus-container-default" | |
4392 | ,java-plexus-container-default-bootstrap))) | |
b51df3ca | 4393 | (native-inputs |
6f737ae6 JL |
4394 | `(("java-hamcrest-core" ,java-hamcrest-core) |
4395 | ("junit" ,java-junit) | |
b51df3ca JL |
4396 | ("classworld" ,java-plexus-classworlds) |
4397 | ("xbean" ,java-geronimo-xbean-reflect) | |
d308bc01 | 4398 | ("xz" ,java-xz) |
b51df3ca JL |
4399 | ("guava" ,java-guava))) |
4400 | (home-page "https://github.com/codehaus-plexus/plexus-archiver") | |
4401 | (synopsis "Archiver component of the Plexus project") | |
4402 | (description "Plexus-archiver contains a component to deal with project | |
4403 | archives (jar).") | |
4404 | (license license:asl2.0))) | |
4405 | ||
a0837294 JL |
4406 | (define-public java-plexus-container-default |
4407 | (package | |
4408 | (inherit java-plexus-container-default-bootstrap) | |
4409 | (name "java-plexus-container-default") | |
4410 | (arguments | |
4411 | `(#:jar-name "container-default.jar" | |
4412 | #:source-dir "plexus-container-default/src/main/java" | |
4413 | #:test-dir "plexus-container-default/src/test" | |
4414 | #:test-exclude (list ;"**/*Test.java" | |
4415 | "**/Abstract*.java" | |
4416 | ;; Requires plexus-hierarchy | |
4417 | "**/PlexusHierarchyTest.java" | |
4418 | ;; Failures | |
4419 | "**/ComponentRealmCompositionTest.java" | |
4420 | "**/PlexusContainerTest.java") | |
a0837294 JL |
4421 | #:phases |
4422 | (modify-phases %standard-phases | |
51087d51 JL |
4423 | (add-before 'build 'fix-google-collections |
4424 | (lambda _ | |
4425 | ;; Google collections are now replaced with guava | |
4426 | (substitute* "plexus-container-default/pom.xml" | |
4427 | (("google-collections") "guava") | |
4428 | (("com.google.collections") "com.google.guava")) | |
4429 | #t)) | |
a0837294 JL |
4430 | (add-before 'build 'copy-resources |
4431 | (lambda _ | |
4432 | (copy-recursively | |
4433 | "plexus-container-default/src/main/resources/" | |
4434 | "build/classes") | |
4435 | #t)) | |
4436 | (add-before 'check 'fix-paths | |
4437 | (lambda _ | |
4438 | (let ((dir "plexus-container-default/src/test/java/org/codehaus")) | |
4439 | (substitute* | |
4440 | (string-append | |
4441 | dir "/plexus/component/composition/" | |
4442 | "ComponentRealmCompositionTest.java") | |
4443 | (("src/test") "plexus-container-default/src/test")) | |
51087d51 JL |
4444 | #t))) |
4445 | (replace 'install | |
4446 | (install-from-pom "plexus-container-default/pom.xml"))))) | |
a0837294 JL |
4447 | (inputs |
4448 | `(("worldclass" ,java-plexus-classworlds) | |
4449 | ("xbean" ,java-geronimo-xbean-reflect) | |
4450 | ("utils" ,java-plexus-utils) | |
4451 | ("junit" ,java-junit) | |
4452 | ("guava" ,java-guava))) | |
4453 | (native-inputs | |
4454 | `(("archiver" ,java-plexus-archiver) | |
4455 | ("hamcrest" ,java-hamcrest-core))))) | |
4456 | ||
3214afab JL |
4457 | (define-public java-plexus-component-annotations |
4458 | (package | |
4459 | (inherit java-plexus-container-default) | |
4460 | (name "java-plexus-component-annotations") | |
4461 | (arguments | |
4462 | `(#:jar-name "plexus-component-annotations.jar" | |
4463 | #:source-dir "plexus-component-annotations/src/main/java" | |
51087d51 JL |
4464 | #:tests? #f; no tests |
4465 | #:phases | |
4466 | (modify-phases %standard-phases | |
4467 | (replace 'install | |
4468 | (install-from-pom "plexus-component-annotations/pom.xml"))))) | |
4469 | (propagated-inputs | |
4470 | `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom))) | |
3214afab JL |
4471 | (inputs '()) |
4472 | (native-inputs '()) | |
4473 | (synopsis "Plexus descriptors generator") | |
4474 | (description "This package is a Maven plugin to generate Plexus descriptors | |
4475 | from source tags and class annotations."))) | |
4476 | ||
015e8774 JL |
4477 | (define-public java-plexus-component-metadata |
4478 | (package | |
4479 | (inherit java-plexus-container-default) | |
4480 | (name "java-plexus-component-metadata") | |
4481 | (arguments | |
4482 | `(#:jar-name "plexus-component-metadata.jar" | |
4483 | #:source-dir "src/main/java" | |
4484 | #:test-dir "src/test" | |
4485 | #:jdk ,icedtea-8 | |
4486 | #:phases | |
4487 | (modify-phases %standard-phases | |
4488 | (add-before 'configure 'chdir | |
4489 | (lambda _ | |
4490 | (chdir "plexus-component-metadata") | |
4491 | #t)) | |
4492 | (add-before 'build 'copy-resources | |
4493 | (lambda _ | |
4494 | (copy-recursively "src/main/resources" | |
4495 | "build/classes/") | |
4496 | #t))))) | |
4497 | (propagated-inputs | |
4498 | `(("java-plexus-container-default" ,java-plexus-container-default) | |
4499 | ("java-plexu-component-annotations" ,java-plexus-component-annotations) | |
4500 | ("java-plexus-utils" ,java-plexus-utils) | |
4501 | ("java-plexus-cli" ,java-plexus-cli) | |
4502 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
4503 | ("maven-plugin-api" ,maven-plugin-api) | |
4504 | ("maven-plugin-annotations" ,maven-plugin-annotations) | |
4505 | ("maven-core-bootstrap" ,maven-core-bootstrap) | |
4506 | ("maven-model" ,maven-model) | |
4507 | ("java-commons-cli" ,java-commons-cli) | |
4508 | ("java-qdox" ,java-qdox) | |
4509 | ("java-jdom2" ,java-jdom2) | |
4510 | ("java-asm" ,java-asm))) | |
4511 | (native-inputs | |
4512 | `(("java-junit" ,java-junit) | |
4513 | ("java-guava" ,java-guava) | |
4514 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect))) | |
4515 | (synopsis "Inversion-of-control container for Maven") | |
4516 | (description "The Plexus project provides a full software stack for creating | |
4517 | and executing software projects. Based on the Plexus container, the | |
4518 | applications can utilise component-oriented programming to build modular, | |
4519 | reusable components that can easily be assembled and reused. This package | |
4520 | provides the Maven plugin generating the component metadata."))) | |
4521 | ||
4f77ba17 JL |
4522 | (define-public java-plexus-cipher |
4523 | (package | |
4524 | (name "java-plexus-cipher") | |
4525 | (version "1.7") | |
4526 | (source (origin | |
d0e64613 EF |
4527 | (method git-fetch) |
4528 | (uri (git-reference | |
4529 | (url "https://github.com/codehaus-plexus/plexus-cipher") | |
4530 | (commit (string-append "plexus-cipher-" version)))) | |
4531 | (file-name (git-file-name name version)) | |
4f77ba17 JL |
4532 | (sha256 |
4533 | (base32 | |
d0e64613 | 4534 | "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0")))) |
4f77ba17 JL |
4535 | (build-system ant-build-system) |
4536 | (arguments | |
4537 | `(#:jar-name "plexus-cipher.jar" | |
4538 | #:source-dir "src/main/java" | |
4f77ba17 JL |
4539 | #:tests? #f; FIXME: requires sisu-inject-bean |
4540 | #:phases | |
4541 | (modify-phases %standard-phases | |
4542 | (add-before 'build 'copy-resources | |
4543 | (lambda _ | |
4544 | (copy-recursively "src/main/resources" "build/classes") | |
4545 | (mkdir-p "build/classes/META-INF/sisu") | |
4546 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
4547 | (lambda _ | |
4548 | (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n"))) | |
51087d51 JL |
4549 | #t)) |
4550 | (add-before 'install 'fix-test-dependency | |
4551 | (lambda _ | |
4552 | ;; sisu-inject-bean is only used for tests, but its scope is "provided". | |
4553 | (substitute* "pom.xml" | |
4554 | (("provided") "test")) | |
4555 | #t)) | |
4556 | (replace 'install (install-from-pom "pom.xml"))))) | |
4f77ba17 JL |
4557 | (inputs |
4558 | `(("java-cdi-api" ,java-cdi-api) | |
4559 | ("java-javax-inject" ,java-javax-inject))) | |
51087d51 JL |
4560 | (propagated-inputs |
4561 | `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15))) | |
4562 | (native-inputs | |
4563 | `(("java-junit" ,java-junit))) | |
4f77ba17 JL |
4564 | (home-page "https://github.com/sonatype/plexus-cipher") |
4565 | (synopsis "Encryption/decryption Component") | |
4566 | (description "Plexus-cipher contains a component to deal with encryption | |
4567 | and decryption.") | |
4568 | (license license:asl2.0))) | |
4569 | ||
8630a080 JL |
4570 | (define-public java-plexus-java |
4571 | (package | |
4572 | (name "java-plexus-java") | |
4573 | (version "0.9.10") | |
4574 | (source (origin | |
4575 | (method git-fetch) | |
4576 | (uri (git-reference | |
4577 | (url "https://github.com/codehaus-plexus/plexus-languages") | |
4578 | (commit (string-append "plexus-languages-" version)))) | |
4579 | (file-name (git-file-name name version)) | |
4580 | (sha256 | |
4581 | (base32 | |
4582 | "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5")) | |
4583 | (modules '((guix build utils))) | |
4584 | (snippet | |
4585 | `(begin | |
4586 | (for-each delete-file (find-files "." ".*.jar$")) | |
4587 | #t)))) | |
4588 | (build-system ant-build-system) | |
4589 | (arguments | |
4590 | `(#:jar-name "plexus-java.java" | |
4591 | #:source-dir "plexus-java/src/main/java" | |
4592 | #:test-dir "plexus-java/src/test" | |
4593 | #:tests? #f; require mockito 2 | |
4594 | #:phases | |
4595 | (modify-phases %standard-phases | |
4596 | (add-after 'build 'generate-metadata | |
4597 | (lambda _ | |
4598 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
4599 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
4600 | "--source" "plexus-java/src/main/java" | |
4601 | "--output" "build/classes/META-INF/plexus/components.xml" | |
4602 | "--classes" "build/classes" | |
4603 | "--descriptors" "build/classes/META-INF") | |
4604 | (invoke "ant" "jar") | |
4605 | #t)) | |
4606 | (add-before 'install 'install-parent | |
4607 | (install-pom-file "pom.xml")) | |
4608 | (replace 'install | |
4609 | (install-from-pom "plexus-java/pom.xml"))))) | |
4610 | (propagated-inputs | |
4611 | `(("java-asm" ,java-asm) | |
4612 | ("java-qdox" ,java-qdox-2-M9) | |
4613 | ("java-javax-inject" ,java-javax-inject) | |
4614 | ("plexus-parent-pom" ,plexus-parent-pom-4.0))) | |
4615 | (inputs | |
4616 | `(("java-plexus-component-annotations" ,java-plexus-component-annotations))) | |
4617 | (native-inputs | |
4618 | `(("java-plexus-component-metadata" ,java-plexus-component-metadata) | |
4619 | ("java-junit" ,java-junit))) | |
4620 | (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java") | |
4621 | (synopsis "Shared language features for Java") | |
4622 | (description "This package contains shared language features of the Java | |
4623 | language, for the plexus project.") | |
4624 | (license license:asl2.0))) | |
4625 | ||
239126d4 JL |
4626 | (define-public java-plexus-compiler-api |
4627 | (package | |
4628 | (name "java-plexus-compiler-api") | |
a70182b0 | 4629 | (version "2.8.4") |
239126d4 | 4630 | (source (origin |
5723137a EF |
4631 | (method git-fetch) |
4632 | (uri (git-reference | |
4633 | (url "https://github.com/codehaus-plexus/plexus-compiler") | |
4634 | (commit (string-append "plexus-compiler-" version)))) | |
4635 | (file-name (git-file-name name version)) | |
239126d4 JL |
4636 | (sha256 |
4637 | (base32 | |
5723137a | 4638 | "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk")))) |
239126d4 JL |
4639 | (build-system ant-build-system) |
4640 | (arguments | |
4641 | `(#:jar-name "plexus-compiler-api.jar" | |
4642 | #:source-dir "plexus-compiler-api/src/main/java" | |
90a1d04c JL |
4643 | #:test-dir "plexus-compiler-api/src/test" |
4644 | #:phases | |
4645 | (modify-phases %standard-phases | |
4646 | (replace 'install | |
4647 | (install-from-pom "plexus-compiler-api/pom.xml"))))) | |
4648 | (propagated-inputs | |
239126d4 | 4649 | `(("java-plexus-container-default" ,java-plexus-container-default) |
90a1d04c | 4650 | ("java-plexus-compiler-pom" ,java-plexus-compiler-pom) |
239126d4 JL |
4651 | ("java-plexus-util" ,java-plexus-utils))) |
4652 | (native-inputs | |
4653 | `(("java-junit" ,java-junit))) | |
4654 | (home-page "https://github.com/codehaus-plexus/plexus-compiler") | |
4655 | (synopsis "Plexus Compilers component's API to manipulate compilers") | |
4656 | (description "This package contains the API used by components to manipulate | |
4657 | compilers.") | |
4658 | (license (list license:asl2.0 | |
4659 | license:expat)))) | |
4660 | ||
90a1d04c JL |
4661 | (define java-plexus-compiler-pom |
4662 | (package | |
4663 | (inherit java-plexus-compiler-api) | |
4664 | (name "java-plexus-compiler-pom") | |
4665 | (arguments | |
4666 | `(#:tests? #f | |
4667 | #:phases | |
4668 | (modify-phases %standard-phases | |
4669 | (delete 'configure) | |
4670 | (delete 'build) | |
4671 | (replace 'install | |
4672 | (install-pom-file "pom.xml")) | |
4673 | (add-after 'install 'install-compilers | |
4674 | (install-pom-file "plexus-compilers/pom.xml"))))) | |
4675 | (propagated-inputs | |
4676 | `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0))))) | |
4677 | ||
4678 | (define plexus-components-parent-pom-4.0 | |
4679 | (package | |
4680 | (name "plexus-components-parent-pom") | |
4681 | (version "4.0") | |
4682 | (source (origin | |
4683 | (method git-fetch) | |
4684 | (uri (git-reference | |
4685 | (url "https://github.com/codehaus-plexus/plexus-components") | |
4686 | (commit (string-append "plexus-components-" version)))) | |
5723137a | 4687 | (file-name (git-file-name name version)) |
239126d4 JL |
4688 | (sha256 |
4689 | (base32 | |
90a1d04c | 4690 | "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi")))) |
239126d4 JL |
4691 | (build-system ant-build-system) |
4692 | (arguments | |
90a1d04c JL |
4693 | `(#:tests? #f |
4694 | #:phases | |
4695 | (modify-phases %standard-phases | |
4696 | (delete 'configure) | |
4697 | (delete 'build) | |
4698 | (replace 'install | |
4699 | (install-pom-file "pom.xml"))))) | |
4700 | (propagated-inputs | |
4701 | `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0))) | |
4702 | (home-page "https://codehaus-plexus.github.io/plexus-components") | |
4703 | (synopsis "Plexus parent pom") | |
4704 | (description "This package contains the Plexus components parent POM.") | |
4705 | (license license:asl2.0))) | |
4706 | ||
4707 | (define-public java-plexus-compiler-manager | |
4708 | (package | |
4709 | (inherit java-plexus-compiler-api) | |
4710 | (name "java-plexus-compiler-manager") | |
4711 | (arguments | |
4712 | `(#:jar-name "compiler-compiler-manager.java" | |
4713 | #:source-dir "plexus-compiler-manager/src/main/java" | |
4714 | #:test-dir "plexus-compiler-manager/src/test" | |
4715 | #:tests? #f | |
4716 | #:phases | |
4717 | (modify-phases %standard-phases | |
4718 | (add-after 'build 'generate-metadata | |
4719 | (lambda _ | |
4720 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
4721 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
4722 | "--source" "plexus-compiler-manager/src/main/java" | |
4723 | "--output" "build/classes/META-INF/plexus/components.xml" | |
4724 | "--classes" "build/classes" | |
4725 | "--descriptors" "build/classes/META-INF") | |
4726 | (invoke "ant" "jar") | |
4727 | #t)) | |
4728 | (add-after 'generate-metadata 'rebuild | |
4729 | (lambda _ | |
4730 | (invoke "ant" "jar") | |
4731 | #t)) | |
4732 | (replace 'install | |
4733 | (install-from-pom "plexus-compiler-manager/pom.xml"))))) | |
4734 | (propagated-inputs | |
4735 | `(("java-plexus-compiler-api" ,java-plexus-compiler-api) | |
4736 | ("java-plexus-compiler-pom" ,java-plexus-compiler-pom) | |
4737 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
239126d4 | 4738 | (native-inputs |
90a1d04c JL |
4739 | `(("unzip" ,unzip) |
4740 | ("java-plexus-component-metadata" ,java-plexus-component-metadata))) | |
4741 | (synopsis "Compiler management for Plexus Compiler component") | |
4742 | (description "Plexus Compiler is a Plexus component to use different | |
4743 | compilers through a uniform API. This component chooses the compiler | |
4744 | implementation to use in a project."))) | |
239126d4 | 4745 | |
f8a519fa JL |
4746 | (define-public java-plexus-compiler-javac |
4747 | (package | |
4748 | (inherit java-plexus-compiler-api) | |
4749 | (name "java-plexus-compiler-javac") | |
4750 | (arguments | |
4751 | `(#:jar-name "plexus-compiler-javac.jar" | |
4752 | #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java" | |
4753 | #:jdk ,icedtea-8 | |
4754 | #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package. | |
90a1d04c JL |
4755 | #:test-dir "plexus-compilers/plexus-compiler-javac/src/test" |
4756 | #:modules ((guix build ant-build-system) | |
4757 | (guix build utils) | |
4758 | (guix build java-utils) | |
4759 | (sxml simple)) | |
4760 | #:phases | |
4761 | (modify-phases %standard-phases | |
4762 | ;; We cannot use java-plexus-component-metadata to generate the metadata | |
4763 | ;; because it ultimately depends on this package. | |
4764 | ;; Create it manually instead | |
4765 | (add-before 'build 'create-metadata | |
4766 | (lambda _ | |
4767 | (let* ((dir "build/classes/META-INF/plexus") | |
4768 | (file (string-append dir "/components.xml"))) | |
4769 | (mkdir-p dir) | |
4770 | (with-output-to-file file | |
4771 | (lambda _ | |
4772 | (sxml->xml | |
4773 | `(component-set | |
4774 | (components | |
4775 | (component | |
4776 | (role "org.codehaus.plexus.compiler.Compiler") | |
4777 | (role-hint "javac") | |
4778 | (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler") | |
4779 | (isolated-realm "false")))))))) | |
4780 | #t)) | |
4781 | (replace 'install | |
4782 | (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml"))))) | |
4783 | (propagated-inputs | |
f8a519fa JL |
4784 | `(("java-plexus-compiler-api" ,java-plexus-compiler-api) |
4785 | ("java-plexus-utils" ,java-plexus-utils) | |
4786 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
f8a519fa JL |
4787 | (synopsis "Javac Compiler support for Plexus Compiler component") |
4788 | (description "This package contains the Javac Compiler support for Plexus | |
4789 | Compiler component."))) | |
4790 | ||
6a25a3b1 JL |
4791 | (define plexus-components-pom-1.1.20 |
4792 | (package | |
4793 | (name "plexus-components-pom-1.1.20") | |
4794 | (version "1.1.20") | |
4795 | (source (origin | |
4796 | (method git-fetch) | |
4797 | (uri (git-reference | |
4798 | (url "https://github.com/codehaus-plexus/plexus-components") | |
4799 | (commit (string-append "plexus-components-" version)))) | |
4800 | (file-name (git-file-name name version)) | |
4801 | (sha256 | |
4802 | (base32 | |
4803 | "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb")))) | |
4804 | (build-system ant-build-system) | |
4805 | (arguments | |
4806 | `(#:tests? #f | |
4807 | #:phases | |
4808 | (modify-phases %standard-phases | |
4809 | (delete 'configure) | |
4810 | (delete 'build) | |
4811 | (replace 'install | |
4812 | (install-pom-file "pom.xml"))))) | |
4813 | (propagated-inputs | |
4814 | `(("plexus-parent-pom" ,plexus-parent-pom-3.1))) | |
4815 | (home-page "https://github.com/codehaus-plexus/plexus-components") | |
4816 | (synopsis "Maven parent pom for plexus packages") | |
4817 | (description "This package contains the parent pom for plexus component | |
4818 | packages.") | |
4819 | (license license:asl2.0))) | |
4820 | ||
4821 | (define-public java-plexus-digest | |
4822 | (package | |
4823 | (name "java-plexus-digest") | |
4824 | (version "1.2") | |
4825 | (source (origin | |
4826 | (method git-fetch) | |
4827 | (uri (git-reference | |
4828 | (url "https://github.com/codehaus-plexus/plexus-digest") | |
4829 | (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430"))) | |
4830 | (file-name (git-file-name name version)) | |
4831 | (sha256 | |
4832 | (base32 | |
4833 | "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x")))) | |
4834 | (build-system ant-build-system) | |
4835 | (arguments | |
4836 | `(#:jar-name "plexus-digest.jar" | |
4837 | #:source-dir "src/main/java" | |
4838 | #:tests? #f | |
4839 | #:phases | |
4840 | (modify-phases %standard-phases | |
4841 | (replace 'install | |
4842 | (install-from-pom "pom.xml"))))) | |
4843 | (propagated-inputs | |
4844 | `(("java-plexus-utils" ,java-plexus-utils) | |
4845 | ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20))) | |
4846 | (native-inputs | |
4847 | `(("java-junit" ,java-junit))) | |
4848 | (home-page "https://github.com/codehaus-plexus/plexus-digest") | |
4849 | (synopsis "Hash function utilities for Java") | |
4850 | (description "This package is a plexus component that contains hash | |
4851 | function utilities.") | |
4852 | (license license:asl2.0))) | |
4853 | ||
0aa85081 JL |
4854 | (define-public java-plexus-sec-dispatcher |
4855 | (package | |
4856 | (name "java-plexus-sec-dispatcher") | |
4857 | (version "1.4") ;; Newest release listed at the Maven Central Repository. | |
4858 | (source (origin | |
4859 | ;; This project doesn't tag releases or publish tarballs, so we take | |
4860 | ;; the "prepare release plexus-sec-dispatcher-1.4" git commit. | |
d9e356a8 EF |
4861 | (method git-fetch) |
4862 | (uri (git-reference | |
4863 | (url "https://github.com/sonatype/plexus-sec-dispatcher/") | |
4864 | (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f"))) | |
0aa85081 JL |
4865 | (sha256 |
4866 | (base32 | |
d9e356a8 EF |
4867 | "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs")) |
4868 | (file-name (git-file-name name version)))) | |
0aa85081 JL |
4869 | (arguments |
4870 | `(#:jar-name "plexus-sec-dispatcher.jar" | |
4871 | #:source-dir "src/main/java" | |
0aa85081 JL |
4872 | #:phases |
4873 | (modify-phases %standard-phases | |
4874 | (add-before 'build 'generate-models | |
4875 | (lambda* (#:key inputs #:allow-other-keys) | |
4876 | (define (modello-single-mode file version mode) | |
2c8ac364 MW |
4877 | (invoke "java" |
4878 | "org.codehaus.modello.ModelloCli" | |
4879 | file mode "src/main/java" version | |
4880 | "false" "true")) | |
0aa85081 | 4881 | (let ((file "src/main/mdo/settings-security.mdo")) |
0aa85081 JL |
4882 | (modello-single-mode file "1.0.0" "java") |
4883 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
2c8ac364 MW |
4884 | (modello-single-mode file "1.0.0" "xpp3-writer")) |
4885 | #t)) | |
0aa85081 JL |
4886 | (add-before 'build 'generate-components.xml |
4887 | (lambda _ | |
4888 | (mkdir-p "build/classes/META-INF/plexus") | |
4889 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
4890 | (lambda _ | |
4891 | (display | |
4892 | "<component-set>\n | |
4893 | <components>\n | |
4894 | <component>\n | |
4895 | <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n | |
4896 | <role-hint>default</role-hint>\n | |
4897 | <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n | |
4898 | <description></description>\n | |
4899 | <requirements>\n | |
4900 | <requirement>\n | |
4901 | <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n | |
4902 | <field-name>_cipher</field-name>\n | |
4903 | </requirement>\n | |
4904 | <requirement>\n | |
4905 | <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n | |
4906 | <field-name>_decryptors</field-name>\n | |
4907 | </requirement>\n | |
4908 | </requirements>\n | |
4909 | <configuration>\n | |
4910 | <_configuration-file>~/.settings-security.xml</_configuration-file>\n | |
4911 | </configuration>\n | |
4912 | </component>\n | |
4913 | </components>\n | |
2c8ac364 MW |
4914 | </component-set>\n"))) |
4915 | #t)) | |
0aa85081 JL |
4916 | (add-before 'check 'fix-paths |
4917 | (lambda _ | |
2c8ac364 | 4918 | (copy-recursively "src/test/resources" "target") |
51087d51 JL |
4919 | #t)) |
4920 | (replace 'install (install-from-pom "pom.xml"))))) | |
4921 | (propagated-inputs | |
4922 | `(("java-plexus-utils" ,java-plexus-utils) | |
4923 | ("java-plexus-cipher" ,java-plexus-cipher) | |
4924 | ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12))) | |
0aa85081 JL |
4925 | (native-inputs |
4926 | `(("java-modello-core" ,java-modello-core) | |
4927 | ;; for modello: | |
4928 | ("java-plexus-container-default" ,java-plexus-container-default) | |
4929 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
4930 | ("java-plexus-utils" ,java-plexus-utils) | |
4931 | ("java-guava" ,java-guava) | |
4932 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
4933 | ("java-sisu-build-api" ,java-sisu-build-api) | |
4934 | ;; modello plugins: | |
4935 | ("java-modellop-plugins-java" ,java-modello-plugins-java) | |
4936 | ("java-modellop-plugins-xml" ,java-modello-plugins-xml) | |
4937 | ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3) | |
4938 | ;; for tests | |
4939 | ("java-junit" ,java-junit))) | |
4940 | (build-system ant-build-system) | |
4941 | (home-page "https://github.com/sonatype/plexus-sec-dispatcher") | |
4942 | (synopsis "Plexus Security Dispatcher Component") | |
4943 | (description "This package is the Plexus Security Dispatcher Component. | |
4944 | This component decrypts a string passed to it.") | |
4945 | (license license:asl2.0))) | |
4946 | ||
7d65489f JL |
4947 | (define-public java-plexus-cli |
4948 | (package | |
4949 | (name "java-plexus-cli") | |
4950 | (version "1.7") | |
4951 | (source (origin | |
4952 | (method git-fetch) | |
4953 | (uri (git-reference | |
4954 | (url "https://github.com/sonatype/plexus-cli") | |
4955 | (commit "a776afa6bca84e5107bedb69440329cdb24ed645"))) | |
4956 | (file-name (string-append name "-" version)) | |
4957 | (sha256 | |
4958 | (base32 | |
4959 | "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx")))) | |
4960 | (build-system ant-build-system) | |
4961 | (arguments | |
4962 | `(#:jar-name "plexus-cli.jar" | |
4963 | #:source-dir "src/main/java" | |
4964 | #:jdk ,icedtea-8 | |
4965 | #:test-dir "src/test")) | |
4966 | (inputs | |
4967 | `(("java-commons-cli" ,java-commons-cli) | |
4968 | ("java-plexus-container-default" ,java-plexus-container-default) | |
4969 | ("java-plexus-classworlds" ,java-plexus-classworlds))) | |
4970 | (native-inputs | |
4971 | `(("java-plexus-utils" ,java-plexus-utils) | |
4972 | ("java-junit" ,java-junit) | |
4973 | ("java-guava" ,java-guava))) | |
4974 | (home-page "https://codehaus-plexus.github.io/plexus-cli") | |
4975 | (synopsis "CLI building library for plexus") | |
4976 | (description "This package is a library to help creating CLI around | |
4977 | Plexus components.") | |
4978 | (license license:asl2.0))) | |
4979 | ||
8f524749 JL |
4980 | (define-public java-sisu-build-api |
4981 | (package | |
4982 | (name "java-sisu-build-api") | |
4983 | (version "0.0.7") | |
4984 | (source (origin | |
16c62763 EF |
4985 | (method git-fetch) |
4986 | (uri (git-reference | |
4987 | (url "https://github.com/sonatype/sisu-build-api") | |
4988 | (commit (string-append "plexus-build-api-" version)))) | |
4989 | (file-name (git-file-name name version)) | |
8f524749 JL |
4990 | (sha256 |
4991 | (base32 | |
16c62763 | 4992 | "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0")))) |
8f524749 JL |
4993 | (build-system ant-build-system) |
4994 | (arguments | |
4995 | `(#:jar-name "sisu-build-api.jar" | |
4996 | #:source-dir "src/main/java" | |
4997 | #:jdk ,icedtea-8 | |
4998 | #:tests? #f; FIXME: how to run the tests? | |
4999 | #:phases | |
5000 | (modify-phases %standard-phases | |
5001 | (add-before 'build 'copy-resources | |
5002 | (lambda _ | |
5003 | (copy-recursively "src/main/resources" "build/classes") | |
5004 | (substitute* (find-files "build/classes") | |
5005 | (("\\$\\{project.version\\}") ,version)) | |
5006 | #t)) | |
5007 | (add-before 'build 'generate-plexus-compontent | |
5008 | (lambda _ | |
5009 | (mkdir-p "build/classes/META-INF/plexus") | |
5010 | ;; This file is required for plexus to inject this package. | |
5011 | ;; FIXME: how is it generated? | |
5012 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
5013 | (lambda _ | |
5014 | (display | |
5015 | "<component-set>\n | |
5016 | <components>\n | |
5017 | <component>\n | |
5018 | <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n | |
5019 | <role-hint>default</role-hint>\n | |
5020 | <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n | |
5021 | <description>Filesystem based non-incremental build context implementation\n | |
5022 | which behaves as if all files were just created.</description>\n | |
5023 | </component>\n | |
5024 | </components>\n | |
5025 | </component-set>\n"))) | |
f0e3e6ca JL |
5026 | #t)) |
5027 | (replace 'install | |
5028 | (install-from-pom "pom.xml"))))) | |
8f524749 JL |
5029 | (inputs |
5030 | `(("java-plexus-utils" ,java-plexus-utils) | |
5031 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
5032 | (home-page "https://github.com/sonatype/sisu-build-api/") | |
5033 | (synopsis "Base build API for maven") | |
5034 | (description "This package contains the base build API for maven and | |
5035 | a default implementation of it. This API is about scanning files in a | |
5036 | project and determining what files need to be rebuilt.") | |
5037 | (license license:asl2.0))) | |
5038 | ||
b26c8b61 JL |
5039 | (define-public java-modello-core |
5040 | (package | |
5041 | (name "java-modello-core") | |
5042 | (version "1.9.1") | |
5043 | (source (origin | |
df9487c5 EF |
5044 | (method git-fetch) |
5045 | (uri (git-reference | |
5046 | (url "https://github.com/codehaus-plexus/modello") | |
5047 | (commit (string-append "modello-" version)))) | |
5048 | (file-name (git-file-name name version)) | |
b26c8b61 JL |
5049 | (sha256 |
5050 | (base32 | |
df9487c5 | 5051 | "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4")))) |
b26c8b61 JL |
5052 | (build-system ant-build-system) |
5053 | (arguments | |
5054 | `(#:jar-name "modello-core.jar" | |
5055 | #:source-dir "modello-core/src/main/java" | |
5056 | #:test-dir "modello-core/src/test" | |
5057 | #:main-class "org.codehaus.modello.ModelloCli" | |
5058 | #:jdk ,icedtea-8 | |
5059 | #:phases | |
5060 | (modify-phases %standard-phases | |
5061 | (add-before 'build 'copy-resources | |
5062 | (lambda _ | |
5063 | (mkdir-p "build/classes/META-INF/plexus") | |
5064 | (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml" | |
5065 | "build/classes/META-INF/plexus/components.xml") | |
5066 | #t)) | |
5067 | (add-before 'check 'fix-tests | |
5068 | (lambda _ | |
5069 | (with-directory-excursion "modello-core/src/test/java/org/codehaus" | |
5070 | (substitute* '("modello/core/DefaultModelloCoreTest.java" | |
5071 | "modello/core/io/ModelReaderTest.java") | |
5072 | (("src/test") "modello-core/src/test"))) | |
5073 | #t))))) | |
29534ff7 | 5074 | (propagated-inputs |
b26c8b61 JL |
5075 | `(("java-plexus-utils" ,java-plexus-utils) |
5076 | ("java-plexus-container-default" ,java-plexus-container-default) | |
5077 | ("java-sisu-build-api" ,java-sisu-build-api))) | |
5078 | (native-inputs | |
5079 | `(("java-junit" ,java-junit) | |
5080 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
5081 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
5082 | ("java-guava" ,java-guava))) | |
7942a129 | 5083 | (home-page "https://codehaus-plexus.github.io/modello/") |
b26c8b61 JL |
5084 | (synopsis "Framework for code generation from a simple model") |
5085 | (description "Modello is a framework for code generation from a simple model. | |
5086 | ||
5087 | Modello generates code from a simple model format: based on a plugin | |
5088 | architecture, various types of code and descriptors can be generated from the | |
5089 | single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers, | |
5090 | XSD and documentation.") | |
5091 | (license (list | |
5092 | license:expat | |
5093 | ;; Although this package uses only files licensed under expat, | |
5094 | ;; other parts of the source are licensed under different | |
5095 | ;; licenses. We include them to be inherited by other packages. | |
5096 | license:asl2.0 | |
5097 | ;; Some files in modello-plugin-java are licensed under a | |
5098 | ;; 5-clause BSD license. | |
5099 | (license:non-copyleft | |
5100 | (string-append "file:///modello-plugins/modello-plugin-java/" | |
5101 | "src/main/java/org/codehaus/modello/plugin/" | |
5102 | "java/javasource/JNaming.java")))))) | |
5103 | ||
fc620bef JL |
5104 | (define-public java-modello-plugins-java |
5105 | (package | |
5106 | (inherit java-modello-core) | |
5107 | (name "java-modello-plugins-java") | |
5108 | (arguments | |
5109 | `(#:jar-name "modello-plugins-java.jar" | |
5110 | #:source-dir "modello-plugins/modello-plugin-java/src/main/java" | |
5111 | #:test-dir "modello-plugins/modello-plugin-java/src/test" | |
5112 | #:jdk ,icedtea-8 | |
5113 | #:tests? #f; requires maven-model, which depends on this package | |
5114 | #:phases | |
5115 | (modify-phases %standard-phases | |
5116 | (add-before 'build 'copy-resources | |
5117 | (lambda _ | |
5118 | (mkdir-p "build/classes") | |
5119 | (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources" | |
5120 | "build/classes") | |
5121 | #t))))) | |
5122 | (inputs | |
29534ff7 | 5123 | `(("java-modello-core" ,java-modello-core))) |
fc620bef JL |
5124 | (synopsis "Modello Java Plugin") |
5125 | (description "Modello Java Plugin generates Java objects for the model."))) | |
5126 | ||
a0ce95ba JL |
5127 | (define-public java-modello-plugins-xml |
5128 | (package | |
5129 | (inherit java-modello-core) | |
5130 | (name "java-modello-plugins-xml") | |
5131 | (arguments | |
5132 | `(#:jar-name "modello-plugins-xml.jar" | |
5133 | #:source-dir "modello-plugins/modello-plugin-xml/src/main/java" | |
5134 | #:test-dir "modello-plugins/modello-plugin-xml/src/test" | |
5135 | #:jdk ,icedtea-8 | |
5136 | #:phases | |
5137 | (modify-phases %standard-phases | |
5138 | (add-before 'build 'copy-resources | |
5139 | (lambda _ | |
5140 | (mkdir-p "build/classes") | |
5141 | (copy-recursively | |
5142 | "modello-plugins/modello-plugin-xml/src/main/resources" | |
5143 | "build/classes") | |
5144 | #t)) | |
5145 | (add-before 'check 'fix-paths | |
5146 | (lambda _ | |
5147 | (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test" | |
5148 | (substitute* | |
5149 | "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java" | |
2c8ac364 MW |
5150 | (("src/test") "modello-plugins/modello-plugin-xml/src/test"))) |
5151 | #t))))) | |
29534ff7 | 5152 | (propagated-inputs |
a0ce95ba | 5153 | `(("java-modello-core" ,java-modello-core) |
29534ff7 | 5154 | ("java-modello-plugins-java" ,java-modello-plugins-java))) |
a0ce95ba JL |
5155 | (synopsis "Modello XML Plugin") |
5156 | (description "Modello XML Plugin contains shared code for every plugins | |
5157 | working on XML representation of the model."))) | |
5158 | ||
e4708560 JL |
5159 | (define-public java-modello-test |
5160 | (package | |
5161 | (inherit java-modello-core) | |
5162 | (name "java-modello-test") | |
5163 | (arguments | |
5164 | `(#:jar-name "modello-test.jar" | |
5165 | #:source-dir "modello-test/src/main/java" | |
5166 | #:tests? #f; no tests | |
5167 | #:jdk ,icedtea-8)) | |
5168 | (inputs | |
5169 | `(("java-plexus-utils" ,java-plexus-utils) | |
5170 | ("java-plexus-compiler-api" ,java-plexus-compiler-api) | |
5171 | ("java-plexus-compiler-javac" ,java-plexus-compiler-javac) | |
5172 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
5173 | (synopsis "Modello test package") | |
5174 | (description "The modello test package contains the basis to create | |
5175 | Modello generator unit-tests, including sample models and xml files to test | |
5176 | every feature for every plugin."))) | |
5177 | ||
36607d3b JL |
5178 | (define-public java-modello-plugins-xpp3 |
5179 | (package | |
5180 | (inherit java-modello-core) | |
5181 | (name "java-modello-plugins-xpp3") | |
5182 | (arguments | |
5183 | `(#:jar-name "modello-plugins-xpp3.jar" | |
5184 | #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java" | |
5185 | #:test-dir "modello-plugins/modello-plugin-xpp3/src/test" | |
5186 | ;; One of the test dependencies is maven-model which depends on this package. | |
5187 | #:tests? #f | |
5188 | #:jdk ,icedtea-8 | |
5189 | #:phases | |
5190 | (modify-phases %standard-phases | |
5191 | (add-before 'build 'copy-resources | |
5192 | (lambda _ | |
5193 | (mkdir-p "build/classes") | |
5194 | (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources" | |
5195 | "build/classes") | |
5196 | #t))))) | |
29534ff7 | 5197 | (propagated-inputs |
36607d3b JL |
5198 | `(("java-modello-core" ,java-modello-core) |
5199 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
29534ff7 | 5200 | ("java-modello-plugins-xml" ,java-modello-plugins-xml))) |
36607d3b JL |
5201 | (native-inputs |
5202 | `(("java-xmlunit" ,java-xmlunit) | |
5203 | ("java-modello-test" ,java-modello-test) | |
5204 | ,@(package-native-inputs java-modello-core))) | |
5205 | (synopsis "Modello XPP3 Plugin") | |
5206 | (description "The modello XPP3 plugin generates XML readers and writers based | |
5207 | on the XPP3 API (XML Pull Parser)."))) | |
5208 | ||
8f8ed9aa RW |
5209 | (define-public java-asm |
5210 | (package | |
5211 | (name "java-asm") | |
d0e9ded7 | 5212 | (version "6.0") |
8f8ed9aa RW |
5213 | (source (origin |
5214 | (method url-fetch) | |
654f997d | 5215 | (uri (string-append "https://download.forge.ow2.org/asm/" |
8f8ed9aa RW |
5216 | "asm-" version ".tar.gz")) |
5217 | (sha256 | |
5218 | (base32 | |
d0e9ded7 | 5219 | "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00")))) |
8f8ed9aa RW |
5220 | (build-system ant-build-system) |
5221 | (arguments | |
5222 | `(#:build-target "compile" | |
5223 | ;; The tests require an old version of Janino, which no longer compiles | |
5224 | ;; with the JDK7. | |
5225 | #:tests? #f | |
d0e9ded7 GB |
5226 | #:make-flags |
5227 | (list | |
5228 | ;; We don't need these extra ant tasks, but the build system asks us to | |
5229 | ;; provide a path anyway. | |
5230 | "-Dobjectweb.ant.tasks.path=dummy-path" | |
5231 | ;; The java-aqute.bndlib JAR file will be put onto the classpath and | |
5232 | ;; used during the build automatically by ant-build-system, but | |
5233 | ;; java-asm's build.xml fails unless we provide something here. | |
5234 | "-Dbiz.aQute.bnd.path=dummy-path") | |
8f8ed9aa RW |
5235 | #:phases |
5236 | (modify-phases %standard-phases | |
30b7704a JL |
5237 | (add-before 'build 'remove-bnd-dependency |
5238 | (lambda _ | |
5239 | ;; This file is the only one to require bnd, and is not needed | |
5240 | ;; because we don't build a bundle. | |
5241 | (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java") | |
5242 | #t)) | |
8f8ed9aa RW |
5243 | (add-before 'install 'build-jars |
5244 | (lambda* (#:key make-flags #:allow-other-keys) | |
5245 | ;; We cannot use the "jar" target because it depends on a couple | |
5246 | ;; of unpackaged, complicated tools. | |
5247 | (mkdir "dist") | |
2c8ac364 MW |
5248 | (invoke "jar" |
5249 | "-cf" (string-append "dist/asm-" ,version ".jar") | |
5250 | "-C" "output/build/tmp" "."))) | |
51087d51 JL |
5251 | (add-before 'install 'fix-pom |
5252 | (lambda _ | |
5253 | (substitute* (find-files "archive" "\\.pom$") | |
5254 | (("@product.artifact@") ,version)) | |
5255 | #t)) | |
5256 | (add-before 'install 'install-parent | |
5257 | (install-pom-file "archive/asm-parent.pom")) | |
8f8ed9aa | 5258 | (replace 'install |
51087d51 | 5259 | (install-from-pom "archive/asm.pom"))))) |
8f8ed9aa RW |
5260 | (native-inputs |
5261 | `(("java-junit" ,java-junit))) | |
51087d51 JL |
5262 | (propagated-inputs |
5263 | `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3))) | |
1e4ae551 | 5264 | (home-page "https://asm.ow2.io/") |
8f8ed9aa RW |
5265 | (synopsis "Very small and fast Java bytecode manipulation framework") |
5266 | (description "ASM is an all purpose Java bytecode manipulation and | |
5267 | analysis framework. It can be used to modify existing classes or dynamically | |
5268 | generate classes, directly in binary form. The provided common | |
a4cb4d17 | 5269 | transformations and analysis algorithms allow easily assembling custom |
8f8ed9aa RW |
5270 | complex transformations and code analysis tools.") |
5271 | (license license:bsd-3))) | |
607fe24a | 5272 | |
51087d51 JL |
5273 | (define java-org-ow2-parent-pom-1.3 |
5274 | (package | |
5275 | (name "java-org-ow2-parent-pom") | |
5276 | (version "1.3") | |
5277 | (source (origin | |
5278 | (method url-fetch) | |
5279 | (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom") | |
5280 | (sha256 | |
5281 | (base32 | |
5282 | "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai")))) | |
5283 | (build-system ant-build-system) | |
5284 | (arguments | |
5285 | `(#:tests? #f | |
5286 | #:phases | |
5287 | (modify-phases %standard-phases | |
5288 | (delete 'unpack) | |
5289 | (delete 'build) | |
5290 | (delete 'configure) | |
5291 | (replace 'install | |
5292 | (install-pom-file (assoc-ref %build-inputs "source")))))) | |
5293 | (home-page "https://ow2.org") | |
5294 | (synopsis "Ow2.org parent pom") | |
5295 | (description "This package contains the parent pom for projects from ow2.org, | |
5296 | including java-asm.") | |
5297 | (license license:lgpl2.1+))) | |
5298 | ||
bfb4004d GB |
5299 | (define java-asm-bootstrap |
5300 | (package | |
5301 | (inherit java-asm) | |
5302 | (name "java-asm-bootstrap") | |
5303 | (arguments | |
5304 | (substitute-keyword-arguments (package-arguments java-asm) | |
5305 | ((#:tests? _) #f))) | |
30b7704a | 5306 | (native-inputs `()))) |
bfb4004d | 5307 | |
fafd543f JL |
5308 | (define-public java-asm-8 |
5309 | (package | |
5310 | (inherit java-asm) | |
5311 | (version "8.0.1") | |
5312 | (source (origin | |
5313 | (method git-fetch) | |
5314 | (uri (git-reference | |
5315 | (url "https://gitlab.ow2.org/asm/asm") | |
5316 | (commit (string-append | |
5317 | "ASM_" (string-join (string-split version #\.) | |
5318 | "_"))))) | |
5319 | (file-name (git-file-name "java-asm" version)) | |
5320 | (sha256 | |
5321 | (base32 | |
5322 | "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69")))) | |
5323 | (arguments | |
5324 | `(#:jar-name "asm8.jar" | |
5325 | #:source-dir "asm/src/main/java" | |
5326 | #:test-dir "asm/src/test" | |
5327 | ;; tests depend on junit5 | |
5328 | #:tests? #f)) | |
5329 | (propagated-inputs '()) | |
5330 | (native-inputs '()))) | |
5331 | ||
d9d42624 JL |
5332 | (define-public java-asm-tree-8 |
5333 | (package | |
5334 | (inherit java-asm-8) | |
5335 | (name "java-asm-tree") | |
5336 | (arguments | |
5337 | `(#:jar-name "asm-tree.jar" | |
5338 | #:source-dir "asm-tree/src/main/java" | |
5339 | #:test-dir "asm-tree/src/test" | |
5340 | ;; tests depend on junit5 | |
5341 | #:tests? #f)) | |
5342 | (inputs | |
5343 | `(("java-asm" ,java-asm-8))))) | |
5344 | ||
d7f7c752 JL |
5345 | (define-public java-asm-analysis-8 |
5346 | (package | |
5347 | (inherit java-asm-8) | |
5348 | (name "java-asm-analysis") | |
5349 | (arguments | |
5350 | `(#:jar-name "asm-analysis.jar" | |
5351 | #:source-dir "asm-analysis/src/main/java" | |
5352 | #:test-dir "asm-analysis/src/test" | |
5353 | ;; tests depend on junit5 | |
5354 | #:tests? #f)) | |
5355 | (inputs | |
5356 | `(("java-asm" ,java-asm-8) | |
5357 | ("java-asm-tree" ,java-asm-tree-8))))) | |
5358 | ||
f37de56a JL |
5359 | (define-public java-asm-util-8 |
5360 | (package | |
5361 | (inherit java-asm-8) | |
5362 | (name "java-asm-util") | |
5363 | (arguments | |
5364 | `(#:jar-name "asm-util8.jar" | |
5365 | #:source-dir "asm-util/src/main/java" | |
5366 | #:test-dir "asm-util/src/test" | |
5367 | ;; tests depend on junit5 | |
5368 | #:tests? #f)) | |
5369 | (inputs | |
5370 | `(("java-asm" ,java-asm-8) | |
5371 | ("java-asm-analysis" ,java-asm-analysis-8) | |
5372 | ("java-asm-tree" ,java-asm-tree-8))))) | |
5373 | ||
607fe24a RW |
5374 | (define-public java-cglib |
5375 | (package | |
5376 | (name "java-cglib") | |
5377 | (version "3.2.4") | |
5c44505b TGR |
5378 | (source |
5379 | (origin | |
5380 | (method git-fetch) | |
5381 | (uri (git-reference | |
b0e7b699 | 5382 | (url "https://github.com/cglib/cglib") |
5c44505b TGR |
5383 | (commit (string-append |
5384 | "RELEASE_" | |
5385 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) | |
5386 | version))))) | |
5387 | (file-name (git-file-name name version)) | |
5388 | (sha256 | |
5389 | (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v")))) | |
607fe24a RW |
5390 | (build-system ant-build-system) |
5391 | (arguments | |
5392 | `(;; FIXME: tests fail because junit runs | |
5393 | ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem | |
5394 | ;; to describe a test at all. | |
5395 | #:tests? #f | |
5396 | #:jar-name "cglib.jar" | |
5397 | #:phases | |
5398 | (modify-phases %standard-phases | |
5399 | (add-after 'unpack 'chdir | |
5400 | (lambda _ (chdir "cglib") #t))))) | |
5401 | (inputs | |
5402 | `(("java-asm" ,java-asm) | |
5403 | ("java-junit" ,java-junit))) | |
5404 | (home-page "https://github.com/cglib/cglib/") | |
5405 | (synopsis "Java byte code generation library") | |
5406 | (description "The byte code generation library CGLIB is a high level API | |
5407 | to generate and transform Java byte code.") | |
5408 | (license license:asl2.0))) | |
33e34bfe RW |
5409 | |
5410 | (define-public java-objenesis | |
5411 | (package | |
5412 | (name "java-objenesis") | |
5413 | (version "2.5.1") | |
5414 | (source (origin | |
3dc7a8ce EF |
5415 | (method git-fetch) |
5416 | (uri (git-reference | |
5417 | (url "https://github.com/easymock/objenesis") | |
5418 | (commit version))) | |
5419 | (file-name (git-file-name name version)) | |
33e34bfe RW |
5420 | (sha256 |
5421 | (base32 | |
3dc7a8ce | 5422 | "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya")))) |
33e34bfe RW |
5423 | (build-system ant-build-system) |
5424 | (arguments | |
5425 | `(#:jar-name "objenesis.jar" | |
5426 | #:source-dir "main/src/" | |
5427 | #:test-dir "main/src/test/")) | |
5428 | (native-inputs | |
5429 | `(("java-junit" ,java-junit) | |
5430 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
5431 | (home-page "http://objenesis.org/") | |
5432 | (synopsis "Bypass the constructor when creating an object") | |
5433 | (description "Objenesis is a small Java library that serves one purpose: | |
5434 | to instantiate a new object of a particular class. It is common to see | |
5435 | restrictions in libraries stating that classes must require a default | |
5436 | constructor. Objenesis aims to overcome these restrictions by bypassing the | |
5437 | constructor on object instantiation.") | |
5438 | (license license:asl2.0))) | |
ae589876 RW |
5439 | |
5440 | (define-public java-easymock | |
5441 | (package | |
5442 | (name "java-easymock") | |
5443 | (version "3.4") | |
5444 | (source (origin | |
7cf90f64 EF |
5445 | (method git-fetch) |
5446 | (uri (git-reference | |
5447 | (url "https://github.com/easymock/easymock/") | |
5448 | (commit (string-append "easymock-" version)))) | |
5449 | (file-name (git-file-name name version)) | |
ae589876 RW |
5450 | (sha256 |
5451 | (base32 | |
7cf90f64 | 5452 | "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq")))) |
ae589876 RW |
5453 | (build-system ant-build-system) |
5454 | (arguments | |
5455 | `(#:jar-name "easymock.jar" | |
5456 | #:source-dir "core/src/main" | |
5457 | #:test-dir "core/src/test" | |
5458 | #:phases | |
5459 | (modify-phases %standard-phases | |
5460 | ;; FIXME: Android support requires the following packages to be | |
5461 | ;; available: com.google.dexmaker.stock.ProxyBuilder | |
5462 | (add-after 'unpack 'delete-android-support | |
5463 | (lambda _ | |
5464 | (with-directory-excursion "core/src/main/java/org/easymock/internal" | |
5465 | (substitute* "MocksControl.java" | |
5466 | (("AndroidSupport.isAndroid\\(\\)") "false") | |
5467 | (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") "")) | |
5468 | (delete-file "AndroidClassProxyFactory.java")) | |
5469 | #t)) | |
5470 | (add-after 'unpack 'delete-broken-tests | |
5471 | (lambda _ | |
5472 | (with-directory-excursion "core/src/test/java/org/easymock" | |
5473 | ;; This test depends on dexmaker. | |
5474 | (delete-file "tests2/ClassExtensionHelperTest.java") | |
5475 | ||
5476 | ;; This is not a test. | |
5477 | (delete-file "tests/BaseEasyMockRunnerTest.java") | |
5478 | ||
5479 | ;; This test should be executed with a different runner... | |
5480 | (delete-file "tests2/EasyMockAnnotationsTest.java") | |
5481 | ;; ...but deleting it means that we also have to delete these | |
5482 | ;; dependent files. | |
5483 | (delete-file "tests2/EasyMockRunnerTest.java") | |
5484 | (delete-file "tests2/EasyMockRuleTest.java") | |
5485 | ||
5486 | ;; This test fails because the file "easymock.properties" does | |
5487 | ;; not exist. | |
5488 | (delete-file "tests2/EasyMockPropertiesTest.java")) | |
5489 | #t))))) | |
5490 | (inputs | |
5491 | `(("java-asm" ,java-asm) | |
5492 | ("java-cglib" ,java-cglib) | |
5493 | ("java-objenesis" ,java-objenesis))) | |
5494 | (native-inputs | |
5495 | `(("java-junit" ,java-junit) | |
5496 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
7cf90f64 | 5497 | (home-page "https://easymock.org/") |
ae589876 RW |
5498 | (synopsis "Java library providing mock objects for unit tests") |
5499 | (description "EasyMock is a Java library that provides an easy way to use | |
5500 | mock objects in unit testing.") | |
5501 | (license license:asl2.0))) | |
7aa37023 | 5502 | |
f12ad6c7 RW |
5503 | (define-public java-jmock-1 |
5504 | (package | |
5505 | (name "java-jmock") | |
5506 | (version "1.2.0") | |
5507 | (source (origin | |
7cf26f24 EF |
5508 | (method git-fetch) |
5509 | (uri (git-reference | |
5510 | (url "https://github.com/jmock-developers/jmock-library") | |
5511 | (commit version))) | |
5512 | (file-name (git-file-name name version)) | |
f12ad6c7 RW |
5513 | (sha256 |
5514 | (base32 | |
7cf26f24 | 5515 | "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z")))) |
f12ad6c7 RW |
5516 | (build-system ant-build-system) |
5517 | (arguments | |
5518 | `(#:build-target "jars" | |
5519 | #:test-target "run.tests" | |
5520 | #:phases | |
5521 | (modify-phases %standard-phases | |
5522 | (replace 'install (install-jars "build"))))) | |
7cf26f24 | 5523 | (home-page "http://jmock.org/") |
f12ad6c7 RW |
5524 | (synopsis "Mock object library for test-driven development") |
5525 | (description "JMock is a library that supports test-driven development of | |
5526 | Java code with mock objects. Mock objects help you design and test the | |
5527 | interactions between the objects in your programs. | |
5528 | ||
5529 | The jMock library | |
5530 | ||
5531 | @itemize | |
5532 | @item makes it quick and easy to define mock objects | |
5533 | @item lets you precisely specify the interactions between | |
5534 | your objects, reducing the brittleness of your tests | |
5535 | @item plugs into your favourite test framework | |
5536 | @item is easy to extend. | |
5537 | @end itemize\n") | |
5538 | (license license:bsd-3))) | |
5539 | ||
045124ae JL |
5540 | (define-public java-jmock |
5541 | (package | |
5542 | (inherit java-jmock-1) | |
5543 | (name "java-jmock") | |
5544 | (version "2.8.2") | |
5545 | (source (origin | |
242af295 EF |
5546 | (method git-fetch) |
5547 | (uri (git-reference | |
5548 | (url "https://github.com/jmock-developers/jmock-library") | |
5549 | (commit version))) | |
5550 | (file-name (git-file-name name version)) | |
045124ae JL |
5551 | (sha256 |
5552 | (base32 | |
242af295 | 5553 | "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6")))) |
045124ae JL |
5554 | (inputs |
5555 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
5556 | ("java-asm" ,java-asm) | |
5557 | ("java-bsh" ,java-bsh) | |
5558 | ("java-junit" ,java-junit))) | |
5559 | (native-inputs | |
5560 | `(("cglib" ,java-cglib))) | |
5561 | (arguments | |
5562 | `(#:jar-name "java-jmock.jar" | |
5563 | #:source-dir "jmock/src/main/java" | |
5564 | #:test-dir "jmock/src/test")))) | |
5565 | ||
25436c6d JL |
5566 | (define-public java-jmock-junit4 |
5567 | (package | |
5568 | (inherit java-jmock) | |
5569 | (name "java-jmock-junit4") | |
5570 | (arguments | |
5571 | `(#:jar-name "java-jmock-junit4.jar" | |
5572 | #:source-dir "jmock-junit4/src/main/java" | |
5573 | #:test-dir "jmock-junit4/src/test")) | |
5574 | (inputs | |
5575 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
5576 | ("java-asm" ,java-asm) | |
5577 | ("java-bsh" ,java-bsh) | |
5578 | ("java-jmock" ,java-jmock) | |
5579 | ("java-jumit" ,java-junit))))) | |
5580 | ||
e84b899d JL |
5581 | (define-public java-jmock-legacy |
5582 | (package | |
5583 | (inherit java-jmock) | |
5584 | (name "java-jmock-legacy") | |
5585 | (arguments | |
5586 | `(#:jar-name "java-jmock-legacy.jar" | |
5587 | #:source-dir "jmock-legacy/src/main/java" | |
5588 | #:test-dir "jmock-legacy/src/test" | |
5589 | #:phases | |
5590 | (modify-phases %standard-phases | |
5591 | (add-before 'check 'copy-tests | |
5592 | (lambda _ | |
5593 | ;; This file is a dependancy of some tests | |
5594 | (let ((file "org/jmock/test/acceptance/PackageProtectedType.java")) | |
5595 | (copy-file (string-append "jmock/src/test/java/" file) | |
5596 | (string-append "jmock-legacy/src/test/java/" file)) | |
5597 | #t)))))) | |
5598 | (inputs | |
5599 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
5600 | ("java-objenesis" ,java-objenesis) | |
5601 | ("java-cglib" ,java-cglib) | |
5602 | ("java-jmock" ,java-jmock) | |
5603 | ("java-asm" ,java-asm) | |
5604 | ("java-bsh" ,java-bsh) | |
5605 | ("java-junit" ,java-junit))) | |
5606 | (native-inputs | |
5607 | `(("java-jmock-junit4" ,java-jmock-junit4))))) | |
5608 | ||
439c59da RW |
5609 | (define-public java-hamcrest-all |
5610 | (package (inherit java-hamcrest-core) | |
5611 | (name "java-hamcrest-all") | |
5612 | (arguments | |
bfc007e1 RW |
5613 | `(#:jdk ,icedtea-8 |
5614 | ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core) | |
5615 | ((#:build-target _) "bigjar") | |
5616 | ((#:phases phases) | |
5617 | `(modify-phases ,phases | |
5618 | ;; Some build targets override the classpath, so we need to patch | |
5619 | ;; the build.xml to ensure that required dependencies are on the | |
5620 | ;; classpath. | |
5621 | (add-after 'unpack 'patch-classpath-for-integration | |
5622 | (lambda* (#:key inputs #:allow-other-keys) | |
5623 | (substitute* "build.xml" | |
5624 | ((" build/hamcrest-library-\\$\\{version\\}.jar" line) | |
5625 | (string-join | |
5626 | (cons line | |
5627 | (append | |
5628 | (find-files (assoc-ref inputs "java-junit") "\\.jar$") | |
5629 | (find-files (assoc-ref inputs "java-jmock") "\\.jar$") | |
5630 | (find-files (assoc-ref inputs "java-easymock") "\\.jar$"))) | |
2cc63e6f RW |
5631 | ";")) |
5632 | (("build/hamcrest-core-\\$\\{version\\}\\.jar") | |
fff4fcc4 JL |
5633 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
5634 | "jar$")))) | |
5635 | #t)) | |
5636 | (replace 'install | |
5637 | (lambda* (#:key outputs #:allow-other-keys) | |
5638 | (let* ((target (string-append (assoc-ref outputs "out") | |
5639 | "/share/java/")) | |
5640 | (version-suffix | |
5641 | ,(string-append | |
5642 | "-" (package-version java-hamcrest-core) ".jar")) | |
5643 | (install-without-version-suffix | |
5644 | (lambda (jar) | |
5645 | (copy-file jar | |
5646 | (string-append target | |
5647 | (basename jar version-suffix) | |
5648 | ".jar"))))) | |
5649 | (mkdir-p target) | |
5650 | (for-each | |
5651 | install-without-version-suffix | |
5652 | (find-files "build" | |
5653 | (lambda (name _) | |
5654 | (and (string-suffix? ".jar" name) | |
5655 | (not (string-suffix? "-sources.jar" name))))))) | |
bfc007e1 | 5656 | #t))))))) |
439c59da RW |
5657 | (inputs |
5658 | `(("java-junit" ,java-junit) | |
5659 | ("java-jmock" ,java-jmock-1) | |
2cc63e6f RW |
5660 | ;; This is necessary because of what seems to be a race condition. |
5661 | ;; This package would sometimes fail to build because hamcrest-core.jar | |
5662 | ;; could not be found, even though it is built as part of this package. | |
5663 | ;; Adding java-hamcrest-core appears to fix this problem. See | |
5664 | ;; https://debbugs.gnu.org/31390 for more information. | |
5665 | ("java-hamcrest-core" ,java-hamcrest-core) | |
439c59da | 5666 | ("java-easymock" ,java-easymock) |
439c59da RW |
5667 | ,@(package-inputs java-hamcrest-core))))) |
5668 | ||
7aa37023 RW |
5669 | (define-public java-jopt-simple |
5670 | (package | |
5671 | (name "java-jopt-simple") | |
5672 | (version "5.0.3") | |
5673 | (source (origin | |
5674 | (method url-fetch) | |
5675 | (uri (string-append "http://repo1.maven.org/maven2/" | |
5676 | "net/sf/jopt-simple/jopt-simple/" | |
5677 | version "/jopt-simple-" | |
5678 | version "-sources.jar")) | |
5679 | (sha256 | |
5680 | (base32 | |
5681 | "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa")))) | |
5682 | (build-system ant-build-system) | |
5683 | (arguments | |
5684 | `(#:tests? #f ; there are no tests | |
5685 | #:jar-name "jopt-simple.jar")) | |
5686 | (home-page "https://pholser.github.io/jopt-simple/") | |
5687 | (synopsis "Java library for parsing command line options") | |
5688 | (description "JOpt Simple is a Java library for parsing command line | |
5689 | options, such as those you might pass to an invocation of @code{javac}. In | |
5690 | the interest of striving for simplicity, as closely as possible JOpt Simple | |
5691 | attempts to honor the command line option syntaxes of POSIX @code{getopt} and | |
5692 | GNU @code{getopt_long}. It also aims to make option parser configuration and | |
5693 | retrieval of options and their arguments simple and expressive, without being | |
5694 | overly clever.") | |
5695 | (license license:expat))) | |
840969e8 RW |
5696 | |
5697 | (define-public java-commons-math3 | |
5698 | (package | |
5699 | (name "java-commons-math3") | |
5700 | (version "3.6.1") | |
5701 | (source (origin | |
5702 | (method url-fetch) | |
5703 | (uri (string-append "mirror://apache/commons/math/source/" | |
5704 | "commons-math3-" version "-src.tar.gz")) | |
5705 | (sha256 | |
5706 | (base32 | |
5707 | "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6")))) | |
5708 | (build-system ant-build-system) | |
5709 | (arguments | |
5710 | `(#:build-target "jar" | |
5711 | #:test-target "test" | |
5712 | #:make-flags | |
5713 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
5714 | (junit (assoc-ref %build-inputs "java-junit"))) | |
fff4fcc4 JL |
5715 | (list (string-append "-Djunit.jar=" |
5716 | (car (find-files junit "jar$"))) | |
5717 | (string-append "-Dhamcrest.jar=" | |
5718 | (car (find-files hamcrest ".*.jar$"))))) | |
840969e8 RW |
5719 | #:phases |
5720 | (modify-phases %standard-phases | |
5721 | ;; We want to build the jar in the build phase and run the tests | |
5722 | ;; later in a separate phase. | |
5723 | (add-after 'unpack 'untangle-targets | |
5724 | (lambda _ | |
5725 | (substitute* "build.xml" | |
5726 | (("name=\"jar\" depends=\"test\"") | |
5727 | "name=\"jar\" depends=\"compile\"")) | |
5728 | #t)) | |
5729 | ;; There is no install target. | |
5730 | (replace 'install | |
5731 | (install-jars "target"))))) | |
5732 | (native-inputs | |
5733 | `(("java-junit" ,java-junit) | |
5734 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4f236f84 | 5735 | (home-page "https://commons.apache.org/math/") |
840969e8 RW |
5736 | (synopsis "Apache Commons mathematics library") |
5737 | (description "Commons Math is a library of lightweight, self-contained | |
5738 | mathematics and statistics components addressing the most common problems not | |
5739 | available in the Java programming language or Commons Lang.") | |
5740 | (license license:asl2.0))) | |
62c9bfaa RW |
5741 | |
5742 | (define-public java-jmh | |
5743 | (package | |
5744 | (name "java-jmh") | |
5745 | (version "1.17.5") | |
5746 | (source (origin | |
5747 | (method hg-fetch) | |
5748 | (uri (hg-reference | |
5749 | (url "http://hg.openjdk.java.net/code-tools/jmh/") | |
5750 | (changeset version))) | |
5751 | (file-name (string-append name "-" version "-checkout")) | |
5752 | (sha256 | |
5753 | (base32 | |
5754 | "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084")))) | |
5755 | (build-system ant-build-system) | |
5756 | (arguments | |
5757 | `(#:jar-name "jmh-core.jar" | |
5758 | #:source-dir "jmh-core/src/main" | |
5759 | #:test-dir "jmh-core/src/test" | |
5760 | #:phases | |
5761 | (modify-phases %standard-phases | |
5762 | ;; This seems to be a bug in the JDK. It may not be necessary in | |
5763 | ;; future versions of the JDK. | |
5764 | (add-after 'unpack 'fix-bug | |
5765 | (lambda _ | |
5766 | (with-directory-excursion | |
5767 | "jmh-core/src/main/java/org/openjdk/jmh/runner/options" | |
5768 | (substitute* '("IntegerValueConverter.java" | |
5769 | "ThreadsValueConverter.java") | |
5770 | (("public Class<Integer> valueType") | |
5771 | "public Class<? extends Integer> valueType"))) | |
5772 | #t))))) | |
5773 | (inputs | |
5774 | `(("java-jopt-simple" ,java-jopt-simple) | |
5775 | ("java-commons-math3" ,java-commons-math3))) | |
5776 | (native-inputs | |
5777 | `(("java-junit" ,java-junit) | |
5778 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
e799400d | 5779 | (home-page "https://openjdk.java.net/projects/code-tools/jmh/") |
62c9bfaa RW |
5780 | (synopsis "Benchmark harness for the JVM") |
5781 | (description "JMH is a Java harness for building, running, and analysing | |
5782 | nano/micro/milli/macro benchmarks written in Java and other languages | |
f4548394 | 5783 | targeting the JVM.") |
62c9bfaa RW |
5784 | ;; GPLv2 only |
5785 | (license license:gpl2))) | |
56ebb4e9 RW |
5786 | |
5787 | (define-public java-commons-collections4 | |
5788 | (package | |
5789 | (name "java-commons-collections4") | |
5790 | (version "4.1") | |
5791 | (source (origin | |
5792 | (method url-fetch) | |
5793 | (uri (string-append "mirror://apache/commons/collections/source/" | |
5794 | "commons-collections4-" version "-src.tar.gz")) | |
5795 | (sha256 | |
5796 | (base32 | |
5797 | "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl")))) | |
5798 | (build-system ant-build-system) | |
5799 | (arguments | |
5800 | `(#:test-target "test" | |
5801 | #:make-flags | |
5802 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
5803 | (junit (assoc-ref %build-inputs "java-junit")) | |
5804 | (easymock (assoc-ref %build-inputs "java-easymock"))) | |
fff4fcc4 JL |
5805 | (list (string-append "-Djunit.jar=" |
5806 | (car (find-files junit "jar$"))) | |
5807 | (string-append "-Dhamcrest.jar=" | |
5808 | (car (find-files hamcrest "jar$"))) | |
56ebb4e9 RW |
5809 | (string-append "-Deasymock.jar=" easymock |
5810 | "/share/java/easymock.jar"))) | |
5811 | #:phases | |
5812 | (modify-phases %standard-phases | |
5813 | (replace 'install | |
5814 | (install-jars "target"))))) | |
5815 | (native-inputs | |
5816 | `(("java-junit" ,java-junit) | |
5817 | ("java-hamcrest-core" ,java-hamcrest-core) | |
5818 | ("java-easymock" ,java-easymock))) | |
21e207d2 | 5819 | (home-page "https://commons.apache.org/collections/") |
56ebb4e9 RW |
5820 | (synopsis "Collections framework") |
5821 | (description "The Java Collections Framework is the recognised standard | |
5822 | for collection handling in Java. Commons-Collections seek to build upon the | |
5823 | JDK classes by providing new interfaces, implementations and utilities. There | |
5824 | are many features, including: | |
5825 | ||
5826 | @itemize | |
5827 | @item @code{Bag} interface for collections that have a number of copies of | |
5828 | each object | |
5829 | @item @code{BidiMap} interface for maps that can be looked up from value to | |
5830 | key as well and key to value | |
5831 | @item @code{MapIterator} interface to provide simple and quick iteration over | |
5832 | maps | |
5833 | @item Transforming decorators that alter each object as it is added to the | |
5834 | collection | |
5835 | @item Composite collections that make multiple collections look like one | |
5836 | @item Ordered maps and sets that retain the order elements are added in, | |
5837 | including an LRU based map | |
5838 | @item Reference map that allows keys and/or values to be garbage collected | |
5839 | under close control | |
5840 | @item Many comparator implementations | |
5841 | @item Many iterator implementations | |
5842 | @item Adapter classes from array and enumerations to collections | |
5843 | @item Utilities to test or create typical set-theory properties of collections | |
5844 | such as union, intersection, and closure. | |
5845 | @end itemize\n") | |
5846 | (license license:asl2.0))) | |
6af63e65 | 5847 | |
229a9864 JL |
5848 | (define-public java-commons-collections |
5849 | (package | |
5850 | (inherit java-commons-collections4) | |
5851 | (name "java-commons-collections") | |
5852 | (version "3.2.2") | |
5853 | (source (origin | |
5854 | (method url-fetch) | |
5855 | (uri (string-append "mirror://apache/commons/collections/source/" | |
5856 | "commons-collections-" version "-src.tar.gz")) | |
5857 | (sha256 | |
5858 | (base32 | |
7c7323e4 GB |
5859 | "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387")) |
5860 | (patches | |
5861 | (search-patches "java-commons-collections-fix-java8.patch")))) | |
229a9864 JL |
5862 | (arguments |
5863 | (substitute-keyword-arguments (package-arguments java-commons-collections4) | |
5864 | ((#:phases phases) | |
5865 | `(modify-phases ,phases | |
5866 | ;; The manifest is required by the build procedure | |
5867 | (add-before 'build 'add-manifest | |
5868 | (lambda _ | |
5869 | (mkdir-p "build/conf") | |
5870 | (call-with-output-file "build/conf/MANIFEST.MF" | |
5871 | (lambda (file) | |
2c8ac364 MW |
5872 | (format file "Manifest-Version: 1.0\n"))) |
5873 | #t)) | |
229a9864 JL |
5874 | (replace 'install |
5875 | (install-jars "build")))))))) | |
5876 | ||
5aa2f3f4 JL |
5877 | (define java-commons-collections-test-classes |
5878 | (package | |
5879 | (inherit java-commons-collections) | |
5880 | (arguments | |
5881 | `(#:jar-name "commons-collections-test-classes.jar" | |
5882 | #:source-dir "src/test" | |
5883 | #:tests? #f)) | |
5884 | (inputs | |
5885 | `(("collection" ,java-commons-collections))))) | |
5886 | ||
5887 | (define-public java-commons-beanutils | |
5888 | (package | |
5889 | (name "java-commons-beanutils") | |
5890 | (version "1.9.3") | |
5891 | (source (origin | |
5892 | (method url-fetch) | |
5893 | (uri (string-append "mirror://apache/commons/beanutils/source/" | |
5894 | "commons-beanutils-" version "-src.tar.gz")) | |
5895 | (sha256 | |
5896 | (base32 | |
5897 | "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk")))) | |
5898 | (build-system ant-build-system) | |
5899 | (arguments | |
5900 | `(#:test-target "test" | |
5901 | #:tests? #f | |
5902 | #:phases | |
5903 | (modify-phases %standard-phases | |
5904 | (replace 'install | |
5905 | (lambda* (#:key outputs #:allow-other-keys) | |
5906 | (rename-file (string-append "dist/commons-beanutils-" ,version | |
5907 | "-SNAPSHOT.jar") | |
5908 | "commons-beanutils.jar") | |
5909 | (install-file "commons-beanutils.jar" | |
5910 | (string-append (assoc-ref outputs "out") "/share/java/")) | |
5911 | #t))))) | |
5912 | (inputs | |
5913 | `(("logging" ,java-commons-logging-minimal) | |
5914 | ("collections" ,java-commons-collections))) | |
5915 | (native-inputs | |
5916 | `(("junit" ,java-junit) | |
5917 | ("collections-test" ,java-commons-collections-test-classes))) | |
4f236f84 | 5918 | (home-page "https://commons.apache.org/beanutils/") |
5aa2f3f4 JL |
5919 | (synopsis "Dynamically set or get properties in Java") |
5920 | (description "BeanUtils provides a simplified interface to reflection and | |
5921 | introspection to set or get dynamically determined properties through their | |
5922 | setter and getter method.") | |
5923 | (license license:asl2.0))) | |
5924 | ||
6af63e65 HG |
5925 | (define-public java-commons-io |
5926 | (package | |
5927 | (name "java-commons-io") | |
5928 | (version "2.5") | |
5929 | (source | |
5930 | (origin | |
5931 | (method url-fetch) | |
5932 | (uri (string-append "mirror://apache/commons/io/source/" | |
5933 | "commons-io-" version "-src.tar.gz")) | |
5934 | (sha256 | |
5935 | (base32 | |
5936 | "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3")))) | |
5937 | (build-system ant-build-system) | |
5938 | (outputs '("out" "doc")) | |
5939 | (arguments | |
5940 | `(#:test-target "test" | |
5941 | #:make-flags | |
5942 | (list (string-append "-Djunit.jar=" | |
fff4fcc4 JL |
5943 | (car (find-files (assoc-ref %build-inputs "java-junit") |
5944 | "jar$")))) | |
6af63e65 HG |
5945 | #:phases |
5946 | (modify-phases %standard-phases | |
5947 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
79265a45 | 5948 | (replace 'install (install-from-pom "pom.xml")) |
6af63e65 HG |
5949 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) |
5950 | (native-inputs | |
5951 | `(("java-junit" ,java-junit) | |
5952 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
79265a45 JL |
5953 | (propagated-inputs |
5954 | `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39))) | |
4f236f84 | 5955 | (home-page "https://commons.apache.org/io/") |
6af63e65 HG |
5956 | (synopsis "Common useful IO related classes") |
5957 | (description "Commons-IO contains utility classes, stream implementations, | |
5958 | file filters and endian classes.") | |
5959 | (license license:asl2.0))) | |
d631b5f3 | 5960 | |
46f9022c DM |
5961 | (define-public java-commons-exec-1.1 |
5962 | (package | |
5963 | (name "java-commons-exec") | |
5964 | (version "1.1") | |
5965 | (source | |
5966 | (origin | |
5967 | (method url-fetch) | |
5968 | (uri (string-append "mirror://apache/commons/exec/source/" | |
5969 | "commons-exec-" version "-src.tar.gz")) | |
5970 | (sha256 | |
5971 | (base32 | |
5972 | "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk")))) | |
5973 | (build-system ant-build-system) | |
5974 | (arguments | |
5975 | `(#:test-target "test" | |
5976 | #:make-flags | |
5977 | (list (string-append "-Dmaven.junit.jar=" | |
fff4fcc4 JL |
5978 | (car (find-files (assoc-ref %build-inputs "java-junit") |
5979 | "jar$")))) | |
46f9022c DM |
5980 | #:phases |
5981 | (modify-phases %standard-phases | |
5982 | (add-before 'build 'delete-network-tests | |
5983 | (lambda _ | |
5984 | (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java") | |
5985 | (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java" | |
5986 | (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") "")) | |
5987 | #t)) | |
5988 | ;; The "build" phase automatically tests. | |
5989 | (delete 'check) | |
5990 | (replace 'install (install-jars "target"))))) | |
5991 | (native-inputs | |
5992 | `(("java-junit" ,java-junit))) | |
31b85761 | 5993 | (home-page "https://commons.apache.org/proper/commons-exec/") |
46f9022c DM |
5994 | (synopsis "Common program execution related classes") |
5995 | (description "Commons-Exec simplifies executing external processes.") | |
5996 | (license license:asl2.0))) | |
5997 | ||
5998 | (define-public java-commons-exec | |
5999 | (package | |
6000 | (inherit java-commons-exec-1.1) | |
6001 | (version "1.3") | |
6002 | (source | |
6003 | (origin | |
6004 | (method url-fetch) | |
6005 | (uri (string-append "mirror://apache/commons/exec/source/" | |
6006 | "commons-exec-" version "-src.tar.gz")) | |
6007 | (sha256 | |
6008 | (base32 | |
6009 | "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv")))) | |
6010 | (arguments | |
6011 | `(#:test-target "test" | |
6012 | #:make-flags | |
6013 | (list (string-append "-Dmaven.junit.jar=" | |
fff4fcc4 JL |
6014 | (car (find-files (assoc-ref %build-inputs "java-junit") |
6015 | "jar$"))) | |
46f9022c DM |
6016 | "-Dmaven.compiler.source=1.7" |
6017 | "-Dmaven.compiler.target=1.7") | |
6018 | #:phases | |
6019 | (modify-phases %standard-phases | |
6020 | (add-before 'build 'delete-network-tests | |
6021 | (lambda* (#:key inputs #:allow-other-keys) | |
6022 | ;; This test hangs indefinitely. | |
6023 | (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java") | |
6024 | (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java" | |
6025 | (("ping -c 10 127.0.0.1") "sleep 10")) | |
6026 | (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java" | |
6027 | (("/bin/ls") "ls")) | |
6028 | (call-with-output-file "src/test/scripts/ping.sh" | |
6029 | (lambda (port) | |
6030 | (format port "#!~a/bin/sh\nsleep $1\n" | |
6031 | (assoc-ref inputs "bash")))) | |
6032 | #t)) | |
6033 | ;; The "build" phase automatically tests. | |
6034 | (delete 'check) | |
6035 | (replace 'install (install-jars "target"))))) | |
6036 | (native-inputs | |
6037 | `(("java-junit" ,java-junit) | |
6038 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
6039 | ||
d631b5f3 HG |
6040 | (define-public java-commons-lang |
6041 | (package | |
6042 | (name "java-commons-lang") | |
6043 | (version "2.6") | |
6044 | (source | |
6045 | (origin | |
6046 | (method url-fetch) | |
6047 | (uri (string-append "mirror://apache/commons/lang/source/" | |
6048 | "commons-lang-" version "-src.tar.gz")) | |
6049 | (sha256 | |
6050 | (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5")))) | |
6051 | (build-system ant-build-system) | |
6052 | (outputs '("out" "doc")) | |
6053 | (arguments | |
6054 | `(#:test-target "test" | |
e5a96113 | 6055 | #:test-exclude (list "**/Abstract*.java" "**/Random*.java") |
d631b5f3 HG |
6056 | #:phases |
6057 | (modify-phases %standard-phases | |
6058 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
6059 | (add-before 'check 'disable-failing-test | |
6060 | (lambda _ | |
6061 | ;; Disable a failing test | |
6062 | (substitute* "src/test/java/org/apache/commons/lang/\ | |
6063 | time/FastDateFormatTest.java" | |
6064 | (("public void testFormat\\(\\)") | |
6065 | "public void disabled_testFormat()")) | |
6066 | #t)) | |
6067 | (replace 'install (install-jars "target")) | |
6068 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) | |
6069 | (native-inputs | |
6070 | `(("java-junit" ,java-junit))) | |
4f236f84 | 6071 | (home-page "https://commons.apache.org/lang/") |
d631b5f3 HG |
6072 | (synopsis "Extension of the java.lang package") |
6073 | (description "The Commons Lang components contains a set of Java classes | |
6074 | that provide helper methods for standard Java classes, especially those found | |
6075 | in the @code{java.lang} package in the Sun JDK. The following classes are | |
6076 | included: | |
6077 | ||
6078 | @itemize | |
6079 | @item StringUtils - Helper for @code{java.lang.String}. | |
6080 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets | |
6081 | of characters such as @code{[a-z]} and @code{[abcdez]}. | |
6082 | @item RandomStringUtils - Helper for creating randomised strings. | |
6083 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. | |
6084 | @item NumberRange - A range of numbers with an upper and lower bound. | |
6085 | @item ObjectUtils - Helper for @code{java.lang.Object}. | |
6086 | @item SerializationUtils - Helper for serializing objects. | |
6087 | @item SystemUtils - Utility class defining the Java system properties. | |
6088 | @item NestedException package - A sub-package for the creation of nested | |
6089 | exceptions. | |
6090 | @item Enum package - A sub-package for the creation of enumerated types. | |
6091 | @item Builder package - A sub-package for the creation of @code{equals}, | |
6092 | @code{hashCode}, @code{compareTo} and @code{toString} methods. | |
6093 | @end itemize\n") | |
6094 | (license license:asl2.0))) | |
82e18864 HG |
6095 | |
6096 | (define-public java-commons-lang3 | |
6097 | (package | |
6098 | (name "java-commons-lang3") | |
b916b638 | 6099 | (version "3.9") |
82e18864 HG |
6100 | (source |
6101 | (origin | |
6102 | (method url-fetch) | |
6103 | (uri (string-append "mirror://apache/commons/lang/source/" | |
6104 | "commons-lang3-" version "-src.tar.gz")) | |
6105 | (sha256 | |
b916b638 | 6106 | (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6")))) |
82e18864 | 6107 | (build-system ant-build-system) |
82e18864 | 6108 | (arguments |
b916b638 JL |
6109 | `(#:jar-name "commons-lang3.jar" |
6110 | #:source-dir "src/main/java" | |
6111 | #:tests? #f; require junit5 | |
82e18864 HG |
6112 | #:phases |
6113 | (modify-phases %standard-phases | |
b916b638 JL |
6114 | (replace 'install (install-from-pom "pom.xml"))))) |
6115 | (propagated-inputs | |
6116 | `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48))) | |
4f236f84 | 6117 | (home-page "https://commons.apache.org/lang/") |
82e18864 HG |
6118 | (synopsis "Extension of the java.lang package") |
6119 | (description "The Commons Lang components contains a set of Java classes | |
6120 | that provide helper methods for standard Java classes, especially those found | |
6121 | in the @code{java.lang} package. The following classes are included: | |
6122 | ||
6123 | @itemize | |
6124 | @item StringUtils - Helper for @code{java.lang.String}. | |
6125 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of | |
6126 | characters such as @code{[a-z]} and @code{[abcdez]}. | |
6127 | @item RandomStringUtils - Helper for creating randomised strings. | |
6128 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. | |
6129 | @item NumberRange - A range of numbers with an upper and lower bound. | |
6130 | @item ObjectUtils - Helper for @code{java.lang.Object}. | |
6131 | @item SerializationUtils - Helper for serializing objects. | |
6132 | @item SystemUtils - Utility class defining the Java system properties. | |
6133 | @item NestedException package - A sub-package for the creation of nested | |
6134 | exceptions. | |
6135 | @item Enum package - A sub-package for the creation of enumerated types. | |
6136 | @item Builder package - A sub-package for the creation of @code{equals}, | |
6137 | @code{hashCode}, @code{compareTo} and @code{toString} methods. | |
6138 | @end itemize\n") | |
6139 | (license license:asl2.0))) | |
1c188f4e | 6140 | |
afb13a10 JL |
6141 | (define-public java-commons-bsf |
6142 | (package | |
6143 | (name "java-commons-bsf") | |
6144 | (version "2.4.0") | |
6145 | (source (origin | |
6146 | (method url-fetch) | |
6147 | (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-" | |
6148 | version ".tar.gz")) | |
6149 | (sha256 | |
6150 | (base32 | |
6151 | "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas")) | |
6152 | (modules '((guix build utils))) | |
6153 | (snippet | |
6154 | '(begin | |
6155 | (for-each delete-file | |
6156 | (find-files "." "\\.jar$")) | |
6157 | #t)))) | |
6158 | (build-system ant-build-system) | |
6159 | (arguments | |
6160 | `(#:build-target "jar" | |
6161 | #:tests? #f; No test file | |
6162 | #:modules ((guix build ant-build-system) | |
6163 | (guix build utils) | |
6164 | (guix build java-utils) | |
6165 | (sxml simple)) | |
6166 | #:phases | |
6167 | (modify-phases %standard-phases | |
6168 | (add-before 'build 'create-properties | |
6169 | (lambda _ | |
6170 | ;; This file is missing from the distribution | |
6171 | (call-with-output-file "build-properties.xml" | |
6172 | (lambda (port) | |
6173 | (sxml->xml | |
6174 | `(project (@ (basedir ".") (name "build-properties") (default "")) | |
6175 | (property (@ (name "project.name") (value "bsf"))) | |
6176 | (property (@ (name "source.level") (value "1.5"))) | |
6177 | (property (@ (name "build.lib") (value "build/jar"))) | |
6178 | (property (@ (name "src.dir") (value "src"))) | |
6179 | (property (@ (name "tests.dir") (value "src/org/apache/bsf/test"))) | |
6180 | (property (@ (name "build.tests") (value "build/test-classes"))) | |
6181 | (property (@ (name "build.dest") (value "build/classes")))) | |
2c8ac364 MW |
6182 | port))) |
6183 | #t)) | |
afb13a10 JL |
6184 | (replace 'install (install-jars "build"))))) |
6185 | (native-inputs | |
6186 | `(("java-junit" ,java-junit))) | |
6187 | (inputs | |
6188 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal))) | |
6189 | (home-page "https://commons.apache.org/proper/commons-bsf") | |
6190 | (synopsis "Bean Scripting Framework") | |
6191 | (description "The Bean Scripting Framework (BSF) is a set of Java classes | |
6192 | which provides scripting language support within Java applications, and access | |
6193 | to Java objects and methods from scripting languages. BSF allows one to write | |
6194 | JSPs in languages other than Java while providing access to the Java class | |
6195 | library. In addition, BSF permits any Java application to be implemented in | |
6196 | part (or dynamically extended) by a language that is embedded within it. This | |
6197 | is achieved by providing an API that permits calling scripting language engines | |
6198 | from within Java, as well as an object registry that exposes Java objects to | |
6199 | these scripting language engines.") | |
6200 | (license license:asl2.0))) | |
6201 | ||
66006fe5 JL |
6202 | (define-public java-commons-jxpath |
6203 | (package | |
6204 | (name "java-commons-jxpath") | |
6205 | (version "1.3") | |
6206 | (source (origin | |
6207 | (method url-fetch) | |
6208 | (uri (string-append "mirror://apache/commons/jxpath/source/" | |
6209 | "commons-jxpath-" version "-src.tar.gz")) | |
6210 | (sha256 | |
6211 | (base32 | |
6212 | "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs")))) | |
6213 | (build-system ant-build-system) | |
6214 | (arguments | |
6215 | `(#:jar-name "commons-jxpath.jar" | |
6216 | ;; tests require more dependencies, including mockrunner which depends on old software | |
6217 | #:tests? #f | |
6218 | #:source-dir "src/java")) | |
6219 | (inputs | |
10eddaca | 6220 | `(("servlet" ,java-classpathx-servletapi) |
66006fe5 JL |
6221 | ("java-jdom" ,java-jdom) |
6222 | ("java-commons-beanutils" ,java-commons-beanutils))) | |
6223 | (native-inputs | |
6224 | `(("java-junit" ,java-junit))) | |
4f236f84 | 6225 | (home-page "https://commons.apache.org/jxpath/") |
66006fe5 JL |
6226 | (synopsis "Simple interpreter of an expression language called XPath.") |
6227 | (description "The org.apache.commons.jxpath package defines a simple | |
6228 | interpreter of an expression language called XPath. JXPath applies XPath | |
6229 | expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet | |
6230 | contexts, DOM etc, including mixtures thereof.") | |
6231 | (license license:asl2.0))) | |
6232 | ||
b635d272 JL |
6233 | (define-public java-commons-pool |
6234 | (package | |
6235 | (name "java-commons-pool") | |
6236 | (version "2.6.2") | |
6237 | (source (origin | |
6238 | (method url-fetch) | |
6239 | (uri (string-append "mirror://apache/commons/pool/source/" | |
6240 | "commons-pool2-" version "-src.tar.gz")) | |
6241 | (sha256 | |
6242 | (base32 | |
6243 | "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6")))) | |
6244 | (arguments | |
6245 | `(#:jar-name "common-pool.jar" | |
6246 | #:source-dir "src/main/java" | |
6247 | #:test-exclude | |
6248 | (list "**/PerformanceTest.java"))) | |
6249 | (build-system ant-build-system) | |
6250 | (inputs | |
6251 | `(("java-cglib" ,java-cglib))) | |
6252 | (native-inputs | |
6253 | `(("java-junit" ,java-junit) | |
6254 | ("java-hamcrest-core" ,java-hamcrest-core) | |
6255 | ("java-asm" ,java-asm) | |
6256 | ("java-objenesis" ,java-objenesis))) | |
6257 | (home-page "https://commons.apache.org/proper/commons-pool/") | |
6258 | (synopsis "Object-pooling API in Java") | |
6259 | (description "The commons-pool package provides an object-pooling API | |
6260 | and a number of object pool implementations. This package defines a | |
6261 | handful of pooling interfaces and some base classes that may be useful when | |
6262 | creating new pool implementations.") | |
6263 | (license license:asl2.0))) | |
6264 | ||
f31ea164 JL |
6265 | (define-public java-commons-dbcp |
6266 | (package | |
6267 | (name "java-commons-dbcp") | |
6268 | (version "2.6.0") | |
6269 | (source (origin | |
6270 | (method url-fetch) | |
6271 | (uri (string-append "mirror://apache/commons/dbcp/source/" | |
6272 | "commons-dbcp2-" version "-src.tar.gz")) | |
6273 | (sha256 | |
6274 | (base32 | |
6275 | "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc")))) | |
6276 | (arguments | |
6277 | `(#:source-dir "src/main/java" | |
6278 | #:jar-name "java-commons-dbcp.jar" | |
6279 | #:tests? #f)); requires apache-geronimo | |
6280 | (inputs | |
6281 | `(("java-commons-pool" ,java-commons-pool) | |
6282 | ("java-commons-logging" ,java-commons-logging-minimal) | |
6283 | ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec))) | |
6284 | (native-inputs | |
6285 | `(("java-junit" ,java-junit))) | |
6286 | (build-system ant-build-system) | |
6287 | (home-page "https://commons.apache.org/proper/commons-dbcp/") | |
6288 | (synopsis "Database Connection Pool for Java") | |
6289 | (description "Commons-dbcp allows you to share a pool of database | |
6290 | connections between users. Creating a new connection for each user can be | |
6291 | time consuming and even unfeasible when the number of simultaneous users is | |
6292 | very large. This package provides a way to share a poole of connections to | |
6293 | reduce that load.") | |
6294 | (license license:asl2.0))) | |
6295 | ||
934b83e4 JL |
6296 | (define-public java-commons-jcs |
6297 | (package | |
6298 | (name "java-commons-jcs") | |
6299 | (version "2.2.1") | |
6300 | (source (origin | |
6301 | (method url-fetch) | |
6302 | (uri (string-append "mirror://apache/commons/jcs/source/" | |
6303 | "commons-jcs-dist-" version "-src.tar.gz")) | |
6304 | (sha256 | |
6305 | (base32 | |
6306 | "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q")))) | |
6307 | (build-system ant-build-system) | |
6308 | (arguments | |
6309 | `(#:jar-name "commons-jcs.jar" | |
6310 | #:source-dir "commons-jcs-core/src/main/java" | |
6311 | #:test-dir "commons-jcs-core/src/test" | |
6312 | #:tests? #f; requires hsqldb | |
6313 | #:phases | |
6314 | (modify-phases %standard-phases | |
6315 | (add-before 'build 'prepare | |
6316 | (lambda _ | |
6317 | (with-directory-excursion | |
6318 | "commons-jcs-core/src/main/java/org/apache/commons/jcs" | |
6319 | (substitute* | |
6320 | "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java" | |
6321 | (("commons.dbcp") "commons.dbcp2") | |
6322 | ((".*\\.setMaxActive.*") "")) | |
6323 | ;;; Remove dependency on velocity-tools | |
6324 | (delete-file "admin/servlet/JCSAdminServlet.java")) | |
6325 | #t))))) | |
6326 | (propagated-inputs | |
6327 | `(("java-classpathx-servletapi" ,java-classpathx-servletapi) | |
6328 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
6329 | ("java-commons-httpclient" ,java-commons-httpclient) | |
6330 | ("java-commons-dbcp" ,java-commons-dbcp))) | |
6331 | (native-inputs | |
6332 | `(("java-junit" ,java-junit))) | |
6333 | (home-page "https://commons.apache.org/proper/commons-jcs/") | |
6334 | (synopsis "Distributed caching system in Java") | |
6335 | (description "JCS is a distributed caching system written in Java. It | |
6336 | is intended to speed up applications by providing a means to manage cached | |
6337 | data of various dynamic natures. Like any caching system, JCS is most useful | |
6338 | for high read, low put applications. Latency times drop sharply and | |
6339 | bottlenecks move away from the database in an effectively cached system.") | |
6340 | (license license:asl2.0))) | |
6341 | ||
a1a5ef20 JL |
6342 | (define-public java-jsr250 |
6343 | (package | |
6344 | (name "java-jsr250") | |
6345 | (version "1.3") | |
6346 | (source (origin | |
6347 | (method url-fetch) | |
6348 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6349 | "javax/annotation/javax.annotation-api/" | |
6350 | version "/javax.annotation-api-" | |
6351 | version "-sources.jar")) | |
6352 | (sha256 | |
6353 | (base32 | |
6354 | "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz")))) | |
6355 | (build-system ant-build-system) | |
6356 | (arguments | |
6357 | `(#:tests? #f ; no tests included | |
6358 | #:jdk ,icedtea-8 | |
51087d51 JL |
6359 | #:jar-name "jsr250.jar" |
6360 | #:modules ((guix build ant-build-system) | |
6361 | (guix build utils) | |
6362 | (guix build maven pom) | |
6363 | (guix build java-utils) | |
6364 | (sxml simple)) | |
6365 | #:phases | |
6366 | (modify-phases %standard-phases | |
6367 | (add-before 'install 'create-pom | |
6368 | (lambda _ | |
6369 | (with-output-to-file "pom.xml" | |
6370 | (lambda _ | |
6371 | (sxml->xml | |
6372 | `((project | |
6373 | (modelVersion "4.0.0") | |
6374 | (name "jsr250") | |
6375 | (groupId "javax.annotation") | |
6376 | (artifactId "jsr250-api") | |
6377 | (version ,,version)))))) | |
6378 | #t)) | |
6379 | (replace 'install | |
6380 | (install-from-pom "pom.xml"))))) | |
a1a5ef20 JL |
6381 | (home-page "https://jcp.org/en/jsr/detail?id=250") |
6382 | (synopsis "Security-related annotations") | |
6383 | (description "This package provides annotations for security. It provides | |
6384 | packages in the @code{javax.annotation} and @code{javax.annotation.security} | |
6385 | namespaces.") | |
6386 | ;; either cddl or gpl2 only, with classpath exception | |
6387 | (license (list license:cddl1.0 | |
6388 | license:gpl2)))) | |
6389 | ||
0d4a0d60 RW |
6390 | (define-public java-jsr305 |
6391 | (package | |
6392 | (name "java-jsr305") | |
6393 | (version "3.0.1") | |
6394 | (source (origin | |
6395 | (method url-fetch) | |
6396 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6397 | "com/google/code/findbugs/" | |
6398 | "jsr305/" version "/jsr305-" | |
6399 | version "-sources.jar")) | |
6400 | (sha256 | |
6401 | (base32 | |
6402 | "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n")))) | |
6403 | (build-system ant-build-system) | |
6404 | (arguments | |
6405 | `(#:tests? #f ; no tests included | |
79265a45 JL |
6406 | #:jar-name "jsr305.jar" |
6407 | #:modules ((guix build ant-build-system) | |
6408 | (guix build java-utils) | |
6409 | (guix build maven pom) | |
6410 | (guix build utils) | |
6411 | (sxml simple)) | |
6412 | #:phases | |
6413 | (modify-phases %standard-phases | |
6414 | (add-before 'install 'create-pom | |
6415 | (lambda _ | |
6416 | (with-output-to-file "pom.xml" | |
6417 | (lambda _ | |
6418 | (sxml->xml | |
6419 | `((project | |
6420 | (modelVersion "4.0.0") | |
6421 | (name "jsr305") | |
6422 | (groupId "com.google.code.findbugs") | |
6423 | (artifactId "jsr305") | |
6424 | (version ,,version)))))) | |
6425 | #t)) | |
6426 | (replace 'install | |
6427 | (install-from-pom "pom.xml"))))) | |
0d4a0d60 RW |
6428 | (home-page "http://findbugs.sourceforge.net/") |
6429 | (synopsis "Annotations for the static analyzer called findbugs") | |
6430 | (description "This package provides annotations for the findbugs package. | |
6431 | It provides packages in the @code{javax.annotations} namespace.") | |
6432 | (license license:asl2.0))) | |
6433 | ||
4f3e47ea RW |
6434 | (define-public java-guava |
6435 | (package | |
6436 | (name "java-guava") | |
6437 | ;; This is the last release of Guava that can be built with Java 7. | |
6438 | (version "20.0") | |
6439 | (source (origin | |
02ed96dc JL |
6440 | (method git-fetch) |
6441 | (uri (git-reference | |
6442 | (url "https://github.com/google/guava/") | |
6443 | (commit (string-append "v" version)))) | |
2be973c3 | 6444 | (file-name (git-file-name name version)) |
4f3e47ea RW |
6445 | (sha256 |
6446 | (base32 | |
02ed96dc | 6447 | "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp")))) |
4f3e47ea RW |
6448 | (build-system ant-build-system) |
6449 | (arguments | |
6450 | `(#:tests? #f ; no tests included | |
6451 | #:jar-name "guava.jar" | |
02ed96dc | 6452 | #:source-dir "guava/src" |
4f3e47ea RW |
6453 | #:phases |
6454 | (modify-phases %standard-phases | |
6455 | (add-after 'unpack 'trim-sources | |
6456 | (lambda _ | |
02ed96dc | 6457 | (with-directory-excursion "guava/src/com/google/common" |
4f3e47ea RW |
6458 | ;; Remove annotations to avoid extra dependencies: |
6459 | ;; * "j2objc" annotations are used when converting Java to | |
6460 | ;; Objective C; | |
6461 | ;; * "errorprone" annotations catch common Java mistakes at | |
6462 | ;; compile time; | |
6463 | ;; * "IgnoreJRERequirement" is used for Android. | |
6464 | (substitute* (find-files "." "\\.java$") | |
6465 | (("import com.google.j2objc.*") "") | |
6466 | (("import com.google.errorprone.annotation.*") "") | |
6467 | (("import org.codehaus.mojo.animal_sniffer.*") "") | |
6468 | (("@CanIgnoreReturnValue") "") | |
6469 | (("@LazyInit") "") | |
6470 | (("@WeakOuter") "") | |
6471 | (("@RetainedWith") "") | |
6472 | (("@Weak") "") | |
6473 | (("@ForOverride") "") | |
6474 | (("@J2ObjCIncompatible") "") | |
6475 | (("@IgnoreJRERequirement") ""))) | |
02ed96dc JL |
6476 | #t)) |
6477 | (replace 'install (install-from-pom "guava/pom.xml"))))) | |
4f3e47ea RW |
6478 | (inputs |
6479 | `(("java-jsr305" ,java-jsr305))) | |
02ed96dc JL |
6480 | (propagated-inputs |
6481 | `(("java-guava-parent-pom" ,java-guava-parent-pom))) | |
4f3e47ea RW |
6482 | (home-page "https://github.com/google/guava") |
6483 | (synopsis "Google core libraries for Java") | |
6484 | (description "Guava is a set of core libraries that includes new | |
6485 | collection types (such as multimap and multiset), immutable collections, a | |
6486 | graph library, functional types, an in-memory cache, and APIs/utilities for | |
6487 | concurrency, I/O, hashing, primitives, reflection, string processing, and much | |
6488 | more!") | |
6489 | (license license:asl2.0))) | |
6490 | ||
02ed96dc JL |
6491 | (define java-guava-parent-pom |
6492 | (package | |
6493 | (inherit java-guava) | |
6494 | (name "java-guava-parent-pom") | |
6495 | (arguments | |
6496 | `(#:tests? #f | |
6497 | #:phases | |
6498 | (modify-phases %standard-phases | |
6499 | (delete 'configure) | |
6500 | (delete 'build) | |
6501 | (replace 'install | |
6502 | (install-pom-file "pom.xml"))))) | |
6503 | (propagated-inputs | |
6504 | `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7))))) | |
6505 | ||
af8f8281 RW |
6506 | ;; The java-commons-logging package provides adapters to many different |
6507 | ;; logging frameworks. To avoid an excessive dependency graph we try to build | |
6508 | ;; it with only a minimal set of adapters. | |
6509 | (define-public java-commons-logging-minimal | |
6510 | (package | |
6511 | (name "java-commons-logging-minimal") | |
6512 | (version "1.2") | |
6513 | (source (origin | |
6514 | (method url-fetch) | |
6515 | (uri (string-append "mirror://apache/commons/logging/source/" | |
6516 | "commons-logging-" version "-src.tar.gz")) | |
6517 | (sha256 | |
6518 | (base32 | |
6519 | "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9")))) | |
6520 | (build-system ant-build-system) | |
6521 | (arguments | |
6522 | `(#:tests? #f ; avoid dependency on logging frameworks | |
6523 | #:jar-name "commons-logging-minimal.jar" | |
6524 | #:phases | |
6525 | (modify-phases %standard-phases | |
6526 | (add-after 'unpack 'delete-adapters-and-tests | |
6527 | (lambda _ | |
6528 | ;; Delete all adapters except for NoOpLog, SimpleLog, and | |
6529 | ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl | |
6530 | ;; is used by applications; SimpleLog is the only actually usable | |
6531 | ;; implementation that does not depend on another logging | |
6532 | ;; framework. | |
6533 | (for-each | |
6534 | (lambda (file) | |
6535 | (delete-file (string-append | |
6536 | "src/main/java/org/apache/commons/logging/impl/" file))) | |
6537 | (list "Jdk13LumberjackLogger.java" | |
6538 | "WeakHashtable.java" | |
6539 | "Log4JLogger.java" | |
6540 | "ServletContextCleaner.java" | |
6541 | "Jdk14Logger.java" | |
6542 | "AvalonLogger.java" | |
6543 | "LogKitLogger.java")) | |
6544 | (delete-file-recursively "src/test") | |
6545 | #t))))) | |
4f236f84 | 6546 | (home-page "https://commons.apache.org/logging/") |
af8f8281 RW |
6547 | (synopsis "Common API for logging implementations") |
6548 | (description "The Logging package is a thin bridge between different | |
6549 | logging implementations. A library that uses the commons-logging API can be | |
6550 | used with any logging implementation at runtime.") | |
6551 | (license license:asl2.0))) | |
6552 | ||
90e65abe RW |
6553 | ;; This is the last release of the 1.x series. |
6554 | (define-public java-mockito-1 | |
6555 | (package | |
6556 | (name "java-mockito") | |
6557 | (version "1.10.19") | |
6558 | (source (origin | |
6559 | (method url-fetch) | |
6560 | (uri (string-append "http://repo1.maven.org/maven2/" | |
6561 | "org/mockito/mockito-core/" version | |
6562 | "/mockito-core-" version "-sources.jar")) | |
6563 | (sha256 | |
6564 | (base32 | |
6565 | "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc")))) | |
6566 | (build-system ant-build-system) | |
6567 | (arguments | |
6568 | `(#:jar-name "mockito.jar" | |
6569 | #:tests? #f ; no tests included | |
6570 | ;; FIXME: patch-and-repack does not support jars, so we have to apply | |
6571 | ;; patches in build phases. | |
6572 | #:phases | |
6573 | (modify-phases %standard-phases | |
6574 | ;; Mockito was developed against a different version of hamcrest, | |
6575 | ;; which does not require matcher implementations to provide an | |
6576 | ;; implementation of the "describeMismatch" method. We add this | |
6577 | ;; simple definition to pass the build with our version of hamcrest. | |
6578 | (add-after 'unpack 'fix-hamcrest-build-error | |
6579 | (lambda _ | |
6580 | (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java" | |
6581 | (("public Matcher getActualMatcher\\(\\) .*" line) | |
6582 | (string-append " | |
6583 | public void describeMismatch(Object item, Description description) { | |
6584 | actualMatcher.describeMismatch(item, description); | |
6585 | }" | |
6586 | line))) | |
6587 | #t)) | |
6588 | ;; Mockito bundles cglib. We have a cglib package, so let's use | |
6589 | ;; that instead. | |
6590 | (add-after 'unpack 'use-system-libraries | |
6591 | (lambda _ | |
6592 | (with-directory-excursion "src/org/mockito/internal/creation/cglib" | |
6593 | (substitute* '("CGLIBHacker.java" | |
6594 | "CglibMockMaker.java" | |
6595 | "ClassImposterizer.java" | |
6596 | "DelegatingMockitoMethodProxy.java" | |
6597 | "MethodInterceptorFilter.java" | |
6598 | "MockitoNamingPolicy.java" | |
6599 | "SerializableMockitoMethodProxy.java" | |
6600 | "SerializableNoOp.java") | |
6601 | (("import org.mockito.cglib") "import net.sf.cglib"))) | |
6602 | #t))))) | |
6603 | (inputs | |
6604 | `(("java-junit" ,java-junit) | |
6605 | ("java-objenesis" ,java-objenesis) | |
6606 | ("java-cglib" ,java-cglib) | |
6607 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
6608 | (home-page "http://mockito.org") | |
6609 | (synopsis "Mockito is a mock library for Java") | |
6610 | (description "Mockito is a mocking library for Java which lets you write | |
6611 | tests with a clean and simple API. It generates mocks using reflection, and | |
6612 | it records all mock invocations, including methods arguments.") | |
6613 | (license license:asl2.0))) | |
6614 | ||
4f4d2e47 RW |
6615 | (define-public java-httpcomponents-httpcore |
6616 | (package | |
6617 | (name "java-httpcomponents-httpcore") | |
6618 | (version "4.4.6") | |
6619 | (source (origin | |
6620 | (method url-fetch) | |
6621 | (uri (string-append "mirror://apache//httpcomponents/httpcore/" | |
6622 | "source/httpcomponents-core-" | |
6623 | version "-src.tar.gz")) | |
6624 | (sha256 | |
6625 | (base32 | |
6626 | "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy")))) | |
6627 | (build-system ant-build-system) | |
6628 | (arguments | |
6629 | `(#:jar-name "httpcomponents-httpcore.jar" | |
6630 | #:phases | |
6631 | (modify-phases %standard-phases | |
6632 | (add-after 'unpack 'chdir | |
6633 | (lambda _ (chdir "httpcore") #t))))) | |
6634 | (inputs | |
6635 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
6636 | ("java-commons-lang3" ,java-commons-lang3))) | |
6637 | (native-inputs | |
6638 | `(("java-junit" ,java-junit) | |
6639 | ("java-mockito" ,java-mockito-1))) | |
6640 | (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html") | |
6641 | (synopsis "Low level HTTP transport components") | |
6642 | (description "HttpCore is a set of low level HTTP transport components | |
6643 | that can be used to build custom client and server side HTTP services with a | |
6644 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based | |
6645 | on the classic Java I/O and non-blocking, event driven I/O model based on Java | |
6646 | NIO. | |
6647 | ||
6648 | This package provides the blocking I/O model library.") | |
6649 | (license license:asl2.0))) | |
6650 | ||
3a068b43 RW |
6651 | (define-public java-httpcomponents-httpcore-nio |
6652 | (package (inherit java-httpcomponents-httpcore) | |
6653 | (name "java-httpcomponents-httpcore-nio") | |
6654 | (arguments | |
6655 | `(#:jar-name "httpcomponents-httpcore-nio.jar" | |
6656 | #:phases | |
6657 | (modify-phases %standard-phases | |
6658 | (add-after 'unpack 'chdir | |
6659 | (lambda _ (chdir "httpcore-nio") #t))))) | |
6660 | (inputs | |
6661 | `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
6662 | ("java-hamcrest-core" ,java-hamcrest-core) | |
6663 | ,@(package-inputs java-httpcomponents-httpcore))) | |
6664 | (description "HttpCore is a set of low level HTTP transport components | |
6665 | that can be used to build custom client and server side HTTP services with a | |
6666 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based | |
6667 | on the classic Java I/O and non-blocking, event driven I/O model based on Java | |
6668 | NIO. | |
6669 | ||
6670 | This package provides the non-blocking I/O model library based on Java | |
6671 | NIO."))) | |
6672 | ||
e1dd78f6 RW |
6673 | (define-public java-httpcomponents-httpcore-ab |
6674 | (package (inherit java-httpcomponents-httpcore) | |
6675 | (name "java-httpcomponents-httpcore-ab") | |
6676 | (arguments | |
6677 | `(#:jar-name "httpcomponents-httpcore-ab.jar" | |
6678 | #:phases | |
6679 | (modify-phases %standard-phases | |
6680 | (add-after 'unpack 'chdir | |
6681 | (lambda _ (chdir "httpcore-ab") #t))))) | |
6682 | (inputs | |
6683 | `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
6684 | ("java-commons-cli" ,java-commons-cli) | |
6685 | ("java-hamcrest-core" ,java-hamcrest-core) | |
6686 | ,@(package-inputs java-httpcomponents-httpcore))) | |
6687 | (synopsis "Apache HttpCore benchmarking tool") | |
6688 | (description "This package provides the HttpCore benchmarking tool. It is | |
6689 | an Apache AB clone based on HttpCore."))) | |
6690 | ||
14a671d8 RW |
6691 | (define-public java-httpcomponents-httpclient |
6692 | (package | |
6693 | (name "java-httpcomponents-httpclient") | |
968bb682 | 6694 | (version "4.5.12") |
14a671d8 RW |
6695 | (source (origin |
6696 | (method url-fetch) | |
6697 | (uri (string-append "mirror://apache/httpcomponents/httpclient/" | |
6698 | "source/httpcomponents-client-" | |
6699 | version "-src.tar.gz")) | |
6700 | (sha256 | |
6701 | (base32 | |
968bb682 | 6702 | "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb")))) |
14a671d8 RW |
6703 | (build-system ant-build-system) |
6704 | (arguments | |
6705 | `(#:jar-name "httpcomponents-httpclient.jar" | |
6706 | #:phases | |
6707 | (modify-phases %standard-phases | |
6708 | (add-after 'unpack 'chdir | |
6709 | (lambda _ (chdir "httpclient") #t))))) | |
6710 | (inputs | |
6711 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
6712 | ("java-commons-codec" ,java-commons-codec) | |
6713 | ("java-hamcrest-core" ,java-hamcrest-core) | |
6714 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
6715 | ("java-mockito" ,java-mockito-1) | |
6716 | ("java-junit" ,java-junit))) | |
6717 | (home-page "https://hc.apache.org/httpcomponents-client-ga/") | |
6718 | (synopsis "HTTP client library for Java") | |
6719 | (description "Although the @code{java.net} package provides basic | |
6720 | functionality for accessing resources via HTTP, it doesn't provide the full | |
6721 | flexibility or functionality needed by many applications. @code{HttpClient} | |
6722 | seeks to fill this void by providing an efficient, up-to-date, and | |
6723 | feature-rich package implementing the client side of the most recent HTTP | |
6724 | standards and recommendations.") | |
6725 | (license license:asl2.0))) | |
6726 | ||
cbce5de2 RW |
6727 | (define-public java-httpcomponents-httpmime |
6728 | (package (inherit java-httpcomponents-httpclient) | |
6729 | (name "java-httpcomponents-httpmime") | |
6730 | (arguments | |
6731 | `(#:jar-name "httpcomponents-httpmime.jar" | |
6732 | #:phases | |
6733 | (modify-phases %standard-phases | |
6734 | (add-after 'unpack 'chdir | |
6735 | (lambda _ (chdir "httpmime") #t))))) | |
6736 | (inputs | |
6737 | `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) | |
6738 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
6739 | ("java-junit" ,java-junit) | |
6740 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
6741 | ||
4b34c21f RW |
6742 | (define-public java-commons-net |
6743 | (package | |
6744 | (name "java-commons-net") | |
6745 | (version "3.6") | |
6746 | (source (origin | |
6747 | (method url-fetch) | |
6748 | (uri (string-append "mirror://apache/commons/net/source/" | |
6749 | "commons-net-" version "-src.tar.gz")) | |
6750 | (sha256 | |
6751 | (base32 | |
6752 | "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr")))) | |
6753 | (build-system ant-build-system) | |
6754 | (arguments | |
6755 | `(;; FIXME: MainTest.java tries to read "examples.properties" (which | |
6756 | ;; should be "resources/examples/examples.properties"), but gets "null" | |
6757 | ;; instead. | |
6758 | #:tests? #f | |
6759 | #:jar-name "commons-net.jar")) | |
6760 | (native-inputs | |
6761 | `(("java-junit" ,java-junit) | |
6762 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4f236f84 | 6763 | (home-page "https://commons.apache.org/net/") |
4b34c21f RW |
6764 | (synopsis "Client library for many basic Internet protocols") |
6765 | (description "The Apache Commons Net library implements the client side of | |
6766 | many basic Internet protocols. The purpose of the library is to provide | |
6767 | fundamental protocol access, not higher-level abstractions.") | |
6768 | (license license:asl2.0))) | |
6769 | ||
808cb58f RW |
6770 | (define-public java-jsch |
6771 | (package | |
6772 | (name "java-jsch") | |
1c8ba10a | 6773 | (version "0.1.55") |
808cb58f RW |
6774 | (source (origin |
6775 | (method url-fetch) | |
6776 | (uri (string-append "mirror://sourceforge/jsch/jsch/" | |
6777 | version "/jsch-" version ".zip")) | |
6778 | (sha256 | |
6779 | (base32 | |
1c8ba10a | 6780 | "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6")))) |
808cb58f RW |
6781 | (build-system ant-build-system) |
6782 | (arguments | |
6783 | `(#:build-target "dist" | |
1c8ba10a | 6784 | #:tests? #f ; no tests included |
808cb58f RW |
6785 | #:phases |
6786 | (modify-phases %standard-phases | |
6787 | (replace 'install (install-jars "dist"))))) | |
6788 | (native-inputs | |
6789 | `(("unzip" ,unzip))) | |
6790 | (home-page "http://www.jcraft.com/jsch/") | |
6791 | (synopsis "Pure Java implementation of SSH2") | |
6792 | (description "JSch is a pure Java implementation of SSH2. JSch allows you | |
6793 | to connect to an SSH server and use port forwarding, X11 forwarding, file | |
6794 | transfer, etc., and you can integrate its functionality into your own Java | |
6795 | programs.") | |
6796 | (license license:bsd-3))) | |
6797 | ||
a6244698 RW |
6798 | (define-public java-commons-compress |
6799 | (package | |
6800 | (name "java-commons-compress") | |
6801 | (version "1.13") | |
6802 | (source (origin | |
6803 | (method url-fetch) | |
6804 | (uri (string-append "mirror://apache/commons/compress/source/" | |
6805 | "commons-compress-" version "-src.tar.gz")) | |
6806 | (sha256 | |
6807 | (base32 | |
6808 | "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8")))) | |
6809 | (build-system ant-build-system) | |
6810 | (arguments | |
6811 | `(#:jar-name "commons-compress.jar" | |
6812 | #:phases | |
6813 | (modify-phases %standard-phases | |
6814 | (add-after 'unpack 'delete-bad-tests | |
6815 | (lambda _ | |
6816 | (with-directory-excursion "src/test/java/org/apache/commons/compress/" | |
6817 | ;; FIXME: These tests really should not fail. Maybe they are | |
6818 | ;; indicative of problems with our Java packaging work. | |
6819 | ||
6820 | ;; This test fails with a null pointer exception. | |
6821 | (delete-file "archivers/sevenz/SevenZOutputFileTest.java") | |
6822 | ;; This test fails to open test resources. | |
6823 | (delete-file "archivers/zip/ExplodeSupportTest.java") | |
6824 | ||
6825 | ;; FIXME: This test adds a dependency on powermock, which is hard to | |
6826 | ;; package at this point. | |
6827 | ;; https://github.com/powermock/powermock | |
6828 | (delete-file "archivers/sevenz/SevenZNativeHeapTest.java")) | |
02ed96dc JL |
6829 | #t)) |
6830 | (replace 'install (install-from-pom "pom.xml"))))) | |
6831 | (propagated-inputs | |
6832 | `(("java-xz" ,java-xz) | |
6833 | ("apache-commons-parent-pom" ,apache-commons-parent-pom-41))) | |
6834 | (native-inputs | |
a6244698 | 6835 | `(("java-junit" ,java-junit) |
02ed96dc | 6836 | ("java-mockito" ,java-mockito-1))) |
a6244698 RW |
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 | |
6840 | working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ, | |
6841 | Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.") | |
6842 | (license license:asl2.0))) | |
6843 | ||
51263ff5 JL |
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 | |
6868 | Separated Value (CSV) format. The most common CSV formats are predefined in the | |
6869 | CSVFormat 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 | ||
6880 | Custom formats can be created using a fluent style API.") | |
6881 | (license license:asl2.0))) | |
6882 | ||
6ee6d0b5 RW |
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")) | |
c353d014 | 6899 | (home-page "https://www.osgi.org") |
6ee6d0b5 RW |
6900 | (synopsis "Annotation module of OSGi framework") |
6901 | (description | |
6902 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6903 | and service platform for the Java programming language. This package contains | |
6904 | the OSGi annotation module, providing additional services to help dynamic | |
6905 | components.") | |
6906 | (license license:asl2.0))) | |
6907 | ||
37e2e5d4 RW |
6908 | (define-public java-osgi-core |
6909 | (package | |
6910 | (name "java-osgi-core") | |
6911 | (version "6.0.0") | |
6912 | (source (origin | |
6913 | (method url-fetch) | |
6914 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6915 | "org/osgi/org.osgi.core/" version "/" | |
6916 | "org.osgi.core-" version "-sources.jar")) | |
6917 | (sha256 | |
6918 | (base32 | |
6919 | "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv")))) | |
6920 | (build-system ant-build-system) | |
6921 | (arguments | |
6922 | `(#:tests? #f ; no tests | |
6923 | #:jar-name "osgi-core.jar")) | |
6924 | (inputs | |
6925 | `(("java-osgi-annotation" ,java-osgi-annotation))) | |
c353d014 | 6926 | (home-page "https://www.osgi.org") |
37e2e5d4 RW |
6927 | (synopsis "Core module of OSGi framework") |
6928 | (description | |
6929 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6930 | and service platform for the Java programming language. This package contains | |
6931 | the OSGi Core module.") | |
6932 | (license license:asl2.0))) | |
6933 | ||
8af92c8f RW |
6934 | (define-public java-osgi-service-event |
6935 | (package | |
6936 | (name "java-osgi-service-event") | |
6937 | (version "1.3.1") | |
6938 | (source (origin | |
6939 | (method url-fetch) | |
6940 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6941 | "org/osgi/org.osgi.service.event/" | |
6942 | version "/org.osgi.service.event-" | |
6943 | version "-sources.jar")) | |
6944 | (sha256 | |
6945 | (base32 | |
6946 | "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm")))) | |
6947 | (build-system ant-build-system) | |
6948 | (arguments | |
6949 | `(#:tests? #f ; no tests | |
6950 | #:jar-name "osgi-service-event.jar")) | |
6951 | (inputs | |
6952 | `(("java-osgi-annotation" ,java-osgi-annotation) | |
6953 | ("java-osgi-core" ,java-osgi-core))) | |
c353d014 | 6954 | (home-page "https://www.osgi.org") |
8af92c8f RW |
6955 | (synopsis "OSGi service event module") |
6956 | (description | |
6957 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6958 | and service platform for the Java programming language. This package contains | |
6959 | the OSGi @code{org.osgi.service.event} module.") | |
6960 | (license license:asl2.0))) | |
6961 | ||
674e93a0 RW |
6962 | (define-public java-eclipse-osgi |
6963 | (package | |
6964 | (name "java-eclipse-osgi") | |
6965 | (version "3.11.3") | |
6966 | (source (origin | |
6967 | (method url-fetch) | |
6968 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6969 | "org/eclipse/platform/org.eclipse.osgi/" | |
6970 | version "/org.eclipse.osgi-" | |
6971 | version "-sources.jar")) | |
6972 | (sha256 | |
6973 | (base32 | |
6974 | "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b")))) | |
6975 | (build-system ant-build-system) | |
6976 | (arguments | |
6977 | `(#:tests? #f ; no tests included | |
6978 | #:jar-name "eclipse-equinox-osgi.jar")) | |
6979 | (inputs | |
6980 | `(("java-osgi-annotation" ,java-osgi-annotation))) | |
6981 | (home-page "http://www.eclipse.org/equinox/") | |
6982 | (synopsis "Eclipse Equinox OSGi framework") | |
6983 | (description "This package provides an implementation of the OSGi Core | |
6984 | specification.") | |
6985 | (license license:epl1.0))) | |
6986 | ||
81b55b1e RW |
6987 | (define-public java-eclipse-equinox-common |
6988 | (package | |
6989 | (name "java-eclipse-equinox-common") | |
e40e3792 | 6990 | (version "3.10.200") |
81b55b1e RW |
6991 | (source (origin |
6992 | (method url-fetch) | |
6993 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6994 | "org/eclipse/platform/org.eclipse.equinox.common/" | |
6995 | version "/org.eclipse.equinox.common-" | |
6996 | version "-sources.jar")) | |
6997 | (sha256 | |
6998 | (base32 | |
e40e3792 | 6999 | "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj")))) |
81b55b1e RW |
7000 | (build-system ant-build-system) |
7001 | (arguments | |
7002 | `(#:tests? #f ; no tests included | |
7003 | #:jar-name "eclipse-equinox-common.jar")) | |
7004 | (inputs | |
7005 | `(("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7006 | (home-page "http://www.eclipse.org/equinox/") | |
7007 | (synopsis "Common Eclipse runtime") | |
7008 | (description "This package provides the common Eclipse runtime.") | |
7009 | (license license:epl1.0))) | |
7010 | ||
90368ad9 RW |
7011 | (define-public java-eclipse-core-jobs |
7012 | (package | |
7013 | (name "java-eclipse-core-jobs") | |
7014 | (version "3.8.0") | |
7015 | (source (origin | |
7016 | (method url-fetch) | |
7017 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7018 | "org/eclipse/platform/org.eclipse.core.jobs/" | |
7019 | version "/org.eclipse.core.jobs-" | |
7020 | version "-sources.jar")) | |
7021 | (sha256 | |
7022 | (base32 | |
7023 | "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b")))) | |
7024 | (build-system ant-build-system) | |
7025 | (arguments | |
7026 | `(#:tests? #f ; no tests included | |
7027 | #:jar-name "eclipse-core-jobs.jar")) | |
7028 | (inputs | |
7029 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7030 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7031 | (home-page "http://www.eclipse.org/equinox/") | |
7032 | (synopsis "Eclipse jobs mechanism") | |
7033 | (description "This package provides the Eclipse jobs mechanism.") | |
7034 | (license license:epl1.0))) | |
7035 | ||
fbaf09eb RW |
7036 | (define-public java-eclipse-equinox-registry |
7037 | (package | |
7038 | (name "java-eclipse-equinox-registry") | |
7039 | (version "3.6.100") | |
7040 | (source (origin | |
7041 | (method url-fetch) | |
7042 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7043 | "org/eclipse/platform/org.eclipse.equinox.registry/" | |
7044 | version "/org.eclipse.equinox.registry-" | |
7045 | version "-sources.jar")) | |
7046 | (sha256 | |
7047 | (base32 | |
7048 | "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k")))) | |
7049 | (build-system ant-build-system) | |
7050 | (arguments | |
7051 | `(#:tests? #f ; no tests included | |
7052 | #:jar-name "eclipse-equinox-registry.jar")) | |
7053 | (inputs | |
7054 | `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
7055 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7056 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7057 | (home-page "http://www.eclipse.org/equinox/") | |
7058 | (synopsis "Eclipse extension registry support") | |
7059 | (description "This package provides support for the Eclipse extension | |
7060 | registry.") | |
7061 | (license license:epl1.0))) | |
7062 | ||
65214c87 RW |
7063 | (define-public java-eclipse-equinox-app |
7064 | (package | |
7065 | (name "java-eclipse-equinox-app") | |
7066 | (version "1.3.400") | |
7067 | (source (origin | |
7068 | (method url-fetch) | |
7069 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7070 | "org/eclipse/platform/org.eclipse.equinox.app/" | |
7071 | version "/org.eclipse.equinox.app-" | |
7072 | version "-sources.jar")) | |
7073 | (sha256 | |
7074 | (base32 | |
7075 | "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab")))) | |
7076 | (build-system ant-build-system) | |
7077 | (arguments | |
7078 | `(#:tests? #f ; no tests included | |
7079 | #:jar-name "eclipse-equinox-app.jar")) | |
7080 | (inputs | |
7081 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7082 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7083 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
7084 | ("java-osgi-service-event" ,java-osgi-service-event))) | |
7085 | (home-page "http://www.eclipse.org/equinox/") | |
7086 | (synopsis "Equinox application container") | |
7087 | (description "This package provides the Equinox application container for | |
7088 | Eclipse.") | |
7089 | (license license:epl1.0))) | |
7090 | ||
3f970214 RW |
7091 | (define-public java-eclipse-equinox-preferences |
7092 | (package | |
7093 | (name "java-eclipse-equinox-preferences") | |
7094 | (version "3.6.1") | |
7095 | (source (origin | |
7096 | (method url-fetch) | |
7097 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7098 | "org/eclipse/platform/org.eclipse.equinox.preferences/" | |
7099 | version "/org.eclipse.equinox.preferences-" | |
7100 | version "-sources.jar")) | |
7101 | (sha256 | |
7102 | (base32 | |
7103 | "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2")))) | |
7104 | (build-system ant-build-system) | |
7105 | (arguments | |
7106 | `(#:tests? #f ; no tests included | |
7107 | #:jar-name "eclipse-equinox-preferences.jar")) | |
7108 | (inputs | |
7109 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7110 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7111 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7112 | (home-page "http://www.eclipse.org/equinox/") | |
7113 | (synopsis "Eclipse preferences mechanism") | |
7114 | (description "This package provides the Eclipse preferences mechanism with | |
7115 | the module @code{org.eclipse.equinox.preferences}.") | |
7116 | (license license:epl1.0))) | |
7117 | ||
4ad3d4f3 RW |
7118 | (define-public java-eclipse-core-contenttype |
7119 | (package | |
7120 | (name "java-eclipse-core-contenttype") | |
7121 | (version "3.5.100") | |
7122 | (source (origin | |
7123 | (method url-fetch) | |
7124 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7125 | "org/eclipse/platform/org.eclipse.core.contenttype/" | |
7126 | version "/org.eclipse.core.contenttype-" | |
7127 | version "-sources.jar")) | |
7128 | (sha256 | |
7129 | (base32 | |
7130 | "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi")))) | |
7131 | (build-system ant-build-system) | |
7132 | (arguments | |
7133 | `(#:tests? #f ; no tests included | |
7134 | #:jar-name "eclipse-core-contenttype.jar")) | |
7135 | (inputs | |
7136 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7137 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7138 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7139 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7140 | (home-page "http://www.eclipse.org/") | |
7141 | (synopsis "Eclipse content mechanism") | |
7142 | (description "This package provides the Eclipse content mechanism in the | |
7143 | @code{org.eclipse.core.contenttype} module.") | |
7144 | (license license:epl1.0))) | |
7145 | ||
6a7f7e49 RW |
7146 | (define-public java-eclipse-core-runtime |
7147 | (package | |
7148 | (name "java-eclipse-core-runtime") | |
4fa9b6e6 | 7149 | (version "3.15.100") |
6a7f7e49 RW |
7150 | (source (origin |
7151 | (method url-fetch) | |
7152 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7153 | "org/eclipse/platform/org.eclipse.core.runtime/" | |
7154 | version "/org.eclipse.core.runtime-" | |
7155 | version "-sources.jar")) | |
7156 | (sha256 | |
7157 | (base32 | |
4fa9b6e6 | 7158 | "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r")))) |
6a7f7e49 RW |
7159 | (build-system ant-build-system) |
7160 | (arguments | |
7161 | `(#:tests? #f ; no tests included | |
7162 | #:jar-name "eclipse-core-runtime.jar")) | |
7163 | (inputs | |
7164 | `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
7165 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
7166 | ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
7167 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7168 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7169 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7170 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7171 | (home-page "https://www.eclipse.org/") | |
7172 | (synopsis "Eclipse core runtime") | |
7173 | (description "This package provides the Eclipse core runtime with the | |
7174 | module @code{org.eclipse.core.runtime}.") | |
7175 | (license license:epl1.0))) | |
7176 | ||
b3806a15 RW |
7177 | (define-public java-eclipse-core-filesystem |
7178 | (package | |
7179 | (name "java-eclipse-core-filesystem") | |
7180 | (version "1.6.1") | |
7181 | (source (origin | |
7182 | (method url-fetch) | |
7183 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7184 | "org/eclipse/platform/org.eclipse.core.filesystem/" | |
7185 | version "/org.eclipse.core.filesystem-" | |
7186 | version "-sources.jar")) | |
7187 | (sha256 | |
7188 | (base32 | |
7189 | "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj")))) | |
7190 | (build-system ant-build-system) | |
7191 | (arguments | |
7192 | `(#:tests? #f ; no tests included | |
7193 | #:jar-name "eclipse-core-filesystem.jar")) | |
7194 | (inputs | |
7195 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7196 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7197 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7198 | (home-page "https://www.eclipse.org/") | |
7199 | (synopsis "Eclipse core file system") | |
7200 | (description "This package provides the Eclipse core file system with the | |
7201 | module @code{org.eclipse.core.filesystem}.") | |
7202 | (license license:epl1.0))) | |
7203 | ||
e96060de RW |
7204 | (define-public java-eclipse-core-expressions |
7205 | (package | |
7206 | (name "java-eclipse-core-expressions") | |
7207 | (version "3.5.100") | |
7208 | (source (origin | |
7209 | (method url-fetch) | |
7210 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7211 | "org/eclipse/platform/org.eclipse.core.expressions/" | |
7212 | version "/org.eclipse.core.expressions-" | |
7213 | version "-sources.jar")) | |
7214 | (sha256 | |
7215 | (base32 | |
7216 | "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f")))) | |
7217 | (build-system ant-build-system) | |
7218 | (arguments | |
7219 | `(#:tests? #f ; no tests included | |
7220 | #:jar-name "eclipse-core-expressions.jar")) | |
7221 | (inputs | |
7222 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7223 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7224 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7225 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7226 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7227 | (home-page "https://www.eclipse.org/") | |
7228 | (synopsis "Eclipse core expression language") | |
7229 | (description "This package provides the Eclipse core expression language | |
7230 | with the @code{org.eclipse.core.expressions} module.") | |
7231 | (license license:epl1.0))) | |
7232 | ||
e8d0f7c8 RW |
7233 | (define-public java-eclipse-core-variables |
7234 | (package | |
7235 | (name "java-eclipse-core-variables") | |
7236 | (version "3.3.0") | |
7237 | (source (origin | |
7238 | (method url-fetch) | |
7239 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7240 | "org/eclipse/platform/org.eclipse.core.variables/" | |
7241 | version "/org.eclipse.core.variables-" | |
7242 | version "-sources.jar")) | |
7243 | (sha256 | |
7244 | (base32 | |
7245 | "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy")))) | |
7246 | (build-system ant-build-system) | |
7247 | (arguments | |
7248 | `(#:tests? #f ; no tests included | |
7249 | #:jar-name "eclipse-core-variables.jar")) | |
7250 | (inputs | |
7251 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7252 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7253 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7254 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7255 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7256 | (home-page "https://www.eclipse.org/platform") | |
7257 | (synopsis "Eclipse core variables") | |
7258 | (description "This package provides the Eclipse core variables module | |
7259 | @code{org.eclipse.core.variables}.") | |
7260 | (license license:epl1.0))) | |
7261 | ||
7c3d479e RW |
7262 | (define-public java-eclipse-ant-core |
7263 | (package | |
7264 | (name "java-eclipse-ant-core") | |
7265 | (version "3.4.100") | |
7266 | (source (origin | |
7267 | (method url-fetch) | |
7268 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7269 | "org/eclipse/platform/org.eclipse.ant.core/" | |
7270 | version "/org.eclipse.ant.core-" | |
7271 | version "-sources.jar")) | |
7272 | (sha256 | |
7273 | (base32 | |
7274 | "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7")))) | |
7275 | (build-system ant-build-system) | |
7276 | (arguments | |
7277 | `(#:tests? #f ; no tests included | |
7278 | #:jar-name "eclipse-ant-core.jar")) | |
7279 | (inputs | |
7280 | `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
7281 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7282 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7283 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7284 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
7285 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7286 | ("java-eclipse-core-variables" ,java-eclipse-core-variables) | |
7287 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7288 | (home-page "https://www.eclipse.org/platform") | |
7289 | (synopsis "Ant build tool core libraries") | |
7290 | (description "This package provides the ant build tool core libraries with | |
7291 | the module @code{org.eclipse.ant.core}.") | |
7292 | (license license:epl1.0))) | |
7293 | ||
6636f638 RW |
7294 | (define-public java-eclipse-core-resources |
7295 | (package | |
7296 | (name "java-eclipse-core-resources") | |
c8427a5e | 7297 | (version "3.13.200") |
6636f638 RW |
7298 | (source (origin |
7299 | (method url-fetch) | |
7300 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7301 | "org/eclipse/platform/org.eclipse.core.resources/" | |
7302 | version "/org.eclipse.core.resources-" | |
7303 | version "-sources.jar")) | |
7304 | (sha256 | |
7305 | (base32 | |
c8427a5e | 7306 | "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs")))) |
6636f638 RW |
7307 | (build-system ant-build-system) |
7308 | (arguments | |
7309 | `(#:tests? #f ; no tests included | |
7310 | #:jar-name "eclipse-core-resources.jar")) | |
7311 | (inputs | |
7312 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7313 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7314 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7315 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
7316 | ("java-eclipse-core-expressions" ,java-eclipse-core-expressions) | |
7317 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
7318 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
7319 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7320 | ("java-eclipse-ant-core" ,java-eclipse-ant-core) | |
7321 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7322 | (home-page "https://www.eclipse.org/") | |
7323 | (synopsis "Eclipse core resource management") | |
7324 | (description "This package provides the Eclipse core resource management | |
7325 | module @code{org.eclipse.core.resources}.") | |
7326 | (license license:epl1.0))) | |
7327 | ||
afb5858d RW |
7328 | (define-public java-eclipse-compare-core |
7329 | (package | |
7330 | (name "java-eclipse-compare-core") | |
7331 | (version "3.6.0") | |
7332 | (source (origin | |
7333 | (method url-fetch) | |
7334 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7335 | "org/eclipse/platform/org.eclipse.compare.core/" | |
7336 | version "/org.eclipse.compare.core-" | |
7337 | version "-sources.jar")) | |
7338 | (sha256 | |
7339 | (base32 | |
7340 | "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg")))) | |
7341 | (build-system ant-build-system) | |
7342 | (arguments | |
7343 | `(#:tests? #f ; no tests included | |
7344 | #:jar-name "eclipse-compare-core.jar")) | |
7345 | (inputs | |
7346 | `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7347 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7348 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
7349 | ("java-icu4j" ,java-icu4j))) | |
7350 | (home-page "https://www.eclipse.org/") | |
7351 | (synopsis "Eclipse core compare support") | |
7352 | (description "This package provides the Eclipse core compare support | |
7353 | module @code{org.eclipse.compare.core}.") | |
7354 | (license license:epl1.0))) | |
7355 | ||
1bb191fc RW |
7356 | (define-public java-eclipse-team-core |
7357 | (package | |
7358 | (name "java-eclipse-team-core") | |
7359 | (version "3.8.0") | |
7360 | (source (origin | |
7361 | (method url-fetch) | |
7362 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7363 | "org/eclipse/platform/org.eclipse.team.core/" | |
7364 | version "/org.eclipse.team.core-" | |
7365 | version "-sources.jar")) | |
7366 | (sha256 | |
7367 | (base32 | |
7368 | "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7")))) | |
7369 | (build-system ant-build-system) | |
7370 | (arguments | |
7371 | `(#:tests? #f ; no tests included | |
7372 | #:jar-name "eclipse-team-core.jar")) | |
7373 | (inputs | |
7374 | `(("java-eclipse-compare-core" ,java-eclipse-compare-core) | |
7375 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
7376 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
7377 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
7378 | ("java-eclipse-core-resources" ,java-eclipse-core-resources) | |
7379 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7380 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7381 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7382 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7383 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7384 | (home-page "https://www.eclipse.org/platform") | |
7385 | (synopsis "Eclipse team support core") | |
7386 | (description "This package provides the Eclipse team support core module | |
7387 | @code{org.eclipse.team.core}.") | |
7388 | (license license:epl1.0))) | |
7389 | ||
31342529 RW |
7390 | (define-public java-eclipse-core-commands |
7391 | (package | |
7392 | (name "java-eclipse-core-commands") | |
7393 | (version "3.8.1") | |
7394 | (source (origin | |
7395 | (method url-fetch) | |
7396 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7397 | "org/eclipse/platform/org.eclipse.core.commands/" | |
7398 | version "/org.eclipse.core.commands-" | |
7399 | version "-sources.jar")) | |
7400 | (sha256 | |
7401 | (base32 | |
7402 | "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9")))) | |
7403 | (build-system ant-build-system) | |
7404 | (arguments | |
7405 | `(#:tests? #f ; no tests included | |
7406 | #:jar-name "eclipse-core-commands.jar")) | |
7407 | (inputs | |
7408 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common))) | |
7409 | (home-page "https://www.eclipse.org/platform") | |
7410 | (synopsis "Eclipse core commands") | |
7411 | (description "This package provides Eclipse core commands in the module | |
7412 | @code{org.eclipse.core.commands}.") | |
7413 | (license license:epl1.0))) | |
7414 | ||
bf96acf7 RW |
7415 | (define-public java-eclipse-text |
7416 | (package | |
7417 | (name "java-eclipse-text") | |
7418 | (version "3.6.0") | |
7419 | (source (origin | |
7420 | (method url-fetch) | |
7421 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7422 | "org/eclipse/platform/org.eclipse.text/" | |
7423 | version "/org.eclipse.text-" | |
7424 | version "-sources.jar")) | |
7425 | (sha256 | |
7426 | (base32 | |
7427 | "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1")))) | |
7428 | (build-system ant-build-system) | |
7429 | (arguments | |
7430 | `(#:tests? #f ; no tests included | |
7431 | #:jar-name "eclipse-text.jar" | |
7432 | #:phases | |
7433 | (modify-phases %standard-phases | |
7434 | ;; When creating a new category we must make sure that the new list | |
7435 | ;; matches List<Position>. By default it seems to be too generic | |
7436 | ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>. | |
7437 | ;; Without this we get this error: | |
7438 | ;; | |
7439 | ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376: | |
7440 | ;; error: method put in interface Map<K,V> cannot be applied to given types; | |
7441 | ;; [javac] fPositions.put(category, new ArrayList<>()); | |
7442 | ;; [javac] ^ | |
7443 | ;; [javac] required: String,List<Position> | |
7444 | ;; [javac] found: String,ArrayList<Object> | |
7445 | ;; [javac] reason: actual argument ArrayList<Object> cannot be converted | |
7446 | ;; to List<Position> by method invocation conversion | |
7447 | ;; [javac] where K,V are type-variables: | |
7448 | ;; [javac] K extends Object declared in interface Map | |
7449 | ;; [javac] V extends Object declared in interface Map | |
7450 | ;; | |
7451 | ;; I don't know if this is a good fix. I suspect it is not, but it | |
7452 | ;; seems to work. | |
7453 | (add-after 'unpack 'fix-compilation-error | |
7454 | (lambda _ | |
7455 | (substitute* "src/org/eclipse/jface/text/AbstractDocument.java" | |
7456 | (("Positions.put\\(category, new ArrayList<>\\(\\)\\);") | |
7457 | "Positions.put(category, new ArrayList<Position>());")) | |
7458 | #t))))) | |
7459 | (inputs | |
7460 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7461 | ("java-eclipse-core-commands" ,java-eclipse-core-commands) | |
7462 | ("java-icu4j" ,java-icu4j))) | |
7463 | (home-page "http://www.eclipse.org/platform") | |
7464 | (synopsis "Eclipse text library") | |
7465 | (description "Platform Text is part of the Platform UI project and | |
7466 | provides the basic building blocks for text and text editors within Eclipse | |
7467 | and contributes the Eclipse default text editor.") | |
7468 | (license license:epl1.0))) | |
7469 | ||
c24d11b7 RW |
7470 | (define-public java-eclipse-jdt-core |
7471 | (package | |
7472 | (name "java-eclipse-jdt-core") | |
43d6776b | 7473 | (version "3.16.0") |
c24d11b7 RW |
7474 | (source (origin |
7475 | (method url-fetch) | |
7476 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7477 | "org/eclipse/jdt/org.eclipse.jdt.core/" | |
7478 | version "/org.eclipse.jdt.core-" | |
7479 | version "-sources.jar")) | |
7480 | (sha256 | |
7481 | (base32 | |
43d6776b | 7482 | "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k")))) |
c24d11b7 RW |
7483 | (build-system ant-build-system) |
7484 | (arguments | |
7485 | `(#:tests? #f ; no tests included | |
84b226c2 RW |
7486 | #:jar-name "eclipse-jdt-core.jar" |
7487 | #:phases | |
7488 | (modify-phases %standard-phases | |
7489 | (add-after 'unpack 'move-sources | |
7490 | (lambda _ | |
7491 | (with-directory-excursion "src/jdtCompilerAdaptersrc/" | |
7492 | (for-each (lambda (file) | |
7493 | (install-file file (string-append "../" (dirname file)))) | |
7494 | (find-files "." ".*"))) | |
7495 | (delete-file-recursively "src/jdtCompilerAdaptersrc/") | |
7496 | #t)) | |
7497 | (add-before 'build 'copy-resources | |
7498 | (lambda _ | |
7499 | (with-directory-excursion "src" | |
7500 | (for-each (lambda (file) | |
7501 | (install-file file (string-append "../build/classes/" (dirname file)))) | |
7502 | (find-files "." ".*.(props|properties|rsc)"))) | |
7503 | #t))))) | |
c24d11b7 RW |
7504 | (inputs |
7505 | `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
7506 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
7507 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
7508 | ("java-eclipse-core-resources" ,java-eclipse-core-resources) | |
7509 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7510 | ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
7511 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7512 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7513 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7514 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
7515 | ("java-eclipse-text" ,java-eclipse-text))) | |
7516 | (home-page "https://www.eclipse.org/jdt") | |
7517 | (synopsis "Java development tools core libraries") | |
7518 | (description "This package provides the core libraries of the Eclipse Java | |
7519 | development tools.") | |
7520 | (license license:epl1.0))) | |
7521 | ||
74c2339f RW |
7522 | (define-public java-eclipse-jdt-compiler-apt |
7523 | (package | |
7524 | (name "java-eclipse-jdt-compiler-apt") | |
7525 | (version "1.3.400") | |
7526 | (source (origin | |
7527 | (method url-fetch) | |
7528 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7529 | "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/" | |
7530 | version "/org.eclipse.jdt.compiler.apt-" | |
7531 | version "-sources.jar")) | |
7532 | (sha256 | |
7533 | (base32 | |
7534 | "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8")))) | |
7535 | (build-system ant-build-system) | |
7536 | (arguments | |
7537 | `(#:tests? #f ; no tests included | |
7538 | #:jar-name "eclipse-jdt-compiler-apt.jar" | |
7539 | #:jdk ,openjdk11)) | |
7540 | (inputs | |
7541 | `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core))) | |
7542 | (home-page "https://www.eclipse.org/jdt/apt/") | |
7543 | (synopsis "Annotation processing tool") | |
7544 | (description "APT stands for Annotation Processing Tool. APT provides a | |
7545 | means for generating files and compiling new Java classes based on annotations | |
7546 | found in your source code.") | |
7547 | (license license:epl2.0))) | |
7548 | ||
a5cdcf6c RW |
7549 | (define-public java-javax-mail |
7550 | (package | |
7551 | (name "java-javax-mail") | |
7552 | (version "1.5.6") | |
7553 | (source (origin | |
7554 | (method url-fetch) | |
7555 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7556 | "com/sun/mail/javax.mail/" | |
7557 | version "/javax.mail-" | |
7558 | version "-sources.jar")) | |
7559 | (sha256 | |
7560 | (base32 | |
7561 | "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9")))) | |
7562 | (build-system ant-build-system) | |
7563 | (arguments | |
7564 | `(#:tests? #f ; no tests | |
7565 | #:jar-name "javax-mail.jar")) | |
7566 | (home-page "https://javamail.java.net") | |
7567 | (synopsis "Reference implementation of the JavaMail API") | |
7568 | (description | |
7569 | "This package provides versions of the JavaMail API implementation, IMAP, | |
7570 | SMTP, and POP3 service providers, some examples, and documentation for the | |
7571 | JavaMail API.") | |
7572 | ;; GPLv2 only with "classpath exception". | |
7573 | (license license:gpl2))) | |
7574 | ||
0e660c4d RW |
7575 | (define-public java-log4j-api |
7576 | (package | |
7577 | (name "java-log4j-api") | |
7578 | (version "2.4.1") | |
7579 | (source (origin | |
7580 | (method url-fetch) | |
7581 | (uri (string-append "mirror://apache/logging/log4j/" version | |
7582 | "/apache-log4j-" version "-src.tar.gz")) | |
7583 | (sha256 | |
7584 | (base32 | |
7585 | "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd")))) | |
7586 | (build-system ant-build-system) | |
7587 | (arguments | |
7588 | `(#:tests? #f ; tests require unpackaged software | |
7589 | #:jar-name "log4j-api.jar" | |
7590 | #:make-flags | |
7591 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") | |
7592 | "/share/java")) | |
7593 | #:phases | |
7594 | (modify-phases %standard-phases | |
7595 | (add-after 'unpack 'enter-dir | |
7596 | (lambda _ (chdir "log4j-api") #t)) | |
7597 | ;; FIXME: The tests require additional software that has not been | |
7598 | ;; packaged yet, such as | |
7599 | ;; * org.apache.maven | |
7600 | ;; * org.apache.felix | |
7601 | (add-after 'enter-dir 'delete-tests | |
7602 | (lambda _ (delete-file-recursively "src/test") #t))))) | |
7603 | (inputs | |
7604 | `(("java-osgi-core" ,java-osgi-core) | |
7605 | ("java-hamcrest-core" ,java-hamcrest-core) | |
7606 | ("java-junit" ,java-junit))) | |
4d1ddb51 | 7607 | (home-page "https://logging.apache.org/log4j/2.x/") |
0e660c4d RW |
7608 | (synopsis "API module of the Log4j logging framework for Java") |
7609 | (description | |
7610 | "This package provides the API module of the Log4j logging framework for | |
7611 | Java.") | |
7612 | (license license:asl2.0))) | |
7613 | ||
dfef4231 JL |
7614 | (define-public java-log4j-core |
7615 | (package | |
7616 | (inherit java-log4j-api) | |
7617 | (name "java-log4j-core") | |
7618 | (inputs | |
7619 | `(("java-osgi-core" ,java-osgi-core) | |
7620 | ("java-hamcrest-core" ,java-hamcrest-core) | |
7621 | ("java-log4j-api" ,java-log4j-api) | |
7622 | ("java-mail" ,java-mail) | |
7623 | ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec) | |
7624 | ("java-lmax-disruptor" ,java-lmax-disruptor) | |
7625 | ("java-kafka" ,java-kafka-clients) | |
7626 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) | |
7627 | ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
7628 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
7629 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) | |
7630 | ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml) | |
7631 | ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml) | |
7632 | ("java-commons-compress" ,java-commons-compress) | |
7633 | ("java-commons-csv" ,java-commons-csv) | |
7634 | ("java-jeromq" ,java-jeromq) | |
7635 | ("java-junit" ,java-junit))) | |
7636 | (native-inputs | |
7637 | `(("hamcrest" ,java-hamcrest-all) | |
7638 | ("java-commons-io" ,java-commons-io) | |
7639 | ("java-commons-lang3" ,java-commons-lang3) | |
7640 | ("slf4j" ,java-slf4j-api))) | |
7641 | (arguments | |
7642 | `(#:tests? #f ; tests require more dependencies | |
7643 | #:test-dir "src/test" | |
7644 | #:source-dir "src/main/java" | |
7645 | #:jar-name "log4j-core.jar" | |
7646 | #:jdk ,icedtea-8 | |
7647 | #:make-flags | |
7648 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") | |
7649 | "/share/java")) | |
7650 | #:phases | |
7651 | (modify-phases %standard-phases | |
7652 | (add-after 'unpack 'enter-dir | |
7653 | (lambda _ (chdir "log4j-core") #t))))) | |
7654 | (synopsis "Core component of the Log4j framework") | |
7655 | (description "This package provides the core component of the Log4j | |
7656 | logging framework for Java."))) | |
7657 | ||
2caf873e JL |
7658 | (define-public java-log4j-1.2-api |
7659 | (package | |
7660 | (inherit java-log4j-api) | |
7661 | (name "java-log4j-1.2-api") | |
7662 | (arguments | |
7663 | `(#:jar-name "java-log4j-1.2-api.jar" | |
7664 | #:source-dir "log4j-1.2-api/src/main/java" | |
7665 | #:jdk ,icedtea-8 | |
7666 | ;; Tests require maven-model (and other maven subprojects), which is a | |
7667 | ;; cyclic dependency. | |
7668 | #:tests? #f)) | |
7669 | (inputs | |
7670 | `(("log4j-api" ,java-log4j-api) | |
7671 | ("log4j-core" ,java-log4j-core) | |
7672 | ("osgi-core" ,java-osgi-core) | |
7673 | ("eclipse-osgi" ,java-eclipse-osgi) | |
7674 | ("java-lmax-disruptor" ,java-lmax-disruptor))))) | |
7675 | ||
1c188f4e HG |
7676 | (define-public java-commons-cli |
7677 | (package | |
7678 | (name "java-commons-cli") | |
37602dd8 | 7679 | (version "1.4") |
1c188f4e HG |
7680 | (source (origin |
7681 | (method url-fetch) | |
7682 | (uri (string-append "mirror://apache/commons/cli/source/" | |
7683 | "commons-cli-" version "-src.tar.gz")) | |
7684 | (sha256 | |
7685 | (base32 | |
37602dd8 | 7686 | "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1")))) |
1c188f4e HG |
7687 | (build-system ant-build-system) |
7688 | ;; TODO: javadoc | |
7689 | (arguments | |
51087d51 JL |
7690 | `(#:jar-name "commons-cli.jar" |
7691 | #:phases | |
7692 | (modify-phases %standard-phases | |
7693 | (replace 'install | |
7694 | (install-from-pom "pom.xml"))))) | |
1c188f4e HG |
7695 | (native-inputs |
7696 | `(("java-junit" ,java-junit) | |
7697 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
1b3a6038 | 7698 | (home-page "https://commons.apache.org/cli/") |
1c188f4e HG |
7699 | (synopsis "Command line arguments and options parsing library") |
7700 | (description "The Apache Commons CLI library provides an API for parsing | |
7701 | command line options passed to programs. It is also able to print help | |
7702 | messages detailing the options available for a command line tool. | |
7703 | ||
7704 | Commons CLI supports different types of options: | |
7705 | ||
7706 | @itemize | |
7707 | @item POSIX like options (ie. tar -zxvf foo.tar.gz) | |
7708 | @item GNU like long options (ie. du --human-readable --max-depth=1) | |
7709 | @item Java like properties (ie. java -Djava.awt.headless=true Foo) | |
7710 | @item Short options with value attached (ie. gcc -O2 foo.c) | |
7711 | @item long options with single hyphen (ie. ant -projecthelp) | |
7712 | @end itemize | |
7713 | ||
7714 | This is a part of the Apache Commons Project.") | |
7715 | (license license:asl2.0))) | |
0a8519bc HG |
7716 | |
7717 | (define-public java-commons-codec | |
7718 | (package | |
7719 | (name "java-commons-codec") | |
ba03666d | 7720 | (version "1.14") |
0a8519bc HG |
7721 | (source (origin |
7722 | (method url-fetch) | |
7723 | (uri (string-append "mirror://apache/commons/codec/source/" | |
7724 | "commons-codec-" version "-src.tar.gz")) | |
7725 | (sha256 | |
7726 | (base32 | |
ba03666d | 7727 | "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9")))) |
0a8519bc | 7728 | (build-system ant-build-system) |
0a8519bc | 7729 | (arguments |
ba03666d JL |
7730 | `(#:jar-name "java-commons-codec.jar" |
7731 | #:source-dir "src/main/java" | |
7732 | #:test-dir "src/test" | |
7733 | #:test-exclude (list "**/*AbstractTest.java") | |
0a8519bc HG |
7734 | #:phases |
7735 | (modify-phases %standard-phases | |
ba03666d JL |
7736 | (add-before 'build 'copy-resources |
7737 | (lambda _ | |
7738 | (copy-recursively "src/main/resources" | |
7739 | "build/classes") | |
7740 | #t)) | |
7741 | (add-before 'check 'copy-test-resources | |
7742 | (lambda _ | |
7743 | (copy-recursively "src/test/resources" | |
7744 | "build/test-classes") | |
7745 | #t)) | |
7746 | (replace 'install (install-from-pom "pom.xml"))))) | |
0a8519bc | 7747 | (native-inputs |
ba03666d JL |
7748 | `(("java-commons-lang3" ,java-commons-lang3) |
7749 | ("java-junit" ,java-junit))) | |
7750 | (propagated-inputs | |
7751 | `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50))) | |
77e1fe31 | 7752 | (home-page "https://commons.apache.org/codec/") |
0a8519bc HG |
7753 | (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs") |
7754 | (description "The codec package contains simple encoder and decoders for | |
7755 | various formats such as Base64 and Hexadecimal. In addition to these widely | |
7756 | used encoders and decoders, the codec package also maintains a collection of | |
7757 | phonetic encoding utilities. | |
7758 | ||
7759 | This is a part of the Apache Commons Project.") | |
7760 | (license license:asl2.0))) | |
7d91c1b9 HG |
7761 | |
7762 | (define-public java-commons-daemon | |
7763 | (package | |
7764 | (name "java-commons-daemon") | |
b503ae3d | 7765 | (version "1.1.0") |
7d91c1b9 HG |
7766 | (source (origin |
7767 | (method url-fetch) | |
7768 | (uri (string-append "mirror://apache/commons/daemon/source/" | |
7769 | "commons-daemon-" version "-src.tar.gz")) | |
7770 | (sha256 | |
7771 | (base32 | |
b503ae3d | 7772 | "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n")))) |
7d91c1b9 HG |
7773 | (build-system ant-build-system) |
7774 | (arguments | |
7775 | `(#:test-target "test" | |
7776 | #:phases | |
7777 | (modify-phases %standard-phases | |
7778 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
7779 | (replace 'install (install-jars "dist")) | |
7780 | (add-after 'install 'install-doc (install-javadoc "dist/docs/api"))))) | |
7781 | (native-inputs | |
7782 | `(("java-junit" ,java-junit))) | |
4f236f84 | 7783 | (home-page "https://commons.apache.org/daemon/") |
7d91c1b9 HG |
7784 | (synopsis "Library to launch Java applications as daemons") |
7785 | (description "The Daemon package from Apache Commons can be used to | |
7786 | implement Java applications which can be launched as daemons. For example the | |
7787 | program will be notified about a shutdown so that it can perform cleanup tasks | |
7788 | before its process of execution is destroyed by the operation system. | |
7789 | ||
7790 | This package contains the Java library. You will also need the actual binary | |
7791 | for your architecture which is provided by the jsvc package. | |
7792 | ||
7793 | This is a part of the Apache Commons Project.") | |
7794 | (license license:asl2.0))) | |
9f68e74a | 7795 | |
eb270ecf RW |
7796 | (define-public java-javaewah |
7797 | (package | |
7798 | (name "java-javaewah") | |
7799 | (version "1.1.6") | |
7800 | (source (origin | |
2876b233 EF |
7801 | (method git-fetch) |
7802 | (uri (git-reference | |
7803 | (url "https://github.com/lemire/javaewah/") | |
7804 | (commit (string-append "JavaEWAH-" version)))) | |
7805 | (file-name (git-file-name name version)) | |
eb270ecf RW |
7806 | (sha256 |
7807 | (base32 | |
2876b233 | 7808 | "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw")))) |
eb270ecf RW |
7809 | (build-system ant-build-system) |
7810 | (arguments `(#:jar-name "javaewah.jar")) | |
7811 | (inputs | |
7812 | `(("java-junit" ,java-junit) | |
7813 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
7814 | (home-page "https://github.com/lemire/javaewah") | |
7815 | (synopsis "Compressed alternative to the Java @code{BitSet} class") | |
7816 | (description "This is a word-aligned compressed variant of the Java | |
7817 | @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like | |
7818 | compression scheme. It can be used to implement bitmap indexes. | |
7819 | ||
7820 | The goal of word-aligned compression is not to achieve the best compression, | |
2876b233 | 7821 | but rather to improve query processing time. Hence, JavaEWAH tries to save CPU |
eb270ecf RW |
7822 | cycles, maybe at the expense of storage. However, the EWAH scheme is always |
7823 | more efficient storage-wise than an uncompressed bitmap (as implemented in the | |
7824 | @code{BitSet} class by Sun).") | |
7825 | ;; GPL2.0 derivates are explicitly allowed. | |
7826 | (license license:asl2.0))) | |
7827 | ||
f8e4d022 RW |
7828 | (define-public java-slf4j-api |
7829 | (package | |
7830 | (name "java-slf4j-api") | |
7831 | (version "1.7.25") | |
7832 | (source (origin | |
7833 | (method url-fetch) | |
7834 | (uri (string-append "https://www.slf4j.org/dist/slf4j-" | |
7835 | version ".tar.gz")) | |
7836 | (sha256 | |
7837 | (base32 | |
7838 | "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb")) | |
7839 | (modules '((guix build utils))) | |
7840 | ;; Delete bundled jars. | |
7841 | (snippet | |
7842 | '(begin | |
7843 | (for-each delete-file (find-files "." "\\.jar$")) | |
7844 | #t)))) | |
7845 | (build-system ant-build-system) | |
7846 | (arguments | |
dcf7a8a6 | 7847 | `(#:jar-name "slf4j-api.jar" |
f8e4d022 | 7848 | #:source-dir "slf4j-api/src/main" |
dcf7a8a6 JL |
7849 | #:test-dir "slf4j-api/src/test" |
7850 | #:phases | |
7851 | (modify-phases %standard-phases | |
7852 | (add-after 'build 'regenerate-jar | |
7853 | (lambda _ | |
7854 | ;; pom.xml ignores these files in the jar creation process. If we don't, | |
7855 | ;; we get the error "This code should have never made it into slf4j-api.jar" | |
7856 | (delete-file-recursively "build/classes/org/slf4j/impl") | |
2c8ac364 MW |
7857 | (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C" |
7858 | "build/classes" "."))) | |
dcf7a8a6 JL |
7859 | (add-before 'check 'dont-test-abstract-classes |
7860 | (lambda _ | |
7861 | ;; abstract classes are not meant to be run with junit | |
7862 | (substitute* "build.xml" | |
7863 | (("<include name=\"\\*\\*/\\*Test.java\" />") | |
7864 | (string-append "<include name=\"**/*Test.java\" />" | |
7865 | "<exclude name=\"**/MultithreadedInitializationTest" | |
2c8ac364 | 7866 | ".java\" />"))) |
51087d51 JL |
7867 | #t)) |
7868 | (replace 'install | |
7869 | (install-from-pom "slf4j-api/pom.xml"))))) | |
7870 | (propagated-inputs | |
7871 | `(("java-slf4j-parent" ,java-slf4j-parent))) | |
7872 | (native-inputs | |
f8e4d022 RW |
7873 | `(("java-junit" ,java-junit) |
7874 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
7875 | (home-page "https://www.slf4j.org/") | |
7876 | (synopsis "Simple logging facade for Java") | |
7877 | (description "The Simple Logging Facade for Java (SLF4J) serves as a | |
7878 | simple facade or abstraction for various logging | |
7879 | frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j}) | |
7880 | allowing the end user to plug in the desired logging framework at deployment | |
7881 | time.") | |
7882 | (license license:expat))) | |
7883 | ||
51087d51 | 7884 | (define java-slf4j-parent |
6d047cc4 GB |
7885 | (package |
7886 | (inherit java-slf4j-api) | |
51087d51 JL |
7887 | (name "java-slf4j-parent") |
7888 | (native-inputs `()) | |
7889 | (propagated-inputs '()) | |
6d047cc4 | 7890 | (arguments |
51087d51 JL |
7891 | `(#:tests? #f |
7892 | #:phases | |
7893 | (modify-phases %standard-phases | |
7894 | (delete 'build) | |
7895 | (delete 'configure) | |
7896 | (replace 'install | |
7897 | (install-pom-file "pom.xml"))))))) | |
6d047cc4 | 7898 | |
88f256a1 TD |
7899 | (define-public java-slf4j-simple |
7900 | (package | |
7901 | (name "java-slf4j-simple") | |
7902 | (version "1.7.25") | |
7903 | (source (package-source java-slf4j-api)) | |
7904 | (build-system ant-build-system) | |
7905 | (arguments | |
7906 | `(#:jar-name "slf4j-simple.jar" | |
7907 | #:source-dir "slf4j-simple/src/main" | |
7908 | #:test-dir "slf4j-simple/src/test" | |
7909 | #:phases | |
7910 | (modify-phases %standard-phases | |
7911 | ;; The tests need some test classes from slf4j-api | |
7912 | (add-before 'check 'build-slf4j-api-test-helpers | |
7913 | (lambda _ | |
7914 | ;; Add current dir to CLASSPATH ... | |
7915 | (setenv "CLASSPATH" | |
7916 | (string-append (getcwd) ":" (getenv "CLASSPATH"))) | |
7917 | ;; ... and build test helper classes here: | |
2c8ac364 MW |
7918 | (apply invoke |
7919 | `("javac" "-d" "." | |
51087d51 JL |
7920 | ,@(find-files "slf4j-api/src/test" ".*\\.java"))))) |
7921 | (replace 'install | |
7922 | (install-from-pom "slf4j-simple/pom.xml"))))) | |
7923 | (propagated-inputs | |
7924 | `(("java-slf4j-api" ,java-slf4j-api))) | |
7925 | (native-inputs | |
88f256a1 | 7926 | `(("java-junit" ,java-junit) |
51087d51 | 7927 | ("java-hamcrest-core" ,java-hamcrest-core))) |
88f256a1 TD |
7928 | (home-page "https://www.slf4j.org/") |
7929 | (synopsis "Simple implementation of simple logging facade for Java") | |
7930 | (description "SLF4J binding for the Simple implementation, which outputs | |
7931 | all events to System.err. Only messages of level INFO and higher are | |
7932 | printed.") | |
7933 | (license license:expat))) | |
7934 | ||
9f68e74a JL |
7935 | (define-public antlr2 |
7936 | (package | |
7937 | (name "antlr2") | |
7938 | (version "2.7.7") | |
7939 | (source (origin | |
7940 | (method url-fetch) | |
7420c1ee | 7941 | (uri (string-append "https://www.antlr2.org/download/antlr-" |
9f68e74a JL |
7942 | version ".tar.gz")) |
7943 | (sha256 | |
7944 | (base32 | |
7945 | "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5")) | |
7946 | (modules '((guix build utils))) | |
7947 | (snippet | |
7948 | '(begin | |
7949 | (delete-file "antlr.jar") | |
7950 | (substitute* "lib/cpp/antlr/CharScanner.hpp" | |
7951 | (("#include <map>") | |
7952 | (string-append | |
6d225e89 RW |
7953 | "#include <map>\n" |
7954 | "#define EOF (-1)\n" | |
7955 | "#include <strings.h>"))) | |
9f68e74a | 7956 | (substitute* "configure" |
6d225e89 RW |
7957 | (("/bin/sh") "sh")) |
7958 | #t)))) | |
9f68e74a JL |
7959 | (build-system gnu-build-system) |
7960 | (arguments | |
6d225e89 | 7961 | `(#:tests? #f ; no test target |
3ad90395 RW |
7962 | #:imported-modules ((guix build ant-build-system) |
7963 | (guix build syscalls) | |
7964 | ,@%gnu-build-system-modules) | |
7965 | #:modules (((guix build ant-build-system) #:prefix ant:) | |
7966 | (guix build gnu-build-system) | |
7967 | (guix build utils)) | |
9f68e74a JL |
7968 | #:phases |
7969 | (modify-phases %standard-phases | |
7970 | (add-after 'install 'strip-jar-timestamps | |
3ad90395 | 7971 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps)) |
79f6fc0d JL |
7972 | (add-before 'configure 'fix-timestamp |
7973 | (lambda _ | |
7974 | (substitute* "configure" | |
7975 | (("^TIMESTAMP.*") "TIMESTAMP=19700101\n")) | |
7976 | #t)) | |
9f68e74a JL |
7977 | (add-after 'configure 'fix-bin-ls |
7978 | (lambda _ | |
3ad90395 RW |
7979 | (substitute* (find-files "." "Makefile") |
7980 | (("/bin/ls") "ls")) | |
7981 | #t))))) | |
9f68e74a JL |
7982 | (native-inputs |
7983 | `(("which" ,which) | |
7984 | ("zip" ,zip) | |
7985 | ("java" ,icedtea "jdk"))) | |
7986 | (inputs | |
7987 | `(("java" ,icedtea))) | |
7420c1ee | 7988 | (home-page "https://www.antlr2.org") |
9f68e74a JL |
7989 | (synopsis "Framework for constructing recognizers, compilers, and translators") |
7990 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) | |
7991 | is a language tool that provides a framework for constructing recognizers, | |
7992 | compilers, and translators from grammatical descriptions containing Java, C#, | |
7993 | C++, or Python actions. ANTLR provides excellent support for tree construction, | |
7994 | tree walking, and translation.") | |
7995 | (license license:public-domain))) | |
a0f15eff | 7996 | |
e44112e1 | 7997 | (define-public java-stringtemplate-3 |
a0f15eff | 7998 | (package |
e44112e1 | 7999 | (name "java-stringtemplate") |
a0f15eff JL |
8000 | (version "3.2.1") |
8001 | (source (origin | |
8002 | (method url-fetch) | |
8003 | (uri (string-append "https://github.com/antlr/website-st4/raw/" | |
8004 | "gh-pages/download/stringtemplate-" | |
8005 | version ".tar.gz")) | |
8006 | (sha256 | |
8007 | (base32 | |
8008 | "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is")))) | |
8009 | (build-system ant-build-system) | |
8010 | (arguments | |
129d926d | 8011 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
2fcda6d2 | 8012 | #:test-dir "test" |
b101b4e8 RW |
8013 | #:modules ((guix build ant-build-system) |
8014 | (guix build utils) | |
8015 | (srfi srfi-1)) | |
a0f15eff JL |
8016 | #:phases |
8017 | (modify-phases %standard-phases | |
2fcda6d2 RW |
8018 | (add-before 'check 'fix-tests |
8019 | (lambda _ | |
8020 | (substitute* "build.xml" | |
8021 | (("\\$\\{test.home\\}/java") | |
8022 | "${test.home}/org")) | |
8023 | #t)) | |
a0f15eff JL |
8024 | (add-before 'build 'generate-grammar |
8025 | (lambda _ | |
b101b4e8 | 8026 | (with-directory-excursion "src/org/antlr/stringtemplate/language/" |
2c8ac364 MW |
8027 | (for-each (lambda (file) |
8028 | (format #t "~a\n" file) | |
8029 | (invoke "antlr" file)) | |
8030 | '("template.g" "angle.bracket.template.g" "action.g" | |
8031 | "eval.g" "group.g" "interface.g"))) | |
8032 | #t))))) | |
a0f15eff | 8033 | (native-inputs |
2fcda6d2 RW |
8034 | `(("antlr" ,antlr2) |
8035 | ("java-junit" ,java-junit))) | |
ba11a8bd | 8036 | (home-page "https://www.stringtemplate.org") |
a0f15eff JL |
8037 | (synopsis "Template engine to generate formatted text output") |
8038 | (description "StringTemplate is a java template engine (with ports for C#, | |
8039 | Objective-C, JavaScript, Scala) for generating source code, web pages, emails, | |
8040 | or any other formatted text output. StringTemplate is particularly good at | |
8041 | code generators, multiple site skins, and internationalization / localization. | |
8042 | StringTemplate also powers ANTLR.") | |
8043 | (license license:bsd-3))) | |
4ad8aed7 JL |
8044 | |
8045 | ;; antlr3 is partially written using antlr3 grammar files. It also depends on | |
8046 | ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar | |
8047 | ;; files and uses antlr3 at runtime. The latest version requires a recent version | |
8048 | ;; of antlr3 at runtime. | |
8049 | ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3. | |
8050 | ;; This version of ST4 is sufficient for the latest antlr3. | |
8051 | ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build | |
8052 | ;; the latest ST4 with it. Then we build our final antlr3 that will be linked | |
8053 | ;; against the latest ST4. | |
8054 | ;; antlr3.3 still depends on antlr3 to generate some files, so we use an | |
8055 | ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses | |
8056 | ;; only grammar files with the antlr2 syntax. | |
8057 | ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3. | |
8058 | ||
64b7efc0 | 8059 | (define-public java-stringtemplate |
407df789 | 8060 | (package (inherit java-stringtemplate-3) |
64b7efc0 | 8061 | (name "java-stringtemplate") |
4ad8aed7 JL |
8062 | (version "4.0.8") |
8063 | (source (origin | |
8064 | (method url-fetch) | |
8065 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/" | |
8066 | version ".tar.gz")) | |
8067 | (file-name (string-append name "-" version ".tar.gz")) | |
8068 | (sha256 | |
8069 | (base32 | |
8070 | "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087")))) | |
8071 | (build-system ant-build-system) | |
8072 | (arguments | |
6db77c7c RW |
8073 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
8074 | #:tests? #f ; FIXME: tests fail for unknown reasons | |
8075 | #:test-dir "test" | |
f4aa4cfe RW |
8076 | #:modules ((guix build ant-build-system) |
8077 | (guix build utils) | |
8078 | (srfi srfi-1)) | |
4ad8aed7 JL |
8079 | #:phases |
8080 | (modify-phases %standard-phases | |
6db77c7c RW |
8081 | (add-before 'check 'fix-test-target |
8082 | (lambda _ | |
8083 | (substitute* "build.xml" | |
8084 | (("\\$\\{test.home\\}/java") "${test.home}/") | |
8085 | (("\\*Test.java") "Test*.java")) | |
8086 | #t)) | |
4ad8aed7 | 8087 | (add-before 'build 'generate-grammar |
f4aa4cfe RW |
8088 | (lambda _ |
8089 | (with-directory-excursion "src/org/stringtemplate/v4/compiler/" | |
2c8ac364 MW |
8090 | (for-each (lambda (file) |
8091 | (format #t "~a\n" file) | |
8092 | (invoke "antlr3" file)) | |
8093 | '("STParser.g" "Group.g" "CodeGenerator.g"))) | |
8094 | #t))))) | |
4ad8aed7 JL |
8095 | (inputs |
8096 | `(("antlr3" ,antlr3-bootstrap) | |
8097 | ("antlr2" ,antlr2) | |
6db77c7c RW |
8098 | ("java-stringtemplate" ,java-stringtemplate-3) |
8099 | ("java-junit" ,java-junit))))) | |
4ad8aed7 | 8100 | |
1345eeb0 | 8101 | (define java-stringtemplate-4.0.6 |
64b7efc0 | 8102 | (package (inherit java-stringtemplate) |
1345eeb0 | 8103 | (name "java-stringtemplate") |
4ad8aed7 JL |
8104 | (version "4.0.6") |
8105 | (source (origin | |
8106 | (method url-fetch) | |
8107 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-" | |
8108 | version ".tar.gz")) | |
8109 | (file-name (string-append name "-" version ".tar.gz")) | |
8110 | (sha256 | |
8111 | (base32 | |
8112 | "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp")))) | |
8113 | (inputs | |
8114 | `(("antlr3" ,antlr3-3.3) | |
8115 | ("antlr2" ,antlr2) | |
e44112e1 | 8116 | ("java-stringtemplate" ,java-stringtemplate-3))))) |
4ad8aed7 JL |
8117 | |
8118 | (define-public antlr3 | |
8119 | (package | |
8120 | (name "antlr3") | |
8121 | (version "3.5.2") | |
8122 | (source (origin | |
043ee597 EF |
8123 | (method git-fetch) |
8124 | (uri (git-reference | |
8125 | (url "https://github.com/antlr/antlr3") | |
8126 | (commit version))) | |
8127 | (file-name (git-file-name name version)) | |
4ad8aed7 JL |
8128 | (sha256 |
8129 | (base32 | |
043ee597 | 8130 | "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf")))) |
4ad8aed7 JL |
8131 | (build-system ant-build-system) |
8132 | (arguments | |
8133 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
8134 | #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3" | |
8135 | #:tests? #f | |
8136 | #:phases | |
8137 | (modify-phases %standard-phases | |
8138 | (add-after 'install 'bin-install | |
8139 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
8140 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) | |
8141 | (bin (string-append (assoc-ref outputs "out") "/bin"))) | |
8142 | (mkdir-p bin) | |
8143 | (with-output-to-file (string-append bin "/antlr3") | |
8144 | (lambda _ | |
8145 | (display | |
8146 | (string-append "#!" (which "sh") "\n" | |
8147 | "java -cp " jar "/" ,name "-" ,version ".jar:" | |
8148 | (string-concatenate | |
8149 | (find-files (assoc-ref inputs "stringtemplate") | |
8150 | ".*\\.jar")) | |
8151 | ":" | |
8152 | (string-concatenate | |
8153 | (find-files (assoc-ref inputs "stringtemplate4") | |
8154 | ".*\\.jar")) | |
8155 | ":" | |
8156 | (string-concatenate | |
8157 | (find-files (string-append | |
8158 | (assoc-ref inputs "antlr") | |
8159 | "/lib") | |
8160 | ".*\\.jar")) | |
8161 | " org.antlr.Tool $*")))) | |
2c8ac364 MW |
8162 | (chmod (string-append bin "/antlr3") #o755)) |
8163 | #t)) | |
4ad8aed7 JL |
8164 | (add-before 'build 'generate-grammar |
8165 | (lambda _ | |
8166 | (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/") | |
8167 | (for-each (lambda (file) | |
8168 | (display file) | |
8169 | (newline) | |
2c8ac364 | 8170 | (invoke "antlr3" file)) |
4ad8aed7 JL |
8171 | '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g" |
8172 | "AssignTokenTypesWalker.g" | |
8173 | "ActionTranslator.g" "TreeToNFAConverter.g" | |
8174 | "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g" | |
8175 | "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g")) | |
8176 | (substitute* "ANTLRParser.java" | |
8177 | (("public Object getTree") "public GrammarAST getTree")) | |
8178 | (substitute* "ANTLRv3Parser.java" | |
8179 | (("public Object getTree") "public CommonTree getTree")) | |
8180 | (chdir "../../../../../java") | |
4ad8aed7 JL |
8181 | (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java" |
8182 | (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*; | |
8183 | import org.antlr.grammar.v3.ANTLRTreePrinter;")) | |
8184 | (substitute* "org/antlr/tool/ErrorManager.java" | |
8185 | (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") "")) | |
2c8ac364 MW |
8186 | (chdir "../../../..") |
8187 | #t)) | |
4ad8aed7 JL |
8188 | (add-before 'build 'fix-build-xml |
8189 | (lambda _ | |
8190 | (substitute* "build.xml" | |
570f3b63 JL |
8191 | (("target name=\"compile\">") |
8192 | "target name=\"compile\"> | |
8193 | <copy todir=\"${classes.dir}\"> | |
4ad8aed7 JL |
8194 | <fileset dir=\"tool/src/main/resources\"> |
8195 | <include name=\"**/*.stg\"/> | |
8196 | <include name=\"**/*.st\"/> | |
8197 | <include name=\"**/*.sti\"/> | |
8198 | <include name=\"**/STLexer.tokens\"/> | |
8199 | </fileset> | |
570f3b63 | 8200 | </copy>")) |
2c8ac364 | 8201 | #t))))) |
4ad8aed7 JL |
8202 | (native-inputs |
8203 | `(("antlr" ,antlr2) | |
8204 | ("antlr3" ,antlr3-bootstrap))) | |
8205 | (inputs | |
8206 | `(("junit" ,java-junit) | |
e44112e1 | 8207 | ("stringtemplate" ,java-stringtemplate-3) |
64b7efc0 | 8208 | ("stringtemplate4" ,java-stringtemplate))) |
4ad8aed7 | 8209 | (propagated-inputs |
e44112e1 | 8210 | `(("stringtemplate" ,java-stringtemplate-3) |
4ad8aed7 | 8211 | ("antlr" ,antlr2) |
1345eeb0 | 8212 | ("stringtemplate4" ,java-stringtemplate-4.0.6))) |
a264250b | 8213 | (home-page "https://www.antlr3.org") |
4ad8aed7 JL |
8214 | (synopsis "Framework for constructing recognizers, compilers, and translators") |
8215 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) | |
8216 | is a language tool that provides a framework for constructing recognizers, | |
8217 | compilers, and translators from grammatical descriptions containing Java, C#, | |
8218 | C++, or Python actions. ANTLR provides excellent support for tree construction, | |
8219 | tree walking, and translation.") | |
8220 | (license license:bsd-3))) | |
8221 | ||
8222 | (define antlr3-bootstrap | |
8223 | (package | |
8224 | (inherit antlr3) | |
8225 | (name "antlr3-bootstrap") | |
8226 | (native-inputs | |
8227 | `(("antlr" ,antlr2) | |
8228 | ("antlr3" ,antlr3-3.3))) | |
8229 | (inputs | |
8230 | `(("junit" ,java-junit))))) | |
8231 | ||
011f9412 | 8232 | (define-public antlr3-3.3 |
4ad8aed7 JL |
8233 | (package |
8234 | (inherit antlr3) | |
8235 | (name "antlr3") | |
8236 | (version "3.3") | |
8237 | (source (origin | |
8238 | (method url-fetch) | |
8239 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" | |
8240 | "gh-pages/download/antlr-" | |
8241 | version ".tar.gz")) | |
8242 | (sha256 | |
8243 | (base32 | |
48c86220 GB |
8244 | "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m")) |
8245 | (patches | |
8246 | (search-patches "antlr3-3_3-fix-java8-compilation.patch")))) | |
4ad8aed7 JL |
8247 | (arguments |
8248 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
a9540107 RW |
8249 | #:source-dir (string-join '("tool/src/main/java" |
8250 | "runtime/Java/src/main/java" | |
8251 | "tool/src/main/antlr2" | |
8252 | "tool/src/main/antlr3") | |
8253 | ":") | |
8254 | #:tests? #f ; FIXME: tests seem to require maven plugin | |
8255 | #:modules ((guix build ant-build-system) | |
8256 | (guix build utils) | |
8257 | (srfi srfi-1)) | |
4ad8aed7 JL |
8258 | #:phases |
8259 | (modify-phases %standard-phases | |
8260 | (add-after 'install 'bin-install | |
8261 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
a9540107 RW |
8262 | (let* ((out (assoc-ref outputs "out")) |
8263 | (jar (string-append out "/share/java")) | |
8264 | (bin (string-append out "/bin"))) | |
4ad8aed7 JL |
8265 | (mkdir-p bin) |
8266 | (with-output-to-file (string-append bin "/antlr3") | |
8267 | (lambda _ | |
8268 | (display | |
a9540107 RW |
8269 | (string-append |
8270 | "#!" (which "sh") "\n" | |
8271 | "java -cp " jar "/antlr3-3.3.jar:" | |
8272 | (string-join | |
8273 | (append (find-files (assoc-ref inputs "java-stringtemplate") | |
8274 | ".*\\.jar$") | |
8275 | (find-files (string-append (assoc-ref inputs "antlr") | |
8276 | "/lib") | |
8277 | ".*\\.jar$")) | |
8278 | ":") | |
8279 | " org.antlr.Tool $*")))) | |
8280 | (chmod (string-append bin "/antlr3") #o755) | |
8281 | #t))) | |
4ad8aed7 JL |
8282 | (add-before 'build 'generate-grammar |
8283 | (lambda _ | |
4ad8aed7 JL |
8284 | (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java" |
8285 | (("import org.antlr.grammar.v2.\\*;") | |
8286 | "import org.antlr.grammar.v2.*;\n | |
8287 | import org.antlr.grammar.v2.TreeToNFAConverter;\n | |
8288 | import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n | |
a9540107 | 8289 | import org.antlr.grammar.v2.ANTLRTreePrinter;")) |
2c8ac364 MW |
8290 | (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/" |
8291 | (for-each (lambda (file) | |
8292 | (format #t "~a\n" file) | |
8293 | (invoke "antlr" file)) | |
8294 | '("antlr.g" "antlr.print.g" "assign.types.g" | |
8295 | "buildnfa.g" "codegen.g" "define.g"))) | |
8296 | (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/" | |
8297 | (for-each (lambda (file) | |
8298 | (format #t "~a\n" file) | |
8299 | (invoke "antlr3" file)) | |
8300 | '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g" | |
8301 | "ANTLRv3Tree.g"))) | |
8302 | #t)) | |
4ad8aed7 JL |
8303 | (add-before 'build 'fix-build-xml |
8304 | (lambda _ | |
8305 | (substitute* "build.xml" | |
570f3b63 JL |
8306 | (("target name=\"compile\">") |
8307 | "target name=\"compile\"> | |
8308 | <copy todir=\"${classes.dir}\"> | |
4ad8aed7 JL |
8309 | <fileset dir=\"tool/src/main/resources\"> |
8310 | <include name=\"**/*.stg\"/> | |
8311 | <include name=\"**/*.st\"/> | |
8312 | <include name=\"**/*.sti\"/> | |
8313 | <include name=\"**/STLexer.tokens\"/> | |
8314 | </fileset> | |
570f3b63 | 8315 | </copy>")) |
a9540107 | 8316 | #t))))) |
4ad8aed7 JL |
8317 | (native-inputs |
8318 | `(("antlr" ,antlr2) | |
8319 | ("antlr3" ,antlr3-3.1))) | |
8320 | (inputs | |
8321 | `(("junit" ,java-junit))) | |
8322 | (propagated-inputs | |
e44112e1 | 8323 | `(("java-stringtemplate" ,java-stringtemplate-3) |
dcd62e8b | 8324 | ("antlr" ,antlr2))))) |
4ad8aed7 | 8325 | |
570f3b63 | 8326 | (define-public antlr3-3.1 |
4ad8aed7 JL |
8327 | (package |
8328 | (inherit antlr3) | |
4ad8aed7 JL |
8329 | (version "3.1") |
8330 | (source (origin | |
8331 | (method url-fetch) | |
8332 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" | |
8333 | "gh-pages/download/antlr-" | |
8334 | version ".tar.gz")) | |
8335 | (sha256 | |
8336 | (base32 | |
4c763b4d GB |
8337 | "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z")) |
8338 | (patches | |
8339 | (search-patches "antlr3-3_1-fix-java8-compilation.patch")))) | |
4ad8aed7 | 8340 | (arguments |
ec32bc98 | 8341 | `(#:jar-name (string-append "antlr3-" ,version ".jar") |
4ad8aed7 JL |
8342 | #:source-dir "src:runtime/Java/src" |
8343 | #:tests? #f | |
8344 | #:phases | |
8345 | (modify-phases %standard-phases | |
8346 | (add-after 'install 'bin-install | |
8347 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
8348 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) | |
8349 | (bin (string-append (assoc-ref outputs "out") "/bin"))) | |
8350 | (mkdir-p bin) | |
8351 | (with-output-to-file (string-append bin "/antlr3") | |
8352 | (lambda _ | |
8353 | (display | |
8354 | (string-append "#!" (which "sh") "\n" | |
57e37764 | 8355 | "java -cp " jar "/antlr3-3.1.jar:" |
4ad8aed7 JL |
8356 | (string-concatenate |
8357 | (find-files (assoc-ref inputs "stringtemplate") | |
8358 | ".*\\.jar")) | |
8359 | ":" | |
8360 | (string-concatenate | |
8361 | (find-files (string-append | |
8362 | (assoc-ref inputs "antlr") | |
8363 | "/lib") | |
8364 | ".*\\.jar")) | |
8365 | " org.antlr.Tool $*")))) | |
2c8ac364 MW |
8366 | (chmod (string-append bin "/antlr3") #o755)) |
8367 | #t)) | |
4ad8aed7 JL |
8368 | (add-before 'build 'generate-grammar |
8369 | (lambda _ | |
8370 | (let ((dir "src/org/antlr/tool/")) | |
8371 | (for-each (lambda (file) | |
8372 | (display file) | |
8373 | (newline) | |
13f38d31 | 8374 | (invoke "antlr" "-o" dir (string-append dir file))) |
4ad8aed7 JL |
8375 | '("antlr.g" "antlr.print.g" "assign.types.g" |
8376 | "buildnfa.g" "define.g"))) | |
8377 | (format #t "codegen.g\n") | |
13f38d31 RW |
8378 | (invoke "antlr" "-o" "src/org/antlr/codegen" |
8379 | "src/org/antlr/codegen/codegen.g") | |
8380 | #t)) | |
4ad8aed7 JL |
8381 | (add-before 'build 'fix-build-xml |
8382 | (lambda _ | |
8383 | (substitute* "build.xml" | |
570f3b63 JL |
8384 | (("target name=\"compile\">") |
8385 | "target name=\"compile\"> | |
8386 | <copy todir=\"${classes.dir}\"> | |
4ad8aed7 JL |
8387 | <fileset dir=\"src\"> |
8388 | <include name=\"**/*.stg\"/> | |
8389 | <include name=\"**/*.st\"/> | |
8390 | <include name=\"**/*.sti\"/> | |
8391 | <include name=\"**/STLexer.tokens\"/> | |
8392 | </fileset> | |
570f3b63 | 8393 | </copy>")) |
2c8ac364 | 8394 | #t))))) |
4ad8aed7 JL |
8395 | (native-inputs |
8396 | `(("antlr" ,antlr2))) | |
8397 | (inputs | |
8398 | `(("junit" ,java-junit))) | |
8399 | (propagated-inputs | |
e44112e1 | 8400 | `(("stringtemplate" ,java-stringtemplate-3))))) |
d44bcd7a | 8401 | |
1d630fe0 JL |
8402 | (define-public java-treelayout |
8403 | (package | |
8404 | (name "java-treelayout") | |
8405 | (version "1.0.3") | |
8406 | (source (origin | |
8407 | (method git-fetch) | |
8408 | (uri (git-reference | |
8409 | (url "https://github.com/abego/treelayout") | |
8410 | (commit (string-append "v" version)))) | |
8411 | (file-name (git-file-name name version)) | |
8412 | (sha256 | |
8413 | (base32 | |
8414 | "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak")))) | |
8415 | (build-system ant-build-system) | |
8416 | (arguments | |
8417 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
8418 | #:source-dir "org.abego.treelayout/src/main/java" | |
8419 | #:test-dir "org.abego.treelayout/src/test")) | |
8420 | (inputs | |
8421 | `(("java-junit" ,java-junit))) | |
8422 | (native-inputs | |
8423 | `(("java-hamcrest-core" ,java-hamcrest-core))) | |
8424 | (home-page "http://treelayout.sourceforge.net") | |
8425 | (synopsis "Tree Layout Algorithm in Java") | |
8426 | (description "TreeLayout creates tree layouts for arbitrary trees. It is | |
8427 | not restricted to a specific output or format, but can be used for any kind of | |
8428 | two dimensional diagram. Examples are Swing based components, SVG files, etc. | |
8429 | This is possible because TreeLayout separates the layout of a tree from the | |
8430 | actual rendering.") | |
8431 | (license license:bsd-3))) | |
8432 | ||
5d115440 JL |
8433 | (define-public java-antlr4-runtime |
8434 | (package | |
8435 | (name "java-antlr4-runtime") | |
8436 | (version "4.8") | |
8437 | (source (origin | |
8438 | (method git-fetch) | |
8439 | (uri (git-reference | |
8440 | (url "https://github.com/antlr/antlr4") | |
8441 | (commit version))) | |
8442 | (file-name (git-file-name name version)) | |
8443 | (sha256 | |
8444 | (base32 | |
8445 | "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m")) | |
8446 | (patches | |
8447 | (search-patches "java-antlr4-Add-standalone-generator.patch" | |
8448 | "java-antlr4-fix-code-too-large.java")))) | |
8449 | (build-system ant-build-system) | |
8450 | (arguments | |
8451 | `(#:jar-name "java-antlr4-runtime.jar" | |
8452 | #:source-dir "runtime/Java/src/org" | |
8453 | #:tests? #f; tests depend on java-antlr4 itself | |
8454 | #:phases | |
8455 | (modify-phases %standard-phases | |
8456 | (add-before 'build 'copy-resources | |
8457 | (lambda _ | |
8458 | (copy-recursively "runtime/Java/src/main/dot" | |
8459 | "build/classes") | |
8460 | #t))))) | |
ff0725f6 | 8461 | (home-page "https://www.antlr.org") |
5d115440 JL |
8462 | (synopsis "ANTLR runtime library") |
8463 | (description "This package contains the runtime library used with generated | |
8464 | sources by ANTLR.") | |
8465 | (license license:bsd-3))) | |
8466 | ||
f9a6e389 JL |
8467 | (define-public antlr4 |
8468 | (package | |
8469 | (inherit java-antlr4-runtime) | |
8470 | (name "antlr4") | |
8471 | (arguments | |
8472 | `(#:jar-name "antlr4.jar" | |
8473 | #:source-dir "tool/src" | |
8474 | #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src" | |
8475 | #:test-include (list "**/Test*.java") | |
8476 | #:test-exclude (list | |
8477 | ;; no runnable method | |
8478 | "**/TestOutputReading.java" | |
8479 | ;; no @Test methods | |
8480 | "**/TestParserErrors.java" | |
8481 | "**/TestSemPredEvalParser.java" | |
8482 | "**/TestSets.java" | |
8483 | "**/TestListeners.java" | |
8484 | "**/TestParseTrees.java" | |
8485 | "**/TestParserExec.java" | |
8486 | "**/TestLexerErrors.java" | |
8487 | "**/TestPerformance.java" | |
8488 | "**/TestCompositeParsers.java" | |
8489 | "**/TestLexerExec.java" | |
8490 | "**/TestSemPredEvalLexer.java" | |
8491 | "**/TestLeftRecursion.java" | |
8492 | "**/TestFullContextParsing.java" | |
8493 | "**/TestCompositeLexers.java" | |
8494 | ;; Null pointer exception | |
8495 | "**/TestCompositeGrammars.java" | |
8496 | ;; Wrong assumption on emoji | |
8497 | "**/TestUnicodeData.java") | |
8498 | #:phases | |
8499 | (modify-phases %standard-phases | |
8500 | (add-before 'build 'fix-build.xml | |
8501 | (lambda _ | |
8502 | ;; tests are not in a java subdirectory | |
8503 | (substitute* "build.xml" | |
8504 | (("\\$\\{test.home\\}/java") "${test.home}")) | |
8505 | #t)) | |
8506 | ;; tests require to have a working antlr4 binary | |
8507 | (delete 'check) | |
8508 | (add-after 'bin-install 'check | |
8509 | (lambda _ | |
8510 | (invoke "ant" "compile-tests") | |
8511 | (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src") | |
8512 | (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test") | |
8513 | (invoke "ant" "check" "-Dtest.home=tool-testsuite/test") | |
8514 | #t)) | |
8515 | (add-before 'check 'remove-unrelated-languages | |
8516 | (lambda _ | |
8517 | ;; There are tests for other languages that ANTLR can generate, but | |
8518 | ;; we don't have the infrastructure for that yet. Let's test Java | |
8519 | ;; generation only. | |
8520 | (for-each | |
8521 | (lambda (language) | |
8522 | (delete-file-recursively | |
8523 | (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/" | |
8524 | language))) | |
8525 | '("cpp" "csharp" "go" "javascript" "php" "python" "python2" | |
8526 | "python3" "swift")) | |
8527 | #t)) | |
8528 | (add-before 'check 'generate-test-parsers | |
8529 | (lambda* (#:key outputs #:allow-other-keys) | |
8530 | (define (run-antlr dir filename package) | |
8531 | (invoke "antlr4" "-lib" dir "-visitor" "-no-listener" | |
8532 | "-package" package (string-append dir "/" filename) | |
8533 | "-Xlog")) | |
8534 | (setenv "PATH" (string-append (getenv "PATH") ":" | |
8535 | (assoc-ref outputs "out") "/bin")) | |
8536 | (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api" | |
8537 | "Java.g4" "org.antlr.v4.test.runtime.java.api") | |
8538 | (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api" | |
8539 | "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api") | |
8540 | (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api" | |
8541 | "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api") | |
8542 | #t)) | |
8543 | (add-before 'check 'remove-graphemes | |
8544 | (lambda _ | |
8545 | ;; When running antlr on grahemes.g4, we get a runtime exception: | |
8546 | ;; set is empty. So delete the file that depends on it. | |
8547 | (delete-file | |
8548 | "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java") | |
8549 | #t)) | |
8550 | (add-after 'install 'bin-install | |
8551 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
8552 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) | |
8553 | (bin (string-append (assoc-ref outputs "out") "/bin"))) | |
8554 | (mkdir-p bin) | |
8555 | (with-output-to-file (string-append bin "/antlr4") | |
8556 | (lambda _ | |
8557 | (display | |
8558 | (string-append "#!" (which "sh") "\n" | |
8559 | "java -cp " jar "/antlr4.jar:" | |
8560 | (string-join | |
8561 | (apply | |
8562 | append | |
8563 | (map | |
8564 | (lambda (input) | |
8565 | (find-files (assoc-ref inputs input) | |
8566 | ".*\\.jar")) | |
8567 | '("antlr3" "java-stringtemplate" | |
8568 | "java-antlr4-runtime" "java-treelayout" | |
8569 | "java-jsonp-api" "java-icu4j"))) | |
8570 | ":") | |
8571 | " org.antlr.v4.Tool $*")))) | |
8572 | (chmod (string-append bin "/antlr4") #o755) | |
8573 | #t))) | |
8574 | (add-before 'build 'copy-resources | |
8575 | (lambda _ | |
8576 | (copy-recursively "tool/resources/" "build/classes") | |
8577 | #t)) | |
8578 | (add-before 'build 'generate-unicode | |
8579 | (lambda _ | |
8580 | ;; First: build the generator | |
8581 | (invoke "javac" "-cp" (getenv "CLASSPATH") | |
8582 | "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java" | |
8583 | "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java") | |
8584 | ;; Then use it | |
8585 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
8586 | ":tool/src:runtime/Java") | |
8587 | "org.antlr.v4.unicode.UnicodeRenderer" | |
8588 | "tool/resources/org/antlr/v4/tool/templates" | |
8589 | "unicodedata" | |
8590 | "tool/src/org/antlr/v4/unicode/UnicodeData.java") | |
8591 | ;; It seems there is a bug with our ST4 | |
8592 | (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java" | |
8593 | (("\\\\>") ">")) | |
8594 | ;; Remove the additional file | |
8595 | (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java") | |
8596 | #t)) | |
8597 | (add-before 'build 'generate-grammar | |
8598 | (lambda* (#:key inputs #:allow-other-keys) | |
8599 | (with-directory-excursion "tool/src/org/antlr/v4/parse" | |
8600 | (for-each (lambda (file) | |
8601 | (display file) | |
8602 | (newline) | |
8603 | (invoke "antlr3" file)) | |
8604 | '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g" | |
8605 | "GrammarTreeVisitor.g" "ATNBuilder.g" | |
8606 | "ActionSplitter.g" "LeftRecursiveRuleWalker.g"))) | |
8607 | (with-directory-excursion "tool/src/org/antlr/v4/codegen" | |
8608 | (install-file "../parse/ANTLRParser.tokens" ".") | |
8609 | (display "SourceGenTriggers.g\n") | |
8610 | (invoke "antlr3" "SourceGenTriggers.g")) | |
8611 | #t))))) | |
8612 | (inputs | |
8613 | `(("antlr3" ,antlr3) | |
8614 | ("java-antlr4-runtime" ,java-antlr4-runtime) | |
8615 | ("java-icu4j" ,java-icu4j) | |
8616 | ("java-jsonp-api" ,java-jsonp-api) | |
8617 | ("java-stringtemplate" ,java-stringtemplate) | |
8618 | ("java-treelayout" ,java-treelayout))) | |
8619 | (native-inputs | |
8620 | `(("java-junit" ,java-junit))) | |
8621 | (synopsis "Parser and lexer generator in Java") | |
8622 | (description "ANTLR (ANother Tool for Language Recognition) is a powerful | |
8623 | parser generator for reading, processing, executing, or translating structured | |
8624 | text or binary files. It's widely used to build languages, tools, and | |
8625 | frameworks. From a grammar, ANTLR generates a parser that can build and walk | |
8626 | parse trees."))) | |
8627 | ||
57f6a915 JL |
8628 | (define-public java-antlr4-runtime-4.1 |
8629 | (package | |
8630 | (inherit java-antlr4-runtime) | |
8631 | (version "4.1") | |
8632 | (source (origin | |
8633 | (method git-fetch) | |
8634 | (uri (git-reference | |
8635 | (url "https://github.com/antlr/antlr4") | |
8636 | (commit version))) | |
8637 | (file-name (git-file-name "antlr4" version)) | |
8638 | (sha256 | |
8639 | (base32 | |
8640 | "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1")))) | |
8641 | (arguments | |
8642 | (substitute-keyword-arguments (package-arguments java-antlr4-runtime) | |
8643 | ((#:phases phases) | |
8644 | `(modify-phases ,phases | |
8645 | (add-before 'configure 'chmod | |
8646 | (lambda _ | |
8647 | (chmod "build.xml" #o644) | |
8648 | #t)))))) | |
8649 | (inputs | |
8650 | `(("java-treelayout" ,java-treelayout))))) | |
8651 | ||
77ae4145 JL |
8652 | (define-public antlr4-4.1 |
8653 | (package | |
8654 | (inherit antlr4) | |
8655 | (version (package-version java-antlr4-runtime-4.1)) | |
8656 | (source (package-source java-antlr4-runtime-4.1)) | |
8657 | (arguments | |
8658 | (substitute-keyword-arguments (package-arguments antlr4) | |
8659 | ((#:test-dir _) | |
8660 | "tool/test") | |
8661 | ((#:test-exclude excludes) | |
8662 | `(list "**/TestParseErrors.java" | |
8663 | "**/TestTopologicalSort.java" | |
8664 | ,@excludes)) | |
8665 | ((#:phases phases) | |
8666 | `(modify-phases ,phases | |
8667 | (delete 'generate-unicode) | |
8668 | (replace 'check | |
8669 | (lambda _ | |
8670 | (invoke "ant" "check") | |
8671 | #t)) | |
8672 | (add-before 'configure 'chmod | |
8673 | (lambda _ | |
8674 | (chmod "build.xml" #o644) | |
8675 | #t)) | |
8676 | (delete 'remove-graphemes) | |
8677 | (delete 'remove-unrelated-languages) | |
8678 | (delete 'generate-test-parsers))))) | |
8679 | (inputs | |
8680 | (alist-replace | |
8681 | "java-antlr4-runtime" (list java-antlr4-runtime-4.1) | |
8682 | (package-inputs antlr4))))) | |
8683 | ||
7d26b017 JL |
8684 | (define-public java-tunnelvisionlabs-antlr4-runtime-annotations |
8685 | (package | |
8686 | (inherit java-antlr4-runtime) | |
8687 | (name "java-tunnelvisionlabs-antlr4-runtime-annotations") | |
8688 | (version "4.7.4") | |
8689 | (source (origin | |
8690 | (method git-fetch) | |
8691 | (uri (git-reference | |
8692 | (url "https://github.com/tunnelvisionlabs/antlr4") | |
8693 | (commit (string-append version "-opt")))) | |
8694 | (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version)) | |
8695 | (sha256 | |
8696 | (base32 | |
8697 | "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8")) | |
8698 | (patches | |
8699 | (search-patches "java-antlr4-Add-standalone-generator.patch" | |
8700 | "java-tunnelvisionlabs-antlr-code-too-large.patch")))) | |
8701 | (arguments | |
8702 | `(#:jar-name "java-antlr4-runtime-annotations.jar" | |
8703 | #:source-dir "runtime/JavaAnnotations/src" | |
8704 | #:tests? #f; no tests | |
8705 | #:phases | |
8706 | (modify-phases %standard-phases | |
8707 | (add-after 'build 'copy-resources | |
8708 | (lambda _ | |
8709 | (copy-recursively "runtime/JavaAnnotations/resources" | |
8710 | "build/classes") | |
8711 | #t)) | |
8712 | (add-after 'copy-resources 'rebuild-jar | |
8713 | (lambda _ | |
8714 | (invoke "ant" "jar") | |
8715 | #t))))) | |
8716 | (inputs '()) | |
8717 | (native-inputs '()) | |
8718 | (synopsis "Annotations for ANTLR's runtime library") | |
8719 | (description "This package contains annotations used during the build of | |
8720 | the runtime library of ANTLR."))) | |
8721 | ||
ac292a1a JL |
8722 | ;; the runtime of this library requires a lexer that is generated by antlr4. |
8723 | ;; However, antlr4 itself requires this library at build and run-time. We | |
8724 | ;; use antlr4@4.1, the closest version of antlr that doesn't need this | |
8725 | ;; bootstrap process, to generate the lexer. The generated lexer is built | |
8726 | ;; for the 4.1 runtime, which is slightly different from this runtime. | |
8727 | ;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we | |
8728 | ;; use to build antlr4. We then re-use this antlr4 to build the runtime, and | |
8729 | ;; the proper, working, runtime to build antlr4 again. | |
8730 | (define java-tunnelvisionlabs-antlr4-runtime-bootstrap | |
8731 | (package | |
8732 | (inherit java-antlr4-runtime) | |
8733 | (name "java-tunnelvisionlabs-antlr4-runtime") | |
8734 | (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations)) | |
8735 | (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations)) | |
8736 | (arguments | |
8737 | `(#:jar-name "java-antlr4-runtime.jar" | |
8738 | #:source-dir "runtime/Java/src" | |
8739 | #:tests? #f; tests require antlr4, but antlr4 depends on this package | |
8740 | #:phases | |
8741 | (modify-phases %standard-phases | |
8742 | (add-before 'build 'generate-xpath-lexer | |
8743 | (lambda _ | |
8744 | (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath" | |
8745 | "-visitor" "-no-listener" | |
8746 | "-package" "org.antlr.v4.runtime.tree.xpath" | |
8747 | "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4") | |
8748 | ;; Generated code is for an incompatible version of the runtime | |
8749 | (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java" | |
8750 | (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)") | |
8751 | "LexerATNSimulator(this,_ATN)")) | |
8752 | #t)) | |
8753 | (add-before 'build 'copy-resources | |
8754 | (lambda _ | |
8755 | (copy-recursively "runtime/Java/src/main/dot" | |
8756 | "build/classes") | |
8757 | #t))))) | |
8758 | (native-inputs | |
8759 | `(("antlr4" ,antlr4-4.1) | |
8760 | ("java-tunnelvisionlabs-antlr4-runtime-annotations" | |
8761 | ,java-tunnelvisionlabs-antlr4-runtime-annotations))))) | |
8762 | ||
8763 | (define java-tunnelvisionlabs-antlr4-bootstrap | |
8764 | (package | |
8765 | (inherit antlr4) | |
8766 | (name "java-tunnelvisionlabs-antlr4") | |
8767 | (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations)) | |
8768 | (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations)) | |
8769 | (arguments | |
8770 | (substitute-keyword-arguments (package-arguments antlr4) | |
8771 | ((#:test-dir _) | |
8772 | "tool/test:runtime-testsuite/src") | |
8773 | ((#:phases phases) | |
8774 | `(modify-phases ,phases | |
8775 | (delete 'remove-unrelated-languages) | |
8776 | (delete 'remove-graphemes) | |
8777 | (delete 'generate-test-parsers) | |
8778 | (delete 'check))))) | |
8779 | (native-inputs '()) | |
8780 | (inputs | |
8781 | `(("antlr3" ,antlr3) | |
8782 | ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap) | |
8783 | ("java-tunnelvisionlabs-antlr4-runtime-annotations" | |
8784 | ,java-tunnelvisionlabs-antlr4-runtime-annotations) | |
8785 | ("java-icu4j" ,java-icu4j) | |
8786 | ("java-jsonp-api" ,java-jsonp-api) | |
8787 | ("java-stringtemplate" ,java-stringtemplate) | |
8788 | ("java-treelayout" ,java-treelayout))))) | |
8789 | ||
8790 | (define-public java-tunnelvisionlabs-antlr4-runtime | |
8791 | (package | |
8792 | (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap) | |
8793 | (native-inputs | |
8794 | (alist-replace | |
8795 | "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap) | |
8796 | (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap))))) | |
8797 | ||
7896630f JL |
8798 | (define-public java-tunnelvisionlabs-antlr4 |
8799 | (package | |
8800 | (inherit java-tunnelvisionlabs-antlr4-bootstrap) | |
8801 | (inputs | |
8802 | (alist-replace | |
8803 | "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime) | |
8804 | (package-inputs java-tunnelvisionlabs-antlr4-bootstrap))))) | |
8805 | ||
742242a5 GB |
8806 | (define-public java-commons-cli-1.2 |
8807 | ;; This is a bootstrap dependency for Maven2. | |
8808 | (package | |
8809 | (inherit java-commons-cli) | |
8810 | (version "1.2") | |
8811 | (source (origin | |
8812 | (method url-fetch) | |
8813 | (uri (string-append "mirror://apache/commons/cli/source/" | |
8814 | "commons-cli-" version "-src.tar.gz")) | |
8815 | (sha256 | |
8816 | (base32 | |
8817 | "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm")))) | |
8818 | (arguments | |
8819 | `(#:jar-name "commons-cli.jar" | |
8820 | #:phases | |
8821 | (modify-phases %standard-phases | |
8822 | (add-before 'check 'fix-build-xml | |
8823 | (lambda* (#:key inputs #:allow-other-keys) | |
8824 | (substitute* "build.xml" | |
8825 | (("dir=\"\\$\\{test.home\\}/java\"") | |
8826 | "dir=\"${test.home}\"")) | |
8827 | #t))))) | |
8828 | (native-inputs | |
8829 | `(("java-junit" ,java-junit))))) | |
30deadee JL |
8830 | |
8831 | (define-public java-microemulator-cldc | |
8832 | (package | |
8833 | (name "java-microemulator-cldc") | |
8834 | (version "2.0.4") | |
8835 | (source (origin | |
8836 | (method url-fetch) | |
8837 | (uri (string-append "https://github.com/barteo/microemu/archive/" | |
8838 | "microemulator_" | |
8839 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) | |
8840 | version) | |
8841 | ".tar.gz")) | |
8842 | (file-name (string-append name "-" version ".tar.gz")) | |
8843 | (sha256 | |
8844 | (base32 | |
8845 | "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll")))) | |
8846 | (build-system ant-build-system) | |
8847 | (arguments | |
8848 | `(#:jar-name "microemulator-cldc.jar" | |
8849 | #:source-dir "microemu-cldc/src/main/java" | |
8850 | #:tests? #f)); Requires even older software | |
8851 | (home-page "https://github.com/barteo/microemu") | |
8852 | (synopsis "J2ME CLDC emulator") | |
8853 | (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP | |
60738bdc | 8854 | Emulator. It demonstrates MIDlet based applications in web browser |
30deadee JL |
8855 | applet and can be run as a standalone java application.") |
8856 | (license (list license:asl2.0 | |
8857 | ;; or altenatively: | |
8858 | license:lgpl2.1+)))) | |
8e2f3e5e JL |
8859 | |
8860 | (define-public java-datanucleus-javax-persistence | |
8861 | (package | |
8862 | (name "java-datanucleus-javax-persistence") | |
8863 | (version "2.2.0") | |
8864 | (source (origin | |
8865 | (method url-fetch) | |
8866 | (uri (string-append "https://github.com/datanucleus/" | |
8867 | "javax.persistence/archive/javax.persistence-" | |
8868 | version "-release.tar.gz")) | |
8869 | (sha256 | |
8870 | (base32 | |
8871 | "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx")))) | |
8872 | (build-system ant-build-system) | |
8873 | (arguments | |
8874 | `(#:jar-name "java-datanucleus-javax-persistence.jar" | |
8875 | #:jdk ,icedtea-8 | |
8876 | #:source-dir "src/main/java" | |
8877 | #:tests? #f)); no tests | |
8878 | (home-page "https://github.com/datanucleus/javax.persistence") | |
8879 | (synopsis "JPA API") | |
8880 | (description "This package contains a clean definition of JPA API intended | |
8881 | for use with DataNucleus JPA since the JCP haven't provided an official JPA API | |
8882 | jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification | |
8883 | used to generate this API.") | |
8884 | (license (list license:edl1.0 license:epl1.0)))) | |
3240ddbf JL |
8885 | |
8886 | (define-public java-osgi-cmpn | |
8887 | (package | |
8888 | (name "java-osgi-cmpn") | |
8889 | (version "6.0.0") | |
8890 | (source (origin | |
8891 | (method url-fetch) | |
7779ad50 | 8892 | (uri (string-append "https://repo1.maven.org/maven2/" |
3240ddbf JL |
8893 | "org/osgi/osgi.cmpn/" version "/osgi.cmpn-" |
8894 | version "-sources.jar")) | |
8895 | (sha256 | |
8896 | (base32 | |
8897 | "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys")))) | |
8898 | (build-system ant-build-system) | |
8899 | (arguments | |
8900 | `(#:jar-name "osgi-cmpn.jar" | |
8901 | #:tests? #f)); no tests | |
8902 | (inputs | |
8903 | `(("annotation" ,java-osgi-annotation) | |
8904 | ("core" ,java-osgi-core) | |
8905 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) | |
8906 | ("microemulator" ,java-microemulator-cldc) | |
8907 | ("servlet" ,java-classpathx-servletapi))) | |
c353d014 | 8908 | (home-page "https://www.osgi.org") |
3240ddbf JL |
8909 | (synopsis "Compendium specification module of OSGi framework") |
8910 | (description | |
8911 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8912 | and service platform for the Java programming language. This package contains | |
8913 | the compendium specification module, providing interfaces and classes for use | |
8914 | in compiling bundles.") | |
8915 | (license license:asl2.0))) | |
747c7574 JL |
8916 | |
8917 | (define-public java-osgi-service-component-annotations | |
8918 | (package | |
8919 | (name "java-osgi-service-component-annotations") | |
8920 | (version "1.3.0") | |
8921 | (source (origin | |
8922 | (method url-fetch) | |
fa315559 | 8923 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
747c7574 JL |
8924 | "org.osgi.service.component.annotations/" |
8925 | version "/org.osgi.service.component.annotations-" | |
8926 | version "-sources.jar")) | |
8927 | (sha256 | |
8928 | (base32 | |
8929 | "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0")))) | |
8930 | (build-system ant-build-system) | |
8931 | (arguments | |
8932 | `(#:jar-name "osgi-service-component-annotations.jar" | |
8933 | #:tests? #f)); no tests | |
8934 | (inputs | |
8935 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 8936 | (home-page "https://www.osgi.org") |
747c7574 JL |
8937 | (synopsis "Support annotations for osgi-service-component") |
8938 | (description | |
8939 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8940 | and service platform for the Java programming language. This package contains | |
8941 | the support annotations for osgi-service-component.") | |
8942 | (license license:asl2.0))) | |
999b5fb4 JL |
8943 | |
8944 | (define-public java-osgi-dto | |
8945 | (package | |
8946 | (name "java-osgi-dto") | |
8947 | (version "1.0.0") | |
8948 | (source (origin | |
8949 | (method url-fetch) | |
fc1c5dbd | 8950 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
999b5fb4 JL |
8951 | "org.osgi.dto/" version "/org.osgi.dto-" |
8952 | version "-sources.jar")) | |
8953 | (sha256 | |
8954 | (base32 | |
8955 | "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr")))) | |
8956 | (build-system ant-build-system) | |
8957 | (arguments | |
8958 | `(#:jar-name "osgi-dto.jar" | |
8959 | #:tests? #f)); no tests | |
8960 | (inputs | |
8961 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 8962 | (home-page "https://www.osgi.org") |
999b5fb4 JL |
8963 | (synopsis "Data Transfer Objects") |
8964 | (description | |
8965 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8966 | and service platform for the Java programming language. This package contains | |
8967 | the Data Transfer Objects. It is easily serializable having only public fields | |
8968 | of primitive types and their wrapper classes, Strings, and DTOs. List, Set, | |
8969 | Map and array aggregates may also be used. The aggregates must only hold | |
8970 | objects of the listed types or aggregates.") | |
8971 | (license license:asl2.0))) | |
c304ce6a JL |
8972 | |
8973 | (define-public java-osgi-resource | |
8974 | (package | |
8975 | (name "java-osgi-resource") | |
8976 | (version "1.0.0") | |
8977 | (source (origin | |
8978 | (method url-fetch) | |
1f2643fa | 8979 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
c304ce6a JL |
8980 | "org.osgi.resource/" |
8981 | version "/org.osgi.resource-" | |
8982 | version "-sources.jar")) | |
8983 | (sha256 | |
8984 | (base32 | |
8985 | "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d")))) | |
8986 | (build-system ant-build-system) | |
8987 | (arguments | |
8988 | `(#:jar-name "osgi-resource.jar" | |
8989 | #:tests? #f)); no tests | |
8990 | (inputs | |
8991 | `(("annotation" ,java-osgi-annotation) | |
8992 | ("dto" ,java-osgi-dto))) | |
c353d014 | 8993 | (home-page "https://www.osgi.org") |
c304ce6a JL |
8994 | (synopsis "OSGI Resource") |
8995 | (description | |
8996 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8997 | and service platform for the Java programming language. This package contains | |
8998 | the definition of common types in osgi packages.") | |
8999 | (license license:asl2.0))) | |
c2b14516 JL |
9000 | |
9001 | (define-public java-osgi-namespace-contract | |
9002 | (package | |
9003 | (name "java-osgi-namespace-contract") | |
9004 | (version "1.0.0") | |
9005 | (source (origin | |
9006 | (method url-fetch) | |
60f5ab0b | 9007 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
c2b14516 JL |
9008 | "org.osgi.namespace.contract/" |
9009 | version "/org.osgi.namespace.contract-" | |
9010 | version "-sources.jar")) | |
9011 | (sha256 | |
9012 | (base32 | |
9013 | "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36")))) | |
9014 | (build-system ant-build-system) | |
9015 | (inputs | |
9016 | `(("resource" ,java-osgi-resource) | |
9017 | ("annotation" ,java-osgi-annotation))) | |
9018 | (arguments | |
9019 | `(#:jar-name "osgi-namespace-contract.jar" | |
9020 | #:tests? #f)); no tests | |
c353d014 | 9021 | (home-page "https://www.osgi.org") |
c2b14516 JL |
9022 | (synopsis "Contract Capability and Requirement Namespace") |
9023 | (description | |
9024 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9025 | and service platform for the Java programming language. This package contains | |
9026 | the names for the attributes and directives for a namespace with contracts.") | |
9027 | (license license:asl2.0))) | |
f809c963 JL |
9028 | |
9029 | (define-public java-osgi-namespace-extender | |
9030 | (package | |
9031 | (name "java-osgi-namespace-extender") | |
9032 | (version "1.0.1") | |
9033 | (source (origin | |
9034 | (method url-fetch) | |
fccce661 | 9035 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
f809c963 JL |
9036 | "org.osgi.namespace.extender/" |
9037 | version "/org.osgi.namespace.extender-" | |
9038 | version "-sources.jar")) | |
9039 | (sha256 | |
9040 | (base32 | |
9041 | "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz")))) | |
9042 | (build-system ant-build-system) | |
9043 | (inputs | |
9044 | `(("resource" ,java-osgi-resource) | |
9045 | ("annotation" ,java-osgi-annotation))) | |
9046 | (arguments | |
9047 | `(#:jar-name "osgi-namespace-extendent.jar" | |
9048 | #:tests? #f)); no tests | |
c353d014 | 9049 | (home-page "https://www.osgi.org") |
f809c963 JL |
9050 | (synopsis "Extender Capability and Requirement Namespace") |
9051 | (description | |
9052 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9053 | and service platform for the Java programming language. This package contains | |
b784962d JL |
9054 | the names for the attributes and directives for an extender namespace.") |
9055 | (license license:asl2.0))) | |
9056 | ||
9057 | (define-public java-osgi-namespace-service | |
9058 | (package | |
9059 | (name "java-osgi-namespace-service") | |
9060 | (version "1.0.0") | |
9061 | (source (origin | |
9062 | (method url-fetch) | |
ec4ba417 | 9063 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
b784962d JL |
9064 | "org.osgi.namespace.service/" |
9065 | version "/org.osgi.namespace.service-" | |
9066 | version "-sources.jar")) | |
9067 | (sha256 | |
9068 | (base32 | |
9069 | "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8")))) | |
9070 | (build-system ant-build-system) | |
9071 | (inputs | |
9072 | `(("resource" ,java-osgi-resource) | |
9073 | ("annotation" ,java-osgi-annotation))) | |
9074 | (arguments | |
9075 | `(#:jar-name "osgi-namespace-service.jar" | |
9076 | #:tests? #f)); no tests | |
c353d014 | 9077 | (home-page "https://www.osgi.org") |
b784962d JL |
9078 | (synopsis "Service Capability and Requirement Namespace") |
9079 | (description | |
9080 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9081 | and service platform for the Java programming language. This package contains | |
9082 | the names for the attributes and directives for a service namespace.") | |
f809c963 | 9083 | (license license:asl2.0))) |
0f0c5218 JL |
9084 | |
9085 | (define-public java-osgi-util-function | |
9086 | (package | |
9087 | (name "java-osgi-util-function") | |
9088 | (version "1.0.0") | |
9089 | (source (origin | |
9090 | (method url-fetch) | |
43be0299 | 9091 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
0f0c5218 JL |
9092 | "org.osgi.util.function/" |
9093 | version "/org.osgi.util.function-" | |
9094 | version "-sources.jar")) | |
9095 | (sha256 | |
9096 | (base32 | |
9097 | "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x")))) | |
9098 | (build-system ant-build-system) | |
9099 | (arguments | |
9100 | `(#:jar-name "osgi-util-function.jar" | |
9101 | #:tests? #f)); no tests | |
9102 | (inputs | |
9103 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 9104 | (home-page "https://www.osgi.org") |
0f0c5218 JL |
9105 | (synopsis "OSGI Util Function") |
9106 | (description | |
9107 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9108 | and service platform for the Java programming language. This package contains | |
9109 | an interface for a function that accepts a single argument and produces a result.") | |
9110 | (license license:asl2.0))) | |
27103135 JL |
9111 | |
9112 | (define-public java-osgi-util-promise | |
9113 | (package | |
9114 | (name "java-osgi-util-promise") | |
9115 | (version "1.0.0") | |
9116 | (source (origin | |
9117 | (method url-fetch) | |
c962e6c4 | 9118 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
27103135 JL |
9119 | "org.osgi.util.promise/" |
9120 | version "/org.osgi.util.promise-" | |
9121 | version "-sources.jar")) | |
9122 | (sha256 | |
9123 | (base32 | |
9124 | "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c")))) | |
9125 | (build-system ant-build-system) | |
9126 | (arguments | |
9127 | `(#:jar-name "osgi-util-promise.jar" | |
9128 | #:tests? #f)); no tests | |
9129 | (inputs | |
9130 | `(("annotation" ,java-osgi-annotation) | |
9131 | ("function" ,java-osgi-util-function))) | |
c353d014 | 9132 | (home-page "https://www.osgi.org") |
27103135 JL |
9133 | (synopsis "Promise of a value") |
9134 | (description | |
9135 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9136 | and service platform for the Java programming language. This package contains | |
9137 | an interface and utilitary classes for promises. A Promise represents a future | |
9138 | value. It handles the interactions for asynchronous processing.") | |
9139 | (license license:asl2.0))) | |
2b1fdb2b JL |
9140 | |
9141 | (define-public java-osgi-service-metatype-annotations | |
9142 | (package | |
9143 | (name "java-osgi-service-metatype-annotations") | |
9144 | (version "1.3.0") | |
9145 | (source (origin | |
9146 | (method url-fetch) | |
98b1985f | 9147 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
2b1fdb2b JL |
9148 | "org.osgi.service.metatype.annotations/" |
9149 | version "/org.osgi.service.metatype.annotations-" | |
9150 | version "-sources.jar")) | |
9151 | (sha256 | |
9152 | (base32 | |
9153 | "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6")))) | |
9154 | (build-system ant-build-system) | |
9155 | (arguments | |
9156 | `(#:jar-name "osgi-service-metatype-annotations.jar" | |
9157 | #:tests? #f)); no tests | |
9158 | (inputs | |
9159 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 9160 | (home-page "https://www.osgi.org") |
2b1fdb2b JL |
9161 | (synopsis "Support annotations for metatype") |
9162 | (description | |
9163 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9164 | and service platform for the Java programming language. This package contains | |
9165 | the support annotations for metatype.") | |
9166 | (license license:asl2.0))) | |
a13acfbe JL |
9167 | |
9168 | (define-public java-osgi-service-repository | |
9169 | (package | |
9170 | (name "java-osgi-service-repository") | |
9171 | (version "1.1.0") | |
9172 | (source (origin | |
9173 | (method url-fetch) | |
7a5c5017 | 9174 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
a13acfbe JL |
9175 | "org.osgi.service.repository/" |
9176 | version "/org.osgi.service.repository-" | |
9177 | version "-sources.jar")) | |
9178 | (sha256 | |
9179 | (base32 | |
9180 | "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n")))) | |
9181 | (build-system ant-build-system) | |
9182 | (arguments | |
9183 | `(#:jar-name "osgi-service-repository.jar" | |
9184 | #:tests? #f)); no tests | |
9185 | (inputs | |
9186 | `(("annotation" ,java-osgi-annotation) | |
9187 | ("promise" ,java-osgi-util-promise) | |
9188 | ("resource" ,java-osgi-resource))) | |
c353d014 | 9189 | (home-page "https://www.osgi.org") |
a13acfbe JL |
9190 | (synopsis "OSGI service repository") |
9191 | (description | |
9192 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9193 | and service platform for the Java programming language. This package contains | |
9194 | a repository service that contains resources.") | |
9195 | (license license:asl2.0))) | |
dfd91541 JL |
9196 | |
9197 | (define-public java-osgi-framework | |
9198 | (package | |
9199 | (name "java-osgi-framework") | |
9200 | (version "1.8.0") | |
9201 | (source (origin | |
9202 | (method url-fetch) | |
05662561 | 9203 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
dfd91541 JL |
9204 | "org.osgi.framework/" version "/org.osgi.framework-" |
9205 | version "-sources.jar")) | |
9206 | (sha256 | |
9207 | (base32 | |
9208 | "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s")))) | |
9209 | (build-system ant-build-system) | |
9210 | (arguments | |
9211 | `(#:jar-name "osgi-framework.jar" | |
9212 | #:tests? #f)); no tests | |
9213 | (inputs | |
9214 | `(("annotation" ,java-osgi-annotation) | |
9215 | ("resource" ,java-osgi-resource) | |
9216 | ("dto" ,java-osgi-dto))) | |
c353d014 | 9217 | (home-page "https://www.osgi.org") |
dfd91541 JL |
9218 | (synopsis "OSGi framework") |
9219 | (description | |
9220 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9221 | and service platform for the Java programming language.") | |
9222 | (license license:asl2.0))) | |
98c9f16c JL |
9223 | |
9224 | (define-public java-osgi-service-log | |
9225 | (package | |
9226 | (name "java-osgi-service-log") | |
9227 | (version "1.3.0") | |
9228 | (source (origin | |
9229 | (method url-fetch) | |
9b0bf25c | 9230 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
98c9f16c JL |
9231 | "org.osgi.service.log/" |
9232 | version "/org.osgi.service.log-" | |
9233 | version "-sources.jar")) | |
9234 | (sha256 | |
9235 | (base32 | |
9236 | "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0")))) | |
9237 | (build-system ant-build-system) | |
9238 | (arguments | |
9239 | `(#:jar-name "osgi-service-log.jar" | |
9240 | #:tests? #f)); no tests | |
9241 | (inputs | |
9242 | `(("java-osgi-framework" ,java-osgi-framework))) | |
c353d014 | 9243 | (home-page "https://www.osgi.org") |
98c9f16c JL |
9244 | (synopsis "Provides methods for bundles to write messages to the log") |
9245 | (description | |
9246 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9247 | and service platform for the Java programming language. This package contains | |
9248 | the log service.") | |
9249 | (license license:asl2.0))) | |
dd76d44b JL |
9250 | |
9251 | (define-public java-osgi-service-jdbc | |
9252 | (package | |
9253 | (name "java-osgi-service-jdbc") | |
9254 | (version "1.0.0") | |
9255 | (source (origin | |
9256 | (method url-fetch) | |
4a6a7b2d | 9257 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
dd76d44b JL |
9258 | "org.osgi.service.jdbc/" |
9259 | version "/org.osgi.service.jdbc-" | |
9260 | version "-sources.jar")) | |
9261 | (sha256 | |
9262 | (base32 | |
9263 | "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz")))) | |
9264 | (build-system ant-build-system) | |
9265 | (arguments | |
9266 | `(#:jar-name "osgi-service-jdbc.jar" | |
9267 | #:tests? #f)); no tests | |
c353d014 | 9268 | (home-page "https://www.osgi.org") |
dd76d44b JL |
9269 | (synopsis "Factory for JDBC connection factories") |
9270 | (description | |
9271 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9272 | and service platform for the Java programming language. This package contains | |
9273 | a factory for JDBC connection factories. There are 3 preferred connection | |
9274 | factories for getting JDBC connections: | |
9275 | ||
9276 | @itemize | |
9277 | @item @code{javax.sql.DataSource}; | |
9278 | @item @code{javax.sql.ConnectionPoolDataSource}; | |
9279 | @item @code{javax.sql.XADataSource}. | |
9280 | @end itemize") | |
9281 | (license license:asl2.0))) | |
291d3f22 JL |
9282 | |
9283 | (define-public java-osgi-service-resolver | |
9284 | (package | |
9285 | (name "java-osgi-service-resolver") | |
9286 | (version "1.0.1") | |
9287 | (source (origin | |
9288 | (method url-fetch) | |
b787534b | 9289 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
291d3f22 JL |
9290 | "org.osgi.service.resolver/" |
9291 | version "/org.osgi.service.resolver-" | |
9292 | version "-sources.jar")) | |
9293 | (sha256 | |
9294 | (base32 | |
9295 | "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd")))) | |
9296 | (build-system ant-build-system) | |
9297 | (arguments | |
9298 | `(#:jar-name "osgi-service-resolver.jar" | |
9299 | #:tests? #f)); no tests | |
9300 | (inputs | |
9301 | `(("annotation" ,java-osgi-annotation) | |
9302 | ("resource" ,java-osgi-resource))) | |
c353d014 | 9303 | (home-page "https://www.osgi.org") |
291d3f22 JL |
9304 | (synopsis "OSGI Resolver service") |
9305 | (description | |
9306 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9307 | and service platform for the Java programming language. This package contains | |
9308 | a resolver service that resolves the specified resources in the context supplied | |
9309 | by the caller.") | |
9310 | (license license:asl2.0))) | |
1884bb81 JL |
9311 | |
9312 | (define-public java-osgi-util-tracker | |
9313 | (package | |
9314 | (name "java-osgi-util-tracker") | |
9315 | (version "1.5.1") | |
9316 | (source (origin | |
9317 | (method url-fetch) | |
e0695da9 | 9318 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
1884bb81 JL |
9319 | "org.osgi.util.tracker/" |
9320 | version "/org.osgi.util.tracker-" | |
9321 | version "-sources.jar")) | |
9322 | (sha256 | |
9323 | (base32 | |
9324 | "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz")))) | |
9325 | (build-system ant-build-system) | |
9326 | (arguments | |
9327 | `(#:jar-name "osgi-util-tracker.jar" | |
9328 | #:tests? #f)); no tests | |
9329 | (inputs | |
9330 | `(("framework" ,java-osgi-framework) | |
9331 | ("annotation" ,java-osgi-annotation))) | |
c353d014 | 9332 | (home-page "https://www.osgi.org") |
1884bb81 JL |
9333 | (synopsis "Bundle tracking") |
9334 | (description | |
9335 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9336 | and service platform for the Java programming language. This package contains | |
9337 | bundle tracking utility classes.") | |
9338 | (license license:asl2.0))) | |
fb9c48b8 JL |
9339 | |
9340 | (define-public java-osgi-service-cm | |
9341 | (package | |
9342 | (name "java-osgi-service-cm") | |
9343 | (version "1.5.0") | |
9344 | (source (origin | |
9345 | (method url-fetch) | |
f8f2fefb | 9346 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
fb9c48b8 JL |
9347 | "org.osgi.service.cm/" |
9348 | version "/org.osgi.service.cm-" | |
9349 | version "-sources.jar")) | |
9350 | (sha256 | |
9351 | (base32 | |
9352 | "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6")))) | |
9353 | (build-system ant-build-system) | |
9354 | (arguments | |
9355 | `(#:jar-name "osgi-service-cm.jar" | |
9356 | #:tests? #f)); no tests | |
9357 | (inputs | |
9358 | `(("framework" ,java-osgi-framework) | |
9359 | ("annotation" ,java-osgi-annotation))) | |
c353d014 | 9360 | (home-page "https://www.osgi.org") |
fb9c48b8 JL |
9361 | (synopsis "OSGI Configuration Management") |
9362 | (description | |
9363 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9364 | and service platform for the Java programming language. This package contains | |
9365 | utility classes for the configuration of services.") | |
9366 | (license license:asl2.0))) | |
500aac75 JL |
9367 | |
9368 | (define-public java-osgi-service-packageadmin | |
9369 | (package | |
9370 | (name "java-osgi-service-packageadmin") | |
9371 | (version "1.2.0") | |
9372 | (source (origin | |
9373 | (method url-fetch) | |
839e3e89 | 9374 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
500aac75 JL |
9375 | "org.osgi.service.packageadmin/" |
9376 | version "/org.osgi.service.packageadmin-" | |
9377 | version "-sources.jar")) | |
9378 | (sha256 | |
9379 | (base32 | |
9380 | "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52")))) | |
9381 | (build-system ant-build-system) | |
9382 | (arguments | |
9383 | `(#:jar-name "osgi-service-packageadmin.jar" | |
9384 | #:tests? #f)); no tests | |
9385 | (inputs | |
9386 | `(("framework" ,java-osgi-framework))) | |
c353d014 | 9387 | (home-page "https://www.osgi.org") |
500aac75 JL |
9388 | (synopsis "OSGI Package Administration") |
9389 | (description | |
9390 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9391 | and service platform for the Java programming language. This package contains | |
9392 | the packageadmin service.") | |
9393 | (license license:asl2.0))) | |
77a4f1ae JL |
9394 | |
9395 | (define-public java-ops4j-base-lang | |
9396 | (package | |
9397 | (name "java-ops4j-base-lang") | |
9398 | (version "1.5.0") | |
9399 | (source (origin | |
9400 | (method url-fetch) | |
9401 | (uri (string-append "https://github.com/ops4j/org.ops4j.base/" | |
9402 | "archive/base-" version ".tar.gz")) | |
9403 | (sha256 | |
9404 | (base32 | |
9405 | "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw")))) | |
9406 | (build-system ant-build-system) | |
9407 | (arguments | |
9408 | `(#:jar-name "java-ops4j-base-lang.jar" | |
9409 | #:source-dir "ops4j-base-lang/src/main/java" | |
9410 | #:tests? #f; no tests | |
9411 | #:phases | |
9412 | (modify-phases %standard-phases | |
9413 | (add-before 'build 'add-test-file | |
9414 | (lambda _ | |
9415 | ;; That file is required by a test in ops4j-pax-exam-core-spi | |
9416 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang") | |
9417 | (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties" | |
9418 | (lambda _ | |
9419 | (display | |
9420 | (string-append | |
9421 | "version=" ,version "\n" | |
9422 | "groupId=org.ops4j.base" | |
2c8ac364 MW |
9423 | "artifactId=ops4j-base-lang\n")))) |
9424 | #t))))) | |
77a4f1ae JL |
9425 | (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview") |
9426 | (synopsis "Utility classes and extensions to be used in OPS4J projects") | |
9427 | (description "OPS4J stands for Open Participation Software for Java. This | |
9428 | package contains utilities and extensions related to @code{java.lang}.") | |
9429 | (license license:asl2.0))) | |
b2353495 JL |
9430 | |
9431 | (define-public java-ops4j-base-monitors | |
9432 | (package | |
9433 | (inherit java-ops4j-base-lang) | |
9434 | (name "java-ops4j-base-monitors") | |
9435 | (arguments | |
9436 | `(#:jar-name "java-ops4j-base-monitors.jar" | |
9437 | #:source-dir "ops4j-base-monitors/src/main/java" | |
9438 | #:tests? #f)); no tests | |
9439 | (inputs | |
9440 | `(("lang" ,java-ops4j-base-lang))) | |
9441 | (description "OPS4J stands for Open Participation Software for Java. This | |
9442 | package contains utilities and extensions related to monitoring."))) | |
322d349a JL |
9443 | |
9444 | (define-public java-ops4j-base-io | |
9445 | (package | |
9446 | (inherit java-ops4j-base-lang) | |
9447 | (name "java-ops4j-base-io") | |
9448 | (arguments | |
9449 | `(#:jar-name "java-ops4j-base-io.jar" | |
9450 | #:source-dir "ops4j-base-io/src/main/java" | |
9451 | #:test-dir "ops4j-base-io/src/test" | |
9452 | #:test-exclude | |
9453 | (list "**/ListerTest.java"))) | |
9454 | (inputs | |
9455 | `(("lang" ,java-ops4j-base-monitors) | |
9456 | ("lang" ,java-ops4j-base-lang))) | |
9457 | (native-inputs | |
9458 | `(("junit" ,java-junit) | |
9459 | ("hamcrest" ,java-hamcrest-core))) | |
9460 | (description "OPS4J stands for Open Participation Software for Java. This | |
9461 | package contains utilities and extensions related to handling streams and files."))) | |
559919c1 JL |
9462 | |
9463 | (define-public java-ops4j-base-util | |
9464 | (package | |
9465 | (inherit java-ops4j-base-lang) | |
9466 | (name "java-ops4j-base-util") | |
9467 | (arguments | |
9468 | `(#:jar-name "java-ops4j-base-util.jar" | |
9469 | #:source-dir "ops4j-base-util/src/main/java" | |
9470 | #:test-dir "ops4j-base-util/src/test")) | |
9471 | (inputs | |
9472 | `(("lang" ,java-ops4j-base-lang))) | |
9473 | (native-inputs | |
9474 | `(("junit" ,java-junit))) | |
9475 | (description "OPS4J stands for Open Participation Software for Java. This | |
9476 | package contains utilities and extensions related to environment, i18n and | |
9477 | mime types."))) | |
60dcec7a JL |
9478 | |
9479 | (define-public java-ops4j-base-util-property | |
9480 | (package | |
9481 | (inherit java-ops4j-base-lang) | |
9482 | (name "java-ops4j-base-util-property") | |
9483 | (arguments | |
9484 | `(#:jar-name "java-ops4j-base-util-property.jar" | |
9485 | #:source-dir "ops4j-base-util-property/src/main/java" | |
9486 | #:tests? #f)); no tests | |
9487 | (inputs | |
9488 | `(("lang" ,java-ops4j-base-lang) | |
9489 | ("util" ,java-ops4j-base-util))) | |
9490 | (description "OPS4J stands for Open Participation Software for Java. This | |
9491 | package contains utilities and extensions related to resolving properties from | |
9492 | different sources."))) | |
0edf8cf0 JL |
9493 | |
9494 | (define-public java-ops4j-base-store | |
9495 | (package | |
9496 | (inherit java-ops4j-base-lang) | |
9497 | (name "java-ops4j-base-store") | |
9498 | (arguments | |
9499 | `(#:jar-name "java-ops4j-base-store.jar" | |
9500 | #:source-dir "ops4j-base-store/src/main/java" | |
9501 | #:tests? #f)); no tests | |
9502 | (inputs | |
9503 | `(("lang" ,java-ops4j-base-lang) | |
9504 | ("slf4j" ,java-slf4j-api) | |
9505 | ("io" ,java-ops4j-base-io))) | |
9506 | (description "OPS4J stands for Open Participation Software for Java. This | |
9507 | package contains utilities for storing and retrieving data from an | |
9508 | @code{InputStream}."))) | |
214fcd8a JL |
9509 | |
9510 | (define-public java-ops4j-base-spi | |
9511 | (package | |
9512 | (inherit java-ops4j-base-lang) | |
9513 | (name "java-ops4j-base-spi") | |
9514 | (arguments | |
9515 | `(#:jar-name "java-ops4j-base-spi.jar" | |
9516 | #:source-dir "ops4j-base-spi/src/main/java" | |
9517 | #:test-dir "ops4j-base-spi/src/test")) | |
9518 | (native-inputs | |
9519 | `(("junit" ,java-junit) | |
9520 | ("hamcrest" ,java-hamcrest-core))) | |
9521 | (description "OPS4J stands for Open Participation Software for Java. This | |
9522 | package contains utilities for obtaining services via the Java SE 6 | |
9523 | @code{ServiceLoader}."))) | |
e1edf42e JL |
9524 | |
9525 | (define-public java-aqute-bnd-annotation | |
9526 | (package | |
9527 | (name "java-aqute-bnd-annotation") | |
2cac8891 | 9528 | (version "3.5.0") |
e1edf42e JL |
9529 | (source (origin |
9530 | (method url-fetch) | |
9531 | (uri (string-append "https://github.com/bndtools/bnd/archive/" | |
9532 | version ".REL.tar.gz")) | |
9533 | (file-name (string-append name "-" version ".tar.gz")) | |
9534 | (sha256 | |
9535 | (base32 | |
2cac8891 | 9536 | "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl")))) |
e1edf42e JL |
9537 | (build-system ant-build-system) |
9538 | (arguments | |
9539 | `(#:jar-name "java-aqute-bnd-annotation.jar" | |
9540 | #:source-dir "biz.aQute.bnd.annotation/src" | |
9541 | #:tests? #f)); empty test dir | |
27c0eade | 9542 | (home-page "https://bnd.bndtools.org/") |
e1edf42e JL |
9543 | (synopsis "Tools for OSGi") |
9544 | (description "Bnd is a swiss army knife for OSGi, it creates manifest | |
9545 | headers based on analyzing the class code, it verifies the project settings, | |
9546 | it manages project dependencies, gives diffs jars, and much more.") | |
9547 | (license license:asl2.0))) | |
60ba2978 JL |
9548 | |
9549 | (define-public java-aqute-libg | |
9550 | (package | |
9551 | (inherit java-aqute-bnd-annotation) | |
9552 | (name "java-aqute-libg") | |
9553 | (arguments | |
9554 | `(#:jar-name "java-aqute-libg.jar" | |
78754995 GB |
9555 | ;; The build fails when source/target more recent than 1.7. This |
9556 | ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327 | |
9557 | ;; | |
9558 | ;; It is closed as won't fix. There is no way to change the source | |
9559 | ;; so that it works on 1.8, and still works on 1.6, the upstream | |
9560 | ;; target. It work fine on 1.7, so we use 1.7. | |
9561 | #:make-flags (list "-Dant.build.javac.source=1.7" | |
9562 | "-Dant.build.javac.target=1.7") | |
2ab089b7 GB |
9563 | #:phases |
9564 | (modify-phases %standard-phases | |
9565 | (add-before 'configure 'chdir | |
9566 | ;; Change to aQute.libg directory, so that the relative | |
9567 | ;; paths in the tests aren't broken. | |
9568 | (lambda _ | |
9569 | (chdir "aQute.libg") | |
9570 | #t)) | |
9571 | (add-before 'check 'create-test-directory | |
9572 | ;; Copy the test directory to test/java, since that's where | |
9573 | ;; ant-build-system's default project in build.xml expects to find | |
9574 | ;; the test classes. Leave a copy in the original place to not | |
9575 | ;; break paths in tests. | |
9576 | (lambda _ | |
9577 | (mkdir "src/test") | |
9578 | (copy-recursively "test" "src/test/java") | |
9579 | #t))))) | |
60ba2978 JL |
9580 | (inputs |
9581 | `(("slf4j" ,java-slf4j-api) | |
9582 | ("osgi-annot" ,java-osgi-annotation) | |
9583 | ("java-osgi-cmpn" ,java-osgi-cmpn) | |
2ab089b7 GB |
9584 | ("osgi" ,java-osgi-core))) |
9585 | (native-inputs | |
9586 | `(("hamcrest" ,java-hamcrest-core) | |
9587 | ("java-junit" ,java-junit))))) | |
5f26a131 JL |
9588 | |
9589 | (define-public java-aqute-bndlib | |
9590 | (package | |
9591 | (inherit java-aqute-bnd-annotation) | |
9592 | (name "java-aqute-bndlib") | |
9593 | (arguments | |
9594 | `(#:jar-name "java-bndlib.jar" | |
9595 | #:source-dir "biz.aQute.bndlib/src" | |
9596 | #:tests? #f)); no tests | |
9597 | (inputs | |
9598 | `(("slf4j" ,java-slf4j-api) | |
9599 | ("osgi-annot" ,java-osgi-annotation) | |
9600 | ("java-aqute-libg" ,java-aqute-libg) | |
9601 | ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation) | |
9602 | ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations) | |
9603 | ("java-osgi-service-repository" ,java-osgi-service-repository) | |
9604 | ("java-osgi-service-log" ,java-osgi-service-log) | |
9605 | ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations) | |
9606 | ("java-osgi-namespace-contract" ,java-osgi-namespace-contract) | |
9607 | ("java-osgi-namespace-extender" ,java-osgi-namespace-extender) | |
9608 | ("java-osgi-namespace-service" ,java-osgi-namespace-service) | |
9609 | ("promise" ,java-osgi-util-promise) | |
9610 | ("osgi" ,java-osgi-core))))) | |
869803aa | 9611 | |
25aef81d JL |
9612 | (define-public java-ops4j-pax-tinybundles |
9613 | (package | |
9614 | (name "java-ops4j-pax-tinybundles") | |
9615 | (version "2.1.1") | |
9616 | (source (origin | |
9617 | (method url-fetch) | |
9618 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/" | |
9619 | "archive/tinybundles-" version ".tar.gz")) | |
9620 | (sha256 | |
9621 | (base32 | |
9622 | "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871")))) | |
9623 | (arguments | |
9624 | `(#:jar-name "java-ops4j-pax-tinybundles.jar" | |
9625 | #:source-dir "src/main/java" | |
9626 | #:test-exclude | |
9627 | ;; Abstract base classes for other tests | |
9628 | (list "**/BndTest.java" "**/CoreTest.java") | |
9629 | #:phases | |
9630 | (modify-phases %standard-phases | |
9631 | (add-before 'check 'fix-version | |
9632 | (lambda _ | |
9633 | ;; This test has a reference to an old version of bndlib we are not | |
9634 | ;; packaging. It uses the version referenced in pom.xml. We replace | |
9635 | ;; it with our own version. | |
9636 | (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java" | |
0f277802 | 9637 | (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*") |
2c8ac364 MW |
9638 | ,(package-version java-aqute-bndlib))) |
9639 | #t))))) | |
25aef81d JL |
9640 | (inputs |
9641 | `(("lang" ,java-ops4j-base-lang) | |
9642 | ("io" ,java-ops4j-base-io) | |
9643 | ("store" ,java-ops4j-base-store) | |
9644 | ("slf4j" ,java-slf4j-api) | |
9645 | ("libg" ,java-aqute-libg) | |
9646 | ("bndlib" ,java-aqute-bndlib))) | |
9647 | (native-inputs | |
9648 | `(("junit" ,java-junit) | |
9649 | ("hamcrest" ,java-hamcrest-core) | |
9650 | ("log4j" ,java-log4j-api) | |
9651 | ("bndannotation" ,java-aqute-bnd-annotation) | |
9652 | ("framework" ,java-osgi-framework))) | |
9653 | (build-system ant-build-system) | |
9654 | (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles") | |
9655 | (synopsis "Java APIs to create OSGi related artifacts") | |
9656 | (description "Tinybundles is all about creating OSGi related artifacts like | |
6fa0914a | 9657 | Bundles, Fragments and Deployment Packages with Java Api. It is very convenient |
25aef81d JL |
9658 | to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the |
9659 | other hand, this library can be a foundation of real end user tools that need | |
9660 | to create those artifacts.") | |
9661 | (license license:asl2.0))) | |
e179add0 JL |
9662 | |
9663 | (define-public java-ops4j-pax-exam-core | |
9664 | (package | |
9665 | (name "java-ops4j-pax-exam-core") | |
9666 | (version "4.11.0") | |
9667 | (source (origin | |
9668 | (method url-fetch) | |
9669 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/" | |
9670 | "archive/exam-reactor-" version ".tar.gz")) | |
9671 | (sha256 | |
9672 | (base32 | |
9673 | "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g")))) | |
9674 | (arguments | |
9675 | `(#:jar-name "java-ops4j-pax-exam-core.jar" | |
9676 | #:source-dir "core/pax-exam/src/main/java" | |
9677 | #:test-dir "core/pax-exam/src/test")) | |
9678 | (inputs | |
9679 | `(("slf4j" ,java-slf4j-api) | |
9680 | ("lang" ,java-ops4j-base-lang) | |
9681 | ("io" ,java-ops4j-base-io) | |
9682 | ("util-property" ,java-ops4j-base-util-property) | |
9683 | ("util-store" ,java-ops4j-base-store) | |
9684 | ("java-osgi-core" ,java-osgi-core))) | |
9685 | (native-inputs | |
9686 | `(("junit" ,java-junit) | |
9687 | ("hamcrest" ,java-hamcrest-core))) | |
9688 | (build-system ant-build-system) | |
9689 | (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview") | |
9690 | (synopsis "In-Container Testing for OSGi, Java EE and CDI") | |
9691 | (description "Pax Exam creates OSGi bundles for testing purposes. It lets | |
9692 | the user take control of the OSGi framework, the test framework (e.g. JUnit) and | |
9693 | the system under test at the same time.") | |
9694 | (license license:asl2.0))) | |
7a7c2b75 JL |
9695 | |
9696 | (define-public java-ops4j-pax-exam-core-spi | |
9697 | (package | |
9698 | (inherit java-ops4j-pax-exam-core) | |
9699 | (name "java-ops4j-pax-exam-core-spi") | |
9700 | (arguments | |
9701 | `(#:jar-name "java-ops4j-pax-exam-spi.jar" | |
9702 | #:source-dir "src/main/java" | |
9703 | #:test-exclude | |
9704 | (list | |
9705 | ;; Abstract base class, not a test | |
9706 | "**/BaseStagedReactorTest.java" | |
9707 | ;; Depends on org.mortbay.jetty.testwars:test-war-dump | |
9708 | "**/WarBuilderTest.java") | |
9709 | #:phases | |
9710 | (modify-phases %standard-phases | |
9711 | (add-before 'configure 'chdir | |
9712 | (lambda _ | |
9713 | ;; Tests assume we are in this directory | |
2c8ac364 MW |
9714 | (chdir "core/pax-exam-spi") |
9715 | #t)) | |
7a7c2b75 JL |
9716 | (add-before 'check 'fix-tests |
9717 | (lambda _ | |
9718 | ;; One test checks that this file is present. | |
9719 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi") | |
9720 | (with-output-to-file | |
9721 | "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties" | |
9722 | (lambda _ | |
9723 | (display | |
9724 | (string-append "artifactId = pax-exam-spi\n" | |
9725 | "version = " ,(package-version java-ops4j-pax-exam-core-spi))))) | |
9726 | ;; Maven puts compilation results in the target directory, while we | |
9727 | ;; put them in the build directory. | |
9728 | (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java" | |
9729 | "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java" | |
9730 | "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java") | |
9731 | (("target") "build")) | |
9732 | ;; One test is expected to fail, but it doesn't throw the expected exception | |
9733 | (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java" | |
2c8ac364 MW |
9734 | (("AssertionError") "IllegalArgumentException")) |
9735 | #t))))) | |
7a7c2b75 JL |
9736 | (inputs |
9737 | `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core) | |
9738 | ("lang" ,java-ops4j-base-lang) | |
9739 | ("monitors" ,java-ops4j-base-monitors) | |
9740 | ("store" ,java-ops4j-base-store) | |
9741 | ("io" ,java-ops4j-base-io) | |
9742 | ("spi" ,java-ops4j-base-spi) | |
9743 | ("osgi" ,java-osgi-core) | |
9744 | ("slf4j" ,java-slf4j-api) | |
9745 | ("tinybundles" ,java-ops4j-pax-tinybundles))) | |
9746 | (native-inputs | |
9747 | `(("mockito" ,java-mockito-1) | |
9748 | ("junit" ,java-junit) | |
9749 | ("hamcrest" ,java-hamcrest-core) | |
9750 | ("cglib" ,java-cglib) | |
9751 | ("objenesis" ,java-objenesis) | |
9752 | ("asm" ,java-asm))))) | |
4496d77f JL |
9753 | |
9754 | (define-public java-ops4j-pax-exam-core-junit | |
9755 | (package | |
9756 | (inherit java-ops4j-pax-exam-core) | |
9757 | (name "java-ops4j-pax-exam-core-junit") | |
9758 | (arguments | |
9759 | `(#:jar-name "ops4j-pax-exam-core-junit.jar" | |
9760 | #:source-dir "drivers/pax-exam-junit4/src/main/java" | |
9761 | #:tests? #f)); no tests | |
9762 | (inputs | |
9763 | `(("junit" ,java-junit) | |
9764 | ("slf4j" ,java-slf4j-api) | |
9765 | ("core" ,java-ops4j-pax-exam-core) | |
9766 | ("spi" ,java-ops4j-pax-exam-core-spi))) | |
9767 | (native-inputs '()))) | |
cb05f60d JL |
9768 | |
9769 | (define-public java-fasterxml-jackson-annotations | |
9770 | (package | |
9771 | (name "java-fasterxml-jackson-annotations") | |
93dceea4 | 9772 | (version "2.9.4") |
cb05f60d JL |
9773 | (source (origin |
9774 | (method url-fetch) | |
9775 | (uri (string-append "https://github.com/FasterXML/" | |
9776 | "jackson-annotations/archive/" | |
9777 | "jackson-annotations-" version ".tar.gz")) | |
9778 | (sha256 | |
9779 | (base32 | |
93dceea4 | 9780 | "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4")))) |
cb05f60d JL |
9781 | (build-system ant-build-system) |
9782 | (arguments | |
9783 | `(#:jar-name "jackson-annotations.jar" | |
9784 | #:source-dir "src/main/java" | |
9785 | #:test-dir "src/test")) | |
9786 | (native-inputs | |
9787 | `(("junit" ,java-junit))) | |
9788 | (home-page "https://github.com/FasterXML/jackson-annotations") | |
9789 | (synopsis "General purpose annotations for the Jackson Data Processor") | |
9790 | (description "This package contains general purpose annotations for the | |
9791 | Jackson Data Processor, used on value and handler types. The only annotations | |
9792 | not included are ones that require dependency to the Databind package.") | |
9793 | (license license:asl2.0))) | |
0b5481df JL |
9794 | |
9795 | (define-public java-fasterxml-jackson-core | |
9796 | (package | |
9797 | (name "java-fasterxml-jackson-core") | |
38a0fc38 | 9798 | (version "2.9.4") |
0b5481df JL |
9799 | (source (origin |
9800 | (method url-fetch) | |
9801 | (uri (string-append "https://github.com/FasterXML/" | |
9802 | "jackson-core/archive/" | |
9803 | "jackson-core-" version ".tar.gz")) | |
9804 | (sha256 | |
9805 | (base32 | |
38a0fc38 | 9806 | "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd")))) |
0b5481df JL |
9807 | (build-system ant-build-system) |
9808 | (arguments | |
9809 | `(#:jar-name "jackson-core.jar" | |
9810 | #:source-dir "src/main/java" | |
9811 | #:test-dir "src/test" | |
9812 | #:test-exclude | |
9813 | (list | |
9814 | ;; Expected failure. pom.xml excludes these | |
9815 | "**/failing/**" | |
9816 | ;; Base classes that have no constructor for junit | |
9817 | "**/BaseTest.java" | |
9818 | "**/ConcurrencyReadTest.java" | |
9819 | "**/ManualCharAccessTest.java" | |
9820 | "**/ManualCharAccessTest.java" | |
9821 | "**/TrailingCommasTest.java" | |
9822 | "**/AsyncMissingValuesInObjectTest.java" | |
9823 | "**/AsyncMissingValuesInArrayTest.java") | |
9824 | #:phases | |
9825 | (modify-phases %standard-phases | |
9826 | (add-before 'configure 'generate-PackageVersion.java | |
9827 | (lambda _ | |
9828 | (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java") | |
9829 | (in (string-append out ".in"))) | |
9830 | (copy-file in out) | |
9831 | (substitute* out | |
9832 | (("@package@") "com.fasterxml.jackson.core.json") | |
9833 | (("@projectversion@") ,version) | |
9834 | (("@projectgroupid@") "com.fasterxml.jackson.core") | |
2c8ac364 MW |
9835 | (("@projectartifactid@") "jackson-core"))) |
9836 | #t)) | |
0b5481df JL |
9837 | (add-before 'build 'copy-resources |
9838 | (lambda _ | |
9839 | (copy-recursively "src/main/resources" | |
2c8ac364 MW |
9840 | "build/classes") |
9841 | #t)) | |
0b5481df JL |
9842 | (add-before 'check 'copy-test-resources |
9843 | (lambda _ | |
9844 | (copy-recursively "src/test/resources" | |
2c8ac364 MW |
9845 | "build/test-classes") |
9846 | #t))))) | |
0b5481df JL |
9847 | (native-inputs |
9848 | `(("junit" ,java-junit) | |
9849 | ("hamcrest" ,java-hamcrest-core))) | |
9850 | (home-page "https://github.com/FasterXML/jackson-core") | |
94c38d54 JL |
9851 | (synopsis "Low-level streaming parser and generator abstractions") |
9852 | (description "This package contains core low-level incremental | |
9853 | (streaming) parser and generator abstractions used by the Jackson Data | |
9854 | Processor. It also includes the default implementation of handler types | |
9855 | (parser, generator) that handle JSON format.") | |
0b5481df | 9856 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
f234c7a0 JL |
9857 | |
9858 | (define-public java-fasterxml-jackson-databind | |
9859 | (package | |
9860 | (name "java-fasterxml-jackson-databind") | |
3c1edff5 | 9861 | (version "2.9.4") |
f234c7a0 JL |
9862 | (source (origin |
9863 | (method url-fetch) | |
9864 | (uri (string-append "https://github.com/FasterXML/" | |
9865 | "jackson-databind/archive/" | |
9866 | "jackson-databind-" version ".tar.gz")) | |
9867 | (sha256 | |
9868 | (base32 | |
3c1edff5 | 9869 | "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08")))) |
f234c7a0 JL |
9870 | (build-system ant-build-system) |
9871 | (arguments | |
9872 | `(#:jar-name "jackson-databind.jar" | |
9873 | #:source-dir "src/main/java" | |
9874 | #:tests? #f; requires javax.measures for which I can't find a free implementation | |
9875 | #:phases | |
9876 | (modify-phases %standard-phases | |
9877 | (add-before 'configure 'generate-PackageVersion.java | |
9878 | (lambda _ | |
9879 | (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java") | |
9880 | (in (string-append out ".in"))) | |
9881 | (copy-file in out) | |
9882 | (substitute* out | |
9883 | (("@package@") "com.fasterxml.jackson.databind.cfg") | |
9884 | (("@projectversion@") ,version) | |
9885 | (("@projectgroupid@") "com.fasterxml.jackson.databind") | |
2c8ac364 MW |
9886 | (("@projectartifactid@") "jackson-databind"))) |
9887 | #t)) | |
f234c7a0 JL |
9888 | (add-before 'build 'copy-resources |
9889 | (lambda _ | |
2c8ac364 MW |
9890 | (copy-recursively "src/main/resources" "build/classes") |
9891 | #t))))) | |
f234c7a0 JL |
9892 | (inputs |
9893 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
9894 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core))) | |
9895 | (home-page "https://github.com/FasterXML/jackson-databind") | |
9896 | (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor") | |
9897 | (description "This package contains the general-purpose data-binding | |
9898 | functionality and tree-model for Jackson Data Processor. It builds on core | |
9899 | streaming parser/generator package, and uses Jackson Annotations for | |
9900 | configuration.") | |
9901 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
d57d8b89 JL |
9902 | |
9903 | (define-public java-fasterxml-jackson-modules-base-jaxb | |
9904 | (package | |
9905 | (name "java-fasterxml-jackson-modules-base-jaxb") | |
07207211 | 9906 | (version "2.9.4") |
d57d8b89 JL |
9907 | (source (origin |
9908 | (method url-fetch) | |
9909 | (uri (string-append "https://github.com/FasterXML/" | |
9910 | "jackson-modules-base/archive/" | |
9911 | "jackson-modules-base-" version ".tar.gz")) | |
9912 | (sha256 | |
9913 | (base32 | |
07207211 | 9914 | "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5")))) |
d57d8b89 JL |
9915 | (build-system ant-build-system) |
9916 | (arguments | |
9917 | `(#:jar-name "jackson-modules-base-jaxb.jar" | |
9918 | #:source-dir "jaxb/src/main/java" | |
9919 | #:test-dir "jaxb/src/test" | |
9920 | #:test-exclude | |
9921 | ;; Base class for tests | |
9922 | (list "**/BaseJaxbTest.java") | |
9923 | #:phases | |
9924 | (modify-phases %standard-phases | |
9925 | (add-before 'configure 'generate-PackageVersion.java | |
9926 | (lambda _ | |
9927 | (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/" | |
9928 | "jackson/module/jaxb/PackageVersion.java")) | |
9929 | (in (string-append out ".in"))) | |
9930 | (copy-file in out) | |
9931 | (substitute* out | |
9932 | (("@package@") "com.fasterxml.jackson.module.jaxb") | |
9933 | (("@projectversion@") ,version) | |
9934 | (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb") | |
2c8ac364 MW |
9935 | (("@projectartifactid@") "jackson-module-jaxb"))) |
9936 | #t)) | |
d57d8b89 JL |
9937 | (add-before 'build 'copy-resources |
9938 | (lambda _ | |
2c8ac364 MW |
9939 | (copy-recursively "jaxb/src/main/resources" "build/classes") |
9940 | #t))))) | |
d57d8b89 JL |
9941 | (inputs |
9942 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
9943 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
9944 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind))) | |
9945 | (native-inputs | |
9946 | `(("java-junit" ,java-junit))) | |
9947 | (home-page "https://github.com/FasterXML/jackson-modules-base") | |
9948 | (synopsis "Jaxb annotations jackson module") | |
9949 | (description "This package is the jaxb annotations module for jackson.") | |
9950 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
0f296d37 | 9951 | |
5165fb40 DM |
9952 | (define-public java-fasterxml-jackson-modules-base-mrbean |
9953 | (package | |
9954 | (name "java-fasterxml-jackson-modules-base-mrbean") | |
9955 | (version "2.9.4") | |
9956 | (source (origin | |
9957 | (method url-fetch) | |
9958 | (uri (string-append "https://github.com/FasterXML/" | |
9959 | "jackson-modules-base/archive/" | |
9960 | "jackson-modules-base-" version ".tar.gz")) | |
9961 | (sha256 | |
9962 | (base32 | |
9963 | "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5")))) | |
9964 | (build-system ant-build-system) | |
9965 | (arguments | |
9966 | `(#:jar-name "jackson-modules-base-mrbean.jar" | |
9967 | #:source-dir "mrbean/src/main/java" | |
9968 | #:test-dir "mrbean/src/test" | |
9969 | #:test-exclude | |
9970 | ;; Base class for tests | |
9971 | (list "**/BaseTest.java") | |
9972 | #:phases | |
9973 | (modify-phases %standard-phases | |
9974 | (add-before 'configure 'generate-PackageVersion.java | |
9975 | (lambda _ | |
9976 | (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/" | |
9977 | "jackson/module/mrbean/PackageVersion.java")) | |
9978 | (in (string-append out ".in"))) | |
9979 | (copy-file in out) | |
9980 | (substitute* out | |
9981 | (("@package@") "com.fasterxml.jackson.module.mrbean") | |
9982 | (("@projectversion@") ,version) | |
9983 | (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean") | |
9984 | (("@projectartifactid@") "jackson-module-mrbean"))) | |
9985 | #t))))) | |
9986 | (inputs | |
9987 | `(("java-asm" ,java-asm) | |
9988 | ("java-fasterxml-jackson-annotations" | |
9989 | ,java-fasterxml-jackson-annotations) | |
9990 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
9991 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind))) | |
9992 | (native-inputs | |
9993 | `(("java-junit" ,java-junit))) | |
9994 | (home-page "https://github.com/FasterXML/jackson-modules-base") | |
9995 | (synopsis "POJO type materialization for Java") | |
9996 | (description "This package implements POJO type materialization. | |
9997 | Databinders can construct implementation classes for Java interfaces as part | |
9998 | of deserialization.") | |
9999 | (license license:asl2.0))) | |
10000 | ||
0f296d37 JL |
10001 | (define-public java-snakeyaml |
10002 | (package | |
10003 | (name "java-snakeyaml") | |
10004 | (version "1.18") | |
10005 | (source (origin | |
10006 | (method url-fetch) | |
10007 | (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v" | |
10008 | version ".tar.gz")) | |
307856cd | 10009 | (file-name (string-append name "-" version ".tar.gz")) |
0f296d37 JL |
10010 | (sha256 |
10011 | (base32 | |
b19f155c | 10012 | "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh")))) |
0f296d37 JL |
10013 | (build-system ant-build-system) |
10014 | (arguments | |
10015 | `(#:jar-name "java-snakeyaml.jar" | |
10016 | #:source-dir "src/main/java" | |
10017 | ;; Tests require velocity, a cyclic dependency, and | |
10018 | ;; java-spring-framework-context which is not packaged. | |
10019 | #:tests? #f)) | |
10020 | (home-page "https://bitbucket.org/asomov/snakeyaml") | |
10021 | (synopsis "YAML processor") | |
10022 | (description "SnakeYAML is a YAML processor for the Java Virtual Machine.") | |
10023 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
087c8fd2 JL |
10024 | |
10025 | (define-public java-fasterxml-jackson-dataformat-yaml | |
10026 | (package | |
10027 | (name "java-fasterxml-jackson-dataformat-yaml") | |
1f2be88f | 10028 | (version "2.9.4") |
087c8fd2 JL |
10029 | (source (origin |
10030 | (method url-fetch) | |
10031 | (uri (string-append "https://github.com/FasterXML/" | |
10032 | "jackson-dataformats-text/archive/" | |
10033 | "jackson-dataformats-text-" version ".tar.gz")) | |
10034 | (sha256 | |
10035 | (base32 | |
1f2be88f | 10036 | "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7")))) |
087c8fd2 JL |
10037 | (build-system ant-build-system) |
10038 | (arguments | |
10039 | `(#:jar-name "jackson-dataformat-yaml.jar" | |
10040 | #:source-dir "yaml/src/main/java" | |
10041 | #:test-dir "yaml/src/test" | |
10042 | #:test-exclude (list "**/failing/**.java") | |
10043 | #:phases | |
10044 | (modify-phases %standard-phases | |
10045 | (add-before 'configure 'generate-PackageVersion.java | |
10046 | (lambda _ | |
10047 | (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java") | |
10048 | (in (string-append out ".in"))) | |
10049 | (copy-file in out) | |
10050 | (substitute* out | |
10051 | (("@package@") "com.fasterxml.jackson.dataformat.yaml") | |
10052 | (("@projectversion@") ,version) | |
10053 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml") | |
2c8ac364 MW |
10054 | (("@projectartifactid@") "jackson-dataformat-yaml"))) |
10055 | #t))))) | |
087c8fd2 JL |
10056 | (inputs |
10057 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
10058 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
10059 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) | |
10060 | ("java-snakeyaml" ,java-snakeyaml))) | |
10061 | (native-inputs | |
10062 | `(("junit" ,java-junit) | |
10063 | ("hamcrest" ,java-hamcrest-core) | |
10064 | ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi) | |
10065 | ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit) | |
10066 | ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core))) | |
10067 | (home-page "https://github.com/FasterXML/jackson-dataformats-text") | |
10068 | (synopsis "Yaml backend for Jackson") | |
10069 | (description "Dataformat backends are used to support format alternatives | |
10070 | to JSON, supported by default. This is done by sub-classing Jackson core | |
10071 | abstractions.") | |
10072 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
6fd07b98 JL |
10073 | |
10074 | (define-public java-stax2-api | |
10075 | (package | |
10076 | (name "java-stax2-api") | |
10077 | (version "4.0.0") | |
10078 | (source (origin | |
10079 | (method url-fetch) | |
10080 | (uri (string-append "https://github.com/FasterXML/stax2-api/archive/" | |
10081 | "stax2-api-" version ".tar.gz")) | |
10082 | (sha256 | |
10083 | (base32 | |
10084 | "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq")))) | |
10085 | (build-system ant-build-system) | |
10086 | (arguments | |
10087 | `(#:jar-name "java-stax2-api.jar" | |
10088 | #:source-dir "src/main/java" | |
10089 | #:tests? #f)); no tests | |
10090 | (home-page "https://github.com/FasterXML/stax2-api") | |
10091 | (synopsis "Stax2 API") | |
10092 | (description "Stax2 API is an extension to basic Stax 1.0 API that adds | |
10093 | significant new functionalities, such as full-featured bi-direction validation | |
10094 | interface and high-performance Typed Access API.") | |
10095 | (license license:bsd-2))) | |
40f193f3 JL |
10096 | |
10097 | (define-public java-woodstox-core | |
10098 | (package | |
10099 | (name "java-woodstox-core") | |
10100 | (version "5.0.3") | |
10101 | (source (origin | |
e98fd9fe EF |
10102 | (method git-fetch) |
10103 | (uri (git-reference | |
10104 | (url "https://github.com/FasterXML/woodstox") | |
10105 | (commit (string-append "woodstox-core-" version)))) | |
10106 | (file-name (git-file-name name version)) | |
40f193f3 JL |
10107 | (sha256 |
10108 | (base32 | |
e98fd9fe | 10109 | "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp")))) |
40f193f3 JL |
10110 | (build-system ant-build-system) |
10111 | (arguments | |
10112 | `(#:jar-name "woodstox.jar" | |
10113 | #:test-exclude | |
10114 | (list "**/Base*.java" "failing/**") | |
10115 | #:phases | |
10116 | (modify-phases %standard-phases | |
10117 | (add-before 'build 'remove-msv-dep | |
10118 | (lambda _ | |
10119 | ;; we don't need osgi, and it depends on msv | |
10120 | (delete-file-recursively "src/main/java/com/ctc/wstx/osgi") | |
10121 | ;; msv's latest release is from 2011 and we don't need it | |
10122 | (delete-file-recursively "src/main/java/com/ctc/wstx/msv") | |
10123 | (delete-file-recursively "src/test/java/wstxtest/osgi") | |
2c8ac364 MW |
10124 | (delete-file-recursively "src/test/java/wstxtest/msv") |
10125 | #t)) | |
40f193f3 JL |
10126 | (add-before 'build 'copy-resources |
10127 | (lambda _ | |
2c8ac364 MW |
10128 | (copy-recursively "src/main/resources" "build/classes") |
10129 | #t))))) | |
40f193f3 JL |
10130 | (inputs |
10131 | `(("stax2" ,java-stax2-api))) | |
10132 | (native-inputs | |
10133 | `(("junit" ,java-junit))) | |
10134 | (home-page "https://github.com/FasterXML/woodstox") | |
10135 | (synopsis "Stax XML API implementation") | |
10136 | (description "Woodstox is a stax XML API implementation.") | |
10137 | (license license:asl2.0))) | |
262a4d33 JL |
10138 | |
10139 | (define-public java-fasterxml-jackson-dataformat-xml | |
10140 | (package | |
10141 | (name "java-fasterxml-jackson-dataformat-xml") | |
f3bbe029 | 10142 | (version "2.9.4") |
262a4d33 | 10143 | (source (origin |
3d67269e EF |
10144 | (method git-fetch) |
10145 | (uri (git-reference | |
10146 | (url "https://github.com/FasterXML/jackson-dataformat-xml") | |
10147 | (commit (string-append "jackson-dataformat-xml-" version)))) | |
10148 | (file-name (git-file-name name version)) | |
262a4d33 JL |
10149 | (sha256 |
10150 | (base32 | |
3d67269e | 10151 | "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx")))) |
262a4d33 JL |
10152 | (build-system ant-build-system) |
10153 | (arguments | |
10154 | `(#:jar-name "jackson-dataformat-xml.jar" | |
10155 | #:source-dir "src/main/java" | |
10156 | #:test-exclude | |
10157 | (list "**/failing/**") | |
10158 | #:phases | |
10159 | (modify-phases %standard-phases | |
10160 | (add-before 'configure 'generate-PackageVersion.java | |
10161 | (lambda _ | |
10162 | (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java") | |
10163 | (in (string-append out ".in"))) | |
10164 | (copy-file in out) | |
10165 | (newline) | |
10166 | (substitute* out | |
10167 | (("@package@") "com.fasterxml.jackson.dataformat.xml") | |
10168 | (("@projectversion@") ,version) | |
10169 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml") | |
2c8ac364 MW |
10170 | (("@projectartifactid@") "jackson-dataformat-xml"))) |
10171 | #t)) | |
262a4d33 JL |
10172 | (add-before 'build 'copy-resources |
10173 | (lambda _ | |
2c8ac364 MW |
10174 | (copy-recursively "src/main/resources" "build/classes") |
10175 | #t))))) | |
262a4d33 JL |
10176 | (inputs |
10177 | `(("jackson-annotations" ,java-fasterxml-jackson-annotations) | |
10178 | ("jackson-core" ,java-fasterxml-jackson-core) | |
10179 | ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb) | |
10180 | ("jackson-databind" ,java-fasterxml-jackson-databind) | |
10181 | ("stax2-api" ,java-stax2-api) | |
10182 | ("woodstox" ,java-woodstox-core))) | |
10183 | (native-inputs | |
10184 | `(("junit" ,java-junit) | |
10185 | ("hamcrest" ,java-hamcrest-core))) | |
10186 | (home-page "https://github.com/FasterXML/jackson-dataformat-xml") | |
10187 | (synopsis "Read and write XML") | |
10188 | (description "This package contains Jackson extension component for reading | |
10189 | and writing XML encoded data. | |
10190 | ||
10191 | Further, the goal is to emulate how JAXB data-binding works with \"Code-first\" | |
10192 | approach (that is, no support is added for \"Schema-first\" approach). Support | |
10193 | for JAXB annotations is provided by JAXB annotation module; this module | |
10194 | provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator}, | |
10195 | @code{JsonFactory}) as well as small number of higher level overrides needed to | |
10196 | make data-binding work.") | |
10197 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
90a127c7 JL |
10198 | |
10199 | (define-public java-hdrhistogram | |
10200 | (package | |
10201 | (name "java-hdrhistogram") | |
10202 | (version "2.1.9") | |
10203 | (source (origin | |
819ead35 EF |
10204 | (method git-fetch) |
10205 | (uri (git-reference | |
10206 | (url "https://github.com/HdrHistogram/HdrHistogram") | |
10207 | (commit (string-append "HdrHistogram-" version)))) | |
10208 | (file-name (git-file-name name version)) | |
90a127c7 JL |
10209 | (sha256 |
10210 | (base32 | |
819ead35 | 10211 | "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d")))) |
90a127c7 JL |
10212 | (build-system ant-build-system) |
10213 | (arguments | |
10214 | `(#:jar-name "java-hdrhistogram.jar" | |
10215 | #:source-dir "src/main/java" | |
10216 | #:phases | |
10217 | (modify-phases %standard-phases | |
819ead35 EF |
10218 | (add-after 'unpack 'make-files-writable |
10219 | (lambda _ | |
10220 | (for-each make-file-writable (find-files ".")) | |
10221 | #t)) | |
90a127c7 JL |
10222 | (add-before 'configure 'set-version |
10223 | (lambda _ | |
10224 | (let* ((version-java "src/main/java/org/HdrHistogram/Version.java") | |
10225 | (template (string-append version-java ".template"))) | |
10226 | (copy-file template version-java) | |
10227 | (substitute* version-java | |
10228 | (("\\$VERSION\\$") ,version) | |
10229 | (("\\$BUILD_TIME\\$") "0")) | |
10230 | #t)))))) | |
10231 | (native-inputs | |
10232 | `(("junit" ,java-junit) | |
10233 | ("hamcrest" ,java-hamcrest-core))) | |
10234 | (home-page "https://hdrhistogram.github.io/HdrHistogram") | |
10235 | (synopsis "High dynamic range histogram") | |
61fa3c67 | 10236 | (description "Hdrhistogram creates histograms that support |
90a127c7 JL |
10237 | recording and analyzing sampled data value counts across a configurable integer |
10238 | value range with configurable value precision within the range. Value precision | |
10239 | is expressed as the number of significant digits in the value recording, and | |
10240 | provides control over value quantization behavior across the value range and | |
10241 | the subsequent value resolution at any given level.") | |
10242 | (license license:public-domain))) | |
5d104a27 | 10243 | |
c5ff11dc RW |
10244 | (define-public java-cofoja |
10245 | (package | |
10246 | (name "java-cofoja") | |
10247 | (version "1.3") | |
10248 | (source (origin | |
10249 | (method git-fetch) | |
10250 | (uri (git-reference | |
b0e7b699 | 10251 | (url "https://github.com/nhatminhle/cofoja") |
c5ff11dc RW |
10252 | (commit (string-append "v" version)))) |
10253 | (file-name (string-append "java-cofoja-" version "-checkout")) | |
10254 | (sha256 | |
10255 | (base32 | |
10256 | "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w")))) | |
10257 | (build-system ant-build-system) | |
10258 | (arguments | |
10259 | `(#:build-target "dist" | |
10260 | #:test-target "test" | |
10261 | #:jdk ,icedtea-8 | |
10262 | #:make-flags | |
10263 | (list "-Ddist.dir=dist") | |
10264 | #:modules ((guix build ant-build-system) | |
10265 | (guix build java-utils) | |
10266 | (guix build utils) | |
10267 | (srfi srfi-1) | |
10268 | (ice-9 match)) | |
10269 | #:phases | |
10270 | (modify-phases %standard-phases | |
10271 | ;; The bulid system ignores the class path the ant-build-system sets | |
10272 | ;; up and instead expects to find all dependencies in the "lib" | |
10273 | ;; directory. | |
10274 | (add-after 'unpack 'create-libdir | |
10275 | (lambda* (#:key inputs #:allow-other-keys) | |
10276 | (mkdir-p "lib") | |
10277 | (for-each | |
10278 | (lambda (file) | |
10279 | (let ((target (string-append "lib/" (basename file)))) | |
10280 | (unless (file-exists? target) | |
10281 | (symlink file target)))) | |
10282 | (append-map (match-lambda | |
10283 | ((label . dir) | |
10284 | (find-files dir "\\.jar$"))) | |
10285 | inputs)) | |
10286 | #t)) | |
10287 | (replace 'install (install-jars "dist"))))) | |
10288 | (inputs | |
10289 | `(("java-asm" ,java-asm))) | |
10290 | (native-inputs | |
10291 | `(("java-junit" ,java-junit))) | |
10292 | (home-page "https://github.com/nhatminhle/cofoja") | |
10293 | (synopsis "Contracts for Java") | |
10294 | (description "Contracts for Java, or Cofoja for short, is a contract | |
10295 | programming framework and test tool for Java, which uses annotation processing | |
10296 | and bytecode instrumentation to provide run-time checking. (In particular, | |
10297 | this is not a static analysis tool.)") | |
10298 | (license license:lgpl3+))) | |
10299 | ||
5d104a27 JL |
10300 | (define-public java-aopalliance |
10301 | (package | |
10302 | (name "java-aopalliance") | |
10303 | (version "1.0") | |
10304 | (source (origin | |
10305 | (method git-fetch) | |
10306 | ;; Note: this git repository is not official, but contains the | |
10307 | ;; source code that is in the CVS repository. Downloading the | |
10308 | ;; tarball from sourceforge is undeterministic, and the cvs download | |
10309 | ;; fails. | |
10310 | (uri (git-reference | |
10311 | (url "https://github.com/hoverruan/aopalliance") | |
10312 | (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0"))) | |
10313 | (file-name (string-append name "-" version)) | |
10314 | (sha256 | |
10315 | (base32 | |
10316 | "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr")))) | |
10317 | (build-system ant-build-system) | |
10318 | (arguments | |
10319 | `(#:jar-name "java-aopalliance.jar" | |
10320 | #:jdk ,icedtea-8 | |
10321 | #:tests? #f; no tests | |
6671d6a1 JL |
10322 | #:source-dir "aopalliance/src/main" |
10323 | #:modules ((guix build ant-build-system) | |
10324 | (guix build utils) | |
10325 | (guix build maven pom) | |
10326 | (guix build java-utils) | |
10327 | (sxml simple)) | |
10328 | #:phases | |
10329 | (modify-phases %standard-phases | |
10330 | (add-before 'install 'create-pom | |
10331 | (lambda _ | |
10332 | (with-output-to-file "pom.xml" | |
10333 | (lambda _ | |
10334 | (sxml->xml | |
10335 | `((project | |
10336 | (modelVersion "4.0.0") | |
10337 | (name "aopalliance") | |
10338 | (groupId "aopalliance") | |
10339 | (artifactId "aopalliance") | |
10340 | (version "1.0")))))) | |
10341 | #t)) | |
10342 | (replace 'install | |
10343 | (install-from-pom "pom.xml"))))) | |
5d104a27 JL |
10344 | (home-page "http://aopalliance.sourceforge.net") |
10345 | (synopsis "Aspect-Oriented Programming") | |
10346 | (description "The AOP Alliance project is a joint project between several | |
10347 | software engineering people who are interested in Aspect-Oriented Programming | |
10348 | (AOP) and Java.") | |
10349 | (license license:public-domain))) | |
454536e0 JL |
10350 | |
10351 | (define-public java-javax-inject | |
10352 | (package | |
10353 | (name "java-javax-inject") | |
6671d6a1 | 10354 | (version "1") |
454536e0 | 10355 | (source (origin |
6671d6a1 JL |
10356 | (method git-fetch) |
10357 | (uri (git-reference | |
10358 | (url "https://github.com/javax-inject/javax-inject") | |
10359 | (commit version))) | |
10360 | (file-name (git-file-name name version)) | |
454536e0 JL |
10361 | (sha256 |
10362 | (base32 | |
6671d6a1 | 10363 | "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x")))) |
454536e0 JL |
10364 | (build-system ant-build-system) |
10365 | (arguments | |
10366 | `(#:jar-name "java-javax-inject.jar" | |
6671d6a1 JL |
10367 | #:tests? #f; no tests |
10368 | #:phases | |
10369 | (modify-phases %standard-phases | |
10370 | (replace 'install | |
10371 | (install-from-pom "pom.xml"))))) | |
702a1012 | 10372 | (home-page "https://github.com/javax-inject/javax-inject") |
454536e0 JL |
10373 | (synopsis "JSR-330: Dependency Injection for Java") |
10374 | (description "This package specifies a means for obtaining objects in such | |
10375 | a way as to maximize reusability, testability and maintainability compared to | |
10376 | traditional approaches such as constructors, factories, and service locators | |
10377 | (e.g., JNDI). This process, known as dependency injection, is beneficial to | |
10378 | most nontrivial applications. | |
10379 | ||
10380 | Many types depend on other types. For example, a @var{Stopwatch} might depend | |
10381 | on a @var{TimeSource}. The types on which a type depends are known as its | |
10382 | dependencies. The process of finding an instance of a dependency to use at run | |
10383 | time is known as resolving the dependency. If no such instance can be found, | |
10384 | the dependency is said to be unsatisfied, and the application is broken.") | |
10385 | (license license:asl2.0))) | |
5766984b JL |
10386 | |
10387 | (define-public java-guice | |
10388 | (package | |
10389 | (name "java-guice") | |
10390 | (version "4.1") | |
10391 | (source (origin | |
b176f69f EF |
10392 | (method git-fetch) |
10393 | (uri (git-reference | |
10394 | (url "https://github.com/google/guice") | |
10395 | (commit version))) | |
10396 | (file-name (git-file-name name version)) | |
9936ffe7 BH |
10397 | (modules '((guix build utils))) |
10398 | (snippet | |
10399 | `(begin | |
b176f69f | 10400 | (for-each delete-file (find-files "." ".*.jar")) #t)) |
5766984b JL |
10401 | (sha256 |
10402 | (base32 | |
b176f69f | 10403 | "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq")))) |
5766984b JL |
10404 | (build-system ant-build-system) |
10405 | (arguments | |
10406 | `(#:jar-name "java-guice.jar" | |
10407 | #:jdk ,icedtea-8 | |
10408 | #:tests? #f; FIXME: tests are not in a java sub directory | |
b176f69f EF |
10409 | #:source-dir "core/src" |
10410 | #:phases | |
10411 | (modify-phases %standard-phases | |
10412 | (add-after 'unpack 'make-files-writable | |
10413 | (lambda _ | |
10414 | (for-each make-file-writable (find-files ".")) | |
6671d6a1 JL |
10415 | #t)) |
10416 | (replace 'install | |
10417 | (install-from-pom "core/pom.xml"))))) | |
10418 | (propagated-inputs | |
10419 | `(("java-aopalliance" ,java-aopalliance) | |
10420 | ("java-asm" ,java-asm) | |
5766984b | 10421 | ("java-cglib" ,java-cglib) |
6671d6a1 | 10422 | ("java-guava" ,java-guava) |
5766984b | 10423 | ("java-javax-inject" ,java-javax-inject) |
6671d6a1 | 10424 | ("java-guice-parent-pom" ,java-guice-parent-pom))) |
5766984b JL |
10425 | (home-page "https://github.com/google/guice") |
10426 | (synopsis "Lightweight dependency injection framework") | |
b176f69f | 10427 | (description "Guice is a lightweight dependency injection framework for |
5766984b JL |
10428 | Java 6 and above.") |
10429 | (license license:asl2.0))) | |
ec4e8ad7 JL |
10430 | |
10431 | (define-public java-guice-servlet | |
10432 | (package | |
10433 | (inherit java-guice) | |
10434 | (name "java-guice-servlet") | |
10435 | (arguments | |
10436 | `(#:jar-name "guice-servlet.jar" | |
10437 | #:source-dir "extensions/servlet/src/" | |
10438 | #:jdk ,icedtea-8 | |
b176f69f EF |
10439 | #:tests? #f ; FIXME: not in a java subdir |
10440 | #:phases | |
10441 | (modify-phases %standard-phases | |
10442 | (add-after 'unpack 'make-files-writable | |
10443 | (lambda _ | |
10444 | (for-each make-file-writable (find-files ".")) | |
10445 | #t))))) | |
ec4e8ad7 JL |
10446 | (inputs |
10447 | `(("guice" ,java-guice) | |
10eddaca | 10448 | ("servlet" ,java-classpathx-servletapi) |
ec4e8ad7 | 10449 | ,@(package-inputs java-guice))))) |
b12fe1e5 | 10450 | |
6671d6a1 JL |
10451 | (define java-guice-parent-pom |
10452 | (package | |
10453 | (inherit java-guice) | |
10454 | (name "java-guice-parent-pom") | |
10455 | (arguments | |
10456 | `(#:tests? #f | |
10457 | #:phases | |
10458 | (modify-phases %standard-phases | |
10459 | (delete 'configure) | |
10460 | (delete 'build) | |
10461 | (add-after 'install 'install-extensions | |
10462 | (install-pom-file "extensions/pom.xml")) | |
10463 | (replace 'install | |
10464 | (install-pom-file "pom.xml"))))) | |
10465 | (propagated-inputs | |
10466 | `(("java-google-parent-pom" ,java-google-parent-pom-5))))) | |
10467 | ||
10468 | (define java-google-parent-pom-5 | |
10469 | (package | |
10470 | (name "java-google-parent-pom") | |
10471 | (version "5") | |
10472 | (source (origin | |
10473 | (method git-fetch) | |
10474 | (uri (git-reference | |
10475 | (url "https://github.com/google/google-maven-parents") | |
10476 | (commit (string-append "google-" version)))) | |
10477 | (file-name (git-file-name name version)) | |
10478 | (sha256 | |
10479 | (base32 | |
10480 | "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv")))) | |
10481 | (build-system ant-build-system) | |
10482 | (arguments | |
10483 | `(#:tests? #f | |
10484 | #:phases | |
10485 | (modify-phases %standard-phases | |
10486 | (delete 'configure) | |
10487 | (delete 'build) | |
10488 | (replace 'install | |
10489 | (install-pom-file "pom.xml"))))) | |
10490 | (home-page "https://github.com/google/google-maven-parents") | |
10491 | (synopsis "Google parent pom") | |
10492 | (description "This package contains the Maven parent POM for other Google | |
10493 | Java projects.") | |
10494 | (license license:asl2.0))) | |
10495 | ||
b12fe1e5 JL |
10496 | (define-public java-assertj |
10497 | (package | |
10498 | (name "java-assertj") | |
10499 | (version "3.8.0") | |
10500 | (source (origin | |
04ca89d8 EF |
10501 | (method git-fetch) |
10502 | (uri (git-reference | |
10503 | (url "https://github.com/joel-costigliola/assertj-core") | |
10504 | (commit (string-append "assertj-core-" version)))) | |
10505 | (file-name (git-file-name name version)) | |
b12fe1e5 JL |
10506 | (sha256 |
10507 | (base32 | |
04ca89d8 | 10508 | "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1")))) |
b12fe1e5 JL |
10509 | (build-system ant-build-system) |
10510 | (arguments | |
10511 | `(#:jar-name "java-assertj.jar" | |
10512 | #:jdk ,icedtea-8 | |
10513 | #:source-dir "src/main/java" | |
10514 | #:tests? #f)); depends on tng-junit which depends on assertj | |
10515 | (inputs | |
10516 | `(("cglib" ,java-cglib) | |
10517 | ("junit" ,java-junit) | |
10518 | ("hamcrest" ,java-hamcrest-core))) | |
10519 | (native-inputs | |
10520 | `(("mockito" ,java-mockito-1))) | |
10521 | (home-page "https://joel-costigliola.github.io/assertj/index.html") | |
10522 | (synopsis "Fluent assertions for java") | |
10523 | (description "AssertJ core is a Java library that provides a fluent | |
10524 | interface for writing assertions. Its main goal is to improve test code | |
10525 | readability and make maintenance of tests easier.") | |
10526 | (license license:asl2.0))) | |
6768e0a7 JL |
10527 | |
10528 | (define-public java-jboss-javassist | |
10529 | (package | |
10530 | (name "java-jboss-javassist") | |
10531 | (version "3.21.0") | |
10532 | (source (origin | |
8b408789 EF |
10533 | (method git-fetch) |
10534 | (uri (git-reference | |
10535 | (url "https://github.com/jboss-javassist/javassist") | |
10536 | (commit | |
10537 | (string-append "rel_" | |
10538 | (string-map | |
10539 | (lambda (x) (if (eq? x #\.) #\_ x)) version) | |
10540 | "_ga")))) | |
10541 | (file-name (git-file-name name version)) | |
6768e0a7 JL |
10542 | (sha256 |
10543 | (base32 | |
87ce1fc5 EF |
10544 | "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm")) |
10545 | (modules '((guix build utils))) | |
10546 | (snippet | |
10547 | '(begin | |
10548 | (delete-file "javassist.jar"))))) | |
6768e0a7 JL |
10549 | (build-system ant-build-system) |
10550 | (arguments | |
10551 | `(#:jar-name "java-jboss-javassist.jar" | |
10552 | #:jdk ,icedtea-8 | |
10553 | #:source-dir "src/main" | |
10554 | #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3 | |
10555 | #:phases | |
10556 | (modify-phases %standard-phases | |
8b408789 | 10557 | (add-after 'unpack 'make-files-writable |
6768e0a7 | 10558 | (lambda _ |
8b408789 | 10559 | (for-each make-file-writable (find-files ".")) |
6768e0a7 JL |
10560 | #t))))) |
10561 | (native-inputs | |
10562 | `(("junit" ,java-junit))) | |
10563 | (home-page "https://github.com/jboss-javassist/javassist") | |
10564 | (synopsis "Java bytecode engineering toolkit") | |
10565 | (description "Javassist (JAVA programming ASSISTant) makes Java bytecode | |
10566 | manipulation simple. It is a class library for editing bytecodes in Java; it | |
10567 | enables Java programs to define a new class at runtime and to modify a class | |
10568 | file when the JVM loads it.") | |
10569 | (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl. | |
a6dd06d0 JL |
10570 | |
10571 | (define-public java-jcommander | |
10572 | (package | |
10573 | (name "java-jcommander") | |
10574 | (version "1.71") | |
10575 | (source (origin | |
4e257acf EF |
10576 | (method git-fetch) |
10577 | (uri (git-reference | |
10578 | (url "https://github.com/cbeust/jcommander") | |
10579 | (commit version))) | |
10580 | (file-name (git-file-name name version)) | |
a6dd06d0 JL |
10581 | (sha256 |
10582 | (base32 | |
4e257acf | 10583 | "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57")))) |
a6dd06d0 JL |
10584 | (build-system ant-build-system) |
10585 | (arguments | |
10586 | `(#:jar-name "java-jcommander.jar" | |
10587 | #:jdk ,icedtea-8 | |
10588 | #:tests? #f; requires testng which depends on jcommander | |
10589 | #:source-dir "src/main/java")) | |
dcfdc908 | 10590 | (home-page "https://jcommander.org") |
a6dd06d0 JL |
10591 | (synopsis "Command line parameters parser") |
10592 | (description "JCommander is a very small Java framework that makes it | |
10593 | trivial to parse command line parameters. Parameters are declared with | |
10594 | annotations.") | |
10595 | (license license:asl2.0))) | |
11bc385b JL |
10596 | |
10597 | (define-public java-bsh | |
10598 | (package | |
10599 | (name "java-bsh") | |
10600 | (version "2.0b6") | |
10601 | (source (origin | |
3e51f9eb EF |
10602 | (method git-fetch) |
10603 | (uri (git-reference | |
10604 | (url "https://github.com/beanshell/beanshell") | |
10605 | (commit version))) | |
10606 | (file-name (git-file-name name version)) | |
11bc385b JL |
10607 | (sha256 |
10608 | (base32 | |
b8d977b1 JL |
10609 | "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw")) |
10610 | (modules '((guix build utils))) | |
10611 | (snippet | |
10612 | '(begin | |
10613 | ;; Delete bundled third-party jar archives. | |
10614 | (for-each delete-file (find-files "." ".*.jar$")) | |
10615 | (for-each (lambda (file) (chmod file #o644)) | |
10616 | (find-files "." ".")) | |
10617 | #t)))) | |
11bc385b JL |
10618 | (build-system ant-build-system) |
10619 | (arguments | |
10620 | `(#:build-target "jarall" | |
10621 | #:test-target "junit-tests-all" | |
c1fb0d8e | 10622 | #:make-flags (list "-DDATE" "(no date for reproducibility)") |
11bc385b JL |
10623 | #:phases |
10624 | (modify-phases %standard-phases | |
b8d977b1 JL |
10625 | (add-before 'install 'fix-pom |
10626 | (lambda _ | |
10627 | (substitute* "pom.xml" | |
10628 | (("org.apache-extras.beanshell") "org.beanshell")) | |
10629 | #t)) | |
11bc385b | 10630 | (replace 'install |
51087d51 | 10631 | (install-from-pom "pom.xml"))))) |
b8d977b1 JL |
10632 | (inputs |
10633 | `(("java-classpathx-servletapi" ,java-classpathx-servletapi) | |
10634 | ("java-commons-bsf" ,java-commons-bsf))) | |
10635 | (native-inputs | |
10636 | `(("java-junit" ,java-junit) | |
10637 | ("javacc" ,javacc-3))) | |
11bc385b JL |
10638 | (home-page "http://beanshell.org/") |
10639 | (synopsis "Lightweight Scripting for Java") | |
10640 | (description "BeanShell is a small, free, embeddable Java source | |
10641 | interpreter with object scripting language features, written in Java. | |
10642 | BeanShell dynamically executes standard Java syntax and extends it with common | |
10643 | scripting conveniences such as loose types, commands, and method closures like | |
10644 | those in Perl and JavaScript.") | |
10645 | (license license:asl2.0))) | |
7a343e97 JL |
10646 | |
10647 | (define-public java-fest-util | |
10648 | (package | |
10649 | (name "java-fest-util") | |
10650 | (version "1.2.5") | |
10651 | (source (origin | |
00f3190d EF |
10652 | (method git-fetch) |
10653 | (uri (git-reference | |
10654 | (url "https://github.com/alexruiz/fest-util/") | |
10655 | (commit (string-append "fest-util-" version)))) | |
10656 | (file-name (git-file-name name version)) | |
7a343e97 JL |
10657 | (sha256 |
10658 | (base32 | |
00f3190d | 10659 | "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz")))) |
7a343e97 JL |
10660 | (build-system ant-build-system) |
10661 | (arguments | |
10662 | `(#:jar-name "java-fest-util.jar" | |
10663 | #:source-dir "src/main/java")) | |
10664 | (native-inputs | |
10665 | `(("junit" ,java-junit) | |
10666 | ("hamcrest" ,java-hamcrest-core))) | |
10667 | (home-page "https://github.com/alexruiz/fest-util") | |
10668 | (synopsis "FEST common utilities") | |
10669 | (description "Common utilities used in all FEST module.") | |
10670 | (license license:asl2.0))) | |
3c6c8358 JL |
10671 | |
10672 | (define-public java-fest-test | |
10673 | (package | |
10674 | (name "java-fest-test") | |
10675 | (version "2.1.0") | |
10676 | (source (origin | |
79e74008 EF |
10677 | (method git-fetch) |
10678 | (uri (git-reference | |
10679 | (url "https://github.com/alexruiz/fest-test/") | |
10680 | (commit (string-append "fest-test-" version)))) | |
10681 | (file-name (git-file-name name version)) | |
3c6c8358 JL |
10682 | (sha256 |
10683 | (base32 | |
79e74008 | 10684 | "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn")))) |
3c6c8358 JL |
10685 | (build-system ant-build-system) |
10686 | (arguments | |
10687 | `(#:jar-name "java-fest-test.jar" | |
10688 | #:source-dir "src/main/java" | |
10689 | #:tests? #f)); no tests | |
10690 | (inputs | |
10691 | `(("junit" ,java-junit))) | |
10692 | (home-page "https://github.com/alexruiz/fest-test") | |
10693 | (synopsis "Common FEST testing infrastructure") | |
10694 | (description "Fest-test contains the common FEST testing infrastructure.") | |
10695 | (license license:asl2.0))) | |
ca98e448 JL |
10696 | |
10697 | (define-public java-fest-assert | |
10698 | (package | |
10699 | (name "java-fest-assert") | |
10700 | (version "2.0M10") | |
10701 | (source (origin | |
e9917c69 EF |
10702 | (method git-fetch) |
10703 | (uri (git-reference | |
10704 | (url "https://github.com/alexruiz/fest-assert-2.x/") | |
10705 | (commit (string-append "fest-assert-core-" version)))) | |
10706 | (file-name (git-file-name name version)) | |
ca98e448 JL |
10707 | (sha256 |
10708 | (base32 | |
e9917c69 | 10709 | "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by")))) |
ca98e448 JL |
10710 | (build-system ant-build-system) |
10711 | (arguments | |
10712 | `(#:jar-name "java-fest-assert.jar" | |
10713 | #:source-dir "src/main/java" | |
10714 | #:test-exclude | |
10715 | (list | |
10716 | "**/Abstract*.java" | |
10717 | "**/*BaseTest.java" | |
10718 | ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses | |
10719 | "**/MessageFormatter_format_Test.java" | |
10720 | "**/internal/*/*_assert*_Test.java"))) | |
10721 | (inputs | |
10722 | `(("java-fest-util" ,java-fest-util))) | |
10723 | (native-inputs | |
10724 | `(("java-junit" ,java-junit) | |
10725 | ("java-fest-test" ,java-fest-test) | |
10726 | ("java-hamcrest-core" ,java-hamcrest-core) | |
10727 | ("java-mockito" ,java-mockito-1) | |
10728 | ("java-cglib" ,java-cglib) | |
10729 | ("java-objenesis" ,java-objenesis) | |
10730 | ("java-asm" ,java-asm))) | |
10731 | (home-page "https://github.com/alexruiz/fest-assert-2.x") | |
10732 | (synopsis "FEST fluent assertions") | |
10733 | (description "FEST-Assert provides a fluent interface for assertions.") | |
10734 | (license license:asl2.0))) | |
0442d897 JL |
10735 | |
10736 | (define-public java-testng | |
10737 | (package | |
10738 | (name "java-testng") | |
3422e10e | 10739 | (version "6.14.3") |
0442d897 | 10740 | (source (origin |
36b39d16 RW |
10741 | (method git-fetch) |
10742 | (uri (git-reference | |
b0e7b699 | 10743 | (url "https://github.com/cbeust/testng") |
36b39d16 RW |
10744 | (commit version))) |
10745 | (file-name (string-append name "-" version "-checkout")) | |
0442d897 JL |
10746 | (sha256 |
10747 | (base32 | |
3422e10e | 10748 | "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv")))) |
0442d897 JL |
10749 | (build-system ant-build-system) |
10750 | (arguments | |
10751 | `(#:jdk ,icedtea-8; java.util.function | |
10752 | #:jar-name "java-testng.jar" | |
10753 | #:source-dir "src/main/java" | |
10754 | #:phases | |
10755 | (modify-phases %standard-phases | |
36b39d16 RW |
10756 | ;; FIXME: I don't know why these tests fail |
10757 | (add-after 'unpack 'delete-failing-tests | |
10758 | (lambda _ | |
10759 | (substitute* "src/test/resources/testng.xml" | |
10760 | (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "") | |
10761 | (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "")) | |
10762 | #t)) | |
10763 | ;; We don't have groovy | |
10764 | (add-after 'unpack 'delete-groovy-tests | |
10765 | (lambda _ | |
10766 | (delete-file-recursively "src/test/java/test/dependent/issue1648/") | |
10767 | (substitute* "src/test/resources/testng.xml" | |
10768 | (("<class name=\"test.dependent.issue1648.TestRunner\"/>") "")) | |
10769 | #t)) | |
0442d897 JL |
10770 | (add-before 'build 'copy-resources |
10771 | (lambda _ | |
10772 | (copy-recursively "src/main/resources" "build/classes") | |
10773 | #t)) | |
10774 | (add-before 'check 'copy-test-resources | |
10775 | (lambda _ | |
10776 | (copy-recursively "src/test/resources" "build/test-classes") | |
10777 | #t)) | |
10778 | (replace 'check | |
10779 | (lambda _ | |
2c8ac364 | 10780 | (invoke "ant" "compile-tests") |
0442d897 JL |
10781 | ;; we don't have groovy |
10782 | (substitute* "src/test/resources/testng.xml" | |
10783 | (("<class name=\"test.groovy.GroovyTest\" />") "")) | |
2c8ac364 MW |
10784 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") |
10785 | ":build/classes" | |
10786 | ":build/test-classes") | |
10787 | "-Dtest.resources.dir=src/test/resources" | |
10788 | "org.testng.TestNG" "src/test/resources/testng.xml")))))) | |
0442d897 JL |
10789 | (propagated-inputs |
10790 | `(("junit" ,java-junit) | |
10791 | ("java-jsr305" ,java-jsr305) | |
10792 | ("java-bsh" ,java-bsh) | |
10793 | ("java-jcommander" ,java-jcommander) | |
10794 | ("java-guice" ,java-guice) | |
10795 | ("snakeyaml" ,java-snakeyaml))) | |
10796 | (native-inputs | |
10797 | `(("guava" ,java-guava) | |
10798 | ("java-javax-inject" ,java-javax-inject) | |
10799 | ("java-hamcrest" ,java-hamcrest-all) | |
10800 | ("java-assertj" ,java-assertj) | |
36b39d16 | 10801 | ("java-mockito" ,java-mockito-1) |
0442d897 JL |
10802 | ("cglib" ,java-cglib) |
10803 | ("asm" ,java-asm) | |
10804 | ("aopalliance" ,java-aopalliance))) | |
c9010605 | 10805 | (home-page "https://testng.org") |
0442d897 JL |
10806 | (synopsis "Testing framework") |
10807 | (description "TestNG is a testing framework inspired from JUnit and NUnit | |
10808 | but introducing some new functionalities that make it more powerful and easier | |
10809 | to use.") | |
10810 | (license license:asl2.0))) | |
1717a7de JL |
10811 | |
10812 | (define-public java-jnacl | |
3e87923a RW |
10813 | (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9") |
10814 | (revision "2")) | |
10815 | (package | |
10816 | (name "java-jnacl") | |
10817 | (version (string-append "0.1.0-" revision "." (string-take commit 7))) | |
10818 | (source (origin | |
10819 | (method git-fetch) | |
10820 | (uri (git-reference | |
b0e7b699 | 10821 | (url "https://github.com/neilalexander/jnacl") |
3e87923a | 10822 | (commit commit))) |
6c34ad73 | 10823 | (file-name (git-file-name name version)) |
3e87923a RW |
10824 | (sha256 |
10825 | (base32 | |
10826 | "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb")))) | |
10827 | (build-system ant-build-system) | |
10828 | (arguments | |
8c7d32e0 | 10829 | `(#:jar-name "jnacl.jar" |
3e87923a RW |
10830 | #:source-dir "src/main/java" |
10831 | #:jdk ,icedtea-8 | |
10832 | #:phases | |
10833 | (modify-phases %standard-phases | |
10834 | (add-before 'build 'fix-tests | |
10835 | (lambda _ | |
10836 | (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java" | |
10837 | "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java") | |
10838 | (("assertions.Assertions") "assertions.api.Assertions")) | |
10839 | #t)) | |
10840 | (replace 'check | |
10841 | (lambda _ | |
10842 | (invoke "ant" "compile-tests") | |
10843 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
10844 | ":build/classes" | |
10845 | ":build/test-classes") | |
10846 | "org.testng.TestNG" "-testclass" | |
10847 | "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class") | |
10848 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
10849 | ":build/classes" | |
10850 | ":build/test-classes") | |
10851 | "org.testng.TestNG" "-testclass" | |
2c8ac364 | 10852 | "build/test-classes/com/neilalexander/jnacl/NaClTest.class")))))) |
3e87923a RW |
10853 | (native-inputs |
10854 | `(("java-testng" ,java-testng) | |
10855 | ("java-fest-util" ,java-fest-util) | |
10856 | ("java-fest-assert" ,java-fest-assert))) | |
10857 | (home-page "https://github.com/neilalexander/jnacl") | |
10858 | (synopsis "Java implementation of NaCl") | |
10859 | (description "Pure Java implementation of the NaCl: Networking and | |
1717a7de | 10860 | Cryptography library.") |
3e87923a | 10861 | (license license:bsd-2)))) |
eaf3cb7a JL |
10862 | |
10863 | (define-public java-mvel2 | |
10864 | (package | |
10865 | (name "java-mvel2") | |
10866 | (version "2.3.1") | |
10867 | (source (origin | |
10868 | (method url-fetch) | |
10869 | (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-" | |
10870 | version ".Final.tar.gz")) | |
10871 | (sha256 | |
10872 | (base32 | |
10873 | "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z")))) | |
10874 | (build-system ant-build-system) | |
10875 | (arguments | |
10876 | `(#:jar-name "mvel2.jar" | |
10877 | #:source-dir "src/main/java" | |
10878 | #:test-exclude | |
10879 | (list "**/Abstract*.java" | |
10880 | ;; Base class with no tests | |
10881 | "**/MVELThreadTest.java") | |
10882 | #:phases | |
10883 | (modify-phases %standard-phases | |
10884 | (add-after 'install 'install-bin | |
10885 | (lambda* (#:key outputs #:allow-other-keys) | |
10886 | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) | |
10887 | (mkdir-p bin) | |
10888 | (with-output-to-file (string-append bin "/mvel2") | |
10889 | (lambda _ | |
10890 | (display | |
10891 | (string-append | |
10892 | "#!" (which "bash") "\n" | |
10893 | "if [ \"$#\" -ne \"2\" ]; then\n" | |
10894 | "echo 'Usage: mvel2 <script> <out.dir>'\n" | |
10895 | "exit\n" | |
10896 | "fi\n" | |
10897 | "java -Dout.dir=$2 -cp " (getenv "CLASSPATH") | |
10898 | ":" (assoc-ref outputs "out") "/share/java/mvel2.jar" | |
10899 | " org.mvel2.sh.Main $1")))) | |
10900 | (chmod (string-append bin "/mvel2") #o755)) | |
10901 | #t))))) | |
10902 | (native-inputs | |
10903 | `(("junit" ,java-junit) | |
10904 | ("hamcrest" ,java-hamcrest-core))) | |
10905 | (home-page "https://github.com/mvel/mvel") | |
10906 | (synopsis "MVFLEX Expression Language") | |
10907 | (description "MVEL has largely been inspired by Java syntax, but has some | |
10908 | fundamental differences aimed at making it more efficient as an expression | |
10909 | language, such as operators that directly support collection, array and string | |
10910 | matching, as well as regular expressions. MVEL is used to evaluate expressions | |
10911 | written using Java syntax. | |
10912 | ||
10913 | In addition to the expression language, MVEL serves as a templating language for | |
10914 | configuration and string construction.") | |
10915 | (license license:asl2.0))) | |
d54d7d31 | 10916 | |
9e325e8c RW |
10917 | (define-public java-commons-jexl-2 |
10918 | (package | |
10919 | (name "java-commons-jexl") | |
10920 | (version "2.1.1") | |
10921 | (source (origin | |
10922 | (method url-fetch) | |
10923 | (uri (string-append "mirror://apache/commons/jexl/source/" | |
10924 | "commons-jexl-" version "-src.tar.gz")) | |
10925 | (sha256 | |
10926 | (base32 | |
10927 | "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz")))) | |
10928 | (build-system ant-build-system) | |
10929 | (arguments | |
10930 | `(#:jar-name "commons-jexl-2.jar" | |
10931 | #:jdk ,icedtea-8 | |
10932 | #:source-dir "src/main/java" | |
10933 | #:phases | |
10934 | (modify-phases %standard-phases | |
10935 | (add-before 'check 'disable-broken-tests | |
10936 | (lambda* (#:key inputs #:allow-other-keys) | |
10937 | (with-directory-excursion "src/test/java/org/apache/commons/jexl2/" | |
10938 | (substitute* "ArithmeticTest.java" | |
10939 | (("asserter.assertExpression\\(\"3 / 0\"") "//") | |
10940 | (("asserter.assertExpression\\(\"imanull") "//")) | |
10941 | ;; This test fails with "ambiguous method invocation" | |
10942 | (delete-file "CacheTest.java") | |
10943 | ;; This test doesn't have access to the temp directory | |
10944 | (substitute* "ClassCreatorTest.java" | |
10945 | (("java.io.tmpdir") "user.dir")) | |
10946 | ;; This test fails in trying to detect whether it can run. | |
10947 | (substitute* "ClassCreator.java" | |
10948 | (("boolean canRun =.*") "boolean canRun = false;\n")) | |
10949 | ;; ...and these tests depend on it. | |
10950 | (delete-file "scripting/JexlScriptEngineOptionalTest.java") | |
10951 | (delete-file "scripting/JexlScriptEngineTest.java")) | |
10952 | #t)) | |
10953 | (add-before 'build 'run-javacc | |
10954 | (lambda _ | |
10955 | (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/" | |
080d0b60 RW |
10956 | (invoke "java" "jjtree" "Parser.jjt") |
10957 | (invoke "java" "javacc" "Parser.jj")) | |
10958 | #t))))) | |
9e325e8c RW |
10959 | (inputs |
10960 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal))) | |
10961 | (native-inputs | |
10962 | `(("java-junit" ,java-junit) | |
10963 | ("java-hamcrest-core" ,java-hamcrest-core) | |
10964 | ("javacc" ,javacc-4))) | |
10965 | (home-page "https://commons.apache.org/proper/commons-jexl/") | |
10966 | (synopsis "Java Expression Language ") | |
10967 | (description "JEXL is a library intended to facilitate the implementation | |
10968 | of dynamic and scripting features in applications and frameworks written in | |
10969 | Java. JEXL implements an Expression Language based on some extensions to the | |
10970 | JSTL Expression Language supporting most of the constructs seen in | |
10971 | shell-script or ECMAScript. Its goal is to expose scripting features usable | |
10972 | by technical operatives or consultants working with enterprise platforms.") | |
10973 | (license license:asl2.0))) | |
10974 | ||
d54d7d31 JL |
10975 | (define-public java-lz4 |
10976 | (package | |
10977 | (name "java-lz4") | |
10978 | (version "1.4.0") | |
10979 | (source (origin | |
6632fc28 EF |
10980 | (method git-fetch) |
10981 | (uri (git-reference | |
10982 | (url "https://github.com/lz4/lz4-java") | |
10983 | (commit version))) | |
10984 | (file-name (git-file-name name version)) | |
d54d7d31 JL |
10985 | (sha256 |
10986 | (base32 | |
6632fc28 | 10987 | "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y")))) |
d54d7d31 JL |
10988 | (build-system ant-build-system) |
10989 | (arguments | |
10990 | `(#:jar-name "lz4.jar" | |
10991 | #:jdk ,icedtea-8 | |
10992 | #:source-dir "src/java:src/java-unsafe" | |
10993 | #:tests? #f; FIXME: requires more dependencies | |
10994 | #:phases | |
10995 | (modify-phases %standard-phases | |
6632fc28 EF |
10996 | (add-after 'unpack 'make-files-writable |
10997 | (lambda _ | |
10998 | (for-each make-file-writable (find-files ".")) | |
10999 | #t)) | |
d54d7d31 JL |
11000 | (add-before 'configure 'generate-source |
11001 | (lambda _ | |
11002 | (with-directory-excursion "src/build/source_templates" | |
1b6bc516 RW |
11003 | (invoke "mvel2" "../gen_sources.mvel" "../../java")) |
11004 | #t))))) | |
d54d7d31 JL |
11005 | (native-inputs |
11006 | `(("mvel" ,java-mvel2))) | |
11007 | (home-page "https://jpountz.github.io/lz4-java") | |
11008 | (synopsis "Compression algorithm") | |
11009 | (description "LZ4 - Java is a Java port of the popular lz4 compression | |
11010 | algorithms and xxHash hashing algorithm.") | |
11011 | (license license:asl2.0))) | |
62315865 | 11012 | |
50d70a72 | 11013 | (define-public java-bouncycastle |
62315865 | 11014 | (package |
50d70a72 | 11015 | (name "java-bouncycastle") |
7de292e9 | 11016 | (version "1.67") |
62315865 | 11017 | (source (origin |
a8f01c45 EF |
11018 | (method git-fetch) |
11019 | (uri (git-reference | |
11020 | (url "http://git.bouncycastle.org/repositories/bc-java") | |
11021 | ;(url "https://github.com/bcgit/bc-java") | |
11022 | (commit (string-append "r1rv" (substring version 2 4))))) | |
11023 | (file-name (git-file-name name version)) | |
62315865 JL |
11024 | (sha256 |
11025 | (base32 | |
7de292e9 | 11026 | "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz")) |
50d70a72 JL |
11027 | (modules '((guix build utils))) |
11028 | (snippet | |
11029 | '(begin | |
11030 | (for-each delete-file | |
11031 | (find-files "." "\\.jar$")) | |
11032 | #t)))) | |
62315865 JL |
11033 | (build-system ant-build-system) |
11034 | (arguments | |
50d70a72 | 11035 | `(#:jdk ,icedtea-8 |
0c68f7fd | 11036 | #:tests? #f |
62315865 JL |
11037 | #:phases |
11038 | (modify-phases %standard-phases | |
50d70a72 | 11039 | (replace 'build |
62315865 | 11040 | (lambda _ |
50d70a72 | 11041 | (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider") |
2c8ac364 | 11042 | (invoke "ant" "-f" "ant/jdk15+.xml" "build"))) |
0c68f7fd RW |
11043 | ;; FIXME: the tests freeze. |
11044 | ;; (replace 'check | |
11045 | ;; (lambda _ | |
11046 | ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test"))) | |
50d70a72 JL |
11047 | (replace 'install |
11048 | (install-jars "build/artifacts/jdk1.5/jars"))))) | |
11049 | (inputs | |
11050 | `(("java-javax-mail" ,java-javax-mail))) | |
31208367 JL |
11051 | (native-inputs |
11052 | `(("unzip" ,unzip) | |
50d70a72 JL |
11053 | ("junit" ,java-junit) |
11054 | ("java-native-access" ,java-native-access) | |
11055 | ("java-native-access-platform" ,java-native-access-platform))) | |
31208367 JL |
11056 | (home-page "https://www.bouncycastle.org") |
11057 | (synopsis "Cryptographic library") | |
50d70a72 JL |
11058 | (description "Bouncy Castle is a cryptographic library for the Java |
11059 | programming language.") | |
31208367 | 11060 | (license license:expat))) |
a53d9ac0 JL |
11061 | |
11062 | (define-public java-lmax-disruptor | |
11063 | (package | |
11064 | (name "java-lmax-disruptor") | |
11065 | (version "3.3.7") | |
11066 | (source (origin | |
11067 | (method url-fetch) | |
11068 | (uri (string-append "https://github.com/LMAX-Exchange/disruptor/" | |
11069 | "archive/" version ".tar.gz")) | |
11070 | (file-name (string-append name "-" version ".tar.gz")) | |
11071 | (sha256 | |
11072 | (base32 | |
11073 | "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g")))) | |
11074 | (build-system ant-build-system) | |
11075 | (arguments | |
11076 | `(#:jar-name "java-lmax-disruptor.jar" | |
11077 | #:jdk ,icedtea-8 | |
11078 | #:tests? #f)); tests hang | |
11079 | (inputs | |
11080 | `(("junit" ,java-junit) | |
11081 | ("java-hdrhistogram" ,java-hdrhistogram) | |
11082 | ("java-jmock" ,java-jmock) | |
11083 | ("java-jmock-legacy" ,java-jmock-legacy) | |
11084 | ("java-jmock-junit4" ,java-jmock-junit4) | |
11085 | ("java-hamcrest-all" ,java-hamcrest-all))) | |
11086 | (native-inputs | |
11087 | `(("cglib" ,java-cglib) | |
11088 | ("objenesis" ,java-objenesis) | |
11089 | ("asm" ,java-asm))) | |
11090 | (home-page "https://www.lmax.com/disruptor") | |
11091 | (synopsis "High performance inter-thread communication") | |
11092 | (description "LMAX Disruptor is a software pattern and software component | |
11093 | for high performance inter-thread communication that avoids the need for | |
11094 | message queues or resource locking.") | |
11095 | (license license:asl2.0))) | |
5619556b | 11096 | |
5e3abfc8 RW |
11097 | (define-public java-commons-bcel |
11098 | (package | |
11099 | (name "java-commons-bcel") | |
11100 | (version "6.1") | |
11101 | (source (origin | |
11102 | (method url-fetch) | |
11103 | (uri (string-append "mirror://apache/commons/bcel/source/bcel-" | |
11104 | version "-src.tar.gz")) | |
11105 | (sha256 | |
11106 | (base32 | |
11107 | "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy")))) | |
11108 | (build-system ant-build-system) | |
11109 | (arguments | |
11110 | `(#:jar-name "bcel.jar" | |
11111 | #:jdk ,icedtea-8 | |
11112 | #:source-dir "src/main/java" | |
11113 | #:test-dir "src/test/java" | |
11114 | ;; FIXME: Tests require the unpackaged jna. | |
11115 | #:tests? #f)) | |
11116 | (home-page "https://commons.apache.org/proper/commons-bcel/") | |
11117 | (synopsis "Byte code engineering library") | |
11118 | (description "The Byte Code Engineering Library (Apache Commons BCEL) is | |
11119 | intended to give users a convenient way to analyze, create, and | |
11120 | manipulate (binary) Java class files. Classes are represented by objects | |
11121 | which contain all the symbolic information of the given class: methods, fields | |
11122 | and byte code instructions, in particular. | |
11123 | ||
11124 | Such objects can be read from an existing file, be transformed by a | |
11125 | program (e.g. a class loader at run-time) and written to a file again. An | |
11126 | even more interesting application is the creation of classes from scratch at | |
11127 | run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful | |
11128 | if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format | |
11129 | of Java @code{.class} files.") | |
11130 | (license license:asl2.0))) | |
11131 | ||
5619556b JL |
11132 | (define-public java-xerial-core |
11133 | (package | |
11134 | (name "java-xerial-core") | |
11135 | (version "2.1") | |
11136 | (source (origin | |
11137 | (method url-fetch) | |
11138 | (uri (string-append "https://github.com/xerial/xerial-java/archive/" | |
11139 | version ".tar.gz")) | |
11140 | (file-name (string-append name "-" version ".tar.gz")) | |
11141 | (sha256 | |
11142 | (base32 | |
11143 | "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d")))) | |
11144 | (build-system ant-build-system) | |
11145 | (arguments | |
11146 | `(#:jar-name "xerial-core.jar" | |
11147 | #:source-dir "xerial-core/src/main/java" | |
11148 | #:test-dir "xerial-core/src/test" | |
11149 | #:phases | |
11150 | (modify-phases %standard-phases | |
11151 | (add-before 'build 'copy-resources | |
11152 | (lambda _ | |
11153 | (copy-recursively "xerial-core/src/main/resources" | |
11154 | "build/classes") | |
11155 | #t))))) | |
11156 | (native-inputs | |
11157 | `(("junit" ,java-junit) | |
11158 | ("hamcrest" ,java-hamcrest-core))) | |
11159 | (home-page "https://github.com/xerial/xerial-java") | |
f4548394 | 11160 | (synopsis "Data management libraries for Java") |
5619556b | 11161 | (description "Xerial is a set of data management libraries for the Java |
f4548394 | 11162 | programming language. The ultimate goal of the Xerial project is to manage |
5619556b JL |
11163 | everything as database, including class objects, text format data, data |
11164 | streams, etc.") | |
11165 | (license license:asl2.0))) | |
8d6a4815 JL |
11166 | |
11167 | (define-public java-powermock-reflect | |
11168 | (package | |
11169 | (name "java-powermock-reflect") | |
11170 | (version "1.7.3") | |
11171 | (source (origin | |
11172 | (method url-fetch) | |
11173 | (uri (string-append "https://github.com/powermock/powermock/" | |
11174 | "archive/powermock-" version ".tar.gz")) | |
11175 | (file-name (string-append name "-" version ".tar.gz")) | |
11176 | (sha256 | |
11177 | (base32 | |
11178 | "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy")) | |
11179 | (patches | |
11180 | (search-patches "java-powermock-fix-java-files.patch")))) | |
11181 | (build-system ant-build-system) | |
11182 | (arguments | |
11183 | `(#:jar-name "java-powermock-reflect.jar" | |
11184 | #:jdk ,icedtea-8 | |
11185 | #:source-dir "powermock-reflect/src/main/java" | |
11186 | #:test-dir "powermock-reflect/src/test")) | |
11187 | (inputs | |
11188 | `(("java-objenesis" ,java-objenesis))) | |
11189 | (native-inputs | |
11190 | `(("junit" ,java-junit) | |
11191 | ("cglib" ,java-cglib) | |
11192 | ("asm" ,java-asm) | |
11193 | ("hamcrest" ,java-hamcrest-core) | |
11194 | ("assertj" ,java-assertj))) | |
11195 | (home-page "https://github.com/powermock/powermock") | |
11196 | (synopsis "Mock library extension framework") | |
11197 | (description "PowerMock is a framework that extends other mock libraries | |
11198 | such as EasyMock with more powerful capabilities. PowerMock uses a custom | |
11199 | classloader and bytecode manipulation to enable mocking of static methods, | |
11200 | constructors, final classes and methods, private methods, removal of static | |
11201 | initializers and more. By using a custom classloader no changes need to be | |
11202 | done to the IDE or continuous integration servers which simplifies adoption.") | |
11203 | (license license:asl2.0))) | |
d4a4d5da JL |
11204 | |
11205 | (define-public java-powermock-core | |
11206 | (package | |
11207 | (inherit java-powermock-reflect) | |
11208 | (name "java-powermock-core") | |
11209 | (arguments | |
11210 | `(#:jar-name "java-powermock-core.jar" | |
11211 | #:source-dir "powermock-core/src/main/java" | |
11212 | #:test-dir "powermock-core/src/test" | |
11213 | #:tests? #f; requires powermock-api | |
59e0021c JL |
11214 | #:jdk ,icedtea-8 |
11215 | #:phases | |
11216 | (modify-phases %standard-phases | |
11217 | (add-before 'build 'copy-resources | |
11218 | (lambda _ | |
11219 | (copy-recursively "powermock-core/src/main/resources" | |
2c8ac364 MW |
11220 | "build/classes") |
11221 | #t))))) | |
d4a4d5da JL |
11222 | (inputs |
11223 | `(("reflect" ,java-powermock-reflect) | |
11224 | ("javassist" ,java-jboss-javassist))) | |
11225 | (native-inputs | |
11226 | `(("junit" ,java-junit) | |
11227 | ("assertj" ,java-assertj) | |
11228 | ("mockito" ,java-mockito-1))))) | |
2d5d65d7 JL |
11229 | |
11230 | (define-public java-powermock-api-support | |
11231 | (package | |
11232 | (inherit java-powermock-reflect) | |
11233 | (name "java-powermock-api-support") | |
11234 | (build-system ant-build-system) | |
11235 | (arguments | |
11236 | `(#:jar-name "java-powermock-api-support.jar" | |
11237 | #:jdk ,icedtea-8 | |
11238 | #:source-dir "powermock-api/powermock-api-support/src/main/java" | |
11239 | #:tests? #f)); no tests | |
11240 | (inputs | |
11241 | `(("core" ,java-powermock-core) | |
11242 | ("reflect" ,java-powermock-reflect))))) | |
6c21d46c JL |
11243 | |
11244 | (define-public java-powermock-modules-junit4-common | |
11245 | (package | |
11246 | (inherit java-powermock-reflect) | |
11247 | (name "java-powermock-modules-junit4-common") | |
11248 | (build-system ant-build-system) | |
11249 | (arguments | |
11250 | `(#:jar-name "java-powermock-modules-junit4-common.jar" | |
11251 | #:jdk ,icedtea-8 | |
11252 | #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java" | |
11253 | #:test-dir "powermock-modules/powermock-module-junit4-common/src/test")) | |
11254 | (inputs | |
11255 | `(("core" ,java-powermock-core) | |
11256 | ("easymock" ,java-easymock) | |
11257 | ("reflect" ,java-powermock-reflect) | |
11258 | ("hamcrest" ,java-hamcrest-core) | |
11259 | ("cglib" ,java-cglib))))) | |
33db1681 JL |
11260 | |
11261 | (define-public java-powermock-modules-junit4 | |
11262 | (package | |
11263 | (inherit java-powermock-reflect) | |
11264 | (name "java-powermock-modules-junit4") | |
11265 | (build-system ant-build-system) | |
11266 | (arguments | |
11267 | `(#:jar-name "java-powermock-modules-junit4.jar" | |
11268 | #:jdk ,icedtea-8 | |
11269 | #:source-dir "powermock-modules/powermock-module-junit4/src/main/java" | |
1124683d JL |
11270 | #:test-dir "powermock-modules/powermock-module-junit4/src/test" |
11271 | #:phases | |
11272 | (modify-phases %standard-phases | |
11273 | (add-before 'build 'fix-junit-detection | |
11274 | (lambda _ | |
11275 | ;; Our junit version is 4.12-SNAPSHOT | |
11276 | (substitute* (find-files "powermock-modules/powermock-module-junit4" | |
11277 | "PowerMockJUnit4MethodValidator.java") | |
2c8ac364 MW |
11278 | (("4.12") "4.12-SNAPSHOT")) |
11279 | #t))))) | |
33db1681 JL |
11280 | (inputs |
11281 | `(("core" ,java-powermock-core) | |
11282 | ("reflect" ,java-powermock-reflect) | |
11283 | ("common" ,java-powermock-modules-junit4-common) | |
11284 | ("cglib" ,java-cglib))) | |
11285 | (native-inputs | |
11286 | `(("easymock" ,java-easymock) | |
11287 | ("hamcrest" ,java-hamcrest-core) | |
11288 | ("objenesis" ,java-objenesis) | |
11289 | ("asm" ,java-asm) | |
11290 | ("junit" ,java-junit))))) | |
4d508975 JL |
11291 | |
11292 | (define-public java-powermock-api-easymock | |
11293 | (package | |
11294 | (inherit java-powermock-reflect) | |
11295 | (name "java-powermock-api-easymock") | |
11296 | (build-system ant-build-system) | |
11297 | (arguments | |
11298 | `(#:jar-name "java-powermock-api-easymock.jar" | |
11299 | #:jdk ,icedtea-8 | |
11300 | #:source-dir "powermock-api/powermock-api-easymock/src/main/java" | |
11301 | #:tests? #f; no tests | |
11302 | #:phases | |
11303 | (modify-phases %standard-phases | |
11304 | (add-before 'build 'fix-file | |
11305 | (lambda _ | |
11306 | ;; FIXME: This looks wrong, but it fixes a build error. | |
11307 | (with-directory-excursion "powermock-api/powermock-api-easymock" | |
11308 | (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java" | |
11309 | (("classLoader instanceof MockClassLoader") "false") | |
11310 | (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";"))) | |
11311 | #t))))) | |
11312 | (inputs | |
11313 | `(("core" ,java-powermock-core) | |
11314 | ("easymock" ,java-easymock) | |
11315 | ("reflect" ,java-powermock-reflect) | |
11316 | ("support" ,java-powermock-api-support) | |
11317 | ("cglib" ,java-cglib))))) | |
5fb3e822 JL |
11318 | |
11319 | (define-public java-jboss-jms-api-spec | |
11320 | (package | |
11321 | (name "java-jboss-jms-api-spec") | |
11322 | (version "2.0") | |
11323 | (source (origin | |
11324 | (method url-fetch) | |
11325 | (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/" | |
11326 | "archive/jboss-jms-api_" version | |
11327 | "_spec-1.0.1.Final.tar.gz")) | |
11328 | (sha256 | |
11329 | (base32 | |
11330 | "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m")))) | |
11331 | (build-system ant-build-system) | |
11332 | (arguments | |
11333 | `(#:jar-name "java-jboss-jms-api_spec.jar" | |
11334 | #:jdk ,icedtea-8 | |
11335 | #:source-dir "." | |
11336 | #:tests? #f)); no tests | |
11337 | (home-page "https://github.com/jboss/jboss-jms-api_spec") | |
11338 | (synopsis "Java Message Service API specification") | |
11339 | (description "Java Message Service (JMS) API is used to send messages | |
11340 | messages between two or more clients. It is a messaging standard that allows | |
11341 | application components to create, send, receive, and read messages.") | |
11342 | ; either gpl2 only with GPL Classpath Exception, or cddl. | |
11343 | (license (list license:gpl2 license:cddl1.0)))) | |
3ff47c66 JL |
11344 | |
11345 | (define-public java-mail | |
11346 | (package | |
11347 | (name "java-mail") | |
11348 | (version "1.6.0") | |
11349 | (source (origin | |
11350 | (method url-fetch) | |
11351 | (uri (string-append "https://github.com/javaee/javamail/archive/" | |
11352 | "JAVAMAIL-1_6_0.tar.gz")) | |
11353 | (sha256 | |
11354 | (base32 | |
11355 | "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92")))) | |
11356 | (build-system ant-build-system) | |
11357 | (arguments | |
11358 | `(#:jar-name "java-mail.jar" | |
11359 | #:jdk ,icedtea-8 | |
11360 | #:source-dir "mail/src/main/java" | |
11361 | #:test-dir "mail/src/test" | |
11362 | #:test-exclude | |
11363 | (list "**/CollectorFormatterTest.java" | |
11364 | "**/CompactFormatterTest.java" | |
11365 | "**/DurationFilterTest.java" | |
11366 | "**/MailHandlerTest.java" | |
11367 | "**/GetLocalAddressTest.java" | |
11368 | ;; FIXME: both end with: | |
11369 | ;; java.lang.ClassNotFoundException: | |
11370 | ;; javax.mail.internet.MimeMultipartParseTest | |
11371 | "**/MimeMultipartParseTest.java" | |
11372 | "**/SearchTermSerializationTest.java") | |
11373 | #:phases | |
11374 | (modify-phases %standard-phases | |
11375 | (add-before 'configure 'move-version.java | |
11376 | (lambda _ | |
11377 | (copy-file "mail/src/main/resources/javax/mail/Version.java" | |
218d1dde RW |
11378 | "mail/src/main/java/javax/mail/Version.java") |
11379 | #t)) | |
3ff47c66 JL |
11380 | (add-before 'build 'copy-resources |
11381 | (lambda _ | |
11382 | (copy-recursively "mail/src/main/resources/META-INF" | |
11383 | "build/classes/META-INF") | |
11384 | #t))))) | |
11385 | (native-inputs | |
11386 | `(("junit" ,java-junit) | |
11387 | ("hamcrest" ,java-hamcrest-core))) | |
11388 | (home-page "https://javaee.github.io/javamail/") | |
7230f6d5 | 11389 | (synopsis "Mail-related functionality in Java") |
3ff47c66 JL |
11390 | (description "The JavaMail API provides a platform-independent and |
11391 | protocol-independent framework to build mail and messaging applications.") | |
11392 | ;; General Public License Version 2 only ("GPL") or the Common Development | |
11393 | ;; and Distribution License("CDDL") | |
11394 | (license (list license:cddl1.1 | |
11395 | license:gpl2)))); with classpath exception | |
217b20e4 JL |
11396 | |
11397 | (define-public java-jeromq | |
11398 | (package | |
11399 | (name "java-jeromq") | |
4aa0a1df | 11400 | (version "0.4.3") |
217b20e4 | 11401 | (source (origin |
4aa0a1df RW |
11402 | (method git-fetch) |
11403 | (uri (git-reference | |
b0e7b699 | 11404 | (url "https://github.com/zeromq/jeromq") |
4aa0a1df RW |
11405 | (commit (string-append "v" version)))) |
11406 | (file-name (string-append name "-" version "-checkout")) | |
217b20e4 JL |
11407 | (sha256 |
11408 | (base32 | |
594bd3a0 GB |
11409 | "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj")) |
11410 | (patches (search-patches "java-jeromq-fix-tests.patch")))) | |
217b20e4 JL |
11411 | (build-system ant-build-system) |
11412 | (arguments | |
11413 | `(#:jar-name "java-jeromq.jar" | |
11414 | #:source-dir "src/main/java" | |
11415 | #:jdk ,icedtea-8 | |
11416 | #:test-exclude | |
11417 | (list | |
11418 | "**/Abstract*.java" | |
11419 | ;; Requires network | |
11420 | "**/ZBeaconTest.java" | |
11421 | ;; Failures | |
4aa0a1df | 11422 | "**/DealerSpecTest.java" |
217b20e4 | 11423 | "**/CustomDecoderTest.java" |
594bd3a0 GB |
11424 | "**/CustomEncoderTest.java" |
11425 | "**/ConnectRidTest.java" | |
11426 | "**/ReqSpecTest.java" | |
11427 | "**/PushPullSpecTest.java" | |
11428 | "**/PubSubHwmTest.java" | |
11429 | "**/RouterSpecTest.java" | |
11430 | "**/ProxyTest.java"))) | |
217b20e4 JL |
11431 | (inputs |
11432 | `(("java-jnacl" ,java-jnacl))) | |
11433 | (native-inputs | |
11434 | `(("java-hamcrest-core" ,java-hamcrest-core) | |
11435 | ("junit" ,java-junit))) | |
11436 | (home-page "http://zeromq.org/bindings:java") | |
11437 | (synopsis "Java binding for 0MQ") | |
11438 | (description "Jeromq provides the java bindings for 0MQ.") | |
11439 | (license license:mpl2.0))) | |
46c6905a JL |
11440 | |
11441 | (define-public java-kafka-clients | |
11442 | (package | |
11443 | (name "java-kafka-clients") | |
11444 | (version "1.0.0") | |
11445 | (source (origin | |
11446 | (method url-fetch) | |
11447 | (uri (string-append "mirror://apache/kafka/" version "/kafka-" | |
11448 | version "-src.tgz")) | |
11449 | (sha256 | |
11450 | (base32 | |
11451 | "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq")))) | |
11452 | (build-system ant-build-system) | |
11453 | (arguments | |
11454 | `(#:jar-name "java-kafka-clients.jar" | |
11455 | #:jdk ,icedtea-8 | |
11456 | #:source-dir "clients/src/main/java" | |
11457 | #:test-dir "clients/src/test" | |
11458 | #:test-exclude | |
11459 | (list | |
11460 | ;; This file does not contain a class | |
11461 | "**/IntegrationTest.java" | |
11462 | ;; Requires network | |
11463 | "**/ClientUtilsTest.java" | |
11464 | ;; End with errors that seem related to our powermock | |
11465 | "**/KafkaProducerTest.java" | |
11466 | "**/BufferPoolTest.java"))) | |
11467 | (inputs | |
11468 | `(("java-slf4j-api" ,java-slf4j-api) | |
11469 | ("java-lz4" ,java-lz4))) | |
11470 | (native-inputs | |
11471 | `(("junit" ,java-junit) | |
11472 | ("hamcrest" ,java-hamcrest-all) | |
11473 | ("objenesis" ,java-objenesis) | |
11474 | ("asm" ,java-asm) | |
11475 | ("cglib" ,java-cglib) | |
11476 | ("javassist" ,java-jboss-javassist) | |
11477 | ("snappy" ,java-snappy) | |
11478 | ("easymock" ,java-easymock) | |
11479 | ("powermock" ,java-powermock-core) | |
11480 | ("powermock-easymock" ,java-powermock-api-easymock) | |
11481 | ("powermock-junit4-common" ,java-powermock-modules-junit4-common) | |
11482 | ("powermock-junit4" ,java-powermock-modules-junit4) | |
11483 | ("powermock-support" ,java-powermock-api-support) | |
50d70a72 | 11484 | ("java-bouncycastle" ,java-bouncycastle))) |
46c6905a JL |
11485 | (home-page "https://kafka.apache.org") |
11486 | (synopsis "Distributed streaming platform") | |
11487 | (description "Kafka is a distributed streaming platform, which means: | |
11488 | @itemize | |
11489 | @item it can publish and subscribe to streams of records; | |
11490 | @item it can store streams of records in a fault-tolerant way; | |
11491 | @item it can process streams of records as they occur. | |
11492 | @end itemize") | |
11493 | ;; Either cddl or gpl2 only. | |
11494 | (license (list license:cddl1.1; actually cddl1.1 | |
11495 | license:gpl2)))); with classpath exception | |
0b54e190 JL |
11496 | |
11497 | (define-public java-jdom | |
11498 | (package | |
11499 | (name "java-jdom") | |
11500 | (version "1.1.3") | |
11501 | (source (origin | |
11502 | (method url-fetch) | |
11503 | (uri (string-append "http://jdom.org/dist/binary/archive/jdom-" | |
11504 | version ".tar.gz")) | |
11505 | (sha256 | |
11506 | (base32 | |
11507 | "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl")))) | |
11508 | (build-system ant-build-system) | |
11509 | (arguments | |
11510 | `(#:build-target "package" | |
11511 | #:tests? #f; tests are run as part of the build process | |
11512 | #:phases | |
11513 | (modify-phases %standard-phases | |
11514 | (replace 'install | |
11515 | (install-jars "build"))))) | |
11516 | (home-page "http://jdom.org/") | |
11517 | (synopsis "Access, manipulate, and output XML data") | |
11518 | (description "Java-based solution for accessing, manipulating, and | |
11519 | outputting XML data from Java code.") | |
11520 | (license license:bsd-4))) | |
78745d33 JL |
11521 | |
11522 | (define-public java-geronimo-xbean-reflect | |
11523 | (package | |
11524 | (name "java-geronimo-xbean-reflect") | |
11525 | (version "4.5") | |
11526 | (source (origin | |
11527 | (method svn-fetch) | |
11528 | (uri (svn-reference | |
11529 | (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/") | |
11530 | (revision 1807396))) | |
11531 | (file-name (string-append name "-" version)) | |
11532 | (sha256 | |
11533 | (base32 | |
11534 | "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja")))) | |
11535 | (build-system ant-build-system) | |
11536 | (arguments | |
11537 | `(#:jar-name "geronimo-xbean-reflect.jar" | |
11538 | #:source-dir "xbean-reflect/src/main/java" | |
11539 | #:test-dir "xbean-reflect/src/test" | |
11540 | #:jdk ,icedtea-8 | |
11541 | #:test-exclude | |
11542 | (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java" | |
11543 | "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java" | |
11544 | "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java") | |
11545 | #:phases | |
11546 | (modify-phases %standard-phases | |
11547 | (add-before 'build 'fix-source | |
11548 | (lambda _ | |
11549 | (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/")) | |
11550 | ;; org.apache.xbean.asm6 is actually repackaged java-asm | |
11551 | (substitute* (string-append dir "XbeanAsmParameterNameLoader.java") | |
11552 | (("org.apache.xbean.asm5") "org.objectweb.asm")) | |
02ed96dc JL |
11553 | #t))) |
11554 | (replace 'install (install-from-pom "xbean-reflect/pom.xml"))))) | |
78745d33 JL |
11555 | (inputs |
11556 | `(("asm" ,java-asm) | |
11557 | ("log4j" ,java-log4j-api) | |
11558 | ("log4j-1.2" ,java-log4j-1.2-api) | |
11559 | ("log4j-core" ,java-log4j-core) | |
11560 | ("logging" ,java-commons-logging-minimal))) | |
02ed96dc JL |
11561 | (propagated-inputs |
11562 | `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom))) | |
78745d33 JL |
11563 | (native-inputs |
11564 | `(("junit" ,java-junit))) | |
11565 | (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/") | |
11566 | (synopsis "Dependency injection helper") | |
11567 | (description "Xbean-reflect provides very flexible ways to create objects | |
11568 | and graphs of objects for dependency injection frameworks") | |
11569 | (license license:asl2.0))) | |
09c44196 | 11570 | |
02ed96dc JL |
11571 | (define java-geronimo-genesis-2.1 |
11572 | (package | |
11573 | (name "java-geronimo-genesis") | |
11574 | (version "2.1") | |
11575 | (source (origin | |
11576 | (method svn-fetch) | |
11577 | (uri (svn-reference | |
11578 | (url (string-append "https://svn.apache.org/repos/asf/" | |
11579 | "geronimo/genesis/tags/genesis-" | |
11580 | version)) | |
11581 | (revision 1807396))) | |
11582 | (file-name (string-append name "-" version "-source")) | |
11583 | (sha256 | |
11584 | (base32 | |
11585 | "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31")))) | |
11586 | (build-system ant-build-system) | |
11587 | (arguments | |
11588 | `(#:tests? #f | |
11589 | #:phases | |
11590 | (modify-phases %standard-phases | |
11591 | (delete 'configure) | |
11592 | (delete 'build) | |
11593 | (replace 'install | |
11594 | (install-pom-file "pom.xml")) | |
11595 | (add-after 'install 'install-enforcer-rules | |
11596 | (install-pom-file "genesis-enforcer-rules/pom.xml")) | |
11597 | (add-after 'install 'install-flava | |
11598 | (install-pom-file "genesis-default-flava/pom.xml")) | |
11599 | (add-after 'install 'install-packaging | |
11600 | (install-pom-file "genesis-packaging/pom.xml")) | |
11601 | (add-after 'install-flava 'install-flava-java4 | |
11602 | (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml")) | |
11603 | (add-after 'install-flava 'install-flava-java5 | |
11604 | (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml")) | |
11605 | (add-after 'install-flava 'install-flava-java6 | |
11606 | (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml"))))) | |
11607 | (propagated-inputs | |
11608 | `(("apache-parent-pom" ,apache-parent-pom-13))) | |
11609 | (home-page "https://geronimo.apache.org") | |
11610 | (synopsis "Collection of maven POM files for the Geronimo project") | |
11611 | (description "Apache Geronimo is a server runtime. This package contains | |
11612 | only pom files used by other components in the Geronimo project.") | |
11613 | (license license:asl2.0))) | |
11614 | ||
11615 | (define java-geronimo-parent-pom | |
11616 | (package | |
11617 | (inherit java-geronimo-xbean-reflect) | |
11618 | (name "java-geronimo-parent-pom") | |
11619 | (arguments | |
11620 | `(#:tests? #f | |
11621 | #:phases | |
11622 | (modify-phases %standard-phases | |
11623 | (delete 'configure) | |
11624 | (delete 'build) | |
11625 | (replace 'install | |
11626 | (install-pom-file "pom.xml"))))) | |
11627 | (propagated-inputs | |
11628 | `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1))))) | |
11629 | ||
3fda539b JL |
11630 | (define-public java-geronimo-xbean-bundleutils |
11631 | (package | |
11632 | (inherit java-geronimo-xbean-reflect) | |
11633 | (name "java-geronimo-xbean-bundleutils") | |
11634 | (arguments | |
11635 | `(#:jar-name "geronimo-xbean-bundleutils.jar" | |
11636 | #:source-dir "xbean-bundleutils/src/main/java" | |
11637 | #:test-dir "xbean-bundleutils/src/test" | |
11638 | #:phases | |
11639 | (modify-phases %standard-phases | |
11640 | (add-before 'build 'fix-java | |
11641 | (lambda _ | |
11642 | ;; We use a more recent version of osgi, so this file requires | |
11643 | ;; more interface method implementations. | |
11644 | (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java" | |
11645 | (("import org.osgi.framework.ServiceRegistration;") | |
11646 | "import org.osgi.framework.ServiceRegistration; | |
11647 | import org.osgi.framework.ServiceFactory; | |
11648 | import java.util.Collection; | |
11649 | import org.osgi.framework.ServiceObjects;") | |
11650 | (("public Bundle getBundle\\(\\)") | |
11651 | "@Override | |
11652 | public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) { | |
11653 | throw new UnsupportedOperationException(); | |
11654 | } | |
11655 | @Override | |
11656 | public <S> ServiceRegistration<S> registerService(Class<S> clazz, | |
11657 | ServiceFactory<S> factory, Dictionary<String, ?> properties) { | |
11658 | throw new UnsupportedOperationException(); | |
11659 | } | |
11660 | public Bundle getBundle()")) | |
11661 | #t))))) | |
11662 | (inputs | |
11663 | `(("java-slf4j" ,java-slf4j-api) | |
11664 | ("java-asm" ,java-asm) | |
11665 | ("java-osgi-framework" ,java-osgi-framework) | |
11666 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
11667 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin))))) | |
6671d6a1 | 11668 | |
0cb9ce32 JL |
11669 | (define-public java-geronimo-xbean-asm-util |
11670 | (package | |
11671 | (inherit java-geronimo-xbean-reflect) | |
11672 | (name "java-geronimo-xbean-asm-util") | |
11673 | (arguments | |
11674 | `(#:jar-name "geronimo-xbean-asm-util.jar" | |
11675 | #:source-dir "xbean-asm-util/src/main/java" | |
11676 | #:tests? #f)); no tests | |
11677 | (inputs | |
11678 | `(("java-asm" ,java-asm))) | |
11679 | (native-inputs '()))) | |
6671d6a1 | 11680 | |
8d510f65 JL |
11681 | (define-public java-geronimo-xbean-finder |
11682 | (package | |
11683 | (inherit java-geronimo-xbean-reflect) | |
11684 | (name "java-geronimo-xbean-finder") | |
11685 | (arguments | |
11686 | `(#:jar-name "geronimo-xbean-finder.jar" | |
11687 | #:source-dir "xbean-finder/src/main/java" | |
11688 | #:test-dir "xbean-finder/src/test")) | |
11689 | (inputs | |
11690 | `(("java-slf4j-api" ,java-slf4j-api) | |
11691 | ("java-asm" ,java-asm) | |
11692 | ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils) | |
11693 | ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util) | |
11694 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin) | |
11695 | ("java-osgi-framework" ,java-osgi-framework))) | |
11696 | (native-inputs | |
11697 | `(("java-junit" ,java-junit) | |
11698 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
3fda539b | 11699 | |
09c44196 JL |
11700 | (define-public java-gson |
11701 | (package | |
11702 | (name "java-gson") | |
11703 | (version "2.8.2") | |
11704 | (source (origin | |
11705 | (method url-fetch) | |
11706 | (uri (string-append "https://github.com/google/gson/archive/" | |
11707 | "gson-parent-" version ".tar.gz")) | |
11708 | (sha256 | |
11709 | (base32 | |
11710 | "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9")))) | |
11711 | (build-system ant-build-system) | |
11712 | (arguments | |
11713 | `(#:jar-name "gson.jar" | |
11714 | #:source-dir "gson/src/main/java" | |
11715 | #:test-dir "gson/src/test")) | |
11716 | (native-inputs | |
11717 | `(("java-junit" ,java-junit) | |
11718 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
11719 | (home-page "https://github.com/google/gson") | |
11720 | (synopsis "Java serialization/deserialization library from/to JSON") | |
11721 | (description "Gson is a Java library that can be used to convert Java | |
11722 | Objects into their JSON representation. It can also be used to convert a JSON | |
11723 | string to an equivalent Java object. Gson can work with arbitrary Java objects | |
11724 | including pre-existing objects that you do not have source-code of.") | |
11725 | (license license:asl2.0))) | |
335aa20b JL |
11726 | |
11727 | (define-public java-hawtjni | |
11728 | (package | |
11729 | (name "java-hawtjni") | |
11730 | (version "1.15") | |
11731 | (source (origin | |
11732 | (method url-fetch) | |
11733 | (uri (string-append "https://github.com/fusesource/hawtjni/archive/" | |
11734 | "hawtjni-project-" version ".tar.gz")) | |
11735 | (sha256 | |
11736 | (base32 | |
11737 | "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g")))) | |
11738 | (build-system ant-build-system) | |
11739 | (arguments | |
11740 | `(#:jar-name "hawtjni.jar" | |
11741 | #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java" | |
11742 | #:tests? #f; no tests | |
11743 | #:phases | |
11744 | (modify-phases %standard-phases | |
11745 | (add-before 'build 'build-native | |
11746 | (lambda* (#:key inputs #:allow-other-keys) | |
6338ea9a RW |
11747 | (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))) |
11748 | (with-directory-excursion "hawtjni-generator/src/main/resources/" | |
11749 | (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o" | |
11750 | "-fPIC" "-O2" include) | |
11751 | (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o" | |
11752 | "-fPIC" "-O2" include) | |
11753 | (invoke "gcc" "-o" "libhawtjni.so" "-shared" | |
11754 | "hawtjni.o" "hawtjni-callback.o"))) | |
11755 | #t)) | |
335aa20b JL |
11756 | (add-after 'install 'install-native |
11757 | (lambda* (#:key outputs #:allow-other-keys) | |
11758 | (let* ((out (assoc-ref outputs "out")) | |
11759 | (lib (string-append out "/lib")) | |
11760 | (inc (string-append out "/include"))) | |
335aa20b | 11761 | (with-directory-excursion "hawtjni-generator/src/main/resources/" |
6338ea9a RW |
11762 | (install-file "libhawtjni.so" lib) |
11763 | (install-file "hawtjni.h" inc))) | |
b777e194 JL |
11764 | #t)) |
11765 | (add-before 'install 'install-parent | |
11766 | (install-pom-file "pom.xml")) | |
11767 | (replace 'install | |
11768 | (install-from-pom "hawtjni-runtime/pom.xml"))))) | |
335aa20b JL |
11769 | (inputs |
11770 | `(("java-commons-cli" ,java-commons-cli) | |
11771 | ("java-asm" ,java-asm) | |
11772 | ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder))) | |
11773 | (home-page "https://fusesource.github.io/hawtjni/") | |
11774 | (synopsis "JNI code generator") | |
11775 | (description "HawtJNI is a code generator that produces the JNI code needed | |
11776 | to implement Java native methods. It is based on the jnigen code generator | |
11777 | that is part of the SWT Tools project.") | |
11778 | (license license:asl2.0))) | |
d0c62afa JL |
11779 | |
11780 | (define-public java-jansi-native | |
11781 | (package | |
11782 | (name "java-jansi-native") | |
11783 | (version "1.7") | |
11784 | (source (origin | |
11785 | (method url-fetch) | |
11786 | (uri (string-append "https://github.com/fusesource/jansi-native/" | |
11787 | "archive/jansi-native-" version ".tar.gz")) | |
11788 | (sha256 | |
11789 | (base32 | |
11790 | "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf")))) | |
11791 | (build-system ant-build-system) | |
11792 | (arguments | |
11793 | `(#:jar-name "jansi-native.jar" | |
11794 | #:source-dir "src/main/java" | |
11795 | #:tests? #f; no tests | |
11796 | #:phases | |
11797 | (modify-phases %standard-phases | |
11798 | (add-before 'build 'build-native | |
11799 | (lambda* (#:key inputs #:allow-other-keys) | |
11800 | ;; there are more required files for windows in windows/ | |
11801 | (with-directory-excursion "src/main/native-package/src" | |
11802 | (substitute* "jansi_ttyname.c" | |
11803 | (("#include \"jansi_.*") "")) | |
e85c1bf6 RW |
11804 | (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o" |
11805 | (string-append "-I" (assoc-ref inputs "java-hawtjni") | |
11806 | "/include") | |
11807 | (string-append "-I" (assoc-ref inputs "jdk") | |
11808 | "/include/linux") | |
11809 | "-fPIC" "-O2") | |
2c8ac364 | 11810 | (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")))) |
d0c62afa JL |
11811 | (add-before 'build 'install-native |
11812 | (lambda _ | |
11813 | (let ((dir (string-append "build/classes/META-INF/native/" | |
11814 | ,(match (%current-system) | |
11815 | ((or "i686-linux" "armhf-linux") | |
11816 | "linux32") | |
3c4103c8 LC |
11817 | ((or "x86_64-linux" "aarch64-linux" |
11818 | "mips64el-linux") | |
9820d6ed JN |
11819 | "linux64") |
11820 | (_ "unknown-kernel"))))) | |
d0c62afa JL |
11821 | (install-file "src/main/native-package/src/libjansi.so" dir)) |
11822 | #t)) | |
11823 | (add-after 'install 'install-native | |
11824 | (lambda* (#:key outputs #:allow-other-keys) | |
d0c62afa JL |
11825 | (install-file "src/main/native-package/src/jansi.h" |
11826 | (string-append (assoc-ref outputs "out") "/include")) | |
b777e194 JL |
11827 | #t)) |
11828 | (add-before 'install 'fix-pom | |
11829 | (lambda _ | |
11830 | ;; pom contains variables to complete name, but we don't support that | |
11831 | (substitute* "pom.xml" | |
11832 | (("\\$\\{platform\\}") "native")) | |
11833 | #t)) | |
11834 | (replace 'install | |
11835 | (install-from-pom "pom.xml"))))) | |
11836 | (propagated-inputs | |
d0c62afa JL |
11837 | `(("java-hawtjni" ,java-hawtjni))) |
11838 | (home-page "https://fusesource.github.io/jansi/") | |
11839 | (synopsis "Native library for jansi") | |
3d6925ef RW |
11840 | (description "This package provides the native library for jansi, a small |
11841 | Java library that allows you to use ANSI escape sequences to format your | |
11842 | console output.") | |
d0c62afa | 11843 | (license license:asl2.0))) |
a87ea1ad JL |
11844 | |
11845 | (define-public java-jansi | |
11846 | (package | |
11847 | (name "java-jansi") | |
11848 | (version "1.16") | |
11849 | (source (origin | |
11850 | (method url-fetch) | |
11851 | (uri (string-append "https://github.com/fusesource/jansi/archive/" | |
11852 | "jansi-project-" version ".tar.gz")) | |
11853 | (sha256 | |
11854 | (base32 | |
11855 | "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z")))) | |
11856 | (build-system ant-build-system) | |
11857 | (arguments | |
11858 | `(#:jar-name "jansi.jar" | |
11859 | #:source-dir "jansi/src/main/java" | |
11860 | #:test-dir "jansi/src/test" | |
11861 | #:phases | |
11862 | (modify-phases %standard-phases | |
11863 | (add-after 'check 'clear-term | |
11864 | (lambda _ | |
b777e194 JL |
11865 | (invoke "echo" "-e" "\\e[0m"))) |
11866 | (add-before 'install 'install-parent | |
11867 | (install-pom-file "pom.xml")) | |
11868 | (add-before 'install 'fix-pom | |
11869 | (lambda _ | |
11870 | ;; pom adds jansi native versions for different platforms, but we | |
11871 | ;; only need one, so use native instead | |
11872 | (substitute* "jansi/pom.xml" | |
11873 | (("windows32") "native") | |
11874 | (("windows64") "native") | |
11875 | (("osx") "native") | |
11876 | (("linux32") "native") | |
11877 | (("linux64") "native") | |
11878 | (("freebsd32") "native") | |
11879 | (("freebsd64") "native")) | |
11880 | #t)) | |
11881 | (replace 'install | |
11882 | (install-from-pom "jansi/pom.xml"))))) | |
11883 | (propagated-inputs | |
a87ea1ad JL |
11884 | `(("java-jansi-native" ,java-jansi-native))) |
11885 | (native-inputs | |
11886 | `(("java-junit" ,java-junit) | |
11887 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
11888 | (home-page "https://fusesource.github.io/jansi/") | |
11889 | (synopsis "Portable ANSI escape sequences") | |
11890 | (description "Jansi is a Java library that allows you to use ANSI escape | |
11891 | sequences to format your console output which works on every platform.") | |
11892 | (license license:asl2.0))) | |
cc061329 JL |
11893 | |
11894 | (define-public java-jboss-el-api-spec | |
11895 | (package | |
11896 | (name "java-jboss-el-api-spec") | |
11897 | (version "3.0") | |
11898 | (source (origin | |
11899 | (method url-fetch) | |
11900 | (uri (string-append "https://github.com/jboss/jboss-el-api_spec/" | |
11901 | "archive/jboss-el-api_" version | |
11902 | "_spec-1.0.7.Final.tar.gz")) | |
11903 | (sha256 | |
11904 | (base32 | |
11905 | "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh")))) | |
11906 | (build-system ant-build-system) | |
11907 | (arguments | |
11908 | `(#:jar-name "java-jboss-el-api_spec.jar" | |
51087d51 JL |
11909 | #:modules ((guix build ant-build-system) |
11910 | (guix build utils) | |
11911 | (guix build maven pom) | |
11912 | (guix build java-utils) | |
11913 | (sxml simple)) | |
11914 | #:phases | |
11915 | (modify-phases %standard-phases | |
11916 | ;; the origin of javax.el:javax.el-api is unknown, so we use this package | |
11917 | ;; instead, which implements the same thing. We override the pom file | |
11918 | ;; to "rename" the package so it can be found by maven. | |
11919 | (add-before 'install 'override-pom | |
11920 | (lambda _ | |
11921 | (delete-file "pom.xml") | |
11922 | (with-output-to-file "pom.xml" | |
11923 | (lambda _ | |
11924 | (sxml->xml | |
11925 | `(project | |
11926 | (modelVersion "4.0.0") | |
11927 | (name "el-api") | |
11928 | (groupId "javax.el") | |
11929 | (artifactId "javax.el-api") | |
11930 | (version "3.0"))))) | |
11931 | #t)) | |
11932 | (replace 'install | |
11933 | (install-from-pom "pom.xml"))))) | |
cc061329 JL |
11934 | (inputs |
11935 | `(("java-junit" ,java-junit))) | |
11936 | (home-page "https://github.com/jboss/jboss-el-api_spec") | |
11937 | (synopsis "JSR-341 expression language 3.0 API") | |
11938 | (description "This package contains an implementation of the JSR-341 | |
11939 | specification for the expression language 3.0. It implements an expression | |
11940 | language inspired by ECMAScript and XPath. This language is used with | |
11941 | JavaServer Pages (JSP).") | |
11942 | ;; Either GPL2 only or CDDL. | |
11943 | (license (list license:gpl2 license:cddl1.1)))) | |
cc03a786 JL |
11944 | |
11945 | (define-public java-jboss-interceptors-api-spec | |
11946 | (package | |
11947 | (name "java-jboss-interceptors-api-spec") | |
11948 | (version "1.2") | |
11949 | (source (origin | |
11950 | (method url-fetch) | |
11951 | (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/" | |
11952 | "archive/jboss-interceptors-api_" version | |
11953 | "_spec-1.0.0.Final.tar.gz")) | |
11954 | (sha256 | |
11955 | (base32 | |
11956 | "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z")))) | |
11957 | (build-system ant-build-system) | |
11958 | (arguments | |
11959 | `(#:jar-name "java-jboss-interceptors-api_spec.jar" | |
11960 | #:jdk ,icedtea-8 | |
11961 | #:source-dir "." | |
51087d51 JL |
11962 | #:tests? #f; no tests |
11963 | #:modules ((guix build ant-build-system) | |
11964 | (guix build utils) | |
11965 | (guix build maven pom) | |
11966 | (guix build java-utils) | |
11967 | (sxml simple)) | |
11968 | #:phases | |
11969 | (modify-phases %standard-phases | |
11970 | ;; the origin of javax.interceptor:javax.interceptor-api is unknown, | |
11971 | ;; so we use this package instead, which implements the same thing. | |
11972 | ;; We override the pom file to "rename" the package so it can be found | |
11973 | ;; by maven. | |
11974 | (add-before 'install 'override-pom | |
11975 | (lambda _ | |
11976 | (delete-file "pom.xml") | |
11977 | (with-output-to-file "pom.xml" | |
11978 | (lambda _ | |
11979 | (sxml->xml | |
11980 | `(project | |
11981 | (modelVersion "4.0.0") | |
11982 | (name "interceptor-api") | |
11983 | (groupId "javax.interceptor") | |
11984 | (artifactId "javax.interceptor-api") | |
11985 | (version "3.0"))))) | |
11986 | #t)) | |
11987 | (replace 'install | |
11988 | (install-from-pom "pom.xml"))))) | |
cc03a786 JL |
11989 | (home-page "https://github.com/jboss/jboss-interceptors-api_spec") |
11990 | (synopsis "Interceptors 1.2 API classes from JSR 318") | |
11991 | (description "Java-jboss-interceptors-api-spec implements the Interceptors | |
11992 | API. Interceptors are used to interpose on business method invocations and | |
11993 | specific events.") | |
11994 | ;; Either GPL2 only or CDDL. | |
11995 | (license (list license:gpl2 license:cddl1.1)))) | |
a10a451c JL |
11996 | |
11997 | (define-public java-cdi-api | |
11998 | (package | |
11999 | (name "java-cdi-api") | |
12000 | (version "2.0") | |
12001 | (source (origin | |
12002 | (method url-fetch) | |
12003 | (uri (string-append "https://github.com/cdi-spec/cdi/archive/" | |
12004 | version ".tar.gz")) | |
12005 | (file-name (string-append name "-" version ".tar.gz")) | |
12006 | (sha256 | |
12007 | (base32 | |
12008 | "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y")))) | |
12009 | (build-system ant-build-system) | |
12010 | (arguments | |
12011 | `(#:source-dir "api/src/main/java" | |
12012 | #:jar-name "java-cdi-api.jar" | |
12013 | #:test-dir "api/src/test" | |
12014 | #:jdk ,icedtea-8 | |
51087d51 JL |
12015 | #:tests? #f; Tests fail because we don't have a CDI provider yet |
12016 | #:phases | |
12017 | (modify-phases %standard-phases | |
12018 | (replace 'install | |
12019 | (install-from-pom "api/pom.xml"))))) | |
12020 | (propagated-inputs | |
a10a451c JL |
12021 | `(("java-javax-inject" ,java-javax-inject) |
12022 | ("java-jboss-el-api-spec" ,java-jboss-el-api-spec) | |
51087d51 JL |
12023 | ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec) |
12024 | ("java-weld-parent-pom" ,java-weld-parent-pom))) | |
a10a451c JL |
12025 | (native-inputs |
12026 | `(("java-testng" ,java-testng) | |
12027 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
12028 | (home-page "http://cdi-spec.org/") | |
12029 | (synopsis "Contexts and Dependency Injection APIs") | |
12030 | (description "Java-cdi-api contains the required APIs for Contexts and | |
12031 | Dependency Injection (CDI).") | |
12032 | (license license:asl2.0))) | |
d57fd728 JL |
12033 | |
12034 | (define-public java-joda-convert | |
12035 | (package | |
12036 | (name "java-joda-convert") | |
12037 | (version "1.9.2") | |
12038 | (source (origin | |
12039 | (method url-fetch) | |
12040 | (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v" | |
12041 | version ".tar.gz")) | |
12042 | (file-name (string-append name "-" version ".tar.gz")) | |
12043 | (sha256 | |
12044 | (base32 | |
12045 | "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7")))) | |
12046 | (build-system ant-build-system) | |
12047 | (arguments | |
12048 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
12049 | #:source-dir "src/main/java" | |
12050 | #:test-include (list "**/Test*.java") | |
12051 | ;; Contains only interfaces and base classes (no test) | |
12052 | #:test-exclude (list "**/test*/**.java"))) | |
12053 | (inputs | |
12054 | `(("java-guava" ,java-guava))) | |
12055 | (native-inputs | |
12056 | `(("java-junit" ,java-junit) | |
12057 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
c82ddf33 | 12058 | (home-page "https://www.joda.org/joda-convert/") |
d57fd728 JL |
12059 | (synopsis "Conversion between Objects and Strings") |
12060 | (description "Joda-Convert provides a small set of classes to aid | |
12061 | conversion between Objects and Strings. It is not intended to tackle the | |
12062 | wider problem of Object to Object transformation.") | |
12063 | (license license:asl2.0))) | |
0158ea8a JL |
12064 | |
12065 | (define-public java-joda-time | |
12066 | (package | |
12067 | (name "java-joda-time") | |
12068 | (version "2.9.9") | |
12069 | (source (origin | |
12070 | (method url-fetch) | |
12071 | (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v" | |
12072 | version ".tar.gz")) | |
12073 | (file-name (string-append name "-" version ".tar.gz")) | |
12074 | (sha256 | |
12075 | (base32 | |
12076 | "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1")))) | |
12077 | (build-system ant-build-system) | |
12078 | (arguments | |
12079 | `(#:jar-name "java-joda-time.jar" | |
12080 | #:source-dir "src/main/java" | |
12081 | #:test-include (list "**/Test*.java") | |
12082 | ;; There is no runnable test in these files | |
12083 | #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java") | |
12084 | #:phases | |
12085 | (modify-phases %standard-phases | |
12086 | (add-after 'build 'build-resources | |
12087 | (lambda _ | |
12088 | (mkdir-p "build/classes/org/joda/time/tz/data") | |
12089 | (mkdir-p "build/classes/org/joda/time/format") | |
6d0368eb JL |
12090 | ;; This will produce the following exception: |
12091 | ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap" | |
12092 | ;; which is normal, because it doesn't exist yet. It still generates | |
12093 | ;; the same file as in the binary one can find on maven. | |
12094 | (invoke "java" "-cp" | |
12095 | (string-append "build/classes:" (getenv "CLASSPATH")) | |
12096 | "org.joda.time.tz.ZoneInfoCompiler" | |
12097 | "-src" "src/main/java/org/joda/time/tz/src" | |
12098 | "-dst" "build/classes/org/joda/time/tz/data" | |
12099 | "africa" "antarctica" "asia" "australasia" | |
12100 | "europe" "northamerica" "southamerica" | |
12101 | "pacificnew" "etcetera" "backward" "systemv") | |
0158ea8a JL |
12102 | (for-each (lambda (f) |
12103 | (copy-file f (string-append | |
12104 | "build/classes/org/joda/time/format/" | |
12105 | (basename f)))) | |
12106 | (find-files "src/main/java/org/joda/time/format" ".*.properties")) | |
12107 | #t)) | |
12108 | (add-before 'install 'regenerate-jar | |
12109 | (lambda _ | |
12110 | ;; We need to regenerate the jar file to add generated data. | |
12111 | (delete-file "build/jar/java-joda-time.jar") | |
6d0368eb | 12112 | (invoke "ant" "jar"))) |
0158ea8a JL |
12113 | (add-before 'check 'copy-test-resources |
12114 | (lambda _ | |
12115 | (mkdir-p "build/test-classes/org/joda/time/tz/data") | |
12116 | (copy-file "src/test/resources/tzdata/ZoneInfoMap" | |
12117 | "build/test-classes/org/joda/time/tz/data/ZoneInfoMap") | |
12118 | (copy-recursively "src/test/resources" "build/test-classes") | |
12119 | #t))))) | |
12120 | (inputs | |
12121 | `(("java-joda-convert" ,java-joda-convert))) | |
12122 | (native-inputs | |
12123 | `(("java-junit" ,java-junit) | |
12124 | ("java-hamcrest-core" ,java-hamcrest-core) | |
12125 | ("tzdata" ,tzdata))) | |
14544d2f | 12126 | (home-page "https://www.joda.org/joda-time/") |
0158ea8a JL |
12127 | (synopsis "Replacement for the Java date and time classes") |
12128 | (description "Joda-Time is a replacement for the Java date and time | |
12129 | classes prior to Java SE 8.") | |
12130 | (license license:asl2.0))) | |
6d0368eb JL |
12131 | |
12132 | (define-public java-xerces | |
12133 | (package | |
12134 | (name "java-xerces") | |
695fb93e | 12135 | (version "2.12.1") |
6d0368eb JL |
12136 | (source |
12137 | (origin | |
12138 | (method url-fetch) | |
12139 | (uri (string-append "mirror://apache/xerces/j/source/" | |
12140 | "Xerces-J-src." version ".tar.gz")) | |
12141 | (sha256 | |
695fb93e | 12142 | (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s")) |
6d0368eb JL |
12143 | (patches (search-patches |
12144 | "java-xerces-xjavac_taskdef.patch" | |
12145 | "java-xerces-build_dont_unzip.patch" | |
12146 | "java-xerces-bootclasspath.patch")))) | |
12147 | (build-system ant-build-system) | |
12148 | (arguments | |
12149 | `(#:tests? #f;; Test files are not present | |
12150 | #:test-target "test" | |
12151 | #:jdk ,icedtea-8 | |
12152 | #:phases | |
12153 | (modify-phases %standard-phases | |
12154 | (add-after 'unpack 'create-build.properties | |
12155 | (lambda* (#:key inputs #:allow-other-keys) | |
12156 | (let ((jaxp (assoc-ref inputs "java-jaxp")) | |
12157 | (resolver (assoc-ref inputs "java-apache-xml-commons-resolver"))) | |
12158 | (with-output-to-file "build.properties" | |
12159 | (lambda _ | |
12160 | (format #t | |
12161 | "jar.jaxp = ~a/share/java/jaxp.jar~@ | |
12162 | jar.apis-ext = ~a/share/java/jaxp.jar~@ | |
12163 | jar.resolver = ~a/share/java/xml-resolver.jar~%" | |
12164 | jaxp jaxp resolver))) | |
12165 | ;; Make xerces use our version of jaxp in tests | |
12166 | (substitute* "build.xml" | |
12167 | (("xml-apis.jar") | |
12168 | (string-append jaxp "/share/java/jaxp.jar")) | |
12169 | (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}") | |
12170 | "${jar.apis}"))) | |
12171 | #t)) | |
12172 | (replace 'install (install-jars "build"))))) | |
12173 | (inputs | |
12174 | `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver) | |
12175 | ("java-jaxp" ,java-jaxp))) | |
12176 | (home-page "https://xerces.apache.org/xerces2-j/") | |
12177 | (synopsis "Validating XML parser for Java with DOM level 3 support") | |
12178 | (description "The Xerces2 Java parser is the reference implementation of | |
12179 | XNI, the Xerces Native Interface, and also a fully conforming XML Schema | |
12180 | processor. | |
12181 | ||
12182 | Xerces2-J supports the following standards and APIs: | |
12183 | ||
12184 | @itemize | |
12185 | @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation | |
12186 | @item Namespaces in XML Recommendation | |
12187 | @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and | |
12188 | Range Recommendations | |
12189 | @item Simple API for XML (SAX) 2.0.1 Core and Extension | |
12190 | @item Java APIs for XML Processing (JAXP) 1.2.01 | |
12191 | @item XML Schema 1.0 Structures and Datatypes Recommendations | |
12192 | @item Experimental implementation of the Document Object Model (DOM) Level 3 | |
12193 | Core and Load/Save Working Drafts | |
12194 | @item Provides a partial implementation of the XML Inclusions (XInclude) W3C | |
12195 | Candidate Recommendation | |
12196 | @end itemize | |
12197 | ||
12198 | Xerces is now able to parse documents written according to the XML 1.1 | |
12199 | Candidate Recommendation, except that it does not yet provide an option to | |
12200 | enable normalization checking as described in section 2.13 of this | |
12201 | specification. It also handles namespaces according to the XML Namespaces 1.1 | |
12202 | Candidate Recommendation, and will correctly serialize XML 1.1 documents if | |
12203 | the DOM level 3 load/save API's are in use.") | |
12204 | (license license:asl2.0))) | |
e06bf428 | 12205 | |
ae6922ed DM |
12206 | (define-public java-jakarta-regexp |
12207 | (package | |
12208 | (name "java-jakarta-regexp") | |
12209 | (version "1.5") | |
12210 | (source | |
12211 | (origin | |
12212 | (method url-fetch) | |
12213 | (uri (string-append | |
12214 | "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-" | |
12215 | version ".tar.gz")) | |
12216 | (sha256 | |
12217 | (base32 | |
12218 | "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r")))) | |
12219 | (build-system ant-build-system) | |
12220 | (arguments | |
12221 | `(#:test-target "test" | |
12222 | #:phases | |
12223 | (modify-phases %standard-phases | |
12224 | (replace 'install | |
12225 | (lambda* (#:key outputs #:allow-other-keys) | |
12226 | (let* ((out (assoc-ref outputs "out")) | |
12227 | (out-share (string-append out "/share/java"))) | |
12228 | (mkdir-p out-share) | |
12229 | (for-each (lambda (name) | |
12230 | (install-file name out-share)) | |
12231 | (find-files "build" "^jakarta-regexp-.*\\.jar$")) | |
12232 | #t)))))) | |
12233 | (home-page "https://attic.apache.org/projects/jakarta-regexp.html") | |
12234 | (synopsis "Regular expression parser generator for Java.") | |
12235 | (description "@code{jakarta-regexp} is an old regular expression parser | |
12236 | generator for Java.") | |
12237 | (license license:asl2.0))) | |
12238 | ||
e06bf428 JL |
12239 | (define-public java-jline |
12240 | (package | |
12241 | (name "java-jline") | |
12242 | (version "1.0") | |
12243 | (source (origin | |
12244 | (method url-fetch) | |
12245 | (uri (string-append "https://github.com/jline/jline1/archive/jline-" | |
12246 | version ".tar.gz")) | |
12247 | (sha256 | |
12248 | (base32 | |
12249 | "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir")))) | |
12250 | (build-system ant-build-system) | |
12251 | (arguments | |
12252 | `(#:jar-name "jline.jar" | |
12253 | #:source-dir "src/main/java" | |
12254 | #:test-dir "src/test" | |
12255 | #:phases | |
12256 | (modify-phases %standard-phases | |
12257 | (add-before 'build 'copy-resources | |
12258 | (lambda _ | |
12259 | (copy-recursively "src/main/resources" "build/classes") | |
12260 | #t))))) | |
12261 | (native-inputs | |
12262 | `(("java-junit" ,java-junit))) | |
12263 | (home-page "https://jline.github.io") | |
12264 | (synopsis "Console input handling library") | |
12265 | (description "JLine is a Java library for handling console input. It is | |
12266 | similar in functionality to BSD editline and GNU readline but with additional | |
12267 | features that bring it on par with the Z shell line editor.") | |
12268 | (license license:bsd-3))) | |
7ac4f054 | 12269 | |
49d74311 JL |
12270 | (define-public java-jline-2 |
12271 | (package | |
12272 | (inherit java-jline) | |
12273 | (version "2.14.5") | |
12274 | (source (origin | |
12275 | (method url-fetch) | |
12276 | (uri (string-append "https://github.com/jline/jline2/archive/jline-" | |
12277 | version ".tar.gz")) | |
12278 | (sha256 | |
12279 | (base32 | |
12280 | "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf")))) | |
12281 | (arguments | |
12282 | `(#:jdk ,icedtea-8 | |
12283 | ,@(package-arguments java-jline))) | |
12284 | (inputs | |
12285 | `(("java-jansi" ,java-jansi) | |
12286 | ("java-jansi-native" ,java-jansi-native))) | |
12287 | (native-inputs | |
12288 | `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4) | |
12289 | ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common) | |
12290 | ("java-powermock-api-easymock" ,java-powermock-api-easymock) | |
12291 | ("java-powermock-api-support" ,java-powermock-api-support) | |
12292 | ("java-powermock-core" ,java-powermock-core) | |
12293 | ("java-powermock-reflect" ,java-powermock-reflect) | |
12294 | ("java-easymock" ,java-easymock) | |
12295 | ("java-jboss-javassist" ,java-jboss-javassist) | |
12296 | ("java-objenesis" ,java-objenesis) | |
12297 | ("java-asm" ,java-asm) | |
12298 | ("java-hamcrest-core" ,java-hamcrest-core) | |
12299 | ("java-cglib" ,java-cglib) | |
12300 | ("java-junit" ,java-junit) | |
12301 | ("java-hawtjni" ,java-hawtjni))))) | |
12302 | ||
7ac4f054 JL |
12303 | (define-public java-xmlunit |
12304 | (package | |
12305 | (name "java-xmlunit") | |
12306 | (version "2.5.1") | |
12307 | (source (origin | |
12308 | (method url-fetch) | |
12309 | (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v" | |
12310 | version ".tar.gz")) | |
12311 | (file-name (string-append name "-" version ".tar.gz")) | |
12312 | (sha256 | |
12313 | (base32 | |
12314 | "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z")))) | |
12315 | (build-system ant-build-system) | |
12316 | (arguments | |
12317 | `(#:jar-name "java-xmlunit.jar" | |
12318 | #:source-dir "xmlunit-core/src/main/java" | |
12319 | #:test-dir "xmlunit-core/src/test" | |
12320 | #:phases | |
12321 | (modify-phases %standard-phases | |
12322 | (add-before 'check 'copy-test-resources | |
12323 | (lambda* (#:key inputs #:allow-other-keys) | |
12324 | (copy-recursively (assoc-ref inputs "resources") "../test-resources") | |
12325 | #t))))) | |
12326 | (native-inputs | |
12327 | `(("java-junit" ,java-junit) | |
12328 | ("java-mockito-1" ,java-mockito-1) | |
12329 | ("java-hamcrest-all" ,java-hamcrest-all) | |
12330 | ("java-objenesis" ,java-objenesis) | |
12331 | ("java-asm" ,java-asm) | |
12332 | ("java-cglib" ,java-cglib) | |
12333 | ("resources" | |
12334 | ,(origin | |
12335 | (method git-fetch) | |
12336 | (uri (git-reference | |
b0e7b699 | 12337 | (url "https://github.com/xmlunit/test-resources") |
7ac4f054 JL |
12338 | (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec"))) |
12339 | (file-name "java-xmlunit-test-resources") | |
12340 | (sha256 | |
12341 | (base32 | |
12342 | "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr")))))) | |
c4944d6c | 12343 | (home-page "https://www.xmlunit.org/") |
7ac4f054 JL |
12344 | (synopsis "XML output testing") |
12345 | (description "XMLUnit provides you with the tools to verify the XML you | |
12346 | emit is the one you want to create. It provides helpers to validate against | |
12347 | an XML Schema, assert the values of XPath queries or compare XML documents | |
12348 | against expected outcomes.") | |
12349 | (license license:asl2.0))) | |
73a1f10a JL |
12350 | |
12351 | (define-public java-xmlunit-legacy | |
12352 | (package | |
12353 | (inherit java-xmlunit) | |
12354 | (name "java-xmlunit-legacy") | |
12355 | (arguments | |
12356 | `(#:jar-name "java-xmlunit-legacy.jar" | |
12357 | #:source-dir "xmlunit-legacy/src/main/java" | |
12358 | #:test-dir "xmlunit-legacy/src/test")) | |
12359 | (inputs | |
12360 | `(("java-xmlunit" ,java-xmlunit) | |
12361 | ("java-junit" ,java-junit))) | |
12362 | (native-inputs | |
12363 | `(("java-mockito-1" ,java-mockito-1))))) | |
93abc975 | 12364 | |
f5cc5ead JL |
12365 | (define-public java-xmlunit-matchers |
12366 | (package | |
12367 | (inherit java-xmlunit) | |
12368 | (name "java-xmlunit-matchers") | |
12369 | (arguments | |
12370 | `(#:jar-name "java-xmlunit-matchers.jar" | |
12371 | #:source-dir "xmlunit-matchers/src/main/java" | |
12372 | #:test-dir "xmlunit-matchers/src/test" | |
12373 | #:test-exclude | |
12374 | ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd | |
12375 | (list "**/ValidationMatcherTest.java") | |
12376 | #:phases | |
12377 | (modify-phases %standard-phases | |
12378 | (add-before 'build 'copy-test-class | |
12379 | (lambda _ | |
12380 | (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java" | |
12381 | "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java") | |
12382 | #t)) | |
12383 | (add-before 'build 'fix-test-resources-path | |
12384 | (lambda _ | |
12385 | (substitute* (find-files "xmlunit-matchers/src/test" ".*.java") | |
12386 | (("../test-resources") "test-resources")) | |
12387 | #t)) | |
12388 | (add-before 'check 'copy-test-resources | |
12389 | (lambda* (#:key inputs #:allow-other-keys) | |
12390 | (copy-recursively (assoc-ref inputs "resources") "test-resources") | |
12391 | #t))))) | |
12392 | (inputs | |
12393 | `(("java-xmlunit" ,java-xmlunit) | |
12394 | ("java-junit" ,java-junit))))) | |
12395 | ||
93abc975 RW |
12396 | (define-public java-openchart2 |
12397 | (package | |
12398 | (name "java-openchart2") | |
12399 | (version "1.4.3") | |
12400 | (source (origin | |
12401 | (method url-fetch) | |
12402 | (uri (string-append "http://download.approximatrix.com/openchart2/" | |
12403 | "openchart2-" version ".source.zip")) | |
12404 | (sha256 | |
12405 | (base32 | |
12406 | "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g")))) | |
12407 | (build-system ant-build-system) | |
12408 | (arguments | |
12409 | `(#:test-target "test" | |
12410 | #:phases | |
12411 | (modify-phases %standard-phases | |
12412 | (add-after 'unpack 'fix-junit-errors | |
12413 | (lambda _ | |
12414 | (with-directory-excursion "unittest/src/com/approximatrix/charting/" | |
12415 | (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java" | |
12416 | "coordsystem/ticklocator/NumericYTickLocatorTest.java" | |
12417 | "coordsystem/ticklocator/ObjectXTickLocatorTest.java" | |
12418 | "model/DefaultChartDataModelConstraintsTest.java" | |
12419 | "model/MultiScatterDataModelConstraintsTest.java" | |
12420 | "model/threedimensional/DotPlotDataModelConstraintsTest.java") | |
12421 | (("(assertEquals[^;]+);" before _) | |
12422 | (string-append (string-drop-right before 2) ", 1E-6);")))) | |
12423 | #t)) | |
12424 | (replace 'install (install-jars "."))))) | |
12425 | (native-inputs | |
12426 | `(("unzip" ,unzip) | |
12427 | ("java-junit" ,java-junit) | |
12428 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
a809d632 | 12429 | (home-page "https://approximatrix.com/products/openchart2/") |
93abc975 RW |
12430 | (synopsis "Simple plotting for Java") |
12431 | (description "Openchart2 provides a simple, yet powerful, interface for | |
12432 | Java programmers to create two-dimensional charts and plots. The library | |
12433 | features an assortment of graph styles, including advanced scatter plots, bar | |
12434 | graphs, and pie charts.") | |
12435 | (license license:lgpl2.1+))) | |
5f5b31c6 JL |
12436 | |
12437 | (define-public java-commons-httpclient | |
12438 | (package | |
12439 | (name "java-commons-httpclient") | |
12440 | (version "3.1") | |
12441 | (source (origin | |
12442 | (method url-fetch) | |
9a01efa2 | 12443 | (uri (string-append "mirror://apache/httpcomponents/" |
5f5b31c6 JL |
12444 | "commons-httpclient/source/commons-httpclient-" |
12445 | version "-src.tar.gz")) | |
12446 | (sha256 | |
12447 | (base32 | |
12448 | "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r")))) | |
12449 | (build-system ant-build-system) | |
12450 | (arguments | |
12451 | `(#:build-target "compile" | |
12452 | #:test-target "test" | |
12453 | #:tests? #f; requires junit-textui (junit 3) | |
12454 | #:phases | |
12455 | (modify-phases %standard-phases | |
12456 | (add-before 'build 'fix-accent | |
12457 | (lambda _ | |
12458 | (for-each (lambda (file) | |
12459 | (with-fluids ((%default-port-encoding "ISO-8859-1")) | |
12460 | (substitute* file | |
12461 | (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n")))) | |
12462 | '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java" | |
12463 | "src/examples/TrivialApp.java" "src/examples/ClientApp.java" | |
12464 | "src/test/org/apache/commons/httpclient/TestHttps.java" | |
2c8ac364 MW |
12465 | "src/test/org/apache/commons/httpclient/TestURIUtil2.java")) |
12466 | #t)) | |
5f5b31c6 JL |
12467 | (replace 'install |
12468 | (lambda* (#:key outputs #:allow-other-keys) | |
12469 | (invoke "ant" "dist" | |
12470 | (string-append "-Ddist.home=" (assoc-ref outputs "out") | |
12471 | "/share/java")) | |
12472 | #t))))) | |
12473 | (propagated-inputs | |
12474 | `(("java-commons-logging" ,java-commons-logging-minimal) | |
12475 | ("java-commons-codec" ,java-commons-codec))) | |
12476 | (home-page "https://hc.apache.org") | |
12477 | (synopsis "HTTP/1.1 compliant HTTP agent implementation") | |
12478 | (description "This package contains an HTTP/1.1 compliant HTTP agent | |
12479 | implementation. It also provides reusable components for client-side | |
12480 | authentication, HTTP state management, and HTTP connection management.") | |
12481 | (license license:asl2.0))) | |
5fe981dc JL |
12482 | |
12483 | (define-public java-commons-vfs | |
12484 | (package | |
12485 | (name "java-commons-vfs") | |
12486 | (version "2.2") | |
12487 | (source (origin | |
12488 | (method url-fetch) | |
12489 | (uri (string-append "mirror://apache/commons/vfs/source/" | |
12490 | "commons-vfs2-distribution-" version "-src.tar.gz")) | |
12491 | (file-name (string-append name "-" version ".tar.gz")) | |
12492 | (sha256 | |
12493 | (base32 | |
12494 | "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3")) | |
12495 | (modules '((guix build utils))) | |
12496 | (snippet | |
12497 | '(begin | |
12498 | (for-each delete-file | |
12499 | (find-files "." "\\.jar$")) | |
12500 | #t)))) | |
12501 | (build-system ant-build-system) | |
12502 | (arguments | |
12503 | `(#:jar-name "commons-vfs.jar" | |
12504 | #:source-dir "commons-vfs2/src/main/java" | |
12505 | #:test-dir "commons-vfs2/src/test" | |
12506 | ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ... | |
12507 | #:tests? #f | |
12508 | #:phases | |
12509 | (modify-phases %standard-phases | |
12510 | (add-before 'build 'remove-hadoop-and-webdav | |
12511 | ; Remove these files as they are not required and depend on difficult | |
12512 | ; packages. | |
12513 | (lambda _ | |
12514 | (for-each delete-file-recursively | |
12515 | '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav" | |
2c8ac364 MW |
12516 | "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")) |
12517 | #t))))) | |
5fe981dc JL |
12518 | (inputs |
12519 | `(("java-commons-collections4" ,java-commons-collections4) | |
12520 | ("java-commons-compress" ,java-commons-compress) | |
12521 | ("java-commons-httpclient" ,java-commons-httpclient) | |
12522 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
12523 | ("java-commons-net" ,java-commons-net) | |
12524 | ("java-jsch" ,java-jsch))) | |
4f236f84 | 12525 | (home-page "https://commons.apache.org/proper/commons-vfs/") |
52beae7b | 12526 | (synopsis "Java file system library") |
5fe981dc JL |
12527 | (description "Commons VFS provides a single API for accessing various |
12528 | different file systems. It presents a uniform view of the files from various | |
12529 | different sources, such as the files on local disk, on an HTTP server, or | |
12530 | inside a Zip archive.") | |
12531 | (license license:asl2.0))) | |
f7b512c0 JL |
12532 | |
12533 | (define-public java-jakarta-oro | |
12534 | (package | |
12535 | (name "java-jakarta-oro") | |
12536 | (version "2.0.8") | |
12537 | (source (origin | |
12538 | (method url-fetch) | |
9a01efa2 | 12539 | (uri (string-append "mirror://apache/jakarta/oro/" |
f7b512c0 JL |
12540 | "jakarta-oro-" version ".tar.gz")) |
12541 | (sha256 | |
12542 | (base32 | |
12543 | "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc")) | |
12544 | (modules '((guix build utils))) | |
12545 | (snippet | |
12546 | `(begin | |
12547 | (delete-file (string-append "jakarta-oro-" ,version ".jar")) | |
12548 | #t)))) | |
12549 | (build-system ant-build-system) | |
12550 | (arguments | |
12551 | `(#:build-target "package" | |
c1b11a52 | 12552 | #:make-flags (list "-DDATE" "(no recorded date for reproducibility)") |
f7b512c0 JL |
12553 | #:tests? #f; tests are run as part of the build process |
12554 | #:phases | |
12555 | (modify-phases %standard-phases | |
12556 | (replace 'install | |
12557 | (install-jars ,(string-append "jakarta-oro-" version)))))) | |
12558 | (home-page "https://jakarta.apache.org/oro/") | |
12559 | (synopsis "Text-processing for Java") | |
12560 | (description "The Jakarta-ORO Java classes are a set of text-processing | |
12561 | Java classes that provide Perl5 compatible regular expressions, AWK-like | |
12562 | regular expressions, glob expressions, and utility classes for performing | |
12563 | substitutions, splits, filtering filenames, etc. This library is the successor | |
12564 | of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally | |
12565 | from ORO, Inc.") | |
12566 | (license license:asl1.1))) | |
a970288c JL |
12567 | |
12568 | (define-public java-native-access | |
12569 | (package | |
12570 | (name "java-native-access") | |
12571 | (version "4.5.1") | |
12572 | (source (origin | |
12573 | (method url-fetch) | |
12574 | (uri (string-append "https://github.com/java-native-access/jna/" | |
12575 | "archive/" version ".tar.gz")) | |
12576 | (file-name (string-append name "-" version ".tar.gz")) | |
12577 | (sha256 | |
12578 | (base32 | |
12579 | "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9")) | |
12580 | (modules '((guix build utils))) | |
12581 | (snippet | |
12582 | `(begin | |
12583 | (for-each delete-file (find-files "." ".*.jar")) | |
12584 | (delete-file-recursively "native/libffi") | |
12585 | (delete-file-recursively "dist") | |
12586 | #t)))) | |
12587 | (build-system ant-build-system) | |
12588 | (arguments | |
12589 | `(#:tests? #f; FIXME: tests require reflections.jar | |
12590 | #:test-target "test" | |
12591 | #:make-flags (list "-Ddynlink.native=true") | |
12592 | #:phases | |
12593 | (modify-phases %standard-phases | |
12594 | (add-before 'build 'fix-build.xml | |
12595 | (lambda* (#:key inputs #:allow-other-keys) | |
12596 | (substitute* "build.xml" | |
12597 | ;; Since we removed the bundled ant.jar, give the correct path | |
12598 | (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar")) | |
12599 | ;; We removed generated native libraries. We can only rebuild one | |
12600 | ;; so don't fail if we can't find a native library for another architecture. | |
12601 | (("zipfileset") "zipfileset erroronmissingarchive=\"false\"")) | |
12602 | ;; Copy test dependencies | |
fff4fcc4 | 12603 | (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$")) |
a970288c | 12604 | "lib/junit.jar") |
fff4fcc4 JL |
12605 | (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core") |
12606 | "jar$")) | |
a970288c JL |
12607 | "lib/hamcrest-core.jar") |
12608 | ;; FIXME: once reflections.jar is built, copy it to lib/test. | |
12609 | #t)) | |
12610 | (add-before 'build 'build-native | |
12611 | (lambda _ | |
12612 | (invoke "ant" "-Ddynlink.native=true" "native") | |
12613 | #t)) | |
12614 | (replace 'install | |
12615 | (install-jars "build"))))) | |
12616 | (inputs | |
12617 | `(("libffi" ,libffi) | |
12618 | ("libx11" ,libx11) | |
12619 | ("libxt" ,libxt))) | |
12620 | (native-inputs | |
12621 | `(("java-junit" ,java-junit) | |
12622 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
12623 | (home-page "https://github.com/java-native-access/jna") | |
12624 | (synopsis "Access to native shared libraries from Java") | |
12625 | (description "JNA provides Java programs easy access to native shared | |
12626 | libraries without writing anything but Java code - no JNI or native code is | |
12627 | required. JNA allows you to call directly into native functions using natural | |
12628 | Java method invocation.") | |
12629 | ;; Java Native Access project (JNA) is dual-licensed under 2 | |
12630 | ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0. | |
12631 | (license (list | |
12632 | license:asl2.0 | |
12633 | license:lgpl2.1+)))) | |
cfb55cfc JL |
12634 | |
12635 | (define-public java-native-access-platform | |
12636 | (package | |
12637 | (inherit java-native-access) | |
12638 | (name "java-native-access-platform") | |
12639 | (arguments | |
12640 | `(#:test-target "test" | |
12641 | #:tests? #f; require jna-test.jar | |
12642 | #:phases | |
12643 | (modify-phases %standard-phases | |
12644 | (add-before 'build 'chdir | |
12645 | (lambda _ | |
12646 | (chdir "contrib/platform") | |
12647 | #t)) | |
12648 | (add-after 'chdir 'fix-ant | |
12649 | (lambda* (#:key inputs #:allow-other-keys) | |
12650 | (substitute* "nbproject/project.properties" | |
12651 | (("../../build/jna.jar") | |
12652 | (string-append (assoc-ref inputs "java-native-access") | |
12653 | "/share/java/jna.jar")) | |
12654 | (("../../lib/hamcrest-core-.*.jar") | |
fff4fcc4 JL |
12655 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
12656 | "jar$"))) | |
cfb55cfc | 12657 | (("../../lib/junit.jar") |
fff4fcc4 JL |
12658 | (car (find-files (assoc-ref inputs "java-junit") |
12659 | "jar$")))) | |
cfb55cfc JL |
12660 | #t)) |
12661 | (replace 'install | |
12662 | (install-jars "dist"))))) | |
12663 | (inputs | |
12664 | `(("java-native-access" ,java-native-access))) | |
12665 | (synopsis "Cross-platform mappings for jna") | |
7230f6d5 | 12666 | (description "java-native-access-platform has cross-platform mappings |
cfb55cfc JL |
12667 | and mappings for a number of commonly used platform functions, including a |
12668 | large number of Win32 mappings as well as a set of utility classes that | |
12669 | simplify native access."))) | |
470674a5 JL |
12670 | |
12671 | (define-public java-jsch-agentproxy-core | |
12672 | (package | |
12673 | (name "java-jsch-agentproxy-core") | |
12674 | (version "0.0.8") | |
12675 | (source (origin | |
12676 | (method url-fetch) | |
12677 | (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/" | |
12678 | version ".tar.gz")) | |
12679 | (file-name (string-append name "-" version ".tar.gz")) | |
12680 | (sha256 | |
12681 | (base32 | |
12682 | "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q")))) | |
12683 | (build-system ant-build-system) | |
12684 | (arguments | |
12685 | `(#:jar-name "jsch-agentproxy-core.jar" | |
12686 | #:source-dir "jsch-agent-proxy-core/src/main/java" | |
12687 | #:tests? #f)); no tests | |
12688 | (home-page "https://github.com/ymnk/jsch-agent-proxy") | |
f1d79c97 | 12689 | (synopsis "Core component of the proxy to ssh-agent and Pageant in Java") |
470674a5 JL |
12690 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
12691 | and Pageant included Putty. It will be easily integrated into JSch, and users | |
12692 | will be allowed to use these programs for authentication.") | |
12693 | (license license:bsd-3))) | |
f1d79c97 JL |
12694 | |
12695 | (define-public java-jsch-agentproxy-sshagent | |
12696 | (package | |
12697 | (inherit java-jsch-agentproxy-core) | |
12698 | (name "java-jsch-agentproxy-sshagent") | |
12699 | (arguments | |
12700 | `(#:jar-name "jsch-agentproxy-sshagent.jar" | |
12701 | #:source-dir "jsch-agent-proxy-sshagent/src/main/java" | |
12702 | #:tests? #f)); no tests | |
12703 | (inputs | |
12704 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) | |
12705 | (synopsis "Proxy to ssh-agent") | |
12706 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
12707 | and Pageant included in Putty. This component contains the code for a proxy to | |
12708 | ssh-agent."))) | |
f438e638 JL |
12709 | |
12710 | (define-public java-jsch-agentproxy-usocket-jna | |
12711 | (package | |
12712 | (inherit java-jsch-agentproxy-core) | |
12713 | (name "java-jsch-agentproxy-usocket-jna") | |
12714 | (arguments | |
12715 | `(#:jar-name "jsch-agentproxy-usocket-jna.jar" | |
12716 | #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java" | |
12717 | #:tests? #f)); no tests | |
12718 | (inputs | |
12719 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
12720 | ("java-native-access" ,java-native-access))) | |
12721 | (synopsis "USocketFactory implementation using JNA") | |
12722 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
12723 | and Pageant included in Putty. This component contains an implementation of | |
12724 | USocketFactory using @dfn{JNA} (Java Native Access)."))) | |
475225e3 JL |
12725 | |
12726 | (define-public java-jsch-agentproxy-pageant | |
12727 | (package | |
12728 | (inherit java-jsch-agentproxy-core) | |
12729 | (name "java-jsch-agentproxy-pageant") | |
12730 | (arguments | |
12731 | `(#:jar-name "jsch-agentproxy-pageant.jar" | |
12732 | #:source-dir "jsch-agent-proxy-pageant/src/main/java" | |
12733 | #:tests? #f)); no tests | |
12734 | (inputs | |
12735 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
12736 | ("java-native-access" ,java-native-access) | |
12737 | ("java-native-access-platform" ,java-native-access-platform))) | |
12738 | (synopsis "Proxy to pageant") | |
12739 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
12740 | and Pageant included in Putty. This component contains the code for a proxy to | |
12741 | pageant."))) | |
96d6d9c7 JL |
12742 | |
12743 | (define-public java-jsch-agentproxy-usocket-nc | |
12744 | (package | |
12745 | (inherit java-jsch-agentproxy-core) | |
12746 | (name "java-jsch-agentproxy-usocket-nc") | |
12747 | (arguments | |
12748 | `(#:jar-name "jsch-agentproxy-usocket-nc.jar" | |
12749 | #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java" | |
12750 | #:tests? #f)); no tests | |
12751 | (inputs | |
12752 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) | |
12753 | (synopsis "USocketFactory implementation using netcat") | |
12754 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
12755 | and Pageant included in Putty. This component contains an implementation of | |
12756 | USocketFactory using netcat."))) | |
5a46b17b JL |
12757 | |
12758 | (define-public java-jsch-agentproxy-connector-factory | |
12759 | (package | |
12760 | (inherit java-jsch-agentproxy-core) | |
12761 | (name "java-jsch-agentproxy-connector-factory") | |
12762 | (arguments | |
12763 | `(#:jar-name "jsch-agentproxy-connector-factory.jar" | |
12764 | #:source-dir "jsch-agent-proxy-connector-factory/src/main/java" | |
12765 | #:tests? #f)); no tests | |
12766 | (inputs | |
12767 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
12768 | ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent) | |
12769 | ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna) | |
12770 | ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant) | |
12771 | ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc))) | |
12772 | (synopsis "Connector factory for jsch agent proxy") | |
12773 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
12774 | and Pageant included in Putty. This component contains a connector factory."))) | |
b0fbf596 JL |
12775 | |
12776 | (define-public java-jsch-agentproxy-jsch | |
12777 | (package | |
12778 | (inherit java-jsch-agentproxy-core) | |
12779 | (name "java-jsch-agentproxy-jsch") | |
12780 | (arguments | |
12781 | `(#:jar-name "jsch-agentproxy-jsch.jar" | |
12782 | #:source-dir "jsch-agent-proxy-jsch/src/main/java" | |
12783 | #:tests? #f)); no tests | |
12784 | (inputs | |
12785 | `(("java-jsch" ,java-jsch) | |
12786 | ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) | |
12787 | (synopsis "JSch integration library for agentproxy") | |
12788 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
12789 | and Pageant included in Putty. This component contains a library to use | |
12790 | jsch-agent-proxy with JSch."))) | |
f1f4a4f0 JL |
12791 | |
12792 | (define-public java-apache-ivy | |
12793 | (package | |
12794 | (name "java-apache-ivy") | |
12795 | (version "2.4.0") | |
12796 | (source (origin | |
12797 | (method url-fetch) | |
12798 | (uri (string-append "mirror://apache//ant/ivy/" version | |
12799 | "/apache-ivy-" version "-src.tar.gz")) | |
12800 | (sha256 | |
12801 | (base32 | |
12802 | "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0")) | |
12803 | (patches | |
12804 | (search-patches | |
12805 | "java-apache-ivy-port-to-latest-bouncycastle.patch")))) | |
12806 | (build-system ant-build-system) | |
12807 | (arguments | |
12808 | `(#:jar-name "ivy.jar" | |
12809 | #:tests? #f | |
12810 | #:phases | |
12811 | (modify-phases %standard-phases | |
12812 | (add-before 'build 'remove-example | |
12813 | (lambda _ | |
12814 | (delete-file-recursively "src/example") | |
12815 | #t)) | |
12816 | (add-before 'build 'copy-resources | |
12817 | (lambda _ | |
12818 | (with-directory-excursion "src/java" | |
12819 | (for-each (lambda (file) | |
12820 | (install-file file (string-append "../../build/classes/" (dirname file)))) | |
12821 | (append | |
12822 | (find-files "." ".*.css") | |
12823 | (find-files "." ".*.ent") | |
12824 | (find-files "." ".*.html") | |
12825 | (find-files "." ".*.properties") | |
12826 | (find-files "." ".*.xsd") | |
12827 | (find-files "." ".*.xsl") | |
2c8ac364 MW |
12828 | (find-files "." ".*.xml")))) |
12829 | #t)) | |
f1f4a4f0 JL |
12830 | (add-before 'build 'fix-vfs |
12831 | (lambda _ | |
12832 | (substitute* | |
12833 | '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java" | |
12834 | "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java") | |
12835 | (("import org.apache.commons.vfs") "import org.apache.commons.vfs2")) | |
12836 | #t)) | |
12837 | (add-before 'install 'copy-manifest | |
12838 | (lambda _ | |
12839 | (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF") | |
12840 | #t)) | |
12841 | (add-before 'install 'repack | |
12842 | (lambda _ | |
12843 | (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar" | |
2c8ac364 | 12844 | "-C" "build/classes" "."))) |
f1f4a4f0 JL |
12845 | (add-after 'install 'install-bin |
12846 | (lambda* (#:key outputs #:allow-other-keys) | |
12847 | (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) | |
12848 | (ivy (string-append bin "/ivy")) | |
12849 | (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar"))) | |
12850 | (mkdir-p bin) | |
12851 | (with-output-to-file ivy | |
12852 | (lambda _ | |
12853 | (display (string-append | |
12854 | "#!" (which "sh") "\n" | |
12855 | "if [[ -z $CLASSPATH ]]; then\n" | |
12856 | " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n" | |
12857 | "else\n" | |
12858 | " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n" | |
12859 | "fi\n" | |
12860 | (which "java") " -cp $cp org.apache.ivy.Main $@\n")))) | |
12861 | (chmod ivy #o755) | |
12862 | #t)))))) | |
12863 | (inputs | |
12864 | `(("java-bouncycastle" ,java-bouncycastle) | |
12865 | ("java-commons-cli" ,java-commons-cli) | |
12866 | ("java-commons-collections" ,java-commons-collections) | |
12867 | ("java-commons-httpclient" ,java-commons-httpclient) | |
12868 | ("java-commons-lang" ,java-commons-lang) | |
12869 | ("java-commons-vfs" ,java-commons-vfs) | |
12870 | ("java-jakarta-oro" ,java-jakarta-oro) | |
12871 | ("java-jsch" ,java-jsch) | |
12872 | ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
12873 | ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory) | |
12874 | ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch) | |
12875 | ("java-junit" ,java-junit))) | |
12876 | (home-page "https://ant.apache.org/ivy") | |
12877 | (synopsis "Dependency manager for the Java programming language") | |
12878 | (description "Ivy is a tool for managing (recording, tracking, resolving | |
12879 | and reporting) project dependencies. It is characterized by the following: | |
12880 | ||
12881 | @itemize | |
12882 | @item flexibility and configurability - Ivy is essentially process agnostic | |
12883 | and is not tied to any methodology or structure. Instead it provides the | |
12884 | necessary flexibility and configurability to be adapted to a broad range | |
12885 | of dependency management and build processes. | |
12886 | @item tight integration with Apache Ant - while available as a standalone tool, | |
12887 | Ivy works particularly well with Apache Ant providing a number of | |
12888 | powerful Ant tasks ranging from dependency resolution to dependency | |
12889 | reporting and publication. | |
12890 | @end itemize") | |
12891 | (license license:asl2.0))) | |
1a1810f5 JL |
12892 | |
12893 | (define-public java-eclipse-sisu-inject | |
12894 | (package | |
12895 | (name "java-eclipse-sisu-inject") | |
6671d6a1 | 12896 | (version "0.3.4") |
1a1810f5 | 12897 | (source (origin |
ae69b39e BH |
12898 | (method git-fetch) |
12899 | (uri (git-reference | |
12900 | (url "https://github.com/eclipse/sisu.inject/") | |
6671d6a1 | 12901 | (commit (string-append "releases/" version)))) |
ae69b39e | 12902 | (file-name (git-file-name name version)) |
1a1810f5 JL |
12903 | (sha256 |
12904 | (base32 | |
6671d6a1 | 12905 | "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6")))) |
1a1810f5 JL |
12906 | (build-system ant-build-system) |
12907 | (arguments | |
12908 | `(#:jar-name "eclipse-sisu-inject.jar" | |
12909 | #:source-dir "org.eclipse.sisu.inject/src" | |
6671d6a1 JL |
12910 | #:tests? #f; no tests |
12911 | #:phases | |
12912 | (modify-phases %standard-phases | |
12913 | (replace 'install | |
12914 | (install-from-pom "org.eclipse.sisu.inject/pom.xml"))))) | |
12915 | (propagated-inputs | |
1a1810f5 | 12916 | `(("java-guice" ,java-guice) |
6671d6a1 JL |
12917 | ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom))) |
12918 | (inputs | |
12919 | `(("java-guice-servlet" ,java-guice-servlet) | |
1a1810f5 | 12920 | ("java-javax-inject" ,java-javax-inject) |
4b472f6a | 12921 | ("java-javaee-servletapi" ,java-javaee-servletapi) |
1a1810f5 JL |
12922 | ("java-junit" ,java-junit) |
12923 | ("java-slf4j-api" ,java-slf4j-api) | |
12924 | ("java-jsr305" ,java-jsr305) | |
12925 | ("java-jsr250" ,java-jsr250) | |
12926 | ("java-cdi-api" ,java-cdi-api) | |
12927 | ("java-osgi-framework" ,java-osgi-framework) | |
12928 | ("java-osgi-util-tracker" ,java-osgi-util-tracker) | |
12929 | ("java-testng" ,java-testng))) | |
12930 | (home-page "https://www.eclipse.org/sisu/") | |
12931 | (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring") | |
12932 | (description "Sisu is a modular JSR330-based container that supports | |
12933 | classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses | |
12934 | Google-Guice to perform dependency injection and provide the core JSR330 | |
12935 | support, but removes the need to write explicit bindings in Guice modules. | |
12936 | Integration with other containers via the Eclipse Extension Registry and the | |
12937 | OSGi Service Registry is a goal of this project.") | |
12938 | (license license:epl1.0))) | |
7049dea1 | 12939 | |
6671d6a1 JL |
12940 | (define java-sisu-inject-parent-pom |
12941 | (package | |
12942 | (inherit java-eclipse-sisu-inject) | |
12943 | (name "java-sisu-inject-parent-pom") | |
12944 | (arguments | |
12945 | `(#:tests? #f | |
12946 | #:phases | |
12947 | (modify-phases %standard-phases | |
12948 | (delete 'configure) | |
12949 | (delete 'build) | |
12950 | (replace 'install | |
12951 | (install-pom-file "pom.xml"))))) | |
12952 | (propagated-inputs '()))) | |
12953 | ||
7049dea1 JL |
12954 | (define-public java-eclipse-sisu-plexus |
12955 | (package | |
12956 | (name "java-eclipse-sisu-plexus") | |
e0c0b078 | 12957 | (version "0.3.4") |
7049dea1 | 12958 | (source (origin |
3560a2cd EF |
12959 | (method git-fetch) |
12960 | (uri (git-reference | |
b0e7b699 | 12961 | (url "https://github.com/eclipse/sisu.plexus") |
3560a2cd EF |
12962 | (commit (string-append "releases/" version)))) |
12963 | (file-name (git-file-name name version)) | |
7049dea1 JL |
12964 | (sha256 |
12965 | (base32 | |
e0c0b078 | 12966 | "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f")) |
7049dea1 JL |
12967 | (modules '((guix build utils))) |
12968 | (snippet | |
12969 | '(begin | |
12970 | (for-each delete-file (find-files "." ".*.jar")) | |
12971 | (rename-file "org.eclipse.sisu.plexus.tests/src" | |
12972 | "org.eclipse.sisu.plexus.tests/java") | |
12973 | #t)))) | |
12974 | (build-system ant-build-system) | |
12975 | (arguments | |
12976 | `(#:jar-name "eclipse-sisu-plexus.jar" | |
12977 | #:source-dir "org.eclipse.sisu.plexus/src" | |
12978 | #:test-dir "org.eclipse.sisu.plexus.tests" | |
12979 | #:test-exclude | |
12980 | (list | |
12981 | ;; This test fails probably because we can't generate the necessary | |
12982 | ;; meta-inf files. | |
12983 | "**/PlexusLoggingTest.*" | |
12984 | ;; FIXME: This test fails because of some injection error | |
12985 | "**/PlexusRequirementTest.*") | |
12986 | #:jdk ,icedtea-8 | |
12987 | #:phases | |
12988 | (modify-phases %standard-phases | |
12989 | (add-before 'build 'copy-resources | |
12990 | (lambda _ | |
12991 | (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml" | |
12992 | "build/classes/META-INF/plexus") | |
12993 | #t)) | |
12994 | (add-before 'check 'build-test-jar | |
12995 | (lambda _ | |
12996 | (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/" | |
12997 | (mkdir "build") | |
12998 | (with-directory-excursion "java" | |
12999 | (apply invoke "javac" "-cp" | |
13000 | (string-append (getenv "CLASSPATH") | |
13001 | ":../../../../../build/classes") | |
13002 | (find-files "." ".*.java")) | |
13003 | (for-each (lambda (file) (install-file file (string-append "../build/" file))) | |
13004 | (find-files "." ".*.jar"))) | |
13005 | (mkdir-p "build/META-INF/plexus") | |
13006 | (copy-file "resources/META-INF/plexus/components.xml" | |
13007 | "build/META-INF/plexus/components.xml") | |
13008 | (with-directory-excursion "build" | |
13009 | (invoke "jar" "cf" "../../../component-jar-0.1.jar" "."))) | |
13010 | (with-directory-excursion "org.eclipse.sisu.plexus.tests/" | |
13011 | (copy-recursively "META-INF" "../build/test-classes/META-INF") | |
13012 | (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java" | |
13013 | (("resources/component-jar") | |
13014 | "org.eclipse.sisu.plexus.tests/resources/component-jar"))) | |
51087d51 JL |
13015 | #t)) |
13016 | (replace 'install | |
13017 | (install-from-pom "org.eclipse.sisu.plexus/pom.xml"))))) | |
13018 | (propagated-inputs | |
7049dea1 | 13019 | `(("java-plexus-classworlds" ,java-plexus-classworlds) |
51087d51 | 13020 | ("java-plexus-utils" ,java-plexus-utils) |
7049dea1 | 13021 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
51087d51 | 13022 | ("java-cdi-api" ,java-cdi-api) |
7049dea1 | 13023 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
51087d51 JL |
13024 | ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom))) |
13025 | (inputs | |
13026 | `(("java-osgi-framework" ,java-osgi-framework) | |
7049dea1 | 13027 | ("java-slf4j-api" ,java-slf4j-api) |
51087d51 JL |
13028 | ("java-javax-inject" ,java-javax-inject) |
13029 | ("java-guice" ,java-guice) | |
13030 | ("java-guava" ,java-guava) | |
7049dea1 | 13031 | ("java-aopalliance" ,java-aopalliance) |
51087d51 JL |
13032 | ("java-asm" ,java-asm) |
13033 | ("java-cglib" ,java-cglib))) | |
13034 | (native-inputs | |
13035 | `(("java-junit" ,java-junit))) | |
7049dea1 JL |
13036 | (home-page "https://www.eclipse.org/sisu/") |
13037 | (synopsis "Plexus support for the sisu container") | |
13038 | (description "Sisu is a modular JSR330-based container that supports | |
13039 | classpath scanning, auto-binding, and dynamic auto-wiring. This package | |
13040 | adds Plexus support to the Sisu-Inject container.") | |
13041 | (license license:epl1.0))) | |
3fa18fe7 | 13042 | |
51087d51 JL |
13043 | (define java-sisu-plexus-parent-pom |
13044 | (package | |
13045 | (inherit java-eclipse-sisu-plexus) | |
13046 | (name "java-sisu-plexus-parent-pom") | |
13047 | (arguments | |
13048 | `(#:tests? #f | |
13049 | #:phases | |
13050 | (modify-phases %standard-phases | |
13051 | (delete 'configure) | |
13052 | (delete 'build) | |
13053 | (replace 'install | |
13054 | (install-pom-file "pom.xml"))))) | |
13055 | (propagated-inputs | |
13056 | `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9))))) | |
13057 | ||
3fa18fe7 JL |
13058 | (define-public java-commons-compiler |
13059 | (package | |
13060 | (name "java-commons-compiler") | |
13061 | (version "3.0.8") | |
13062 | (source (origin | |
13063 | (method git-fetch) | |
13064 | (uri (git-reference | |
13065 | (url "https://github.com/janino-compiler/janino") | |
13066 | (commit "91aa95686d1e4ca3b16a984a03a38686572331b2"))) | |
13067 | (file-name (string-append name "-" version)) | |
13068 | (sha256 | |
13069 | (base32 | |
13070 | "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r")) | |
13071 | (modules '((guix build utils))) | |
13072 | (snippet | |
13073 | '(begin | |
13074 | (for-each delete-file | |
13075 | (find-files "." "\\.jar$")) | |
13076 | #t)))) | |
13077 | (build-system ant-build-system) | |
13078 | (arguments | |
13079 | `(#:jar-name "commons-compiler.jar" | |
13080 | #:source-dir "commons-compiler/src/main" | |
13081 | #:tests? #f)); no tests | |
13082 | (home-page "https://github.com/janino-compiler/janino") | |
13083 | (synopsis "Java compiler") | |
13084 | (description "Commons-compiler contains an API for janino, including the | |
13085 | @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator} | |
13086 | and @code{ISimpleCompiler} interfaces.") | |
13087 | (license license:bsd-3))) | |
3402e651 JL |
13088 | |
13089 | (define-public java-janino | |
13090 | (package | |
13091 | (inherit java-commons-compiler) | |
13092 | (name "java-janino") | |
13093 | (arguments | |
13094 | `(#:jar-name "janino.jar" | |
13095 | #:source-dir "src/main/java" | |
13096 | #:phases | |
13097 | (modify-phases %standard-phases | |
13098 | (add-before 'configure 'chdir | |
13099 | (lambda _ | |
2c8ac364 MW |
13100 | (chdir "janino") |
13101 | #t))))) | |
3402e651 JL |
13102 | (inputs |
13103 | `(("java-commons-compiler" ,java-commons-compiler))) | |
13104 | (native-inputs | |
13105 | `(("java-junit" ,java-junit) | |
13106 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
13107 | (description "Janino is a Java compiler. Janino can compile a set of | |
13108 | source files to a set of class files like @code{javac}, but also compile a | |
13109 | Java expression, block, class body or source file in memory, load the bytecode | |
13110 | and execute it directly in the same JVM. @code{janino} can also be used for | |
13111 | static code analysis or code manipulation."))) | |
7d8207a4 JL |
13112 | |
13113 | (define-public java-logback-core | |
13114 | (package | |
13115 | (name "java-logback-core") | |
13116 | (version "1.2.3") | |
13117 | (source (origin | |
13118 | (method url-fetch) | |
13119 | (uri (string-append "https://github.com/qos-ch/logback/archive/v_" | |
13120 | version ".tar.gz")) | |
b1ccd2a1 | 13121 | (file-name (string-append name "-" version ".tar.gz")) |
7d8207a4 JL |
13122 | (sha256 |
13123 | (base32 | |
13124 | "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi")) | |
13125 | (modules '((guix build utils))) | |
13126 | (snippet | |
2c8ac364 MW |
13127 | '(begin |
13128 | (delete-file-recursively "logback-access/lib") | |
13129 | #t)))) | |
7d8207a4 JL |
13130 | (build-system ant-build-system) |
13131 | (arguments | |
13132 | `(#:jar-name "logback.jar" | |
13133 | #:source-dir "src/main/java" | |
13134 | #:test-dir "src/test" | |
13135 | #:test-exclude | |
13136 | ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator | |
13137 | ;; which creates FastClasses | |
13138 | (list "**/AllCoreTest.*" | |
13139 | "**/AutoFlushingObjectWriterTest.*" | |
13140 | "**/PackageTest.*" | |
13141 | "**/ResilientOutputStreamTest.*" | |
13142 | ;; And we still don't want to run abstract classes | |
13143 | "**/Abstract*.*") | |
13144 | #:phases | |
13145 | (modify-phases %standard-phases | |
13146 | (add-before 'configure 'chdir | |
13147 | (lambda _ | |
13148 | (chdir "logback-core") | |
13149 | #t))))) | |
13150 | (inputs | |
13151 | `(("java-javax-mail" ,java-javax-mail) | |
4b472f6a | 13152 | ("servlet" ,java-javaee-servletapi) |
7d8207a4 JL |
13153 | ("java-commons-compiler" ,java-commons-compiler) |
13154 | ("java-janino" ,java-janino))) | |
13155 | (native-inputs | |
13156 | `(("java-junit" ,java-junit) | |
13157 | ("java-hamcrest-core" ,java-hamcrest-core) | |
13158 | ("java-mockito-1" ,java-mockito-1) | |
13159 | ("java-cglib" ,java-cglib) | |
13160 | ("java-asm" ,java-asm) | |
13161 | ("java-objenesis" ,java-objenesis) | |
13162 | ("java-joda-time" ,java-joda-time))) | |
13163 | (home-page "https://logback.qos.ch") | |
13164 | (synopsis "Logging for java") | |
13165 | (description "Logback is intended as a successor to the popular log4j project. | |
13166 | This module lays the groundwork for the other two modules.") | |
13167 | ;; Either epl1.0 or lgpl2.1 | |
13168 | (license (list license:epl1.0 | |
13169 | license:lgpl2.1)))) | |
3a69f5f2 JL |
13170 | |
13171 | (define-public java-logback-classic | |
13172 | (package | |
13173 | (inherit java-logback-core) | |
13174 | (name "java-logback-classic") | |
13175 | (arguments | |
13176 | `(#:jar-name "logback-classic.jar" | |
13177 | #:source-dir "src/main/java" | |
13178 | #:test-dir "src/test" | |
13179 | #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix | |
13180 | #:jdk ,icedtea-8 | |
13181 | #:phases | |
13182 | (modify-phases %standard-phases | |
13183 | (add-before 'configure 'chdir | |
13184 | (lambda _ | |
13185 | (chdir "logback-classic") | |
13186 | #t)) | |
13187 | (replace 'build | |
13188 | (lambda* (#:key inputs #:allow-other-keys) | |
13189 | (mkdir-p "build/classes") | |
13190 | (setenv "CLASSPATH" | |
13191 | (string-join | |
13192 | (apply append (map (lambda (input) | |
13193 | (find-files (assoc-ref inputs input) | |
13194 | ".*.jar")) | |
13195 | '("java-logback-core" "java-slf4j-api" | |
4b472f6a | 13196 | "java-commons-compiler" "servlet" |
3a69f5f2 JL |
13197 | "groovy"))) |
13198 | ":")) | |
13199 | (apply invoke "groovyc" "-d" "build/classes" "-j" | |
13200 | (find-files "src/main/" ".*\\.(groovy|java)$")) | |
13201 | (invoke "ant" "jar") | |
13202 | #t))))) | |
13203 | (inputs | |
13204 | `(("java-logback-core" ,java-logback-core) | |
13205 | ("java-slf4j-api" ,java-slf4j-api) | |
13206 | ,@(package-inputs java-logback-core))) | |
13207 | (native-inputs | |
13208 | `(("groovy" ,groovy))) | |
13209 | (description "Logback is intended as a successor to the popular log4j project. | |
13210 | This module can be assimilated to a significantly improved version of log4j. | |
13211 | Moreover, @code{logback-classic} natively implements the slf4j API so that you | |
13212 | can readily switch back and forth between logback and other logging frameworks | |
13213 | such as log4j or @code{java.util.logging} (JUL)."))) | |
ab621bf1 | 13214 | |
c786dff0 LC |
13215 | (define-public java-jgit |
13216 | (package | |
13217 | (name "java-jgit") | |
13218 | (version "4.7.0.201704051617-r") | |
13219 | (source (origin | |
13220 | (method url-fetch) | |
13221 | (uri (string-append "https://repo1.maven.org/maven2/" | |
13222 | "org/eclipse/jgit/org.eclipse.jgit/" | |
13223 | version "/org.eclipse.jgit-" | |
13224 | version "-sources.jar")) | |
13225 | (sha256 | |
13226 | (base32 | |
13227 | "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k")))) | |
13228 | (build-system ant-build-system) | |
13229 | (arguments | |
13230 | `(#:tests? #f ; There are no tests to run. | |
13231 | #:jar-name "jgit.jar" | |
13232 | ;; JGit must be built with a JDK supporting Java 8. | |
13233 | #:jdk ,icedtea-8 | |
13234 | ;; Target our older default JDK. | |
13235 | #:make-flags (list "-Dtarget=1.7") | |
13236 | #:phases | |
13237 | (modify-phases %standard-phases | |
13238 | ;; The jar file generated by the default build.xml does not include | |
13239 | ;; the text properties files, so we need to add them. | |
13240 | (add-after 'build 'add-properties | |
13241 | (lambda* (#:key jar-name #:allow-other-keys) | |
13242 | (with-directory-excursion "src" | |
13243 | (apply invoke "jar" "-uf" | |
13244 | (string-append "../build/jar/" jar-name) | |
13245 | (find-files "." "\\.properties$"))) | |
13246 | #t))))) | |
13247 | (inputs | |
13248 | `(("java-classpathx-servletapi" ,java-classpathx-servletapi) | |
13249 | ("java-javaewah" ,java-javaewah) | |
13250 | ("java-jsch" ,java-jsch) | |
13251 | ("java-slf4j-api" ,java-slf4j-api))) | |
13252 | (home-page "https://eclipse.org/jgit/") | |
13253 | (synopsis "Java library implementing the Git version control system") | |
13254 | (description "JGit is a lightweight, pure Java library implementing the | |
13255 | Git version control system, providing repository access routines, support for | |
13256 | network protocols, and core version control algorithms.") | |
13257 | (license license:edl1.0))) | |
13258 | ||
13259 | ;; For axoloti. This package can still be built with icedtea-7, which is | |
13260 | ;; currently used as the default JDK. | |
13261 | (define-public java-jgit-4.2 | |
13262 | (package (inherit java-jgit) | |
13263 | (version "4.2.0.201601211800-r") | |
13264 | (source (origin | |
13265 | (method url-fetch) | |
13266 | (uri (string-append "https://repo1.maven.org/maven2/" | |
13267 | "org/eclipse/jgit/org.eclipse.jgit/" | |
13268 | version "/org.eclipse.jgit-" | |
13269 | version "-sources.jar")) | |
13270 | (sha256 | |
13271 | (base32 | |
13272 | "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm")))) | |
13273 | (build-system ant-build-system) | |
13274 | (arguments | |
13275 | (substitute-keyword-arguments (package-arguments java-jgit) | |
13276 | ;; Build for default JDK. | |
13277 | ((#:jdk _) icedtea-7) | |
13278 | ((#:phases phases) | |
13279 | `(modify-phases ,phases | |
13280 | (add-after 'unpack 'use-latest-javaewah-API | |
13281 | (lambda _ | |
13282 | (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java" | |
13283 | (("wordinbits") "WORD_IN_BITS")) | |
13284 | #t)))))) | |
13285 | (inputs | |
13286 | `(("java-javaewah" ,java-javaewah) | |
13287 | ("java-jsch" ,java-jsch) | |
13288 | ("java-slf4j-api" ,java-slf4j-api))))) | |
717b6ba6 CZ |
13289 | |
13290 | (define-public abcl | |
13291 | (package | |
13292 | (name "abcl") | |
ae018ad9 | 13293 | (version "1.8.0") |
717b6ba6 CZ |
13294 | (source |
13295 | (origin | |
13296 | (method url-fetch) | |
13297 | (uri (string-append "https://abcl.org/releases/" | |
13298 | version "/abcl-src-" version ".tar.gz")) | |
13299 | (sha256 | |
13300 | (base32 | |
ae018ad9 | 13301 | "0zr5mmqyj484vza089l8vc88d07g0m8ymxzglvar3ydwyvi1x1qx")) |
717b6ba6 CZ |
13302 | (patches |
13303 | (search-patches | |
13304 | "abcl-fix-build-xml.patch")))) | |
13305 | (build-system ant-build-system) | |
13306 | (native-inputs | |
13307 | `(("java-junit" ,java-junit))) | |
13308 | (arguments | |
13309 | `(#:build-target "abcl.jar" | |
13310 | #:test-target "abcl.test" | |
13311 | #:phases | |
13312 | (modify-phases %standard-phases | |
13313 | (replace 'install | |
13314 | (lambda* (#:key outputs #:allow-other-keys) | |
13315 | (let ((share (string-append (assoc-ref outputs "out") | |
13316 | "/share/java/")) | |
13317 | (bin (string-append (assoc-ref outputs "out") | |
13318 | "/bin/"))) | |
13319 | (mkdir-p share) | |
13320 | (install-file "dist/abcl.jar" share) | |
13321 | (install-file "dist/abcl-contrib.jar" share) | |
13322 | (mkdir-p bin) | |
13323 | (with-output-to-file (string-append bin "abcl") | |
13324 | (lambda _ | |
13325 | (let ((classpath (string-append | |
13326 | share "abcl.jar" | |
13327 | ":" | |
13328 | share "abcl-contrib.jar"))) | |
13329 | (display (string-append | |
13330 | "#!" (which "sh") "\n" | |
13331 | "if [[ -z $CLASSPATH ]]; then\n" | |
13332 | " cp=\"" classpath "\"\n" | |
13333 | "else\n" | |
13334 | " cp=\"" classpath ":$CLASSPATH\"\n" | |
13335 | "fi\n" | |
13336 | "exec " (which "java") | |
13337 | " -cp $cp org.armedbear.lisp.Main $@\n"))))) | |
13338 | (chmod (string-append bin "abcl") #o755) | |
13339 | #t)))))) | |
13340 | (home-page "https://abcl.org/") | |
13341 | (synopsis "Common Lisp Implementation on the JVM") | |
13342 | (description | |
13343 | "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common | |
13344 | Lisp language featuring both an interpreter and a compiler, running in the | |
13345 | JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine | |
13346 | in any Java application. Additionally, it can be used to implement (parts of) | |
13347 | the application using Java to Lisp integration APIs.") | |
13348 | (license (list license:gpl2+ | |
13349 | ;; named-readtables is released under 3 clause BSD | |
13350 | license:bsd-3 | |
13351 | ;; jfli is released under CPL 1.0 | |
13352 | license:cpl1.0)))) | |
da655b1e JL |
13353 | |
13354 | (define-public java-jsonp-api | |
13355 | (package | |
13356 | (name "java-jsonp-api") | |
83c4c502 | 13357 | (version "1.1.6") |
da655b1e JL |
13358 | (source (origin |
13359 | (method git-fetch) | |
13360 | (uri (git-reference | |
13361 | (url "https://github.com/eclipse-ee4j/jsonp") | |
83c4c502 | 13362 | (commit (string-append "1.1-" version "-RELEASE")))) |
da655b1e JL |
13363 | (file-name (git-file-name name version)) |
13364 | (sha256 | |
13365 | (base32 | |
83c4c502 | 13366 | "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc")))) |
da655b1e JL |
13367 | (build-system ant-build-system) |
13368 | (arguments | |
13369 | `(#:jar-name "jsonp-api.jar" | |
13370 | #:tests? #f | |
13371 | #:source-dir "api/src/main/java" | |
13372 | #:test-dir "api/src/test")) | |
13373 | (home-page "https://eclipse-ee4j.github.io/jsonp/") | |
13374 | (synopsis "JSON Processing in Java") | |
13375 | (description "JSON Processing (JSON-P) is a Java API to process (e.g. | |
13376 | parse, generate, transform and query) JSON messages. It produces and | |
13377 | consumes JSON text in a streaming fashion (similar to StAX API for XML) | |
44a057a1 | 13378 | and allows building a Java object model for JSON text using API classes |
da655b1e JL |
13379 | (similar to DOM API for XML).") |
13380 | ;; either gpl2 only with classpath exception, or epl2.0. | |
13381 | (license (list license:gpl2 | |
13382 | license:epl2.0)))) | |
d45f73c9 JL |
13383 | |
13384 | (define-public java-jsonp-impl | |
13385 | (package | |
13386 | (inherit java-jsonp-api) | |
13387 | (name "java-jsonp-impl") | |
13388 | (arguments | |
13389 | `(#:jar-name "jsonp-impl.jar" | |
13390 | #:tests? #f | |
13391 | #:source-dir "impl/src/main/java" | |
83c4c502 JL |
13392 | #:test-dir "impl/src/test" |
13393 | #:phases | |
13394 | (modify-phases %standard-phases | |
13395 | (add-before 'build 'copy-resources | |
13396 | (lambda _ | |
13397 | (copy-recursively | |
13398 | "impl/src/main/resources/" | |
13399 | "build/classes") | |
13400 | #t))))) | |
d45f73c9 JL |
13401 | (propagated-inputs |
13402 | `(("java-jsonp-api" ,java-jsonp-api))) | |
13403 | (description "JSON Processing (JSON-P) is a Java API to process (e.g. | |
13404 | parse, generate, transform and query) JSON messages. This package contains | |
13405 | a reference implementation of that API."))) | |
357f4564 JL |
13406 | |
13407 | (define-public java-xmp | |
13408 | (package | |
13409 | (name "java-xmp") | |
13410 | (version "5.1.3") | |
13411 | (source (origin | |
13412 | (method url-fetch) | |
13413 | (uri (string-append "http://download.macromedia.com/pub/developer" | |
13414 | "/xmp/sdk/XMPCoreJava-" version ".zip")) | |
13415 | (sha256 | |
13416 | (base32 | |
13417 | "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7")))) | |
13418 | (build-system ant-build-system) | |
13419 | (arguments | |
13420 | `(#:build-target "build" | |
13421 | #:tests? #f; no tests | |
13422 | #:phases | |
13423 | (modify-phases %standard-phases | |
13424 | (add-after 'unpack 'chdir | |
13425 | (lambda _ | |
13426 | (chdir "XMPCore") | |
13427 | #t)) | |
13428 | (add-before 'build 'fix-timestamp | |
13429 | (lambda _ | |
13430 | (substitute* "build.xml" | |
13431 | (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT")) | |
13432 | #t)) | |
13433 | (replace 'install | |
13434 | (install-jars ".")) | |
13435 | (add-after 'install 'install-doc | |
13436 | (lambda* (#:key outputs #:allow-other-keys) | |
13437 | (copy-recursively | |
13438 | "docs" | |
13439 | (string-append (assoc-ref outputs "out") "/share/doc/java-xmp")) | |
13440 | #t))))) | |
13441 | (native-inputs | |
13442 | `(("unzip" ,unzip))) | |
13443 | (home-page "https://www.adobe.com/devnet/xmp.html") | |
13444 | (synopsis "Extensible Metadat Platform (XMP) support in Java") | |
13445 | (description "Adobe's Extensible Metadata Platform (XMP) is a labeling | |
13446 | technology that allows you to embed data about a file, known as metadata, | |
13447 | into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore | |
13448 | library and the API is similar.") | |
13449 | (license license:bsd-3))) | |
a005c63a | 13450 | |
8116c9d7 RW |
13451 | (define-public java-args4j |
13452 | (package | |
13453 | (name "java-args4j") | |
13454 | (version "2.33") | |
13455 | (source (origin | |
13456 | (method git-fetch) | |
13457 | (uri (git-reference | |
13458 | (url "https://github.com/kohsuke/args4j") | |
13459 | (commit (string-append "args4j-site-" version)))) | |
1535c07e | 13460 | (file-name (git-file-name name version)) |
8116c9d7 RW |
13461 | (sha256 |
13462 | (base32 | |
13463 | "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s")))) | |
13464 | (build-system ant-build-system) | |
13465 | (arguments | |
13466 | `(#:jar-name "args4j.jar" | |
13467 | #:source-dir "args4j/src" | |
13468 | #:test-dir "args4j/test" | |
13469 | #:test-exclude | |
13470 | (list "**/ExampleTest.*" | |
13471 | "**/ExternalConfiguredTest.*" ; fails to find a file | |
13472 | ;; We still don't want to run abstract classes | |
13473 | "**/Abstract*.*") | |
13474 | #:phases | |
13475 | (modify-phases %standard-phases | |
13476 | (add-before 'check 'fix-test-dir | |
13477 | (lambda _ | |
13478 | (substitute* "build.xml" | |
13479 | (("/java\">") "\">")) | |
13480 | #t)) | |
13481 | (add-before 'build 'copy-resources | |
13482 | (lambda _ | |
13483 | (let ((from-prefix "args4j/src/org/kohsuke/args4j/") | |
13484 | (to-prefix "build/classes/org/kohsuke/args4j/")) | |
13485 | (for-each (lambda (f) | |
13486 | (install-file | |
13487 | (string-append from-prefix f) | |
13488 | (string-append to-prefix (dirname f)))) | |
13489 | (list "Messages.properties" | |
13490 | "Messages_de.properties" | |
13491 | "Messages_en.properties" | |
13492 | "Messages_ru.properties" | |
13493 | "spi/Messages.properties" | |
13494 | "spi/Messages_de.properties" | |
13495 | "spi/Messages_en.properties" | |
13496 | "spi/Messages_ru.properties"))) | |
13497 | #t))))) | |
13498 | (native-inputs | |
13499 | `(("java-junit" ,java-junit))) | |
13500 | (home-page "https://args4j.kohsuke.org/") | |
13501 | (synopsis "Command line parser library") | |
13502 | (description "Args4j is a small Java class library that makes it easy to | |
13503 | parse command line options/arguments in your CUI application.") | |
13504 | (license license:expat))) | |
13505 | ||
a005c63a JL |
13506 | (define-public java-metadata-extractor |
13507 | (package | |
13508 | (name "java-metadata-extractor") | |
13509 | (version "2.11.0") | |
13510 | (source (origin | |
13511 | (method git-fetch) | |
13512 | (uri (git-reference | |
13513 | (url "https://github.com/drewnoakes/metadata-extractor") | |
13514 | (commit version))) | |
13515 | (file-name (git-file-name name version)) | |
13516 | (sha256 | |
13517 | (base32 | |
13518 | "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj")))) | |
13519 | (build-system ant-build-system) | |
13520 | (arguments | |
13521 | `(#:jar-name "metadata-extractor.jar" | |
13522 | #:source-dir "Source" | |
13523 | #:test-dir "Tests" | |
13524 | #:phases | |
13525 | (modify-phases %standard-phases | |
13526 | (add-before 'check 'fix-test-dir | |
13527 | (lambda _ | |
13528 | (substitute* "build.xml" | |
13529 | (("/java\">") "\">")) | |
13530 | #t))))) | |
13531 | (propagated-inputs | |
13532 | `(("java-xmp" ,java-xmp))) | |
13533 | (native-inputs | |
13534 | `(("java-hamcrest-core" ,java-hamcrest-core) | |
13535 | ("java-junit" ,java-junit))) | |
13536 | (home-page "https://github.com/drewnoakes/metadata-extractor") | |
13537 | (synopsis "Extract metadata from image and video files") | |
13538 | (description "Metadata-extractor is a straightforward Java library for | |
13539 | reading metadata from image files. It is able to read metadata in Exif, | |
13540 | IPTC, XMP, ICC and more formats.") | |
13541 | (license license:asl2.0))) | |
0dd6089d JL |
13542 | |
13543 | (define-public java-svg-salamander | |
13544 | (package | |
13545 | (name "java-svg-salamander") | |
13546 | (version "1.1.2") | |
13547 | (source (origin | |
13548 | (method git-fetch) | |
13549 | (uri (git-reference | |
13550 | (url "https://github.com/blackears/svgSalamander") | |
13551 | (commit (string-append "v" version)))) | |
13552 | (file-name (git-file-name name version)) | |
13553 | (sha256 | |
13554 | (base32 | |
13555 | "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf")) | |
13556 | (modules '((guix build utils))) | |
13557 | (snippet | |
58c3a4f5 BH |
13558 | '(begin |
13559 | (for-each delete-file (find-files "." ".*.jar")) | |
13560 | #t)) | |
0dd6089d JL |
13561 | (patches |
13562 | (search-patches "java-svg-salamander-Fix-non-det.patch")))) | |
13563 | (build-system ant-build-system) | |
13564 | (arguments | |
13565 | `(#:tests? #f; no tests | |
13566 | #:phases | |
13567 | (modify-phases %standard-phases | |
13568 | (add-after 'unpack 'chdir | |
13569 | (lambda _ | |
13570 | (chdir "svg-core") | |
13571 | #t)) | |
13572 | (add-before 'build 'copy-jars | |
13573 | (lambda* (#:key inputs #:allow-other-keys) | |
13574 | (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$")) | |
13575 | "../libraries/javacc.jar") | |
13576 | (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$")) | |
13577 | "../libraries/ant.jar") | |
13578 | #t)) | |
13579 | (replace 'install | |
13580 | (install-jars "dist"))))) | |
13581 | (native-inputs | |
13582 | `(("javacc" ,javacc))) | |
13583 | (home-page "https://github.com/blackears/svgSalamander") | |
13584 | (synopsis "SVG engine for Java") | |
13585 | (description "SVG Salamander is an SVG engine for Java that's designed | |
13586 | to be small, fast, and allow programmers to use it with a minimum of fuss. | |
13587 | It's in particular targeted for making it easy to integrate SVG into Java | |
13588 | games and making it much easier for artists to design 2D game content - from | |
13589 | rich interactive menus to charts and graphcs to complex animations.") | |
13590 | (license license:bsd-2))) | |
ff56e6ef JL |
13591 | |
13592 | (define-public java-jboss-transaction-api-spec | |
13593 | (package | |
13594 | (name "java-jboss-transaction-api-spec") | |
13595 | (version "1.2+1.1.1") | |
13596 | (source (origin | |
13597 | (method git-fetch) | |
13598 | (uri (git-reference | |
13599 | (url "https://github.com/jboss/jboss-transaction-api_spec") | |
13600 | (commit "jboss-transaction-api_1.2_spec-1.1.1.Final"))) | |
13601 | (file-name (git-file-name name version)) | |
13602 | (sha256 | |
13603 | (base32 | |
13604 | "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy")))) | |
13605 | (build-system ant-build-system) | |
13606 | (arguments | |
13607 | `(#:jar-name "java-jboss-transaction-api_spec.jar" | |
13608 | #:source-dir "src/main/java" | |
13609 | #:tests? #f)); no tests | |
13610 | (inputs | |
13611 | `(("java-cdi-api" ,java-cdi-api) | |
13612 | ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec))) | |
13613 | (home-page "https://github.com/jboss/jboss-transaction-api_spec") | |
13614 | (synopsis "Generic transaction management API in Java") | |
13615 | (description "Java-jboss-transaction-api-spec implements the Transactions | |
13616 | API. A transaction is a unit of work containing one or more operations | |
13617 | involving one or more shared resources having ACID (Atomicity, Consistency, | |
13618 | Isolation and Durability) properties.") | |
13619 | ;; either gpl2 only with classpath exception or cddl. | |
13620 | (license (list license:gpl2 license:cddl1.0)))) | |
8ba990e6 JL |
13621 | |
13622 | (define-public java-picocli | |
13623 | (package | |
13624 | (name "java-picocli") | |
13625 | (version "4.3.2") | |
13626 | (source (origin | |
13627 | (method git-fetch) | |
13628 | (uri (git-reference | |
13629 | (url "https://github.com/remkop/picocli") | |
13630 | (commit (string-append "v" version)))) | |
b5698f5b | 13631 | (file-name (git-file-name name version)) |
8ba990e6 JL |
13632 | (sha256 |
13633 | (base32 | |
13634 | "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c")))) | |
13635 | (build-system ant-build-system) | |
13636 | (arguments | |
13637 | `(#:jar-name "picocli.jar" | |
13638 | #:source-dir "src/main/java" | |
13639 | ;; Tests require missing dependencies (junitparams, system-rules) | |
13640 | #:tests? #f)) | |
13641 | (home-page "https://picocli.info") | |
13642 | (synopsis "REPL for the JVM") | |
13643 | (description "Picocli is a framework for building command line applications | |
13644 | for the JVM. It supports colors, autocompletion, subcommands, and more. Written | |
13645 | in Java, usable from Groovy, Kotlin, Scala, etc.") | |
13646 | (license license:asl2.0))) | |
a5f8d4e0 JL |
13647 | |
13648 | (define-public java-jetbrains-annotations | |
13649 | (package | |
13650 | (name "java-jetbrains-annotations") | |
13651 | (version "19.0.0") | |
13652 | (source (origin | |
13653 | (method git-fetch) | |
13654 | (uri (git-reference | |
13655 | (url "https://github.com/JetBrains/java-annotations") | |
13656 | (commit version))) | |
13657 | (file-name (git-file-name name version)) | |
13658 | (sha256 | |
13659 | (base32 | |
13660 | "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v")))) | |
13661 | (build-system ant-build-system) | |
13662 | (arguments | |
13663 | `(#:jar-name "jetbrains-annotations.jar" | |
13664 | #:source-dir "common/src/main/java:java8/src/main/java" | |
13665 | #:tests? #f)); no tests | |
13666 | (home-page "https://github.com/JetBrains/java-annotations") | |
13667 | (synopsis "Annotations for Java and other JVM languages") | |
13668 | (description "This package contains a set of Java annotations which can be | |
13669 | used in JVM-based languages. They serve as an additional documentation and | |
13670 | can be interpreted by IDEs and static analysis tools to improve code analysis.") | |
13671 | (license license:expat))) | |
491ed320 JL |
13672 | |
13673 | (define-public java-javaparser | |
13674 | (package | |
13675 | (name "java-javaparser") | |
13676 | (version "3.16.1") | |
13677 | (source (origin | |
13678 | (method git-fetch) | |
13679 | (uri (git-reference | |
13680 | (url "https://github.com/javaparser/javaparser") | |
13681 | (commit (string-append "javaparser-parent-" version)))) | |
13682 | (file-name (git-file-name name version)) | |
13683 | (sha256 | |
13684 | (base32 | |
13685 | "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9")) | |
13686 | (modules '((guix build utils))) | |
13687 | (snippet | |
13688 | '(begin | |
13689 | (for-each delete-file | |
13690 | (find-files "." "\\.jar$")) | |
13691 | #t)))) | |
13692 | (build-system ant-build-system) | |
13693 | (arguments | |
13694 | `(#:tests? #f; tests require jbehave and junit5 | |
13695 | #:phases | |
13696 | (modify-phases %standard-phases | |
13697 | (add-before 'build 'fill-template | |
13698 | (lambda _ | |
13699 | (with-directory-excursion "javaparser-core/src/main" | |
13700 | (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java" | |
13701 | "java/com/github/javaparser/JavaParserBuild.java") | |
13702 | (substitute* "java/com/github/javaparser/JavaParserBuild.java" | |
13703 | (("\\$\\{project.version\\}") ,version) | |
13704 | (("\\$\\{project.name\\}") "javaparser") | |
13705 | (("\\$\\{project.build.finalName\\}") "javaparser") | |
13706 | (("\\$\\{maven.version\\}") "fake") | |
13707 | (("\\$\\{maven.build.version\\}") "fake") | |
13708 | (("\\$\\{build.timestamp\\}") "0") | |
13709 | (("\\$\\{java.vendor\\}") "Guix") | |
13710 | (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix") | |
13711 | (("\\$\\{java.version\\}") "1.8") | |
13712 | (("\\$\\{os.arch\\}") "any") | |
13713 | (("\\$\\{os.name\\}") "GuixSD") | |
13714 | (("\\$\\{os.version\\}") "not available"))) | |
13715 | #t)) | |
13716 | (add-before 'build 'generate-javacc | |
13717 | (lambda _ | |
13718 | (with-directory-excursion "javaparser-core/src/main/java" | |
13719 | (invoke "java" "javacc" "../javacc/java.jj")) | |
13720 | #t)) | |
13721 | (add-before 'build 'copy-javacc-support | |
13722 | (lambda _ | |
13723 | (with-directory-excursion "javaparser-core/src/main" | |
13724 | (copy-recursively "javacc-support" "java")) | |
13725 | #t)) | |
13726 | (replace 'build | |
13727 | (lambda _ | |
13728 | (define (build name) | |
13729 | (format #t "Building ~a~%" name) | |
13730 | (delete-file-recursively "build/classes") | |
13731 | (mkdir-p "build/classes") | |
13732 | (apply invoke "javac" | |
13733 | "-cp" (string-append (getenv "CLASSPATH") ":" | |
13734 | (string-join (find-files "build/jar" ".") | |
13735 | ":")) | |
13736 | "-d" "build/classes" | |
13737 | (find-files (string-append name "/src/main/java") | |
13738 | ".*.java")) | |
13739 | (invoke "jar" "-cf" (string-append "build/jar/" name ".jar") | |
13740 | "-C" "build/classes" ".")) | |
13741 | (mkdir-p "build/classes") | |
13742 | (mkdir-p "build/test-classes") | |
13743 | (mkdir-p "build/jar") | |
13744 | (build "javaparser-core") | |
13745 | (build "javaparser-core-serialization") | |
13746 | (build "javaparser-core-generators") | |
13747 | (build "javaparser-core-metamodel-generator") | |
13748 | (build "javaparser-symbol-solver-core") | |
13749 | #t)) | |
13750 | (replace 'install | |
13751 | (install-jars "build/jar"))))) | |
13752 | (inputs | |
13753 | `(("java-guava" ,java-guava) | |
13754 | ("java-jboss-javassist" ,java-jboss-javassist) | |
13755 | ("java-jsonp-api" ,java-jsonp-api))) | |
13756 | (native-inputs | |
13757 | `(("javacc" ,javacc))) | |
13758 | (home-page "http://javaparser.org/") | |
13759 | (synopsis "Parser for Java") | |
13760 | (description | |
13761 | "This project contains a set of libraries implementing a Java 1.0 - Java | |
13762 | 11 Parser with advanced analysis functionalities.") | |
13763 | (license (list | |
13764 | ;; either lgpl or asl | |
13765 | license:lgpl3+ | |
13766 | license:asl2.0)))) |