Commit | Line | Data |
---|---|---|
0760e3a1 | 1 | ;;; GNU Guix --- Functional package management for GNU |
b7a1cac6 | 2 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 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> |
60f5ab0b | 13 | ;;; Copyright © 2019, 2020 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> | |
0760e3a1 RW |
17 | ;;; |
18 | ;;; This file is part of GNU Guix. | |
19 | ;;; | |
20 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
21 | ;;; under the terms of the GNU General Public License as published by | |
22 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
23 | ;;; your option) any later version. | |
24 | ;;; | |
25 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
26 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
27 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
28 | ;;; GNU General Public License for more details. | |
29 | ;;; | |
30 | ;;; You should have received a copy of the GNU General Public License | |
31 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
32 | ||
33 | (define-module (gnu packages java) | |
34 | #:use-module ((guix licenses) #:prefix license:) | |
35 | #:use-module (guix packages) | |
36 | #:use-module (guix download) | |
62c9bfaa | 37 | #:use-module (guix hg-download) |
72885a4c | 38 | #:use-module (guix git-download) |
78745d33 | 39 | #:use-module (guix svn-download) |
77ae4145 | 40 | #:use-module ((guix build utils) #:select (alist-replace)) |
f6789047 | 41 | #:use-module (guix utils) |
068e476f | 42 | #:use-module (guix build-system ant) |
0760e3a1 | 43 | #:use-module (guix build-system gnu) |
6a5829d9 | 44 | #:use-module (guix build-system trivial) |
0760e3a1 RW |
45 | #:use-module (gnu packages) |
46 | #:use-module (gnu packages attr) | |
47 | #:use-module (gnu packages autotools) | |
48 | #:use-module (gnu packages base) | |
49 | #:use-module (gnu packages bash) | |
f21403e2 | 50 | #:use-module (gnu packages certs) |
0760e3a1 RW |
51 | #:use-module (gnu packages cpio) |
52 | #:use-module (gnu packages cups) | |
53 | #:use-module (gnu packages compression) | |
dd741059 | 54 | #:use-module (gnu packages elf) |
0760e3a1 RW |
55 | #:use-module (gnu packages fontutils) |
56 | #:use-module (gnu packages gawk) | |
72885a4c | 57 | #:use-module (gnu packages gettext) |
8581c813 | 58 | #:use-module (gnu packages gl) |
0760e3a1 RW |
59 | #:use-module (gnu packages ghostscript) ;lcms |
60 | #:use-module (gnu packages gnome) | |
3a69f5f2 | 61 | #:use-module (gnu packages groovy) |
0760e3a1 | 62 | #:use-module (gnu packages gtk) |
6a5829d9 | 63 | #:use-module (gnu packages guile) |
afb5858d | 64 | #:use-module (gnu packages icu4c) |
0760e3a1 | 65 | #:use-module (gnu packages image) |
24155bf4 | 66 | #:use-module (gnu packages java-compression) |
c4fd86f9 | 67 | #:use-module (gnu packages libffi) |
0760e3a1 | 68 | #:use-module (gnu packages linux) ;alsa |
2f0d0418 | 69 | #:use-module (gnu packages maths) |
015e8774 | 70 | #:use-module (gnu packages maven) |
b916b638 | 71 | #:use-module (gnu packages maven-parent-pom) |
aff0cce9 | 72 | #:use-module (gnu packages nss) |
bcb078a4 | 73 | #:use-module (gnu packages onc-rpc) |
5766984b | 74 | #:use-module (gnu packages web) |
0760e3a1 | 75 | #:use-module (gnu packages wget) |
0760e3a1 RW |
76 | #:use-module (gnu packages pkg-config) |
77 | #:use-module (gnu packages perl) | |
c4fd86f9 | 78 | #:use-module (gnu packages popt) |
89e34644 | 79 | #:use-module (gnu packages kerberos) |
0760e3a1 RW |
80 | #:use-module (gnu packages xml) |
81 | #:use-module (gnu packages xorg) | |
f6789047 | 82 | #:use-module (gnu packages texinfo) |
2d15f601 RW |
83 | #:use-module ((srfi srfi-1) #:select (fold alist-delete)) |
84 | #:use-module (srfi srfi-11) | |
85 | #:use-module (ice-9 match)) | |
0760e3a1 | 86 | |
e1ae3587 RW |
87 | \f |
88 | ;;; | |
89 | ;;; Java bootstrap toolchain. | |
90 | ;;; | |
91 | ||
92 | ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We | |
269fb7d3 RW |
93 | ;; use it to build a simple version of GNU Classpath, the Java standard |
94 | ;; library. We chose version 0.93 because it is the last version that can be | |
95 | ;; built with Jikes. With Jikes and this version of GNU Classpath we can | |
96 | ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is | |
97 | ;; the last version of JamVM that works with a version of GNU classpath that | |
98 | ;; does not require ECJ. These three packages make up the bootstrap JDK. | |
99 | ||
100 | ;; This is sufficient to build an older version of Ant, which is needed to | |
101 | ;; build an older version of ECJ, an incremental Java compiler, both of which | |
102 | ;; are written in Java. | |
e1ae3587 | 103 | ;; |
269fb7d3 RW |
104 | ;; ECJ is needed to build the latest release (0.99) and the development |
105 | ;; version of GNU Classpath. The development version of GNU Classpath has | |
106 | ;; much more support for Java 1.6 than the latest release, but we need to | |
107 | ;; build 0.99 first to get a working version of javah. ECJ, the development | |
108 | ;; version of GNU Classpath, and the latest version of JamVM make up the | |
109 | ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x | |
110 | ;; build framework. We then build the more recent JDKs Icedtea 2.x and | |
111 | ;; Icedtea 3.x. | |
e1ae3587 | 112 | |
f1cf62f5 RG |
113 | (define-public libantlr3c |
114 | (package | |
115 | (name "libantlr3c") | |
116 | (version "3.4") | |
117 | (source | |
118 | (origin | |
119 | (method url-fetch) | |
120 | (uri | |
121 | (string-append "https://www.antlr3.org/download/C/" | |
122 | name "-" version ".tar.gz")) | |
123 | (sha256 | |
124 | (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa")))) | |
125 | (build-system gnu-build-system) | |
126 | (arguments | |
127 | `(#:configure-flags (list "--enable-debuginfo" "--disable-static") | |
128 | #:phases (modify-phases %standard-phases | |
129 | (replace 'configure | |
130 | (lambda* (#:key build target native-inputs inputs outputs | |
131 | (configure-flags '()) out-of-source? system | |
132 | #:allow-other-keys) | |
133 | (let ((configure (assoc-ref %standard-phases 'configure)) | |
134 | (enable-64bit? (member system '("aarch64-linux" | |
135 | "x86_64-linux" | |
136 | "mips64el-linux")))) | |
137 | (configure #:build build #:target target | |
138 | #:native-inputs native-inputs | |
139 | #:inputs inputs #:outputs outputs | |
140 | #:configure-flags `(,(if enable-64bit? | |
141 | "--enable-64bit" | |
142 | '()) | |
143 | ,@configure-flags) | |
144 | #:out-of-source? out-of-source?))))))) | |
145 | (synopsis "ANTLR C Library") | |
146 | (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother | |
147 | Tool for Language Recognition v3).") | |
148 | (home-page "https://www.antlr3.org/") | |
149 | (license license:bsd-3))) | |
150 | ||
e1ae3587 RW |
151 | (define jikes |
152 | (package | |
153 | (name "jikes") | |
154 | (version "1.22") | |
155 | (source (origin | |
156 | (method url-fetch) | |
157 | (uri (string-append "mirror://sourceforge/jikes/Jikes/" | |
158 | version "/jikes-" version ".tar.bz2")) | |
159 | (sha256 | |
160 | (base32 | |
161 | "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c")))) | |
162 | (build-system gnu-build-system) | |
163 | (home-page "http://jikes.sourceforge.net/") | |
164 | (synopsis "Compiler for the Java language") | |
165 | (description "Jikes is a compiler that translates Java source files as | |
166 | defined in The Java Language Specification into the bytecoded instruction set | |
167 | and binary format defined in The Java Virtual Machine Specification.") | |
168 | (license license:ibmpl1.0))) | |
169 | ||
880939c1 PN |
170 | (define-public drip |
171 | ;; Last release is from 2014, with a few important commits afterwards. | |
172 | (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08")) | |
173 | (package | |
174 | (name "drip") | |
175 | (version (git-version "0.2.4" "1" commit)) | |
176 | (source (origin | |
177 | (method git-fetch) | |
178 | (uri (git-reference | |
179 | (url "https://github.com/ninjudd/drip") | |
180 | (commit commit))) | |
181 | (file-name (git-file-name name version)) | |
182 | (sha256 | |
183 | (base32 | |
184 | "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2")))) | |
185 | (build-system gnu-build-system) | |
186 | (native-inputs | |
187 | `(("jdk" ,icedtea "jdk"))) | |
188 | (arguments | |
189 | `(#:tests? #f ; No tests. | |
190 | #:phases | |
191 | (modify-phases %standard-phases | |
192 | (delete 'configure) | |
193 | (add-before 'install 'fix-wrapper | |
194 | (lambda* (#:key inputs #:allow-other-keys) | |
195 | (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps"))) | |
196 | (substitute* "bin/drip" | |
197 | (("jps") jps) | |
198 | (("brew update && brew upgrade drip") "guix pull && guix install drip") | |
199 | ;; No need to make: | |
200 | (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "") | |
201 | ;; No need to include source: | |
202 | (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]") | |
203 | "true")) | |
204 | #t))) | |
205 | (replace 'install | |
206 | (lambda* (#:key outputs #:allow-other-keys) | |
207 | (let* ((out (assoc-ref outputs "out")) | |
208 | (bin (string-append out "/bin")) | |
209 | (share (string-append out "/share/drip"))) | |
210 | (mkdir-p bin) | |
211 | (for-each | |
212 | (lambda (file) | |
213 | (install-file (string-append "bin/" file) bin)) | |
214 | '("drip" "drip_daemon" "drip_proxy")) | |
215 | (install-file "drip.jar" share) | |
216 | (substitute* (string-append bin "/drip") | |
217 | (("drip_dir=\\$bin_dir/..") | |
218 | (string-append "drip_dir=" share))) | |
219 | #t)))))) | |
220 | (home-page "https://github.com/ninjudd/drip") | |
221 | (synopsis "Faster Java Virtual Machine launching") | |
222 | (description "Drip is a launcher for the Java Virtual Machine that | |
223 | provides much faster startup times than the @command{java} command. The @command{drip} | |
224 | script is intended to be a drop-in replacement for the @command{java} command, | |
225 | only faster.") | |
226 | (license license:epl1.0)))) | |
227 | ||
45f762ee RW |
228 | ;; This is the last version of GNU Classpath that can be built without ECJ. |
229 | (define classpath-bootstrap | |
2551fee8 | 230 | (package |
45f762ee RW |
231 | (name "classpath") |
232 | (version "0.93") | |
2551fee8 RW |
233 | (source (origin |
234 | (method url-fetch) | |
45f762ee RW |
235 | (uri (string-append "mirror://gnu/classpath/classpath-" |
236 | version ".tar.gz")) | |
2551fee8 RW |
237 | (sha256 |
238 | (base32 | |
bab9793f EF |
239 | "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz")) |
240 | (patches (search-patches "classpath-aarch64-support.patch")))) | |
2551fee8 RW |
241 | (build-system gnu-build-system) |
242 | (arguments | |
243 | `(#:configure-flags | |
45f762ee RW |
244 | (list (string-append "JAVAC=" |
245 | (assoc-ref %build-inputs "jikes") | |
246 | "/bin/jikes") | |
2551fee8 RW |
247 | "--disable-Werror" |
248 | "--disable-gmp" | |
249 | "--disable-gtk-peer" | |
45f762ee | 250 | "--disable-gconf-peer" |
2551fee8 RW |
251 | "--disable-plugin" |
252 | "--disable-dssi" | |
253 | "--disable-alsa" | |
45f762ee RW |
254 | "--disable-gjdoc") |
255 | #:phases | |
256 | (modify-phases %standard-phases | |
4fb59c9e RW |
257 | ;; XXX: This introduces a memory leak as we remove a call to free up |
258 | ;; memory for the file name string. This was necessary because of a | |
259 | ;; runtime error that would have prevented us from building | |
260 | ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685 | |
261 | ;; for the gnarly details. | |
262 | (add-after 'unpack 'remove-call-to-free | |
263 | (lambda _ | |
264 | (substitute* "native/jni/java-io/java_io_VMFile.c" | |
265 | (("result = cpio_isFileExists.*" m) | |
266 | (string-append m "\n//"))) | |
267 | #t)) | |
45f762ee | 268 | (add-after 'install 'install-data |
0c66a4eb | 269 | (lambda _ (invoke "make" "install-data")))))) |
2551fee8 RW |
270 | (native-inputs |
271 | `(("jikes" ,jikes) | |
272 | ("fastjar" ,fastjar) | |
45f762ee | 273 | ("libltdl" ,libltdl) |
2551fee8 | 274 | ("pkg-config" ,pkg-config))) |
45f762ee RW |
275 | (home-page "https://www.gnu.org/software/classpath/") |
276 | (synopsis "Essential libraries for Java") | |
277 | (description "GNU Classpath is a project to create core class libraries | |
278 | for use with runtimes, compilers and tools for the Java programming | |
279 | language.") | |
280 | ;; GPLv2 or later, with special linking exception. | |
281 | (license license:gpl2+))) | |
57f6c50d | 282 | |
063629aa RW |
283 | ;; This is the last version of JamVM that works with a version of GNU |
284 | ;; classpath that does not require ECJ. | |
285 | (define jamvm-1-bootstrap | |
57f6c50d | 286 | (package |
063629aa RW |
287 | (name "jamvm") |
288 | (version "1.5.1") | |
57f6c50d RW |
289 | (source (origin |
290 | (method url-fetch) | |
063629aa RW |
291 | (uri (string-append "mirror://sourceforge/jamvm/jamvm/" |
292 | "JamVM%20" version "/jamvm-" | |
293 | version ".tar.gz")) | |
6c9dca5a SS |
294 | (patches (search-patches "jamvm-1.5.1-aarch64-support.patch" |
295 | "jamvm-1.5.1-armv7-support.patch")) | |
57f6c50d RW |
296 | (sha256 |
297 | (base32 | |
cff1e095 AŠ |
298 | "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36")) |
299 | (snippet | |
300 | '(begin | |
301 | ;; Remove precompiled software. | |
302 | (delete-file "lib/classes.zip") | |
303 | #t)))) | |
57f6c50d RW |
304 | (build-system gnu-build-system) |
305 | (arguments | |
c4fd86f9 | 306 | `(#:configure-flags |
063629aa | 307 | (list (string-append "--with-classpath-install-dir=" |
fc37b4af RW |
308 | (assoc-ref %build-inputs "classpath")) |
309 | "--disable-int-caching" | |
310 | "--enable-runtime-reloc-checks" | |
6c9dca5a SS |
311 | "--enable-ffi") |
312 | #:phases | |
313 | ,(if (string-prefix? "aarch64" (or (%current-system) | |
314 | (%current-target-system))) | |
315 | ;; Makefiles and the configure script need to be regenerated to | |
316 | ;; incorporate support for AArch64. | |
317 | '(modify-phases %standard-phases | |
318 | (replace 'bootstrap | |
319 | (lambda _ (invoke "autoreconf" "-vif")))) | |
320 | '%standard-phases))) | |
57f6c50d | 321 | (inputs |
063629aa | 322 | `(("classpath" ,classpath-bootstrap) |
57f6c50d | 323 | ("jikes" ,jikes) |
fc37b4af | 324 | ("libffi" ,libffi) |
cff1e095 | 325 | ("zip" ,zip) |
063629aa | 326 | ("zlib" ,zlib))) |
6c9dca5a SS |
327 | (native-inputs |
328 | (if (string-prefix? "aarch64" (or (%current-system) | |
329 | (%current-target-system))) | |
330 | ;; Additional packages needed for autoreconf. | |
331 | `(("autoconf" ,autoconf) | |
332 | ("automake" ,automake) | |
333 | ("libtool" ,libtool)) | |
334 | '())) | |
063629aa RW |
335 | (home-page "http://jamvm.sourceforge.net/") |
336 | (synopsis "Small Java Virtual Machine") | |
337 | (description "JamVM is a Java Virtual Machine conforming to the JVM | |
338 | specification edition 2 (blue book). It is extremely small. However, unlike | |
339 | other small VMs it supports the full spec, including object finalisation and | |
340 | JNI.") | |
341 | (license license:gpl2+))) | |
2551fee8 | 342 | |
5783bd77 RW |
343 | (define ant-bootstrap |
344 | (package | |
345 | (name "ant-bootstrap") | |
346 | ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which | |
347 | ;; are not supported. The 1.8.x series is the last to use only features | |
ff4d9fdf RW |
348 | ;; supported by Jikes. |
349 | (version "1.8.4") | |
5783bd77 RW |
350 | (source (origin |
351 | (method url-fetch) | |
9a01efa2 | 352 | (uri (string-append "mirror://apache/" |
5783bd77 RW |
353 | "ant/source/apache-ant-" |
354 | version "-src.tar.bz2")) | |
355 | (sha256 | |
356 | (base32 | |
ff4d9fdf | 357 | "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx")))) |
5783bd77 RW |
358 | (build-system gnu-build-system) |
359 | (arguments | |
cded3a75 GB |
360 | `(#:imported-modules ((guix build syscalls) |
361 | ,@%gnu-build-system-modules) | |
362 | #:modules ((srfi srfi-1) | |
363 | (guix build gnu-build-system) | |
364 | (guix build utils) | |
365 | (guix build syscalls)) | |
366 | #:tests? #f ; no "check" target | |
5783bd77 RW |
367 | #:phases |
368 | (modify-phases %standard-phases | |
d4fd4c3a | 369 | (delete 'bootstrap) |
5783bd77 RW |
370 | (delete 'configure) |
371 | (replace 'build | |
372 | (lambda* (#:key inputs #:allow-other-keys) | |
aa432388 | 373 | (setenv "JAVA_HOME" (assoc-ref inputs "jamvm")) |
5783bd77 | 374 | (setenv "JAVACMD" |
aa432388 RW |
375 | (string-append (assoc-ref inputs "jamvm") |
376 | "/bin/jamvm")) | |
5783bd77 | 377 | (setenv "JAVAC" |
aa432388 RW |
378 | (string-append (assoc-ref inputs "jikes") |
379 | "/bin/jikes")) | |
380 | (setenv "CLASSPATH" | |
381 | (string-append (assoc-ref inputs "jamvm") | |
382 | "/lib/rt.jar")) | |
5783bd77 | 383 | |
d4fd4c3a RW |
384 | ;; Ant complains if this file doesn't exist. |
385 | (setenv "HOME" "/tmp") | |
386 | (with-output-to-file "/tmp/.ant.properties" | |
387 | (lambda _ (display ""))) | |
5783bd77 RW |
388 | |
389 | ;; Use jikes instead of javac for <javac ...> tags in build.xml | |
390 | (setenv "ANT_OPTS" "-Dbuild.compiler=jikes") | |
391 | ||
392 | ;; jikes produces lots of warnings, but they are not very | |
393 | ;; interesting, so we silence them. | |
394 | (setenv "$BOOTJAVAC_OPTS" "-nowarn") | |
395 | ||
d4fd4c3a RW |
396 | ;; Without these JamVM options the build may freeze. |
397 | (substitute* "bootstrap.sh" | |
398 | (("^\"\\$\\{JAVACMD\\}\" " m) | |
a495998b EF |
399 | ,@(if (string-prefix? "armhf" (or (%current-system) |
400 | (%current-target-system))) | |
401 | `((string-append m "-Xnocompact ")) | |
402 | `((string-append m "-Xnocompact -Xnoinlining "))))) | |
d4fd4c3a | 403 | |
5783bd77 RW |
404 | ;; Disable tests because we are bootstrapping and thus don't have |
405 | ;; any of the dependencies required to build and run the tests. | |
406 | (substitute* "build.xml" | |
407 | (("depends=\"jars,test-jar\"") "depends=\"jars\"")) | |
8e14634a EF |
408 | (invoke "bash" "bootstrap.sh" |
409 | (string-append "-Ddist.dir=" | |
410 | (assoc-ref %outputs "out"))))) | |
cded3a75 GB |
411 | (add-after 'build 'strip-jar-timestamps ;based on ant-build-system |
412 | (lambda* (#:key outputs #:allow-other-keys) | |
413 | (define (repack-archive jar) | |
414 | (let* ((dir (mkdtemp! "jar-contents.XXXXXX")) | |
415 | (manifest (string-append dir "/META-INF/MANIFESTS.MF"))) | |
416 | (with-directory-excursion dir | |
417 | (invoke "unzip" jar)) | |
418 | (delete-file jar) | |
419 | ;; XXX: copied from (gnu build install) | |
420 | (for-each (lambda (file) | |
421 | (let ((s (lstat file))) | |
422 | (unless (eq? (stat:type s) 'symlink) | |
423 | (utime file 0 0 0 0)))) | |
424 | (find-files dir #:directories? #t)) | |
425 | ;; It is important that the manifest appears first. | |
426 | (with-directory-excursion dir | |
427 | (let* ((files (find-files "." ".*" #:directories? #t)) | |
428 | ;; To ensure that the reference scanner can | |
429 | ;; detect all store references in the jars | |
430 | ;; we disable compression with the "-0" option. | |
431 | (command (if (file-exists? manifest) | |
432 | `("zip" "-0" "-X" ,jar ,manifest | |
433 | ,@files) | |
434 | `("zip" "-0" "-X" ,jar ,@files)))) | |
435 | (apply invoke command))))) | |
436 | (for-each repack-archive | |
437 | (find-files | |
438 | (string-append (assoc-ref %outputs "out") "/lib") | |
439 | "\\.jar$")) | |
440 | #t)) | |
5783bd77 RW |
441 | (delete 'install)))) |
442 | (native-inputs | |
443 | `(("jikes" ,jikes) | |
cded3a75 GB |
444 | ("jamvm" ,jamvm-1-bootstrap) |
445 | ("unzip" ,unzip) | |
b42b5afd | 446 | ("zip" ,zip))) |
0b1d71b2 | 447 | (home-page "https://ant.apache.org") |
5783bd77 RW |
448 | (synopsis "Build tool for Java") |
449 | (description | |
450 | "Ant is a platform-independent build tool for Java. It is similar to | |
451 | make but is implemented using the Java language, requires the Java platform, | |
452 | and is best suited to building Java projects. Ant uses XML to describe the | |
453 | build process and its dependencies, whereas Make uses Makefile format.") | |
454 | (license license:asl2.0))) | |
455 | ||
5461721f RW |
456 | ;; Version 3.2.2 is the last version without a dependency on a full-fledged |
457 | ;; compiler for Java 1.5. | |
458 | (define ecj-bootstrap | |
459 | (package | |
460 | (name "ecj-bootstrap") | |
461 | (version "3.2.2") | |
462 | (source (origin | |
463 | (method url-fetch) | |
464 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
465 | "downloads/drops/R-" version | |
466 | "-200702121330/ecjsrc.zip")) | |
467 | (sha256 | |
468 | (base32 | |
469 | "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307")))) | |
470 | ;; It would be so much easier if we could use the ant-build-system, but we | |
471 | ;; cannot as we don't have ant at this point. We use ecj for | |
472 | ;; bootstrapping the JDK. | |
473 | (build-system gnu-build-system) | |
474 | (arguments | |
475 | `(#:modules ((guix build gnu-build-system) | |
476 | (guix build utils) | |
477 | (srfi srfi-1)) | |
478 | #:tests? #f ; there are no tests | |
479 | #:phases | |
480 | (modify-phases %standard-phases | |
481 | (replace 'configure | |
482 | (lambda* (#:key inputs #:allow-other-keys) | |
483 | (setenv "CLASSPATH" | |
484 | (string-join | |
6c775dc6 RW |
485 | (cons (string-append (assoc-ref inputs "jamvm") |
486 | "/lib/rt.jar") | |
487 | (find-files (string-append | |
488 | (assoc-ref inputs "ant-bootstrap") | |
489 | "/lib") | |
490 | "\\.jar$")) | |
5461721f RW |
491 | ":")) |
492 | #t)) | |
493 | (replace 'build | |
494 | (lambda* (#:key inputs #:allow-other-keys) | |
495 | ;; The unpack phase enters the "org" directory by mistake. | |
496 | (chdir "..") | |
497 | ||
498 | ;; Create a simple manifest to make ecj executable. | |
499 | (with-output-to-file "manifest" | |
500 | (lambda _ | |
501 | (display "Manifest-Version: 1.0 | |
502 | Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"))) | |
503 | ||
504 | ;; Compile it all! | |
0b302a16 EF |
505 | (and (apply invoke "jikes" |
506 | (find-files "." "\\.java$")) | |
507 | (invoke "fastjar" "cvfm" | |
508 | "ecj-bootstrap.jar" "manifest" ".")))) | |
5461721f RW |
509 | (replace 'install |
510 | (lambda* (#:key outputs #:allow-other-keys) | |
511 | (let ((share (string-append (assoc-ref outputs "out") | |
512 | "/share/java/"))) | |
513 | (mkdir-p share) | |
514 | (install-file "ecj-bootstrap.jar" share) | |
515 | #t)))))) | |
516 | (native-inputs | |
517 | `(("ant-bootstrap" ,ant-bootstrap) | |
518 | ("unzip" ,unzip) | |
6c775dc6 RW |
519 | ("jikes" ,jikes) |
520 | ("jamvm" ,jamvm-1-bootstrap) | |
5461721f RW |
521 | ("fastjar" ,fastjar))) |
522 | (home-page "https://eclipse.org") | |
523 | (synopsis "Eclipse Java development tools core batch compiler") | |
524 | (description "This package provides the Eclipse Java core batch compiler | |
525 | for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a | |
526 | requirement for all GNU Classpath releases after version 0.93.") | |
527 | (license license:epl1.0))) | |
528 | ||
6a5829d9 RW |
529 | (define ecj-javac-wrapper |
530 | (package (inherit ecj-bootstrap) | |
531 | (name "ecj-javac-wrapper") | |
532 | (source #f) | |
533 | (build-system trivial-build-system) | |
534 | (arguments | |
535 | `(#:modules ((guix build utils)) | |
536 | #:builder | |
c4f06c11 | 537 | (begin |
6a5829d9 RW |
538 | (use-modules (guix build utils)) |
539 | (let* ((bin (string-append (assoc-ref %outputs "out") "/bin")) | |
540 | (target (string-append bin "/javac")) | |
541 | (guile (string-append (assoc-ref %build-inputs "guile") | |
542 | "/bin/guile")) | |
543 | (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap") | |
544 | "/share/java/ecj-bootstrap.jar")) | |
c4f06c11 RW |
545 | (java (string-append (assoc-ref %build-inputs "jamvm") |
546 | "/bin/jamvm")) | |
547 | (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath") | |
548 | "/share/classpath"))) | |
51602aac RW |
549 | (string-append jvmlib "/glibj.zip:" |
550 | jvmlib "/tools.zip")))) | |
6a5829d9 RW |
551 | (mkdir-p bin) |
552 | (with-output-to-file target | |
553 | (lambda _ | |
554 | (format #t "#!~a --no-auto-compile\n!#\n" guile) | |
555 | (write | |
556 | `(begin (use-modules (ice-9 match) | |
557 | (ice-9 receive) | |
558 | (ice-9 hash-table) | |
559 | (srfi srfi-1) | |
560 | (srfi srfi-26)) | |
561 | (define defaults | |
562 | '(("-bootclasspath" ,bootcp) | |
563 | ("-source" "1.5") | |
564 | ("-target" "1.5") | |
565 | ("-cp" "."))) | |
566 | (define (main args) | |
567 | (let ((classpath (getenv "CLASSPATH"))) | |
568 | (setenv "CLASSPATH" | |
c4f06c11 RW |
569 | (string-join (list ,ecj |
570 | ,(string-append (assoc-ref %build-inputs "jamvm") | |
571 | "/lib/rt.jar") | |
572 | (or classpath "")) | |
573 | ":"))) | |
6a5829d9 RW |
574 | (receive (vm-args other-args) |
575 | ;; Separate VM arguments from arguments to ECJ. | |
576 | (partition (cut string-prefix? "-J" <>) | |
577 | (fold (lambda (default acc) | |
578 | (if (member (first default) acc) | |
579 | acc (append default acc))) | |
580 | args defaults)) | |
581 | (apply system* ,java | |
582 | (append | |
583 | ;; Remove "-J" prefix | |
584 | (map (cut string-drop <> 2) vm-args) | |
585 | '("org.eclipse.jdt.internal.compiler.batch.Main") | |
586 | (cons "-nowarn" other-args))))) | |
587 | ;; Entry point | |
588 | (let ((args (cdr (command-line)))) | |
589 | (if (null? args) | |
590 | (format (current-error-port) "javac: no arguments given!\n") | |
591 | (main args))))))) | |
592 | (chmod target #o755) | |
593 | #t)))) | |
594 | (native-inputs | |
595 | `(("guile" ,guile-2.2) | |
596 | ("ecj-bootstrap" ,ecj-bootstrap) | |
c4f06c11 RW |
597 | ("jamvm" ,jamvm-1-bootstrap) |
598 | ("classpath" ,classpath-bootstrap))) | |
6a5829d9 RW |
599 | (description "This package provides a wrapper around the @dfn{Eclipse |
600 | compiler for Java} (ecj) with a command line interface that is compatible with | |
601 | the standard javac executable."))) | |
602 | ||
8778da03 RW |
603 | ;; The classpath-bootstrap was built without a virtual machine, so it does not |
604 | ;; provide a wrapper for javah. We cannot build the development version of | |
605 | ;; Classpath without javah. | |
606 | (define classpath-0.99 | |
607 | (package (inherit classpath-bootstrap) | |
d3551e86 RW |
608 | (version "0.99") |
609 | (source (origin | |
610 | (method url-fetch) | |
611 | (uri (string-append "mirror://gnu/classpath/classpath-" | |
612 | version ".tar.gz")) | |
613 | (sha256 | |
614 | (base32 | |
bab9793f EF |
615 | "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr")) |
616 | (patches (search-patches "classpath-aarch64-support.patch")))) | |
d3551e86 RW |
617 | (arguments |
618 | `(#:configure-flags | |
619 | (list (string-append "--with-ecj-jar=" | |
620 | (assoc-ref %build-inputs "ecj-bootstrap") | |
621 | "/share/java/ecj-bootstrap.jar") | |
622 | (string-append "JAVAC=" | |
623 | (assoc-ref %build-inputs "ecj-javac-wrapper") | |
624 | "/bin/javac") | |
625 | (string-append "JAVA=" | |
8778da03 RW |
626 | (assoc-ref %build-inputs "jamvm") |
627 | "/bin/jamvm") | |
d3551e86 RW |
628 | "GCJ_JAVAC_TRUE=no" |
629 | "ac_cv_prog_java_works=yes" ; trust me | |
630 | "--disable-Werror" | |
631 | "--disable-gmp" | |
632 | "--disable-gtk-peer" | |
633 | "--disable-gconf-peer" | |
634 | "--disable-plugin" | |
635 | "--disable-dssi" | |
636 | "--disable-alsa" | |
637 | "--disable-gjdoc") | |
638 | #:phases | |
639 | (modify-phases %standard-phases | |
640 | (add-after 'install 'install-data | |
15a59c21 | 641 | (lambda _ (invoke "make" "install-data")))))) |
d3551e86 RW |
642 | (native-inputs |
643 | `(("ecj-bootstrap" ,ecj-bootstrap) | |
644 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) | |
645 | ("fastjar" ,fastjar) | |
8778da03 RW |
646 | ("jamvm" ,jamvm-1-bootstrap) |
647 | ("classpath" ,classpath-bootstrap) | |
d3551e86 | 648 | ("libltdl" ,libltdl) |
8778da03 | 649 | ("pkg-config" ,pkg-config))))) |
d3551e86 | 650 | |
c98d7a66 RW |
651 | ;; We need this because classpath-bootstrap does not provide all of the tools |
652 | ;; we need to build classpath-devel. | |
04d7cae2 | 653 | (define classpath-jamvm-wrappers |
c98d7a66 | 654 | (package (inherit classpath-0.99) |
04d7cae2 RW |
655 | (name "classpath-jamvm-wrappers") |
656 | (source #f) | |
657 | (build-system trivial-build-system) | |
658 | (arguments | |
659 | `(#:modules ((guix build utils)) | |
660 | #:builder | |
661 | (begin | |
662 | (use-modules (guix build utils)) | |
663 | (let* ((bash (assoc-ref %build-inputs "bash")) | |
664 | (jamvm (assoc-ref %build-inputs "jamvm")) | |
665 | (classpath (assoc-ref %build-inputs "classpath")) | |
666 | (bin (string-append (assoc-ref %outputs "out") | |
667 | "/bin/"))) | |
668 | (mkdir-p bin) | |
669 | (for-each (lambda (tool) | |
670 | (with-output-to-file (string-append bin tool) | |
671 | (lambda _ | |
e3ec1258 EF |
672 | ,@(if (string-prefix? "armhf" (or (%current-system) |
673 | (%current-target-system))) | |
674 | `((format #t "#!~a/bin/sh | |
675 | ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \ | |
676 | gnu.classpath.tools.~a.~a $@" | |
677 | bash jamvm classpath tool | |
678 | (if (string=? "native2ascii" tool) | |
679 | "Native2ASCII" "Main"))) | |
680 | `((format #t "#!~a/bin/sh | |
40e3a197 | 681 | ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \ |
04d7cae2 RW |
682 | gnu.classpath.tools.~a.~a $@" |
683 | bash jamvm classpath tool | |
684 | (if (string=? "native2ascii" tool) | |
e3ec1258 | 685 | "Native2ASCII" "Main")))))) |
04d7cae2 RW |
686 | (chmod (string-append bin tool) #o755)) |
687 | (list "javah" | |
688 | "rmic" | |
689 | "rmid" | |
690 | "orbd" | |
691 | "rmiregistry" | |
692 | "native2ascii")) | |
693 | #t)))) | |
694 | (native-inputs | |
695 | `(("bash" ,bash) | |
c98d7a66 RW |
696 | ("jamvm" ,jamvm-1-bootstrap) |
697 | ("classpath" ,classpath-0.99))) | |
04d7cae2 RW |
698 | (inputs '()) |
699 | (synopsis "Executables from GNU Classpath") | |
700 | (description "This package provides wrappers around the tools provided by | |
701 | the GNU Classpath library. They are executed by the JamVM virtual | |
702 | machine."))) | |
703 | ||
72885a4c RW |
704 | ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since |
705 | ;; then Classpath has gained much more support for Java 1.6. | |
706 | (define-public classpath-devel | |
707 | (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103") | |
708 | (revision "1")) | |
8778da03 | 709 | (package (inherit classpath-bootstrap) |
72885a4c RW |
710 | (version (string-append "0.99-" revision "." (string-take commit 9))) |
711 | (source (origin | |
712 | (method git-fetch) | |
713 | (uri (git-reference | |
5f13bf09 | 714 | (url "https://git.savannah.gnu.org/git/classpath.git") |
72885a4c | 715 | (commit commit))) |
51988e3a | 716 | (file-name (string-append "classpath-" version "-checkout")) |
72885a4c RW |
717 | (sha256 |
718 | (base32 | |
2995be77 SS |
719 | "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4")) |
720 | (patches (search-patches "classpath-aarch64-support.patch")))) | |
72885a4c | 721 | (arguments |
93c103ab RW |
722 | `(#:make-flags |
723 | ;; Ensure that the initial heap size is smaller than the maximum | |
724 | ;; size. By default only Xmx is set, which can lead to invalid | |
725 | ;; memory settings on some machines with a lot of memory. | |
726 | '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M") | |
727 | #:configure-flags | |
72885a4c RW |
728 | (list (string-append "--with-ecj-jar=" |
729 | (assoc-ref %build-inputs "ecj-bootstrap") | |
730 | "/share/java/ecj-bootstrap.jar") | |
93c103ab | 731 | (string-append "--with-javac=" |
72885a4c RW |
732 | (assoc-ref %build-inputs "ecj-javac-wrapper") |
733 | "/bin/javac") | |
734 | (string-append "JAVA=" | |
735 | (assoc-ref %build-inputs "jamvm") | |
736 | "/bin/jamvm") | |
737 | "GCJ_JAVAC_TRUE=no" | |
738 | "ac_cv_prog_java_works=yes" ; trust me | |
739 | "--disable-Werror" | |
740 | "--disable-gmp" | |
741 | "--disable-gtk-peer" | |
742 | "--disable-gconf-peer" | |
743 | "--disable-plugin" | |
744 | "--disable-dssi" | |
745 | "--disable-alsa" | |
746 | "--disable-gjdoc") | |
747 | #:phases | |
748 | (modify-phases %standard-phases | |
2a69f48e RW |
749 | ;; XXX The bootstrap phase executes autogen.sh, which fails after |
750 | ;; complaining about the lack of gettext. | |
751 | (replace 'bootstrap | |
752 | (lambda _ (invoke "autoreconf" "-vif"))) | |
72885a4c RW |
753 | (add-after 'unpack 'remove-unsupported-annotations |
754 | (lambda _ | |
755 | (substitute* (find-files "java" "\\.java$") | |
756 | (("@Override") "")) | |
757 | #t)) | |
758 | (add-after 'install 'install-data | |
4c65eb43 | 759 | (lambda _ (invoke "make" "install-data")))))) |
72885a4c RW |
760 | (native-inputs |
761 | `(("autoconf" ,autoconf) | |
762 | ("automake" ,automake) | |
763 | ("libtool" ,libtool) | |
764 | ("gettext" ,gettext-minimal) | |
765 | ("texinfo" ,texinfo) | |
766 | ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah | |
767 | ("ecj-bootstrap" ,ecj-bootstrap) | |
b5a0d427 | 768 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
72885a4c | 769 | ("fastjar" ,fastjar) |
58d2b135 | 770 | ("jamvm" ,jamvm-1-bootstrap) |
72885a4c RW |
771 | ("libltdl" ,libltdl) |
772 | ("pkg-config" ,pkg-config)))))) | |
773 | ||
58d2b135 RW |
774 | (define jamvm |
775 | (package (inherit jamvm-1-bootstrap) | |
776 | (version "2.0.0") | |
777 | (source (origin | |
778 | (method url-fetch) | |
779 | (uri (string-append "mirror://sourceforge/jamvm/jamvm/" | |
780 | "JamVM%20" version "/jamvm-" | |
781 | version ".tar.gz")) | |
782 | (sha256 | |
783 | (base32 | |
cff1e095 | 784 | "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn")) |
a2120060 | 785 | (patches |
2995be77 SS |
786 | (search-patches "jamvm-2.0.0-disable-branch-patching.patch" |
787 | "jamvm-2.0.0-opcode-guard.patch" | |
788 | "jamvm-2.0.0-aarch64-support.patch")) | |
cff1e095 AŠ |
789 | (snippet |
790 | '(begin | |
791 | ;; Remove precompiled software. | |
792 | (delete-file "src/classlib/gnuclasspath/lib/classes.zip") | |
793 | #t)))) | |
58d2b135 RW |
794 | (build-system gnu-build-system) |
795 | (arguments | |
2995be77 SS |
796 | (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap) |
797 | ((#:configure-flags _) | |
798 | '(list (string-append "--with-classpath-install-dir=" | |
799 | (assoc-ref %build-inputs "classpath")))))) | |
8c6091e3 RW |
800 | (inputs |
801 | `(("classpath" ,classpath-devel) | |
b5a0d427 | 802 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
cff1e095 | 803 | ("zip" ,zip) |
8c6091e3 RW |
804 | ("zlib" ,zlib))))) |
805 | ||
b5a0d427 RW |
806 | (define ecj-javac-wrapper-final |
807 | (package (inherit ecj-javac-wrapper) | |
1bf56c72 RW |
808 | (native-inputs |
809 | `(("guile" ,guile-2.2) | |
810 | ("ecj-bootstrap" ,ecj-bootstrap) | |
811 | ("jamvm" ,jamvm) | |
812 | ("classpath" ,classpath-devel))))) | |
813 | ||
98419316 | 814 | ;; The bootstrap JDK consisting of jamvm, classpath-devel, |
b5a0d427 RW |
815 | ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's |
816 | ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x, | |
817 | ;; which uses Java 6 only. | |
98419316 RW |
818 | (define-public icedtea-6 |
819 | (package | |
820 | (name "icedtea") | |
821 | (version "1.13.13") | |
822 | (source (origin | |
823 | (method url-fetch) | |
824 | (uri (string-append | |
825 | "http://icedtea.wildebeest.org/download/source/icedtea6-" | |
826 | version ".tar.xz")) | |
827 | (sha256 | |
828 | (base32 | |
829 | "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg")) | |
2fab54f3 SS |
830 | (patches (search-patches |
831 | "icedtea-6-extend-hotspot-aarch64-support.patch")) | |
98419316 RW |
832 | (modules '((guix build utils))) |
833 | (snippet | |
6cbee49d MW |
834 | '(begin |
835 | (substitute* "Makefile.in" | |
836 | ;; do not leak information about the build host | |
837 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") | |
838 | "DISTRIBUTION_ID=\"\\\"guix\\\"\"")) | |
839 | #t)))) | |
98419316 RW |
840 | (build-system gnu-build-system) |
841 | (outputs '("out" ; Java Runtime Environment | |
842 | "jdk" ; Java Development Kit | |
843 | "doc")) ; all documentation | |
844 | (arguments | |
845 | `(;; There are many failing tests and many are known to fail upstream. | |
846 | #:tests? #f | |
847 | ||
848 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build | |
849 | ;; gremlin) doesn't support it yet, so skip this phase. | |
850 | #:validate-runpath? #f | |
851 | ||
852 | #:modules ((guix build utils) | |
853 | (guix build gnu-build-system) | |
854 | (srfi srfi-19)) | |
855 | ||
856 | #:configure-flags | |
857 | `("--enable-bootstrap" | |
858 | "--enable-nss" | |
859 | "--without-rhino" | |
31ccd551 SS |
860 | ,(string-append "--with-parallel-jobs=" |
861 | (number->string (parallel-job-count))) | |
98419316 RW |
862 | "--disable-downloading" |
863 | "--disable-tests" | |
864 | ,(string-append "--with-ecj=" | |
865 | (assoc-ref %build-inputs "ecj") | |
866 | "/share/java/ecj-bootstrap.jar") | |
867 | ,(string-append "--with-jar=" | |
868 | (assoc-ref %build-inputs "fastjar") | |
869 | "/bin/fastjar") | |
870 | ,(string-append "--with-jdk-home=" | |
871 | (assoc-ref %build-inputs "classpath")) | |
872 | ,(string-append "--with-java=" | |
873 | (assoc-ref %build-inputs "jamvm") | |
874 | "/bin/jamvm")) | |
875 | #:phases | |
876 | (modify-phases %standard-phases | |
877 | (replace 'unpack | |
878 | (lambda* (#:key source inputs #:allow-other-keys) | |
2c8ac364 MW |
879 | (invoke "tar" "xvf" source) |
880 | (chdir (string-append "icedtea6-" ,version)) | |
881 | (mkdir "openjdk") | |
882 | (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk") | |
883 | ;; The convenient OpenJDK source bundle is no longer | |
884 | ;; available for download, so we have to take the sources | |
885 | ;; from the Mercurial repositories and change the Makefile | |
886 | ;; to avoid tests for the OpenJDK zip archive. | |
887 | (with-directory-excursion "openjdk" | |
888 | (for-each (lambda (part) | |
889 | (mkdir part) | |
890 | (copy-recursively | |
891 | (assoc-ref inputs | |
892 | (string-append part "-src")) | |
893 | part)) | |
dc3c2755 | 894 | '("jdk" "hotspot" "corba" |
2c8ac364 | 895 | "langtools" "jaxp" "jaxws"))) |
306c1e61 RW |
896 | (substitute* "patches/freetypeversion.patch" |
897 | (("REQUIRED_FREETYPE_VERSION = 2.2.1") | |
898 | "REQUIRED_FREETYPE_VERSION = 2.10.1")) | |
2c8ac364 MW |
899 | (substitute* "Makefile.in" |
900 | (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;") | |
901 | "echo \"trust me\";") | |
902 | ;; The contents of the bootstrap directory must be | |
903 | ;; writeable but when copying from the store they are | |
904 | ;; not. | |
905 | (("mkdir -p lib/rt" line) | |
906 | (string-append line "; chmod -R u+w $(BOOT_DIR)"))) | |
907 | (invoke "chmod" "-R" "u+w" "openjdk"))) | |
98419316 RW |
908 | (add-after 'unpack 'use-classpath |
909 | (lambda* (#:key inputs #:allow-other-keys) | |
b5a0d427 RW |
910 | (let ((jvmlib (assoc-ref inputs "classpath")) |
911 | (jamvm (assoc-ref inputs "jamvm"))) | |
98419316 RW |
912 | ;; Classpath does not provide rt.jar. |
913 | (substitute* "Makefile.in" | |
914 | (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") | |
915 | (string-append jvmlib "/share/classpath/glibj.zip"))) | |
916 | ;; Make sure we can find all classes. | |
917 | (setenv "CLASSPATH" | |
918 | (string-append jvmlib "/share/classpath/glibj.zip:" | |
b5a0d427 RW |
919 | jvmlib "/share/classpath/tools.zip:" |
920 | jamvm "/lib/rt.jar")) | |
98419316 RW |
921 | (setenv "JAVACFLAGS" |
922 | (string-append "-cp " | |
923 | jvmlib "/share/classpath/glibj.zip:" | |
924 | jvmlib "/share/classpath/tools.zip"))) | |
925 | #t)) | |
926 | (add-after 'unpack 'patch-patches | |
927 | (lambda _ | |
928 | ;; shebang in patches so that they apply cleanly | |
929 | (substitute* '("patches/jtreg-jrunscript.patch" | |
930 | "patches/hotspot/hs23/drop_unlicensed_test.patch") | |
931 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
932 | #t)) | |
933 | (add-after 'unpack 'patch-paths | |
934 | (lambda* (#:key inputs #:allow-other-keys) | |
935 | ;; buildtree.make generates shell scripts, so we need to replace | |
936 | ;; the generated shebang | |
937 | (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make") | |
938 | (("/bin/sh") (which "bash"))) | |
939 | ||
940 | (let ((corebin (string-append | |
941 | (assoc-ref inputs "coreutils") "/bin/")) | |
942 | (binbin (string-append | |
943 | (assoc-ref inputs "binutils") "/bin/")) | |
944 | (grepbin (string-append | |
945 | (assoc-ref inputs "grep") "/bin/"))) | |
946 | (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk" | |
947 | "openjdk/corba/make/common/shared/Defs-linux.gmk") | |
948 | (("UNIXCOMMAND_PATH = /bin/") | |
949 | (string-append "UNIXCOMMAND_PATH = " corebin)) | |
950 | (("USRBIN_PATH = /usr/bin/") | |
951 | (string-append "USRBIN_PATH = " corebin)) | |
952 | (("DEVTOOLS_PATH *= */usr/bin/") | |
953 | (string-append "DEVTOOLS_PATH = " corebin)) | |
954 | (("COMPILER_PATH *= */usr/bin/") | |
955 | (string-append "COMPILER_PATH = " | |
956 | (assoc-ref inputs "gcc") "/bin/")) | |
957 | (("DEF_OBJCOPY *=.*objcopy") | |
958 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) | |
959 | ||
960 | ;; fix path to alsa header | |
961 | (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk" | |
962 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
963 | (string-append "ALSA_INCLUDE=" | |
964 | (assoc-ref inputs "alsa-lib") | |
965 | "/include/alsa/version.h"))) | |
966 | ||
967 | ;; fix hard-coded utility paths | |
968 | (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk" | |
969 | "openjdk/corba/make/common/shared/Defs-utils.gmk") | |
970 | (("ECHO *=.*echo") | |
971 | (string-append "ECHO = " (which "echo"))) | |
972 | (("^GREP *=.*grep") | |
973 | (string-append "GREP = " (which "grep"))) | |
974 | (("EGREP *=.*egrep") | |
975 | (string-append "EGREP = " (which "egrep"))) | |
976 | (("CPIO *=.*cpio") | |
977 | (string-append "CPIO = " (which "cpio"))) | |
978 | (("READELF *=.*readelf") | |
979 | (string-append "READELF = " (which "readelf"))) | |
980 | (("^ *AR *=.*ar") | |
981 | (string-append "AR = " (which "ar"))) | |
982 | (("^ *TAR *=.*tar") | |
983 | (string-append "TAR = " (which "tar"))) | |
984 | (("AS *=.*as") | |
985 | (string-append "AS = " (which "as"))) | |
986 | (("LD *=.*ld") | |
987 | (string-append "LD = " (which "ld"))) | |
988 | (("STRIP *=.*strip") | |
989 | (string-append "STRIP = " (which "strip"))) | |
990 | (("NM *=.*nm") | |
991 | (string-append "NM = " (which "nm"))) | |
992 | (("^SH *=.*sh") | |
993 | (string-append "SH = " (which "bash"))) | |
994 | (("^FIND *=.*find") | |
995 | (string-append "FIND = " (which "find"))) | |
996 | (("LDD *=.*ldd") | |
997 | (string-append "LDD = " (which "ldd"))) | |
998 | (("NAWK *=.*(n|g)awk") | |
999 | (string-append "NAWK = " (which "gawk"))) | |
1000 | (("XARGS *=.*xargs") | |
1001 | (string-append "XARGS = " (which "xargs"))) | |
1002 | (("UNZIP *=.*unzip") | |
1003 | (string-append "UNZIP = " (which "unzip"))) | |
1004 | (("ZIPEXE *=.*zip") | |
1005 | (string-append "ZIPEXE = " (which "zip"))) | |
1006 | (("SED *=.*sed") | |
1007 | (string-append "SED = " (which "sed")))) | |
1008 | ||
1009 | ;; Some of these timestamps cause problems as they are more than | |
1010 | ;; 10 years ago, failing the build process. | |
1011 | (substitute* | |
1012 | "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties" | |
1013 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") | |
1014 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") | |
1015 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") | |
1016 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")) | |
1017 | #t))) | |
1018 | (add-before 'configure 'set-additional-paths | |
1019 | (lambda* (#:key inputs #:allow-other-keys) | |
1020 | (setenv "CPATH" | |
1021 | (string-append (assoc-ref inputs "libxrender") | |
1022 | "/include/X11/extensions" ":" | |
1023 | (assoc-ref inputs "libxtst") | |
1024 | "/include/X11/extensions" ":" | |
1025 | (assoc-ref inputs "libxinerama") | |
1026 | "/include/X11/extensions" ":" | |
1027 | (or (getenv "CPATH") ""))) | |
1028 | (setenv "ALT_CUPS_HEADERS_PATH" | |
1029 | (string-append (assoc-ref inputs "cups") | |
1030 | "/include")) | |
1031 | (setenv "ALT_FREETYPE_HEADERS_PATH" | |
1032 | (string-append (assoc-ref inputs "freetype") | |
1033 | "/include")) | |
1034 | (setenv "ALT_FREETYPE_LIB_PATH" | |
1035 | (string-append (assoc-ref inputs "freetype") | |
1036 | "/lib")) | |
1037 | #t)) | |
0bc11cc7 GB |
1038 | (add-before 'build 'disable-os-version-check |
1039 | ;; allow build on linux major version change | |
1040 | (lambda _ | |
1041 | (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok") | |
1042 | #t)) | |
98419316 RW |
1043 | (replace 'install |
1044 | (lambda* (#:key outputs #:allow-other-keys) | |
1045 | (let ((doc (string-append (assoc-ref outputs "doc") | |
1046 | "/share/doc/icedtea")) | |
1047 | (jre (assoc-ref outputs "out")) | |
1048 | (jdk (assoc-ref outputs "jdk"))) | |
1049 | (copy-recursively "openjdk.build/docs" doc) | |
1050 | (copy-recursively "openjdk.build/j2re-image" jre) | |
1051 | (copy-recursively "openjdk.build/j2sdk-image" jdk)) | |
1052 | #t))))) | |
1053 | (native-inputs | |
1054 | `(("ant" ,ant-bootstrap) | |
1055 | ("alsa-lib" ,alsa-lib) | |
1056 | ("attr" ,attr) | |
1057 | ("classpath" ,classpath-devel) | |
1058 | ("coreutils" ,coreutils) | |
1059 | ("cpio" ,cpio) | |
1060 | ("cups" ,cups) | |
1061 | ("ecj" ,ecj-bootstrap) | |
b5a0d427 | 1062 | ("ecj-javac" ,ecj-javac-wrapper-final) |
98419316 RW |
1063 | ("fastjar" ,fastjar) |
1064 | ("fontconfig" ,fontconfig) | |
1065 | ("freetype" ,freetype) | |
1066 | ("gtk" ,gtk+-2) | |
1067 | ("gawk" ,gawk) | |
1068 | ("giflib" ,giflib) | |
1069 | ("grep" ,grep) | |
1070 | ("jamvm" ,jamvm) | |
1071 | ("lcms" ,lcms) | |
4bd428a7 | 1072 | ("libjpeg" ,libjpeg-turbo) |
bcb078a4 | 1073 | ("libnsl" ,libnsl) |
98419316 RW |
1074 | ("libpng" ,libpng) |
1075 | ("libtool" ,libtool) | |
1076 | ("libx11" ,libx11) | |
1077 | ("libxcomposite" ,libxcomposite) | |
1078 | ("libxi" ,libxi) | |
1079 | ("libxinerama" ,libxinerama) | |
1080 | ("libxrender" ,libxrender) | |
1081 | ("libxslt" ,libxslt) ;for xsltproc | |
1082 | ("libxt" ,libxt) | |
1083 | ("libxtst" ,libxtst) | |
1084 | ("mit-krb5" ,mit-krb5) | |
1085 | ("nss" ,nss) | |
1086 | ("nss-certs" ,nss-certs) | |
1087 | ("perl" ,perl) | |
1088 | ("pkg-config" ,pkg-config) | |
1089 | ("procps" ,procps) ;for "free", even though I'm not sure we should use it | |
1090 | ("unzip" ,unzip) | |
1091 | ("wget" ,wget) | |
1092 | ("which" ,which) | |
1093 | ("zip" ,zip) | |
1094 | ("zlib" ,zlib) | |
1095 | ("openjdk-src" | |
1096 | ,(origin | |
1097 | (method hg-fetch) | |
1098 | (uri (hg-reference | |
1099 | (url "http://hg.openjdk.java.net/jdk6/jdk6/") | |
1100 | (changeset "jdk6-b41"))) | |
1101 | (sha256 | |
1102 | (base32 | |
1103 | "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv")))) | |
1104 | ("jdk-src" | |
1105 | ,(origin | |
1106 | (method hg-fetch) | |
1107 | (uri (hg-reference | |
1108 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/") | |
1109 | (changeset "jdk6-b41"))) | |
1110 | (sha256 | |
1111 | (base32 | |
1112 | "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9")))) | |
1113 | ("hotspot-src" | |
1114 | ,(origin | |
1115 | (method hg-fetch) | |
1116 | (uri (hg-reference | |
1117 | (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/") | |
1118 | (changeset "jdk6-b41"))) | |
1119 | (sha256 | |
1120 | (base32 | |
dc3c2755 | 1121 | "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd")))) |
98419316 RW |
1122 | ("corba-src" |
1123 | ,(origin | |
1124 | (method hg-fetch) | |
1125 | (uri (hg-reference | |
1126 | (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/") | |
1127 | (changeset "jdk6-b41"))) | |
1128 | (sha256 | |
1129 | (base32 | |
1130 | "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q")))) | |
1131 | ("langtools-src" | |
1132 | ,(origin | |
1133 | (method hg-fetch) | |
1134 | (uri (hg-reference | |
1135 | (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/") | |
1136 | (changeset "jdk6-b41"))) | |
1137 | (sha256 | |
1138 | (base32 | |
1139 | "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d")))) | |
1140 | ("jaxp-src" | |
1141 | ,(origin | |
1142 | (method hg-fetch) | |
1143 | (uri (hg-reference | |
1144 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/") | |
1145 | (changeset "jdk6-b41"))) | |
1146 | (sha256 | |
1147 | (base32 | |
1148 | "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm")))) | |
1149 | ("jaxws-src" | |
1150 | ,(origin | |
1151 | (method hg-fetch) | |
1152 | (uri (hg-reference | |
1153 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/") | |
1154 | (changeset "jdk6-b41"))) | |
1155 | (sha256 | |
1156 | (base32 | |
1157 | "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0")))))) | |
1158 | (home-page "http://icedtea.classpath.org") | |
1159 | (synopsis "Java development kit") | |
1160 | (description | |
1161 | "This package provides the OpenJDK built with the IcedTea build harness. | |
1162 | This version of the OpenJDK is no longer maintained and is only used for | |
1163 | bootstrapping purposes.") | |
1164 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the | |
1165 | ;; same license as both GNU Classpath and OpenJDK. | |
1166 | (license license:gpl2+))) | |
1167 | ||
a243e12a | 1168 | (define-public icedtea-7 |
7f6485e7 | 1169 | (let* ((version "2.6.13") |
f6789047 RW |
1170 | (drop (lambda (name hash) |
1171 | (origin | |
1172 | (method url-fetch) | |
1173 | (uri (string-append | |
d30ce4a7 | 1174 | "http://icedtea.classpath.org/download/drops" |
f6789047 RW |
1175 | "/icedtea7/" version "/" name ".tar.bz2")) |
1176 | (sha256 (base32 hash)))))) | |
71053e14 RW |
1177 | (package |
1178 | (name "icedtea") | |
f6789047 RW |
1179 | (version version) |
1180 | (source (origin | |
1181 | (method url-fetch) | |
1182 | (uri (string-append | |
1183 | "http://icedtea.wildebeest.org/download/source/icedtea-" | |
1184 | version ".tar.xz")) | |
1185 | (sha256 | |
1186 | (base32 | |
7f6485e7 | 1187 | "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh")) |
f6789047 RW |
1188 | (modules '((guix build utils))) |
1189 | (snippet | |
6cbee49d MW |
1190 | '(begin |
1191 | (substitute* "Makefile.in" | |
1192 | ;; do not leak information about the build host | |
1193 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") | |
1194 | "DISTRIBUTION_ID=\"\\\"guix\\\"\"")) | |
1195 | #t)))) | |
71053e14 RW |
1196 | (build-system gnu-build-system) |
1197 | (outputs '("out" ; Java Runtime Environment | |
1198 | "jdk" ; Java Development Kit | |
1199 | "doc")) ; all documentation | |
f6789047 RW |
1200 | (arguments |
1201 | `(;; There are many test failures. Some are known to | |
1202 | ;; fail upstream, others relate to not having an X | |
1203 | ;; server running at test time, yet others are a | |
1204 | ;; complete mystery to me. | |
1205 | ||
1206 | ;; hotspot: passed: 241; failed: 45; error: 2 | |
1207 | ;; langtools: passed: 1,934; failed: 26 | |
1208 | ;; jdk: unknown | |
1209 | #:tests? #f | |
71053e14 RW |
1210 | |
1211 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build | |
1212 | ;; gremlin) doesn't support it yet, so skip this phase. | |
1213 | #:validate-runpath? #f | |
1214 | ||
f6789047 RW |
1215 | ;; Apparently, the C locale is needed for some of the tests. |
1216 | #:locale "C" | |
71053e14 RW |
1217 | |
1218 | #:modules ((guix build utils) | |
1219 | (guix build gnu-build-system) | |
1220 | (ice-9 match) | |
1221 | (ice-9 popen) | |
71053e14 RW |
1222 | (srfi srfi-19) |
1223 | (srfi srfi-26)) | |
1224 | ||
1225 | #:configure-flags | |
e2098e2d RW |
1226 | ;; TODO: package pcsc and sctp, and add to inputs |
1227 | `("--disable-system-pcsc" | |
1228 | "--disable-system-sctp" | |
1229 | "--enable-bootstrap" | |
1230 | "--enable-nss" | |
1231 | "--without-rhino" | |
e3b91b79 SS |
1232 | ,(string-append "--with-parallel-jobs=" |
1233 | (number->string (parallel-job-count))) | |
e2098e2d RW |
1234 | "--disable-downloading" |
1235 | "--disable-tests" ;they are run in the check phase instead | |
1236 | "--with-openjdk-src-dir=./openjdk.src" | |
1237 | ,(string-append "--with-jdk-home=" | |
1238 | (assoc-ref %build-inputs "jdk"))) | |
71053e14 RW |
1239 | |
1240 | #:phases | |
1241 | (modify-phases %standard-phases | |
1242 | (replace 'unpack | |
1243 | (lambda* (#:key source inputs #:allow-other-keys) | |
1244 | (let ((target (string-append "icedtea-" ,version)) | |
1245 | (unpack (lambda* (name #:optional dir) | |
1246 | (let ((dir (or dir | |
1247 | (string-drop-right name 5)))) | |
1248 | (mkdir dir) | |
2c8ac364 MW |
1249 | (invoke "tar" "xvf" |
1250 | (assoc-ref inputs name) | |
1251 | "-C" dir | |
1252 | "--strip-components=1"))))) | |
71053e14 | 1253 | (mkdir target) |
2c8ac364 MW |
1254 | (invoke "tar" "xvf" source |
1255 | "-C" target "--strip-components=1") | |
1256 | (chdir target) | |
1257 | (unpack "openjdk-src" "openjdk.src") | |
1258 | (with-directory-excursion "openjdk.src" | |
1259 | (for-each unpack | |
1260 | (filter (cut string-suffix? "-drop" <>) | |
1261 | (map (match-lambda | |
1262 | ((name . _) name)) | |
1263 | inputs)))) | |
1264 | #t))) | |
6b7e09ae RW |
1265 | (add-after 'unpack 'patch-bitrot |
1266 | (lambda _ | |
1267 | (substitute* '("patches/boot/revert-6973616.patch" | |
1268 | "openjdk.src/jdk/make/common/shared/Defs-versions.gmk") | |
1269 | (("REQUIRED_FREETYPE_VERSION = 2.2.1") | |
1270 | "REQUIRED_FREETYPE_VERSION = 2.10.1")) | |
1271 | ;; As of attr 2.4.48 this header is no longer | |
1272 | ;; included. It is provided by the libc instead. | |
1273 | (substitute* '("configure" | |
1274 | "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c") | |
1275 | (("attr/xattr.h") "sys/xattr.h")) | |
1276 | #t)) | |
71053e14 RW |
1277 | (add-after 'unpack 'fix-x11-extension-include-path |
1278 | (lambda* (#:key inputs #:allow-other-keys) | |
1279 | (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk" | |
1280 | (((string-append "\\$\\(firstword \\$\\(wildcard " | |
1281 | "\\$\\(OPENWIN_HOME\\)" | |
1282 | "/include/X11/extensions\\).*$")) | |
1283 | (string-append (assoc-ref inputs "libxrender") | |
1284 | "/include/X11/extensions" | |
1285 | " -I" (assoc-ref inputs "libxtst") | |
1286 | "/include/X11/extensions" | |
1287 | " -I" (assoc-ref inputs "libxinerama") | |
1288 | "/include/X11/extensions")) | |
1289 | (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") "")) | |
1290 | #t)) | |
1291 | (add-after 'unpack 'patch-paths | |
1292 | (lambda _ | |
1293 | ;; buildtree.make generates shell scripts, so we need to replace | |
1294 | ;; the generated shebang | |
1295 | (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make") | |
1296 | (("/bin/sh") (which "bash"))) | |
1297 | ||
1298 | (let ((corebin (string-append | |
1299 | (assoc-ref %build-inputs "coreutils") "/bin/")) | |
1300 | (binbin (string-append | |
1301 | (assoc-ref %build-inputs "binutils") "/bin/")) | |
1302 | (grepbin (string-append | |
1303 | (assoc-ref %build-inputs "grep") "/bin/"))) | |
1304 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk" | |
1305 | "openjdk.src/corba/make/common/shared/Defs-linux.gmk") | |
1306 | (("UNIXCOMMAND_PATH = /bin/") | |
1307 | (string-append "UNIXCOMMAND_PATH = " corebin)) | |
1308 | (("USRBIN_PATH = /usr/bin/") | |
1309 | (string-append "USRBIN_PATH = " corebin)) | |
1310 | (("DEVTOOLS_PATH *= */usr/bin/") | |
1311 | (string-append "DEVTOOLS_PATH = " corebin)) | |
1312 | (("COMPILER_PATH *= */usr/bin/") | |
1313 | (string-append "COMPILER_PATH = " | |
1314 | (assoc-ref %build-inputs "gcc") "/bin/")) | |
1315 | (("DEF_OBJCOPY *=.*objcopy") | |
1316 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) | |
1317 | ||
1318 | ;; fix path to alsa header | |
1319 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" | |
1320 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
1321 | (string-append "ALSA_INCLUDE=" | |
1322 | (assoc-ref %build-inputs "alsa-lib") | |
1323 | "/include/alsa/version.h"))) | |
1324 | ||
1325 | ;; fix hard-coded utility paths | |
1326 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk" | |
1327 | "openjdk.src/corba/make/common/shared/Defs-utils.gmk") | |
1328 | (("ECHO *=.*echo") | |
1329 | (string-append "ECHO = " (which "echo"))) | |
1330 | (("^GREP *=.*grep") | |
1331 | (string-append "GREP = " (which "grep"))) | |
1332 | (("EGREP *=.*egrep") | |
1333 | (string-append "EGREP = " (which "egrep"))) | |
1334 | (("CPIO *=.*cpio") | |
1335 | (string-append "CPIO = " (which "cpio"))) | |
1336 | (("READELF *=.*readelf") | |
1337 | (string-append "READELF = " (which "readelf"))) | |
1338 | (("^ *AR *=.*ar") | |
1339 | (string-append "AR = " (which "ar"))) | |
1340 | (("^ *TAR *=.*tar") | |
1341 | (string-append "TAR = " (which "tar"))) | |
1342 | (("AS *=.*as") | |
1343 | (string-append "AS = " (which "as"))) | |
1344 | (("LD *=.*ld") | |
1345 | (string-append "LD = " (which "ld"))) | |
1346 | (("STRIP *=.*strip") | |
1347 | (string-append "STRIP = " (which "strip"))) | |
1348 | (("NM *=.*nm") | |
1349 | (string-append "NM = " (which "nm"))) | |
1350 | (("^SH *=.*sh") | |
1351 | (string-append "SH = " (which "bash"))) | |
1352 | (("^FIND *=.*find") | |
1353 | (string-append "FIND = " (which "find"))) | |
1354 | (("LDD *=.*ldd") | |
1355 | (string-append "LDD = " (which "ldd"))) | |
1356 | (("NAWK *=.*(n|g)awk") | |
1357 | (string-append "NAWK = " (which "gawk"))) | |
1358 | (("XARGS *=.*xargs") | |
1359 | (string-append "XARGS = " (which "xargs"))) | |
1360 | (("UNZIP *=.*unzip") | |
1361 | (string-append "UNZIP = " (which "unzip"))) | |
1362 | (("ZIPEXE *=.*zip") | |
1363 | (string-append "ZIPEXE = " (which "zip"))) | |
1364 | (("SED *=.*sed") | |
1365 | (string-append "SED = " (which "sed")))) | |
1366 | ||
1367 | ;; Some of these timestamps cause problems as they are more than | |
1368 | ;; 10 years ago, failing the build process. | |
1369 | (substitute* | |
1370 | "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties" | |
1371 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") | |
1372 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") | |
1373 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") | |
1374 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))) | |
1375 | #t)) | |
1376 | (add-before 'configure 'set-additional-paths | |
1377 | (lambda* (#:key inputs #:allow-other-keys) | |
e2098e2d RW |
1378 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" |
1379 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
1380 | (string-append "ALSA_INCLUDE=" | |
1381 | (assoc-ref inputs "alsa-lib") | |
1382 | "/include/alsa/version.h"))) | |
1383 | (setenv "CC" "gcc") | |
1384 | (setenv "CPATH" | |
1385 | (string-append (assoc-ref inputs "libxcomposite") | |
1386 | "/include/X11/extensions" ":" | |
1387 | (assoc-ref inputs "libxrender") | |
1388 | "/include/X11/extensions" ":" | |
1389 | (assoc-ref inputs "libxtst") | |
1390 | "/include/X11/extensions" ":" | |
1391 | (assoc-ref inputs "libxinerama") | |
1392 | "/include/X11/extensions" ":" | |
1393 | (or (getenv "CPATH") ""))) | |
1394 | (setenv "ALT_OBJCOPY" (which "objcopy")) | |
1395 | (setenv "ALT_CUPS_HEADERS_PATH" | |
1396 | (string-append (assoc-ref inputs "cups") | |
1397 | "/include")) | |
1398 | (setenv "ALT_FREETYPE_HEADERS_PATH" | |
1399 | (string-append (assoc-ref inputs "freetype") | |
1400 | "/include")) | |
1401 | (setenv "ALT_FREETYPE_LIB_PATH" | |
1402 | (string-append (assoc-ref inputs "freetype") | |
1403 | "/lib")) | |
71053e14 | 1404 | #t)) |
59199e1a GB |
1405 | (add-before 'build 'disable-os-version-check |
1406 | ;; allow build on linux major version change | |
1407 | (lambda _ | |
1408 | (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok") | |
1409 | #t)) | |
71053e14 RW |
1410 | (add-before 'check 'fix-test-framework |
1411 | (lambda _ | |
1412 | ;; Fix PATH in test environment | |
1413 | (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java" | |
1414 | (("PATH=/bin:/usr/bin") | |
1415 | (string-append "PATH=" (getenv "PATH")))) | |
1416 | (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java" | |
1417 | (("/usr/bin/env") (which "env"))) | |
1418 | (substitute* "openjdk.src/hotspot/test/test_env.sh" | |
1419 | (("/bin/rm") (which "rm")) | |
1420 | (("/bin/cp") (which "cp")) | |
1421 | (("/bin/mv") (which "mv"))) | |
1422 | #t)) | |
1423 | (add-before 'check 'fix-hotspot-tests | |
1424 | (lambda _ | |
1425 | (with-directory-excursion "openjdk.src/hotspot/test/" | |
1426 | (substitute* "jprt.config" | |
1427 | (("PATH=\"\\$\\{path4sdk\\}\"") | |
1428 | (string-append "PATH=" (getenv "PATH"))) | |
1429 | (("make=/usr/bin/make") | |
1430 | (string-append "make=" (which "make")))) | |
1431 | (substitute* '("runtime/6626217/Test6626217.sh" | |
1432 | "runtime/7110720/Test7110720.sh") | |
1433 | (("/bin/rm") (which "rm")) | |
1434 | (("/bin/cp") (which "cp")) | |
1435 | (("/bin/mv") (which "mv")))) | |
1436 | #t)) | |
1437 | (add-before 'check 'fix-jdk-tests | |
1438 | (lambda _ | |
1439 | (with-directory-excursion "openjdk.src/jdk/test/" | |
1440 | (substitute* "com/sun/jdi/JdbReadTwiceTest.sh" | |
1441 | (("/bin/pwd") (which "pwd"))) | |
1442 | (substitute* "com/sun/jdi/ShellScaffold.sh" | |
1443 | (("/bin/kill") (which "kill"))) | |
1444 | (substitute* "start-Xvfb.sh" | |
1445 | ;;(("/usr/bin/X11/Xvfb") (which "Xvfb")) | |
1446 | (("/usr/bin/nohup") (which "nohup"))) | |
1447 | (substitute* "javax/security/auth/Subject/doAs/Test.sh" | |
1448 | (("/bin/rm") (which "rm"))) | |
1449 | (substitute* "tools/launcher/MultipleJRE.sh" | |
1450 | (("echo \"#!/bin/sh\"") | |
1451 | (string-append "echo \"#!" (which "rm") "\"")) | |
1452 | (("/usr/bin/zip") (which "zip"))) | |
1453 | (substitute* "com/sun/jdi/OnThrowTest.java" | |
1454 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
1455 | (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java" | |
1456 | (("/usr/bin/uptime") (which "uptime"))) | |
1457 | (substitute* "java/lang/ProcessBuilder/Basic.java" | |
1458 | (("/usr/bin/env") (which "env")) | |
1459 | (("/bin/false") (which "false")) | |
1460 | (("/bin/true") (which "true")) | |
1461 | (("/bin/cp") (which "cp")) | |
1462 | (("/bin/sh") (which "sh"))) | |
1463 | (substitute* "java/lang/ProcessBuilder/FeelingLucky.java" | |
1464 | (("/bin/sh") (which "sh"))) | |
1465 | (substitute* "java/lang/ProcessBuilder/Zombies.java" | |
1466 | (("/usr/bin/perl") (which "perl")) | |
1467 | (("/bin/ps") (which "ps")) | |
1468 | (("/bin/true") (which "true"))) | |
1469 | (substitute* "java/lang/Runtime/exec/ConcurrentRead.java" | |
1470 | (("/usr/bin/tee") (which "tee"))) | |
1471 | (substitute* "java/lang/Runtime/exec/ExecWithDir.java" | |
1472 | (("/bin/true") (which "true"))) | |
1473 | (substitute* "java/lang/Runtime/exec/ExecWithInput.java" | |
1474 | (("/bin/cat") (which "cat"))) | |
1475 | (substitute* "java/lang/Runtime/exec/ExitValue.java" | |
1476 | (("/bin/sh") (which "sh")) | |
1477 | (("/bin/true") (which "true")) | |
1478 | (("/bin/kill") (which "kill"))) | |
1479 | (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java" | |
1480 | (("/usr/bin/echo") (which "echo"))) | |
1481 | (substitute* "java/lang/Runtime/exec/LotsOfOutput.java" | |
1482 | (("/usr/bin/cat") (which "cat"))) | |
1483 | (substitute* "java/lang/Runtime/exec/SleepyCat.java" | |
1484 | (("/bin/cat") (which "cat")) | |
1485 | (("/bin/sleep") (which "sleep")) | |
1486 | (("/bin/sh") (which "sh"))) | |
1487 | (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java" | |
1488 | (("/bin/cat") (which "cat"))) | |
1489 | (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java" | |
1490 | (("/bin/chmod") (which "chmod"))) | |
1491 | (substitute* "java/util/zip/ZipFile/Assortment.java" | |
1492 | (("/bin/sh") (which "sh")))) | |
1493 | #t)) | |
1494 | (replace 'check | |
1495 | (lambda _ | |
1496 | ;; The "make check-*" targets always return zero, so we need to | |
1497 | ;; check for errors in the associated log files to determine | |
1498 | ;; whether any tests have failed. | |
1499 | (use-modules (ice-9 rdelim)) | |
1500 | (let* ((error-pattern (make-regexp "^(Error|FAILED):.*")) | |
1501 | (checker (lambda (port) | |
1502 | (let loop () | |
1503 | (let ((line (read-line port))) | |
1504 | (cond | |
1505 | ((eof-object? line) #t) | |
2c8ac364 MW |
1506 | ((regexp-exec error-pattern line) |
1507 | (error "test failed")) | |
71053e14 RW |
1508 | (else (loop))))))) |
1509 | (run-test (lambda (test) | |
2c8ac364 | 1510 | (invoke "make" test) |
71053e14 RW |
1511 | (call-with-input-file |
1512 | (string-append "test/" test ".log") | |
1513 | checker)))) | |
2c8ac364 MW |
1514 | (when #f ; skip tests |
1515 | (run-test "check-hotspot") | |
1516 | (run-test "check-langtools") | |
fa41a089 MW |
1517 | (run-test "check-jdk")) |
1518 | #t))) | |
71053e14 RW |
1519 | (replace 'install |
1520 | (lambda* (#:key outputs #:allow-other-keys) | |
1521 | (let ((doc (string-append (assoc-ref outputs "doc") | |
1522 | "/share/doc/icedtea")) | |
1523 | (jre (assoc-ref outputs "out")) | |
1524 | (jdk (assoc-ref outputs "jdk"))) | |
1525 | (copy-recursively "openjdk.build/docs" doc) | |
1526 | (copy-recursively "openjdk.build/j2re-image" jre) | |
1527 | (copy-recursively "openjdk.build/j2sdk-image" jdk)) | |
1528 | #t)) | |
491dc2fb RJ |
1529 | ;; Some of the libraries in the lib/amd64 folder link to libjvm.so. |
1530 | ;; But that shared object is located in the server/ folder, so it | |
1531 | ;; cannot be found. This phase creates a symbolic link in the | |
1532 | ;; lib/amd64 folder so that the other libraries can find it. | |
1533 | ;; | |
1534 | ;; See: | |
1535 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html | |
1536 | ;; | |
1537 | ;; FIXME: Find the bug in the build system, so that this symlink is | |
1538 | ;; not needed. | |
1539 | (add-after 'install 'install-libjvm | |
1540 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1541 | (let* ((lib-path (string-append (assoc-ref outputs "out") | |
d3e22bcc LC |
1542 | ;; See 'INSTALL_ARCH_DIR' in |
1543 | ;; 'configure'. | |
1b6f99ea RW |
1544 | ,(match (%current-system) |
1545 | ("i686-linux" | |
048d21a8 | 1546 | "/lib/i386") |
1b6f99ea | 1547 | ("x86_64-linux" |
048d21a8 | 1548 | "/lib/amd64") |
d3e22bcc | 1549 | ("armhf-linux" |
048d21a8 | 1550 | "/lib/arm") |
d3e22bcc | 1551 | ("aarch64-linux" |
41763008 EF |
1552 | "/lib/aarch64") |
1553 | ;; We need a catch-all, dropping | |
1554 | ;; '-linux' works in most cases. | |
1555 | (_ | |
1556 | (string-append | |
1557 | "/lib/" | |
1558 | (string-drop-right | |
1559 | (%current-system) 6))))))) | |
491dc2fb RJ |
1560 | (symlink (string-append lib-path "/server/libjvm.so") |
1561 | (string-append lib-path "/libjvm.so"))) | |
1562 | #t)) | |
71053e14 RW |
1563 | ;; By default IcedTea only generates an empty keystore. In order to |
1564 | ;; be able to use certificates in Java programs we need to generate a | |
1565 | ;; keystore from a set of certificates. For convenience we use the | |
1566 | ;; certificates from the nss-certs package. | |
1567 | (add-after 'install 'install-keystore | |
1568 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1569 | (let* ((keystore "cacerts") | |
1570 | (certs-dir (string-append (assoc-ref inputs "nss-certs") | |
1571 | "/etc/ssl/certs")) | |
1572 | (keytool (string-append (assoc-ref outputs "jdk") | |
1573 | "/bin/keytool"))) | |
1574 | (define (extract-cert file target) | |
1575 | (call-with-input-file file | |
1576 | (lambda (in) | |
1577 | (call-with-output-file target | |
1578 | (lambda (out) | |
1579 | (let loop ((line (read-line in 'concat)) | |
1580 | (copying? #f)) | |
1581 | (cond | |
1582 | ((eof-object? line) #t) | |
1583 | ((string-prefix? "-----BEGIN" line) | |
1584 | (display line out) | |
1585 | (loop (read-line in 'concat) #t)) | |
1586 | ((string-prefix? "-----END" line) | |
1587 | (display line out) | |
1588 | #t) | |
1589 | (else | |
1590 | (when copying? (display line out)) | |
1591 | (loop (read-line in 'concat) copying?))))))))) | |
1592 | (define (import-cert cert) | |
1593 | (format #t "Importing certificate ~a\n" (basename cert)) | |
1594 | (let ((temp "tmpcert")) | |
1595 | (extract-cert cert temp) | |
1596 | (let ((port (open-pipe* OPEN_WRITE keytool | |
1597 | "-import" | |
1598 | "-alias" (basename cert) | |
1599 | "-keystore" keystore | |
1600 | "-storepass" "changeit" | |
1601 | "-file" temp))) | |
1602 | (display "yes\n" port) | |
1603 | (when (not (zero? (status:exit-val (close-pipe port)))) | |
1604 | (format #t "failed to import ~a\n" cert))) | |
1605 | (delete-file temp))) | |
1606 | ||
1607 | ;; This is necessary because the certificate directory contains | |
1608 | ;; files with non-ASCII characters in their names. | |
1609 | (setlocale LC_ALL "en_US.utf8") | |
1610 | (setenv "LC_ALL" "en_US.utf8") | |
1611 | ||
1612 | (for-each import-cert (find-files certs-dir "\\.pem$")) | |
1613 | (mkdir-p (string-append (assoc-ref outputs "out") | |
1614 | "/lib/security")) | |
1615 | (mkdir-p (string-append (assoc-ref outputs "jdk") | |
1616 | "/jre/lib/security")) | |
1617 | ||
1618 | ;; The cacerts files we are going to overwrite are chmod'ed as | |
1619 | ;; read-only (444) in icedtea-8 (which derives from this | |
1620 | ;; package). We have to change this so we can overwrite them. | |
1621 | (chmod (string-append (assoc-ref outputs "out") | |
1622 | "/lib/security/" keystore) #o644) | |
1623 | (chmod (string-append (assoc-ref outputs "jdk") | |
1624 | "/jre/lib/security/" keystore) #o644) | |
1625 | ||
1626 | (install-file keystore | |
1627 | (string-append (assoc-ref outputs "out") | |
1628 | "/lib/security")) | |
1629 | (install-file keystore | |
1630 | (string-append (assoc-ref outputs "jdk") | |
1631 | "/jre/lib/security")) | |
1632 | #t)))))) | |
f6789047 | 1633 | (native-inputs |
d9148890 | 1634 | `(("openjdk-src" |
f6789047 | 1635 | ,(drop "openjdk" |
7f6485e7 | 1636 | "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l")) |
f6789047 RW |
1637 | ("corba-drop" |
1638 | ,(drop "corba" | |
7f6485e7 | 1639 | "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz")) |
f6789047 RW |
1640 | ("jaxp-drop" |
1641 | ,(drop "jaxp" | |
7f6485e7 | 1642 | "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl")) |
f6789047 RW |
1643 | ("jaxws-drop" |
1644 | ,(drop "jaxws" | |
7f6485e7 | 1645 | "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk")) |
f6789047 RW |
1646 | ("jdk-drop" |
1647 | ,(drop "jdk" | |
7f6485e7 | 1648 | "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd")) |
f6789047 RW |
1649 | ("langtools-drop" |
1650 | ,(drop "langtools" | |
7f6485e7 | 1651 | "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj")) |
f6789047 | 1652 | ("hotspot-drop" |
db024183 GB |
1653 | ,(origin |
1654 | (method url-fetch) | |
1655 | (uri (string-append | |
1656 | "http://icedtea.classpath.org/downloads/drops" | |
1657 | "/icedtea7/" version "/hotspot.tar.bz2")) | |
1658 | (sha256 | |
1659 | (base32 | |
1660 | "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws")) | |
1661 | (patches (search-patches | |
672ac095 | 1662 | "icedtea-7-hotspot-aarch64-use-c++98.patch")))) |
e2098e2d | 1663 | ("ant" ,ant-bootstrap) |
71053e14 | 1664 | ("attr" ,attr) |
71053e14 RW |
1665 | ("coreutils" ,coreutils) |
1666 | ("diffutils" ,diffutils) ;for tests | |
1667 | ("gawk" ,gawk) | |
1668 | ("grep" ,grep) | |
1669 | ("libtool" ,libtool) | |
1670 | ("pkg-config" ,pkg-config) | |
1671 | ("wget" ,wget) | |
1672 | ("which" ,which) | |
1673 | ("cpio" ,cpio) | |
1674 | ("zip" ,zip) | |
1675 | ("unzip" ,unzip) | |
1676 | ("fastjar" ,fastjar) | |
1677 | ("libxslt" ,libxslt) ;for xsltproc | |
1678 | ("nss-certs" ,nss-certs) | |
1679 | ("perl" ,perl) | |
1680 | ("procps" ,procps) ;for "free", even though I'm not sure we should use it | |
e2098e2d | 1681 | ("jdk" ,icedtea-6 "jdk"))) |
b711df02 | 1682 | (inputs |
71053e14 RW |
1683 | `(("alsa-lib" ,alsa-lib) |
1684 | ("cups" ,cups) | |
1685 | ("libx11" ,libx11) | |
1686 | ("libxcomposite" ,libxcomposite) | |
1687 | ("libxt" ,libxt) | |
1688 | ("libxtst" ,libxtst) | |
1689 | ("libxi" ,libxi) | |
1690 | ("libxinerama" ,libxinerama) | |
1691 | ("libxrender" ,libxrender) | |
4bd428a7 | 1692 | ("libjpeg" ,libjpeg-turbo) |
71053e14 RW |
1693 | ("libpng" ,libpng) |
1694 | ("mit-krb5" ,mit-krb5) | |
1695 | ("nss" ,nss) | |
1696 | ("giflib" ,giflib) | |
1697 | ("fontconfig" ,fontconfig) | |
1698 | ("freetype" ,freetype) | |
1699 | ("lcms" ,lcms) | |
1700 | ("zlib" ,zlib) | |
1701 | ("gtk" ,gtk+-2))) | |
1702 | (home-page "http://icedtea.classpath.org") | |
1703 | (synopsis "Java development kit") | |
1704 | (description | |
1705 | "This package provides the Java development kit OpenJDK built with the | |
1706 | IcedTea build harness.") | |
d3e22bcc LC |
1707 | |
1708 | ;; 'configure' lists "mips" and "mipsel", but not "mips64el'. | |
1709 | (supported-systems (delete "mips64el-linux" %supported-systems)) | |
1710 | ||
71053e14 RW |
1711 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the |
1712 | ;; same license as both GNU Classpath and OpenJDK. | |
1713 | (license license:gpl2+)))) | |
d2540f80 | 1714 | |
349a3147 | 1715 | (define-public icedtea-8 |
1d97d8ff | 1716 | (let* ((version "3.7.0") |
349a3147 RW |
1717 | (drop (lambda (name hash) |
1718 | (origin | |
1719 | (method url-fetch) | |
1720 | (uri (string-append | |
db531f73 | 1721 | "http://icedtea.classpath.org/download/drops" |
349a3147 RW |
1722 | "/icedtea8/" version "/" name ".tar.xz")) |
1723 | (sha256 (base32 hash)))))) | |
1724 | (package (inherit icedtea-7) | |
1d97d8ff | 1725 | (version "3.7.0") |
349a3147 RW |
1726 | (source (origin |
1727 | (method url-fetch) | |
1728 | (uri (string-append | |
1729 | "http://icedtea.wildebeest.org/download/source/icedtea-" | |
1730 | version ".tar.xz")) | |
1731 | (sha256 | |
1732 | (base32 | |
1d97d8ff | 1733 | "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w")) |
349a3147 RW |
1734 | (modules '((guix build utils))) |
1735 | (snippet | |
0c729ef4 | 1736 | '(begin |
f2785bd6 RW |
1737 | (substitute* '("configure" |
1738 | "acinclude.m4") | |
0c729ef4 RW |
1739 | ;; Do not embed build time |
1740 | (("(DIST_ID=\"Custom build).*$" _ prefix) | |
1741 | (string-append prefix "\"\n")) | |
1742 | ;; Do not leak information about the build host | |
1743 | (("DIST_NAME=\"\\$build_os\"") | |
1744 | "DIST_NAME=\"guix\"")) | |
1745 | #t)))) | |
349a3147 | 1746 | (arguments |
f2785bd6 RW |
1747 | `(#:imported-modules |
1748 | ((guix build ant-build-system) | |
1749 | (guix build syscalls) | |
1750 | ,@%gnu-build-system-modules) | |
1751 | ,@(substitute-keyword-arguments (package-arguments icedtea-7) | |
1752 | ((#:modules modules) | |
1753 | `((guix build utils) | |
1754 | (guix build gnu-build-system) | |
1755 | ((guix build ant-build-system) #:prefix ant:) | |
1756 | (ice-9 match) | |
1757 | (ice-9 popen) | |
1758 | (srfi srfi-19) | |
1759 | (srfi srfi-26))) | |
1760 | ((#:configure-flags flags) | |
1761 | `(let ((jdk (assoc-ref %build-inputs "jdk"))) | |
1762 | `( ;;"--disable-bootstrap" | |
1763 | "--enable-bootstrap" | |
1764 | "--enable-nss" | |
cf879925 SS |
1765 | ,(string-append "--with-parallel-jobs=" |
1766 | (number->string (parallel-job-count))) | |
f2785bd6 RW |
1767 | "--disable-downloading" |
1768 | "--disable-system-pcsc" | |
1769 | "--disable-system-sctp" | |
1770 | "--disable-tests" ;they are run in the check phase instead | |
1771 | "--with-openjdk-src-dir=./openjdk.src" | |
1772 | ,(string-append "--with-jdk-home=" jdk)))) | |
1773 | ((#:phases phases) | |
1774 | `(modify-phases ,phases | |
1775 | (delete 'fix-x11-extension-include-path) | |
1776 | (delete 'patch-paths) | |
1777 | (delete 'set-additional-paths) | |
1778 | (delete 'patch-patches) | |
6b7e09ae | 1779 | (delete 'patch-bitrot) |
f2785bd6 RW |
1780 | ;; Prevent the keytool from recording the current time when |
1781 | ;; adding certificates at build time. | |
1782 | (add-after 'unpack 'patch-keystore | |
1783 | (lambda _ | |
1784 | (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java" | |
1785 | (("date = new Date\\(\\);") | |
1786 | "\ | |
1787 | date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\ | |
1788 | new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\ | |
1789 | new Date();")) | |
1790 | #t)) | |
1791 | (add-after 'unpack 'patch-jni-libs | |
1792 | ;; Hardcode dynamically loaded libraries. | |
1793 | (lambda _ | |
1794 | (let* ((library-path (search-path-as-string->list | |
1795 | (getenv "LIBRARY_PATH"))) | |
1796 | (find-library (lambda (name) | |
1797 | (search-path | |
1798 | library-path | |
1799 | (string-append "lib" name ".so"))))) | |
1800 | (for-each | |
1801 | (lambda (file) | |
1802 | (catch 'decoding-error | |
1803 | (lambda () | |
1804 | (substitute* file | |
1805 | (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" | |
1806 | _ name version) | |
1807 | (format #f "\"~a\"" (find-library name))) | |
1808 | (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) | |
1809 | (format #f "\"~a\"" (find-library name))))) | |
1810 | (lambda _ | |
1811 | ;; Those are safe to skip. | |
1812 | (format (current-error-port) | |
1813 | "warning: failed to substitute: ~a~%" | |
1814 | file)))) | |
1815 | (find-files "openjdk.src/jdk/src/solaris/native" | |
1816 | "\\.c|\\.h")) | |
1817 | #t))) | |
1818 | (replace 'install | |
1819 | (lambda* (#:key outputs #:allow-other-keys) | |
1820 | (let ((doc (string-append (assoc-ref outputs "doc") | |
1821 | "/share/doc/icedtea")) | |
1822 | (jre (assoc-ref outputs "out")) | |
1823 | (jdk (assoc-ref outputs "jdk"))) | |
1824 | (copy-recursively "openjdk.build/docs" doc) | |
1825 | (copy-recursively "openjdk.build/images/j2re-image" jre) | |
1826 | (copy-recursively "openjdk.build/images/j2sdk-image" jdk) | |
1827 | ;; Install the nss.cfg file to JRE to enable SSL/TLS | |
1828 | ;; support via NSS. | |
1829 | (copy-file (string-append jdk "/jre/lib/security/nss.cfg") | |
1830 | (string-append jre "/lib/security/nss.cfg")) | |
1831 | #t))) | |
1832 | (add-after 'install 'strip-jar-timestamps | |
1833 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))))) | |
349a3147 RW |
1834 | (native-inputs |
1835 | `(("jdk" ,icedtea-7 "jdk") | |
1836 | ("openjdk-src" | |
1837 | ,(drop "openjdk" | |
1d97d8ff | 1838 | "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p")) |
12eecbf0 LF |
1839 | ("aarch32-drop" |
1840 | ,(drop "aarch32" | |
1d97d8ff | 1841 | "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg")) |
349a3147 RW |
1842 | ("corba-drop" |
1843 | ,(drop "corba" | |
1d97d8ff | 1844 | "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah")) |
349a3147 RW |
1845 | ("jaxp-drop" |
1846 | ,(drop "jaxp" | |
1d97d8ff | 1847 | "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i")) |
349a3147 RW |
1848 | ("jaxws-drop" |
1849 | ,(drop "jaxws" | |
1d97d8ff | 1850 | "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf")) |
349a3147 RW |
1851 | ("jdk-drop" |
1852 | ,(drop "jdk" | |
1d97d8ff | 1853 | "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl")) |
349a3147 RW |
1854 | ("langtools-drop" |
1855 | ,(drop "langtools" | |
1d97d8ff | 1856 | "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw")) |
349a3147 | 1857 | ("hotspot-drop" |
0569a832 SS |
1858 | ,(drop "hotspot" |
1859 | "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm")) | |
349a3147 RW |
1860 | ("nashorn-drop" |
1861 | ,(drop "nashorn" | |
1d97d8ff | 1862 | "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa")) |
fd34d4f4 LF |
1863 | ("shenandoah-drop" |
1864 | ,(drop "shenandoah" | |
1d97d8ff | 1865 | "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy")) |
349a3147 | 1866 | ,@(fold alist-delete (package-native-inputs icedtea-7) |
e2098e2d | 1867 | '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop" |
349a3147 RW |
1868 | "jdk-drop" "langtools-drop" "hotspot-drop"))))))) |
1869 | ||
dd741059 JL |
1870 | (define-public openjdk9 |
1871 | (package | |
1872 | (name "openjdk") | |
1873 | (version "9.181") | |
1874 | (source (origin | |
1875 | (method url-fetch) | |
1876 | (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2") | |
1877 | (file-name (string-append name "-" version ".tar.bz2")) | |
1878 | (sha256 | |
1879 | (base32 | |
1880 | "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq")) | |
1881 | (modules '((guix build utils))) | |
1882 | (snippet | |
1883 | `(begin | |
b7a1cac6 RW |
1884 | (for-each delete-file |
1885 | (find-files "." ".*.(bin|exe|jar)$")) | |
dd741059 JL |
1886 | #t)))) |
1887 | (build-system gnu-build-system) | |
1888 | (outputs '("out" "jdk" "doc")) | |
1889 | (arguments | |
1890 | `(#:tests? #f; require jtreg | |
f5789c26 | 1891 | #:make-flags '("all") |
dd741059 JL |
1892 | #:imported-modules |
1893 | ((guix build syscalls) | |
1894 | ,@%gnu-build-system-modules) | |
1895 | #:phases | |
1896 | (modify-phases %standard-phases | |
1897 | (add-after 'patch-source-shebangs 'fix-java-shebangs | |
1898 | (lambda _ | |
1899 | ;; This file was "fixed" by patch-source-shebangs, but it requires | |
1900 | ;; this exact first line. | |
1901 | (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem" | |
1902 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) | |
1903 | #t)) | |
1904 | (replace 'configure | |
1905 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1906 | ;; TODO: unbundle libpng and lcms | |
1907 | (invoke "bash" "./configure" | |
1908 | (string-append "--with-freetype=" (assoc-ref inputs "freetype")) | |
1909 | "--disable-freetype-bundling" | |
1910 | "--disable-warnings-as-errors" | |
1911 | "--disable-hotspot-gtest" | |
1912 | "--with-giflib=system" | |
1913 | "--with-libjpeg=system" | |
1914 | (string-append "--prefix=" (assoc-ref outputs "out"))) | |
1915 | #t)) | |
f5789c26 | 1916 | (add-before 'build 'write-source-revision-file |
dd741059 JL |
1917 | (lambda _ |
1918 | (with-output-to-file ".src-rev" | |
1919 | (lambda _ | |
1920 | (display ,version))) | |
dd741059 | 1921 | #t)) |
f5789c26 RW |
1922 | (replace 'build |
1923 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) | |
1924 | (apply invoke "make" | |
1925 | `(,@(if parallel-build? | |
1926 | (list (string-append "JOBS=" | |
1927 | (number->string (parallel-job-count)))) | |
1928 | '()) | |
1929 | ,@make-flags)))) | |
dd741059 JL |
1930 | ;; Some of the libraries in the lib/ folder link to libjvm.so. |
1931 | ;; But that shared object is located in the server/ folder, so it | |
1932 | ;; cannot be found. This phase creates a symbolic link in the | |
1933 | ;; lib/ folder so that the other libraries can find it. | |
1934 | ;; | |
1935 | ;; See: | |
1936 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html | |
1937 | ;; | |
1938 | ;; FIXME: Find the bug in the build system, so that this symlink is | |
1939 | ;; not needed. | |
1940 | (add-after 'install 'install-libjvm | |
1941 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1942 | (let* ((lib-out (string-append (assoc-ref outputs "out") | |
1943 | "/lib")) | |
1944 | (lib-jdk (string-append (assoc-ref outputs "jdk") | |
1945 | "/lib"))) | |
1946 | (symlink (string-append lib-jdk "/server/libjvm.so") | |
1947 | (string-append lib-jdk "/libjvm.so")) | |
1948 | (symlink (string-append lib-out "/server/libjvm.so") | |
1949 | (string-append lib-out "/libjvm.so"))) | |
1950 | #t)) | |
1951 | (replace 'install | |
1952 | (lambda* (#:key outputs #:allow-other-keys) | |
1953 | (let ((out (assoc-ref outputs "out")) | |
1954 | (jdk (assoc-ref outputs "jdk")) | |
1955 | (doc (assoc-ref outputs "doc")) | |
1956 | (images (car (find-files "build" ".*-server-release" | |
1957 | #:directories? #t)))) | |
1958 | (copy-recursively (string-append images "/images/jdk") jdk) | |
1959 | (copy-recursively (string-append images "/images/jre") out) | |
1960 | (copy-recursively (string-append images "/images/docs") doc)) | |
1961 | #t)) | |
1962 | (add-after 'install 'strip-zip-timestamps | |
1963 | (lambda* (#:key outputs #:allow-other-keys) | |
1964 | (use-modules (guix build syscalls)) | |
1965 | (for-each (lambda (zip) | |
1966 | (let ((dir (mkdtemp! "zip-contents.XXXXXX"))) | |
1967 | (with-directory-excursion dir | |
1968 | (invoke "unzip" zip)) | |
1969 | (delete-file zip) | |
1970 | (for-each (lambda (file) | |
1971 | (let ((s (lstat file))) | |
1972 | (unless (eq? (stat:type s) 'symlink) | |
1973 | (format #t "reset ~a~%" file) | |
1974 | (utime file 0 0 0 0)))) | |
1975 | (find-files dir #:directories? #t)) | |
1976 | (with-directory-excursion dir | |
1977 | (let ((files (find-files "." ".*" #:directories? #t))) | |
1978 | (apply invoke "zip" "-0" "-X" zip files))))) | |
1979 | (find-files (assoc-ref outputs "doc") ".*.zip$")) | |
1980 | #t))))) | |
1981 | (inputs | |
1982 | `(("alsa-lib" ,alsa-lib) | |
1983 | ("cups" ,cups) | |
1984 | ("fontconfig" ,fontconfig) | |
1985 | ("freetype" ,freetype) | |
1986 | ("giflib" ,giflib) | |
1987 | ("lcms" ,lcms) | |
1988 | ("libelf" ,libelf) | |
4bd428a7 | 1989 | ("libjpeg" ,libjpeg-turbo) |
dd741059 JL |
1990 | ("libice" ,libice) |
1991 | ("libpng" ,libpng) | |
1992 | ("libx11" ,libx11) | |
1993 | ("libxcomposite" ,libxcomposite) | |
1994 | ("libxi" ,libxi) | |
1995 | ("libxinerama" ,libxinerama) | |
1996 | ("libxrender" ,libxrender) | |
1997 | ("libxt" ,libxt) | |
1998 | ("libxtst" ,libxtst))) | |
1999 | (native-inputs | |
2000 | `(("icedtea-8" ,icedtea-8) | |
2001 | ("icedtea-8:jdk" ,icedtea-8 "jdk") | |
f5789c26 | 2002 | ;; XXX: The build system fails with newer versions of GNU Make. |
5fd0c288 | 2003 | ("make@4.2" ,gnu-make-4.2) |
dd741059 JL |
2004 | ("unzip" ,unzip) |
2005 | ("which" ,which) | |
2006 | ("zip" ,zip))) | |
2007 | (home-page "https://openjdk.java.net/projects/jdk9/") | |
2008 | (synopsis "Java development kit") | |
2009 | (description | |
2010 | "This package provides the Java development kit OpenJDK.") | |
2011 | (license license:gpl2+))) | |
2012 | ||
16b89ecc JL |
2013 | (define-public openjdk10 |
2014 | (package | |
2015 | (inherit openjdk9) | |
2016 | (name "openjdk") | |
2017 | (version "10.46") | |
2018 | (source (origin | |
2019 | (method url-fetch) | |
2020 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2") | |
2021 | (file-name (string-append name "-" version ".tar.bz2")) | |
2022 | (sha256 | |
2023 | (base32 | |
2024 | "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4")) | |
accb5c31 GB |
2025 | (patches (search-patches |
2026 | "openjdk-10-idlj-reproducibility.patch")) | |
16b89ecc JL |
2027 | (modules '((guix build utils))) |
2028 | (snippet | |
2029 | `(begin | |
49ad6aec | 2030 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) |
16b89ecc JL |
2031 | #t)))) |
2032 | (arguments | |
2033 | (substitute-keyword-arguments (package-arguments openjdk9) | |
2034 | ((#:phases phases) | |
2035 | `(modify-phases ,phases | |
2036 | (replace 'fix-java-shebangs | |
2037 | (lambda _ | |
2038 | ;; This file was "fixed" by patch-source-shebangs, but it requires | |
2039 | ;; this exact first line. | |
2040 | (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem" | |
2041 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) | |
2042 | #t)) | |
2043 | (replace 'configure | |
2044 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2045 | (invoke "bash" "./configure" | |
2046 | (string-append "--with-freetype=" (assoc-ref inputs "freetype")) | |
2047 | "--disable-freetype-bundling" | |
2048 | "--disable-warnings-as-errors" | |
2049 | "--disable-hotspot-gtest" | |
2050 | "--with-giflib=system" | |
2051 | "--with-libjpeg=system" | |
2052 | "--with-native-debug-symbols=zipped" | |
2053 | (string-append "--prefix=" (assoc-ref outputs "out"))) | |
2054 | #t)))))) | |
2055 | (native-inputs | |
2056 | `(("openjdk9" ,openjdk9) | |
2057 | ("openjdk9:jdk" ,openjdk9 "jdk") | |
5fd0c288 | 2058 | ("make@4.2" ,gnu-make-4.2) |
16b89ecc JL |
2059 | ("unzip" ,unzip) |
2060 | ("which" ,which) | |
2061 | ("zip" ,zip))))) | |
2062 | ||
95bc85b7 GB |
2063 | (define-public openjdk11 |
2064 | (package | |
2065 | (name "openjdk") | |
2066 | (version "11.28") | |
2067 | (source (origin | |
2068 | (method url-fetch) | |
2069 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2") | |
2070 | (file-name (string-append name "-" version ".tar.bz2")) | |
2071 | (sha256 | |
2072 | (base32 | |
2073 | "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w")) | |
2074 | (modules '((guix build utils))) | |
2075 | (snippet | |
2076 | `(begin | |
62d46ad6 | 2077 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) |
95bc85b7 GB |
2078 | #t)))) |
2079 | (build-system gnu-build-system) | |
2080 | (outputs '("out" "jdk" "doc")) | |
2081 | (arguments | |
2082 | `(#:imported-modules | |
2083 | ((guix build syscalls) | |
2084 | (ice-9 binary-ports) | |
2085 | (rnrs bytevectors) | |
2086 | ,@%gnu-build-system-modules) | |
2087 | #:tests? #f; requires jtreg | |
2088 | ;; TODO package jtreg | |
95bc85b7 GB |
2089 | #:configure-flags |
2090 | `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise | |
2091 | "--disable-warnings-as-errors" | |
2092 | ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894 | |
2093 | "--with-native-debug-symbols=zipped" | |
2094 | ;; do not use the bundled libraries | |
2095 | "--with-giflib=system" | |
2096 | "--with-lcms=system" | |
2097 | "--with-libjpeg=system" | |
2098 | "--with-libpng=system" | |
70d23edf | 2099 | "--with-version-pre=" |
95bc85b7 GB |
2100 | ;; allow the build system to locate the system freetype |
2101 | ,(string-append "--with-freetype-include=" | |
2102 | (assoc-ref %build-inputs "freetype") "/include") | |
2103 | ,(string-append "--with-freetype-lib=" | |
2104 | (assoc-ref %build-inputs "freetype") "/lib")) | |
95bc85b7 GB |
2105 | #:phases |
2106 | (modify-phases %standard-phases | |
2107 | (add-after 'patch-source-shebangs 'fix-java-shebangs | |
2108 | (lambda _ | |
2109 | ;; This file was "fixed" by patch-source-shebangs, but it requires | |
2110 | ;; this exact first line. | |
2111 | (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem" | |
2112 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) | |
2113 | #t)) | |
7b82e1cd | 2114 | (add-before 'build 'write-source-revision-file |
95bc85b7 GB |
2115 | (lambda _ |
2116 | (with-output-to-file ".src-rev" | |
2117 | (lambda _ | |
2118 | (display ,version))) | |
95bc85b7 | 2119 | #t)) |
7b82e1cd RW |
2120 | (replace 'build |
2121 | (lambda* (#:key parallel-build? make-flags #:allow-other-keys) | |
2122 | (apply invoke "make" "all" | |
2123 | `(,@(if parallel-build? | |
2124 | (list (string-append "JOBS=" | |
2125 | (number->string (parallel-job-count)))) | |
2126 | '()) | |
2127 | ,@make-flags)))) | |
95bc85b7 GB |
2128 | ;; jdk 11 does not build jre by default any more |
2129 | ;; building it anyways | |
2130 | ;; for further information see: | |
2131 | ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356 | |
2132 | (add-after 'build 'build-jre | |
7b82e1cd RW |
2133 | (lambda* (#:key parallel-build? make-flags #:allow-other-keys) |
2134 | (apply invoke "make" "legacy-jre-image" | |
2135 | `(,@(if parallel-build? | |
2136 | (list (string-append "JOBS=" | |
2137 | (number->string (parallel-job-count)))) | |
2138 | '()) | |
2139 | ,@make-flags)))) | |
95bc85b7 GB |
2140 | (replace 'install |
2141 | (lambda* (#:key outputs #:allow-other-keys) | |
2142 | (let ((out (assoc-ref outputs "out")) | |
2143 | (jdk (assoc-ref outputs "jdk")) | |
2144 | (doc (assoc-ref outputs "doc")) | |
2145 | (images (car (find-files "build" ".*-server-release" | |
2146 | #:directories? #t)))) | |
2147 | (copy-recursively (string-append images "/images/jdk") jdk) | |
2148 | (copy-recursively (string-append images "/images/jre") out) | |
2149 | (copy-recursively (string-append images "/images/docs") doc)) | |
2150 | #t)) | |
2151 | ;; Some of the libraries in the lib/ folder link to libjvm.so. | |
2152 | ;; But that shared object is located in the server/ folder, so it | |
2153 | ;; cannot be found. This phase creates a symbolic link in the | |
2154 | ;; lib/ folder so that the other libraries can find it. | |
2155 | ;; | |
2156 | ;; See: | |
2157 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html | |
2158 | ;; | |
2159 | ;; FIXME: Find the bug in the build system, so that this symlink is | |
2160 | ;; not needed. | |
2161 | (add-after 'install 'install-libjvm | |
2162 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2163 | (let* ((lib-out (string-append (assoc-ref outputs "out") | |
2164 | "/lib")) | |
2165 | (lib-jdk (string-append (assoc-ref outputs "jdk") | |
2166 | "/lib"))) | |
2167 | (symlink (string-append lib-jdk "/server/libjvm.so") | |
2168 | (string-append lib-jdk "/libjvm.so")) | |
2169 | (symlink (string-append lib-out "/server/libjvm.so") | |
2170 | (string-append lib-out "/libjvm.so"))) | |
2171 | #t)) | |
2172 | (add-after 'install 'strip-character-data-timestamps | |
2173 | (lambda* (#:key outputs #:allow-other-keys) | |
2174 | (use-modules (guix build syscalls)) | |
2175 | (let ((archive (string-append | |
2176 | (assoc-ref outputs "jdk") "/lib/src.zip")) | |
2177 | (dir (mkdtemp! "zip-contents.XXXXXX"))) | |
2178 | (with-directory-excursion dir | |
2179 | (invoke "unzip" archive)) | |
2180 | (delete-file archive) | |
2181 | (with-directory-excursion dir | |
2182 | (let ((char-data-files (find-files "." "CharacterData.*"))) | |
2183 | (for-each (lambda (file) | |
2184 | (substitute* file | |
2185 | (((string-append "This file was generated " | |
2186 | "AUTOMATICALLY from a template " | |
2187 | "file.*")) | |
2188 | (string-append "This file was generated " | |
2189 | "AUTOMATICALLY from a template " | |
2190 | "file")))) | |
2191 | char-data-files))) | |
2192 | (with-directory-excursion dir | |
2193 | (let ((files (find-files "." ".*" #:directories? #t))) | |
2194 | (apply invoke "zip" "-0" "-X" archive files)))))) | |
2195 | (add-after 'strip-character-data-timestamps 'strip-archive-timestamps | |
2196 | (lambda* (#:key outputs #:allow-other-keys) | |
2197 | (use-modules (guix build syscalls) | |
2198 | (ice-9 binary-ports) | |
2199 | (rnrs bytevectors)) | |
2200 | (letrec ((repack-archive | |
2201 | (lambda (archive) | |
2202 | (let ((dir (mkdtemp! "zip-contents.XXXXXX"))) | |
2203 | (with-directory-excursion dir | |
2204 | (invoke "unzip" archive)) | |
2205 | (delete-file archive) | |
2206 | (for-each (compose repack-archive canonicalize-path) | |
2207 | (find-files dir "(ct.sym|.*.jar)$")) | |
2208 | (let ((reset-file-timestamp | |
2209 | (lambda (file) | |
2210 | (let ((s (lstat file))) | |
2211 | (unless (eq? (stat:type s) 'symlink) | |
2212 | (format #t "reset ~a~%" file) | |
2213 | (utime file 0 0 0 0)))))) | |
2214 | (for-each reset-file-timestamp | |
2215 | (find-files dir #:directories? #t))) | |
2216 | (with-directory-excursion dir | |
2217 | (let ((files (find-files "." ".*" #:directories? #t))) | |
2218 | (apply invoke "zip" "-0" "-X" archive files))))))) | |
2219 | (for-each repack-archive | |
2220 | (find-files (assoc-ref outputs "doc") ".*.zip$")) | |
2221 | (for-each repack-archive | |
2222 | (find-files (assoc-ref outputs "jdk") | |
2223 | ".*.(zip|jar|diz)$")) | |
2224 | (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym")) | |
2225 | (let ((repack-jmod | |
2226 | (lambda (file-name) | |
2227 | (call-with-input-file file-name | |
2228 | (lambda (file) | |
2229 | (let ((header #vu8(#x4a #x4d #x01 #x00))) | |
2230 | (if (equal? (get-bytevector-n | |
2231 | file (bytevector-length header)) | |
2232 | header) | |
2233 | (let* ((header-length (bytevector-length header)) | |
2234 | (temp-file (mkstemp! | |
2235 | (string-copy | |
2236 | "temp-file.XXXXXX"))) | |
2237 | (temp-filename (port-filename temp-file)) | |
2238 | (content-length | |
2239 | (- (stat:size (stat file)) | |
2240 | header-length))) | |
2241 | (sendfile temp-file file content-length header-length) | |
2242 | (delete-file file-name) | |
2243 | (close-port temp-file) | |
2244 | (repack-archive (canonicalize-path temp-filename)) | |
2245 | (call-with-output-file file-name | |
2246 | (lambda (file) | |
2247 | (put-bytevector file header) | |
2248 | (call-with-input-file temp-filename | |
2249 | (lambda (temp-file) | |
2250 | (sendfile | |
2251 | file temp-file | |
2252 | (stat:size (stat temp-file)) 0))))))))))))) | |
2253 | (for-each repack-jmod | |
2254 | (find-files (assoc-ref outputs "jdk") ".*.jmod$"))) | |
2255 | #t))) | |
2256 | (add-after 'install 'remove-timestamp-from-api-summary | |
2257 | (lambda* (#:key outputs #:allow-other-keys) | |
2258 | (substitute* (string-append (assoc-ref outputs "doc") | |
2259 | "/api/overview-summary.html") | |
2260 | (("Generated by javadoc \\(11-internal\\).*$") | |
2261 | "Generated by javadoc (11-internal) -->\n")) | |
2262 | #t))))) | |
2263 | (inputs | |
2264 | `(("alsa-lib" ,alsa-lib) | |
2265 | ("cups" ,cups) | |
2266 | ("fontconfig" ,fontconfig) | |
2267 | ("freetype" ,freetype) | |
2268 | ("giflib" ,giflib) | |
2269 | ("lcms" ,lcms) | |
4bd428a7 | 2270 | ("libjpeg" ,libjpeg-turbo) |
95bc85b7 GB |
2271 | ("libpng" ,libpng) |
2272 | ("libx11" ,libx11) | |
2273 | ("libxext" ,libxext) | |
2274 | ("libxrender" ,libxrender) | |
2275 | ("libxt" ,libxt) | |
2276 | ("libxtst" ,libxtst))) | |
2277 | (native-inputs | |
2278 | `(("autoconf" ,autoconf) | |
2279 | ("openjdk10" ,openjdk10) | |
2280 | ("openjdk10:jdk" ,openjdk10 "jdk") | |
5fd0c288 | 2281 | ("make" ,gnu-make-4.2) |
95bc85b7 GB |
2282 | ("pkg-config" ,pkg-config) |
2283 | ("unzip" ,unzip) | |
2284 | ("which" ,which) | |
2285 | ("zip" ,zip))) | |
2286 | (home-page "https://openjdk.java.net/projects/jdk/11/") | |
2287 | (synopsis "Java development kit") | |
2288 | (description | |
2289 | "This package provides the Java development kit OpenJDK.") | |
2290 | (license license:gpl2+))) | |
2291 | ||
64dc8e9e GB |
2292 | (define-public openjdk12 |
2293 | (package | |
2294 | (inherit openjdk11) | |
2295 | (name "openjdk") | |
2296 | (version "12.33") | |
2297 | (source (origin | |
2298 | (method url-fetch) | |
2299 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2") | |
2300 | (file-name (string-append name "-" version ".tar.bz2")) | |
2301 | (sha256 | |
2302 | (base32 | |
2303 | "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2")) | |
2304 | (modules '((guix build utils))) | |
2305 | (snippet | |
2306 | `(begin | |
c7c9370d | 2307 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) |
64dc8e9e GB |
2308 | #t)))) |
2309 | (inputs | |
2310 | `(("alsa-lib" ,alsa-lib) | |
2311 | ("cups" ,cups) | |
2312 | ("fontconfig" ,fontconfig) | |
2313 | ("freetype" ,freetype) | |
2314 | ("giflib" ,giflib) | |
2315 | ("lcms" ,lcms) | |
4bd428a7 | 2316 | ("libjpeg" ,libjpeg-turbo) |
64dc8e9e GB |
2317 | ("libpng" ,libpng) |
2318 | ("libx11" ,libx11) | |
2319 | ("libxext" ,libxext) | |
2320 | ("libxrandr" ,libxrandr) | |
2321 | ("libxrender" ,libxrender) | |
2322 | ("libxt" ,libxt) | |
2323 | ("libxtst" ,libxtst))) | |
2324 | (native-inputs | |
2325 | `(("autoconf" ,autoconf) | |
2326 | ("openjdk11" ,openjdk11) | |
2327 | ("openjdk11:jdk" ,openjdk11 "jdk") | |
5fd0c288 | 2328 | ("make@4.2" ,gnu-make-4.2) |
64dc8e9e GB |
2329 | ("pkg-config" ,pkg-config) |
2330 | ("unzip" ,unzip) | |
2331 | ("which" ,which) | |
2332 | ("zip" ,zip))) | |
2333 | (home-page "https://openjdk.java.net/projects/jdk/12"))) | |
2334 | ||
c4618174 NZ |
2335 | (define-public openjdk13 |
2336 | (package | |
2337 | (inherit openjdk12) | |
2338 | (name "openjdk") | |
2339 | (version "13.0") | |
2340 | (source (origin | |
2341 | (method url-fetch) | |
2342 | (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2") | |
2343 | (file-name (string-append name "-" version ".tar.bz2")) | |
2344 | (sha256 | |
2345 | (base32 | |
2346 | "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq")) | |
2347 | (modules '((guix build utils))) | |
2348 | (snippet | |
2349 | `(begin | |
2350 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) | |
2351 | #t)))) | |
2352 | (inputs | |
2353 | `(("alsa-lib" ,alsa-lib) | |
2354 | ("cups" ,cups) | |
2355 | ("fontconfig" ,fontconfig) | |
2356 | ("freetype" ,freetype) | |
2357 | ("giflib" ,giflib) | |
2358 | ("lcms" ,lcms) | |
2359 | ("libjpeg" ,libjpeg-turbo) | |
2360 | ("libpng" ,libpng) | |
2361 | ("libx11" ,libx11) | |
2362 | ("libxext" ,libxext) | |
2363 | ("libxrandr" ,libxrandr) | |
2364 | ("libxrender" ,libxrender) | |
2365 | ("libxt" ,libxt) | |
2366 | ("libxtst" ,libxtst))) | |
2367 | (native-inputs | |
2368 | `(("autoconf" ,autoconf) | |
2369 | ("openjdk12:jdk" ,openjdk12 "jdk") | |
2370 | ("make@4.2" ,gnu-make-4.2) | |
2371 | ("pkg-config" ,pkg-config) | |
2372 | ("unzip" ,unzip) | |
2373 | ("which" ,which) | |
2374 | ("zip" ,zip))) | |
2375 | (home-page "https://openjdk.java.net/projects/jdk/13"))) | |
2376 | ||
65a11a59 NZ |
2377 | (define-public openjdk14 |
2378 | (package | |
2379 | (inherit openjdk13) | |
2380 | (name "openjdk") | |
2381 | (version "14.0") | |
2382 | (source (origin | |
2383 | (method url-fetch) | |
2384 | (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2") | |
2385 | (file-name (string-append name "-" version ".tar.bz2")) | |
2386 | (sha256 | |
2387 | (base32 | |
2388 | "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch")) | |
2389 | (modules '((guix build utils))) | |
2390 | (snippet | |
2391 | `(begin | |
2392 | ;; The m4 macro uses 'help' to search for builtins, which is | |
2393 | ;; not available in bash-minimal | |
2394 | (substitute* "make/autoconf/basics.m4" | |
2395 | (("if help") "if command -v")) | |
2396 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) | |
2397 | #t)))) | |
2398 | (inputs | |
2399 | `(("alsa-lib" ,alsa-lib) | |
2400 | ("cups" ,cups) | |
2401 | ("fontconfig" ,fontconfig) | |
2402 | ("freetype" ,freetype) | |
2403 | ("giflib" ,giflib) | |
2404 | ("lcms" ,lcms) | |
2405 | ("libjpeg" ,libjpeg-turbo) | |
2406 | ("libpng" ,libpng) | |
2407 | ("libx11" ,libx11) | |
2408 | ("libxext" ,libxext) | |
2409 | ("libxrandr" ,libxrandr) | |
2410 | ("libxrender" ,libxrender) | |
2411 | ("libxt" ,libxt) | |
2412 | ("libxtst" ,libxtst))) | |
2413 | (native-inputs | |
2414 | `(("autoconf" ,autoconf) | |
2415 | ("make@4.2" ,gnu-make-4.2) | |
2416 | ("openjdk13:jdk" ,openjdk13 "jdk") | |
2417 | ("pkg-config" ,pkg-config) | |
2418 | ("unzip" ,unzip) | |
2419 | ("which" ,which) | |
2420 | ("zip" ,zip))) | |
2421 | (home-page "https://openjdk.java.net/projects/jdk/14"))) | |
2422 | ||
33aa65e0 | 2423 | (define-public icedtea icedtea-8) |
068e476f | 2424 | |
5490480c | 2425 | \f |
8bbd0408 RW |
2426 | (define-public ant/java8 |
2427 | (package (inherit ant-bootstrap) | |
2428 | (name "ant") | |
4e342a56 | 2429 | (version "1.10.9") |
8bbd0408 RW |
2430 | (source (origin |
2431 | (method url-fetch) | |
2432 | (uri (string-append "mirror://apache/ant/source/apache-ant-" | |
2433 | version "-src.tar.gz")) | |
2434 | (sha256 | |
2435 | (base32 | |
4e342a56 | 2436 | "0x78434q5ab193ma7ys27m9kwpdgrfzqj00hrf1szwcgk0lzw01z")) |
8bbd0408 RW |
2437 | (modules '((guix build utils))) |
2438 | (snippet | |
2439 | '(begin | |
2440 | (for-each delete-file | |
2441 | (find-files "lib/optional" "\\.jar$")) | |
2442 | #t)))) | |
2443 | (arguments | |
2444 | (substitute-keyword-arguments (package-arguments ant-bootstrap) | |
2445 | ((#:phases phases) | |
2446 | `(modify-phases ,phases | |
2447 | (add-after 'unpack 'remove-scripts | |
2448 | ;; Remove bat / cmd scripts for DOS as well as the antRun and runant | |
2449 | ;; wrappers. | |
2450 | (lambda _ | |
2451 | (for-each delete-file | |
2452 | (find-files "src/script" | |
2453 | "(.*\\.(bat|cmd)|runant.*|antRun.*)")) | |
2454 | #t)) | |
2455 | (replace 'build | |
2456 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2457 | (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) | |
2458 | ||
2459 | ;; Disable tests to avoid dependency on hamcrest-core, which needs | |
2460 | ;; Ant to build. This is necessary in addition to disabling the | |
2461 | ;; "check" phase, because the dependency on "test-jar" would always | |
2462 | ;; result in the tests to be run. | |
2463 | (substitute* "build.xml" | |
00848717 | 2464 | (("depends=\"jars,test-jar") "depends=\"jars")) |
2c8ac364 MW |
2465 | (invoke "bash" "bootstrap.sh" |
2466 | (string-append "-Ddist.dir=" | |
2467 | (assoc-ref outputs "out"))))))))) | |
8bbd0408 | 2468 | (native-inputs |
1c7ef07e GB |
2469 | `(("jdk" ,icedtea-8 "jdk") |
2470 | ("zip" ,zip) | |
2471 | ("unzip" ,unzip))))) | |
8bbd0408 | 2472 | |
e441fc56 RW |
2473 | ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series |
2474 | ;; requires Java 8. | |
2475 | (define-public ant | |
2476 | (package (inherit ant/java8) | |
2039cf37 | 2477 | (version "1.9.15") |
e441fc56 RW |
2478 | (source (origin |
2479 | (method url-fetch) | |
2480 | (uri (string-append "mirror://apache/ant/source/apache-ant-" | |
2481 | version "-src.tar.gz")) | |
2482 | (sha256 | |
2483 | (base32 | |
2039cf37 | 2484 | "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd")))) |
e441fc56 | 2485 | (native-inputs |
3b6ba18b GB |
2486 | `(("jdk" ,icedtea-7 "jdk") |
2487 | ("zip" ,zip) | |
2488 | ("unzip" ,unzip))))) | |
e441fc56 | 2489 | |
9ce7ac99 RW |
2490 | (define-public ant-apache-bcel |
2491 | (package | |
2492 | (inherit ant/java8) | |
2493 | (name "ant-apache-bcel") | |
2494 | (arguments | |
2495 | (substitute-keyword-arguments (package-arguments ant/java8) | |
2496 | ((#:phases phases) | |
2497 | `(modify-phases ,phases | |
2498 | (add-after 'unpack 'link-bcel | |
2499 | (lambda* (#:key inputs #:allow-other-keys) | |
2500 | (for-each (lambda (file) | |
2501 | (symlink file | |
2502 | (string-append "lib/optional/" | |
2503 | (basename file)))) | |
2504 | (find-files (assoc-ref inputs "java-commons-bcel") | |
2505 | "\\.jar$")) | |
2506 | #t)) | |
2507 | (add-after 'build 'install | |
2508 | (lambda* (#:key outputs #:allow-other-keys) | |
2509 | (let* ((out (assoc-ref outputs "out")) | |
2510 | (share (string-append out "/share/java")) | |
2511 | (bin (string-append out "/bin")) | |
2512 | (lib (string-append out "/lib"))) | |
2513 | (mkdir-p share) | |
2514 | (install-file (string-append lib "/ant-apache-bcel.jar") share) | |
2515 | (delete-file-recursively bin) | |
2516 | (delete-file-recursively lib) | |
2517 | #t))))))) | |
2518 | (inputs | |
2519 | `(("java-commons-bcel" ,java-commons-bcel) | |
2520 | ,@(package-inputs ant/java8))))) | |
2521 | ||
fa6c4213 RW |
2522 | (define-public ant-junit |
2523 | (package | |
2524 | (inherit ant/java8) | |
2525 | (name "ant-junit") | |
2526 | (arguments | |
2527 | (substitute-keyword-arguments (package-arguments ant/java8) | |
2528 | ((#:phases phases) | |
2529 | `(modify-phases ,phases | |
2530 | (add-after 'unpack 'link-junit | |
2531 | (lambda* (#:key inputs #:allow-other-keys) | |
2532 | (for-each (lambda (file) | |
2533 | (symlink file | |
2534 | (string-append "lib/optional/" | |
2535 | (basename file)))) | |
2536 | (find-files (assoc-ref inputs "java-junit") | |
2537 | "\\.jar$")) | |
2538 | #t)) | |
2539 | (add-after 'build 'install | |
2540 | (lambda* (#:key outputs #:allow-other-keys) | |
2541 | (let* ((out (assoc-ref outputs "out")) | |
2542 | (share (string-append out "/share/java")) | |
2543 | (bin (string-append out "/bin")) | |
2544 | (lib (string-append out "/lib"))) | |
2545 | (mkdir-p share) | |
2546 | (install-file (string-append lib "/ant-junit.jar") share) | |
2547 | (delete-file-recursively bin) | |
2548 | (delete-file-recursively lib) | |
2549 | #t))))))) | |
2550 | (inputs | |
2551 | `(("java-junit" ,java-junit) | |
2552 | ,@(package-inputs ant/java8))))) | |
2553 | ||
7214fbd2 JL |
2554 | (define-public java-openjfx-build |
2555 | (package | |
2556 | (name "java-openjfx-build") | |
2557 | ;; This is a java-8 version | |
2558 | (version "8.202") | |
2559 | (source (origin | |
2560 | (method hg-fetch) | |
2561 | (uri (hg-reference | |
c19293ad AA |
2562 | (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt") |
2563 | (changeset (string-append | |
2564 | (string-join (string-split version #\.) "u") | |
2565 | "-ga")))) | |
7214fbd2 | 2566 | (file-name (string-append name "-" version "-checkout")) |
2c2b1ef8 BH |
2567 | (modules '((guix build utils))) |
2568 | (snippet | |
2569 | '(begin | |
2570 | ;; Delete included gradle jar | |
2571 | (delete-file-recursively "gradle/wrapper") | |
2572 | #t)) | |
7214fbd2 JL |
2573 | (sha256 |
2574 | (base32 | |
d9ef5aeb AA |
2575 | "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f")) |
2576 | (patches (search-patches "java-openjfx-build-jdk_version.patch")))) | |
7214fbd2 JL |
2577 | (build-system ant-build-system) |
2578 | (arguments | |
2579 | `(#:jar-name "java-openjfx.jar" | |
2580 | #:source-dir "buildSrc/src/main/java" | |
2581 | #:test-dir "buildSrc/src/test" | |
2582 | #:phases | |
2583 | (modify-phases %standard-phases | |
2584 | (add-before 'configure 'generate-jsl-parser | |
2585 | (lambda _ | |
2586 | (invoke "antlr3" "-o" | |
2587 | "buildSrc/src/main/java/com/sun/scenario/effect/compiler" | |
2588 | "buildSrc/src/main/antlr/JSL.g")))))) | |
2589 | (inputs | |
2590 | `(("antlr3" ,antlr3) | |
2591 | ("java-stringtemplate" ,java-stringtemplate))) | |
2592 | (native-inputs | |
2593 | `(("java-junit" ,java-junit) | |
2594 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
2595 | (home-page "https://openjfx.io") | |
2596 | (synopsis "Graphical application toolkit in Java") | |
2597 | (description "OpenJFX is a client application platform for desktop, | |
2598 | mobile and embedded systems built on Java. Its goal is to produce a | |
2599 | modern, efficient, and fully featured toolkit for developing rich client | |
2600 | applications. This package contains base classes for the OpenJFX | |
2601 | distribution and helper classes for building other parts of the | |
2602 | distribution.") | |
2603 | (license license:gpl2))) ;gpl2 only, with classpath exception | |
2604 | ||
46f05439 JL |
2605 | (define-public java-openjfx-base |
2606 | (package (inherit java-openjfx-build) | |
2607 | (name "java-openjfx-base") | |
2608 | (arguments | |
2609 | `(#:jar-name "java-openjfx-base.jar" | |
2610 | #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info" | |
2611 | #:test-dir "modules/base/src/test" | |
2612 | #:phases | |
2613 | (modify-phases %standard-phases | |
2614 | (add-before 'check 'remove-empty-file | |
2615 | (lambda _ | |
2616 | (with-directory-excursion "modules/base/src/test/java" | |
2617 | ;; These files are completely commented, but junit expects them to | |
2618 | ;; contain a class, so tests fail. | |
2619 | (delete-file | |
2620 | "com/sun/javafx/property/adapter/PropertyDescriptorTest.java") | |
2621 | (delete-file | |
2622 | "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java") | |
2623 | (delete-file "javafx/beans/property/PropertiesTest.java") | |
2624 | (delete-file | |
2625 | "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java") | |
2626 | ;; This one fails | |
2627 | (delete-file "com/sun/javafx/runtime/VersionInfoTest.java")) | |
2628 | #t))))) | |
2629 | (propagated-inputs | |
2630 | `(("java-openjfx-build" ,java-openjfx-build))) | |
2631 | (description "OpenJFX is a client application platform for desktop, | |
2632 | mobile and embedded systems built on Java. Its goal is to produce a | |
2633 | modern, efficient, and fully featured toolkit for developing rich client | |
2634 | applications. This package contains base classes for the OpenJFX | |
2635 | distribution."))) | |
36f73d70 JL |
2636 | |
2637 | (define-public java-openjfx-graphics | |
2638 | (package (inherit java-openjfx-build) | |
2639 | (name "java-openjfx-graphics") | |
2640 | (arguments | |
2641 | `(#:jar-name "java-openjfx-graphics.jar" | |
2642 | #:source-dir "modules/graphics/src/main/java" | |
2643 | #:tests? #f; require X | |
2644 | #:test-dir "modules/graphics/src/test")) | |
2645 | (propagated-inputs | |
2646 | `(("java-openjfx-base" ,java-openjfx-base) | |
2647 | ("java-swt" ,java-swt))) | |
2648 | (description "OpenJFX is a client application platform for desktop, | |
2649 | mobile and embedded systems built on Java. Its goal is to produce a | |
2650 | modern, efficient, and fully featured toolkit for developing rich client | |
2651 | applications. This package contains graphics-related classes for the | |
2652 | OpenJFX distribution."))) | |
68a13319 JL |
2653 | |
2654 | (define-public java-openjfx-media | |
2655 | (package (inherit java-openjfx-build) | |
2656 | (name "java-openjfx-media") | |
2657 | (propagated-inputs | |
2658 | `(("java-openjxf-graphics" ,java-openjfx-graphics))) | |
2659 | (arguments | |
2660 | `(#:jar-name "java-openjfx-media.jar" | |
2661 | #:source-dir "modules/media/src/main/java" | |
2662 | #:tests? #f)); no tests | |
2663 | (description "OpenJFX is a client application platform for desktop, | |
2664 | mobile and embedded systems built on Java. Its goal is to produce a | |
2665 | modern, efficient, and fully featured toolkit for developing rich client | |
2666 | applications. This package contains media-related classes for the | |
2667 | OpenJFX distribution."))) | |
46f05439 | 2668 | |
53fb0476 | 2669 | (define-public javacc-4 |
fc8d100b RW |
2670 | (package |
2671 | (name "javacc") | |
53fb0476 | 2672 | (version "4.1") |
fc8d100b | 2673 | (source (origin |
53fb0476 AV |
2674 | (method git-fetch) |
2675 | (uri (git-reference | |
b0e7b699 | 2676 | (url "https://github.com/javacc/javacc") |
53fb0476 AV |
2677 | (commit "release_41"))) |
2678 | (file-name (string-append "javacc-" version "-checkout")) | |
fc8d100b RW |
2679 | (sha256 |
2680 | (base32 | |
6662d65f AV |
2681 | "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0")) |
2682 | (modules '((guix build utils))) | |
2683 | ;; delete bundled jars | |
2684 | (snippet '(begin (delete-file-recursively "lib") #t)))) | |
fc8d100b | 2685 | (build-system ant-build-system) |
53fb0476 AV |
2686 | ;; Tests fail with |
2687 | ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60: | |
2688 | ;; JAVACODE failed | |
fc8d100b | 2689 | (arguments |
53fb0476 | 2690 | `(#:tests? #f |
fc8d100b RW |
2691 | #:phases |
2692 | (modify-phases %standard-phases | |
6662d65f AV |
2693 | ;; Delete tests to avoid build failure (we don't run them anyway). |
2694 | (add-after 'unpack 'delete-tests | |
fc8d100b | 2695 | (lambda _ |
6662d65f AV |
2696 | (for-each delete-file |
2697 | '("src/org/javacc/JavaCCTestCase.java" | |
2698 | "src/org/javacc/parser/ExpansionTest.java" | |
2699 | "src/org/javacc/parser/OptionsTest.java" | |
2700 | "src/org/javacc/jjtree/JJTreeOptionsTest.java")) | |
2701 | (for-each delete-file-recursively | |
2702 | '("src/org/javacc/parser/test" | |
2703 | "src/org/javacc/jjdoc/test")) | |
2704 | #t)) | |
53fb0476 | 2705 | (replace 'install (install-jars "bin/lib"))))) |
fc8d100b RW |
2706 | (home-page "https://javacc.org/") |
2707 | (synopsis "Java parser generator") | |
2708 | (description "Java Compiler Compiler (JavaCC) is the most popular parser | |
2709 | generator for use with Java applications. A parser generator is a tool that | |
2710 | reads a grammar specification and converts it to a Java program that can | |
2711 | recognize matches to the grammar. In addition to the parser generator itself, | |
2712 | JavaCC provides other standard capabilities related to parser generation such | |
2713 | as tree building (via a tool called JJTree included with JavaCC), actions, | |
2714 | debugging, etc.") | |
2715 | (license license:bsd-3))) | |
2716 | ||
aabaac7d JL |
2717 | ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar |
2718 | ;; in the bootstrap/ directory. | |
2719 | (define-public javacc-3 | |
2720 | (package | |
2721 | (inherit javacc-4) | |
2722 | (version "3.2") | |
2723 | (source (origin | |
2724 | (method git-fetch) | |
2725 | (uri (git-reference | |
8ed4c468 | 2726 | (url "https://github.com/javacc/javacc") |
aabaac7d JL |
2727 | (commit "release_32"))) |
2728 | (file-name (string-append "javacc-" version "-checkout")) | |
2729 | (sha256 | |
2730 | (base32 | |
2731 | "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3")))) | |
2732 | (arguments | |
2733 | `(#:tests? #f | |
2734 | #:phases | |
2735 | (modify-phases %standard-phases | |
2736 | (add-before 'build 'set-java-version | |
2737 | (lambda _ | |
2738 | (for-each | |
2739 | (lambda (file) | |
2740 | (substitute* file | |
2741 | (("debug=") "source=\"1.4\" debug="))) | |
2742 | (find-files "." "build.xml")) | |
2743 | #t)) | |
2744 | (replace 'install (install-jars "bin/lib"))))))) | |
2745 | ||
53fb0476 AV |
2746 | (define-public javacc |
2747 | (package | |
2748 | (inherit javacc-4) | |
6b66e470 | 2749 | (version "7.0.4") |
ebf8048d TGR |
2750 | (source |
2751 | (origin | |
2752 | (method git-fetch) | |
2753 | (uri (git-reference | |
b0e7b699 | 2754 | (url "https://github.com/javacc/javacc") |
ebf8048d TGR |
2755 | (commit version))) |
2756 | (file-name (git-file-name "javacc" version)) | |
2757 | (sha256 | |
2758 | (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i")) | |
2759 | (modules '((guix build utils))) | |
2760 | ;; Delete bundled jars. | |
2761 | (snippet '(begin (for-each delete-file-recursively | |
2762 | '("bootstrap" "lib")) | |
2763 | #t)))) | |
6688c41e | 2764 | (arguments |
6b66e470 | 2765 | `(#:make-flags ; bootstrap from javacc-4 |
33428d12 AV |
2766 | (list (string-append "-Dbootstrap-jar=" |
2767 | (assoc-ref %build-inputs "javacc") | |
2768 | "/share/java/javacc.jar")) | |
2769 | #:test-target "test" | |
6688c41e RW |
2770 | #:phases |
2771 | (modify-phases %standard-phases | |
16fdf2f5 JL |
2772 | (replace 'install (install-jars "target")) |
2773 | (add-after 'install 'install-bin | |
2774 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
2775 | (let* ((out (assoc-ref outputs "out")) | |
2776 | (dir (string-append out "/share/java")) | |
2777 | (bin (string-append out "/bin")) | |
2778 | (javacc (string-append bin "/javacc"))) | |
2779 | (mkdir-p bin) | |
2780 | (with-output-to-file javacc | |
2781 | (lambda _ | |
2782 | (display | |
2783 | (string-append "#!/bin/sh\n" | |
2784 | (assoc-ref inputs "jdk") "/bin/java" | |
2785 | " -cp " dir "/javacc.jar" " `basename $0`" " $*")))) | |
2786 | (chmod javacc #o755) | |
2787 | ;; symlink to different names to affect the first argument and | |
2788 | ;; change the behavior of the jar file. | |
2789 | (symlink javacc (string-append bin "/jjdoc")) | |
2790 | (symlink javacc (string-append bin "/jjtree")) | |
2791 | #t)))))) | |
2792 | ||
33428d12 AV |
2793 | (native-inputs |
2794 | `(("javacc" ,javacc-4))))) | |
6688c41e | 2795 | |
c1cb8576 RW |
2796 | ;; This is the last 3.x release of ECJ |
2797 | (define-public java-ecj-3 | |
2798 | (package | |
2799 | (name "java-ecj") | |
2800 | (version "3.8.2") | |
2801 | (source (origin | |
2802 | (method url-fetch) | |
2803 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
2804 | "downloads/drops/R-" version | |
2805 | "-201301310800/ecjsrc-" version ".jar")) | |
2806 | (sha256 | |
2807 | (base32 | |
2808 | "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04")))) | |
2809 | (build-system ant-build-system) | |
2810 | (arguments | |
2811 | `(#:tests? #f ; none included | |
2812 | #:jdk ,icedtea-7 ; doesn't build with JDK8+ | |
2813 | #:make-flags (list "-f" "src/build.xml") | |
2814 | #:build-target "build" | |
2815 | #:phases | |
2816 | (modify-phases %standard-phases | |
2817 | (add-after 'unpack 'fix-manifest | |
2818 | (lambda _ | |
2819 | ;; Record the main class to make ecj executable. | |
2820 | (with-atomic-file-replacement "src/META-INF/MANIFEST.MF" | |
2821 | (lambda (in out) | |
2822 | (display "Manifest-Version: 1.0 | |
2823 | Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" | |
2c8ac364 MW |
2824 | out))) |
2825 | #t)) | |
c1cb8576 RW |
2826 | (replace 'install (install-jars "."))))) |
2827 | (home-page "https://eclipse.org") | |
2828 | (synopsis "Eclipse Java development tools core batch compiler") | |
2829 | (description "This package provides the Eclipse Java core batch compiler.") | |
2830 | (license license:epl1.0))) | |
2831 | ||
f201b18e RW |
2832 | ;; This is needed for java-cisd-args4j |
2833 | (define-public java-ecj-3.5 | |
2834 | (package (inherit java-ecj-3) | |
2835 | (version "3.5.1") | |
2836 | (source (origin | |
2837 | (method url-fetch/zipbomb) | |
2838 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
2839 | "downloads/drops/R-" version | |
2840 | "-200909170800/ecjsrc-" version ".zip")) | |
2841 | (sha256 | |
2842 | (base32 | |
2843 | "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7")))) | |
2844 | (build-system ant-build-system) | |
2845 | (arguments | |
2846 | `(#:tests? #f ; none included | |
2847 | #:jdk ,icedtea-7 ; doesn't build with JDK8+ | |
2848 | #:build-target "build" | |
2849 | #:phases | |
2850 | (modify-phases %standard-phases | |
2851 | (add-after 'unpack 'fix-manifest | |
2852 | (lambda _ | |
2853 | ;; Record the main class to make ecj executable. | |
2854 | (with-atomic-file-replacement "META-INF/MANIFEST.MF" | |
2855 | (lambda (in out) | |
2856 | (dump-port in out) | |
2857 | (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" | |
2c8ac364 MW |
2858 | out))) |
2859 | #t)) | |
f201b18e RW |
2860 | (replace 'install (install-jars "."))))) |
2861 | (native-inputs | |
2862 | `(("unzip" ,unzip))))) | |
2863 | ||
bc3497a5 BH |
2864 | (define-public java-ecj |
2865 | (package (inherit java-ecj-3) | |
2866 | (version "4.6.3") | |
2867 | (source | |
2868 | (origin | |
2869 | (method url-fetch) | |
2870 | (uri (string-append | |
2871 | "http://archive.eclipse.org/eclipse/downloads/drops4/R-" | |
2872 | version | |
2873 | "-201703010400/ecjsrc-" | |
2874 | version | |
2875 | ".jar")) | |
2876 | (sha256 | |
2877 | (base32 | |
2878 | "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl")))) | |
2879 | (arguments | |
2880 | `(#:tests? #f ; none included | |
2881 | #:build-target "build" | |
2882 | #:phases | |
2883 | (modify-phases %standard-phases | |
2884 | (add-after 'unpack 'fix-build.xml | |
2885 | (lambda _ | |
2886 | (substitute* "src/build.xml" | |
2887 | (("^.*MANIFEST.*$") | |
2888 | "")) | |
2889 | #t)) | |
2890 | (add-after 'unpack 'fix-prop | |
2891 | (lambda _ | |
2892 | (substitute* "src/build.xml" | |
2893 | (("^.*properties.*$") | |
2894 | "<include name=\"**/*.properties\"/> | |
2895 | <include name=\"**/*.props\"/>")) | |
2896 | #t)) | |
2897 | (add-before 'build 'chdir | |
2898 | (lambda _ | |
2899 | (chdir "src") | |
2900 | #t)) | |
2901 | (replace 'install (install-jars "."))))))) | |
2902 | ||
30d55473 RW |
2903 | (define-public java-cisd-base |
2904 | (let ((revision 38938) | |
2905 | (base-version "14.12.0")) | |
2906 | (package | |
2907 | (name "java-cisd-base") | |
2908 | (version (string-append base-version "-" (number->string revision))) | |
2909 | (source (origin | |
2910 | (method svn-fetch) | |
2911 | (uri (svn-reference | |
2912 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2913 | "base/tags/release/" | |
2914 | (version-major+minor base-version) | |
2915 | ".x/" base-version "/base/")) | |
2916 | (revision revision))) | |
2917 | (file-name (string-append "java-cisd-base-" version "-checkout")) | |
2918 | (sha256 | |
2919 | (base32 | |
2920 | "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy")) | |
2921 | (modules '((guix build utils))) | |
2922 | (snippet | |
2923 | '(begin | |
2924 | ;; Delete included gradle jar | |
2925 | (delete-file-recursively "gradle/wrapper") | |
2926 | ;; Delete pre-built native libraries | |
2927 | (delete-file-recursively "libs") | |
2928 | #t)))) | |
2929 | (build-system ant-build-system) | |
2930 | (arguments | |
2931 | `(#:make-flags '("-file" "build/build.xml") | |
2932 | #:test-target "jar-test" | |
2933 | #:jdk ,icedtea-8 | |
2934 | #:phases | |
2935 | (modify-phases %standard-phases | |
2936 | (add-after 'unpack 'unpack-build-resources | |
2937 | (lambda* (#:key inputs #:allow-other-keys) | |
2938 | (copy-recursively (assoc-ref inputs "build-resources") | |
2939 | "../build_resources") | |
2940 | #t)) | |
2941 | (add-after 'unpack-build-resources 'fix-dependencies | |
2942 | (lambda* (#:key inputs #:allow-other-keys) | |
2943 | (substitute* "build/build.xml" | |
2944 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") | |
2945 | (string-append (assoc-ref inputs "java-testng") | |
2946 | "/share/java/java-testng.jar")) | |
2947 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") | |
2948 | (string-append (assoc-ref inputs "java-commons-lang") | |
2949 | "/share/java/commons-lang-" | |
2950 | ,(package-version java-commons-lang) ".jar")) | |
2951 | (("\\$\\{lib\\}/commons-io/commons-io.jar") | |
2952 | (string-append (assoc-ref inputs "java-commons-io") | |
3448c7ed | 2953 | "/lib/m2/commons-io/commons-io/" |
30d55473 | 2954 | ,(package-version java-commons-io) |
3448c7ed RW |
2955 | "/commons-io-" |
2956 | ,(package-version java-commons-io) | |
2957 | ".jar")) | |
30d55473 RW |
2958 | ;; Remove dependency on svn |
2959 | (("<build-info.*") "") | |
2960 | (("\\$\\{revision.number\\}") | |
2961 | ,(number->string revision)) | |
2962 | (("\\$\\{version.number\\}") ,base-version)) | |
2963 | ;; Remove dependency on classycle | |
2964 | (substitute* "../build_resources/ant/build-common.xml" | |
2965 | (("<taskdef name=\"dependency-checker.*") "") | |
2966 | (("classname=\"classycle.*") "") | |
2967 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) | |
2968 | #t)) | |
2969 | ;; A few tests fail because of the lack of a proper /etc/groups and | |
2970 | ;; /etc/passwd file in the build container. | |
2971 | (add-after 'unpack 'disable-broken-tests | |
2972 | (lambda _ | |
2973 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java" | |
2974 | (("Unix.isOperational\\(\\)") "false")) | |
2975 | #t)) | |
2976 | ;; These decorators are almost useless and pull in an unpackaged | |
2977 | ;; dependency. | |
2978 | (add-after 'unpack 'remove-useless-decorators | |
2979 | (lambda _ | |
2980 | (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java" | |
2981 | (("@Private") "") | |
2982 | (("import ch.rinn.restrictions.Private;") "")) | |
2983 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java" | |
2984 | (("@Friend.*") "") | |
2985 | (("import ch.rinn.restrictions.Friend;") "")) | |
2986 | #t)) | |
2987 | (add-before 'configure 'build-native-code | |
2988 | (lambda* (#:key inputs #:allow-other-keys) | |
2989 | (let ((jdk (assoc-ref inputs "jdk")) | |
2990 | (dir ,(match (%current-system) | |
2991 | ("i686-linux" | |
2992 | "i386-Linux") | |
2993 | ((or "armhf-linux" "aarch64-linux") | |
2994 | "arm-Linux") | |
2995 | ((or "x86_64-linux") | |
2996 | "amd64-Linux") | |
2997 | (_ "unknown-Linux")))) | |
2998 | (with-directory-excursion "source/c" | |
2999 | (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c" | |
3000 | (string-append "-I" jdk "/include") | |
3001 | (string-append "-I" jdk "/include/linux") | |
3002 | "-o" "libunix.so") | |
3003 | (invoke "gcc" "-shared" "-O3" "-fPIC" | |
3004 | "-DMACHINE_BYTE_ORDER=1" | |
3005 | "copyCommon.c" | |
3006 | "copyByteChar.c" | |
3007 | "copyByteDouble.c" | |
3008 | "copyByteFloat.c" | |
3009 | "copyByteInt.c" | |
3010 | "copyByteLong.c" | |
3011 | "copyByteShort.c" | |
3012 | (string-append "-I" jdk "/include") | |
3013 | (string-append "-I" jdk "/include/linux") | |
3014 | "-o" "libnativedata.so")) | |
3015 | (install-file "source/c/libunix.so" | |
3016 | (string-append "libs/native/unix/" dir)) | |
3017 | (install-file "source/c/libnativedata.so" | |
3018 | (string-append "libs/native/nativedata/" dir)) | |
3019 | #t))) | |
3020 | ;; In the "check" phase we only build the test executable. | |
3021 | (add-after 'check 'run-tests | |
3022 | (lambda _ | |
3023 | (invoke "java" "-jar" "targets/dist/sis-base-test.jar") | |
3024 | (delete-file "targets/dist/sis-base-test.jar") | |
3025 | #t)) | |
3026 | (replace 'install (install-jars "targets/dist"))))) | |
3027 | (native-inputs | |
3028 | `(("jdk" ,icedtea-8) | |
3029 | ("java-commons-lang" ,java-commons-lang) | |
3030 | ("java-commons-io" ,java-commons-io) | |
3031 | ("java-testng" ,java-testng) | |
3032 | ("build-resources" | |
3033 | ,(origin | |
3034 | (method svn-fetch) | |
3035 | (uri (svn-reference | |
3036 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
3037 | "base/tags/release/" | |
3038 | (version-major+minor base-version) | |
3039 | ".x/" base-version | |
3040 | "/build_resources/")) | |
3041 | (revision revision))) | |
3042 | (sha256 | |
3043 | (base32 | |
3044 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) | |
3045 | (home-page "http://svnsis.ethz.ch") | |
3046 | (synopsis "Utility classes for libraries from ETH Zurich") | |
3047 | (description "This library supplies some utility classes needed for | |
3048 | libraries from the SIS division at ETH Zurich like jHDF5.") | |
3049 | ;; The C sources are under a non-copyleft license, which looks like a | |
3050 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. | |
3051 | (license (list license:asl2.0 | |
3052 | (license:non-copyleft "file://source/c/COPYING")))))) | |
3053 | ||
04ddca26 RW |
3054 | (define-public java-cisd-args4j |
3055 | (let ((revision 39162) | |
3056 | (base-version "9.11.2")) | |
3057 | (package | |
3058 | (name "java-cisd-args4j") | |
3059 | (version (string-append base-version "-" (number->string revision))) | |
3060 | (source (origin | |
3061 | (method svn-fetch) | |
3062 | (uri (svn-reference | |
3063 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
3064 | "args4j/tags/release/" | |
3065 | (version-major+minor base-version) | |
3066 | ".x/" base-version "/args4j/")) | |
3067 | (revision revision))) | |
3068 | (file-name (string-append "java-cisd-args4j-" version "-checkout")) | |
3069 | (sha256 | |
3070 | (base32 | |
3071 | "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2")))) | |
3072 | (build-system ant-build-system) | |
3073 | (arguments | |
3074 | `(#:make-flags '("-file" "build/build.xml") | |
3075 | #:tests? #f ; there are no tests | |
3076 | ;; There are weird build failures with JDK8, such as: "The type | |
3077 | ;; java.io.ObjectInputStream cannot be resolved. It is indirectly | |
3078 | ;; referenced from required .class files" | |
3079 | #:jdk ,icedtea-7 | |
3080 | #:modules ((guix build ant-build-system) | |
3081 | (guix build utils) | |
3082 | (guix build java-utils) | |
3083 | (sxml simple) | |
3084 | (sxml transform) | |
3085 | (sxml xpath)) | |
3086 | #:phases | |
3087 | (modify-phases %standard-phases | |
3088 | (add-after 'unpack 'unpack-build-resources | |
3089 | (lambda* (#:key inputs #:allow-other-keys) | |
3090 | (mkdir-p "../build_resources") | |
3091 | (invoke "tar" "xf" (assoc-ref inputs "build-resources") | |
3092 | "-C" "../build_resources" | |
3093 | "--strip-components=1") | |
3094 | (mkdir-p "../build_resources/lib") | |
3095 | #t)) | |
3096 | (add-after 'unpack-build-resources 'fix-dependencies | |
3097 | (lambda* (#:key inputs #:allow-other-keys) | |
3098 | ;; FIXME: There should be a more convenient abstraction for | |
3099 | ;; editing XML files. | |
3100 | (with-directory-excursion "../build_resources/ant/" | |
3101 | (chmod "build-common.xml" #o664) | |
3102 | (call-with-output-file "build-common.xml.new" | |
3103 | (lambda (port) | |
3104 | (sxml->xml | |
3105 | (pre-post-order | |
3106 | (with-input-from-file "build-common.xml" | |
3107 | (lambda _ (xml->sxml #:trim-whitespace? #t))) | |
3108 | `(;; Remove dependency on classycle and custom ant tasks | |
3109 | (taskdef . ,(lambda (tag . kids) | |
3110 | (let ((name ((sxpath '(name *text*)) kids))) | |
3111 | (if (or (member "build-info" name) | |
3112 | (member "dependency-checker" name) | |
3113 | (member "build-java-subprojects" name) | |
3114 | (member "project-classpath" name)) | |
3115 | '() ; skip | |
3116 | `(,tag ,@kids))))) | |
3117 | (typedef . ,(lambda (tag . kids) | |
3118 | (let ((name ((sxpath '(name *text*)) kids))) | |
3119 | (if (member "recursive-jar" name) | |
3120 | '() ; skip | |
3121 | `(,tag ,@kids))))) | |
3122 | (build-java-subprojects . ,(lambda _ '())) | |
3123 | ;; Ignore everything else | |
3124 | (*default* . ,(lambda (tag . kids) `(,tag ,@kids))) | |
3125 | (*text* . ,(lambda (_ txt) txt)))) | |
3126 | port))) | |
3127 | (rename-file "build-common.xml.new" "build-common.xml")) | |
3128 | (substitute* "build/build.xml" | |
3129 | (("\\$\\{lib\\}/cisd-base/cisd-base.jar") | |
3130 | (string-append (assoc-ref inputs "java-cisd-base") | |
3131 | "/share/java/sis-base.jar")) | |
3132 | ;; Remove dependency on svn | |
3133 | (("<build-info.*") "") | |
3134 | (("\\$\\{revision.number\\}") | |
3135 | ,(number->string revision)) | |
3136 | (("\\$\\{version.number\\}") ,base-version) | |
3137 | ;; Don't use custom ant tasks. | |
3138 | (("recursive-jar") "jar") | |
3139 | (("<project-classpath.*") "")) | |
3140 | #t)) | |
3141 | (replace 'install (install-jars "targets/dist"))))) | |
3142 | (inputs | |
3143 | `(("java-cisd-base" ,java-cisd-base))) | |
3144 | (native-inputs | |
3145 | `(("ecj" ,java-ecj-3.5) | |
3146 | ("build-resources" | |
3147 | ,(origin | |
3148 | (method svn-fetch) | |
3149 | (uri (svn-reference | |
3150 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
3151 | "args4j/tags/release/" | |
3152 | (version-major+minor base-version) | |
3153 | ".x/" base-version | |
3154 | "/build_resources/")) | |
3155 | (revision revision))) | |
3156 | (sha256 | |
3157 | (base32 | |
3158 | "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf")) | |
3159 | (modules '((guix build utils))) | |
3160 | ;; Delete bundled pre-built jars. | |
3161 | (snippet | |
3162 | '(begin (delete-file-recursively "lib/") #t)))))) | |
3163 | (home-page "http://svnsis.ethz.ch") | |
3164 | (synopsis "Command line parser library") | |
3165 | (description "This package provides a parser for command line arguments.") | |
3166 | (license license:asl2.0)))) | |
3167 | ||
2f0d0418 RW |
3168 | (define-public java-cisd-jhdf5 |
3169 | (let ((revision 39162) | |
3170 | (base-version "14.12.6")) | |
3171 | (package | |
3172 | (name "java-cisd-jhdf5") | |
3173 | (version (string-append base-version "-" (number->string revision))) | |
3174 | (source (origin | |
3175 | (method svn-fetch) | |
3176 | (uri (svn-reference | |
3177 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
3178 | "jhdf5/tags/release/" | |
3179 | (version-major+minor base-version) | |
3180 | ".x/" base-version "/jhdf5/")) | |
3181 | (revision revision))) | |
3182 | (file-name (string-append "java-cisd-jhdf5-" version "-checkout")) | |
3183 | (sha256 | |
3184 | (base32 | |
3185 | "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0")) | |
3186 | (modules '((guix build utils))) | |
3187 | (snippet | |
3188 | '(begin | |
3189 | ;; Delete included gradle jar | |
3190 | (delete-file-recursively "gradle/wrapper") | |
3191 | ;; Delete pre-built native libraries | |
3192 | (delete-file-recursively "libs") | |
3193 | #t)))) | |
3194 | (build-system ant-build-system) | |
3195 | (arguments | |
3196 | `(#:make-flags '("-file" "build/build.xml") | |
3197 | #:build-target "jar-all" | |
3198 | #:test-target "jar-test" | |
3199 | #:jdk ,icedtea-8 | |
3200 | #:phases | |
3201 | (modify-phases %standard-phases | |
1ed386fc RW |
3202 | ;; FIXME: this build phase fails. |
3203 | (delete 'generate-jar-indices) | |
2f0d0418 RW |
3204 | ;; Don't erase results from the build phase when building tests. |
3205 | (add-after 'unpack 'separate-test-target-from-clean | |
3206 | (lambda _ | |
3207 | (substitute* "build/build.xml" | |
3208 | (("\"jar-test\" depends=\"clean, ") | |
3209 | "\"jar-test\" depends=\"")) | |
3210 | #t)) | |
3211 | (add-after 'unpack 'unpack-build-resources | |
3212 | (lambda* (#:key inputs #:allow-other-keys) | |
3213 | (copy-recursively (assoc-ref inputs "build-resources") | |
3214 | "../build_resources") | |
3215 | (delete-file-recursively "../build_resources/lib/") | |
3216 | (mkdir-p "../build_resources/lib") | |
3217 | ;; Remove dependency on classycle | |
3218 | (substitute* "../build_resources/ant/build-common.xml" | |
3219 | (("<taskdef name=\"dependency-checker.*") "") | |
3220 | (("classname=\"classycle.*") "") | |
3221 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) | |
3222 | ;; Remove dependency on svn | |
3223 | (substitute* "build/build.xml" | |
3224 | (("<build-info.*") "") | |
3225 | (("\\$\\{revision.number\\}") | |
3226 | ,(number->string revision)) | |
3227 | (("\\$\\{version.number\\}") ,base-version)) | |
3228 | #t)) | |
3229 | (add-after 'unpack-build-resources 'fix-dependencies | |
3230 | (lambda* (#:key inputs #:allow-other-keys) | |
3231 | (substitute* "../build_resources/ant/build-common.xml" | |
3232 | (("../libraries/testng/testng-jdk15.jar") | |
3233 | (string-append (assoc-ref inputs "java-testng") | |
3234 | "/share/java/java-testng.jar"))) | |
3235 | (substitute* "build/build.xml" | |
3236 | (("\\$\\{lib\\}/sis-base/sis-base.jar") | |
3237 | (string-append (assoc-ref inputs "java-cisd-base") | |
3238 | "/share/java/sis-base.jar")) | |
3239 | (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar") | |
3240 | (string-append (assoc-ref inputs "java-cisd-args4j") | |
3241 | "/share/java/cisd-args4j.jar")) | |
3242 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") | |
3243 | (string-append (assoc-ref inputs "java-commons-lang") | |
3244 | "/share/java/commons-lang-" | |
3245 | ,(package-version java-commons-lang) ".jar")) | |
3246 | (("\\$\\{lib\\}/commons-io/commons-io.jar") | |
3247 | (string-append (assoc-ref inputs "java-commons-io") | |
cd005bfe RW |
3248 | "/lib/m2/commons-io/commons-io/" |
3249 | ,(package-version java-commons-io) | |
3250 | "/commons-io-" | |
2f0d0418 | 3251 | ,(package-version java-commons-io) |
cd005bfe | 3252 | ".jar")) |
2f0d0418 RW |
3253 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") |
3254 | (string-append (assoc-ref inputs "java-testng") | |
3255 | "/share/java/java-testng.jar")) | |
3256 | (("\\$\\{lib\\}/junit4/junit.jar") | |
fff4fcc4 | 3257 | (car (find-files (assoc-ref inputs "java-junit") "jar$"))) |
2f0d0418 | 3258 | (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar") |
fff4fcc4 JL |
3259 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
3260 | "jar$")))) | |
2f0d0418 RW |
3261 | ;; Remove dependency on ch.rinn.restrictions |
3262 | (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/" | |
3263 | (substitute* '("BitSetConversionUtils.java" | |
3264 | "HDF5Utils.java") | |
3265 | (("import ch.rinn.restrictions.Private;") "") | |
3266 | (("@Private") ""))) | |
3267 | (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/" | |
3268 | (substitute* '("BitSetConversionTest.java" | |
3269 | "h5ar/HDF5ArchiverTest.java") | |
3270 | (("import ch.rinn.restrictions.Friend;") "") | |
3271 | (("@Friend.*") "")) | |
3272 | ;; Remove leftovers from removing @Friend | |
3273 | (substitute* "h5ar/HDF5ArchiverTest.java" | |
3274 | (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)") | |
3275 | ""))) | |
3276 | #t)) | |
3277 | (add-before 'configure 'build-native-library | |
3278 | (lambda* (#:key inputs #:allow-other-keys) | |
3279 | (let ((jdk (assoc-ref inputs "jdk")) | |
3280 | (hdf5 (assoc-ref inputs "hdf5")) | |
3281 | (dir ,(match (%current-system) | |
3282 | ("i686-linux" | |
3283 | "i386-Linux") | |
3284 | ((or "armhf-linux" "aarch64-linux") | |
3285 | "arm-Linux") | |
3286 | ((or "x86_64-linux") | |
3287 | "amd64-Linux") | |
3288 | (_ "unknown-Linux")))) | |
3289 | (with-directory-excursion "source/c" | |
3290 | (apply invoke `("gcc" "-shared" "-O3" | |
3291 | "-fPIC" | |
3292 | "-Wl,--exclude-libs,ALL" | |
3293 | ,@(find-files "jhdf5" "\\.c$") | |
3294 | ,@(find-files "hdf-java" "\\.c$") | |
3295 | ,(string-append "-I" hdf5 "/include") | |
3296 | ,(string-append "-I" jdk "/include") | |
3297 | ,(string-append "-I" jdk "/include/linux") | |
3298 | ,(string-append hdf5 "/lib/libhdf5.a") | |
3299 | "-o" "libjhdf5.so" "-lz"))) | |
3300 | (install-file "source/c/libjhdf5.so" | |
3301 | (string-append "libs/native/jhdf5/" dir)) | |
3302 | #t))) | |
3303 | ;; In the "check" phase we only build the test executable. | |
3304 | (add-after 'check 'run-tests | |
3305 | (lambda _ | |
3306 | (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar") | |
3307 | (delete-file "targets/dist/sis-jhdf5-test.jar") | |
3308 | #t)) | |
3309 | (replace 'install | |
3310 | (install-jars "targets/dist"))))) | |
3311 | (inputs | |
3312 | `(("java-cisd-base" ,java-cisd-base) | |
3313 | ("java-cisd-args4j" ,java-cisd-args4j) | |
3314 | ("java-commons-lang" ,java-commons-lang) | |
3315 | ("java-commons-io" ,java-commons-io) | |
c5372cd4 | 3316 | ("hdf5" ,hdf5-1.8) |
2f0d0418 RW |
3317 | ("zlib" ,zlib))) |
3318 | (native-inputs | |
3319 | `(("jdk" ,icedtea-8) | |
3320 | ("java-testng" ,java-testng) | |
3321 | ("java-junit" ,java-junit) | |
3322 | ("java-jmock" ,java-jmock) | |
3323 | ("java-hamcrest-core" ,java-hamcrest-core) | |
3324 | ("build-resources" | |
3325 | ,(origin | |
3326 | (method svn-fetch) | |
3327 | (uri (svn-reference | |
3328 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
3329 | "jhdf5/tags/release/" | |
3330 | (version-major+minor base-version) | |
3331 | ".x/" base-version | |
3332 | "/build_resources/")) | |
3333 | (revision revision))) | |
3334 | (sha256 | |
3335 | (base32 | |
3336 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) | |
3337 | (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/") | |
3338 | (synopsis "Java binding for HDF5") | |
3339 | (description "JHDF5 is a high-level API in Java for reading and writing | |
3340 | HDF5 files, building on the libraries provided by the HDF Group.") | |
3341 | ;; The C sources are under a non-copyleft license, which looks like a | |
3342 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. | |
3343 | (license (list license:asl2.0 | |
3344 | (license:non-copyleft "file://source/c/COPYING")))))) | |
3345 | ||
218d093b RW |
3346 | (define-public java-classpathx-servletapi |
3347 | (package | |
3348 | (name "java-classpathx-servletapi") | |
ae307724 | 3349 | (version "3.0.1") |
218d093b RW |
3350 | (source (origin |
3351 | (method url-fetch) | |
3352 | (uri (string-append "mirror://gnu/classpathx/servletapi/" | |
3353 | "servletapi-" version ".tar.gz")) | |
3354 | (sha256 | |
3355 | (base32 | |
ae307724 | 3356 | "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x")))) |
218d093b RW |
3357 | (build-system ant-build-system) |
3358 | (arguments | |
3359 | `(#:tests? #f ; there is no test target | |
3360 | #:build-target "compile" | |
218d093b | 3361 | #:make-flags |
ae307724 | 3362 | (list "-Dbuild.compiler=javac1.8" |
218d093b RW |
3363 | (string-append "-Ddist=" (assoc-ref %outputs "out"))) |
3364 | #:phases | |
3365 | (modify-phases %standard-phases | |
3366 | (replace 'install | |
3367 | (lambda* (#:key make-flags #:allow-other-keys) | |
2c8ac364 | 3368 | (apply invoke `("ant" "dist" ,@make-flags))))))) |
218d093b RW |
3369 | (home-page "https://www.gnu.org/software/classpathx/") |
3370 | (synopsis "Java servlet API implementation") | |
3371 | (description "This is the GNU servlet API distribution, part of the | |
3372 | ClasspathX project. It provides implementations of version 3.0 of the servlet | |
3373 | API and version 2.1 of the Java ServerPages API.") | |
3374 | (license license:gpl3+))) | |
3375 | ||
10d62a88 BH |
3376 | (define-public java-javaee-servletapi |
3377 | (package | |
3378 | (name "java-javaee-servletapi") | |
3379 | (version "3.1.0") | |
44bac44c BH |
3380 | (source (origin |
3381 | (method git-fetch) | |
3382 | (uri (git-reference | |
b0e7b699 | 3383 | (url "https://github.com/javaee/servlet-spec") |
44bac44c BH |
3384 | (commit version))) |
3385 | (file-name (git-file-name name version)) | |
3386 | (sha256 | |
3387 | (base32 | |
3388 | "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl")))) | |
10d62a88 BH |
3389 | (build-system ant-build-system) |
3390 | (arguments | |
3391 | `(#:jar-name "javax-servletapi.jar" | |
3392 | ;; no tests | |
3393 | #:tests? #f | |
8ea8d607 BH |
3394 | #:source-dir "src/main/java" |
3395 | #:phases | |
3396 | (modify-phases %standard-phases | |
3397 | (add-before 'build 'copy-resources | |
3398 | (lambda _ | |
3399 | (mkdir-p "build/classes/javax/servlet/http") | |
3400 | (let ((from-prefix "src/main/java/javax/servlet/") | |
3401 | (to-prefix "build/classes/javax/servlet/")) | |
3402 | (for-each (lambda (f) | |
3403 | (copy-file (string-append from-prefix f) | |
3404 | (string-append to-prefix f))) | |
3405 | (list "LocalStrings_ja.properties" | |
3406 | "LocalStrings.properties" | |
3407 | "LocalStrings_fr.properties" | |
3408 | "http/LocalStrings_es.properties" | |
3409 | "http/LocalStrings_ja.properties" | |
3410 | "http/LocalStrings.properties" | |
3411 | "http/LocalStrings_fr.properties"))) | |
3412 | #t))))) | |
10d62a88 BH |
3413 | (native-inputs |
3414 | `(("unzip" ,unzip))) | |
3415 | (home-page "https://javaee.github.io/servlet-spec/") | |
3416 | (synopsis "Java servlet API") | |
3417 | (description "Java Servlet is the foundation web specification in the | |
3418 | Java Enterprise Platform. Developers can build web applications using the | |
3419 | Servlet API to interact with the request/response workflow. This project | |
3420 | provides information on the continued development of the Java Servlet | |
3421 | specification.") | |
3422 | ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1. | |
3423 | ;; Some files are licensed under ASL 2.0. | |
3424 | (license (list license:asl2.0 license:gpl2 license:cddl1.1)))) | |
3425 | ||
5490480c RW |
3426 | (define-public java-swt |
3427 | (package | |
3428 | (name "java-swt") | |
8710d4dd | 3429 | (version "4.7.1a") |
5490480c RW |
3430 | (source |
3431 | ;; The types of many variables and procedures differ in the sources | |
3432 | ;; dependent on whether the target architecture is a 32-bit system or a | |
3433 | ;; 64-bit system. Instead of patching the sources on demand in a build | |
3434 | ;; phase we download either the 32-bit archive (which mostly uses "int" | |
3435 | ;; types) or the 64-bit archive (which mostly uses "long" types). | |
8710d4dd RW |
3436 | (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9") |
3437 | (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q") | |
5490480c RW |
3438 | (file32 "x86") |
3439 | (file64 "x86_64")) | |
3440 | (let-values (((hash file) | |
3441 | (match (or (%current-target-system) (%current-system)) | |
3442 | ("x86_64-linux" (values hash64 file64)) | |
3443 | (_ (values hash32 file32))))) | |
3444 | (origin | |
3445 | (method url-fetch) | |
3446 | (uri (string-append | |
8710d4dd RW |
3447 | "http://download.eclipse.org/eclipse/downloads/drops4/" |
3448 | "R-" version "-201710090410/swt-" version | |
3449 | "-gtk-linux-" file ".zip")) | |
5490480c RW |
3450 | (sha256 (base32 hash)))))) |
3451 | (build-system ant-build-system) | |
3452 | (arguments | |
3453 | `(#:jar-name "swt.jar" | |
8710d4dd | 3454 | #:jdk ,icedtea-8 |
5490480c RW |
3455 | #:tests? #f ; no "check" target |
3456 | #:phases | |
3457 | (modify-phases %standard-phases | |
3458 | (replace 'unpack | |
3459 | (lambda* (#:key source #:allow-other-keys) | |
2c8ac364 MW |
3460 | (mkdir "swt") |
3461 | (invoke "unzip" source "-d" "swt") | |
3462 | (chdir "swt") | |
3463 | (mkdir "src") | |
3464 | (invoke "unzip" "src.zip" "-d" "src"))) | |
5490480c RW |
3465 | ;; The classpath contains invalid icecat jars. Since we don't need |
3466 | ;; anything other than the JDK on the classpath, we can simply unset | |
3467 | ;; it. | |
3468 | (add-after 'configure 'unset-classpath | |
3469 | (lambda _ (unsetenv "CLASSPATH") #t)) | |
3470 | (add-before 'build 'build-native | |
3471 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3472 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) | |
3473 | ;; Build shared libraries. Users of SWT have to set the system | |
3474 | ;; property swt.library.path to the "lib" directory of this | |
3475 | ;; package output. | |
3476 | (mkdir-p lib) | |
3477 | (setenv "OUTPUT_DIR" lib) | |
3478 | (with-directory-excursion "src" | |
2c8ac364 | 3479 | (invoke "bash" "build.sh"))))) |
5490480c RW |
3480 | (add-after 'install 'install-native |
3481 | (lambda* (#:key outputs #:allow-other-keys) | |
3482 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) | |
3483 | (for-each (lambda (file) | |
3484 | (install-file file lib)) | |
3485 | (find-files "." "\\.so$")) | |
3486 | #t)))))) | |
3487 | (inputs | |
8710d4dd | 3488 | `(("gtk" ,gtk+-2) |
5490480c RW |
3489 | ("libxtst" ,libxtst) |
3490 | ("libxt" ,libxt) | |
3491 | ("mesa" ,mesa) | |
3492 | ("glu" ,glu))) | |
3493 | (native-inputs | |
3494 | `(("pkg-config" ,pkg-config) | |
3495 | ("unzip" ,unzip))) | |
3496 | (home-page "https://www.eclipse.org/swt/") | |
3497 | (synopsis "Widget toolkit for Java") | |
3498 | (description | |
3499 | "SWT is a widget toolkit for Java designed to provide efficient, portable | |
3500 | access to the user-interface facilities of the operating systems on which it | |
3501 | is implemented.") | |
3502 | ;; SWT code is licensed under EPL1.0 | |
3503 | ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1 | |
3504 | ;; Cairo bindings contain code under MPL1.1 | |
3505 | ;; XULRunner 1.9 bindings contain code under MPL2.0 | |
3506 | (license (list | |
3507 | license:epl1.0 | |
3508 | license:mpl1.1 | |
3509 | license:mpl2.0 | |
3510 | license:lgpl2.1+)))) | |
3511 | ||
04100c3b RW |
3512 | ;; java-hamcrest-core uses qdox version 1.12. We package this version instead |
3513 | ;; of the latest release. | |
3514 | (define-public java-qdox-1.12 | |
3515 | (package | |
3516 | (name "java-qdox") | |
3517 | (version "1.12.1") | |
3518 | (source (origin | |
3519 | (method url-fetch) | |
3344bc49 | 3520 | (uri (string-append "https://repo1.maven.org/maven2/" |
04100c3b RW |
3521 | "com/thoughtworks/qdox/qdox/" version |
3522 | "/qdox-" version "-sources.jar")) | |
3523 | (sha256 | |
3524 | (base32 | |
3525 | "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl")))) | |
3526 | (build-system ant-build-system) | |
3527 | (arguments | |
3528 | `(;; Tests require junit | |
3529 | #:tests? #f | |
3530 | #:jar-name "qdox.jar" | |
3531 | #:phases | |
3532 | (modify-phases %standard-phases | |
3533 | (replace 'unpack | |
3534 | (lambda* (#:key source #:allow-other-keys) | |
3535 | (mkdir "src") | |
3536 | (with-directory-excursion "src" | |
2c8ac364 | 3537 | (invoke "jar" "-xf" source)))) |
04100c3b RW |
3538 | ;; At this point we don't have junit, so we must remove the API |
3539 | ;; tests. | |
3540 | (add-after 'unpack 'delete-tests | |
3541 | (lambda _ | |
3542 | (delete-file-recursively "src/com/thoughtworks/qdox/junit") | |
3543 | #t))))) | |
3344bc49 | 3544 | (home-page "https://github.com/codehaus/qdox") |
04100c3b RW |
3545 | (synopsis "Parse definitions from Java source files") |
3546 | (description | |
3547 | "QDox is a high speed, small footprint parser for extracting | |
3548 | class/interface/method definitions from source files complete with JavaDoc | |
b13cf17f | 3549 | @code{@@tags}. It is designed to be used by active code generators or |
04100c3b RW |
3550 | documentation tools.") |
3551 | (license license:asl2.0))) | |
e7e28510 | 3552 | |
5281ba17 BH |
3553 | (define-public java-qdox |
3554 | (package | |
3555 | (name "java-qdox") | |
3556 | ; Newer version exists, but this version is required by java-plexus-component-metadata | |
3557 | (version "2.0-M2") | |
3558 | (source (origin | |
3559 | (method url-fetch) | |
3560 | ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox | |
3561 | ;; Older releases at https://github.com/codehaus/qdox/ | |
3562 | ;; Note: The release at maven is pre-generated. The release at | |
3563 | ;; github requires jflex. | |
3564 | (uri (string-append "https://repo1.maven.org/maven2/" | |
3565 | "com/thoughtworks/qdox/qdox/" version | |
3566 | "/qdox-" version "-sources.jar")) | |
3567 | (sha256 | |
3568 | (base32 | |
3569 | "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x")))) | |
3570 | (build-system ant-build-system) | |
3571 | (arguments | |
3572 | `(#:jar-name "qdox.jar" | |
0ab9eba7 JL |
3573 | #:tests? #f; no tests |
3574 | #:modules | |
3575 | ((guix build ant-build-system) | |
3576 | (guix build java-utils) | |
3577 | (guix build utils) | |
3578 | (sxml simple)) | |
3579 | #:phases | |
3580 | (modify-phases %standard-phases | |
3581 | (add-before 'install 'create-pom | |
3582 | (lambda _ | |
3583 | (with-output-to-file "pom.xml" | |
3584 | (lambda _ | |
3585 | (sxml->xml | |
3586 | `((project | |
3587 | (modelVersion "4.0.0") | |
3588 | (name "QDox") | |
3589 | (groupId "com.thoughtworks.qdox") | |
3590 | (artifactId "qdox") | |
3591 | (version ,,version)))))) | |
3592 | #t)) | |
3593 | (replace 'install | |
3594 | (install-from-pom "pom.xml"))))) | |
5281ba17 BH |
3595 | (home-page "https://github.com/codehaus/qdox") |
3596 | (synopsis "Parse definitions from Java source files") | |
3597 | (description "QDox is a high speed, small footprint parser for extracting | |
3598 | class/interface/method definitions from source files complete with JavaDoc | |
3599 | @code{@@tags}. It is designed to be used by active code generators or | |
3600 | documentation tools.") | |
3601 | (license license:asl2.0))) | |
3602 | ||
0ab9eba7 JL |
3603 | (define-public java-qdox-2-M9 |
3604 | (package | |
3605 | (inherit java-qdox) | |
3606 | (version "2.0-M9"); required by plexus-java | |
3607 | (source (origin | |
3608 | (method url-fetch) | |
3609 | ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox | |
3610 | ;; Older releases at https://github.com/codehaus/qdox/ | |
3611 | ;; Note: The release at maven is pre-generated. The release at | |
3612 | ;; github requires jflex. | |
3613 | (uri (string-append "https://repo1.maven.org/maven2/" | |
3614 | "com/thoughtworks/qdox/qdox/" version | |
3615 | "/qdox-" version "-sources.jar")) | |
3616 | (sha256 | |
3617 | (base32 | |
3618 | "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg")))))) | |
3619 | ||
e7e28510 RW |
3620 | (define-public java-jarjar |
3621 | (package | |
3622 | (name "java-jarjar") | |
3623 | (version "1.4") | |
3624 | (source (origin | |
3625 | (method url-fetch) | |
3626 | (uri (string-append | |
3627 | "https://storage.googleapis.com/google-code-archive-downloads/v2/" | |
3628 | "code.google.com/jarjar/jarjar-src-" version ".zip")) | |
3629 | (sha256 | |
3630 | (base32 | |
88aa75e9 GB |
3631 | "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl")) |
3632 | (modules '((guix build utils))) | |
3633 | (snippet | |
3634 | '(begin | |
3635 | ;; Delete bundled thirds-party jar archives. | |
e0ee843f JL |
3636 | (delete-file-recursively "lib") |
3637 | (delete-file "src/test/enumtest.jar") | |
3638 | ;; the CLASSPATH needs this directory, create an empty one | |
3639 | (mkdir-p "lib") | |
88aa75e9 | 3640 | #t)))) |
e7e28510 RW |
3641 | (build-system ant-build-system) |
3642 | (arguments | |
3643 | `(;; Tests require junit, which ultimately depends on this package. | |
3644 | #:tests? #f | |
3645 | #:build-target "jar" | |
3646 | #:phases | |
3647 | (modify-phases %standard-phases | |
88aa75e9 GB |
3648 | (add-before 'build 'do-not-use-bundled-asm |
3649 | (lambda* (#:key inputs #:allow-other-keys) | |
3650 | (substitute* "build.xml" | |
3651 | (("<path id=\"path.build\">") | |
3652 | (string-append "<path id=\"path.build\"><fileset dir=\"" | |
3653 | (assoc-ref inputs "java-asm-bootstrap") | |
51087d51 | 3654 | "/lib/m2\" includes=\"**/*.jar\"/>")) |
88aa75e9 GB |
3655 | (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "") |
3656 | (("lib/asm-commons-4.0.jar") | |
51087d51 JL |
3657 | (car (find-files (assoc-ref inputs "java-asm-bootstrap") |
3658 | "asm-6.0.jar"))) | |
88aa75e9 GB |
3659 | (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>") |
3660 | (string-append "<include name=\"org/objectweb/asm/" | |
3661 | "commons/Remap*.class\"/>" | |
3662 | "<include name=\"org/objectweb/asm/*.class\"/>" | |
3663 | "<include name=\"org/objectweb/asm/" | |
3664 | "signature/*.class\"/>" | |
3665 | "<include name=\"org/objectweb/asm/" | |
3666 | "commons/SignatureRemapper.class\"/>"))) | |
3667 | #t)) | |
e0ee843f JL |
3668 | (add-before 'build 'remove-maven-dependency |
3669 | (lambda _ | |
3670 | ;; We do not need to build jarjar as a maven plugin just yet, so | |
3671 | ;; remove this file. Maven requires jarjar (but not that plugin), | |
3672 | ;; so removing it improves the bootstrap. | |
3673 | (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java") | |
3674 | #t)) | |
e7e28510 RW |
3675 | (replace 'install |
3676 | (lambda* (#:key outputs #:allow-other-keys) | |
3677 | (let ((target (string-append (assoc-ref outputs "out") | |
3678 | "/share/java"))) | |
3679 | (install-file (string-append "dist/jarjar-" ,version ".jar") | |
3680 | target)) | |
3681 | #t))))) | |
88aa75e9 GB |
3682 | (inputs |
3683 | `(("java-asm-bootstrap" ,java-asm-bootstrap))) | |
e7e28510 RW |
3684 | (native-inputs |
3685 | `(("unzip" ,unzip))) | |
3686 | (home-page "https://code.google.com/archive/p/jarjar/") | |
3687 | (synopsis "Repackage Java libraries") | |
3688 | (description | |
3689 | "Jar Jar Links is a utility that makes it easy to repackage Java | |
3690 | libraries and embed them into your own distribution. Jar Jar Links includes | |
3691 | an Ant task that extends the built-in @code{jar} task.") | |
3692 | (license license:asl2.0))) | |
87c31a21 RW |
3693 | |
3694 | (define-public java-hamcrest-core | |
3695 | (package | |
3696 | (name "java-hamcrest-core") | |
3697 | (version "1.3") | |
3698 | (source (origin | |
2703d573 EF |
3699 | (method git-fetch) |
3700 | (uri (git-reference | |
3701 | (url "https://github.com/hamcrest/JavaHamcrest/") | |
3702 | (commit (string-append "hamcrest-java-" version)))) | |
3703 | (file-name (git-file-name name version)) | |
87c31a21 RW |
3704 | (sha256 |
3705 | (base32 | |
2703d573 | 3706 | "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63")) |
87c31a21 RW |
3707 | (modules '((guix build utils))) |
3708 | (snippet | |
3709 | '(begin | |
00672896 HG |
3710 | ;; Delete bundled thirds-party jar archives. |
3711 | (delete-file-recursively "lib") | |
87c31a21 RW |
3712 | #t)))) |
3713 | (build-system ant-build-system) | |
3714 | (arguments | |
3715 | `(#:tests? #f ; Tests require junit | |
a8d3cb62 | 3716 | #:modules ((guix build ant-build-system) |
fff4fcc4 | 3717 | (guix build java-utils) |
a8d3cb62 RW |
3718 | (guix build utils) |
3719 | (srfi srfi-1)) | |
87c31a21 | 3720 | #:make-flags (list (string-append "-Dversion=" ,version)) |
fae0b4ca | 3721 | #:test-target "unit-test" |
87c31a21 RW |
3722 | #:build-target "core" |
3723 | #:phases | |
3724 | (modify-phases %standard-phases | |
3725 | ;; Disable unit tests, because they require junit, which requires | |
3726 | ;; hamcrest-core. We also give a fixed value to the "Built-Date" | |
3727 | ;; attribute from the manifest for reproducibility. | |
3728 | (add-before 'configure 'patch-build.xml | |
3729 | (lambda _ | |
3730 | (substitute* "build.xml" | |
3731 | (("unit-test, ") "") | |
3732 | (("\\$\\{build.timestamp\\}") "guix")) | |
3733 | #t)) | |
3734 | ;; Java's "getMethods()" returns methods in an unpredictable order. | |
3735 | ;; To make the output of the generated code deterministic we must | |
3736 | ;; sort the array of methods. | |
3737 | (add-after 'unpack 'make-method-order-deterministic | |
3738 | (lambda _ | |
3739 | (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java" | |
3740 | (("import java\\.util\\.Iterator;" line) | |
3741 | (string-append line "\n" | |
3742 | "import java.util.Arrays; import java.util.Comparator;")) | |
3743 | (("allMethods = cls\\.getMethods\\(\\);" line) | |
3744 | (string-append "_" line | |
3745 | " | |
3746 | private Method[] getSortedMethods() { | |
3747 | Arrays.sort(_allMethods, new Comparator<Method>() { | |
3748 | @Override | |
3749 | public int compare(Method a, Method b) { | |
3750 | return a.toString().compareTo(b.toString()); | |
3751 | } | |
3752 | }); | |
3753 | return _allMethods; | |
3754 | } | |
3755 | ||
2c8ac364 MW |
3756 | private Method[] allMethods = getSortedMethods();"))) |
3757 | #t)) | |
87c31a21 RW |
3758 | (add-before 'build 'do-not-use-bundled-qdox |
3759 | (lambda* (#:key inputs #:allow-other-keys) | |
3760 | (substitute* "build.xml" | |
3761 | (("lib/generator/qdox-1.12.jar") | |
3762 | (string-append (assoc-ref inputs "java-qdox-1.12") | |
3763 | "/share/java/qdox.jar"))) | |
3764 | #t)) | |
fab959d3 HG |
3765 | ;; build.xml searches for .jar files in this directoy, which |
3766 | ;; we remove from the source archive. | |
3767 | (add-before 'build 'create-dummy-directories | |
3768 | (lambda _ | |
3769 | (mkdir-p "lib/integration") | |
3770 | #t)) | |
fff4fcc4 JL |
3771 | (add-before 'build 'create-pom |
3772 | (lambda _ | |
3773 | (substitute* "pom/hamcrest-core.pom" | |
3774 | (("@VERSION@") ,version)) | |
3775 | #t)) | |
87c31a21 | 3776 | (replace 'install |
fff4fcc4 | 3777 | (install-from-pom "pom/hamcrest-core.pom"))))) |
87c31a21 RW |
3778 | (native-inputs |
3779 | `(("java-qdox-1.12" ,java-qdox-1.12) | |
3780 | ("java-jarjar" ,java-jarjar))) | |
fff4fcc4 JL |
3781 | (propagated-inputs |
3782 | `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom))) | |
87c31a21 RW |
3783 | (home-page "http://hamcrest.org/") |
3784 | (synopsis "Library of matchers for building test expressions") | |
3785 | (description | |
3786 | "This package provides a library of matcher objects (also known as | |
3787 | constraints or predicates) allowing @code{match} rules to be defined | |
3788 | declaratively, to be used in other frameworks. Typical scenarios include | |
3789 | testing frameworks, mocking libraries and UI validation rules.") | |
3790 | (license license:bsd-2))) | |
d0184f44 | 3791 | |
fff4fcc4 JL |
3792 | (define java-hamcrest-parent-pom |
3793 | (package | |
3794 | (inherit java-hamcrest-core) | |
3795 | (name "java-hamcrest-parent-pom") | |
3796 | (propagated-inputs '()) | |
3797 | (native-inputs '()) | |
3798 | (arguments | |
3799 | `(#:tests? #f | |
3800 | #:phases | |
3801 | (modify-phases %standard-phases | |
3802 | (delete 'configure) | |
3803 | (replace 'build | |
3804 | (lambda _ | |
3805 | (substitute* "pom/hamcrest-parent.pom" | |
3806 | (("@VERSION@") ,(package-version java-hamcrest-core))) | |
3807 | #t)) | |
3808 | (replace 'install | |
3809 | (install-pom-file "pom/hamcrest-parent.pom"))))))) | |
3810 | ||
031516d6 JL |
3811 | (define-public java-hamcrest-library |
3812 | (package | |
3813 | (inherit java-hamcrest-core) | |
3814 | (name "java-hamcrest-library") | |
3815 | (arguments | |
3816 | (substitute-keyword-arguments (package-arguments java-hamcrest-core) | |
fff4fcc4 JL |
3817 | ((#:build-target _) "library") |
3818 | ((#:phases phases) | |
3819 | `(modify-phases ,phases | |
7bbe61f8 JL |
3820 | (add-after 'unpack 'patch-classpath-for-integration |
3821 | (lambda* (#:key inputs #:allow-other-keys) | |
3822 | (substitute* "build.xml" | |
3823 | (("build/hamcrest-core-\\$\\{version\\}\\.jar") | |
3824 | (car (find-files (assoc-ref inputs "java-hamcrest-core") | |
3825 | "jar$")))) | |
3826 | #t)) | |
fff4fcc4 JL |
3827 | (replace 'create-pom |
3828 | (lambda _ | |
3829 | (substitute* "pom/hamcrest-library.pom" | |
3830 | (("@VERSION@") ,(package-version java-hamcrest-core))) | |
3831 | #t)) | |
3832 | (replace 'install | |
3833 | (install-from-pom "pom/hamcrest-library.pom")))))) | |
031516d6 | 3834 | (propagated-inputs |
fff4fcc4 JL |
3835 | `(("java-hamcrest-core" ,java-hamcrest-core) |
3836 | ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom))))) | |
031516d6 | 3837 | |
d0184f44 RW |
3838 | (define-public java-junit |
3839 | (package | |
3840 | (name "java-junit") | |
3841 | (version "4.12") | |
3842 | (source (origin | |
42c1c59e EF |
3843 | (method git-fetch) |
3844 | (uri (git-reference | |
3845 | (url "https://github.com/junit-team/junit/") | |
3846 | (commit (string-append "r" version)))) | |
3847 | (file-name (git-file-name name version)) | |
d0184f44 RW |
3848 | (sha256 |
3849 | (base32 | |
42c1c59e | 3850 | "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h")) |
d0184f44 RW |
3851 | (modules '((guix build utils))) |
3852 | (snippet | |
3853 | '(begin | |
3854 | ;; Delete bundled jar archives. | |
3855 | (delete-file-recursively "lib") | |
3856 | #t)))) | |
3857 | (build-system ant-build-system) | |
3858 | (arguments | |
29428e10 JL |
3859 | `(#:jar-name "junit.jar" |
3860 | #:source-dir "src/main/java" | |
3861 | #:test-dir "src/test" | |
3862 | #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java" | |
3863 | "**/RuleChainTest.java" "**/TestWatchmanTest.java") | |
3864 | #:phases | |
3865 | (modify-phases %standard-phases | |
3866 | (add-before 'check 'copy-test-resources | |
3867 | (lambda _ | |
3868 | (copy-recursively "src/test/resources" "build/test-classes") | |
fff4fcc4 JL |
3869 | #t)) |
3870 | (replace 'install | |
3871 | (install-from-pom "pom.xml"))))) | |
29428e10 | 3872 | (propagated-inputs |
d0184f44 | 3873 | `(("java-hamcrest-core" ,java-hamcrest-core))) |
29428e10 JL |
3874 | (native-inputs |
3875 | `(("java-hamcrest-library" ,java-hamcrest-library))) | |
42c1c59e | 3876 | (home-page "https://junit.org/junit4/") |
d0184f44 RW |
3877 | (synopsis "Test framework for Java") |
3878 | (description | |
3879 | "JUnit is a simple framework to write repeatable tests for Java projects. | |
3880 | JUnit provides assertions for testing expected results, test fixtures for | |
3881 | sharing common test data, and test runners for running tests.") | |
3882 | (license license:epl1.0))) | |
9fb20d01 | 3883 | |
52a23d8e JL |
3884 | (define-public java-junitparams |
3885 | (package | |
3886 | (name "java-junitparams") | |
3887 | (version "1.1.1") | |
3888 | (source (origin | |
3889 | (method git-fetch) | |
3890 | (uri (git-reference | |
3891 | (url "https://github.com/Pragmatists/JUnitParams") | |
3892 | (commit (string-append "JUnitParams-" version)))) | |
3893 | (file-name (git-file-name name version)) | |
3894 | (sha256 | |
3895 | (base32 | |
3896 | "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b")))) | |
3897 | (build-system ant-build-system) | |
3898 | (arguments | |
3899 | `(#:jar-name "junitparams.jar" | |
3900 | #:source-dir "src/main/java" | |
3901 | #:test-dir "src/test" | |
3902 | #:test-exclude (list "**/SuperclassTest.java"))) | |
3903 | (inputs | |
3904 | `(("java-junit" ,java-junit))) | |
3905 | (native-inputs | |
3906 | `(("java-junit" ,java-junit) | |
3907 | ("java-hamcrest-core" ,java-hamcrest-core) | |
3908 | ("java-assertj" ,java-assertj))) | |
3909 | (home-page "https://github.com/Pragmatists/JUnitParams") | |
3910 | (synopsis "Parameterised test support for JUnit") | |
3911 | (description "The JUnitParams project adds a new runner to JUnit and | |
3912 | provides much easier and readable parametrised tests for JUnit.") | |
3913 | (license license:asl2.0))) | |
3914 | ||
9fb20d01 RW |
3915 | (define-public java-plexus-utils |
3916 | (package | |
3917 | (name "java-plexus-utils") | |
b3971a5c JL |
3918 | ;; sisu-build-api needs this version, later versions don't work |
3919 | (version "3.2.1") | |
9fb20d01 | 3920 | (source (origin |
c53badd4 EF |
3921 | (method git-fetch) |
3922 | (uri (git-reference | |
3923 | (url "https://github.com/codehaus-plexus/plexus-utils") | |
3924 | (commit (string-append "plexus-utils-" version)))) | |
3925 | (file-name (git-file-name name version)) | |
9fb20d01 RW |
3926 | (sha256 |
3927 | (base32 | |
b3971a5c | 3928 | "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b")))) |
9fb20d01 RW |
3929 | (build-system ant-build-system) |
3930 | ;; FIXME: The default build.xml does not include a target to install | |
3931 | ;; javadoc files. | |
3932 | (arguments | |
3933 | `(#:jar-name "plexus-utils.jar" | |
3934 | #:source-dir "src/main" | |
3935 | #:phases | |
3936 | (modify-phases %standard-phases | |
3937 | (add-after 'unpack 'fix-reference-to-/bin-and-/usr | |
3938 | (lambda _ | |
3939 | (substitute* "src/main/java/org/codehaus/plexus/util/\ | |
3940 | cli/shell/BourneShell.java" | |
3941 | (("/bin/sh") (which "sh")) | |
3942 | (("/usr/") (getcwd))) | |
3943 | #t)) | |
3944 | (add-after 'unpack 'fix-or-disable-broken-tests | |
3945 | (lambda _ | |
3946 | (with-directory-excursion "src/test/java/org/codehaus/plexus/util" | |
3947 | (substitute* '("cli/CommandlineTest.java" | |
3948 | "cli/shell/BourneShellTest.java") | |
3949 | (("/bin/sh") (which "sh")) | |
3950 | (("/bin/echo") (which "echo"))) | |
3951 | ||
3952 | ;; This test depends on MavenProjectStub, but we don't have | |
3953 | ;; a package for Maven. | |
3954 | (delete-file "introspection/ReflectionValueExtractorTest.java") | |
3955 | ||
3956 | ;; FIXME: The command line tests fail, maybe because they use | |
3957 | ;; absolute paths. | |
b3971a5c JL |
3958 | (delete-file "cli/CommandlineTest.java") |
3959 | ||
3960 | ;; These tests require openjdk jmh, which is not packaged yet | |
3961 | (for-each delete-file (find-files "." "PerfTest.java$"))) | |
3962 | #t)) | |
3963 | (add-before 'build 'copy-resources | |
3964 | (lambda _ | |
3965 | (copy-recursively "src/main/resources" "build/classes") | |
3966 | #t)) | |
3967 | (replace 'install (install-from-pom "pom.xml"))))) | |
9fb20d01 | 3968 | (native-inputs |
0cd8efcc JL |
3969 | `(("java-hamcrest-core" ,java-hamcrest-core) |
3970 | ("java-junit" ,java-junit))) | |
b3971a5c JL |
3971 | (propagated-inputs |
3972 | `(("plexus-parent-pom" ,plexus-parent-pom-5.1))) | |
1b4d40cf | 3973 | (home-page "https://codehaus-plexus.github.io/plexus-utils/") |
9fb20d01 RW |
3974 | (synopsis "Common utilities for the Plexus framework") |
3975 | (description "This package provides various Java utility classes for the | |
3976 | Plexus framework to ease working with strings, files, command lines, XML and | |
3977 | more.") | |
3978 | (license license:asl2.0))) | |
1e555562 | 3979 | |
2ddf13ae JL |
3980 | (define-public java-plexus-utils-3.3.0 |
3981 | (package | |
3982 | (inherit java-plexus-utils) | |
3983 | (version "3.3.0") | |
3984 | (source (origin | |
3985 | (method git-fetch) | |
3986 | (uri (git-reference | |
3987 | (url "https://github.com/codehaus-plexus/plexus-utils") | |
3988 | (commit (string-append "plexus-utils-" version)))) | |
3989 | (file-name (git-file-name "java-plexus-utils" version)) | |
3990 | (sha256 | |
3991 | (base32 | |
3992 | "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g")))))) | |
3993 | ||
1e555562 HG |
3994 | (define-public java-plexus-interpolation |
3995 | (package | |
3996 | (name "java-plexus-interpolation") | |
6671d6a1 | 3997 | (version "1.26") |
1e555562 | 3998 | (source (origin |
c4b67ba3 EF |
3999 | (method git-fetch) |
4000 | (uri (git-reference | |
4001 | (url "https://github.com/codehaus-plexus/plexus-interpolation") | |
4002 | (commit (string-append "plexus-interpolation-" version)))) | |
4003 | (file-name (git-file-name name version)) | |
1e555562 HG |
4004 | (sha256 |
4005 | (base32 | |
6671d6a1 | 4006 | "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh")))) |
1e555562 HG |
4007 | (build-system ant-build-system) |
4008 | (arguments | |
4009 | `(#:jar-name "plexus-interpolation.jar" | |
6671d6a1 JL |
4010 | #:source-dir "src/main" |
4011 | #:phases | |
4012 | (modify-phases %standard-phases | |
4013 | (replace 'install (install-from-pom "pom.xml"))))) | |
4014 | (propagated-inputs | |
4015 | `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1))) | |
1e555562 HG |
4016 | (native-inputs |
4017 | `(("java-junit" ,java-junit) | |
4018 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
35e74723 | 4019 | (home-page "https://codehaus-plexus.github.io/plexus-interpolation/") |
1e555562 HG |
4020 | (synopsis "Java components for interpolating ${} strings and the like") |
4021 | (description "Plexus interpolator is a modular, flexible interpolation | |
4022 | framework for the expression language style commonly seen in Maven, Plexus, | |
4023 | and other related projects. | |
4024 | ||
4025 | It has its foundation in the @code{org.codehaus.plexus.utils.interpolation} | |
4026 | package within @code{plexus-utils}, but has been separated in order to allow | |
4027 | these two libraries to vary independently of one another.") | |
4028 | (license license:asl2.0))) | |
8f8ed9aa | 4029 | |
bb27eb0d JL |
4030 | (define-public java-plexus-classworlds |
4031 | (package | |
4032 | (name "java-plexus-classworlds") | |
ae913096 | 4033 | (version "2.6.0") |
bb27eb0d | 4034 | (source (origin |
9520b2b1 EF |
4035 | (method git-fetch) |
4036 | (uri (git-reference | |
4037 | (url "https://github.com/codehaus-plexus/plexus-classworlds") | |
4038 | (commit (string-append "plexus-classworlds-" version)))) | |
4039 | (file-name (git-file-name name version)) | |
bb27eb0d JL |
4040 | (sha256 |
4041 | (base32 | |
ae913096 | 4042 | "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s")))) |
bb27eb0d JL |
4043 | (build-system ant-build-system) |
4044 | (arguments | |
4045 | `(#:jar-name "plexus-classworlds.jar" | |
4046 | #:source-dir "src/main" | |
ae913096 JL |
4047 | #:tests? #f;; FIXME: we need to generate some resources as in pom.xml |
4048 | #:phases | |
4049 | (modify-phases %standard-phases | |
4050 | (replace 'install (install-from-pom "pom.xml"))))) | |
4051 | (propagated-inputs | |
4052 | `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1))) | |
bb27eb0d JL |
4053 | (native-inputs |
4054 | `(("java-junit" ,java-junit))) | |
268dc472 | 4055 | (home-page "https://codehaus-plexus.github.io/plexus-classworlds/") |
bb27eb0d | 4056 | (synopsis "Java class loader framework") |
f4548394 TGR |
4057 | (description "Plexus classworlds replaces the native @code{ClassLoader} |
4058 | mechanism of Java. It is especially useful for dynamic loading of application | |
bb27eb0d JL |
4059 | components.") |
4060 | (license license:asl2.0))) | |
4061 | ||
a7ad92ad | 4062 | (define java-plexus-container-default-bootstrap |
0726d4ea JL |
4063 | (package |
4064 | (name "java-plexus-container-default-bootstrap") | |
4065 | (version "1.7.1") | |
4066 | (source (origin | |
3a26ea3a EF |
4067 | (method git-fetch) |
4068 | (uri (git-reference | |
4069 | (url "https://github.com/codehaus-plexus/plexus-containers") | |
4070 | (commit (string-append "plexus-containers-" version)))) | |
4071 | (file-name (git-file-name name version)) | |
0726d4ea JL |
4072 | (sha256 |
4073 | (base32 | |
3a26ea3a | 4074 | "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228")))) |
0726d4ea JL |
4075 | (build-system ant-build-system) |
4076 | (arguments | |
4077 | `(#:jar-name "container-default.jar" | |
4078 | #:source-dir "plexus-container-default/src/main/java" | |
4079 | #:test-dir "plexus-container-default/src/test" | |
0726d4ea JL |
4080 | #:tests? #f; requires plexus-archiver, which depends on this package |
4081 | #:phases | |
4082 | (modify-phases %standard-phases | |
02ed96dc JL |
4083 | (add-before 'build 'fix-google-collections |
4084 | (lambda _ | |
4085 | ;; Google collections are now replaced with guava | |
4086 | (substitute* "plexus-container-default/pom.xml" | |
4087 | (("google-collections") "guava") | |
4088 | (("com.google.collections") "com.google.guava")) | |
4089 | #t)) | |
0726d4ea JL |
4090 | (add-before 'build 'copy-resources |
4091 | (lambda _ | |
4092 | (copy-recursively | |
4093 | "plexus-container-default/src/main/resources/" | |
4094 | "build/classes") | |
02ed96dc JL |
4095 | #t)) |
4096 | (replace 'install | |
4097 | (install-from-pom "plexus-container-default/pom.xml"))))) | |
4098 | (propagated-inputs | |
4099 | `(("java-plexus-worldclass" ,java-plexus-classworlds) | |
4100 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
4101 | ("java-plexus-utils" ,java-plexus-utils) | |
4102 | ("java-junit" ,java-junit) | |
4103 | ("java-guava" ,java-guava) | |
4104 | ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom))) | |
0726d4ea | 4105 | (home-page "https://github.com/codehaus-plexus/plexus-containers") |
f4548394 | 4106 | (synopsis "Inversion-of-control container") |
0726d4ea | 4107 | (description "Plexus-default-container is Plexus' inversion-of-control |
f4548394 | 4108 | (@dfn{IoC}) container. It is composed of its public API and its default |
0726d4ea JL |
4109 | implementation.") |
4110 | (license license:asl2.0))) | |
4111 | ||
02ed96dc JL |
4112 | (define java-plexus-containers-parent-pom |
4113 | (package | |
4114 | (inherit java-plexus-container-default-bootstrap) | |
4115 | (name "java-plexus-containers-parent-pom") | |
4116 | (arguments | |
4117 | `(#:tests? #f | |
4118 | #:phases | |
4119 | (modify-phases %standard-phases | |
4120 | (delete 'configure) | |
4121 | (delete 'build) | |
4122 | (replace 'install | |
4123 | (install-pom-file "pom.xml"))))) | |
4124 | (propagated-inputs | |
4125 | `(("plexus-parent-pom" ,plexus-parent-pom-4.0))))) | |
4126 | ||
0858b9dc JL |
4127 | (define-public java-plexus-io |
4128 | (package | |
4129 | (name "java-plexus-io") | |
79265a45 | 4130 | (version "3.2.0") |
0858b9dc | 4131 | (source (origin |
48fe942c EF |
4132 | (method git-fetch) |
4133 | (uri (git-reference | |
4134 | (url "https://github.com/codehaus-plexus/plexus-io") | |
4135 | (commit (string-append "plexus-io-" version)))) | |
4136 | (file-name (git-file-name name version)) | |
0858b9dc JL |
4137 | (sha256 |
4138 | (base32 | |
79265a45 | 4139 | "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr")))) |
0858b9dc JL |
4140 | (build-system ant-build-system) |
4141 | (arguments | |
4142 | `(#:jar-name "plexus-io.jar" | |
4143 | #:source-dir "src/main/java" | |
4144 | #:test-dir "src/test" | |
0858b9dc JL |
4145 | #:phases |
4146 | (modify-phases %standard-phases | |
4147 | (add-before 'build 'copy-resources | |
4148 | (lambda _ | |
79265a45 JL |
4149 | (mkdir-p "build/classes") |
4150 | (copy-recursively "src/main/resources" "build/classes") | |
4151 | (mkdir-p "build/test-classes") | |
4152 | (copy-recursively "src/test/resources" "build/test-classes") | |
4153 | #t)) | |
4154 | (replace 'install (install-from-pom "pom.xml"))))) | |
4155 | (propagated-inputs | |
4156 | `(("java-plexus-utils" ,java-plexus-utils-3.3.0) | |
4157 | ("java-commons-io" ,java-commons-io) | |
4158 | ("plexus-parent-pom" ,plexus-parent-pom-5.1))) | |
0858b9dc | 4159 | (inputs |
79265a45 | 4160 | `(("java-jsr305" ,java-jsr305))) |
0858b9dc JL |
4161 | (native-inputs |
4162 | `(("junit" ,java-junit) | |
4163 | ("hamcrest" ,java-hamcrest-core) | |
4164 | ("guava" ,java-guava) | |
4165 | ("classworlds" ,java-plexus-classworlds) | |
4166 | ("xbean" ,java-geronimo-xbean-reflect) | |
4167 | ("container-default" ,java-plexus-container-default-bootstrap))) | |
4168 | (home-page "https://github.com/codehaus-plexus/plexus-io") | |
4169 | (synopsis "I/O plexus components") | |
4170 | (description "Plexus IO is a set of plexus components, which are designed | |
4171 | for use in I/O operations. This implementation using plexus components allows | |
4172 | reusing it in maven.") | |
4173 | (license license:asl2.0))) | |
4174 | ||
b51df3ca JL |
4175 | (define-public java-plexus-archiver |
4176 | (package | |
4177 | (name "java-plexus-archiver") | |
02ed96dc | 4178 | (version "4.2.2") |
b51df3ca JL |
4179 | (source (origin |
4180 | (method url-fetch) | |
4181 | (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver" | |
4182 | "/archive/plexus-archiver-" version ".tar.gz")) | |
4183 | (sha256 | |
4184 | (base32 | |
02ed96dc | 4185 | "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys")))) |
b51df3ca JL |
4186 | (build-system ant-build-system) |
4187 | (arguments | |
4188 | `(#:jar-name "plexus-archiver.jar" | |
4189 | #:source-dir "src/main/java" | |
b51df3ca JL |
4190 | #:test-dir "src/test" |
4191 | #:test-exclude (list "**/Abstract*.java" "**/Base*.java") | |
4192 | #:phases | |
4193 | (modify-phases %standard-phases | |
4194 | (add-before 'check 'remove-failing | |
4195 | (lambda _ | |
4196 | ;; Requires an older version of plexus container | |
4197 | (delete-file | |
2c8ac364 MW |
4198 | "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java") |
4199 | #t)) | |
6f737ae6 JL |
4200 | (add-before 'check 'fix-test-building |
4201 | (lambda _ | |
4202 | (substitute* "build.xml" | |
4203 | (("srcdir=\"src/test\"") "srcdir=\"src/test/java\"")) | |
4204 | #t)) | |
b51df3ca JL |
4205 | (add-before 'build 'copy-resources |
4206 | (lambda _ | |
02ed96dc JL |
4207 | (mkdir-p "build/classes") |
4208 | (copy-recursively "src/main/resources" "build/classes") | |
4209 | (mkdir-p "build/test-classes") | |
4210 | (copy-recursively "src/test/resources" "build/test-classes") | |
4211 | #t)) | |
4212 | (replace 'install (install-from-pom "pom.xml"))))) | |
4213 | (propagated-inputs | |
4214 | `(("java-plexus-utils" ,java-plexus-utils-3.3.0) | |
4215 | ("java-plexus-io" ,java-plexus-io) | |
4216 | ("java-iq80-snappy" ,java-iq80-snappy) | |
4217 | ("java-commons-compress" ,java-commons-compress) | |
4218 | ("plexus-parent-pom" ,plexus-parent-pom-6.1))) | |
b51df3ca | 4219 | (inputs |
02ed96dc JL |
4220 | `(("java-jsr305" ,java-jsr305) |
4221 | ("java-plexus-container-default" | |
4222 | ,java-plexus-container-default-bootstrap))) | |
b51df3ca | 4223 | (native-inputs |
6f737ae6 JL |
4224 | `(("java-hamcrest-core" ,java-hamcrest-core) |
4225 | ("junit" ,java-junit) | |
b51df3ca JL |
4226 | ("classworld" ,java-plexus-classworlds) |
4227 | ("xbean" ,java-geronimo-xbean-reflect) | |
d308bc01 | 4228 | ("xz" ,java-xz) |
b51df3ca JL |
4229 | ("guava" ,java-guava))) |
4230 | (home-page "https://github.com/codehaus-plexus/plexus-archiver") | |
4231 | (synopsis "Archiver component of the Plexus project") | |
4232 | (description "Plexus-archiver contains a component to deal with project | |
4233 | archives (jar).") | |
4234 | (license license:asl2.0))) | |
4235 | ||
a0837294 JL |
4236 | (define-public java-plexus-container-default |
4237 | (package | |
4238 | (inherit java-plexus-container-default-bootstrap) | |
4239 | (name "java-plexus-container-default") | |
4240 | (arguments | |
4241 | `(#:jar-name "container-default.jar" | |
4242 | #:source-dir "plexus-container-default/src/main/java" | |
4243 | #:test-dir "plexus-container-default/src/test" | |
4244 | #:test-exclude (list ;"**/*Test.java" | |
4245 | "**/Abstract*.java" | |
4246 | ;; Requires plexus-hierarchy | |
4247 | "**/PlexusHierarchyTest.java" | |
4248 | ;; Failures | |
4249 | "**/ComponentRealmCompositionTest.java" | |
4250 | "**/PlexusContainerTest.java") | |
a0837294 JL |
4251 | #:phases |
4252 | (modify-phases %standard-phases | |
51087d51 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)) | |
a0837294 JL |
4260 | (add-before 'build 'copy-resources |
4261 | (lambda _ | |
4262 | (copy-recursively | |
4263 | "plexus-container-default/src/main/resources/" | |
4264 | "build/classes") | |
4265 | #t)) | |
4266 | (add-before 'check 'fix-paths | |
4267 | (lambda _ | |
4268 | (let ((dir "plexus-container-default/src/test/java/org/codehaus")) | |
4269 | (substitute* | |
4270 | (string-append | |
4271 | dir "/plexus/component/composition/" | |
4272 | "ComponentRealmCompositionTest.java") | |
4273 | (("src/test") "plexus-container-default/src/test")) | |
51087d51 JL |
4274 | #t))) |
4275 | (replace 'install | |
4276 | (install-from-pom "plexus-container-default/pom.xml"))))) | |
a0837294 JL |
4277 | (inputs |
4278 | `(("worldclass" ,java-plexus-classworlds) | |
4279 | ("xbean" ,java-geronimo-xbean-reflect) | |
4280 | ("utils" ,java-plexus-utils) | |
4281 | ("junit" ,java-junit) | |
4282 | ("guava" ,java-guava))) | |
4283 | (native-inputs | |
4284 | `(("archiver" ,java-plexus-archiver) | |
4285 | ("hamcrest" ,java-hamcrest-core))))) | |
4286 | ||
3214afab JL |
4287 | (define-public java-plexus-component-annotations |
4288 | (package | |
4289 | (inherit java-plexus-container-default) | |
4290 | (name "java-plexus-component-annotations") | |
4291 | (arguments | |
4292 | `(#:jar-name "plexus-component-annotations.jar" | |
4293 | #:source-dir "plexus-component-annotations/src/main/java" | |
51087d51 JL |
4294 | #:tests? #f; no tests |
4295 | #:phases | |
4296 | (modify-phases %standard-phases | |
4297 | (replace 'install | |
4298 | (install-from-pom "plexus-component-annotations/pom.xml"))))) | |
4299 | (propagated-inputs | |
4300 | `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom))) | |
3214afab JL |
4301 | (inputs '()) |
4302 | (native-inputs '()) | |
4303 | (synopsis "Plexus descriptors generator") | |
4304 | (description "This package is a Maven plugin to generate Plexus descriptors | |
4305 | from source tags and class annotations."))) | |
4306 | ||
015e8774 JL |
4307 | (define-public java-plexus-component-metadata |
4308 | (package | |
4309 | (inherit java-plexus-container-default) | |
4310 | (name "java-plexus-component-metadata") | |
4311 | (arguments | |
4312 | `(#:jar-name "plexus-component-metadata.jar" | |
4313 | #:source-dir "src/main/java" | |
4314 | #:test-dir "src/test" | |
4315 | #:jdk ,icedtea-8 | |
4316 | #:phases | |
4317 | (modify-phases %standard-phases | |
4318 | (add-before 'configure 'chdir | |
4319 | (lambda _ | |
4320 | (chdir "plexus-component-metadata") | |
4321 | #t)) | |
4322 | (add-before 'build 'copy-resources | |
4323 | (lambda _ | |
4324 | (copy-recursively "src/main/resources" | |
4325 | "build/classes/") | |
4326 | #t))))) | |
4327 | (propagated-inputs | |
4328 | `(("java-plexus-container-default" ,java-plexus-container-default) | |
4329 | ("java-plexu-component-annotations" ,java-plexus-component-annotations) | |
4330 | ("java-plexus-utils" ,java-plexus-utils) | |
4331 | ("java-plexus-cli" ,java-plexus-cli) | |
4332 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
4333 | ("maven-plugin-api" ,maven-plugin-api) | |
4334 | ("maven-plugin-annotations" ,maven-plugin-annotations) | |
4335 | ("maven-core-bootstrap" ,maven-core-bootstrap) | |
4336 | ("maven-model" ,maven-model) | |
4337 | ("java-commons-cli" ,java-commons-cli) | |
4338 | ("java-qdox" ,java-qdox) | |
4339 | ("java-jdom2" ,java-jdom2) | |
4340 | ("java-asm" ,java-asm))) | |
4341 | (native-inputs | |
4342 | `(("java-junit" ,java-junit) | |
4343 | ("java-guava" ,java-guava) | |
4344 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect))) | |
4345 | (synopsis "Inversion-of-control container for Maven") | |
4346 | (description "The Plexus project provides a full software stack for creating | |
4347 | and executing software projects. Based on the Plexus container, the | |
4348 | applications can utilise component-oriented programming to build modular, | |
4349 | reusable components that can easily be assembled and reused. This package | |
4350 | provides the Maven plugin generating the component metadata."))) | |
4351 | ||
4f77ba17 JL |
4352 | (define-public java-plexus-cipher |
4353 | (package | |
4354 | (name "java-plexus-cipher") | |
4355 | (version "1.7") | |
4356 | (source (origin | |
d0e64613 EF |
4357 | (method git-fetch) |
4358 | (uri (git-reference | |
4359 | (url "https://github.com/codehaus-plexus/plexus-cipher") | |
4360 | (commit (string-append "plexus-cipher-" version)))) | |
4361 | (file-name (git-file-name name version)) | |
4f77ba17 JL |
4362 | (sha256 |
4363 | (base32 | |
d0e64613 | 4364 | "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0")))) |
4f77ba17 JL |
4365 | (build-system ant-build-system) |
4366 | (arguments | |
4367 | `(#:jar-name "plexus-cipher.jar" | |
4368 | #:source-dir "src/main/java" | |
4f77ba17 JL |
4369 | #:tests? #f; FIXME: requires sisu-inject-bean |
4370 | #:phases | |
4371 | (modify-phases %standard-phases | |
4372 | (add-before 'build 'copy-resources | |
4373 | (lambda _ | |
4374 | (copy-recursively "src/main/resources" "build/classes") | |
4375 | (mkdir-p "build/classes/META-INF/sisu") | |
4376 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
4377 | (lambda _ | |
4378 | (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n"))) | |
51087d51 JL |
4379 | #t)) |
4380 | (add-before 'install 'fix-test-dependency | |
4381 | (lambda _ | |
4382 | ;; sisu-inject-bean is only used for tests, but its scope is "provided". | |
4383 | (substitute* "pom.xml" | |
4384 | (("provided") "test")) | |
4385 | #t)) | |
4386 | (replace 'install (install-from-pom "pom.xml"))))) | |
4f77ba17 JL |
4387 | (inputs |
4388 | `(("java-cdi-api" ,java-cdi-api) | |
4389 | ("java-javax-inject" ,java-javax-inject))) | |
51087d51 JL |
4390 | (propagated-inputs |
4391 | `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15))) | |
4392 | (native-inputs | |
4393 | `(("java-junit" ,java-junit))) | |
4f77ba17 JL |
4394 | (home-page "https://github.com/sonatype/plexus-cipher") |
4395 | (synopsis "Encryption/decryption Component") | |
4396 | (description "Plexus-cipher contains a component to deal with encryption | |
4397 | and decryption.") | |
4398 | (license license:asl2.0))) | |
4399 | ||
8630a080 JL |
4400 | (define-public java-plexus-java |
4401 | (package | |
4402 | (name "java-plexus-java") | |
4403 | (version "0.9.10") | |
4404 | (source (origin | |
4405 | (method git-fetch) | |
4406 | (uri (git-reference | |
4407 | (url "https://github.com/codehaus-plexus/plexus-languages") | |
4408 | (commit (string-append "plexus-languages-" version)))) | |
4409 | (file-name (git-file-name name version)) | |
4410 | (sha256 | |
4411 | (base32 | |
4412 | "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5")) | |
4413 | (modules '((guix build utils))) | |
4414 | (snippet | |
4415 | `(begin | |
4416 | (for-each delete-file (find-files "." ".*.jar$")) | |
4417 | #t)))) | |
4418 | (build-system ant-build-system) | |
4419 | (arguments | |
4420 | `(#:jar-name "plexus-java.java" | |
4421 | #:source-dir "plexus-java/src/main/java" | |
4422 | #:test-dir "plexus-java/src/test" | |
4423 | #:tests? #f; require mockito 2 | |
4424 | #:phases | |
4425 | (modify-phases %standard-phases | |
4426 | (add-after 'build 'generate-metadata | |
4427 | (lambda _ | |
4428 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
4429 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
4430 | "--source" "plexus-java/src/main/java" | |
4431 | "--output" "build/classes/META-INF/plexus/components.xml" | |
4432 | "--classes" "build/classes" | |
4433 | "--descriptors" "build/classes/META-INF") | |
4434 | (invoke "ant" "jar") | |
4435 | #t)) | |
4436 | (add-before 'install 'install-parent | |
4437 | (install-pom-file "pom.xml")) | |
4438 | (replace 'install | |
4439 | (install-from-pom "plexus-java/pom.xml"))))) | |
4440 | (propagated-inputs | |
4441 | `(("java-asm" ,java-asm) | |
4442 | ("java-qdox" ,java-qdox-2-M9) | |
4443 | ("java-javax-inject" ,java-javax-inject) | |
4444 | ("plexus-parent-pom" ,plexus-parent-pom-4.0))) | |
4445 | (inputs | |
4446 | `(("java-plexus-component-annotations" ,java-plexus-component-annotations))) | |
4447 | (native-inputs | |
4448 | `(("java-plexus-component-metadata" ,java-plexus-component-metadata) | |
4449 | ("java-junit" ,java-junit))) | |
4450 | (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java") | |
4451 | (synopsis "Shared language features for Java") | |
4452 | (description "This package contains shared language features of the Java | |
4453 | language, for the plexus project.") | |
4454 | (license license:asl2.0))) | |
4455 | ||
239126d4 JL |
4456 | (define-public java-plexus-compiler-api |
4457 | (package | |
4458 | (name "java-plexus-compiler-api") | |
a70182b0 | 4459 | (version "2.8.4") |
239126d4 | 4460 | (source (origin |
5723137a EF |
4461 | (method git-fetch) |
4462 | (uri (git-reference | |
4463 | (url "https://github.com/codehaus-plexus/plexus-compiler") | |
4464 | (commit (string-append "plexus-compiler-" version)))) | |
4465 | (file-name (git-file-name name version)) | |
239126d4 JL |
4466 | (sha256 |
4467 | (base32 | |
5723137a | 4468 | "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk")))) |
239126d4 JL |
4469 | (build-system ant-build-system) |
4470 | (arguments | |
4471 | `(#:jar-name "plexus-compiler-api.jar" | |
4472 | #:source-dir "plexus-compiler-api/src/main/java" | |
90a1d04c JL |
4473 | #:test-dir "plexus-compiler-api/src/test" |
4474 | #:phases | |
4475 | (modify-phases %standard-phases | |
4476 | (replace 'install | |
4477 | (install-from-pom "plexus-compiler-api/pom.xml"))))) | |
4478 | (propagated-inputs | |
239126d4 | 4479 | `(("java-plexus-container-default" ,java-plexus-container-default) |
90a1d04c | 4480 | ("java-plexus-compiler-pom" ,java-plexus-compiler-pom) |
239126d4 JL |
4481 | ("java-plexus-util" ,java-plexus-utils))) |
4482 | (native-inputs | |
4483 | `(("java-junit" ,java-junit))) | |
4484 | (home-page "https://github.com/codehaus-plexus/plexus-compiler") | |
4485 | (synopsis "Plexus Compilers component's API to manipulate compilers") | |
4486 | (description "This package contains the API used by components to manipulate | |
4487 | compilers.") | |
4488 | (license (list license:asl2.0 | |
4489 | license:expat)))) | |
4490 | ||
90a1d04c JL |
4491 | (define java-plexus-compiler-pom |
4492 | (package | |
4493 | (inherit java-plexus-compiler-api) | |
4494 | (name "java-plexus-compiler-pom") | |
4495 | (arguments | |
4496 | `(#:tests? #f | |
4497 | #:phases | |
4498 | (modify-phases %standard-phases | |
4499 | (delete 'configure) | |
4500 | (delete 'build) | |
4501 | (replace 'install | |
4502 | (install-pom-file "pom.xml")) | |
4503 | (add-after 'install 'install-compilers | |
4504 | (install-pom-file "plexus-compilers/pom.xml"))))) | |
4505 | (propagated-inputs | |
4506 | `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0))))) | |
4507 | ||
4508 | (define plexus-components-parent-pom-4.0 | |
4509 | (package | |
4510 | (name "plexus-components-parent-pom") | |
4511 | (version "4.0") | |
4512 | (source (origin | |
4513 | (method git-fetch) | |
4514 | (uri (git-reference | |
4515 | (url "https://github.com/codehaus-plexus/plexus-components") | |
4516 | (commit (string-append "plexus-components-" version)))) | |
5723137a | 4517 | (file-name (git-file-name name version)) |
239126d4 JL |
4518 | (sha256 |
4519 | (base32 | |
90a1d04c | 4520 | "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi")))) |
239126d4 JL |
4521 | (build-system ant-build-system) |
4522 | (arguments | |
90a1d04c JL |
4523 | `(#:tests? #f |
4524 | #:phases | |
4525 | (modify-phases %standard-phases | |
4526 | (delete 'configure) | |
4527 | (delete 'build) | |
4528 | (replace 'install | |
4529 | (install-pom-file "pom.xml"))))) | |
4530 | (propagated-inputs | |
4531 | `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0))) | |
4532 | (home-page "https://codehaus-plexus.github.io/plexus-components") | |
4533 | (synopsis "Plexus parent pom") | |
4534 | (description "This package contains the Plexus components parent POM.") | |
4535 | (license license:asl2.0))) | |
4536 | ||
4537 | (define-public java-plexus-compiler-manager | |
4538 | (package | |
4539 | (inherit java-plexus-compiler-api) | |
4540 | (name "java-plexus-compiler-manager") | |
4541 | (arguments | |
4542 | `(#:jar-name "compiler-compiler-manager.java" | |
4543 | #:source-dir "plexus-compiler-manager/src/main/java" | |
4544 | #:test-dir "plexus-compiler-manager/src/test" | |
4545 | #:tests? #f | |
4546 | #:phases | |
4547 | (modify-phases %standard-phases | |
4548 | (add-after 'build 'generate-metadata | |
4549 | (lambda _ | |
4550 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
4551 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
4552 | "--source" "plexus-compiler-manager/src/main/java" | |
4553 | "--output" "build/classes/META-INF/plexus/components.xml" | |
4554 | "--classes" "build/classes" | |
4555 | "--descriptors" "build/classes/META-INF") | |
4556 | (invoke "ant" "jar") | |
4557 | #t)) | |
4558 | (add-after 'generate-metadata 'rebuild | |
4559 | (lambda _ | |
4560 | (invoke "ant" "jar") | |
4561 | #t)) | |
4562 | (replace 'install | |
4563 | (install-from-pom "plexus-compiler-manager/pom.xml"))))) | |
4564 | (propagated-inputs | |
4565 | `(("java-plexus-compiler-api" ,java-plexus-compiler-api) | |
4566 | ("java-plexus-compiler-pom" ,java-plexus-compiler-pom) | |
4567 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
239126d4 | 4568 | (native-inputs |
90a1d04c JL |
4569 | `(("unzip" ,unzip) |
4570 | ("java-plexus-component-metadata" ,java-plexus-component-metadata))) | |
4571 | (synopsis "Compiler management for Plexus Compiler component") | |
4572 | (description "Plexus Compiler is a Plexus component to use different | |
4573 | compilers through a uniform API. This component chooses the compiler | |
4574 | implementation to use in a project."))) | |
239126d4 | 4575 | |
f8a519fa JL |
4576 | (define-public java-plexus-compiler-javac |
4577 | (package | |
4578 | (inherit java-plexus-compiler-api) | |
4579 | (name "java-plexus-compiler-javac") | |
4580 | (arguments | |
4581 | `(#:jar-name "plexus-compiler-javac.jar" | |
4582 | #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java" | |
4583 | #:jdk ,icedtea-8 | |
4584 | #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package. | |
90a1d04c JL |
4585 | #:test-dir "plexus-compilers/plexus-compiler-javac/src/test" |
4586 | #:modules ((guix build ant-build-system) | |
4587 | (guix build utils) | |
4588 | (guix build java-utils) | |
4589 | (sxml simple)) | |
4590 | #:phases | |
4591 | (modify-phases %standard-phases | |
4592 | ;; We cannot use java-plexus-component-metadata to generate the metadata | |
4593 | ;; because it ultimately depends on this package. | |
4594 | ;; Create it manually instead | |
4595 | (add-before 'build 'create-metadata | |
4596 | (lambda _ | |
4597 | (let* ((dir "build/classes/META-INF/plexus") | |
4598 | (file (string-append dir "/components.xml"))) | |
4599 | (mkdir-p dir) | |
4600 | (with-output-to-file file | |
4601 | (lambda _ | |
4602 | (sxml->xml | |
4603 | `(component-set | |
4604 | (components | |
4605 | (component | |
4606 | (role "org.codehaus.plexus.compiler.Compiler") | |
4607 | (role-hint "javac") | |
4608 | (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler") | |
4609 | (isolated-realm "false")))))))) | |
4610 | #t)) | |
4611 | (replace 'install | |
4612 | (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml"))))) | |
4613 | (propagated-inputs | |
f8a519fa JL |
4614 | `(("java-plexus-compiler-api" ,java-plexus-compiler-api) |
4615 | ("java-plexus-utils" ,java-plexus-utils) | |
4616 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
f8a519fa JL |
4617 | (synopsis "Javac Compiler support for Plexus Compiler component") |
4618 | (description "This package contains the Javac Compiler support for Plexus | |
4619 | Compiler component."))) | |
4620 | ||
6a25a3b1 JL |
4621 | (define plexus-components-pom-1.1.20 |
4622 | (package | |
4623 | (name "plexus-components-pom-1.1.20") | |
4624 | (version "1.1.20") | |
4625 | (source (origin | |
4626 | (method git-fetch) | |
4627 | (uri (git-reference | |
4628 | (url "https://github.com/codehaus-plexus/plexus-components") | |
4629 | (commit (string-append "plexus-components-" version)))) | |
4630 | (file-name (git-file-name name version)) | |
4631 | (sha256 | |
4632 | (base32 | |
4633 | "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb")))) | |
4634 | (build-system ant-build-system) | |
4635 | (arguments | |
4636 | `(#:tests? #f | |
4637 | #:phases | |
4638 | (modify-phases %standard-phases | |
4639 | (delete 'configure) | |
4640 | (delete 'build) | |
4641 | (replace 'install | |
4642 | (install-pom-file "pom.xml"))))) | |
4643 | (propagated-inputs | |
4644 | `(("plexus-parent-pom" ,plexus-parent-pom-3.1))) | |
4645 | (home-page "https://github.com/codehaus-plexus/plexus-components") | |
4646 | (synopsis "Maven parent pom for plexus packages") | |
4647 | (description "This package contains the parent pom for plexus component | |
4648 | packages.") | |
4649 | (license license:asl2.0))) | |
4650 | ||
4651 | (define-public java-plexus-digest | |
4652 | (package | |
4653 | (name "java-plexus-digest") | |
4654 | (version "1.2") | |
4655 | (source (origin | |
4656 | (method git-fetch) | |
4657 | (uri (git-reference | |
4658 | (url "https://github.com/codehaus-plexus/plexus-digest") | |
4659 | (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430"))) | |
4660 | (file-name (git-file-name name version)) | |
4661 | (sha256 | |
4662 | (base32 | |
4663 | "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x")))) | |
4664 | (build-system ant-build-system) | |
4665 | (arguments | |
4666 | `(#:jar-name "plexus-digest.jar" | |
4667 | #:source-dir "src/main/java" | |
4668 | #:tests? #f | |
4669 | #:phases | |
4670 | (modify-phases %standard-phases | |
4671 | (replace 'install | |
4672 | (install-from-pom "pom.xml"))))) | |
4673 | (propagated-inputs | |
4674 | `(("java-plexus-utils" ,java-plexus-utils) | |
4675 | ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20))) | |
4676 | (native-inputs | |
4677 | `(("java-junit" ,java-junit))) | |
4678 | (home-page "https://github.com/codehaus-plexus/plexus-digest") | |
4679 | (synopsis "Hash function utilities for Java") | |
4680 | (description "This package is a plexus component that contains hash | |
4681 | function utilities.") | |
4682 | (license license:asl2.0))) | |
4683 | ||
0aa85081 JL |
4684 | (define-public java-plexus-sec-dispatcher |
4685 | (package | |
4686 | (name "java-plexus-sec-dispatcher") | |
4687 | (version "1.4") ;; Newest release listed at the Maven Central Repository. | |
4688 | (source (origin | |
4689 | ;; This project doesn't tag releases or publish tarballs, so we take | |
4690 | ;; the "prepare release plexus-sec-dispatcher-1.4" git commit. | |
d9e356a8 EF |
4691 | (method git-fetch) |
4692 | (uri (git-reference | |
4693 | (url "https://github.com/sonatype/plexus-sec-dispatcher/") | |
4694 | (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f"))) | |
0aa85081 JL |
4695 | (sha256 |
4696 | (base32 | |
d9e356a8 EF |
4697 | "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs")) |
4698 | (file-name (git-file-name name version)))) | |
0aa85081 JL |
4699 | (arguments |
4700 | `(#:jar-name "plexus-sec-dispatcher.jar" | |
4701 | #:source-dir "src/main/java" | |
0aa85081 JL |
4702 | #:phases |
4703 | (modify-phases %standard-phases | |
4704 | (add-before 'build 'generate-models | |
4705 | (lambda* (#:key inputs #:allow-other-keys) | |
4706 | (define (modello-single-mode file version mode) | |
2c8ac364 MW |
4707 | (invoke "java" |
4708 | "org.codehaus.modello.ModelloCli" | |
4709 | file mode "src/main/java" version | |
4710 | "false" "true")) | |
0aa85081 | 4711 | (let ((file "src/main/mdo/settings-security.mdo")) |
0aa85081 JL |
4712 | (modello-single-mode file "1.0.0" "java") |
4713 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
2c8ac364 MW |
4714 | (modello-single-mode file "1.0.0" "xpp3-writer")) |
4715 | #t)) | |
0aa85081 JL |
4716 | (add-before 'build 'generate-components.xml |
4717 | (lambda _ | |
4718 | (mkdir-p "build/classes/META-INF/plexus") | |
4719 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
4720 | (lambda _ | |
4721 | (display | |
4722 | "<component-set>\n | |
4723 | <components>\n | |
4724 | <component>\n | |
4725 | <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n | |
4726 | <role-hint>default</role-hint>\n | |
4727 | <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n | |
4728 | <description></description>\n | |
4729 | <requirements>\n | |
4730 | <requirement>\n | |
4731 | <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n | |
4732 | <field-name>_cipher</field-name>\n | |
4733 | </requirement>\n | |
4734 | <requirement>\n | |
4735 | <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n | |
4736 | <field-name>_decryptors</field-name>\n | |
4737 | </requirement>\n | |
4738 | </requirements>\n | |
4739 | <configuration>\n | |
4740 | <_configuration-file>~/.settings-security.xml</_configuration-file>\n | |
4741 | </configuration>\n | |
4742 | </component>\n | |
4743 | </components>\n | |
2c8ac364 MW |
4744 | </component-set>\n"))) |
4745 | #t)) | |
0aa85081 JL |
4746 | (add-before 'check 'fix-paths |
4747 | (lambda _ | |
2c8ac364 | 4748 | (copy-recursively "src/test/resources" "target") |
51087d51 JL |
4749 | #t)) |
4750 | (replace 'install (install-from-pom "pom.xml"))))) | |
4751 | (propagated-inputs | |
4752 | `(("java-plexus-utils" ,java-plexus-utils) | |
4753 | ("java-plexus-cipher" ,java-plexus-cipher) | |
4754 | ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12))) | |
0aa85081 JL |
4755 | (native-inputs |
4756 | `(("java-modello-core" ,java-modello-core) | |
4757 | ;; for modello: | |
4758 | ("java-plexus-container-default" ,java-plexus-container-default) | |
4759 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
4760 | ("java-plexus-utils" ,java-plexus-utils) | |
4761 | ("java-guava" ,java-guava) | |
4762 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
4763 | ("java-sisu-build-api" ,java-sisu-build-api) | |
4764 | ;; modello plugins: | |
4765 | ("java-modellop-plugins-java" ,java-modello-plugins-java) | |
4766 | ("java-modellop-plugins-xml" ,java-modello-plugins-xml) | |
4767 | ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3) | |
4768 | ;; for tests | |
4769 | ("java-junit" ,java-junit))) | |
4770 | (build-system ant-build-system) | |
4771 | (home-page "https://github.com/sonatype/plexus-sec-dispatcher") | |
4772 | (synopsis "Plexus Security Dispatcher Component") | |
4773 | (description "This package is the Plexus Security Dispatcher Component. | |
4774 | This component decrypts a string passed to it.") | |
4775 | (license license:asl2.0))) | |
4776 | ||
7d65489f JL |
4777 | (define-public java-plexus-cli |
4778 | (package | |
4779 | (name "java-plexus-cli") | |
4780 | (version "1.7") | |
4781 | (source (origin | |
4782 | (method git-fetch) | |
4783 | (uri (git-reference | |
4784 | (url "https://github.com/sonatype/plexus-cli") | |
4785 | (commit "a776afa6bca84e5107bedb69440329cdb24ed645"))) | |
4786 | (file-name (string-append name "-" version)) | |
4787 | (sha256 | |
4788 | (base32 | |
4789 | "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx")))) | |
4790 | (build-system ant-build-system) | |
4791 | (arguments | |
4792 | `(#:jar-name "plexus-cli.jar" | |
4793 | #:source-dir "src/main/java" | |
4794 | #:jdk ,icedtea-8 | |
4795 | #:test-dir "src/test")) | |
4796 | (inputs | |
4797 | `(("java-commons-cli" ,java-commons-cli) | |
4798 | ("java-plexus-container-default" ,java-plexus-container-default) | |
4799 | ("java-plexus-classworlds" ,java-plexus-classworlds))) | |
4800 | (native-inputs | |
4801 | `(("java-plexus-utils" ,java-plexus-utils) | |
4802 | ("java-junit" ,java-junit) | |
4803 | ("java-guava" ,java-guava))) | |
4804 | (home-page "https://codehaus-plexus.github.io/plexus-cli") | |
4805 | (synopsis "CLI building library for plexus") | |
4806 | (description "This package is a library to help creating CLI around | |
4807 | Plexus components.") | |
4808 | (license license:asl2.0))) | |
4809 | ||
8f524749 JL |
4810 | (define-public java-sisu-build-api |
4811 | (package | |
4812 | (name "java-sisu-build-api") | |
4813 | (version "0.0.7") | |
4814 | (source (origin | |
16c62763 EF |
4815 | (method git-fetch) |
4816 | (uri (git-reference | |
4817 | (url "https://github.com/sonatype/sisu-build-api") | |
4818 | (commit (string-append "plexus-build-api-" version)))) | |
4819 | (file-name (git-file-name name version)) | |
8f524749 JL |
4820 | (sha256 |
4821 | (base32 | |
16c62763 | 4822 | "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0")))) |
8f524749 JL |
4823 | (build-system ant-build-system) |
4824 | (arguments | |
4825 | `(#:jar-name "sisu-build-api.jar" | |
4826 | #:source-dir "src/main/java" | |
4827 | #:jdk ,icedtea-8 | |
4828 | #:tests? #f; FIXME: how to run the tests? | |
4829 | #:phases | |
4830 | (modify-phases %standard-phases | |
4831 | (add-before 'build 'copy-resources | |
4832 | (lambda _ | |
4833 | (copy-recursively "src/main/resources" "build/classes") | |
4834 | (substitute* (find-files "build/classes") | |
4835 | (("\\$\\{project.version\\}") ,version)) | |
4836 | #t)) | |
4837 | (add-before 'build 'generate-plexus-compontent | |
4838 | (lambda _ | |
4839 | (mkdir-p "build/classes/META-INF/plexus") | |
4840 | ;; This file is required for plexus to inject this package. | |
4841 | ;; FIXME: how is it generated? | |
4842 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
4843 | (lambda _ | |
4844 | (display | |
4845 | "<component-set>\n | |
4846 | <components>\n | |
4847 | <component>\n | |
4848 | <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n | |
4849 | <role-hint>default</role-hint>\n | |
4850 | <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n | |
4851 | <description>Filesystem based non-incremental build context implementation\n | |
4852 | which behaves as if all files were just created.</description>\n | |
4853 | </component>\n | |
4854 | </components>\n | |
4855 | </component-set>\n"))) | |
f0e3e6ca JL |
4856 | #t)) |
4857 | (replace 'install | |
4858 | (install-from-pom "pom.xml"))))) | |
8f524749 JL |
4859 | (inputs |
4860 | `(("java-plexus-utils" ,java-plexus-utils) | |
4861 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
4862 | (home-page "https://github.com/sonatype/sisu-build-api/") | |
4863 | (synopsis "Base build API for maven") | |
4864 | (description "This package contains the base build API for maven and | |
4865 | a default implementation of it. This API is about scanning files in a | |
4866 | project and determining what files need to be rebuilt.") | |
4867 | (license license:asl2.0))) | |
4868 | ||
b26c8b61 JL |
4869 | (define-public java-modello-core |
4870 | (package | |
4871 | (name "java-modello-core") | |
4872 | (version "1.9.1") | |
4873 | (source (origin | |
df9487c5 EF |
4874 | (method git-fetch) |
4875 | (uri (git-reference | |
4876 | (url "https://github.com/codehaus-plexus/modello") | |
4877 | (commit (string-append "modello-" version)))) | |
4878 | (file-name (git-file-name name version)) | |
b26c8b61 JL |
4879 | (sha256 |
4880 | (base32 | |
df9487c5 | 4881 | "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4")))) |
b26c8b61 JL |
4882 | (build-system ant-build-system) |
4883 | (arguments | |
4884 | `(#:jar-name "modello-core.jar" | |
4885 | #:source-dir "modello-core/src/main/java" | |
4886 | #:test-dir "modello-core/src/test" | |
4887 | #:main-class "org.codehaus.modello.ModelloCli" | |
4888 | #:jdk ,icedtea-8 | |
4889 | #:phases | |
4890 | (modify-phases %standard-phases | |
4891 | (add-before 'build 'copy-resources | |
4892 | (lambda _ | |
4893 | (mkdir-p "build/classes/META-INF/plexus") | |
4894 | (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml" | |
4895 | "build/classes/META-INF/plexus/components.xml") | |
4896 | #t)) | |
4897 | (add-before 'check 'fix-tests | |
4898 | (lambda _ | |
4899 | (with-directory-excursion "modello-core/src/test/java/org/codehaus" | |
4900 | (substitute* '("modello/core/DefaultModelloCoreTest.java" | |
4901 | "modello/core/io/ModelReaderTest.java") | |
4902 | (("src/test") "modello-core/src/test"))) | |
4903 | #t))))) | |
29534ff7 | 4904 | (propagated-inputs |
b26c8b61 JL |
4905 | `(("java-plexus-utils" ,java-plexus-utils) |
4906 | ("java-plexus-container-default" ,java-plexus-container-default) | |
4907 | ("java-sisu-build-api" ,java-sisu-build-api))) | |
4908 | (native-inputs | |
4909 | `(("java-junit" ,java-junit) | |
4910 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
4911 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
4912 | ("java-guava" ,java-guava))) | |
7942a129 | 4913 | (home-page "https://codehaus-plexus.github.io/modello/") |
b26c8b61 JL |
4914 | (synopsis "Framework for code generation from a simple model") |
4915 | (description "Modello is a framework for code generation from a simple model. | |
4916 | ||
4917 | Modello generates code from a simple model format: based on a plugin | |
4918 | architecture, various types of code and descriptors can be generated from the | |
4919 | single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers, | |
4920 | XSD and documentation.") | |
4921 | (license (list | |
4922 | license:expat | |
4923 | ;; Although this package uses only files licensed under expat, | |
4924 | ;; other parts of the source are licensed under different | |
4925 | ;; licenses. We include them to be inherited by other packages. | |
4926 | license:asl2.0 | |
4927 | ;; Some files in modello-plugin-java are licensed under a | |
4928 | ;; 5-clause BSD license. | |
4929 | (license:non-copyleft | |
4930 | (string-append "file:///modello-plugins/modello-plugin-java/" | |
4931 | "src/main/java/org/codehaus/modello/plugin/" | |
4932 | "java/javasource/JNaming.java")))))) | |
4933 | ||
fc620bef JL |
4934 | (define-public java-modello-plugins-java |
4935 | (package | |
4936 | (inherit java-modello-core) | |
4937 | (name "java-modello-plugins-java") | |
4938 | (arguments | |
4939 | `(#:jar-name "modello-plugins-java.jar" | |
4940 | #:source-dir "modello-plugins/modello-plugin-java/src/main/java" | |
4941 | #:test-dir "modello-plugins/modello-plugin-java/src/test" | |
4942 | #:jdk ,icedtea-8 | |
4943 | #:tests? #f; requires maven-model, which depends on this package | |
4944 | #:phases | |
4945 | (modify-phases %standard-phases | |
4946 | (add-before 'build 'copy-resources | |
4947 | (lambda _ | |
4948 | (mkdir-p "build/classes") | |
4949 | (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources" | |
4950 | "build/classes") | |
4951 | #t))))) | |
4952 | (inputs | |
29534ff7 | 4953 | `(("java-modello-core" ,java-modello-core))) |
fc620bef JL |
4954 | (synopsis "Modello Java Plugin") |
4955 | (description "Modello Java Plugin generates Java objects for the model."))) | |
4956 | ||
a0ce95ba JL |
4957 | (define-public java-modello-plugins-xml |
4958 | (package | |
4959 | (inherit java-modello-core) | |
4960 | (name "java-modello-plugins-xml") | |
4961 | (arguments | |
4962 | `(#:jar-name "modello-plugins-xml.jar" | |
4963 | #:source-dir "modello-plugins/modello-plugin-xml/src/main/java" | |
4964 | #:test-dir "modello-plugins/modello-plugin-xml/src/test" | |
4965 | #:jdk ,icedtea-8 | |
4966 | #:phases | |
4967 | (modify-phases %standard-phases | |
4968 | (add-before 'build 'copy-resources | |
4969 | (lambda _ | |
4970 | (mkdir-p "build/classes") | |
4971 | (copy-recursively | |
4972 | "modello-plugins/modello-plugin-xml/src/main/resources" | |
4973 | "build/classes") | |
4974 | #t)) | |
4975 | (add-before 'check 'fix-paths | |
4976 | (lambda _ | |
4977 | (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test" | |
4978 | (substitute* | |
4979 | "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java" | |
2c8ac364 MW |
4980 | (("src/test") "modello-plugins/modello-plugin-xml/src/test"))) |
4981 | #t))))) | |
29534ff7 | 4982 | (propagated-inputs |
a0ce95ba | 4983 | `(("java-modello-core" ,java-modello-core) |
29534ff7 | 4984 | ("java-modello-plugins-java" ,java-modello-plugins-java))) |
a0ce95ba JL |
4985 | (synopsis "Modello XML Plugin") |
4986 | (description "Modello XML Plugin contains shared code for every plugins | |
4987 | working on XML representation of the model."))) | |
4988 | ||
e4708560 JL |
4989 | (define-public java-modello-test |
4990 | (package | |
4991 | (inherit java-modello-core) | |
4992 | (name "java-modello-test") | |
4993 | (arguments | |
4994 | `(#:jar-name "modello-test.jar" | |
4995 | #:source-dir "modello-test/src/main/java" | |
4996 | #:tests? #f; no tests | |
4997 | #:jdk ,icedtea-8)) | |
4998 | (inputs | |
4999 | `(("java-plexus-utils" ,java-plexus-utils) | |
5000 | ("java-plexus-compiler-api" ,java-plexus-compiler-api) | |
5001 | ("java-plexus-compiler-javac" ,java-plexus-compiler-javac) | |
5002 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
5003 | (synopsis "Modello test package") | |
5004 | (description "The modello test package contains the basis to create | |
5005 | Modello generator unit-tests, including sample models and xml files to test | |
5006 | every feature for every plugin."))) | |
5007 | ||
36607d3b JL |
5008 | (define-public java-modello-plugins-xpp3 |
5009 | (package | |
5010 | (inherit java-modello-core) | |
5011 | (name "java-modello-plugins-xpp3") | |
5012 | (arguments | |
5013 | `(#:jar-name "modello-plugins-xpp3.jar" | |
5014 | #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java" | |
5015 | #:test-dir "modello-plugins/modello-plugin-xpp3/src/test" | |
5016 | ;; One of the test dependencies is maven-model which depends on this package. | |
5017 | #:tests? #f | |
5018 | #:jdk ,icedtea-8 | |
5019 | #:phases | |
5020 | (modify-phases %standard-phases | |
5021 | (add-before 'build 'copy-resources | |
5022 | (lambda _ | |
5023 | (mkdir-p "build/classes") | |
5024 | (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources" | |
5025 | "build/classes") | |
5026 | #t))))) | |
29534ff7 | 5027 | (propagated-inputs |
36607d3b JL |
5028 | `(("java-modello-core" ,java-modello-core) |
5029 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
29534ff7 | 5030 | ("java-modello-plugins-xml" ,java-modello-plugins-xml))) |
36607d3b JL |
5031 | (native-inputs |
5032 | `(("java-xmlunit" ,java-xmlunit) | |
5033 | ("java-modello-test" ,java-modello-test) | |
5034 | ,@(package-native-inputs java-modello-core))) | |
5035 | (synopsis "Modello XPP3 Plugin") | |
5036 | (description "The modello XPP3 plugin generates XML readers and writers based | |
5037 | on the XPP3 API (XML Pull Parser)."))) | |
5038 | ||
8f8ed9aa RW |
5039 | (define-public java-asm |
5040 | (package | |
5041 | (name "java-asm") | |
d0e9ded7 | 5042 | (version "6.0") |
8f8ed9aa RW |
5043 | (source (origin |
5044 | (method url-fetch) | |
654f997d | 5045 | (uri (string-append "https://download.forge.ow2.org/asm/" |
8f8ed9aa RW |
5046 | "asm-" version ".tar.gz")) |
5047 | (sha256 | |
5048 | (base32 | |
d0e9ded7 | 5049 | "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00")))) |
8f8ed9aa RW |
5050 | (build-system ant-build-system) |
5051 | (arguments | |
5052 | `(#:build-target "compile" | |
5053 | ;; The tests require an old version of Janino, which no longer compiles | |
5054 | ;; with the JDK7. | |
5055 | #:tests? #f | |
d0e9ded7 GB |
5056 | #:make-flags |
5057 | (list | |
5058 | ;; We don't need these extra ant tasks, but the build system asks us to | |
5059 | ;; provide a path anyway. | |
5060 | "-Dobjectweb.ant.tasks.path=dummy-path" | |
5061 | ;; The java-aqute.bndlib JAR file will be put onto the classpath and | |
5062 | ;; used during the build automatically by ant-build-system, but | |
5063 | ;; java-asm's build.xml fails unless we provide something here. | |
5064 | "-Dbiz.aQute.bnd.path=dummy-path") | |
8f8ed9aa RW |
5065 | #:phases |
5066 | (modify-phases %standard-phases | |
30b7704a JL |
5067 | (add-before 'build 'remove-bnd-dependency |
5068 | (lambda _ | |
5069 | ;; This file is the only one to require bnd, and is not needed | |
5070 | ;; because we don't build a bundle. | |
5071 | (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java") | |
5072 | #t)) | |
8f8ed9aa RW |
5073 | (add-before 'install 'build-jars |
5074 | (lambda* (#:key make-flags #:allow-other-keys) | |
5075 | ;; We cannot use the "jar" target because it depends on a couple | |
5076 | ;; of unpackaged, complicated tools. | |
5077 | (mkdir "dist") | |
2c8ac364 MW |
5078 | (invoke "jar" |
5079 | "-cf" (string-append "dist/asm-" ,version ".jar") | |
5080 | "-C" "output/build/tmp" "."))) | |
51087d51 JL |
5081 | (add-before 'install 'fix-pom |
5082 | (lambda _ | |
5083 | (substitute* (find-files "archive" "\\.pom$") | |
5084 | (("@product.artifact@") ,version)) | |
5085 | #t)) | |
5086 | (add-before 'install 'install-parent | |
5087 | (install-pom-file "archive/asm-parent.pom")) | |
8f8ed9aa | 5088 | (replace 'install |
51087d51 | 5089 | (install-from-pom "archive/asm.pom"))))) |
8f8ed9aa RW |
5090 | (native-inputs |
5091 | `(("java-junit" ,java-junit))) | |
51087d51 JL |
5092 | (propagated-inputs |
5093 | `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3))) | |
1e4ae551 | 5094 | (home-page "https://asm.ow2.io/") |
8f8ed9aa RW |
5095 | (synopsis "Very small and fast Java bytecode manipulation framework") |
5096 | (description "ASM is an all purpose Java bytecode manipulation and | |
5097 | analysis framework. It can be used to modify existing classes or dynamically | |
5098 | generate classes, directly in binary form. The provided common | |
a4cb4d17 | 5099 | transformations and analysis algorithms allow easily assembling custom |
8f8ed9aa RW |
5100 | complex transformations and code analysis tools.") |
5101 | (license license:bsd-3))) | |
607fe24a | 5102 | |
51087d51 JL |
5103 | (define java-org-ow2-parent-pom-1.3 |
5104 | (package | |
5105 | (name "java-org-ow2-parent-pom") | |
5106 | (version "1.3") | |
5107 | (source (origin | |
5108 | (method url-fetch) | |
5109 | (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom") | |
5110 | (sha256 | |
5111 | (base32 | |
5112 | "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai")))) | |
5113 | (build-system ant-build-system) | |
5114 | (arguments | |
5115 | `(#:tests? #f | |
5116 | #:phases | |
5117 | (modify-phases %standard-phases | |
5118 | (delete 'unpack) | |
5119 | (delete 'build) | |
5120 | (delete 'configure) | |
5121 | (replace 'install | |
5122 | (install-pom-file (assoc-ref %build-inputs "source")))))) | |
5123 | (home-page "https://ow2.org") | |
5124 | (synopsis "Ow2.org parent pom") | |
5125 | (description "This package contains the parent pom for projects from ow2.org, | |
5126 | including java-asm.") | |
5127 | (license license:lgpl2.1+))) | |
5128 | ||
bfb4004d GB |
5129 | (define java-asm-bootstrap |
5130 | (package | |
5131 | (inherit java-asm) | |
5132 | (name "java-asm-bootstrap") | |
5133 | (arguments | |
5134 | (substitute-keyword-arguments (package-arguments java-asm) | |
5135 | ((#:tests? _) #f))) | |
30b7704a | 5136 | (native-inputs `()))) |
bfb4004d | 5137 | |
fafd543f JL |
5138 | (define-public java-asm-8 |
5139 | (package | |
5140 | (inherit java-asm) | |
5141 | (version "8.0.1") | |
5142 | (source (origin | |
5143 | (method git-fetch) | |
5144 | (uri (git-reference | |
5145 | (url "https://gitlab.ow2.org/asm/asm") | |
5146 | (commit (string-append | |
5147 | "ASM_" (string-join (string-split version #\.) | |
5148 | "_"))))) | |
5149 | (file-name (git-file-name "java-asm" version)) | |
5150 | (sha256 | |
5151 | (base32 | |
5152 | "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69")))) | |
5153 | (arguments | |
5154 | `(#:jar-name "asm8.jar" | |
5155 | #:source-dir "asm/src/main/java" | |
5156 | #:test-dir "asm/src/test" | |
5157 | ;; tests depend on junit5 | |
5158 | #:tests? #f)) | |
5159 | (propagated-inputs '()) | |
5160 | (native-inputs '()))) | |
5161 | ||
d9d42624 JL |
5162 | (define-public java-asm-tree-8 |
5163 | (package | |
5164 | (inherit java-asm-8) | |
5165 | (name "java-asm-tree") | |
5166 | (arguments | |
5167 | `(#:jar-name "asm-tree.jar" | |
5168 | #:source-dir "asm-tree/src/main/java" | |
5169 | #:test-dir "asm-tree/src/test" | |
5170 | ;; tests depend on junit5 | |
5171 | #:tests? #f)) | |
5172 | (inputs | |
5173 | `(("java-asm" ,java-asm-8))))) | |
5174 | ||
d7f7c752 JL |
5175 | (define-public java-asm-analysis-8 |
5176 | (package | |
5177 | (inherit java-asm-8) | |
5178 | (name "java-asm-analysis") | |
5179 | (arguments | |
5180 | `(#:jar-name "asm-analysis.jar" | |
5181 | #:source-dir "asm-analysis/src/main/java" | |
5182 | #:test-dir "asm-analysis/src/test" | |
5183 | ;; tests depend on junit5 | |
5184 | #:tests? #f)) | |
5185 | (inputs | |
5186 | `(("java-asm" ,java-asm-8) | |
5187 | ("java-asm-tree" ,java-asm-tree-8))))) | |
5188 | ||
f37de56a JL |
5189 | (define-public java-asm-util-8 |
5190 | (package | |
5191 | (inherit java-asm-8) | |
5192 | (name "java-asm-util") | |
5193 | (arguments | |
5194 | `(#:jar-name "asm-util8.jar" | |
5195 | #:source-dir "asm-util/src/main/java" | |
5196 | #:test-dir "asm-util/src/test" | |
5197 | ;; tests depend on junit5 | |
5198 | #:tests? #f)) | |
5199 | (inputs | |
5200 | `(("java-asm" ,java-asm-8) | |
5201 | ("java-asm-analysis" ,java-asm-analysis-8) | |
5202 | ("java-asm-tree" ,java-asm-tree-8))))) | |
5203 | ||
607fe24a RW |
5204 | (define-public java-cglib |
5205 | (package | |
5206 | (name "java-cglib") | |
5207 | (version "3.2.4") | |
5c44505b TGR |
5208 | (source |
5209 | (origin | |
5210 | (method git-fetch) | |
5211 | (uri (git-reference | |
b0e7b699 | 5212 | (url "https://github.com/cglib/cglib") |
5c44505b TGR |
5213 | (commit (string-append |
5214 | "RELEASE_" | |
5215 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) | |
5216 | version))))) | |
5217 | (file-name (git-file-name name version)) | |
5218 | (sha256 | |
5219 | (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v")))) | |
607fe24a RW |
5220 | (build-system ant-build-system) |
5221 | (arguments | |
5222 | `(;; FIXME: tests fail because junit runs | |
5223 | ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem | |
5224 | ;; to describe a test at all. | |
5225 | #:tests? #f | |
5226 | #:jar-name "cglib.jar" | |
5227 | #:phases | |
5228 | (modify-phases %standard-phases | |
5229 | (add-after 'unpack 'chdir | |
5230 | (lambda _ (chdir "cglib") #t))))) | |
5231 | (inputs | |
5232 | `(("java-asm" ,java-asm) | |
5233 | ("java-junit" ,java-junit))) | |
5234 | (home-page "https://github.com/cglib/cglib/") | |
5235 | (synopsis "Java byte code generation library") | |
5236 | (description "The byte code generation library CGLIB is a high level API | |
5237 | to generate and transform Java byte code.") | |
5238 | (license license:asl2.0))) | |
33e34bfe RW |
5239 | |
5240 | (define-public java-objenesis | |
5241 | (package | |
5242 | (name "java-objenesis") | |
5243 | (version "2.5.1") | |
5244 | (source (origin | |
3dc7a8ce EF |
5245 | (method git-fetch) |
5246 | (uri (git-reference | |
5247 | (url "https://github.com/easymock/objenesis") | |
5248 | (commit version))) | |
5249 | (file-name (git-file-name name version)) | |
33e34bfe RW |
5250 | (sha256 |
5251 | (base32 | |
3dc7a8ce | 5252 | "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya")))) |
33e34bfe RW |
5253 | (build-system ant-build-system) |
5254 | (arguments | |
5255 | `(#:jar-name "objenesis.jar" | |
5256 | #:source-dir "main/src/" | |
5257 | #:test-dir "main/src/test/")) | |
5258 | (native-inputs | |
5259 | `(("java-junit" ,java-junit) | |
5260 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
5261 | (home-page "http://objenesis.org/") | |
5262 | (synopsis "Bypass the constructor when creating an object") | |
5263 | (description "Objenesis is a small Java library that serves one purpose: | |
5264 | to instantiate a new object of a particular class. It is common to see | |
5265 | restrictions in libraries stating that classes must require a default | |
5266 | constructor. Objenesis aims to overcome these restrictions by bypassing the | |
5267 | constructor on object instantiation.") | |
5268 | (license license:asl2.0))) | |
ae589876 RW |
5269 | |
5270 | (define-public java-easymock | |
5271 | (package | |
5272 | (name "java-easymock") | |
5273 | (version "3.4") | |
5274 | (source (origin | |
7cf90f64 EF |
5275 | (method git-fetch) |
5276 | (uri (git-reference | |
5277 | (url "https://github.com/easymock/easymock/") | |
5278 | (commit (string-append "easymock-" version)))) | |
5279 | (file-name (git-file-name name version)) | |
ae589876 RW |
5280 | (sha256 |
5281 | (base32 | |
7cf90f64 | 5282 | "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq")))) |
ae589876 RW |
5283 | (build-system ant-build-system) |
5284 | (arguments | |
5285 | `(#:jar-name "easymock.jar" | |
5286 | #:source-dir "core/src/main" | |
5287 | #:test-dir "core/src/test" | |
5288 | #:phases | |
5289 | (modify-phases %standard-phases | |
5290 | ;; FIXME: Android support requires the following packages to be | |
5291 | ;; available: com.google.dexmaker.stock.ProxyBuilder | |
5292 | (add-after 'unpack 'delete-android-support | |
5293 | (lambda _ | |
5294 | (with-directory-excursion "core/src/main/java/org/easymock/internal" | |
5295 | (substitute* "MocksControl.java" | |
5296 | (("AndroidSupport.isAndroid\\(\\)") "false") | |
5297 | (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") "")) | |
5298 | (delete-file "AndroidClassProxyFactory.java")) | |
5299 | #t)) | |
5300 | (add-after 'unpack 'delete-broken-tests | |
5301 | (lambda _ | |
5302 | (with-directory-excursion "core/src/test/java/org/easymock" | |
5303 | ;; This test depends on dexmaker. | |
5304 | (delete-file "tests2/ClassExtensionHelperTest.java") | |
5305 | ||
5306 | ;; This is not a test. | |
5307 | (delete-file "tests/BaseEasyMockRunnerTest.java") | |
5308 | ||
5309 | ;; This test should be executed with a different runner... | |
5310 | (delete-file "tests2/EasyMockAnnotationsTest.java") | |
5311 | ;; ...but deleting it means that we also have to delete these | |
5312 | ;; dependent files. | |
5313 | (delete-file "tests2/EasyMockRunnerTest.java") | |
5314 | (delete-file "tests2/EasyMockRuleTest.java") | |
5315 | ||
5316 | ;; This test fails because the file "easymock.properties" does | |
5317 | ;; not exist. | |
5318 | (delete-file "tests2/EasyMockPropertiesTest.java")) | |
5319 | #t))))) | |
5320 | (inputs | |
5321 | `(("java-asm" ,java-asm) | |
5322 | ("java-cglib" ,java-cglib) | |
5323 | ("java-objenesis" ,java-objenesis))) | |
5324 | (native-inputs | |
5325 | `(("java-junit" ,java-junit) | |
5326 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
7cf90f64 | 5327 | (home-page "https://easymock.org/") |
ae589876 RW |
5328 | (synopsis "Java library providing mock objects for unit tests") |
5329 | (description "EasyMock is a Java library that provides an easy way to use | |
5330 | mock objects in unit testing.") | |
5331 | (license license:asl2.0))) | |
7aa37023 | 5332 | |
f12ad6c7 RW |
5333 | (define-public java-jmock-1 |
5334 | (package | |
5335 | (name "java-jmock") | |
5336 | (version "1.2.0") | |
5337 | (source (origin | |
7cf26f24 EF |
5338 | (method git-fetch) |
5339 | (uri (git-reference | |
5340 | (url "https://github.com/jmock-developers/jmock-library") | |
5341 | (commit version))) | |
5342 | (file-name (git-file-name name version)) | |
f12ad6c7 RW |
5343 | (sha256 |
5344 | (base32 | |
7cf26f24 | 5345 | "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z")))) |
f12ad6c7 RW |
5346 | (build-system ant-build-system) |
5347 | (arguments | |
5348 | `(#:build-target "jars" | |
5349 | #:test-target "run.tests" | |
5350 | #:phases | |
5351 | (modify-phases %standard-phases | |
5352 | (replace 'install (install-jars "build"))))) | |
7cf26f24 | 5353 | (home-page "http://jmock.org/") |
f12ad6c7 RW |
5354 | (synopsis "Mock object library for test-driven development") |
5355 | (description "JMock is a library that supports test-driven development of | |
5356 | Java code with mock objects. Mock objects help you design and test the | |
5357 | interactions between the objects in your programs. | |
5358 | ||
5359 | The jMock library | |
5360 | ||
5361 | @itemize | |
5362 | @item makes it quick and easy to define mock objects | |
5363 | @item lets you precisely specify the interactions between | |
5364 | your objects, reducing the brittleness of your tests | |
5365 | @item plugs into your favourite test framework | |
5366 | @item is easy to extend. | |
5367 | @end itemize\n") | |
5368 | (license license:bsd-3))) | |
5369 | ||
045124ae JL |
5370 | (define-public java-jmock |
5371 | (package | |
5372 | (inherit java-jmock-1) | |
5373 | (name "java-jmock") | |
5374 | (version "2.8.2") | |
5375 | (source (origin | |
242af295 EF |
5376 | (method git-fetch) |
5377 | (uri (git-reference | |
5378 | (url "https://github.com/jmock-developers/jmock-library") | |
5379 | (commit version))) | |
5380 | (file-name (git-file-name name version)) | |
045124ae JL |
5381 | (sha256 |
5382 | (base32 | |
242af295 | 5383 | "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6")))) |
045124ae JL |
5384 | (inputs |
5385 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
5386 | ("java-asm" ,java-asm) | |
5387 | ("java-bsh" ,java-bsh) | |
5388 | ("java-junit" ,java-junit))) | |
5389 | (native-inputs | |
5390 | `(("cglib" ,java-cglib))) | |
5391 | (arguments | |
5392 | `(#:jar-name "java-jmock.jar" | |
5393 | #:source-dir "jmock/src/main/java" | |
5394 | #:test-dir "jmock/src/test")))) | |
5395 | ||
25436c6d JL |
5396 | (define-public java-jmock-junit4 |
5397 | (package | |
5398 | (inherit java-jmock) | |
5399 | (name "java-jmock-junit4") | |
5400 | (arguments | |
5401 | `(#:jar-name "java-jmock-junit4.jar" | |
5402 | #:source-dir "jmock-junit4/src/main/java" | |
5403 | #:test-dir "jmock-junit4/src/test")) | |
5404 | (inputs | |
5405 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
5406 | ("java-asm" ,java-asm) | |
5407 | ("java-bsh" ,java-bsh) | |
5408 | ("java-jmock" ,java-jmock) | |
5409 | ("java-jumit" ,java-junit))))) | |
5410 | ||
e84b899d JL |
5411 | (define-public java-jmock-legacy |
5412 | (package | |
5413 | (inherit java-jmock) | |
5414 | (name "java-jmock-legacy") | |
5415 | (arguments | |
5416 | `(#:jar-name "java-jmock-legacy.jar" | |
5417 | #:source-dir "jmock-legacy/src/main/java" | |
5418 | #:test-dir "jmock-legacy/src/test" | |
5419 | #:phases | |
5420 | (modify-phases %standard-phases | |
5421 | (add-before 'check 'copy-tests | |
5422 | (lambda _ | |
5423 | ;; This file is a dependancy of some tests | |
5424 | (let ((file "org/jmock/test/acceptance/PackageProtectedType.java")) | |
5425 | (copy-file (string-append "jmock/src/test/java/" file) | |
5426 | (string-append "jmock-legacy/src/test/java/" file)) | |
5427 | #t)))))) | |
5428 | (inputs | |
5429 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
5430 | ("java-objenesis" ,java-objenesis) | |
5431 | ("java-cglib" ,java-cglib) | |
5432 | ("java-jmock" ,java-jmock) | |
5433 | ("java-asm" ,java-asm) | |
5434 | ("java-bsh" ,java-bsh) | |
5435 | ("java-junit" ,java-junit))) | |
5436 | (native-inputs | |
5437 | `(("java-jmock-junit4" ,java-jmock-junit4))))) | |
5438 | ||
439c59da RW |
5439 | (define-public java-hamcrest-all |
5440 | (package (inherit java-hamcrest-core) | |
5441 | (name "java-hamcrest-all") | |
5442 | (arguments | |
bfc007e1 RW |
5443 | `(#:jdk ,icedtea-8 |
5444 | ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core) | |
5445 | ((#:build-target _) "bigjar") | |
5446 | ((#:phases phases) | |
5447 | `(modify-phases ,phases | |
5448 | ;; Some build targets override the classpath, so we need to patch | |
5449 | ;; the build.xml to ensure that required dependencies are on the | |
5450 | ;; classpath. | |
5451 | (add-after 'unpack 'patch-classpath-for-integration | |
5452 | (lambda* (#:key inputs #:allow-other-keys) | |
5453 | (substitute* "build.xml" | |
5454 | ((" build/hamcrest-library-\\$\\{version\\}.jar" line) | |
5455 | (string-join | |
5456 | (cons line | |
5457 | (append | |
5458 | (find-files (assoc-ref inputs "java-junit") "\\.jar$") | |
5459 | (find-files (assoc-ref inputs "java-jmock") "\\.jar$") | |
5460 | (find-files (assoc-ref inputs "java-easymock") "\\.jar$"))) | |
2cc63e6f RW |
5461 | ";")) |
5462 | (("build/hamcrest-core-\\$\\{version\\}\\.jar") | |
fff4fcc4 JL |
5463 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
5464 | "jar$")))) | |
5465 | #t)) | |
5466 | (replace 'install | |
5467 | (lambda* (#:key outputs #:allow-other-keys) | |
5468 | (let* ((target (string-append (assoc-ref outputs "out") | |
5469 | "/share/java/")) | |
5470 | (version-suffix | |
5471 | ,(string-append | |
5472 | "-" (package-version java-hamcrest-core) ".jar")) | |
5473 | (install-without-version-suffix | |
5474 | (lambda (jar) | |
5475 | (copy-file jar | |
5476 | (string-append target | |
5477 | (basename jar version-suffix) | |
5478 | ".jar"))))) | |
5479 | (mkdir-p target) | |
5480 | (for-each | |
5481 | install-without-version-suffix | |
5482 | (find-files "build" | |
5483 | (lambda (name _) | |
5484 | (and (string-suffix? ".jar" name) | |
5485 | (not (string-suffix? "-sources.jar" name))))))) | |
bfc007e1 | 5486 | #t))))))) |
439c59da RW |
5487 | (inputs |
5488 | `(("java-junit" ,java-junit) | |
5489 | ("java-jmock" ,java-jmock-1) | |
2cc63e6f RW |
5490 | ;; This is necessary because of what seems to be a race condition. |
5491 | ;; This package would sometimes fail to build because hamcrest-core.jar | |
5492 | ;; could not be found, even though it is built as part of this package. | |
5493 | ;; Adding java-hamcrest-core appears to fix this problem. See | |
5494 | ;; https://debbugs.gnu.org/31390 for more information. | |
5495 | ("java-hamcrest-core" ,java-hamcrest-core) | |
439c59da | 5496 | ("java-easymock" ,java-easymock) |
439c59da RW |
5497 | ,@(package-inputs java-hamcrest-core))))) |
5498 | ||
7aa37023 RW |
5499 | (define-public java-jopt-simple |
5500 | (package | |
5501 | (name "java-jopt-simple") | |
5502 | (version "5.0.3") | |
5503 | (source (origin | |
5504 | (method url-fetch) | |
5505 | (uri (string-append "http://repo1.maven.org/maven2/" | |
5506 | "net/sf/jopt-simple/jopt-simple/" | |
5507 | version "/jopt-simple-" | |
5508 | version "-sources.jar")) | |
5509 | (sha256 | |
5510 | (base32 | |
5511 | "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa")))) | |
5512 | (build-system ant-build-system) | |
5513 | (arguments | |
5514 | `(#:tests? #f ; there are no tests | |
5515 | #:jar-name "jopt-simple.jar")) | |
5516 | (home-page "https://pholser.github.io/jopt-simple/") | |
5517 | (synopsis "Java library for parsing command line options") | |
5518 | (description "JOpt Simple is a Java library for parsing command line | |
5519 | options, such as those you might pass to an invocation of @code{javac}. In | |
5520 | the interest of striving for simplicity, as closely as possible JOpt Simple | |
5521 | attempts to honor the command line option syntaxes of POSIX @code{getopt} and | |
5522 | GNU @code{getopt_long}. It also aims to make option parser configuration and | |
5523 | retrieval of options and their arguments simple and expressive, without being | |
5524 | overly clever.") | |
5525 | (license license:expat))) | |
840969e8 RW |
5526 | |
5527 | (define-public java-commons-math3 | |
5528 | (package | |
5529 | (name "java-commons-math3") | |
5530 | (version "3.6.1") | |
5531 | (source (origin | |
5532 | (method url-fetch) | |
5533 | (uri (string-append "mirror://apache/commons/math/source/" | |
5534 | "commons-math3-" version "-src.tar.gz")) | |
5535 | (sha256 | |
5536 | (base32 | |
5537 | "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6")))) | |
5538 | (build-system ant-build-system) | |
5539 | (arguments | |
5540 | `(#:build-target "jar" | |
5541 | #:test-target "test" | |
5542 | #:make-flags | |
5543 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
5544 | (junit (assoc-ref %build-inputs "java-junit"))) | |
fff4fcc4 JL |
5545 | (list (string-append "-Djunit.jar=" |
5546 | (car (find-files junit "jar$"))) | |
5547 | (string-append "-Dhamcrest.jar=" | |
5548 | (car (find-files hamcrest ".*.jar$"))))) | |
840969e8 RW |
5549 | #:phases |
5550 | (modify-phases %standard-phases | |
5551 | ;; We want to build the jar in the build phase and run the tests | |
5552 | ;; later in a separate phase. | |
5553 | (add-after 'unpack 'untangle-targets | |
5554 | (lambda _ | |
5555 | (substitute* "build.xml" | |
5556 | (("name=\"jar\" depends=\"test\"") | |
5557 | "name=\"jar\" depends=\"compile\"")) | |
5558 | #t)) | |
5559 | ;; There is no install target. | |
5560 | (replace 'install | |
5561 | (install-jars "target"))))) | |
5562 | (native-inputs | |
5563 | `(("java-junit" ,java-junit) | |
5564 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4f236f84 | 5565 | (home-page "https://commons.apache.org/math/") |
840969e8 RW |
5566 | (synopsis "Apache Commons mathematics library") |
5567 | (description "Commons Math is a library of lightweight, self-contained | |
5568 | mathematics and statistics components addressing the most common problems not | |
5569 | available in the Java programming language or Commons Lang.") | |
5570 | (license license:asl2.0))) | |
62c9bfaa RW |
5571 | |
5572 | (define-public java-jmh | |
5573 | (package | |
5574 | (name "java-jmh") | |
5575 | (version "1.17.5") | |
5576 | (source (origin | |
5577 | (method hg-fetch) | |
5578 | (uri (hg-reference | |
5579 | (url "http://hg.openjdk.java.net/code-tools/jmh/") | |
5580 | (changeset version))) | |
5581 | (file-name (string-append name "-" version "-checkout")) | |
5582 | (sha256 | |
5583 | (base32 | |
5584 | "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084")))) | |
5585 | (build-system ant-build-system) | |
5586 | (arguments | |
5587 | `(#:jar-name "jmh-core.jar" | |
5588 | #:source-dir "jmh-core/src/main" | |
5589 | #:test-dir "jmh-core/src/test" | |
5590 | #:phases | |
5591 | (modify-phases %standard-phases | |
5592 | ;; This seems to be a bug in the JDK. It may not be necessary in | |
5593 | ;; future versions of the JDK. | |
5594 | (add-after 'unpack 'fix-bug | |
5595 | (lambda _ | |
5596 | (with-directory-excursion | |
5597 | "jmh-core/src/main/java/org/openjdk/jmh/runner/options" | |
5598 | (substitute* '("IntegerValueConverter.java" | |
5599 | "ThreadsValueConverter.java") | |
5600 | (("public Class<Integer> valueType") | |
5601 | "public Class<? extends Integer> valueType"))) | |
5602 | #t))))) | |
5603 | (inputs | |
5604 | `(("java-jopt-simple" ,java-jopt-simple) | |
5605 | ("java-commons-math3" ,java-commons-math3))) | |
5606 | (native-inputs | |
5607 | `(("java-junit" ,java-junit) | |
5608 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
e799400d | 5609 | (home-page "https://openjdk.java.net/projects/code-tools/jmh/") |
62c9bfaa RW |
5610 | (synopsis "Benchmark harness for the JVM") |
5611 | (description "JMH is a Java harness for building, running, and analysing | |
5612 | nano/micro/milli/macro benchmarks written in Java and other languages | |
f4548394 | 5613 | targeting the JVM.") |
62c9bfaa RW |
5614 | ;; GPLv2 only |
5615 | (license license:gpl2))) | |
56ebb4e9 RW |
5616 | |
5617 | (define-public java-commons-collections4 | |
5618 | (package | |
5619 | (name "java-commons-collections4") | |
5620 | (version "4.1") | |
5621 | (source (origin | |
5622 | (method url-fetch) | |
5623 | (uri (string-append "mirror://apache/commons/collections/source/" | |
5624 | "commons-collections4-" version "-src.tar.gz")) | |
5625 | (sha256 | |
5626 | (base32 | |
5627 | "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl")))) | |
5628 | (build-system ant-build-system) | |
5629 | (arguments | |
5630 | `(#:test-target "test" | |
5631 | #:make-flags | |
5632 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
5633 | (junit (assoc-ref %build-inputs "java-junit")) | |
5634 | (easymock (assoc-ref %build-inputs "java-easymock"))) | |
fff4fcc4 JL |
5635 | (list (string-append "-Djunit.jar=" |
5636 | (car (find-files junit "jar$"))) | |
5637 | (string-append "-Dhamcrest.jar=" | |
5638 | (car (find-files hamcrest "jar$"))) | |
56ebb4e9 RW |
5639 | (string-append "-Deasymock.jar=" easymock |
5640 | "/share/java/easymock.jar"))) | |
5641 | #:phases | |
5642 | (modify-phases %standard-phases | |
5643 | (replace 'install | |
5644 | (install-jars "target"))))) | |
5645 | (native-inputs | |
5646 | `(("java-junit" ,java-junit) | |
5647 | ("java-hamcrest-core" ,java-hamcrest-core) | |
5648 | ("java-easymock" ,java-easymock))) | |
21e207d2 | 5649 | (home-page "https://commons.apache.org/collections/") |
56ebb4e9 RW |
5650 | (synopsis "Collections framework") |
5651 | (description "The Java Collections Framework is the recognised standard | |
5652 | for collection handling in Java. Commons-Collections seek to build upon the | |
5653 | JDK classes by providing new interfaces, implementations and utilities. There | |
5654 | are many features, including: | |
5655 | ||
5656 | @itemize | |
5657 | @item @code{Bag} interface for collections that have a number of copies of | |
5658 | each object | |
5659 | @item @code{BidiMap} interface for maps that can be looked up from value to | |
5660 | key as well and key to value | |
5661 | @item @code{MapIterator} interface to provide simple and quick iteration over | |
5662 | maps | |
5663 | @item Transforming decorators that alter each object as it is added to the | |
5664 | collection | |
5665 | @item Composite collections that make multiple collections look like one | |
5666 | @item Ordered maps and sets that retain the order elements are added in, | |
5667 | including an LRU based map | |
5668 | @item Reference map that allows keys and/or values to be garbage collected | |
5669 | under close control | |
5670 | @item Many comparator implementations | |
5671 | @item Many iterator implementations | |
5672 | @item Adapter classes from array and enumerations to collections | |
5673 | @item Utilities to test or create typical set-theory properties of collections | |
5674 | such as union, intersection, and closure. | |
5675 | @end itemize\n") | |
5676 | (license license:asl2.0))) | |
6af63e65 | 5677 | |
229a9864 JL |
5678 | (define-public java-commons-collections |
5679 | (package | |
5680 | (inherit java-commons-collections4) | |
5681 | (name "java-commons-collections") | |
5682 | (version "3.2.2") | |
5683 | (source (origin | |
5684 | (method url-fetch) | |
5685 | (uri (string-append "mirror://apache/commons/collections/source/" | |
5686 | "commons-collections-" version "-src.tar.gz")) | |
5687 | (sha256 | |
5688 | (base32 | |
7c7323e4 GB |
5689 | "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387")) |
5690 | (patches | |
5691 | (search-patches "java-commons-collections-fix-java8.patch")))) | |
229a9864 JL |
5692 | (arguments |
5693 | (substitute-keyword-arguments (package-arguments java-commons-collections4) | |
5694 | ((#:phases phases) | |
5695 | `(modify-phases ,phases | |
5696 | ;; The manifest is required by the build procedure | |
5697 | (add-before 'build 'add-manifest | |
5698 | (lambda _ | |
5699 | (mkdir-p "build/conf") | |
5700 | (call-with-output-file "build/conf/MANIFEST.MF" | |
5701 | (lambda (file) | |
2c8ac364 MW |
5702 | (format file "Manifest-Version: 1.0\n"))) |
5703 | #t)) | |
229a9864 JL |
5704 | (replace 'install |
5705 | (install-jars "build")))))))) | |
5706 | ||
5aa2f3f4 JL |
5707 | (define java-commons-collections-test-classes |
5708 | (package | |
5709 | (inherit java-commons-collections) | |
5710 | (arguments | |
5711 | `(#:jar-name "commons-collections-test-classes.jar" | |
5712 | #:source-dir "src/test" | |
5713 | #:tests? #f)) | |
5714 | (inputs | |
5715 | `(("collection" ,java-commons-collections))))) | |
5716 | ||
5717 | (define-public java-commons-beanutils | |
5718 | (package | |
5719 | (name "java-commons-beanutils") | |
5720 | (version "1.9.3") | |
5721 | (source (origin | |
5722 | (method url-fetch) | |
5723 | (uri (string-append "mirror://apache/commons/beanutils/source/" | |
5724 | "commons-beanutils-" version "-src.tar.gz")) | |
5725 | (sha256 | |
5726 | (base32 | |
5727 | "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk")))) | |
5728 | (build-system ant-build-system) | |
5729 | (arguments | |
5730 | `(#:test-target "test" | |
5731 | #:tests? #f | |
5732 | #:phases | |
5733 | (modify-phases %standard-phases | |
5734 | (replace 'install | |
5735 | (lambda* (#:key outputs #:allow-other-keys) | |
5736 | (rename-file (string-append "dist/commons-beanutils-" ,version | |
5737 | "-SNAPSHOT.jar") | |
5738 | "commons-beanutils.jar") | |
5739 | (install-file "commons-beanutils.jar" | |
5740 | (string-append (assoc-ref outputs "out") "/share/java/")) | |
5741 | #t))))) | |
5742 | (inputs | |
5743 | `(("logging" ,java-commons-logging-minimal) | |
5744 | ("collections" ,java-commons-collections))) | |
5745 | (native-inputs | |
5746 | `(("junit" ,java-junit) | |
5747 | ("collections-test" ,java-commons-collections-test-classes))) | |
4f236f84 | 5748 | (home-page "https://commons.apache.org/beanutils/") |
5aa2f3f4 JL |
5749 | (synopsis "Dynamically set or get properties in Java") |
5750 | (description "BeanUtils provides a simplified interface to reflection and | |
5751 | introspection to set or get dynamically determined properties through their | |
5752 | setter and getter method.") | |
5753 | (license license:asl2.0))) | |
5754 | ||
6af63e65 HG |
5755 | (define-public java-commons-io |
5756 | (package | |
5757 | (name "java-commons-io") | |
5758 | (version "2.5") | |
5759 | (source | |
5760 | (origin | |
5761 | (method url-fetch) | |
5762 | (uri (string-append "mirror://apache/commons/io/source/" | |
5763 | "commons-io-" version "-src.tar.gz")) | |
5764 | (sha256 | |
5765 | (base32 | |
5766 | "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3")))) | |
5767 | (build-system ant-build-system) | |
5768 | (outputs '("out" "doc")) | |
5769 | (arguments | |
5770 | `(#:test-target "test" | |
5771 | #:make-flags | |
5772 | (list (string-append "-Djunit.jar=" | |
fff4fcc4 JL |
5773 | (car (find-files (assoc-ref %build-inputs "java-junit") |
5774 | "jar$")))) | |
6af63e65 HG |
5775 | #:phases |
5776 | (modify-phases %standard-phases | |
5777 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
79265a45 | 5778 | (replace 'install (install-from-pom "pom.xml")) |
6af63e65 HG |
5779 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) |
5780 | (native-inputs | |
5781 | `(("java-junit" ,java-junit) | |
5782 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
79265a45 JL |
5783 | (propagated-inputs |
5784 | `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39))) | |
4f236f84 | 5785 | (home-page "https://commons.apache.org/io/") |
6af63e65 HG |
5786 | (synopsis "Common useful IO related classes") |
5787 | (description "Commons-IO contains utility classes, stream implementations, | |
5788 | file filters and endian classes.") | |
5789 | (license license:asl2.0))) | |
d631b5f3 | 5790 | |
46f9022c DM |
5791 | (define-public java-commons-exec-1.1 |
5792 | (package | |
5793 | (name "java-commons-exec") | |
5794 | (version "1.1") | |
5795 | (source | |
5796 | (origin | |
5797 | (method url-fetch) | |
5798 | (uri (string-append "mirror://apache/commons/exec/source/" | |
5799 | "commons-exec-" version "-src.tar.gz")) | |
5800 | (sha256 | |
5801 | (base32 | |
5802 | "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk")))) | |
5803 | (build-system ant-build-system) | |
5804 | (arguments | |
5805 | `(#:test-target "test" | |
5806 | #:make-flags | |
5807 | (list (string-append "-Dmaven.junit.jar=" | |
fff4fcc4 JL |
5808 | (car (find-files (assoc-ref %build-inputs "java-junit") |
5809 | "jar$")))) | |
46f9022c DM |
5810 | #:phases |
5811 | (modify-phases %standard-phases | |
5812 | (add-before 'build 'delete-network-tests | |
5813 | (lambda _ | |
5814 | (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java") | |
5815 | (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java" | |
5816 | (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") "")) | |
5817 | #t)) | |
5818 | ;; The "build" phase automatically tests. | |
5819 | (delete 'check) | |
5820 | (replace 'install (install-jars "target"))))) | |
5821 | (native-inputs | |
5822 | `(("java-junit" ,java-junit))) | |
31b85761 | 5823 | (home-page "https://commons.apache.org/proper/commons-exec/") |
46f9022c DM |
5824 | (synopsis "Common program execution related classes") |
5825 | (description "Commons-Exec simplifies executing external processes.") | |
5826 | (license license:asl2.0))) | |
5827 | ||
5828 | (define-public java-commons-exec | |
5829 | (package | |
5830 | (inherit java-commons-exec-1.1) | |
5831 | (version "1.3") | |
5832 | (source | |
5833 | (origin | |
5834 | (method url-fetch) | |
5835 | (uri (string-append "mirror://apache/commons/exec/source/" | |
5836 | "commons-exec-" version "-src.tar.gz")) | |
5837 | (sha256 | |
5838 | (base32 | |
5839 | "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv")))) | |
5840 | (arguments | |
5841 | `(#:test-target "test" | |
5842 | #:make-flags | |
5843 | (list (string-append "-Dmaven.junit.jar=" | |
fff4fcc4 JL |
5844 | (car (find-files (assoc-ref %build-inputs "java-junit") |
5845 | "jar$"))) | |
46f9022c DM |
5846 | "-Dmaven.compiler.source=1.7" |
5847 | "-Dmaven.compiler.target=1.7") | |
5848 | #:phases | |
5849 | (modify-phases %standard-phases | |
5850 | (add-before 'build 'delete-network-tests | |
5851 | (lambda* (#:key inputs #:allow-other-keys) | |
5852 | ;; This test hangs indefinitely. | |
5853 | (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java") | |
5854 | (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java" | |
5855 | (("ping -c 10 127.0.0.1") "sleep 10")) | |
5856 | (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java" | |
5857 | (("/bin/ls") "ls")) | |
5858 | (call-with-output-file "src/test/scripts/ping.sh" | |
5859 | (lambda (port) | |
5860 | (format port "#!~a/bin/sh\nsleep $1\n" | |
5861 | (assoc-ref inputs "bash")))) | |
5862 | #t)) | |
5863 | ;; The "build" phase automatically tests. | |
5864 | (delete 'check) | |
5865 | (replace 'install (install-jars "target"))))) | |
5866 | (native-inputs | |
5867 | `(("java-junit" ,java-junit) | |
5868 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
5869 | ||
d631b5f3 HG |
5870 | (define-public java-commons-lang |
5871 | (package | |
5872 | (name "java-commons-lang") | |
5873 | (version "2.6") | |
5874 | (source | |
5875 | (origin | |
5876 | (method url-fetch) | |
5877 | (uri (string-append "mirror://apache/commons/lang/source/" | |
5878 | "commons-lang-" version "-src.tar.gz")) | |
5879 | (sha256 | |
5880 | (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5")))) | |
5881 | (build-system ant-build-system) | |
5882 | (outputs '("out" "doc")) | |
5883 | (arguments | |
5884 | `(#:test-target "test" | |
e5a96113 | 5885 | #:test-exclude (list "**/Abstract*.java" "**/Random*.java") |
d631b5f3 HG |
5886 | #:phases |
5887 | (modify-phases %standard-phases | |
5888 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
5889 | (add-before 'check 'disable-failing-test | |
5890 | (lambda _ | |
5891 | ;; Disable a failing test | |
5892 | (substitute* "src/test/java/org/apache/commons/lang/\ | |
5893 | time/FastDateFormatTest.java" | |
5894 | (("public void testFormat\\(\\)") | |
5895 | "public void disabled_testFormat()")) | |
5896 | #t)) | |
5897 | (replace 'install (install-jars "target")) | |
5898 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) | |
5899 | (native-inputs | |
5900 | `(("java-junit" ,java-junit))) | |
4f236f84 | 5901 | (home-page "https://commons.apache.org/lang/") |
d631b5f3 HG |
5902 | (synopsis "Extension of the java.lang package") |
5903 | (description "The Commons Lang components contains a set of Java classes | |
5904 | that provide helper methods for standard Java classes, especially those found | |
5905 | in the @code{java.lang} package in the Sun JDK. The following classes are | |
5906 | included: | |
5907 | ||
5908 | @itemize | |
5909 | @item StringUtils - Helper for @code{java.lang.String}. | |
5910 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets | |
5911 | of characters such as @code{[a-z]} and @code{[abcdez]}. | |
5912 | @item RandomStringUtils - Helper for creating randomised strings. | |
5913 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. | |
5914 | @item NumberRange - A range of numbers with an upper and lower bound. | |
5915 | @item ObjectUtils - Helper for @code{java.lang.Object}. | |
5916 | @item SerializationUtils - Helper for serializing objects. | |
5917 | @item SystemUtils - Utility class defining the Java system properties. | |
5918 | @item NestedException package - A sub-package for the creation of nested | |
5919 | exceptions. | |
5920 | @item Enum package - A sub-package for the creation of enumerated types. | |
5921 | @item Builder package - A sub-package for the creation of @code{equals}, | |
5922 | @code{hashCode}, @code{compareTo} and @code{toString} methods. | |
5923 | @end itemize\n") | |
5924 | (license license:asl2.0))) | |
82e18864 HG |
5925 | |
5926 | (define-public java-commons-lang3 | |
5927 | (package | |
5928 | (name "java-commons-lang3") | |
b916b638 | 5929 | (version "3.9") |
82e18864 HG |
5930 | (source |
5931 | (origin | |
5932 | (method url-fetch) | |
5933 | (uri (string-append "mirror://apache/commons/lang/source/" | |
5934 | "commons-lang3-" version "-src.tar.gz")) | |
5935 | (sha256 | |
b916b638 | 5936 | (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6")))) |
82e18864 | 5937 | (build-system ant-build-system) |
82e18864 | 5938 | (arguments |
b916b638 JL |
5939 | `(#:jar-name "commons-lang3.jar" |
5940 | #:source-dir "src/main/java" | |
5941 | #:tests? #f; require junit5 | |
82e18864 HG |
5942 | #:phases |
5943 | (modify-phases %standard-phases | |
b916b638 JL |
5944 | (replace 'install (install-from-pom "pom.xml"))))) |
5945 | (propagated-inputs | |
5946 | `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48))) | |
4f236f84 | 5947 | (home-page "https://commons.apache.org/lang/") |
82e18864 HG |
5948 | (synopsis "Extension of the java.lang package") |
5949 | (description "The Commons Lang components contains a set of Java classes | |
5950 | that provide helper methods for standard Java classes, especially those found | |
5951 | in the @code{java.lang} package. The following classes are included: | |
5952 | ||
5953 | @itemize | |
5954 | @item StringUtils - Helper for @code{java.lang.String}. | |
5955 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of | |
5956 | characters such as @code{[a-z]} and @code{[abcdez]}. | |
5957 | @item RandomStringUtils - Helper for creating randomised strings. | |
5958 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. | |
5959 | @item NumberRange - A range of numbers with an upper and lower bound. | |
5960 | @item ObjectUtils - Helper for @code{java.lang.Object}. | |
5961 | @item SerializationUtils - Helper for serializing objects. | |
5962 | @item SystemUtils - Utility class defining the Java system properties. | |
5963 | @item NestedException package - A sub-package for the creation of nested | |
5964 | exceptions. | |
5965 | @item Enum package - A sub-package for the creation of enumerated types. | |
5966 | @item Builder package - A sub-package for the creation of @code{equals}, | |
5967 | @code{hashCode}, @code{compareTo} and @code{toString} methods. | |
5968 | @end itemize\n") | |
5969 | (license license:asl2.0))) | |
1c188f4e | 5970 | |
afb13a10 JL |
5971 | (define-public java-commons-bsf |
5972 | (package | |
5973 | (name "java-commons-bsf") | |
5974 | (version "2.4.0") | |
5975 | (source (origin | |
5976 | (method url-fetch) | |
5977 | (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-" | |
5978 | version ".tar.gz")) | |
5979 | (sha256 | |
5980 | (base32 | |
5981 | "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas")) | |
5982 | (modules '((guix build utils))) | |
5983 | (snippet | |
5984 | '(begin | |
5985 | (for-each delete-file | |
5986 | (find-files "." "\\.jar$")) | |
5987 | #t)))) | |
5988 | (build-system ant-build-system) | |
5989 | (arguments | |
5990 | `(#:build-target "jar" | |
5991 | #:tests? #f; No test file | |
5992 | #:modules ((guix build ant-build-system) | |
5993 | (guix build utils) | |
5994 | (guix build java-utils) | |
5995 | (sxml simple)) | |
5996 | #:phases | |
5997 | (modify-phases %standard-phases | |
5998 | (add-before 'build 'create-properties | |
5999 | (lambda _ | |
6000 | ;; This file is missing from the distribution | |
6001 | (call-with-output-file "build-properties.xml" | |
6002 | (lambda (port) | |
6003 | (sxml->xml | |
6004 | `(project (@ (basedir ".") (name "build-properties") (default "")) | |
6005 | (property (@ (name "project.name") (value "bsf"))) | |
6006 | (property (@ (name "source.level") (value "1.5"))) | |
6007 | (property (@ (name "build.lib") (value "build/jar"))) | |
6008 | (property (@ (name "src.dir") (value "src"))) | |
6009 | (property (@ (name "tests.dir") (value "src/org/apache/bsf/test"))) | |
6010 | (property (@ (name "build.tests") (value "build/test-classes"))) | |
6011 | (property (@ (name "build.dest") (value "build/classes")))) | |
2c8ac364 MW |
6012 | port))) |
6013 | #t)) | |
afb13a10 JL |
6014 | (replace 'install (install-jars "build"))))) |
6015 | (native-inputs | |
6016 | `(("java-junit" ,java-junit))) | |
6017 | (inputs | |
6018 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal))) | |
6019 | (home-page "https://commons.apache.org/proper/commons-bsf") | |
6020 | (synopsis "Bean Scripting Framework") | |
6021 | (description "The Bean Scripting Framework (BSF) is a set of Java classes | |
6022 | which provides scripting language support within Java applications, and access | |
6023 | to Java objects and methods from scripting languages. BSF allows one to write | |
6024 | JSPs in languages other than Java while providing access to the Java class | |
6025 | library. In addition, BSF permits any Java application to be implemented in | |
6026 | part (or dynamically extended) by a language that is embedded within it. This | |
6027 | is achieved by providing an API that permits calling scripting language engines | |
6028 | from within Java, as well as an object registry that exposes Java objects to | |
6029 | these scripting language engines.") | |
6030 | (license license:asl2.0))) | |
6031 | ||
66006fe5 JL |
6032 | (define-public java-commons-jxpath |
6033 | (package | |
6034 | (name "java-commons-jxpath") | |
6035 | (version "1.3") | |
6036 | (source (origin | |
6037 | (method url-fetch) | |
6038 | (uri (string-append "mirror://apache/commons/jxpath/source/" | |
6039 | "commons-jxpath-" version "-src.tar.gz")) | |
6040 | (sha256 | |
6041 | (base32 | |
6042 | "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs")))) | |
6043 | (build-system ant-build-system) | |
6044 | (arguments | |
6045 | `(#:jar-name "commons-jxpath.jar" | |
6046 | ;; tests require more dependencies, including mockrunner which depends on old software | |
6047 | #:tests? #f | |
6048 | #:source-dir "src/java")) | |
6049 | (inputs | |
10eddaca | 6050 | `(("servlet" ,java-classpathx-servletapi) |
66006fe5 JL |
6051 | ("java-jdom" ,java-jdom) |
6052 | ("java-commons-beanutils" ,java-commons-beanutils))) | |
6053 | (native-inputs | |
6054 | `(("java-junit" ,java-junit))) | |
4f236f84 | 6055 | (home-page "https://commons.apache.org/jxpath/") |
66006fe5 JL |
6056 | (synopsis "Simple interpreter of an expression language called XPath.") |
6057 | (description "The org.apache.commons.jxpath package defines a simple | |
6058 | interpreter of an expression language called XPath. JXPath applies XPath | |
6059 | expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet | |
6060 | contexts, DOM etc, including mixtures thereof.") | |
6061 | (license license:asl2.0))) | |
6062 | ||
b635d272 JL |
6063 | (define-public java-commons-pool |
6064 | (package | |
6065 | (name "java-commons-pool") | |
6066 | (version "2.6.2") | |
6067 | (source (origin | |
6068 | (method url-fetch) | |
6069 | (uri (string-append "mirror://apache/commons/pool/source/" | |
6070 | "commons-pool2-" version "-src.tar.gz")) | |
6071 | (sha256 | |
6072 | (base32 | |
6073 | "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6")))) | |
6074 | (arguments | |
6075 | `(#:jar-name "common-pool.jar" | |
6076 | #:source-dir "src/main/java" | |
6077 | #:test-exclude | |
6078 | (list "**/PerformanceTest.java"))) | |
6079 | (build-system ant-build-system) | |
6080 | (inputs | |
6081 | `(("java-cglib" ,java-cglib))) | |
6082 | (native-inputs | |
6083 | `(("java-junit" ,java-junit) | |
6084 | ("java-hamcrest-core" ,java-hamcrest-core) | |
6085 | ("java-asm" ,java-asm) | |
6086 | ("java-objenesis" ,java-objenesis))) | |
6087 | (home-page "https://commons.apache.org/proper/commons-pool/") | |
6088 | (synopsis "Object-pooling API in Java") | |
6089 | (description "The commons-pool package provides an object-pooling API | |
6090 | and a number of object pool implementations. This package defines a | |
6091 | handful of pooling interfaces and some base classes that may be useful when | |
6092 | creating new pool implementations.") | |
6093 | (license license:asl2.0))) | |
6094 | ||
f31ea164 JL |
6095 | (define-public java-commons-dbcp |
6096 | (package | |
6097 | (name "java-commons-dbcp") | |
6098 | (version "2.6.0") | |
6099 | (source (origin | |
6100 | (method url-fetch) | |
6101 | (uri (string-append "mirror://apache/commons/dbcp/source/" | |
6102 | "commons-dbcp2-" version "-src.tar.gz")) | |
6103 | (sha256 | |
6104 | (base32 | |
6105 | "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc")))) | |
6106 | (arguments | |
6107 | `(#:source-dir "src/main/java" | |
6108 | #:jar-name "java-commons-dbcp.jar" | |
6109 | #:tests? #f)); requires apache-geronimo | |
6110 | (inputs | |
6111 | `(("java-commons-pool" ,java-commons-pool) | |
6112 | ("java-commons-logging" ,java-commons-logging-minimal) | |
6113 | ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec))) | |
6114 | (native-inputs | |
6115 | `(("java-junit" ,java-junit))) | |
6116 | (build-system ant-build-system) | |
6117 | (home-page "https://commons.apache.org/proper/commons-dbcp/") | |
6118 | (synopsis "Database Connection Pool for Java") | |
6119 | (description "Commons-dbcp allows you to share a pool of database | |
6120 | connections between users. Creating a new connection for each user can be | |
6121 | time consuming and even unfeasible when the number of simultaneous users is | |
6122 | very large. This package provides a way to share a poole of connections to | |
6123 | reduce that load.") | |
6124 | (license license:asl2.0))) | |
6125 | ||
934b83e4 JL |
6126 | (define-public java-commons-jcs |
6127 | (package | |
6128 | (name "java-commons-jcs") | |
6129 | (version "2.2.1") | |
6130 | (source (origin | |
6131 | (method url-fetch) | |
6132 | (uri (string-append "mirror://apache/commons/jcs/source/" | |
6133 | "commons-jcs-dist-" version "-src.tar.gz")) | |
6134 | (sha256 | |
6135 | (base32 | |
6136 | "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q")))) | |
6137 | (build-system ant-build-system) | |
6138 | (arguments | |
6139 | `(#:jar-name "commons-jcs.jar" | |
6140 | #:source-dir "commons-jcs-core/src/main/java" | |
6141 | #:test-dir "commons-jcs-core/src/test" | |
6142 | #:tests? #f; requires hsqldb | |
6143 | #:phases | |
6144 | (modify-phases %standard-phases | |
6145 | (add-before 'build 'prepare | |
6146 | (lambda _ | |
6147 | (with-directory-excursion | |
6148 | "commons-jcs-core/src/main/java/org/apache/commons/jcs" | |
6149 | (substitute* | |
6150 | "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java" | |
6151 | (("commons.dbcp") "commons.dbcp2") | |
6152 | ((".*\\.setMaxActive.*") "")) | |
6153 | ;;; Remove dependency on velocity-tools | |
6154 | (delete-file "admin/servlet/JCSAdminServlet.java")) | |
6155 | #t))))) | |
6156 | (propagated-inputs | |
6157 | `(("java-classpathx-servletapi" ,java-classpathx-servletapi) | |
6158 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
6159 | ("java-commons-httpclient" ,java-commons-httpclient) | |
6160 | ("java-commons-dbcp" ,java-commons-dbcp))) | |
6161 | (native-inputs | |
6162 | `(("java-junit" ,java-junit))) | |
6163 | (home-page "https://commons.apache.org/proper/commons-jcs/") | |
6164 | (synopsis "Distributed caching system in Java") | |
6165 | (description "JCS is a distributed caching system written in Java. It | |
6166 | is intended to speed up applications by providing a means to manage cached | |
6167 | data of various dynamic natures. Like any caching system, JCS is most useful | |
6168 | for high read, low put applications. Latency times drop sharply and | |
6169 | bottlenecks move away from the database in an effectively cached system.") | |
6170 | (license license:asl2.0))) | |
6171 | ||
a1a5ef20 JL |
6172 | (define-public java-jsr250 |
6173 | (package | |
6174 | (name "java-jsr250") | |
6175 | (version "1.3") | |
6176 | (source (origin | |
6177 | (method url-fetch) | |
6178 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6179 | "javax/annotation/javax.annotation-api/" | |
6180 | version "/javax.annotation-api-" | |
6181 | version "-sources.jar")) | |
6182 | (sha256 | |
6183 | (base32 | |
6184 | "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz")))) | |
6185 | (build-system ant-build-system) | |
6186 | (arguments | |
6187 | `(#:tests? #f ; no tests included | |
6188 | #:jdk ,icedtea-8 | |
51087d51 JL |
6189 | #:jar-name "jsr250.jar" |
6190 | #:modules ((guix build ant-build-system) | |
6191 | (guix build utils) | |
6192 | (guix build maven pom) | |
6193 | (guix build java-utils) | |
6194 | (sxml simple)) | |
6195 | #:phases | |
6196 | (modify-phases %standard-phases | |
6197 | (add-before 'install 'create-pom | |
6198 | (lambda _ | |
6199 | (with-output-to-file "pom.xml" | |
6200 | (lambda _ | |
6201 | (sxml->xml | |
6202 | `((project | |
6203 | (modelVersion "4.0.0") | |
6204 | (name "jsr250") | |
6205 | (groupId "javax.annotation") | |
6206 | (artifactId "jsr250-api") | |
6207 | (version ,,version)))))) | |
6208 | #t)) | |
6209 | (replace 'install | |
6210 | (install-from-pom "pom.xml"))))) | |
a1a5ef20 JL |
6211 | (home-page "https://jcp.org/en/jsr/detail?id=250") |
6212 | (synopsis "Security-related annotations") | |
6213 | (description "This package provides annotations for security. It provides | |
6214 | packages in the @code{javax.annotation} and @code{javax.annotation.security} | |
6215 | namespaces.") | |
6216 | ;; either cddl or gpl2 only, with classpath exception | |
6217 | (license (list license:cddl1.0 | |
6218 | license:gpl2)))) | |
6219 | ||
0d4a0d60 RW |
6220 | (define-public java-jsr305 |
6221 | (package | |
6222 | (name "java-jsr305") | |
6223 | (version "3.0.1") | |
6224 | (source (origin | |
6225 | (method url-fetch) | |
6226 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6227 | "com/google/code/findbugs/" | |
6228 | "jsr305/" version "/jsr305-" | |
6229 | version "-sources.jar")) | |
6230 | (sha256 | |
6231 | (base32 | |
6232 | "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n")))) | |
6233 | (build-system ant-build-system) | |
6234 | (arguments | |
6235 | `(#:tests? #f ; no tests included | |
79265a45 JL |
6236 | #:jar-name "jsr305.jar" |
6237 | #:modules ((guix build ant-build-system) | |
6238 | (guix build java-utils) | |
6239 | (guix build maven pom) | |
6240 | (guix build utils) | |
6241 | (sxml simple)) | |
6242 | #:phases | |
6243 | (modify-phases %standard-phases | |
6244 | (add-before 'install 'create-pom | |
6245 | (lambda _ | |
6246 | (with-output-to-file "pom.xml" | |
6247 | (lambda _ | |
6248 | (sxml->xml | |
6249 | `((project | |
6250 | (modelVersion "4.0.0") | |
6251 | (name "jsr305") | |
6252 | (groupId "com.google.code.findbugs") | |
6253 | (artifactId "jsr305") | |
6254 | (version ,,version)))))) | |
6255 | #t)) | |
6256 | (replace 'install | |
6257 | (install-from-pom "pom.xml"))))) | |
0d4a0d60 RW |
6258 | (home-page "http://findbugs.sourceforge.net/") |
6259 | (synopsis "Annotations for the static analyzer called findbugs") | |
6260 | (description "This package provides annotations for the findbugs package. | |
6261 | It provides packages in the @code{javax.annotations} namespace.") | |
6262 | (license license:asl2.0))) | |
6263 | ||
4f3e47ea RW |
6264 | (define-public java-guava |
6265 | (package | |
6266 | (name "java-guava") | |
6267 | ;; This is the last release of Guava that can be built with Java 7. | |
6268 | (version "20.0") | |
6269 | (source (origin | |
02ed96dc JL |
6270 | (method git-fetch) |
6271 | (uri (git-reference | |
6272 | (url "https://github.com/google/guava/") | |
6273 | (commit (string-append "v" version)))) | |
2be973c3 | 6274 | (file-name (git-file-name name version)) |
4f3e47ea RW |
6275 | (sha256 |
6276 | (base32 | |
02ed96dc | 6277 | "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp")))) |
4f3e47ea RW |
6278 | (build-system ant-build-system) |
6279 | (arguments | |
6280 | `(#:tests? #f ; no tests included | |
6281 | #:jar-name "guava.jar" | |
02ed96dc | 6282 | #:source-dir "guava/src" |
4f3e47ea RW |
6283 | #:phases |
6284 | (modify-phases %standard-phases | |
6285 | (add-after 'unpack 'trim-sources | |
6286 | (lambda _ | |
02ed96dc | 6287 | (with-directory-excursion "guava/src/com/google/common" |
4f3e47ea RW |
6288 | ;; Remove annotations to avoid extra dependencies: |
6289 | ;; * "j2objc" annotations are used when converting Java to | |
6290 | ;; Objective C; | |
6291 | ;; * "errorprone" annotations catch common Java mistakes at | |
6292 | ;; compile time; | |
6293 | ;; * "IgnoreJRERequirement" is used for Android. | |
6294 | (substitute* (find-files "." "\\.java$") | |
6295 | (("import com.google.j2objc.*") "") | |
6296 | (("import com.google.errorprone.annotation.*") "") | |
6297 | (("import org.codehaus.mojo.animal_sniffer.*") "") | |
6298 | (("@CanIgnoreReturnValue") "") | |
6299 | (("@LazyInit") "") | |
6300 | (("@WeakOuter") "") | |
6301 | (("@RetainedWith") "") | |
6302 | (("@Weak") "") | |
6303 | (("@ForOverride") "") | |
6304 | (("@J2ObjCIncompatible") "") | |
6305 | (("@IgnoreJRERequirement") ""))) | |
02ed96dc JL |
6306 | #t)) |
6307 | (replace 'install (install-from-pom "guava/pom.xml"))))) | |
4f3e47ea RW |
6308 | (inputs |
6309 | `(("java-jsr305" ,java-jsr305))) | |
02ed96dc JL |
6310 | (propagated-inputs |
6311 | `(("java-guava-parent-pom" ,java-guava-parent-pom))) | |
4f3e47ea RW |
6312 | (home-page "https://github.com/google/guava") |
6313 | (synopsis "Google core libraries for Java") | |
6314 | (description "Guava is a set of core libraries that includes new | |
6315 | collection types (such as multimap and multiset), immutable collections, a | |
6316 | graph library, functional types, an in-memory cache, and APIs/utilities for | |
6317 | concurrency, I/O, hashing, primitives, reflection, string processing, and much | |
6318 | more!") | |
6319 | (license license:asl2.0))) | |
6320 | ||
02ed96dc JL |
6321 | (define java-guava-parent-pom |
6322 | (package | |
6323 | (inherit java-guava) | |
6324 | (name "java-guava-parent-pom") | |
6325 | (arguments | |
6326 | `(#:tests? #f | |
6327 | #:phases | |
6328 | (modify-phases %standard-phases | |
6329 | (delete 'configure) | |
6330 | (delete 'build) | |
6331 | (replace 'install | |
6332 | (install-pom-file "pom.xml"))))) | |
6333 | (propagated-inputs | |
6334 | `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7))))) | |
6335 | ||
af8f8281 RW |
6336 | ;; The java-commons-logging package provides adapters to many different |
6337 | ;; logging frameworks. To avoid an excessive dependency graph we try to build | |
6338 | ;; it with only a minimal set of adapters. | |
6339 | (define-public java-commons-logging-minimal | |
6340 | (package | |
6341 | (name "java-commons-logging-minimal") | |
6342 | (version "1.2") | |
6343 | (source (origin | |
6344 | (method url-fetch) | |
6345 | (uri (string-append "mirror://apache/commons/logging/source/" | |
6346 | "commons-logging-" version "-src.tar.gz")) | |
6347 | (sha256 | |
6348 | (base32 | |
6349 | "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9")))) | |
6350 | (build-system ant-build-system) | |
6351 | (arguments | |
6352 | `(#:tests? #f ; avoid dependency on logging frameworks | |
6353 | #:jar-name "commons-logging-minimal.jar" | |
6354 | #:phases | |
6355 | (modify-phases %standard-phases | |
6356 | (add-after 'unpack 'delete-adapters-and-tests | |
6357 | (lambda _ | |
6358 | ;; Delete all adapters except for NoOpLog, SimpleLog, and | |
6359 | ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl | |
6360 | ;; is used by applications; SimpleLog is the only actually usable | |
6361 | ;; implementation that does not depend on another logging | |
6362 | ;; framework. | |
6363 | (for-each | |
6364 | (lambda (file) | |
6365 | (delete-file (string-append | |
6366 | "src/main/java/org/apache/commons/logging/impl/" file))) | |
6367 | (list "Jdk13LumberjackLogger.java" | |
6368 | "WeakHashtable.java" | |
6369 | "Log4JLogger.java" | |
6370 | "ServletContextCleaner.java" | |
6371 | "Jdk14Logger.java" | |
6372 | "AvalonLogger.java" | |
6373 | "LogKitLogger.java")) | |
6374 | (delete-file-recursively "src/test") | |
6375 | #t))))) | |
4f236f84 | 6376 | (home-page "https://commons.apache.org/logging/") |
af8f8281 RW |
6377 | (synopsis "Common API for logging implementations") |
6378 | (description "The Logging package is a thin bridge between different | |
6379 | logging implementations. A library that uses the commons-logging API can be | |
6380 | used with any logging implementation at runtime.") | |
6381 | (license license:asl2.0))) | |
6382 | ||
90e65abe RW |
6383 | ;; This is the last release of the 1.x series. |
6384 | (define-public java-mockito-1 | |
6385 | (package | |
6386 | (name "java-mockito") | |
6387 | (version "1.10.19") | |
6388 | (source (origin | |
6389 | (method url-fetch) | |
6390 | (uri (string-append "http://repo1.maven.org/maven2/" | |
6391 | "org/mockito/mockito-core/" version | |
6392 | "/mockito-core-" version "-sources.jar")) | |
6393 | (sha256 | |
6394 | (base32 | |
6395 | "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc")))) | |
6396 | (build-system ant-build-system) | |
6397 | (arguments | |
6398 | `(#:jar-name "mockito.jar" | |
6399 | #:tests? #f ; no tests included | |
6400 | ;; FIXME: patch-and-repack does not support jars, so we have to apply | |
6401 | ;; patches in build phases. | |
6402 | #:phases | |
6403 | (modify-phases %standard-phases | |
6404 | ;; Mockito was developed against a different version of hamcrest, | |
6405 | ;; which does not require matcher implementations to provide an | |
6406 | ;; implementation of the "describeMismatch" method. We add this | |
6407 | ;; simple definition to pass the build with our version of hamcrest. | |
6408 | (add-after 'unpack 'fix-hamcrest-build-error | |
6409 | (lambda _ | |
6410 | (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java" | |
6411 | (("public Matcher getActualMatcher\\(\\) .*" line) | |
6412 | (string-append " | |
6413 | public void describeMismatch(Object item, Description description) { | |
6414 | actualMatcher.describeMismatch(item, description); | |
6415 | }" | |
6416 | line))) | |
6417 | #t)) | |
6418 | ;; Mockito bundles cglib. We have a cglib package, so let's use | |
6419 | ;; that instead. | |
6420 | (add-after 'unpack 'use-system-libraries | |
6421 | (lambda _ | |
6422 | (with-directory-excursion "src/org/mockito/internal/creation/cglib" | |
6423 | (substitute* '("CGLIBHacker.java" | |
6424 | "CglibMockMaker.java" | |
6425 | "ClassImposterizer.java" | |
6426 | "DelegatingMockitoMethodProxy.java" | |
6427 | "MethodInterceptorFilter.java" | |
6428 | "MockitoNamingPolicy.java" | |
6429 | "SerializableMockitoMethodProxy.java" | |
6430 | "SerializableNoOp.java") | |
6431 | (("import org.mockito.cglib") "import net.sf.cglib"))) | |
6432 | #t))))) | |
6433 | (inputs | |
6434 | `(("java-junit" ,java-junit) | |
6435 | ("java-objenesis" ,java-objenesis) | |
6436 | ("java-cglib" ,java-cglib) | |
6437 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
6438 | (home-page "http://mockito.org") | |
6439 | (synopsis "Mockito is a mock library for Java") | |
6440 | (description "Mockito is a mocking library for Java which lets you write | |
6441 | tests with a clean and simple API. It generates mocks using reflection, and | |
6442 | it records all mock invocations, including methods arguments.") | |
6443 | (license license:asl2.0))) | |
6444 | ||
4f4d2e47 RW |
6445 | (define-public java-httpcomponents-httpcore |
6446 | (package | |
6447 | (name "java-httpcomponents-httpcore") | |
6448 | (version "4.4.6") | |
6449 | (source (origin | |
6450 | (method url-fetch) | |
6451 | (uri (string-append "mirror://apache//httpcomponents/httpcore/" | |
6452 | "source/httpcomponents-core-" | |
6453 | version "-src.tar.gz")) | |
6454 | (sha256 | |
6455 | (base32 | |
6456 | "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy")))) | |
6457 | (build-system ant-build-system) | |
6458 | (arguments | |
6459 | `(#:jar-name "httpcomponents-httpcore.jar" | |
6460 | #:phases | |
6461 | (modify-phases %standard-phases | |
6462 | (add-after 'unpack 'chdir | |
6463 | (lambda _ (chdir "httpcore") #t))))) | |
6464 | (inputs | |
6465 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
6466 | ("java-commons-lang3" ,java-commons-lang3))) | |
6467 | (native-inputs | |
6468 | `(("java-junit" ,java-junit) | |
6469 | ("java-mockito" ,java-mockito-1))) | |
6470 | (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html") | |
6471 | (synopsis "Low level HTTP transport components") | |
6472 | (description "HttpCore is a set of low level HTTP transport components | |
6473 | that can be used to build custom client and server side HTTP services with a | |
6474 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based | |
6475 | on the classic Java I/O and non-blocking, event driven I/O model based on Java | |
6476 | NIO. | |
6477 | ||
6478 | This package provides the blocking I/O model library.") | |
6479 | (license license:asl2.0))) | |
6480 | ||
3a068b43 RW |
6481 | (define-public java-httpcomponents-httpcore-nio |
6482 | (package (inherit java-httpcomponents-httpcore) | |
6483 | (name "java-httpcomponents-httpcore-nio") | |
6484 | (arguments | |
6485 | `(#:jar-name "httpcomponents-httpcore-nio.jar" | |
6486 | #:phases | |
6487 | (modify-phases %standard-phases | |
6488 | (add-after 'unpack 'chdir | |
6489 | (lambda _ (chdir "httpcore-nio") #t))))) | |
6490 | (inputs | |
6491 | `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
6492 | ("java-hamcrest-core" ,java-hamcrest-core) | |
6493 | ,@(package-inputs java-httpcomponents-httpcore))) | |
6494 | (description "HttpCore is a set of low level HTTP transport components | |
6495 | that can be used to build custom client and server side HTTP services with a | |
6496 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based | |
6497 | on the classic Java I/O and non-blocking, event driven I/O model based on Java | |
6498 | NIO. | |
6499 | ||
6500 | This package provides the non-blocking I/O model library based on Java | |
6501 | NIO."))) | |
6502 | ||
e1dd78f6 RW |
6503 | (define-public java-httpcomponents-httpcore-ab |
6504 | (package (inherit java-httpcomponents-httpcore) | |
6505 | (name "java-httpcomponents-httpcore-ab") | |
6506 | (arguments | |
6507 | `(#:jar-name "httpcomponents-httpcore-ab.jar" | |
6508 | #:phases | |
6509 | (modify-phases %standard-phases | |
6510 | (add-after 'unpack 'chdir | |
6511 | (lambda _ (chdir "httpcore-ab") #t))))) | |
6512 | (inputs | |
6513 | `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
6514 | ("java-commons-cli" ,java-commons-cli) | |
6515 | ("java-hamcrest-core" ,java-hamcrest-core) | |
6516 | ,@(package-inputs java-httpcomponents-httpcore))) | |
6517 | (synopsis "Apache HttpCore benchmarking tool") | |
6518 | (description "This package provides the HttpCore benchmarking tool. It is | |
6519 | an Apache AB clone based on HttpCore."))) | |
6520 | ||
14a671d8 RW |
6521 | (define-public java-httpcomponents-httpclient |
6522 | (package | |
6523 | (name "java-httpcomponents-httpclient") | |
968bb682 | 6524 | (version "4.5.12") |
14a671d8 RW |
6525 | (source (origin |
6526 | (method url-fetch) | |
6527 | (uri (string-append "mirror://apache/httpcomponents/httpclient/" | |
6528 | "source/httpcomponents-client-" | |
6529 | version "-src.tar.gz")) | |
6530 | (sha256 | |
6531 | (base32 | |
968bb682 | 6532 | "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb")))) |
14a671d8 RW |
6533 | (build-system ant-build-system) |
6534 | (arguments | |
6535 | `(#:jar-name "httpcomponents-httpclient.jar" | |
6536 | #:phases | |
6537 | (modify-phases %standard-phases | |
6538 | (add-after 'unpack 'chdir | |
6539 | (lambda _ (chdir "httpclient") #t))))) | |
6540 | (inputs | |
6541 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
6542 | ("java-commons-codec" ,java-commons-codec) | |
6543 | ("java-hamcrest-core" ,java-hamcrest-core) | |
6544 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
6545 | ("java-mockito" ,java-mockito-1) | |
6546 | ("java-junit" ,java-junit))) | |
6547 | (home-page "https://hc.apache.org/httpcomponents-client-ga/") | |
6548 | (synopsis "HTTP client library for Java") | |
6549 | (description "Although the @code{java.net} package provides basic | |
6550 | functionality for accessing resources via HTTP, it doesn't provide the full | |
6551 | flexibility or functionality needed by many applications. @code{HttpClient} | |
6552 | seeks to fill this void by providing an efficient, up-to-date, and | |
6553 | feature-rich package implementing the client side of the most recent HTTP | |
6554 | standards and recommendations.") | |
6555 | (license license:asl2.0))) | |
6556 | ||
cbce5de2 RW |
6557 | (define-public java-httpcomponents-httpmime |
6558 | (package (inherit java-httpcomponents-httpclient) | |
6559 | (name "java-httpcomponents-httpmime") | |
6560 | (arguments | |
6561 | `(#:jar-name "httpcomponents-httpmime.jar" | |
6562 | #:phases | |
6563 | (modify-phases %standard-phases | |
6564 | (add-after 'unpack 'chdir | |
6565 | (lambda _ (chdir "httpmime") #t))))) | |
6566 | (inputs | |
6567 | `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) | |
6568 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
6569 | ("java-junit" ,java-junit) | |
6570 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
6571 | ||
4b34c21f RW |
6572 | (define-public java-commons-net |
6573 | (package | |
6574 | (name "java-commons-net") | |
6575 | (version "3.6") | |
6576 | (source (origin | |
6577 | (method url-fetch) | |
6578 | (uri (string-append "mirror://apache/commons/net/source/" | |
6579 | "commons-net-" version "-src.tar.gz")) | |
6580 | (sha256 | |
6581 | (base32 | |
6582 | "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr")))) | |
6583 | (build-system ant-build-system) | |
6584 | (arguments | |
6585 | `(;; FIXME: MainTest.java tries to read "examples.properties" (which | |
6586 | ;; should be "resources/examples/examples.properties"), but gets "null" | |
6587 | ;; instead. | |
6588 | #:tests? #f | |
6589 | #:jar-name "commons-net.jar")) | |
6590 | (native-inputs | |
6591 | `(("java-junit" ,java-junit) | |
6592 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4f236f84 | 6593 | (home-page "https://commons.apache.org/net/") |
4b34c21f RW |
6594 | (synopsis "Client library for many basic Internet protocols") |
6595 | (description "The Apache Commons Net library implements the client side of | |
6596 | many basic Internet protocols. The purpose of the library is to provide | |
6597 | fundamental protocol access, not higher-level abstractions.") | |
6598 | (license license:asl2.0))) | |
6599 | ||
808cb58f RW |
6600 | (define-public java-jsch |
6601 | (package | |
6602 | (name "java-jsch") | |
1c8ba10a | 6603 | (version "0.1.55") |
808cb58f RW |
6604 | (source (origin |
6605 | (method url-fetch) | |
6606 | (uri (string-append "mirror://sourceforge/jsch/jsch/" | |
6607 | version "/jsch-" version ".zip")) | |
6608 | (sha256 | |
6609 | (base32 | |
1c8ba10a | 6610 | "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6")))) |
808cb58f RW |
6611 | (build-system ant-build-system) |
6612 | (arguments | |
6613 | `(#:build-target "dist" | |
1c8ba10a | 6614 | #:tests? #f ; no tests included |
808cb58f RW |
6615 | #:phases |
6616 | (modify-phases %standard-phases | |
6617 | (replace 'install (install-jars "dist"))))) | |
6618 | (native-inputs | |
6619 | `(("unzip" ,unzip))) | |
6620 | (home-page "http://www.jcraft.com/jsch/") | |
6621 | (synopsis "Pure Java implementation of SSH2") | |
6622 | (description "JSch is a pure Java implementation of SSH2. JSch allows you | |
6623 | to connect to an SSH server and use port forwarding, X11 forwarding, file | |
6624 | transfer, etc., and you can integrate its functionality into your own Java | |
6625 | programs.") | |
6626 | (license license:bsd-3))) | |
6627 | ||
a6244698 RW |
6628 | (define-public java-commons-compress |
6629 | (package | |
6630 | (name "java-commons-compress") | |
6631 | (version "1.13") | |
6632 | (source (origin | |
6633 | (method url-fetch) | |
6634 | (uri (string-append "mirror://apache/commons/compress/source/" | |
6635 | "commons-compress-" version "-src.tar.gz")) | |
6636 | (sha256 | |
6637 | (base32 | |
6638 | "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8")))) | |
6639 | (build-system ant-build-system) | |
6640 | (arguments | |
6641 | `(#:jar-name "commons-compress.jar" | |
6642 | #:phases | |
6643 | (modify-phases %standard-phases | |
6644 | (add-after 'unpack 'delete-bad-tests | |
6645 | (lambda _ | |
6646 | (with-directory-excursion "src/test/java/org/apache/commons/compress/" | |
6647 | ;; FIXME: These tests really should not fail. Maybe they are | |
6648 | ;; indicative of problems with our Java packaging work. | |
6649 | ||
6650 | ;; This test fails with a null pointer exception. | |
6651 | (delete-file "archivers/sevenz/SevenZOutputFileTest.java") | |
6652 | ;; This test fails to open test resources. | |
6653 | (delete-file "archivers/zip/ExplodeSupportTest.java") | |
6654 | ||
6655 | ;; FIXME: This test adds a dependency on powermock, which is hard to | |
6656 | ;; package at this point. | |
6657 | ;; https://github.com/powermock/powermock | |
6658 | (delete-file "archivers/sevenz/SevenZNativeHeapTest.java")) | |
02ed96dc JL |
6659 | #t)) |
6660 | (replace 'install (install-from-pom "pom.xml"))))) | |
6661 | (propagated-inputs | |
6662 | `(("java-xz" ,java-xz) | |
6663 | ("apache-commons-parent-pom" ,apache-commons-parent-pom-41))) | |
6664 | (native-inputs | |
a6244698 | 6665 | `(("java-junit" ,java-junit) |
02ed96dc | 6666 | ("java-mockito" ,java-mockito-1))) |
a6244698 RW |
6667 | (home-page "https://commons.apache.org/proper/commons-compress/") |
6668 | (synopsis "Java library for working with compressed files") | |
6669 | (description "The Apache Commons Compress library defines an API for | |
6670 | working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ, | |
6671 | Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.") | |
6672 | (license license:asl2.0))) | |
6673 | ||
51263ff5 JL |
6674 | (define-public java-commons-csv |
6675 | (package | |
6676 | (name "java-commons-csv") | |
6677 | (version "1.4") | |
6678 | (source (origin | |
6679 | (method url-fetch) | |
6680 | (uri (string-append "mirror://apache/commons/csv/source/" | |
6681 | "commons-csv-" version "-src.tar.gz")) | |
6682 | (sha256 | |
6683 | (base32 | |
6684 | "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij")))) | |
6685 | (build-system ant-build-system) | |
6686 | (arguments | |
6687 | `(#:jar-name "commons-csv.jar" | |
6688 | #:source-dir "src/main/java" | |
6689 | #:tests? #f)); FIXME: requires java-h2 | |
6690 | (inputs | |
6691 | `(("java-hamcrest-core" ,java-hamcrest-core) | |
6692 | ("java-commons-io" ,java-commons-io) | |
6693 | ("java-commons-lang3" ,java-commons-lang3) | |
6694 | ("junit" ,java-junit))) | |
6695 | (home-page "https://commons.apache.org/proper/commons-csv/") | |
6696 | (synopsis "Read and write CSV documents") | |
6697 | (description "Commons CSV reads and writes files in variations of the Comma | |
6698 | Separated Value (CSV) format. The most common CSV formats are predefined in the | |
6699 | CSVFormat class: | |
6700 | ||
6701 | @itemize | |
6702 | @item Microsoft Excel | |
6703 | @item Informix UNLOAD | |
6704 | @item Informix UNLOAD CSV | |
6705 | @item MySQL | |
6706 | @item RFC 4180 | |
6707 | @item TDF | |
6708 | @end itemize | |
6709 | ||
6710 | Custom formats can be created using a fluent style API.") | |
6711 | (license license:asl2.0))) | |
6712 | ||
6ee6d0b5 RW |
6713 | (define-public java-osgi-annotation |
6714 | (package | |
6715 | (name "java-osgi-annotation") | |
6716 | (version "6.0.0") | |
6717 | (source (origin | |
6718 | (method url-fetch) | |
6719 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6720 | "org/osgi/org.osgi.annotation/" version "/" | |
6721 | "org.osgi.annotation-" version "-sources.jar")) | |
6722 | (sha256 | |
6723 | (base32 | |
6724 | "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w")))) | |
6725 | (build-system ant-build-system) | |
6726 | (arguments | |
6727 | `(#:tests? #f ; no tests | |
6728 | #:jar-name "osgi-annotation.jar")) | |
c353d014 | 6729 | (home-page "https://www.osgi.org") |
6ee6d0b5 RW |
6730 | (synopsis "Annotation module of OSGi framework") |
6731 | (description | |
6732 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6733 | and service platform for the Java programming language. This package contains | |
6734 | the OSGi annotation module, providing additional services to help dynamic | |
6735 | components.") | |
6736 | (license license:asl2.0))) | |
6737 | ||
37e2e5d4 RW |
6738 | (define-public java-osgi-core |
6739 | (package | |
6740 | (name "java-osgi-core") | |
6741 | (version "6.0.0") | |
6742 | (source (origin | |
6743 | (method url-fetch) | |
6744 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6745 | "org/osgi/org.osgi.core/" version "/" | |
6746 | "org.osgi.core-" version "-sources.jar")) | |
6747 | (sha256 | |
6748 | (base32 | |
6749 | "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv")))) | |
6750 | (build-system ant-build-system) | |
6751 | (arguments | |
6752 | `(#:tests? #f ; no tests | |
6753 | #:jar-name "osgi-core.jar")) | |
6754 | (inputs | |
6755 | `(("java-osgi-annotation" ,java-osgi-annotation))) | |
c353d014 | 6756 | (home-page "https://www.osgi.org") |
37e2e5d4 RW |
6757 | (synopsis "Core module of OSGi framework") |
6758 | (description | |
6759 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6760 | and service platform for the Java programming language. This package contains | |
6761 | the OSGi Core module.") | |
6762 | (license license:asl2.0))) | |
6763 | ||
8af92c8f RW |
6764 | (define-public java-osgi-service-event |
6765 | (package | |
6766 | (name "java-osgi-service-event") | |
6767 | (version "1.3.1") | |
6768 | (source (origin | |
6769 | (method url-fetch) | |
6770 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6771 | "org/osgi/org.osgi.service.event/" | |
6772 | version "/org.osgi.service.event-" | |
6773 | version "-sources.jar")) | |
6774 | (sha256 | |
6775 | (base32 | |
6776 | "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm")))) | |
6777 | (build-system ant-build-system) | |
6778 | (arguments | |
6779 | `(#:tests? #f ; no tests | |
6780 | #:jar-name "osgi-service-event.jar")) | |
6781 | (inputs | |
6782 | `(("java-osgi-annotation" ,java-osgi-annotation) | |
6783 | ("java-osgi-core" ,java-osgi-core))) | |
c353d014 | 6784 | (home-page "https://www.osgi.org") |
8af92c8f RW |
6785 | (synopsis "OSGi service event module") |
6786 | (description | |
6787 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6788 | and service platform for the Java programming language. This package contains | |
6789 | the OSGi @code{org.osgi.service.event} module.") | |
6790 | (license license:asl2.0))) | |
6791 | ||
674e93a0 RW |
6792 | (define-public java-eclipse-osgi |
6793 | (package | |
6794 | (name "java-eclipse-osgi") | |
6795 | (version "3.11.3") | |
6796 | (source (origin | |
6797 | (method url-fetch) | |
6798 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6799 | "org/eclipse/platform/org.eclipse.osgi/" | |
6800 | version "/org.eclipse.osgi-" | |
6801 | version "-sources.jar")) | |
6802 | (sha256 | |
6803 | (base32 | |
6804 | "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b")))) | |
6805 | (build-system ant-build-system) | |
6806 | (arguments | |
6807 | `(#:tests? #f ; no tests included | |
6808 | #:jar-name "eclipse-equinox-osgi.jar")) | |
6809 | (inputs | |
6810 | `(("java-osgi-annotation" ,java-osgi-annotation))) | |
6811 | (home-page "http://www.eclipse.org/equinox/") | |
6812 | (synopsis "Eclipse Equinox OSGi framework") | |
6813 | (description "This package provides an implementation of the OSGi Core | |
6814 | specification.") | |
6815 | (license license:epl1.0))) | |
6816 | ||
81b55b1e RW |
6817 | (define-public java-eclipse-equinox-common |
6818 | (package | |
6819 | (name "java-eclipse-equinox-common") | |
e40e3792 | 6820 | (version "3.10.200") |
81b55b1e RW |
6821 | (source (origin |
6822 | (method url-fetch) | |
6823 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6824 | "org/eclipse/platform/org.eclipse.equinox.common/" | |
6825 | version "/org.eclipse.equinox.common-" | |
6826 | version "-sources.jar")) | |
6827 | (sha256 | |
6828 | (base32 | |
e40e3792 | 6829 | "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj")))) |
81b55b1e RW |
6830 | (build-system ant-build-system) |
6831 | (arguments | |
6832 | `(#:tests? #f ; no tests included | |
6833 | #:jar-name "eclipse-equinox-common.jar")) | |
6834 | (inputs | |
6835 | `(("java-eclipse-osgi" ,java-eclipse-osgi))) | |
6836 | (home-page "http://www.eclipse.org/equinox/") | |
6837 | (synopsis "Common Eclipse runtime") | |
6838 | (description "This package provides the common Eclipse runtime.") | |
6839 | (license license:epl1.0))) | |
6840 | ||
90368ad9 RW |
6841 | (define-public java-eclipse-core-jobs |
6842 | (package | |
6843 | (name "java-eclipse-core-jobs") | |
6844 | (version "3.8.0") | |
6845 | (source (origin | |
6846 | (method url-fetch) | |
6847 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6848 | "org/eclipse/platform/org.eclipse.core.jobs/" | |
6849 | version "/org.eclipse.core.jobs-" | |
6850 | version "-sources.jar")) | |
6851 | (sha256 | |
6852 | (base32 | |
6853 | "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b")))) | |
6854 | (build-system ant-build-system) | |
6855 | (arguments | |
6856 | `(#:tests? #f ; no tests included | |
6857 | #:jar-name "eclipse-core-jobs.jar")) | |
6858 | (inputs | |
6859 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
6860 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
6861 | (home-page "http://www.eclipse.org/equinox/") | |
6862 | (synopsis "Eclipse jobs mechanism") | |
6863 | (description "This package provides the Eclipse jobs mechanism.") | |
6864 | (license license:epl1.0))) | |
6865 | ||
fbaf09eb RW |
6866 | (define-public java-eclipse-equinox-registry |
6867 | (package | |
6868 | (name "java-eclipse-equinox-registry") | |
6869 | (version "3.6.100") | |
6870 | (source (origin | |
6871 | (method url-fetch) | |
6872 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6873 | "org/eclipse/platform/org.eclipse.equinox.registry/" | |
6874 | version "/org.eclipse.equinox.registry-" | |
6875 | version "-sources.jar")) | |
6876 | (sha256 | |
6877 | (base32 | |
6878 | "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k")))) | |
6879 | (build-system ant-build-system) | |
6880 | (arguments | |
6881 | `(#:tests? #f ; no tests included | |
6882 | #:jar-name "eclipse-equinox-registry.jar")) | |
6883 | (inputs | |
6884 | `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
6885 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
6886 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
6887 | (home-page "http://www.eclipse.org/equinox/") | |
6888 | (synopsis "Eclipse extension registry support") | |
6889 | (description "This package provides support for the Eclipse extension | |
6890 | registry.") | |
6891 | (license license:epl1.0))) | |
6892 | ||
65214c87 RW |
6893 | (define-public java-eclipse-equinox-app |
6894 | (package | |
6895 | (name "java-eclipse-equinox-app") | |
6896 | (version "1.3.400") | |
6897 | (source (origin | |
6898 | (method url-fetch) | |
6899 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6900 | "org/eclipse/platform/org.eclipse.equinox.app/" | |
6901 | version "/org.eclipse.equinox.app-" | |
6902 | version "-sources.jar")) | |
6903 | (sha256 | |
6904 | (base32 | |
6905 | "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab")))) | |
6906 | (build-system ant-build-system) | |
6907 | (arguments | |
6908 | `(#:tests? #f ; no tests included | |
6909 | #:jar-name "eclipse-equinox-app.jar")) | |
6910 | (inputs | |
6911 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
6912 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
6913 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
6914 | ("java-osgi-service-event" ,java-osgi-service-event))) | |
6915 | (home-page "http://www.eclipse.org/equinox/") | |
6916 | (synopsis "Equinox application container") | |
6917 | (description "This package provides the Equinox application container for | |
6918 | Eclipse.") | |
6919 | (license license:epl1.0))) | |
6920 | ||
3f970214 RW |
6921 | (define-public java-eclipse-equinox-preferences |
6922 | (package | |
6923 | (name "java-eclipse-equinox-preferences") | |
6924 | (version "3.6.1") | |
6925 | (source (origin | |
6926 | (method url-fetch) | |
6927 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6928 | "org/eclipse/platform/org.eclipse.equinox.preferences/" | |
6929 | version "/org.eclipse.equinox.preferences-" | |
6930 | version "-sources.jar")) | |
6931 | (sha256 | |
6932 | (base32 | |
6933 | "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2")))) | |
6934 | (build-system ant-build-system) | |
6935 | (arguments | |
6936 | `(#:tests? #f ; no tests included | |
6937 | #:jar-name "eclipse-equinox-preferences.jar")) | |
6938 | (inputs | |
6939 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
6940 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
6941 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
6942 | (home-page "http://www.eclipse.org/equinox/") | |
6943 | (synopsis "Eclipse preferences mechanism") | |
6944 | (description "This package provides the Eclipse preferences mechanism with | |
6945 | the module @code{org.eclipse.equinox.preferences}.") | |
6946 | (license license:epl1.0))) | |
6947 | ||
4ad3d4f3 RW |
6948 | (define-public java-eclipse-core-contenttype |
6949 | (package | |
6950 | (name "java-eclipse-core-contenttype") | |
6951 | (version "3.5.100") | |
6952 | (source (origin | |
6953 | (method url-fetch) | |
6954 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6955 | "org/eclipse/platform/org.eclipse.core.contenttype/" | |
6956 | version "/org.eclipse.core.contenttype-" | |
6957 | version "-sources.jar")) | |
6958 | (sha256 | |
6959 | (base32 | |
6960 | "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi")))) | |
6961 | (build-system ant-build-system) | |
6962 | (arguments | |
6963 | `(#:tests? #f ; no tests included | |
6964 | #:jar-name "eclipse-core-contenttype.jar")) | |
6965 | (inputs | |
6966 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
6967 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
6968 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
6969 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
6970 | (home-page "http://www.eclipse.org/") | |
6971 | (synopsis "Eclipse content mechanism") | |
6972 | (description "This package provides the Eclipse content mechanism in the | |
6973 | @code{org.eclipse.core.contenttype} module.") | |
6974 | (license license:epl1.0))) | |
6975 | ||
6a7f7e49 RW |
6976 | (define-public java-eclipse-core-runtime |
6977 | (package | |
6978 | (name "java-eclipse-core-runtime") | |
4fa9b6e6 | 6979 | (version "3.15.100") |
6a7f7e49 RW |
6980 | (source (origin |
6981 | (method url-fetch) | |
6982 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6983 | "org/eclipse/platform/org.eclipse.core.runtime/" | |
6984 | version "/org.eclipse.core.runtime-" | |
6985 | version "-sources.jar")) | |
6986 | (sha256 | |
6987 | (base32 | |
4fa9b6e6 | 6988 | "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r")))) |
6a7f7e49 RW |
6989 | (build-system ant-build-system) |
6990 | (arguments | |
6991 | `(#:tests? #f ; no tests included | |
6992 | #:jar-name "eclipse-core-runtime.jar")) | |
6993 | (inputs | |
6994 | `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
6995 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
6996 | ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
6997 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
6998 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
6999 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7000 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7001 | (home-page "https://www.eclipse.org/") | |
7002 | (synopsis "Eclipse core runtime") | |
7003 | (description "This package provides the Eclipse core runtime with the | |
7004 | module @code{org.eclipse.core.runtime}.") | |
7005 | (license license:epl1.0))) | |
7006 | ||
b3806a15 RW |
7007 | (define-public java-eclipse-core-filesystem |
7008 | (package | |
7009 | (name "java-eclipse-core-filesystem") | |
7010 | (version "1.6.1") | |
7011 | (source (origin | |
7012 | (method url-fetch) | |
7013 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7014 | "org/eclipse/platform/org.eclipse.core.filesystem/" | |
7015 | version "/org.eclipse.core.filesystem-" | |
7016 | version "-sources.jar")) | |
7017 | (sha256 | |
7018 | (base32 | |
7019 | "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj")))) | |
7020 | (build-system ant-build-system) | |
7021 | (arguments | |
7022 | `(#:tests? #f ; no tests included | |
7023 | #:jar-name "eclipse-core-filesystem.jar")) | |
7024 | (inputs | |
7025 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7026 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7027 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7028 | (home-page "https://www.eclipse.org/") | |
7029 | (synopsis "Eclipse core file system") | |
7030 | (description "This package provides the Eclipse core file system with the | |
7031 | module @code{org.eclipse.core.filesystem}.") | |
7032 | (license license:epl1.0))) | |
7033 | ||
e96060de RW |
7034 | (define-public java-eclipse-core-expressions |
7035 | (package | |
7036 | (name "java-eclipse-core-expressions") | |
7037 | (version "3.5.100") | |
7038 | (source (origin | |
7039 | (method url-fetch) | |
7040 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7041 | "org/eclipse/platform/org.eclipse.core.expressions/" | |
7042 | version "/org.eclipse.core.expressions-" | |
7043 | version "-sources.jar")) | |
7044 | (sha256 | |
7045 | (base32 | |
7046 | "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f")))) | |
7047 | (build-system ant-build-system) | |
7048 | (arguments | |
7049 | `(#:tests? #f ; no tests included | |
7050 | #:jar-name "eclipse-core-expressions.jar")) | |
7051 | (inputs | |
7052 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7053 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7054 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7055 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7056 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7057 | (home-page "https://www.eclipse.org/") | |
7058 | (synopsis "Eclipse core expression language") | |
7059 | (description "This package provides the Eclipse core expression language | |
7060 | with the @code{org.eclipse.core.expressions} module.") | |
7061 | (license license:epl1.0))) | |
7062 | ||
e8d0f7c8 RW |
7063 | (define-public java-eclipse-core-variables |
7064 | (package | |
7065 | (name "java-eclipse-core-variables") | |
7066 | (version "3.3.0") | |
7067 | (source (origin | |
7068 | (method url-fetch) | |
7069 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7070 | "org/eclipse/platform/org.eclipse.core.variables/" | |
7071 | version "/org.eclipse.core.variables-" | |
7072 | version "-sources.jar")) | |
7073 | (sha256 | |
7074 | (base32 | |
7075 | "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy")))) | |
7076 | (build-system ant-build-system) | |
7077 | (arguments | |
7078 | `(#:tests? #f ; no tests included | |
7079 | #:jar-name "eclipse-core-variables.jar")) | |
7080 | (inputs | |
7081 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7082 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7083 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7084 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7085 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7086 | (home-page "https://www.eclipse.org/platform") | |
7087 | (synopsis "Eclipse core variables") | |
7088 | (description "This package provides the Eclipse core variables module | |
7089 | @code{org.eclipse.core.variables}.") | |
7090 | (license license:epl1.0))) | |
7091 | ||
7c3d479e RW |
7092 | (define-public java-eclipse-ant-core |
7093 | (package | |
7094 | (name "java-eclipse-ant-core") | |
7095 | (version "3.4.100") | |
7096 | (source (origin | |
7097 | (method url-fetch) | |
7098 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7099 | "org/eclipse/platform/org.eclipse.ant.core/" | |
7100 | version "/org.eclipse.ant.core-" | |
7101 | version "-sources.jar")) | |
7102 | (sha256 | |
7103 | (base32 | |
7104 | "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7")))) | |
7105 | (build-system ant-build-system) | |
7106 | (arguments | |
7107 | `(#:tests? #f ; no tests included | |
7108 | #:jar-name "eclipse-ant-core.jar")) | |
7109 | (inputs | |
7110 | `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
7111 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7112 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7113 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7114 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
7115 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7116 | ("java-eclipse-core-variables" ,java-eclipse-core-variables) | |
7117 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7118 | (home-page "https://www.eclipse.org/platform") | |
7119 | (synopsis "Ant build tool core libraries") | |
7120 | (description "This package provides the ant build tool core libraries with | |
7121 | the module @code{org.eclipse.ant.core}.") | |
7122 | (license license:epl1.0))) | |
7123 | ||
6636f638 RW |
7124 | (define-public java-eclipse-core-resources |
7125 | (package | |
7126 | (name "java-eclipse-core-resources") | |
c8427a5e | 7127 | (version "3.13.200") |
6636f638 RW |
7128 | (source (origin |
7129 | (method url-fetch) | |
7130 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7131 | "org/eclipse/platform/org.eclipse.core.resources/" | |
7132 | version "/org.eclipse.core.resources-" | |
7133 | version "-sources.jar")) | |
7134 | (sha256 | |
7135 | (base32 | |
c8427a5e | 7136 | "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs")))) |
6636f638 RW |
7137 | (build-system ant-build-system) |
7138 | (arguments | |
7139 | `(#:tests? #f ; no tests included | |
7140 | #:jar-name "eclipse-core-resources.jar")) | |
7141 | (inputs | |
7142 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7143 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7144 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7145 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
7146 | ("java-eclipse-core-expressions" ,java-eclipse-core-expressions) | |
7147 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
7148 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
7149 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7150 | ("java-eclipse-ant-core" ,java-eclipse-ant-core) | |
7151 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7152 | (home-page "https://www.eclipse.org/") | |
7153 | (synopsis "Eclipse core resource management") | |
7154 | (description "This package provides the Eclipse core resource management | |
7155 | module @code{org.eclipse.core.resources}.") | |
7156 | (license license:epl1.0))) | |
7157 | ||
afb5858d RW |
7158 | (define-public java-eclipse-compare-core |
7159 | (package | |
7160 | (name "java-eclipse-compare-core") | |
7161 | (version "3.6.0") | |
7162 | (source (origin | |
7163 | (method url-fetch) | |
7164 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7165 | "org/eclipse/platform/org.eclipse.compare.core/" | |
7166 | version "/org.eclipse.compare.core-" | |
7167 | version "-sources.jar")) | |
7168 | (sha256 | |
7169 | (base32 | |
7170 | "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg")))) | |
7171 | (build-system ant-build-system) | |
7172 | (arguments | |
7173 | `(#:tests? #f ; no tests included | |
7174 | #:jar-name "eclipse-compare-core.jar")) | |
7175 | (inputs | |
7176 | `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7177 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7178 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
7179 | ("java-icu4j" ,java-icu4j))) | |
7180 | (home-page "https://www.eclipse.org/") | |
7181 | (synopsis "Eclipse core compare support") | |
7182 | (description "This package provides the Eclipse core compare support | |
7183 | module @code{org.eclipse.compare.core}.") | |
7184 | (license license:epl1.0))) | |
7185 | ||
1bb191fc RW |
7186 | (define-public java-eclipse-team-core |
7187 | (package | |
7188 | (name "java-eclipse-team-core") | |
7189 | (version "3.8.0") | |
7190 | (source (origin | |
7191 | (method url-fetch) | |
7192 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7193 | "org/eclipse/platform/org.eclipse.team.core/" | |
7194 | version "/org.eclipse.team.core-" | |
7195 | version "-sources.jar")) | |
7196 | (sha256 | |
7197 | (base32 | |
7198 | "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7")))) | |
7199 | (build-system ant-build-system) | |
7200 | (arguments | |
7201 | `(#:tests? #f ; no tests included | |
7202 | #:jar-name "eclipse-team-core.jar")) | |
7203 | (inputs | |
7204 | `(("java-eclipse-compare-core" ,java-eclipse-compare-core) | |
7205 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
7206 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
7207 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
7208 | ("java-eclipse-core-resources" ,java-eclipse-core-resources) | |
7209 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7210 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7211 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7212 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7213 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
7214 | (home-page "https://www.eclipse.org/platform") | |
7215 | (synopsis "Eclipse team support core") | |
7216 | (description "This package provides the Eclipse team support core module | |
7217 | @code{org.eclipse.team.core}.") | |
7218 | (license license:epl1.0))) | |
7219 | ||
31342529 RW |
7220 | (define-public java-eclipse-core-commands |
7221 | (package | |
7222 | (name "java-eclipse-core-commands") | |
7223 | (version "3.8.1") | |
7224 | (source (origin | |
7225 | (method url-fetch) | |
7226 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7227 | "org/eclipse/platform/org.eclipse.core.commands/" | |
7228 | version "/org.eclipse.core.commands-" | |
7229 | version "-sources.jar")) | |
7230 | (sha256 | |
7231 | (base32 | |
7232 | "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9")))) | |
7233 | (build-system ant-build-system) | |
7234 | (arguments | |
7235 | `(#:tests? #f ; no tests included | |
7236 | #:jar-name "eclipse-core-commands.jar")) | |
7237 | (inputs | |
7238 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common))) | |
7239 | (home-page "https://www.eclipse.org/platform") | |
7240 | (synopsis "Eclipse core commands") | |
7241 | (description "This package provides Eclipse core commands in the module | |
7242 | @code{org.eclipse.core.commands}.") | |
7243 | (license license:epl1.0))) | |
7244 | ||
bf96acf7 RW |
7245 | (define-public java-eclipse-text |
7246 | (package | |
7247 | (name "java-eclipse-text") | |
7248 | (version "3.6.0") | |
7249 | (source (origin | |
7250 | (method url-fetch) | |
7251 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7252 | "org/eclipse/platform/org.eclipse.text/" | |
7253 | version "/org.eclipse.text-" | |
7254 | version "-sources.jar")) | |
7255 | (sha256 | |
7256 | (base32 | |
7257 | "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1")))) | |
7258 | (build-system ant-build-system) | |
7259 | (arguments | |
7260 | `(#:tests? #f ; no tests included | |
7261 | #:jar-name "eclipse-text.jar" | |
7262 | #:phases | |
7263 | (modify-phases %standard-phases | |
7264 | ;; When creating a new category we must make sure that the new list | |
7265 | ;; matches List<Position>. By default it seems to be too generic | |
7266 | ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>. | |
7267 | ;; Without this we get this error: | |
7268 | ;; | |
7269 | ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376: | |
7270 | ;; error: method put in interface Map<K,V> cannot be applied to given types; | |
7271 | ;; [javac] fPositions.put(category, new ArrayList<>()); | |
7272 | ;; [javac] ^ | |
7273 | ;; [javac] required: String,List<Position> | |
7274 | ;; [javac] found: String,ArrayList<Object> | |
7275 | ;; [javac] reason: actual argument ArrayList<Object> cannot be converted | |
7276 | ;; to List<Position> by method invocation conversion | |
7277 | ;; [javac] where K,V are type-variables: | |
7278 | ;; [javac] K extends Object declared in interface Map | |
7279 | ;; [javac] V extends Object declared in interface Map | |
7280 | ;; | |
7281 | ;; I don't know if this is a good fix. I suspect it is not, but it | |
7282 | ;; seems to work. | |
7283 | (add-after 'unpack 'fix-compilation-error | |
7284 | (lambda _ | |
7285 | (substitute* "src/org/eclipse/jface/text/AbstractDocument.java" | |
7286 | (("Positions.put\\(category, new ArrayList<>\\(\\)\\);") | |
7287 | "Positions.put(category, new ArrayList<Position>());")) | |
7288 | #t))))) | |
7289 | (inputs | |
7290 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7291 | ("java-eclipse-core-commands" ,java-eclipse-core-commands) | |
7292 | ("java-icu4j" ,java-icu4j))) | |
7293 | (home-page "http://www.eclipse.org/platform") | |
7294 | (synopsis "Eclipse text library") | |
7295 | (description "Platform Text is part of the Platform UI project and | |
7296 | provides the basic building blocks for text and text editors within Eclipse | |
7297 | and contributes the Eclipse default text editor.") | |
7298 | (license license:epl1.0))) | |
7299 | ||
c24d11b7 RW |
7300 | (define-public java-eclipse-jdt-core |
7301 | (package | |
7302 | (name "java-eclipse-jdt-core") | |
43d6776b | 7303 | (version "3.16.0") |
c24d11b7 RW |
7304 | (source (origin |
7305 | (method url-fetch) | |
7306 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7307 | "org/eclipse/jdt/org.eclipse.jdt.core/" | |
7308 | version "/org.eclipse.jdt.core-" | |
7309 | version "-sources.jar")) | |
7310 | (sha256 | |
7311 | (base32 | |
43d6776b | 7312 | "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k")))) |
c24d11b7 RW |
7313 | (build-system ant-build-system) |
7314 | (arguments | |
7315 | `(#:tests? #f ; no tests included | |
84b226c2 RW |
7316 | #:jar-name "eclipse-jdt-core.jar" |
7317 | #:phases | |
7318 | (modify-phases %standard-phases | |
7319 | (add-after 'unpack 'move-sources | |
7320 | (lambda _ | |
7321 | (with-directory-excursion "src/jdtCompilerAdaptersrc/" | |
7322 | (for-each (lambda (file) | |
7323 | (install-file file (string-append "../" (dirname file)))) | |
7324 | (find-files "." ".*"))) | |
7325 | (delete-file-recursively "src/jdtCompilerAdaptersrc/") | |
7326 | #t)) | |
7327 | (add-before 'build 'copy-resources | |
7328 | (lambda _ | |
7329 | (with-directory-excursion "src" | |
7330 | (for-each (lambda (file) | |
7331 | (install-file file (string-append "../build/classes/" (dirname file)))) | |
7332 | (find-files "." ".*.(props|properties|rsc)"))) | |
7333 | #t))))) | |
c24d11b7 RW |
7334 | (inputs |
7335 | `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
7336 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
7337 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
7338 | ("java-eclipse-core-resources" ,java-eclipse-core-resources) | |
7339 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
7340 | ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
7341 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
7342 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
7343 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
7344 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
7345 | ("java-eclipse-text" ,java-eclipse-text))) | |
7346 | (home-page "https://www.eclipse.org/jdt") | |
7347 | (synopsis "Java development tools core libraries") | |
7348 | (description "This package provides the core libraries of the Eclipse Java | |
7349 | development tools.") | |
7350 | (license license:epl1.0))) | |
7351 | ||
74c2339f RW |
7352 | (define-public java-eclipse-jdt-compiler-apt |
7353 | (package | |
7354 | (name "java-eclipse-jdt-compiler-apt") | |
7355 | (version "1.3.400") | |
7356 | (source (origin | |
7357 | (method url-fetch) | |
7358 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7359 | "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/" | |
7360 | version "/org.eclipse.jdt.compiler.apt-" | |
7361 | version "-sources.jar")) | |
7362 | (sha256 | |
7363 | (base32 | |
7364 | "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8")))) | |
7365 | (build-system ant-build-system) | |
7366 | (arguments | |
7367 | `(#:tests? #f ; no tests included | |
7368 | #:jar-name "eclipse-jdt-compiler-apt.jar" | |
7369 | #:jdk ,openjdk11)) | |
7370 | (inputs | |
7371 | `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core))) | |
7372 | (home-page "https://www.eclipse.org/jdt/apt/") | |
7373 | (synopsis "Annotation processing tool") | |
7374 | (description "APT stands for Annotation Processing Tool. APT provides a | |
7375 | means for generating files and compiling new Java classes based on annotations | |
7376 | found in your source code.") | |
7377 | (license license:epl2.0))) | |
7378 | ||
a5cdcf6c RW |
7379 | (define-public java-javax-mail |
7380 | (package | |
7381 | (name "java-javax-mail") | |
7382 | (version "1.5.6") | |
7383 | (source (origin | |
7384 | (method url-fetch) | |
7385 | (uri (string-append "https://repo1.maven.org/maven2/" | |
7386 | "com/sun/mail/javax.mail/" | |
7387 | version "/javax.mail-" | |
7388 | version "-sources.jar")) | |
7389 | (sha256 | |
7390 | (base32 | |
7391 | "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9")))) | |
7392 | (build-system ant-build-system) | |
7393 | (arguments | |
7394 | `(#:tests? #f ; no tests | |
7395 | #:jar-name "javax-mail.jar")) | |
7396 | (home-page "https://javamail.java.net") | |
7397 | (synopsis "Reference implementation of the JavaMail API") | |
7398 | (description | |
7399 | "This package provides versions of the JavaMail API implementation, IMAP, | |
7400 | SMTP, and POP3 service providers, some examples, and documentation for the | |
7401 | JavaMail API.") | |
7402 | ;; GPLv2 only with "classpath exception". | |
7403 | (license license:gpl2))) | |
7404 | ||
0e660c4d RW |
7405 | (define-public java-log4j-api |
7406 | (package | |
7407 | (name "java-log4j-api") | |
7408 | (version "2.4.1") | |
7409 | (source (origin | |
7410 | (method url-fetch) | |
7411 | (uri (string-append "mirror://apache/logging/log4j/" version | |
7412 | "/apache-log4j-" version "-src.tar.gz")) | |
7413 | (sha256 | |
7414 | (base32 | |
7415 | "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd")))) | |
7416 | (build-system ant-build-system) | |
7417 | (arguments | |
7418 | `(#:tests? #f ; tests require unpackaged software | |
7419 | #:jar-name "log4j-api.jar" | |
7420 | #:make-flags | |
7421 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") | |
7422 | "/share/java")) | |
7423 | #:phases | |
7424 | (modify-phases %standard-phases | |
7425 | (add-after 'unpack 'enter-dir | |
7426 | (lambda _ (chdir "log4j-api") #t)) | |
7427 | ;; FIXME: The tests require additional software that has not been | |
7428 | ;; packaged yet, such as | |
7429 | ;; * org.apache.maven | |
7430 | ;; * org.apache.felix | |
7431 | (add-after 'enter-dir 'delete-tests | |
7432 | (lambda _ (delete-file-recursively "src/test") #t))))) | |
7433 | (inputs | |
7434 | `(("java-osgi-core" ,java-osgi-core) | |
7435 | ("java-hamcrest-core" ,java-hamcrest-core) | |
7436 | ("java-junit" ,java-junit))) | |
4d1ddb51 | 7437 | (home-page "https://logging.apache.org/log4j/2.x/") |
0e660c4d RW |
7438 | (synopsis "API module of the Log4j logging framework for Java") |
7439 | (description | |
7440 | "This package provides the API module of the Log4j logging framework for | |
7441 | Java.") | |
7442 | (license license:asl2.0))) | |
7443 | ||
dfef4231 JL |
7444 | (define-public java-log4j-core |
7445 | (package | |
7446 | (inherit java-log4j-api) | |
7447 | (name "java-log4j-core") | |
7448 | (inputs | |
7449 | `(("java-osgi-core" ,java-osgi-core) | |
7450 | ("java-hamcrest-core" ,java-hamcrest-core) | |
7451 | ("java-log4j-api" ,java-log4j-api) | |
7452 | ("java-mail" ,java-mail) | |
7453 | ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec) | |
7454 | ("java-lmax-disruptor" ,java-lmax-disruptor) | |
7455 | ("java-kafka" ,java-kafka-clients) | |
7456 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) | |
7457 | ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
7458 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
7459 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) | |
7460 | ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml) | |
7461 | ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml) | |
7462 | ("java-commons-compress" ,java-commons-compress) | |
7463 | ("java-commons-csv" ,java-commons-csv) | |
7464 | ("java-jeromq" ,java-jeromq) | |
7465 | ("java-junit" ,java-junit))) | |
7466 | (native-inputs | |
7467 | `(("hamcrest" ,java-hamcrest-all) | |
7468 | ("java-commons-io" ,java-commons-io) | |
7469 | ("java-commons-lang3" ,java-commons-lang3) | |
7470 | ("slf4j" ,java-slf4j-api))) | |
7471 | (arguments | |
7472 | `(#:tests? #f ; tests require more dependencies | |
7473 | #:test-dir "src/test" | |
7474 | #:source-dir "src/main/java" | |
7475 | #:jar-name "log4j-core.jar" | |
7476 | #:jdk ,icedtea-8 | |
7477 | #:make-flags | |
7478 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") | |
7479 | "/share/java")) | |
7480 | #:phases | |
7481 | (modify-phases %standard-phases | |
7482 | (add-after 'unpack 'enter-dir | |
7483 | (lambda _ (chdir "log4j-core") #t))))) | |
7484 | (synopsis "Core component of the Log4j framework") | |
7485 | (description "This package provides the core component of the Log4j | |
7486 | logging framework for Java."))) | |
7487 | ||
2caf873e JL |
7488 | (define-public java-log4j-1.2-api |
7489 | (package | |
7490 | (inherit java-log4j-api) | |
7491 | (name "java-log4j-1.2-api") | |
7492 | (arguments | |
7493 | `(#:jar-name "java-log4j-1.2-api.jar" | |
7494 | #:source-dir "log4j-1.2-api/src/main/java" | |
7495 | #:jdk ,icedtea-8 | |
7496 | ;; Tests require maven-model (and other maven subprojects), which is a | |
7497 | ;; cyclic dependency. | |
7498 | #:tests? #f)) | |
7499 | (inputs | |
7500 | `(("log4j-api" ,java-log4j-api) | |
7501 | ("log4j-core" ,java-log4j-core) | |
7502 | ("osgi-core" ,java-osgi-core) | |
7503 | ("eclipse-osgi" ,java-eclipse-osgi) | |
7504 | ("java-lmax-disruptor" ,java-lmax-disruptor))))) | |
7505 | ||
1c188f4e HG |
7506 | (define-public java-commons-cli |
7507 | (package | |
7508 | (name "java-commons-cli") | |
37602dd8 | 7509 | (version "1.4") |
1c188f4e HG |
7510 | (source (origin |
7511 | (method url-fetch) | |
7512 | (uri (string-append "mirror://apache/commons/cli/source/" | |
7513 | "commons-cli-" version "-src.tar.gz")) | |
7514 | (sha256 | |
7515 | (base32 | |
37602dd8 | 7516 | "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1")))) |
1c188f4e HG |
7517 | (build-system ant-build-system) |
7518 | ;; TODO: javadoc | |
7519 | (arguments | |
51087d51 JL |
7520 | `(#:jar-name "commons-cli.jar" |
7521 | #:phases | |
7522 | (modify-phases %standard-phases | |
7523 | (replace 'install | |
7524 | (install-from-pom "pom.xml"))))) | |
1c188f4e HG |
7525 | (native-inputs |
7526 | `(("java-junit" ,java-junit) | |
7527 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
1b3a6038 | 7528 | (home-page "https://commons.apache.org/cli/") |
1c188f4e HG |
7529 | (synopsis "Command line arguments and options parsing library") |
7530 | (description "The Apache Commons CLI library provides an API for parsing | |
7531 | command line options passed to programs. It is also able to print help | |
7532 | messages detailing the options available for a command line tool. | |
7533 | ||
7534 | Commons CLI supports different types of options: | |
7535 | ||
7536 | @itemize | |
7537 | @item POSIX like options (ie. tar -zxvf foo.tar.gz) | |
7538 | @item GNU like long options (ie. du --human-readable --max-depth=1) | |
7539 | @item Java like properties (ie. java -Djava.awt.headless=true Foo) | |
7540 | @item Short options with value attached (ie. gcc -O2 foo.c) | |
7541 | @item long options with single hyphen (ie. ant -projecthelp) | |
7542 | @end itemize | |
7543 | ||
7544 | This is a part of the Apache Commons Project.") | |
7545 | (license license:asl2.0))) | |
0a8519bc HG |
7546 | |
7547 | (define-public java-commons-codec | |
7548 | (package | |
7549 | (name "java-commons-codec") | |
ba03666d | 7550 | (version "1.14") |
0a8519bc HG |
7551 | (source (origin |
7552 | (method url-fetch) | |
7553 | (uri (string-append "mirror://apache/commons/codec/source/" | |
7554 | "commons-codec-" version "-src.tar.gz")) | |
7555 | (sha256 | |
7556 | (base32 | |
ba03666d | 7557 | "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9")))) |
0a8519bc | 7558 | (build-system ant-build-system) |
0a8519bc | 7559 | (arguments |
ba03666d JL |
7560 | `(#:jar-name "java-commons-codec.jar" |
7561 | #:source-dir "src/main/java" | |
7562 | #:test-dir "src/test" | |
7563 | #:test-exclude (list "**/*AbstractTest.java") | |
0a8519bc HG |
7564 | #:phases |
7565 | (modify-phases %standard-phases | |
ba03666d JL |
7566 | (add-before 'build 'copy-resources |
7567 | (lambda _ | |
7568 | (copy-recursively "src/main/resources" | |
7569 | "build/classes") | |
7570 | #t)) | |
7571 | (add-before 'check 'copy-test-resources | |
7572 | (lambda _ | |
7573 | (copy-recursively "src/test/resources" | |
7574 | "build/test-classes") | |
7575 | #t)) | |
7576 | (replace 'install (install-from-pom "pom.xml"))))) | |
0a8519bc | 7577 | (native-inputs |
ba03666d JL |
7578 | `(("java-commons-lang3" ,java-commons-lang3) |
7579 | ("java-junit" ,java-junit))) | |
7580 | (propagated-inputs | |
7581 | `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50))) | |
77e1fe31 | 7582 | (home-page "https://commons.apache.org/codec/") |
0a8519bc HG |
7583 | (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs") |
7584 | (description "The codec package contains simple encoder and decoders for | |
7585 | various formats such as Base64 and Hexadecimal. In addition to these widely | |
7586 | used encoders and decoders, the codec package also maintains a collection of | |
7587 | phonetic encoding utilities. | |
7588 | ||
7589 | This is a part of the Apache Commons Project.") | |
7590 | (license license:asl2.0))) | |
7d91c1b9 HG |
7591 | |
7592 | (define-public java-commons-daemon | |
7593 | (package | |
7594 | (name "java-commons-daemon") | |
b503ae3d | 7595 | (version "1.1.0") |
7d91c1b9 HG |
7596 | (source (origin |
7597 | (method url-fetch) | |
7598 | (uri (string-append "mirror://apache/commons/daemon/source/" | |
7599 | "commons-daemon-" version "-src.tar.gz")) | |
7600 | (sha256 | |
7601 | (base32 | |
b503ae3d | 7602 | "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n")))) |
7d91c1b9 HG |
7603 | (build-system ant-build-system) |
7604 | (arguments | |
7605 | `(#:test-target "test" | |
7606 | #:phases | |
7607 | (modify-phases %standard-phases | |
7608 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
7609 | (replace 'install (install-jars "dist")) | |
7610 | (add-after 'install 'install-doc (install-javadoc "dist/docs/api"))))) | |
7611 | (native-inputs | |
7612 | `(("java-junit" ,java-junit))) | |
4f236f84 | 7613 | (home-page "https://commons.apache.org/daemon/") |
7d91c1b9 HG |
7614 | (synopsis "Library to launch Java applications as daemons") |
7615 | (description "The Daemon package from Apache Commons can be used to | |
7616 | implement Java applications which can be launched as daemons. For example the | |
7617 | program will be notified about a shutdown so that it can perform cleanup tasks | |
7618 | before its process of execution is destroyed by the operation system. | |
7619 | ||
7620 | This package contains the Java library. You will also need the actual binary | |
7621 | for your architecture which is provided by the jsvc package. | |
7622 | ||
7623 | This is a part of the Apache Commons Project.") | |
7624 | (license license:asl2.0))) | |
9f68e74a | 7625 | |
eb270ecf RW |
7626 | (define-public java-javaewah |
7627 | (package | |
7628 | (name "java-javaewah") | |
7629 | (version "1.1.6") | |
7630 | (source (origin | |
2876b233 EF |
7631 | (method git-fetch) |
7632 | (uri (git-reference | |
7633 | (url "https://github.com/lemire/javaewah/") | |
7634 | (commit (string-append "JavaEWAH-" version)))) | |
7635 | (file-name (git-file-name name version)) | |
eb270ecf RW |
7636 | (sha256 |
7637 | (base32 | |
2876b233 | 7638 | "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw")))) |
eb270ecf RW |
7639 | (build-system ant-build-system) |
7640 | (arguments `(#:jar-name "javaewah.jar")) | |
7641 | (inputs | |
7642 | `(("java-junit" ,java-junit) | |
7643 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
7644 | (home-page "https://github.com/lemire/javaewah") | |
7645 | (synopsis "Compressed alternative to the Java @code{BitSet} class") | |
7646 | (description "This is a word-aligned compressed variant of the Java | |
7647 | @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like | |
7648 | compression scheme. It can be used to implement bitmap indexes. | |
7649 | ||
7650 | The goal of word-aligned compression is not to achieve the best compression, | |
2876b233 | 7651 | but rather to improve query processing time. Hence, JavaEWAH tries to save CPU |
eb270ecf RW |
7652 | cycles, maybe at the expense of storage. However, the EWAH scheme is always |
7653 | more efficient storage-wise than an uncompressed bitmap (as implemented in the | |
7654 | @code{BitSet} class by Sun).") | |
7655 | ;; GPL2.0 derivates are explicitly allowed. | |
7656 | (license license:asl2.0))) | |
7657 | ||
f8e4d022 RW |
7658 | (define-public java-slf4j-api |
7659 | (package | |
7660 | (name "java-slf4j-api") | |
7661 | (version "1.7.25") | |
7662 | (source (origin | |
7663 | (method url-fetch) | |
7664 | (uri (string-append "https://www.slf4j.org/dist/slf4j-" | |
7665 | version ".tar.gz")) | |
7666 | (sha256 | |
7667 | (base32 | |
7668 | "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb")) | |
7669 | (modules '((guix build utils))) | |
7670 | ;; Delete bundled jars. | |
7671 | (snippet | |
7672 | '(begin | |
7673 | (for-each delete-file (find-files "." "\\.jar$")) | |
7674 | #t)))) | |
7675 | (build-system ant-build-system) | |
7676 | (arguments | |
dcf7a8a6 | 7677 | `(#:jar-name "slf4j-api.jar" |
f8e4d022 | 7678 | #:source-dir "slf4j-api/src/main" |
dcf7a8a6 JL |
7679 | #:test-dir "slf4j-api/src/test" |
7680 | #:phases | |
7681 | (modify-phases %standard-phases | |
7682 | (add-after 'build 'regenerate-jar | |
7683 | (lambda _ | |
7684 | ;; pom.xml ignores these files in the jar creation process. If we don't, | |
7685 | ;; we get the error "This code should have never made it into slf4j-api.jar" | |
7686 | (delete-file-recursively "build/classes/org/slf4j/impl") | |
2c8ac364 MW |
7687 | (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C" |
7688 | "build/classes" "."))) | |
dcf7a8a6 JL |
7689 | (add-before 'check 'dont-test-abstract-classes |
7690 | (lambda _ | |
7691 | ;; abstract classes are not meant to be run with junit | |
7692 | (substitute* "build.xml" | |
7693 | (("<include name=\"\\*\\*/\\*Test.java\" />") | |
7694 | (string-append "<include name=\"**/*Test.java\" />" | |
7695 | "<exclude name=\"**/MultithreadedInitializationTest" | |
2c8ac364 | 7696 | ".java\" />"))) |
51087d51 JL |
7697 | #t)) |
7698 | (replace 'install | |
7699 | (install-from-pom "slf4j-api/pom.xml"))))) | |
7700 | (propagated-inputs | |
7701 | `(("java-slf4j-parent" ,java-slf4j-parent))) | |
7702 | (native-inputs | |
f8e4d022 RW |
7703 | `(("java-junit" ,java-junit) |
7704 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
7705 | (home-page "https://www.slf4j.org/") | |
7706 | (synopsis "Simple logging facade for Java") | |
7707 | (description "The Simple Logging Facade for Java (SLF4J) serves as a | |
7708 | simple facade or abstraction for various logging | |
7709 | frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j}) | |
7710 | allowing the end user to plug in the desired logging framework at deployment | |
7711 | time.") | |
7712 | (license license:expat))) | |
7713 | ||
51087d51 | 7714 | (define java-slf4j-parent |
6d047cc4 GB |
7715 | (package |
7716 | (inherit java-slf4j-api) | |
51087d51 JL |
7717 | (name "java-slf4j-parent") |
7718 | (native-inputs `()) | |
7719 | (propagated-inputs '()) | |
6d047cc4 | 7720 | (arguments |
51087d51 JL |
7721 | `(#:tests? #f |
7722 | #:phases | |
7723 | (modify-phases %standard-phases | |
7724 | (delete 'build) | |
7725 | (delete 'configure) | |
7726 | (replace 'install | |
7727 | (install-pom-file "pom.xml"))))))) | |
6d047cc4 | 7728 | |
88f256a1 TD |
7729 | (define-public java-slf4j-simple |
7730 | (package | |
7731 | (name "java-slf4j-simple") | |
7732 | (version "1.7.25") | |
7733 | (source (package-source java-slf4j-api)) | |
7734 | (build-system ant-build-system) | |
7735 | (arguments | |
7736 | `(#:jar-name "slf4j-simple.jar" | |
7737 | #:source-dir "slf4j-simple/src/main" | |
7738 | #:test-dir "slf4j-simple/src/test" | |
7739 | #:phases | |
7740 | (modify-phases %standard-phases | |
7741 | ;; The tests need some test classes from slf4j-api | |
7742 | (add-before 'check 'build-slf4j-api-test-helpers | |
7743 | (lambda _ | |
7744 | ;; Add current dir to CLASSPATH ... | |
7745 | (setenv "CLASSPATH" | |
7746 | (string-append (getcwd) ":" (getenv "CLASSPATH"))) | |
7747 | ;; ... and build test helper classes here: | |
2c8ac364 MW |
7748 | (apply invoke |
7749 | `("javac" "-d" "." | |
51087d51 JL |
7750 | ,@(find-files "slf4j-api/src/test" ".*\\.java"))))) |
7751 | (replace 'install | |
7752 | (install-from-pom "slf4j-simple/pom.xml"))))) | |
7753 | (propagated-inputs | |
7754 | `(("java-slf4j-api" ,java-slf4j-api))) | |
7755 | (native-inputs | |
88f256a1 | 7756 | `(("java-junit" ,java-junit) |
51087d51 | 7757 | ("java-hamcrest-core" ,java-hamcrest-core))) |
88f256a1 TD |
7758 | (home-page "https://www.slf4j.org/") |
7759 | (synopsis "Simple implementation of simple logging facade for Java") | |
7760 | (description "SLF4J binding for the Simple implementation, which outputs | |
7761 | all events to System.err. Only messages of level INFO and higher are | |
7762 | printed.") | |
7763 | (license license:expat))) | |
7764 | ||
9f68e74a JL |
7765 | (define-public antlr2 |
7766 | (package | |
7767 | (name "antlr2") | |
7768 | (version "2.7.7") | |
7769 | (source (origin | |
7770 | (method url-fetch) | |
7420c1ee | 7771 | (uri (string-append "https://www.antlr2.org/download/antlr-" |
9f68e74a JL |
7772 | version ".tar.gz")) |
7773 | (sha256 | |
7774 | (base32 | |
7775 | "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5")) | |
7776 | (modules '((guix build utils))) | |
7777 | (snippet | |
7778 | '(begin | |
7779 | (delete-file "antlr.jar") | |
7780 | (substitute* "lib/cpp/antlr/CharScanner.hpp" | |
7781 | (("#include <map>") | |
7782 | (string-append | |
6d225e89 RW |
7783 | "#include <map>\n" |
7784 | "#define EOF (-1)\n" | |
7785 | "#include <strings.h>"))) | |
9f68e74a | 7786 | (substitute* "configure" |
6d225e89 RW |
7787 | (("/bin/sh") "sh")) |
7788 | #t)))) | |
9f68e74a JL |
7789 | (build-system gnu-build-system) |
7790 | (arguments | |
6d225e89 | 7791 | `(#:tests? #f ; no test target |
3ad90395 RW |
7792 | #:imported-modules ((guix build ant-build-system) |
7793 | (guix build syscalls) | |
7794 | ,@%gnu-build-system-modules) | |
7795 | #:modules (((guix build ant-build-system) #:prefix ant:) | |
7796 | (guix build gnu-build-system) | |
7797 | (guix build utils)) | |
9f68e74a JL |
7798 | #:phases |
7799 | (modify-phases %standard-phases | |
7800 | (add-after 'install 'strip-jar-timestamps | |
3ad90395 | 7801 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps)) |
79f6fc0d JL |
7802 | (add-before 'configure 'fix-timestamp |
7803 | (lambda _ | |
7804 | (substitute* "configure" | |
7805 | (("^TIMESTAMP.*") "TIMESTAMP=19700101\n")) | |
7806 | #t)) | |
9f68e74a JL |
7807 | (add-after 'configure 'fix-bin-ls |
7808 | (lambda _ | |
3ad90395 RW |
7809 | (substitute* (find-files "." "Makefile") |
7810 | (("/bin/ls") "ls")) | |
7811 | #t))))) | |
9f68e74a JL |
7812 | (native-inputs |
7813 | `(("which" ,which) | |
7814 | ("zip" ,zip) | |
7815 | ("java" ,icedtea "jdk"))) | |
7816 | (inputs | |
7817 | `(("java" ,icedtea))) | |
7420c1ee | 7818 | (home-page "https://www.antlr2.org") |
9f68e74a JL |
7819 | (synopsis "Framework for constructing recognizers, compilers, and translators") |
7820 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) | |
7821 | is a language tool that provides a framework for constructing recognizers, | |
7822 | compilers, and translators from grammatical descriptions containing Java, C#, | |
7823 | C++, or Python actions. ANTLR provides excellent support for tree construction, | |
7824 | tree walking, and translation.") | |
7825 | (license license:public-domain))) | |
a0f15eff | 7826 | |
e44112e1 | 7827 | (define-public java-stringtemplate-3 |
a0f15eff | 7828 | (package |
e44112e1 | 7829 | (name "java-stringtemplate") |
a0f15eff JL |
7830 | (version "3.2.1") |
7831 | (source (origin | |
7832 | (method url-fetch) | |
7833 | (uri (string-append "https://github.com/antlr/website-st4/raw/" | |
7834 | "gh-pages/download/stringtemplate-" | |
7835 | version ".tar.gz")) | |
7836 | (sha256 | |
7837 | (base32 | |
7838 | "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is")))) | |
7839 | (build-system ant-build-system) | |
7840 | (arguments | |
129d926d | 7841 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
2fcda6d2 | 7842 | #:test-dir "test" |
b101b4e8 RW |
7843 | #:modules ((guix build ant-build-system) |
7844 | (guix build utils) | |
7845 | (srfi srfi-1)) | |
a0f15eff JL |
7846 | #:phases |
7847 | (modify-phases %standard-phases | |
2fcda6d2 RW |
7848 | (add-before 'check 'fix-tests |
7849 | (lambda _ | |
7850 | (substitute* "build.xml" | |
7851 | (("\\$\\{test.home\\}/java") | |
7852 | "${test.home}/org")) | |
7853 | #t)) | |
a0f15eff JL |
7854 | (add-before 'build 'generate-grammar |
7855 | (lambda _ | |
b101b4e8 | 7856 | (with-directory-excursion "src/org/antlr/stringtemplate/language/" |
2c8ac364 MW |
7857 | (for-each (lambda (file) |
7858 | (format #t "~a\n" file) | |
7859 | (invoke "antlr" file)) | |
7860 | '("template.g" "angle.bracket.template.g" "action.g" | |
7861 | "eval.g" "group.g" "interface.g"))) | |
7862 | #t))))) | |
a0f15eff | 7863 | (native-inputs |
2fcda6d2 RW |
7864 | `(("antlr" ,antlr2) |
7865 | ("java-junit" ,java-junit))) | |
ba11a8bd | 7866 | (home-page "https://www.stringtemplate.org") |
a0f15eff JL |
7867 | (synopsis "Template engine to generate formatted text output") |
7868 | (description "StringTemplate is a java template engine (with ports for C#, | |
7869 | Objective-C, JavaScript, Scala) for generating source code, web pages, emails, | |
7870 | or any other formatted text output. StringTemplate is particularly good at | |
7871 | code generators, multiple site skins, and internationalization / localization. | |
7872 | StringTemplate also powers ANTLR.") | |
7873 | (license license:bsd-3))) | |
4ad8aed7 JL |
7874 | |
7875 | ;; antlr3 is partially written using antlr3 grammar files. It also depends on | |
7876 | ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar | |
7877 | ;; files and uses antlr3 at runtime. The latest version requires a recent version | |
7878 | ;; of antlr3 at runtime. | |
7879 | ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3. | |
7880 | ;; This version of ST4 is sufficient for the latest antlr3. | |
7881 | ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build | |
7882 | ;; the latest ST4 with it. Then we build our final antlr3 that will be linked | |
7883 | ;; against the latest ST4. | |
7884 | ;; antlr3.3 still depends on antlr3 to generate some files, so we use an | |
7885 | ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses | |
7886 | ;; only grammar files with the antlr2 syntax. | |
7887 | ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3. | |
7888 | ||
64b7efc0 | 7889 | (define-public java-stringtemplate |
407df789 | 7890 | (package (inherit java-stringtemplate-3) |
64b7efc0 | 7891 | (name "java-stringtemplate") |
4ad8aed7 JL |
7892 | (version "4.0.8") |
7893 | (source (origin | |
7894 | (method url-fetch) | |
7895 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/" | |
7896 | version ".tar.gz")) | |
7897 | (file-name (string-append name "-" version ".tar.gz")) | |
7898 | (sha256 | |
7899 | (base32 | |
7900 | "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087")))) | |
7901 | (build-system ant-build-system) | |
7902 | (arguments | |
6db77c7c RW |
7903 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
7904 | #:tests? #f ; FIXME: tests fail for unknown reasons | |
7905 | #:test-dir "test" | |
f4aa4cfe RW |
7906 | #:modules ((guix build ant-build-system) |
7907 | (guix build utils) | |
7908 | (srfi srfi-1)) | |
4ad8aed7 JL |
7909 | #:phases |
7910 | (modify-phases %standard-phases | |
6db77c7c RW |
7911 | (add-before 'check 'fix-test-target |
7912 | (lambda _ | |
7913 | (substitute* "build.xml" | |
7914 | (("\\$\\{test.home\\}/java") "${test.home}/") | |
7915 | (("\\*Test.java") "Test*.java")) | |
7916 | #t)) | |
4ad8aed7 | 7917 | (add-before 'build 'generate-grammar |
f4aa4cfe RW |
7918 | (lambda _ |
7919 | (with-directory-excursion "src/org/stringtemplate/v4/compiler/" | |
2c8ac364 MW |
7920 | (for-each (lambda (file) |
7921 | (format #t "~a\n" file) | |
7922 | (invoke "antlr3" file)) | |
7923 | '("STParser.g" "Group.g" "CodeGenerator.g"))) | |
7924 | #t))))) | |
4ad8aed7 JL |
7925 | (inputs |
7926 | `(("antlr3" ,antlr3-bootstrap) | |
7927 | ("antlr2" ,antlr2) | |
6db77c7c RW |
7928 | ("java-stringtemplate" ,java-stringtemplate-3) |
7929 | ("java-junit" ,java-junit))))) | |
4ad8aed7 | 7930 | |
1345eeb0 | 7931 | (define java-stringtemplate-4.0.6 |
64b7efc0 | 7932 | (package (inherit java-stringtemplate) |
1345eeb0 | 7933 | (name "java-stringtemplate") |
4ad8aed7 JL |
7934 | (version "4.0.6") |
7935 | (source (origin | |
7936 | (method url-fetch) | |
7937 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-" | |
7938 | version ".tar.gz")) | |
7939 | (file-name (string-append name "-" version ".tar.gz")) | |
7940 | (sha256 | |
7941 | (base32 | |
7942 | "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp")))) | |
7943 | (inputs | |
7944 | `(("antlr3" ,antlr3-3.3) | |
7945 | ("antlr2" ,antlr2) | |
e44112e1 | 7946 | ("java-stringtemplate" ,java-stringtemplate-3))))) |
4ad8aed7 JL |
7947 | |
7948 | (define-public antlr3 | |
7949 | (package | |
7950 | (name "antlr3") | |
7951 | (version "3.5.2") | |
7952 | (source (origin | |
043ee597 EF |
7953 | (method git-fetch) |
7954 | (uri (git-reference | |
7955 | (url "https://github.com/antlr/antlr3") | |
7956 | (commit version))) | |
7957 | (file-name (git-file-name name version)) | |
4ad8aed7 JL |
7958 | (sha256 |
7959 | (base32 | |
043ee597 | 7960 | "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf")))) |
4ad8aed7 JL |
7961 | (build-system ant-build-system) |
7962 | (arguments | |
7963 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
7964 | #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3" | |
7965 | #:tests? #f | |
7966 | #:phases | |
7967 | (modify-phases %standard-phases | |
7968 | (add-after 'install 'bin-install | |
7969 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
7970 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) | |
7971 | (bin (string-append (assoc-ref outputs "out") "/bin"))) | |
7972 | (mkdir-p bin) | |
7973 | (with-output-to-file (string-append bin "/antlr3") | |
7974 | (lambda _ | |
7975 | (display | |
7976 | (string-append "#!" (which "sh") "\n" | |
7977 | "java -cp " jar "/" ,name "-" ,version ".jar:" | |
7978 | (string-concatenate | |
7979 | (find-files (assoc-ref inputs "stringtemplate") | |
7980 | ".*\\.jar")) | |
7981 | ":" | |
7982 | (string-concatenate | |
7983 | (find-files (assoc-ref inputs "stringtemplate4") | |
7984 | ".*\\.jar")) | |
7985 | ":" | |
7986 | (string-concatenate | |
7987 | (find-files (string-append | |
7988 | (assoc-ref inputs "antlr") | |
7989 | "/lib") | |
7990 | ".*\\.jar")) | |
7991 | " org.antlr.Tool $*")))) | |
2c8ac364 MW |
7992 | (chmod (string-append bin "/antlr3") #o755)) |
7993 | #t)) | |
4ad8aed7 JL |
7994 | (add-before 'build 'generate-grammar |
7995 | (lambda _ | |
7996 | (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/") | |
7997 | (for-each (lambda (file) | |
7998 | (display file) | |
7999 | (newline) | |
2c8ac364 | 8000 | (invoke "antlr3" file)) |
4ad8aed7 JL |
8001 | '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g" |
8002 | "AssignTokenTypesWalker.g" | |
8003 | "ActionTranslator.g" "TreeToNFAConverter.g" | |
8004 | "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g" | |
8005 | "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g")) | |
8006 | (substitute* "ANTLRParser.java" | |
8007 | (("public Object getTree") "public GrammarAST getTree")) | |
8008 | (substitute* "ANTLRv3Parser.java" | |
8009 | (("public Object getTree") "public CommonTree getTree")) | |
8010 | (chdir "../../../../../java") | |
4ad8aed7 JL |
8011 | (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java" |
8012 | (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*; | |
8013 | import org.antlr.grammar.v3.ANTLRTreePrinter;")) | |
8014 | (substitute* "org/antlr/tool/ErrorManager.java" | |
8015 | (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") "")) | |
2c8ac364 MW |
8016 | (chdir "../../../..") |
8017 | #t)) | |
4ad8aed7 JL |
8018 | (add-before 'build 'fix-build-xml |
8019 | (lambda _ | |
8020 | (substitute* "build.xml" | |
570f3b63 JL |
8021 | (("target name=\"compile\">") |
8022 | "target name=\"compile\"> | |
8023 | <copy todir=\"${classes.dir}\"> | |
4ad8aed7 JL |
8024 | <fileset dir=\"tool/src/main/resources\"> |
8025 | <include name=\"**/*.stg\"/> | |
8026 | <include name=\"**/*.st\"/> | |
8027 | <include name=\"**/*.sti\"/> | |
8028 | <include name=\"**/STLexer.tokens\"/> | |
8029 | </fileset> | |
570f3b63 | 8030 | </copy>")) |
2c8ac364 | 8031 | #t))))) |
4ad8aed7 JL |
8032 | (native-inputs |
8033 | `(("antlr" ,antlr2) | |
8034 | ("antlr3" ,antlr3-bootstrap))) | |
8035 | (inputs | |
8036 | `(("junit" ,java-junit) | |
e44112e1 | 8037 | ("stringtemplate" ,java-stringtemplate-3) |
64b7efc0 | 8038 | ("stringtemplate4" ,java-stringtemplate))) |
4ad8aed7 | 8039 | (propagated-inputs |
e44112e1 | 8040 | `(("stringtemplate" ,java-stringtemplate-3) |
4ad8aed7 | 8041 | ("antlr" ,antlr2) |
1345eeb0 | 8042 | ("stringtemplate4" ,java-stringtemplate-4.0.6))) |
a264250b | 8043 | (home-page "https://www.antlr3.org") |
4ad8aed7 JL |
8044 | (synopsis "Framework for constructing recognizers, compilers, and translators") |
8045 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) | |
8046 | is a language tool that provides a framework for constructing recognizers, | |
8047 | compilers, and translators from grammatical descriptions containing Java, C#, | |
8048 | C++, or Python actions. ANTLR provides excellent support for tree construction, | |
8049 | tree walking, and translation.") | |
8050 | (license license:bsd-3))) | |
8051 | ||
8052 | (define antlr3-bootstrap | |
8053 | (package | |
8054 | (inherit antlr3) | |
8055 | (name "antlr3-bootstrap") | |
8056 | (native-inputs | |
8057 | `(("antlr" ,antlr2) | |
8058 | ("antlr3" ,antlr3-3.3))) | |
8059 | (inputs | |
8060 | `(("junit" ,java-junit))))) | |
8061 | ||
011f9412 | 8062 | (define-public antlr3-3.3 |
4ad8aed7 JL |
8063 | (package |
8064 | (inherit antlr3) | |
8065 | (name "antlr3") | |
8066 | (version "3.3") | |
8067 | (source (origin | |
8068 | (method url-fetch) | |
8069 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" | |
8070 | "gh-pages/download/antlr-" | |
8071 | version ".tar.gz")) | |
8072 | (sha256 | |
8073 | (base32 | |
48c86220 GB |
8074 | "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m")) |
8075 | (patches | |
8076 | (search-patches "antlr3-3_3-fix-java8-compilation.patch")))) | |
4ad8aed7 JL |
8077 | (arguments |
8078 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
a9540107 RW |
8079 | #:source-dir (string-join '("tool/src/main/java" |
8080 | "runtime/Java/src/main/java" | |
8081 | "tool/src/main/antlr2" | |
8082 | "tool/src/main/antlr3") | |
8083 | ":") | |
8084 | #:tests? #f ; FIXME: tests seem to require maven plugin | |
8085 | #:modules ((guix build ant-build-system) | |
8086 | (guix build utils) | |
8087 | (srfi srfi-1)) | |
4ad8aed7 JL |
8088 | #:phases |
8089 | (modify-phases %standard-phases | |
8090 | (add-after 'install 'bin-install | |
8091 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
a9540107 RW |
8092 | (let* ((out (assoc-ref outputs "out")) |
8093 | (jar (string-append out "/share/java")) | |
8094 | (bin (string-append out "/bin"))) | |
4ad8aed7 JL |
8095 | (mkdir-p bin) |
8096 | (with-output-to-file (string-append bin "/antlr3") | |
8097 | (lambda _ | |
8098 | (display | |
a9540107 RW |
8099 | (string-append |
8100 | "#!" (which "sh") "\n" | |
8101 | "java -cp " jar "/antlr3-3.3.jar:" | |
8102 | (string-join | |
8103 | (append (find-files (assoc-ref inputs "java-stringtemplate") | |
8104 | ".*\\.jar$") | |
8105 | (find-files (string-append (assoc-ref inputs "antlr") | |
8106 | "/lib") | |
8107 | ".*\\.jar$")) | |
8108 | ":") | |
8109 | " org.antlr.Tool $*")))) | |
8110 | (chmod (string-append bin "/antlr3") #o755) | |
8111 | #t))) | |
4ad8aed7 JL |
8112 | (add-before 'build 'generate-grammar |
8113 | (lambda _ | |
4ad8aed7 JL |
8114 | (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java" |
8115 | (("import org.antlr.grammar.v2.\\*;") | |
8116 | "import org.antlr.grammar.v2.*;\n | |
8117 | import org.antlr.grammar.v2.TreeToNFAConverter;\n | |
8118 | import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n | |
a9540107 | 8119 | import org.antlr.grammar.v2.ANTLRTreePrinter;")) |
2c8ac364 MW |
8120 | (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/" |
8121 | (for-each (lambda (file) | |
8122 | (format #t "~a\n" file) | |
8123 | (invoke "antlr" file)) | |
8124 | '("antlr.g" "antlr.print.g" "assign.types.g" | |
8125 | "buildnfa.g" "codegen.g" "define.g"))) | |
8126 | (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/" | |
8127 | (for-each (lambda (file) | |
8128 | (format #t "~a\n" file) | |
8129 | (invoke "antlr3" file)) | |
8130 | '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g" | |
8131 | "ANTLRv3Tree.g"))) | |
8132 | #t)) | |
4ad8aed7 JL |
8133 | (add-before 'build 'fix-build-xml |
8134 | (lambda _ | |
8135 | (substitute* "build.xml" | |
570f3b63 JL |
8136 | (("target name=\"compile\">") |
8137 | "target name=\"compile\"> | |
8138 | <copy todir=\"${classes.dir}\"> | |
4ad8aed7 JL |
8139 | <fileset dir=\"tool/src/main/resources\"> |
8140 | <include name=\"**/*.stg\"/> | |
8141 | <include name=\"**/*.st\"/> | |
8142 | <include name=\"**/*.sti\"/> | |
8143 | <include name=\"**/STLexer.tokens\"/> | |
8144 | </fileset> | |
570f3b63 | 8145 | </copy>")) |
a9540107 | 8146 | #t))))) |
4ad8aed7 JL |
8147 | (native-inputs |
8148 | `(("antlr" ,antlr2) | |
8149 | ("antlr3" ,antlr3-3.1))) | |
8150 | (inputs | |
8151 | `(("junit" ,java-junit))) | |
8152 | (propagated-inputs | |
e44112e1 | 8153 | `(("java-stringtemplate" ,java-stringtemplate-3) |
dcd62e8b | 8154 | ("antlr" ,antlr2))))) |
4ad8aed7 | 8155 | |
570f3b63 | 8156 | (define-public antlr3-3.1 |
4ad8aed7 JL |
8157 | (package |
8158 | (inherit antlr3) | |
4ad8aed7 JL |
8159 | (version "3.1") |
8160 | (source (origin | |
8161 | (method url-fetch) | |
8162 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" | |
8163 | "gh-pages/download/antlr-" | |
8164 | version ".tar.gz")) | |
8165 | (sha256 | |
8166 | (base32 | |
4c763b4d GB |
8167 | "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z")) |
8168 | (patches | |
8169 | (search-patches "antlr3-3_1-fix-java8-compilation.patch")))) | |
4ad8aed7 | 8170 | (arguments |
ec32bc98 | 8171 | `(#:jar-name (string-append "antlr3-" ,version ".jar") |
4ad8aed7 JL |
8172 | #:source-dir "src:runtime/Java/src" |
8173 | #:tests? #f | |
8174 | #:phases | |
8175 | (modify-phases %standard-phases | |
8176 | (add-after 'install 'bin-install | |
8177 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
8178 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) | |
8179 | (bin (string-append (assoc-ref outputs "out") "/bin"))) | |
8180 | (mkdir-p bin) | |
8181 | (with-output-to-file (string-append bin "/antlr3") | |
8182 | (lambda _ | |
8183 | (display | |
8184 | (string-append "#!" (which "sh") "\n" | |
57e37764 | 8185 | "java -cp " jar "/antlr3-3.1.jar:" |
4ad8aed7 JL |
8186 | (string-concatenate |
8187 | (find-files (assoc-ref inputs "stringtemplate") | |
8188 | ".*\\.jar")) | |
8189 | ":" | |
8190 | (string-concatenate | |
8191 | (find-files (string-append | |
8192 | (assoc-ref inputs "antlr") | |
8193 | "/lib") | |
8194 | ".*\\.jar")) | |
8195 | " org.antlr.Tool $*")))) | |
2c8ac364 MW |
8196 | (chmod (string-append bin "/antlr3") #o755)) |
8197 | #t)) | |
4ad8aed7 JL |
8198 | (add-before 'build 'generate-grammar |
8199 | (lambda _ | |
8200 | (let ((dir "src/org/antlr/tool/")) | |
8201 | (for-each (lambda (file) | |
8202 | (display file) | |
8203 | (newline) | |
13f38d31 | 8204 | (invoke "antlr" "-o" dir (string-append dir file))) |
4ad8aed7 JL |
8205 | '("antlr.g" "antlr.print.g" "assign.types.g" |
8206 | "buildnfa.g" "define.g"))) | |
8207 | (format #t "codegen.g\n") | |
13f38d31 RW |
8208 | (invoke "antlr" "-o" "src/org/antlr/codegen" |
8209 | "src/org/antlr/codegen/codegen.g") | |
8210 | #t)) | |
4ad8aed7 JL |
8211 | (add-before 'build 'fix-build-xml |
8212 | (lambda _ | |
8213 | (substitute* "build.xml" | |
570f3b63 JL |
8214 | (("target name=\"compile\">") |
8215 | "target name=\"compile\"> | |
8216 | <copy todir=\"${classes.dir}\"> | |
4ad8aed7 JL |
8217 | <fileset dir=\"src\"> |
8218 | <include name=\"**/*.stg\"/> | |
8219 | <include name=\"**/*.st\"/> | |
8220 | <include name=\"**/*.sti\"/> | |
8221 | <include name=\"**/STLexer.tokens\"/> | |
8222 | </fileset> | |
570f3b63 | 8223 | </copy>")) |
2c8ac364 | 8224 | #t))))) |
4ad8aed7 JL |
8225 | (native-inputs |
8226 | `(("antlr" ,antlr2))) | |
8227 | (inputs | |
8228 | `(("junit" ,java-junit))) | |
8229 | (propagated-inputs | |
e44112e1 | 8230 | `(("stringtemplate" ,java-stringtemplate-3))))) |
d44bcd7a | 8231 | |
1d630fe0 JL |
8232 | (define-public java-treelayout |
8233 | (package | |
8234 | (name "java-treelayout") | |
8235 | (version "1.0.3") | |
8236 | (source (origin | |
8237 | (method git-fetch) | |
8238 | (uri (git-reference | |
8239 | (url "https://github.com/abego/treelayout") | |
8240 | (commit (string-append "v" version)))) | |
8241 | (file-name (git-file-name name version)) | |
8242 | (sha256 | |
8243 | (base32 | |
8244 | "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak")))) | |
8245 | (build-system ant-build-system) | |
8246 | (arguments | |
8247 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
8248 | #:source-dir "org.abego.treelayout/src/main/java" | |
8249 | #:test-dir "org.abego.treelayout/src/test")) | |
8250 | (inputs | |
8251 | `(("java-junit" ,java-junit))) | |
8252 | (native-inputs | |
8253 | `(("java-hamcrest-core" ,java-hamcrest-core))) | |
8254 | (home-page "http://treelayout.sourceforge.net") | |
8255 | (synopsis "Tree Layout Algorithm in Java") | |
8256 | (description "TreeLayout creates tree layouts for arbitrary trees. It is | |
8257 | not restricted to a specific output or format, but can be used for any kind of | |
8258 | two dimensional diagram. Examples are Swing based components, SVG files, etc. | |
8259 | This is possible because TreeLayout separates the layout of a tree from the | |
8260 | actual rendering.") | |
8261 | (license license:bsd-3))) | |
8262 | ||
5d115440 JL |
8263 | (define-public java-antlr4-runtime |
8264 | (package | |
8265 | (name "java-antlr4-runtime") | |
8266 | (version "4.8") | |
8267 | (source (origin | |
8268 | (method git-fetch) | |
8269 | (uri (git-reference | |
8270 | (url "https://github.com/antlr/antlr4") | |
8271 | (commit version))) | |
8272 | (file-name (git-file-name name version)) | |
8273 | (sha256 | |
8274 | (base32 | |
8275 | "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m")) | |
8276 | (patches | |
8277 | (search-patches "java-antlr4-Add-standalone-generator.patch" | |
8278 | "java-antlr4-fix-code-too-large.java")))) | |
8279 | (build-system ant-build-system) | |
8280 | (arguments | |
8281 | `(#:jar-name "java-antlr4-runtime.jar" | |
8282 | #:source-dir "runtime/Java/src/org" | |
8283 | #:tests? #f; tests depend on java-antlr4 itself | |
8284 | #:phases | |
8285 | (modify-phases %standard-phases | |
8286 | (add-before 'build 'copy-resources | |
8287 | (lambda _ | |
8288 | (copy-recursively "runtime/Java/src/main/dot" | |
8289 | "build/classes") | |
8290 | #t))))) | |
ff0725f6 | 8291 | (home-page "https://www.antlr.org") |
5d115440 JL |
8292 | (synopsis "ANTLR runtime library") |
8293 | (description "This package contains the runtime library used with generated | |
8294 | sources by ANTLR.") | |
8295 | (license license:bsd-3))) | |
8296 | ||
f9a6e389 JL |
8297 | (define-public antlr4 |
8298 | (package | |
8299 | (inherit java-antlr4-runtime) | |
8300 | (name "antlr4") | |
8301 | (arguments | |
8302 | `(#:jar-name "antlr4.jar" | |
8303 | #:source-dir "tool/src" | |
8304 | #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src" | |
8305 | #:test-include (list "**/Test*.java") | |
8306 | #:test-exclude (list | |
8307 | ;; no runnable method | |
8308 | "**/TestOutputReading.java" | |
8309 | ;; no @Test methods | |
8310 | "**/TestParserErrors.java" | |
8311 | "**/TestSemPredEvalParser.java" | |
8312 | "**/TestSets.java" | |
8313 | "**/TestListeners.java" | |
8314 | "**/TestParseTrees.java" | |
8315 | "**/TestParserExec.java" | |
8316 | "**/TestLexerErrors.java" | |
8317 | "**/TestPerformance.java" | |
8318 | "**/TestCompositeParsers.java" | |
8319 | "**/TestLexerExec.java" | |
8320 | "**/TestSemPredEvalLexer.java" | |
8321 | "**/TestLeftRecursion.java" | |
8322 | "**/TestFullContextParsing.java" | |
8323 | "**/TestCompositeLexers.java" | |
8324 | ;; Null pointer exception | |
8325 | "**/TestCompositeGrammars.java" | |
8326 | ;; Wrong assumption on emoji | |
8327 | "**/TestUnicodeData.java") | |
8328 | #:phases | |
8329 | (modify-phases %standard-phases | |
8330 | (add-before 'build 'fix-build.xml | |
8331 | (lambda _ | |
8332 | ;; tests are not in a java subdirectory | |
8333 | (substitute* "build.xml" | |
8334 | (("\\$\\{test.home\\}/java") "${test.home}")) | |
8335 | #t)) | |
8336 | ;; tests require to have a working antlr4 binary | |
8337 | (delete 'check) | |
8338 | (add-after 'bin-install 'check | |
8339 | (lambda _ | |
8340 | (invoke "ant" "compile-tests") | |
8341 | (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src") | |
8342 | (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test") | |
8343 | (invoke "ant" "check" "-Dtest.home=tool-testsuite/test") | |
8344 | #t)) | |
8345 | (add-before 'check 'remove-unrelated-languages | |
8346 | (lambda _ | |
8347 | ;; There are tests for other languages that ANTLR can generate, but | |
8348 | ;; we don't have the infrastructure for that yet. Let's test Java | |
8349 | ;; generation only. | |
8350 | (for-each | |
8351 | (lambda (language) | |
8352 | (delete-file-recursively | |
8353 | (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/" | |
8354 | language))) | |
8355 | '("cpp" "csharp" "go" "javascript" "php" "python" "python2" | |
8356 | "python3" "swift")) | |
8357 | #t)) | |
8358 | (add-before 'check 'generate-test-parsers | |
8359 | (lambda* (#:key outputs #:allow-other-keys) | |
8360 | (define (run-antlr dir filename package) | |
8361 | (invoke "antlr4" "-lib" dir "-visitor" "-no-listener" | |
8362 | "-package" package (string-append dir "/" filename) | |
8363 | "-Xlog")) | |
8364 | (setenv "PATH" (string-append (getenv "PATH") ":" | |
8365 | (assoc-ref outputs "out") "/bin")) | |
8366 | (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api" | |
8367 | "Java.g4" "org.antlr.v4.test.runtime.java.api") | |
8368 | (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api" | |
8369 | "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api") | |
8370 | (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api" | |
8371 | "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api") | |
8372 | #t)) | |
8373 | (add-before 'check 'remove-graphemes | |
8374 | (lambda _ | |
8375 | ;; When running antlr on grahemes.g4, we get a runtime exception: | |
8376 | ;; set is empty. So delete the file that depends on it. | |
8377 | (delete-file | |
8378 | "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java") | |
8379 | #t)) | |
8380 | (add-after 'install 'bin-install | |
8381 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
8382 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) | |
8383 | (bin (string-append (assoc-ref outputs "out") "/bin"))) | |
8384 | (mkdir-p bin) | |
8385 | (with-output-to-file (string-append bin "/antlr4") | |
8386 | (lambda _ | |
8387 | (display | |
8388 | (string-append "#!" (which "sh") "\n" | |
8389 | "java -cp " jar "/antlr4.jar:" | |
8390 | (string-join | |
8391 | (apply | |
8392 | append | |
8393 | (map | |
8394 | (lambda (input) | |
8395 | (find-files (assoc-ref inputs input) | |
8396 | ".*\\.jar")) | |
8397 | '("antlr3" "java-stringtemplate" | |
8398 | "java-antlr4-runtime" "java-treelayout" | |
8399 | "java-jsonp-api" "java-icu4j"))) | |
8400 | ":") | |
8401 | " org.antlr.v4.Tool $*")))) | |
8402 | (chmod (string-append bin "/antlr4") #o755) | |
8403 | #t))) | |
8404 | (add-before 'build 'copy-resources | |
8405 | (lambda _ | |
8406 | (copy-recursively "tool/resources/" "build/classes") | |
8407 | #t)) | |
8408 | (add-before 'build 'generate-unicode | |
8409 | (lambda _ | |
8410 | ;; First: build the generator | |
8411 | (invoke "javac" "-cp" (getenv "CLASSPATH") | |
8412 | "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java" | |
8413 | "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java") | |
8414 | ;; Then use it | |
8415 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
8416 | ":tool/src:runtime/Java") | |
8417 | "org.antlr.v4.unicode.UnicodeRenderer" | |
8418 | "tool/resources/org/antlr/v4/tool/templates" | |
8419 | "unicodedata" | |
8420 | "tool/src/org/antlr/v4/unicode/UnicodeData.java") | |
8421 | ;; It seems there is a bug with our ST4 | |
8422 | (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java" | |
8423 | (("\\\\>") ">")) | |
8424 | ;; Remove the additional file | |
8425 | (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java") | |
8426 | #t)) | |
8427 | (add-before 'build 'generate-grammar | |
8428 | (lambda* (#:key inputs #:allow-other-keys) | |
8429 | (with-directory-excursion "tool/src/org/antlr/v4/parse" | |
8430 | (for-each (lambda (file) | |
8431 | (display file) | |
8432 | (newline) | |
8433 | (invoke "antlr3" file)) | |
8434 | '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g" | |
8435 | "GrammarTreeVisitor.g" "ATNBuilder.g" | |
8436 | "ActionSplitter.g" "LeftRecursiveRuleWalker.g"))) | |
8437 | (with-directory-excursion "tool/src/org/antlr/v4/codegen" | |
8438 | (install-file "../parse/ANTLRParser.tokens" ".") | |
8439 | (display "SourceGenTriggers.g\n") | |
8440 | (invoke "antlr3" "SourceGenTriggers.g")) | |
8441 | #t))))) | |
8442 | (inputs | |
8443 | `(("antlr3" ,antlr3) | |
8444 | ("java-antlr4-runtime" ,java-antlr4-runtime) | |
8445 | ("java-icu4j" ,java-icu4j) | |
8446 | ("java-jsonp-api" ,java-jsonp-api) | |
8447 | ("java-stringtemplate" ,java-stringtemplate) | |
8448 | ("java-treelayout" ,java-treelayout))) | |
8449 | (native-inputs | |
8450 | `(("java-junit" ,java-junit))) | |
8451 | (synopsis "Parser and lexer generator in Java") | |
8452 | (description "ANTLR (ANother Tool for Language Recognition) is a powerful | |
8453 | parser generator for reading, processing, executing, or translating structured | |
8454 | text or binary files. It's widely used to build languages, tools, and | |
8455 | frameworks. From a grammar, ANTLR generates a parser that can build and walk | |
8456 | parse trees."))) | |
8457 | ||
57f6a915 JL |
8458 | (define-public java-antlr4-runtime-4.1 |
8459 | (package | |
8460 | (inherit java-antlr4-runtime) | |
8461 | (version "4.1") | |
8462 | (source (origin | |
8463 | (method git-fetch) | |
8464 | (uri (git-reference | |
8465 | (url "https://github.com/antlr/antlr4") | |
8466 | (commit version))) | |
8467 | (file-name (git-file-name "antlr4" version)) | |
8468 | (sha256 | |
8469 | (base32 | |
8470 | "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1")))) | |
8471 | (arguments | |
8472 | (substitute-keyword-arguments (package-arguments java-antlr4-runtime) | |
8473 | ((#:phases phases) | |
8474 | `(modify-phases ,phases | |
8475 | (add-before 'configure 'chmod | |
8476 | (lambda _ | |
8477 | (chmod "build.xml" #o644) | |
8478 | #t)))))) | |
8479 | (inputs | |
8480 | `(("java-treelayout" ,java-treelayout))))) | |
8481 | ||
77ae4145 JL |
8482 | (define-public antlr4-4.1 |
8483 | (package | |
8484 | (inherit antlr4) | |
8485 | (version (package-version java-antlr4-runtime-4.1)) | |
8486 | (source (package-source java-antlr4-runtime-4.1)) | |
8487 | (arguments | |
8488 | (substitute-keyword-arguments (package-arguments antlr4) | |
8489 | ((#:test-dir _) | |
8490 | "tool/test") | |
8491 | ((#:test-exclude excludes) | |
8492 | `(list "**/TestParseErrors.java" | |
8493 | "**/TestTopologicalSort.java" | |
8494 | ,@excludes)) | |
8495 | ((#:phases phases) | |
8496 | `(modify-phases ,phases | |
8497 | (delete 'generate-unicode) | |
8498 | (replace 'check | |
8499 | (lambda _ | |
8500 | (invoke "ant" "check") | |
8501 | #t)) | |
8502 | (add-before 'configure 'chmod | |
8503 | (lambda _ | |
8504 | (chmod "build.xml" #o644) | |
8505 | #t)) | |
8506 | (delete 'remove-graphemes) | |
8507 | (delete 'remove-unrelated-languages) | |
8508 | (delete 'generate-test-parsers))))) | |
8509 | (inputs | |
8510 | (alist-replace | |
8511 | "java-antlr4-runtime" (list java-antlr4-runtime-4.1) | |
8512 | (package-inputs antlr4))))) | |
8513 | ||
7d26b017 JL |
8514 | (define-public java-tunnelvisionlabs-antlr4-runtime-annotations |
8515 | (package | |
8516 | (inherit java-antlr4-runtime) | |
8517 | (name "java-tunnelvisionlabs-antlr4-runtime-annotations") | |
8518 | (version "4.7.4") | |
8519 | (source (origin | |
8520 | (method git-fetch) | |
8521 | (uri (git-reference | |
8522 | (url "https://github.com/tunnelvisionlabs/antlr4") | |
8523 | (commit (string-append version "-opt")))) | |
8524 | (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version)) | |
8525 | (sha256 | |
8526 | (base32 | |
8527 | "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8")) | |
8528 | (patches | |
8529 | (search-patches "java-antlr4-Add-standalone-generator.patch" | |
8530 | "java-tunnelvisionlabs-antlr-code-too-large.patch")))) | |
8531 | (arguments | |
8532 | `(#:jar-name "java-antlr4-runtime-annotations.jar" | |
8533 | #:source-dir "runtime/JavaAnnotations/src" | |
8534 | #:tests? #f; no tests | |
8535 | #:phases | |
8536 | (modify-phases %standard-phases | |
8537 | (add-after 'build 'copy-resources | |
8538 | (lambda _ | |
8539 | (copy-recursively "runtime/JavaAnnotations/resources" | |
8540 | "build/classes") | |
8541 | #t)) | |
8542 | (add-after 'copy-resources 'rebuild-jar | |
8543 | (lambda _ | |
8544 | (invoke "ant" "jar") | |
8545 | #t))))) | |
8546 | (inputs '()) | |
8547 | (native-inputs '()) | |
8548 | (synopsis "Annotations for ANTLR's runtime library") | |
8549 | (description "This package contains annotations used during the build of | |
8550 | the runtime library of ANTLR."))) | |
8551 | ||
ac292a1a JL |
8552 | ;; the runtime of this library requires a lexer that is generated by antlr4. |
8553 | ;; However, antlr4 itself requires this library at build and run-time. We | |
8554 | ;; use antlr4@4.1, the closest version of antlr that doesn't need this | |
8555 | ;; bootstrap process, to generate the lexer. The generated lexer is built | |
8556 | ;; for the 4.1 runtime, which is slightly different from this runtime. | |
8557 | ;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we | |
8558 | ;; use to build antlr4. We then re-use this antlr4 to build the runtime, and | |
8559 | ;; the proper, working, runtime to build antlr4 again. | |
8560 | (define java-tunnelvisionlabs-antlr4-runtime-bootstrap | |
8561 | (package | |
8562 | (inherit java-antlr4-runtime) | |
8563 | (name "java-tunnelvisionlabs-antlr4-runtime") | |
8564 | (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations)) | |
8565 | (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations)) | |
8566 | (arguments | |
8567 | `(#:jar-name "java-antlr4-runtime.jar" | |
8568 | #:source-dir "runtime/Java/src" | |
8569 | #:tests? #f; tests require antlr4, but antlr4 depends on this package | |
8570 | #:phases | |
8571 | (modify-phases %standard-phases | |
8572 | (add-before 'build 'generate-xpath-lexer | |
8573 | (lambda _ | |
8574 | (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath" | |
8575 | "-visitor" "-no-listener" | |
8576 | "-package" "org.antlr.v4.runtime.tree.xpath" | |
8577 | "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4") | |
8578 | ;; Generated code is for an incompatible version of the runtime | |
8579 | (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java" | |
8580 | (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)") | |
8581 | "LexerATNSimulator(this,_ATN)")) | |
8582 | #t)) | |
8583 | (add-before 'build 'copy-resources | |
8584 | (lambda _ | |
8585 | (copy-recursively "runtime/Java/src/main/dot" | |
8586 | "build/classes") | |
8587 | #t))))) | |
8588 | (native-inputs | |
8589 | `(("antlr4" ,antlr4-4.1) | |
8590 | ("java-tunnelvisionlabs-antlr4-runtime-annotations" | |
8591 | ,java-tunnelvisionlabs-antlr4-runtime-annotations))))) | |
8592 | ||
8593 | (define java-tunnelvisionlabs-antlr4-bootstrap | |
8594 | (package | |
8595 | (inherit antlr4) | |
8596 | (name "java-tunnelvisionlabs-antlr4") | |
8597 | (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations)) | |
8598 | (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations)) | |
8599 | (arguments | |
8600 | (substitute-keyword-arguments (package-arguments antlr4) | |
8601 | ((#:test-dir _) | |
8602 | "tool/test:runtime-testsuite/src") | |
8603 | ((#:phases phases) | |
8604 | `(modify-phases ,phases | |
8605 | (delete 'remove-unrelated-languages) | |
8606 | (delete 'remove-graphemes) | |
8607 | (delete 'generate-test-parsers) | |
8608 | (delete 'check))))) | |
8609 | (native-inputs '()) | |
8610 | (inputs | |
8611 | `(("antlr3" ,antlr3) | |
8612 | ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap) | |
8613 | ("java-tunnelvisionlabs-antlr4-runtime-annotations" | |
8614 | ,java-tunnelvisionlabs-antlr4-runtime-annotations) | |
8615 | ("java-icu4j" ,java-icu4j) | |
8616 | ("java-jsonp-api" ,java-jsonp-api) | |
8617 | ("java-stringtemplate" ,java-stringtemplate) | |
8618 | ("java-treelayout" ,java-treelayout))))) | |
8619 | ||
8620 | (define-public java-tunnelvisionlabs-antlr4-runtime | |
8621 | (package | |
8622 | (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap) | |
8623 | (native-inputs | |
8624 | (alist-replace | |
8625 | "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap) | |
8626 | (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap))))) | |
8627 | ||
7896630f JL |
8628 | (define-public java-tunnelvisionlabs-antlr4 |
8629 | (package | |
8630 | (inherit java-tunnelvisionlabs-antlr4-bootstrap) | |
8631 | (inputs | |
8632 | (alist-replace | |
8633 | "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime) | |
8634 | (package-inputs java-tunnelvisionlabs-antlr4-bootstrap))))) | |
8635 | ||
742242a5 GB |
8636 | (define-public java-commons-cli-1.2 |
8637 | ;; This is a bootstrap dependency for Maven2. | |
8638 | (package | |
8639 | (inherit java-commons-cli) | |
8640 | (version "1.2") | |
8641 | (source (origin | |
8642 | (method url-fetch) | |
8643 | (uri (string-append "mirror://apache/commons/cli/source/" | |
8644 | "commons-cli-" version "-src.tar.gz")) | |
8645 | (sha256 | |
8646 | (base32 | |
8647 | "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm")))) | |
8648 | (arguments | |
8649 | `(#:jar-name "commons-cli.jar" | |
8650 | #:phases | |
8651 | (modify-phases %standard-phases | |
8652 | (add-before 'check 'fix-build-xml | |
8653 | (lambda* (#:key inputs #:allow-other-keys) | |
8654 | (substitute* "build.xml" | |
8655 | (("dir=\"\\$\\{test.home\\}/java\"") | |
8656 | "dir=\"${test.home}\"")) | |
8657 | #t))))) | |
8658 | (native-inputs | |
8659 | `(("java-junit" ,java-junit))))) | |
30deadee JL |
8660 | |
8661 | (define-public java-microemulator-cldc | |
8662 | (package | |
8663 | (name "java-microemulator-cldc") | |
8664 | (version "2.0.4") | |
8665 | (source (origin | |
8666 | (method url-fetch) | |
8667 | (uri (string-append "https://github.com/barteo/microemu/archive/" | |
8668 | "microemulator_" | |
8669 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) | |
8670 | version) | |
8671 | ".tar.gz")) | |
8672 | (file-name (string-append name "-" version ".tar.gz")) | |
8673 | (sha256 | |
8674 | (base32 | |
8675 | "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll")))) | |
8676 | (build-system ant-build-system) | |
8677 | (arguments | |
8678 | `(#:jar-name "microemulator-cldc.jar" | |
8679 | #:source-dir "microemu-cldc/src/main/java" | |
8680 | #:tests? #f)); Requires even older software | |
8681 | (home-page "https://github.com/barteo/microemu") | |
8682 | (synopsis "J2ME CLDC emulator") | |
8683 | (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP | |
60738bdc | 8684 | Emulator. It demonstrates MIDlet based applications in web browser |
30deadee JL |
8685 | applet and can be run as a standalone java application.") |
8686 | (license (list license:asl2.0 | |
8687 | ;; or altenatively: | |
8688 | license:lgpl2.1+)))) | |
8e2f3e5e JL |
8689 | |
8690 | (define-public java-datanucleus-javax-persistence | |
8691 | (package | |
8692 | (name "java-datanucleus-javax-persistence") | |
8693 | (version "2.2.0") | |
8694 | (source (origin | |
8695 | (method url-fetch) | |
8696 | (uri (string-append "https://github.com/datanucleus/" | |
8697 | "javax.persistence/archive/javax.persistence-" | |
8698 | version "-release.tar.gz")) | |
8699 | (sha256 | |
8700 | (base32 | |
8701 | "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx")))) | |
8702 | (build-system ant-build-system) | |
8703 | (arguments | |
8704 | `(#:jar-name "java-datanucleus-javax-persistence.jar" | |
8705 | #:jdk ,icedtea-8 | |
8706 | #:source-dir "src/main/java" | |
8707 | #:tests? #f)); no tests | |
8708 | (home-page "https://github.com/datanucleus/javax.persistence") | |
8709 | (synopsis "JPA API") | |
8710 | (description "This package contains a clean definition of JPA API intended | |
8711 | for use with DataNucleus JPA since the JCP haven't provided an official JPA API | |
8712 | jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification | |
8713 | used to generate this API.") | |
8714 | (license (list license:edl1.0 license:epl1.0)))) | |
3240ddbf JL |
8715 | |
8716 | (define-public java-osgi-cmpn | |
8717 | (package | |
8718 | (name "java-osgi-cmpn") | |
8719 | (version "6.0.0") | |
8720 | (source (origin | |
8721 | (method url-fetch) | |
7779ad50 | 8722 | (uri (string-append "https://repo1.maven.org/maven2/" |
3240ddbf JL |
8723 | "org/osgi/osgi.cmpn/" version "/osgi.cmpn-" |
8724 | version "-sources.jar")) | |
8725 | (sha256 | |
8726 | (base32 | |
8727 | "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys")))) | |
8728 | (build-system ant-build-system) | |
8729 | (arguments | |
8730 | `(#:jar-name "osgi-cmpn.jar" | |
8731 | #:tests? #f)); no tests | |
8732 | (inputs | |
8733 | `(("annotation" ,java-osgi-annotation) | |
8734 | ("core" ,java-osgi-core) | |
8735 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) | |
8736 | ("microemulator" ,java-microemulator-cldc) | |
8737 | ("servlet" ,java-classpathx-servletapi))) | |
c353d014 | 8738 | (home-page "https://www.osgi.org") |
3240ddbf JL |
8739 | (synopsis "Compendium specification module of OSGi framework") |
8740 | (description | |
8741 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8742 | and service platform for the Java programming language. This package contains | |
8743 | the compendium specification module, providing interfaces and classes for use | |
8744 | in compiling bundles.") | |
8745 | (license license:asl2.0))) | |
747c7574 JL |
8746 | |
8747 | (define-public java-osgi-service-component-annotations | |
8748 | (package | |
8749 | (name "java-osgi-service-component-annotations") | |
8750 | (version "1.3.0") | |
8751 | (source (origin | |
8752 | (method url-fetch) | |
fa315559 | 8753 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
747c7574 JL |
8754 | "org.osgi.service.component.annotations/" |
8755 | version "/org.osgi.service.component.annotations-" | |
8756 | version "-sources.jar")) | |
8757 | (sha256 | |
8758 | (base32 | |
8759 | "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0")))) | |
8760 | (build-system ant-build-system) | |
8761 | (arguments | |
8762 | `(#:jar-name "osgi-service-component-annotations.jar" | |
8763 | #:tests? #f)); no tests | |
8764 | (inputs | |
8765 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 8766 | (home-page "https://www.osgi.org") |
747c7574 JL |
8767 | (synopsis "Support annotations for osgi-service-component") |
8768 | (description | |
8769 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8770 | and service platform for the Java programming language. This package contains | |
8771 | the support annotations for osgi-service-component.") | |
8772 | (license license:asl2.0))) | |
999b5fb4 JL |
8773 | |
8774 | (define-public java-osgi-dto | |
8775 | (package | |
8776 | (name "java-osgi-dto") | |
8777 | (version "1.0.0") | |
8778 | (source (origin | |
8779 | (method url-fetch) | |
fc1c5dbd | 8780 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
999b5fb4 JL |
8781 | "org.osgi.dto/" version "/org.osgi.dto-" |
8782 | version "-sources.jar")) | |
8783 | (sha256 | |
8784 | (base32 | |
8785 | "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr")))) | |
8786 | (build-system ant-build-system) | |
8787 | (arguments | |
8788 | `(#:jar-name "osgi-dto.jar" | |
8789 | #:tests? #f)); no tests | |
8790 | (inputs | |
8791 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 8792 | (home-page "https://www.osgi.org") |
999b5fb4 JL |
8793 | (synopsis "Data Transfer Objects") |
8794 | (description | |
8795 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8796 | and service platform for the Java programming language. This package contains | |
8797 | the Data Transfer Objects. It is easily serializable having only public fields | |
8798 | of primitive types and their wrapper classes, Strings, and DTOs. List, Set, | |
8799 | Map and array aggregates may also be used. The aggregates must only hold | |
8800 | objects of the listed types or aggregates.") | |
8801 | (license license:asl2.0))) | |
c304ce6a JL |
8802 | |
8803 | (define-public java-osgi-resource | |
8804 | (package | |
8805 | (name "java-osgi-resource") | |
8806 | (version "1.0.0") | |
8807 | (source (origin | |
8808 | (method url-fetch) | |
1f2643fa | 8809 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
c304ce6a JL |
8810 | "org.osgi.resource/" |
8811 | version "/org.osgi.resource-" | |
8812 | version "-sources.jar")) | |
8813 | (sha256 | |
8814 | (base32 | |
8815 | "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d")))) | |
8816 | (build-system ant-build-system) | |
8817 | (arguments | |
8818 | `(#:jar-name "osgi-resource.jar" | |
8819 | #:tests? #f)); no tests | |
8820 | (inputs | |
8821 | `(("annotation" ,java-osgi-annotation) | |
8822 | ("dto" ,java-osgi-dto))) | |
c353d014 | 8823 | (home-page "https://www.osgi.org") |
c304ce6a JL |
8824 | (synopsis "OSGI Resource") |
8825 | (description | |
8826 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8827 | and service platform for the Java programming language. This package contains | |
8828 | the definition of common types in osgi packages.") | |
8829 | (license license:asl2.0))) | |
c2b14516 JL |
8830 | |
8831 | (define-public java-osgi-namespace-contract | |
8832 | (package | |
8833 | (name "java-osgi-namespace-contract") | |
8834 | (version "1.0.0") | |
8835 | (source (origin | |
8836 | (method url-fetch) | |
60f5ab0b | 8837 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
c2b14516 JL |
8838 | "org.osgi.namespace.contract/" |
8839 | version "/org.osgi.namespace.contract-" | |
8840 | version "-sources.jar")) | |
8841 | (sha256 | |
8842 | (base32 | |
8843 | "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36")))) | |
8844 | (build-system ant-build-system) | |
8845 | (inputs | |
8846 | `(("resource" ,java-osgi-resource) | |
8847 | ("annotation" ,java-osgi-annotation))) | |
8848 | (arguments | |
8849 | `(#:jar-name "osgi-namespace-contract.jar" | |
8850 | #:tests? #f)); no tests | |
c353d014 | 8851 | (home-page "https://www.osgi.org") |
c2b14516 JL |
8852 | (synopsis "Contract Capability and Requirement Namespace") |
8853 | (description | |
8854 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8855 | and service platform for the Java programming language. This package contains | |
8856 | the names for the attributes and directives for a namespace with contracts.") | |
8857 | (license license:asl2.0))) | |
f809c963 JL |
8858 | |
8859 | (define-public java-osgi-namespace-extender | |
8860 | (package | |
8861 | (name "java-osgi-namespace-extender") | |
8862 | (version "1.0.1") | |
8863 | (source (origin | |
8864 | (method url-fetch) | |
fccce661 | 8865 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
f809c963 JL |
8866 | "org.osgi.namespace.extender/" |
8867 | version "/org.osgi.namespace.extender-" | |
8868 | version "-sources.jar")) | |
8869 | (sha256 | |
8870 | (base32 | |
8871 | "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz")))) | |
8872 | (build-system ant-build-system) | |
8873 | (inputs | |
8874 | `(("resource" ,java-osgi-resource) | |
8875 | ("annotation" ,java-osgi-annotation))) | |
8876 | (arguments | |
8877 | `(#:jar-name "osgi-namespace-extendent.jar" | |
8878 | #:tests? #f)); no tests | |
c353d014 | 8879 | (home-page "https://www.osgi.org") |
f809c963 JL |
8880 | (synopsis "Extender Capability and Requirement Namespace") |
8881 | (description | |
8882 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8883 | and service platform for the Java programming language. This package contains | |
b784962d JL |
8884 | the names for the attributes and directives for an extender namespace.") |
8885 | (license license:asl2.0))) | |
8886 | ||
8887 | (define-public java-osgi-namespace-service | |
8888 | (package | |
8889 | (name "java-osgi-namespace-service") | |
8890 | (version "1.0.0") | |
8891 | (source (origin | |
8892 | (method url-fetch) | |
ec4ba417 | 8893 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
b784962d JL |
8894 | "org.osgi.namespace.service/" |
8895 | version "/org.osgi.namespace.service-" | |
8896 | version "-sources.jar")) | |
8897 | (sha256 | |
8898 | (base32 | |
8899 | "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8")))) | |
8900 | (build-system ant-build-system) | |
8901 | (inputs | |
8902 | `(("resource" ,java-osgi-resource) | |
8903 | ("annotation" ,java-osgi-annotation))) | |
8904 | (arguments | |
8905 | `(#:jar-name "osgi-namespace-service.jar" | |
8906 | #:tests? #f)); no tests | |
c353d014 | 8907 | (home-page "https://www.osgi.org") |
b784962d JL |
8908 | (synopsis "Service Capability and Requirement Namespace") |
8909 | (description | |
8910 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8911 | and service platform for the Java programming language. This package contains | |
8912 | the names for the attributes and directives for a service namespace.") | |
f809c963 | 8913 | (license license:asl2.0))) |
0f0c5218 JL |
8914 | |
8915 | (define-public java-osgi-util-function | |
8916 | (package | |
8917 | (name "java-osgi-util-function") | |
8918 | (version "1.0.0") | |
8919 | (source (origin | |
8920 | (method url-fetch) | |
43be0299 | 8921 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
0f0c5218 JL |
8922 | "org.osgi.util.function/" |
8923 | version "/org.osgi.util.function-" | |
8924 | version "-sources.jar")) | |
8925 | (sha256 | |
8926 | (base32 | |
8927 | "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x")))) | |
8928 | (build-system ant-build-system) | |
8929 | (arguments | |
8930 | `(#:jar-name "osgi-util-function.jar" | |
8931 | #:tests? #f)); no tests | |
8932 | (inputs | |
8933 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 8934 | (home-page "https://www.osgi.org") |
0f0c5218 JL |
8935 | (synopsis "OSGI Util Function") |
8936 | (description | |
8937 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8938 | and service platform for the Java programming language. This package contains | |
8939 | an interface for a function that accepts a single argument and produces a result.") | |
8940 | (license license:asl2.0))) | |
27103135 JL |
8941 | |
8942 | (define-public java-osgi-util-promise | |
8943 | (package | |
8944 | (name "java-osgi-util-promise") | |
8945 | (version "1.0.0") | |
8946 | (source (origin | |
8947 | (method url-fetch) | |
c962e6c4 | 8948 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
27103135 JL |
8949 | "org.osgi.util.promise/" |
8950 | version "/org.osgi.util.promise-" | |
8951 | version "-sources.jar")) | |
8952 | (sha256 | |
8953 | (base32 | |
8954 | "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c")))) | |
8955 | (build-system ant-build-system) | |
8956 | (arguments | |
8957 | `(#:jar-name "osgi-util-promise.jar" | |
8958 | #:tests? #f)); no tests | |
8959 | (inputs | |
8960 | `(("annotation" ,java-osgi-annotation) | |
8961 | ("function" ,java-osgi-util-function))) | |
c353d014 | 8962 | (home-page "https://www.osgi.org") |
27103135 JL |
8963 | (synopsis "Promise of a value") |
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 | an interface and utilitary classes for promises. A Promise represents a future | |
8968 | value. It handles the interactions for asynchronous processing.") | |
8969 | (license license:asl2.0))) | |
2b1fdb2b JL |
8970 | |
8971 | (define-public java-osgi-service-metatype-annotations | |
8972 | (package | |
8973 | (name "java-osgi-service-metatype-annotations") | |
8974 | (version "1.3.0") | |
8975 | (source (origin | |
8976 | (method url-fetch) | |
98b1985f | 8977 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
2b1fdb2b JL |
8978 | "org.osgi.service.metatype.annotations/" |
8979 | version "/org.osgi.service.metatype.annotations-" | |
8980 | version "-sources.jar")) | |
8981 | (sha256 | |
8982 | (base32 | |
8983 | "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6")))) | |
8984 | (build-system ant-build-system) | |
8985 | (arguments | |
8986 | `(#:jar-name "osgi-service-metatype-annotations.jar" | |
8987 | #:tests? #f)); no tests | |
8988 | (inputs | |
8989 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 8990 | (home-page "https://www.osgi.org") |
2b1fdb2b JL |
8991 | (synopsis "Support annotations for metatype") |
8992 | (description | |
8993 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
8994 | and service platform for the Java programming language. This package contains | |
8995 | the support annotations for metatype.") | |
8996 | (license license:asl2.0))) | |
a13acfbe JL |
8997 | |
8998 | (define-public java-osgi-service-repository | |
8999 | (package | |
9000 | (name "java-osgi-service-repository") | |
9001 | (version "1.1.0") | |
9002 | (source (origin | |
9003 | (method url-fetch) | |
7a5c5017 | 9004 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
a13acfbe JL |
9005 | "org.osgi.service.repository/" |
9006 | version "/org.osgi.service.repository-" | |
9007 | version "-sources.jar")) | |
9008 | (sha256 | |
9009 | (base32 | |
9010 | "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n")))) | |
9011 | (build-system ant-build-system) | |
9012 | (arguments | |
9013 | `(#:jar-name "osgi-service-repository.jar" | |
9014 | #:tests? #f)); no tests | |
9015 | (inputs | |
9016 | `(("annotation" ,java-osgi-annotation) | |
9017 | ("promise" ,java-osgi-util-promise) | |
9018 | ("resource" ,java-osgi-resource))) | |
c353d014 | 9019 | (home-page "https://www.osgi.org") |
a13acfbe JL |
9020 | (synopsis "OSGI service repository") |
9021 | (description | |
9022 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9023 | and service platform for the Java programming language. This package contains | |
9024 | a repository service that contains resources.") | |
9025 | (license license:asl2.0))) | |
dfd91541 JL |
9026 | |
9027 | (define-public java-osgi-framework | |
9028 | (package | |
9029 | (name "java-osgi-framework") | |
9030 | (version "1.8.0") | |
9031 | (source (origin | |
9032 | (method url-fetch) | |
05662561 | 9033 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
dfd91541 JL |
9034 | "org.osgi.framework/" version "/org.osgi.framework-" |
9035 | version "-sources.jar")) | |
9036 | (sha256 | |
9037 | (base32 | |
9038 | "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s")))) | |
9039 | (build-system ant-build-system) | |
9040 | (arguments | |
9041 | `(#:jar-name "osgi-framework.jar" | |
9042 | #:tests? #f)); no tests | |
9043 | (inputs | |
9044 | `(("annotation" ,java-osgi-annotation) | |
9045 | ("resource" ,java-osgi-resource) | |
9046 | ("dto" ,java-osgi-dto))) | |
c353d014 | 9047 | (home-page "https://www.osgi.org") |
dfd91541 JL |
9048 | (synopsis "OSGi framework") |
9049 | (description | |
9050 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9051 | and service platform for the Java programming language.") | |
9052 | (license license:asl2.0))) | |
98c9f16c JL |
9053 | |
9054 | (define-public java-osgi-service-log | |
9055 | (package | |
9056 | (name "java-osgi-service-log") | |
9057 | (version "1.3.0") | |
9058 | (source (origin | |
9059 | (method url-fetch) | |
9b0bf25c | 9060 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
98c9f16c JL |
9061 | "org.osgi.service.log/" |
9062 | version "/org.osgi.service.log-" | |
9063 | version "-sources.jar")) | |
9064 | (sha256 | |
9065 | (base32 | |
9066 | "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0")))) | |
9067 | (build-system ant-build-system) | |
9068 | (arguments | |
9069 | `(#:jar-name "osgi-service-log.jar" | |
9070 | #:tests? #f)); no tests | |
9071 | (inputs | |
9072 | `(("java-osgi-framework" ,java-osgi-framework))) | |
c353d014 | 9073 | (home-page "https://www.osgi.org") |
98c9f16c JL |
9074 | (synopsis "Provides methods for bundles to write messages to the log") |
9075 | (description | |
9076 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9077 | and service platform for the Java programming language. This package contains | |
9078 | the log service.") | |
9079 | (license license:asl2.0))) | |
dd76d44b JL |
9080 | |
9081 | (define-public java-osgi-service-jdbc | |
9082 | (package | |
9083 | (name "java-osgi-service-jdbc") | |
9084 | (version "1.0.0") | |
9085 | (source (origin | |
9086 | (method url-fetch) | |
4a6a7b2d | 9087 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
dd76d44b JL |
9088 | "org.osgi.service.jdbc/" |
9089 | version "/org.osgi.service.jdbc-" | |
9090 | version "-sources.jar")) | |
9091 | (sha256 | |
9092 | (base32 | |
9093 | "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz")))) | |
9094 | (build-system ant-build-system) | |
9095 | (arguments | |
9096 | `(#:jar-name "osgi-service-jdbc.jar" | |
9097 | #:tests? #f)); no tests | |
c353d014 | 9098 | (home-page "https://www.osgi.org") |
dd76d44b JL |
9099 | (synopsis "Factory for JDBC connection factories") |
9100 | (description | |
9101 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9102 | and service platform for the Java programming language. This package contains | |
9103 | a factory for JDBC connection factories. There are 3 preferred connection | |
9104 | factories for getting JDBC connections: | |
9105 | ||
9106 | @itemize | |
9107 | @item @code{javax.sql.DataSource}; | |
9108 | @item @code{javax.sql.ConnectionPoolDataSource}; | |
9109 | @item @code{javax.sql.XADataSource}. | |
9110 | @end itemize") | |
9111 | (license license:asl2.0))) | |
291d3f22 JL |
9112 | |
9113 | (define-public java-osgi-service-resolver | |
9114 | (package | |
9115 | (name "java-osgi-service-resolver") | |
9116 | (version "1.0.1") | |
9117 | (source (origin | |
9118 | (method url-fetch) | |
b787534b | 9119 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
291d3f22 JL |
9120 | "org.osgi.service.resolver/" |
9121 | version "/org.osgi.service.resolver-" | |
9122 | version "-sources.jar")) | |
9123 | (sha256 | |
9124 | (base32 | |
9125 | "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd")))) | |
9126 | (build-system ant-build-system) | |
9127 | (arguments | |
9128 | `(#:jar-name "osgi-service-resolver.jar" | |
9129 | #:tests? #f)); no tests | |
9130 | (inputs | |
9131 | `(("annotation" ,java-osgi-annotation) | |
9132 | ("resource" ,java-osgi-resource))) | |
c353d014 | 9133 | (home-page "https://www.osgi.org") |
291d3f22 JL |
9134 | (synopsis "OSGI Resolver service") |
9135 | (description | |
9136 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9137 | and service platform for the Java programming language. This package contains | |
9138 | a resolver service that resolves the specified resources in the context supplied | |
9139 | by the caller.") | |
9140 | (license license:asl2.0))) | |
1884bb81 JL |
9141 | |
9142 | (define-public java-osgi-util-tracker | |
9143 | (package | |
9144 | (name "java-osgi-util-tracker") | |
9145 | (version "1.5.1") | |
9146 | (source (origin | |
9147 | (method url-fetch) | |
e0695da9 | 9148 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
1884bb81 JL |
9149 | "org.osgi.util.tracker/" |
9150 | version "/org.osgi.util.tracker-" | |
9151 | version "-sources.jar")) | |
9152 | (sha256 | |
9153 | (base32 | |
9154 | "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz")))) | |
9155 | (build-system ant-build-system) | |
9156 | (arguments | |
9157 | `(#:jar-name "osgi-util-tracker.jar" | |
9158 | #:tests? #f)); no tests | |
9159 | (inputs | |
9160 | `(("framework" ,java-osgi-framework) | |
9161 | ("annotation" ,java-osgi-annotation))) | |
c353d014 | 9162 | (home-page "https://www.osgi.org") |
1884bb81 JL |
9163 | (synopsis "Bundle tracking") |
9164 | (description | |
9165 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9166 | and service platform for the Java programming language. This package contains | |
9167 | bundle tracking utility classes.") | |
9168 | (license license:asl2.0))) | |
fb9c48b8 JL |
9169 | |
9170 | (define-public java-osgi-service-cm | |
9171 | (package | |
9172 | (name "java-osgi-service-cm") | |
9173 | (version "1.5.0") | |
9174 | (source (origin | |
9175 | (method url-fetch) | |
f8f2fefb | 9176 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
fb9c48b8 JL |
9177 | "org.osgi.service.cm/" |
9178 | version "/org.osgi.service.cm-" | |
9179 | version "-sources.jar")) | |
9180 | (sha256 | |
9181 | (base32 | |
9182 | "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6")))) | |
9183 | (build-system ant-build-system) | |
9184 | (arguments | |
9185 | `(#:jar-name "osgi-service-cm.jar" | |
9186 | #:tests? #f)); no tests | |
9187 | (inputs | |
9188 | `(("framework" ,java-osgi-framework) | |
9189 | ("annotation" ,java-osgi-annotation))) | |
c353d014 | 9190 | (home-page "https://www.osgi.org") |
fb9c48b8 JL |
9191 | (synopsis "OSGI Configuration Management") |
9192 | (description | |
9193 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9194 | and service platform for the Java programming language. This package contains | |
9195 | utility classes for the configuration of services.") | |
9196 | (license license:asl2.0))) | |
500aac75 JL |
9197 | |
9198 | (define-public java-osgi-service-packageadmin | |
9199 | (package | |
9200 | (name "java-osgi-service-packageadmin") | |
9201 | (version "1.2.0") | |
9202 | (source (origin | |
9203 | (method url-fetch) | |
839e3e89 | 9204 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
500aac75 JL |
9205 | "org.osgi.service.packageadmin/" |
9206 | version "/org.osgi.service.packageadmin-" | |
9207 | version "-sources.jar")) | |
9208 | (sha256 | |
9209 | (base32 | |
9210 | "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52")))) | |
9211 | (build-system ant-build-system) | |
9212 | (arguments | |
9213 | `(#:jar-name "osgi-service-packageadmin.jar" | |
9214 | #:tests? #f)); no tests | |
9215 | (inputs | |
9216 | `(("framework" ,java-osgi-framework))) | |
c353d014 | 9217 | (home-page "https://www.osgi.org") |
500aac75 JL |
9218 | (synopsis "OSGI Package Administration") |
9219 | (description | |
9220 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
9221 | and service platform for the Java programming language. This package contains | |
9222 | the packageadmin service.") | |
9223 | (license license:asl2.0))) | |
77a4f1ae JL |
9224 | |
9225 | (define-public java-ops4j-base-lang | |
9226 | (package | |
9227 | (name "java-ops4j-base-lang") | |
9228 | (version "1.5.0") | |
9229 | (source (origin | |
9230 | (method url-fetch) | |
9231 | (uri (string-append "https://github.com/ops4j/org.ops4j.base/" | |
9232 | "archive/base-" version ".tar.gz")) | |
9233 | (sha256 | |
9234 | (base32 | |
9235 | "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw")))) | |
9236 | (build-system ant-build-system) | |
9237 | (arguments | |
9238 | `(#:jar-name "java-ops4j-base-lang.jar" | |
9239 | #:source-dir "ops4j-base-lang/src/main/java" | |
9240 | #:tests? #f; no tests | |
9241 | #:phases | |
9242 | (modify-phases %standard-phases | |
9243 | (add-before 'build 'add-test-file | |
9244 | (lambda _ | |
9245 | ;; That file is required by a test in ops4j-pax-exam-core-spi | |
9246 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang") | |
9247 | (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties" | |
9248 | (lambda _ | |
9249 | (display | |
9250 | (string-append | |
9251 | "version=" ,version "\n" | |
9252 | "groupId=org.ops4j.base" | |
2c8ac364 MW |
9253 | "artifactId=ops4j-base-lang\n")))) |
9254 | #t))))) | |
77a4f1ae JL |
9255 | (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview") |
9256 | (synopsis "Utility classes and extensions to be used in OPS4J projects") | |
9257 | (description "OPS4J stands for Open Participation Software for Java. This | |
9258 | package contains utilities and extensions related to @code{java.lang}.") | |
9259 | (license license:asl2.0))) | |
b2353495 JL |
9260 | |
9261 | (define-public java-ops4j-base-monitors | |
9262 | (package | |
9263 | (inherit java-ops4j-base-lang) | |
9264 | (name "java-ops4j-base-monitors") | |
9265 | (arguments | |
9266 | `(#:jar-name "java-ops4j-base-monitors.jar" | |
9267 | #:source-dir "ops4j-base-monitors/src/main/java" | |
9268 | #:tests? #f)); no tests | |
9269 | (inputs | |
9270 | `(("lang" ,java-ops4j-base-lang))) | |
9271 | (description "OPS4J stands for Open Participation Software for Java. This | |
9272 | package contains utilities and extensions related to monitoring."))) | |
322d349a JL |
9273 | |
9274 | (define-public java-ops4j-base-io | |
9275 | (package | |
9276 | (inherit java-ops4j-base-lang) | |
9277 | (name "java-ops4j-base-io") | |
9278 | (arguments | |
9279 | `(#:jar-name "java-ops4j-base-io.jar" | |
9280 | #:source-dir "ops4j-base-io/src/main/java" | |
9281 | #:test-dir "ops4j-base-io/src/test" | |
9282 | #:test-exclude | |
9283 | (list "**/ListerTest.java"))) | |
9284 | (inputs | |
9285 | `(("lang" ,java-ops4j-base-monitors) | |
9286 | ("lang" ,java-ops4j-base-lang))) | |
9287 | (native-inputs | |
9288 | `(("junit" ,java-junit) | |
9289 | ("hamcrest" ,java-hamcrest-core))) | |
9290 | (description "OPS4J stands for Open Participation Software for Java. This | |
9291 | package contains utilities and extensions related to handling streams and files."))) | |
559919c1 JL |
9292 | |
9293 | (define-public java-ops4j-base-util | |
9294 | (package | |
9295 | (inherit java-ops4j-base-lang) | |
9296 | (name "java-ops4j-base-util") | |
9297 | (arguments | |
9298 | `(#:jar-name "java-ops4j-base-util.jar" | |
9299 | #:source-dir "ops4j-base-util/src/main/java" | |
9300 | #:test-dir "ops4j-base-util/src/test")) | |
9301 | (inputs | |
9302 | `(("lang" ,java-ops4j-base-lang))) | |
9303 | (native-inputs | |
9304 | `(("junit" ,java-junit))) | |
9305 | (description "OPS4J stands for Open Participation Software for Java. This | |
9306 | package contains utilities and extensions related to environment, i18n and | |
9307 | mime types."))) | |
60dcec7a JL |
9308 | |
9309 | (define-public java-ops4j-base-util-property | |
9310 | (package | |
9311 | (inherit java-ops4j-base-lang) | |
9312 | (name "java-ops4j-base-util-property") | |
9313 | (arguments | |
9314 | `(#:jar-name "java-ops4j-base-util-property.jar" | |
9315 | #:source-dir "ops4j-base-util-property/src/main/java" | |
9316 | #:tests? #f)); no tests | |
9317 | (inputs | |
9318 | `(("lang" ,java-ops4j-base-lang) | |
9319 | ("util" ,java-ops4j-base-util))) | |
9320 | (description "OPS4J stands for Open Participation Software for Java. This | |
9321 | package contains utilities and extensions related to resolving properties from | |
9322 | different sources."))) | |
0edf8cf0 JL |
9323 | |
9324 | (define-public java-ops4j-base-store | |
9325 | (package | |
9326 | (inherit java-ops4j-base-lang) | |
9327 | (name "java-ops4j-base-store") | |
9328 | (arguments | |
9329 | `(#:jar-name "java-ops4j-base-store.jar" | |
9330 | #:source-dir "ops4j-base-store/src/main/java" | |
9331 | #:tests? #f)); no tests | |
9332 | (inputs | |
9333 | `(("lang" ,java-ops4j-base-lang) | |
9334 | ("slf4j" ,java-slf4j-api) | |
9335 | ("io" ,java-ops4j-base-io))) | |
9336 | (description "OPS4J stands for Open Participation Software for Java. This | |
9337 | package contains utilities for storing and retrieving data from an | |
9338 | @code{InputStream}."))) | |
214fcd8a JL |
9339 | |
9340 | (define-public java-ops4j-base-spi | |
9341 | (package | |
9342 | (inherit java-ops4j-base-lang) | |
9343 | (name "java-ops4j-base-spi") | |
9344 | (arguments | |
9345 | `(#:jar-name "java-ops4j-base-spi.jar" | |
9346 | #:source-dir "ops4j-base-spi/src/main/java" | |
9347 | #:test-dir "ops4j-base-spi/src/test")) | |
9348 | (native-inputs | |
9349 | `(("junit" ,java-junit) | |
9350 | ("hamcrest" ,java-hamcrest-core))) | |
9351 | (description "OPS4J stands for Open Participation Software for Java. This | |
9352 | package contains utilities for obtaining services via the Java SE 6 | |
9353 | @code{ServiceLoader}."))) | |
e1edf42e JL |
9354 | |
9355 | (define-public java-aqute-bnd-annotation | |
9356 | (package | |
9357 | (name "java-aqute-bnd-annotation") | |
2cac8891 | 9358 | (version "3.5.0") |
e1edf42e JL |
9359 | (source (origin |
9360 | (method url-fetch) | |
9361 | (uri (string-append "https://github.com/bndtools/bnd/archive/" | |
9362 | version ".REL.tar.gz")) | |
9363 | (file-name (string-append name "-" version ".tar.gz")) | |
9364 | (sha256 | |
9365 | (base32 | |
2cac8891 | 9366 | "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl")))) |
e1edf42e JL |
9367 | (build-system ant-build-system) |
9368 | (arguments | |
9369 | `(#:jar-name "java-aqute-bnd-annotation.jar" | |
9370 | #:source-dir "biz.aQute.bnd.annotation/src" | |
9371 | #:tests? #f)); empty test dir | |
27c0eade | 9372 | (home-page "https://bnd.bndtools.org/") |
e1edf42e JL |
9373 | (synopsis "Tools for OSGi") |
9374 | (description "Bnd is a swiss army knife for OSGi, it creates manifest | |
9375 | headers based on analyzing the class code, it verifies the project settings, | |
9376 | it manages project dependencies, gives diffs jars, and much more.") | |
9377 | (license license:asl2.0))) | |
60ba2978 JL |
9378 | |
9379 | (define-public java-aqute-libg | |
9380 | (package | |
9381 | (inherit java-aqute-bnd-annotation) | |
9382 | (name "java-aqute-libg") | |
9383 | (arguments | |
9384 | `(#:jar-name "java-aqute-libg.jar" | |
78754995 GB |
9385 | ;; The build fails when source/target more recent than 1.7. This |
9386 | ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327 | |
9387 | ;; | |
9388 | ;; It is closed as won't fix. There is no way to change the source | |
9389 | ;; so that it works on 1.8, and still works on 1.6, the upstream | |
9390 | ;; target. It work fine on 1.7, so we use 1.7. | |
9391 | #:make-flags (list "-Dant.build.javac.source=1.7" | |
9392 | "-Dant.build.javac.target=1.7") | |
2ab089b7 GB |
9393 | #:phases |
9394 | (modify-phases %standard-phases | |
9395 | (add-before 'configure 'chdir | |
9396 | ;; Change to aQute.libg directory, so that the relative | |
9397 | ;; paths in the tests aren't broken. | |
9398 | (lambda _ | |
9399 | (chdir "aQute.libg") | |
9400 | #t)) | |
9401 | (add-before 'check 'create-test-directory | |
9402 | ;; Copy the test directory to test/java, since that's where | |
9403 | ;; ant-build-system's default project in build.xml expects to find | |
9404 | ;; the test classes. Leave a copy in the original place to not | |
9405 | ;; break paths in tests. | |
9406 | (lambda _ | |
9407 | (mkdir "src/test") | |
9408 | (copy-recursively "test" "src/test/java") | |
9409 | #t))))) | |
60ba2978 JL |
9410 | (inputs |
9411 | `(("slf4j" ,java-slf4j-api) | |
9412 | ("osgi-annot" ,java-osgi-annotation) | |
9413 | ("java-osgi-cmpn" ,java-osgi-cmpn) | |
2ab089b7 GB |
9414 | ("osgi" ,java-osgi-core))) |
9415 | (native-inputs | |
9416 | `(("hamcrest" ,java-hamcrest-core) | |
9417 | ("java-junit" ,java-junit))))) | |
5f26a131 JL |
9418 | |
9419 | (define-public java-aqute-bndlib | |
9420 | (package | |
9421 | (inherit java-aqute-bnd-annotation) | |
9422 | (name "java-aqute-bndlib") | |
9423 | (arguments | |
9424 | `(#:jar-name "java-bndlib.jar" | |
9425 | #:source-dir "biz.aQute.bndlib/src" | |
9426 | #:tests? #f)); no tests | |
9427 | (inputs | |
9428 | `(("slf4j" ,java-slf4j-api) | |
9429 | ("osgi-annot" ,java-osgi-annotation) | |
9430 | ("java-aqute-libg" ,java-aqute-libg) | |
9431 | ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation) | |
9432 | ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations) | |
9433 | ("java-osgi-service-repository" ,java-osgi-service-repository) | |
9434 | ("java-osgi-service-log" ,java-osgi-service-log) | |
9435 | ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations) | |
9436 | ("java-osgi-namespace-contract" ,java-osgi-namespace-contract) | |
9437 | ("java-osgi-namespace-extender" ,java-osgi-namespace-extender) | |
9438 | ("java-osgi-namespace-service" ,java-osgi-namespace-service) | |
9439 | ("promise" ,java-osgi-util-promise) | |
9440 | ("osgi" ,java-osgi-core))))) | |
869803aa | 9441 | |
25aef81d JL |
9442 | (define-public java-ops4j-pax-tinybundles |
9443 | (package | |
9444 | (name "java-ops4j-pax-tinybundles") | |
9445 | (version "2.1.1") | |
9446 | (source (origin | |
9447 | (method url-fetch) | |
9448 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/" | |
9449 | "archive/tinybundles-" version ".tar.gz")) | |
9450 | (sha256 | |
9451 | (base32 | |
9452 | "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871")))) | |
9453 | (arguments | |
9454 | `(#:jar-name "java-ops4j-pax-tinybundles.jar" | |
9455 | #:source-dir "src/main/java" | |
9456 | #:test-exclude | |
9457 | ;; Abstract base classes for other tests | |
9458 | (list "**/BndTest.java" "**/CoreTest.java") | |
9459 | #:phases | |
9460 | (modify-phases %standard-phases | |
9461 | (add-before 'check 'fix-version | |
9462 | (lambda _ | |
9463 | ;; This test has a reference to an old version of bndlib we are not | |
9464 | ;; packaging. It uses the version referenced in pom.xml. We replace | |
9465 | ;; it with our own version. | |
9466 | (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java" | |
0f277802 | 9467 | (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*") |
2c8ac364 MW |
9468 | ,(package-version java-aqute-bndlib))) |
9469 | #t))))) | |
25aef81d JL |
9470 | (inputs |
9471 | `(("lang" ,java-ops4j-base-lang) | |
9472 | ("io" ,java-ops4j-base-io) | |
9473 | ("store" ,java-ops4j-base-store) | |
9474 | ("slf4j" ,java-slf4j-api) | |
9475 | ("libg" ,java-aqute-libg) | |
9476 | ("bndlib" ,java-aqute-bndlib))) | |
9477 | (native-inputs | |
9478 | `(("junit" ,java-junit) | |
9479 | ("hamcrest" ,java-hamcrest-core) | |
9480 | ("log4j" ,java-log4j-api) | |
9481 | ("bndannotation" ,java-aqute-bnd-annotation) | |
9482 | ("framework" ,java-osgi-framework))) | |
9483 | (build-system ant-build-system) | |
9484 | (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles") | |
9485 | (synopsis "Java APIs to create OSGi related artifacts") | |
9486 | (description "Tinybundles is all about creating OSGi related artifacts like | |
6fa0914a | 9487 | Bundles, Fragments and Deployment Packages with Java Api. It is very convenient |
25aef81d JL |
9488 | to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the |
9489 | other hand, this library can be a foundation of real end user tools that need | |
9490 | to create those artifacts.") | |
9491 | (license license:asl2.0))) | |
e179add0 JL |
9492 | |
9493 | (define-public java-ops4j-pax-exam-core | |
9494 | (package | |
9495 | (name "java-ops4j-pax-exam-core") | |
9496 | (version "4.11.0") | |
9497 | (source (origin | |
9498 | (method url-fetch) | |
9499 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/" | |
9500 | "archive/exam-reactor-" version ".tar.gz")) | |
9501 | (sha256 | |
9502 | (base32 | |
9503 | "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g")))) | |
9504 | (arguments | |
9505 | `(#:jar-name "java-ops4j-pax-exam-core.jar" | |
9506 | #:source-dir "core/pax-exam/src/main/java" | |
9507 | #:test-dir "core/pax-exam/src/test")) | |
9508 | (inputs | |
9509 | `(("slf4j" ,java-slf4j-api) | |
9510 | ("lang" ,java-ops4j-base-lang) | |
9511 | ("io" ,java-ops4j-base-io) | |
9512 | ("util-property" ,java-ops4j-base-util-property) | |
9513 | ("util-store" ,java-ops4j-base-store) | |
9514 | ("java-osgi-core" ,java-osgi-core))) | |
9515 | (native-inputs | |
9516 | `(("junit" ,java-junit) | |
9517 | ("hamcrest" ,java-hamcrest-core))) | |
9518 | (build-system ant-build-system) | |
9519 | (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview") | |
9520 | (synopsis "In-Container Testing for OSGi, Java EE and CDI") | |
9521 | (description "Pax Exam creates OSGi bundles for testing purposes. It lets | |
9522 | the user take control of the OSGi framework, the test framework (e.g. JUnit) and | |
9523 | the system under test at the same time.") | |
9524 | (license license:asl2.0))) | |
7a7c2b75 JL |
9525 | |
9526 | (define-public java-ops4j-pax-exam-core-spi | |
9527 | (package | |
9528 | (inherit java-ops4j-pax-exam-core) | |
9529 | (name "java-ops4j-pax-exam-core-spi") | |
9530 | (arguments | |
9531 | `(#:jar-name "java-ops4j-pax-exam-spi.jar" | |
9532 | #:source-dir "src/main/java" | |
9533 | #:test-exclude | |
9534 | (list | |
9535 | ;; Abstract base class, not a test | |
9536 | "**/BaseStagedReactorTest.java" | |
9537 | ;; Depends on org.mortbay.jetty.testwars:test-war-dump | |
9538 | "**/WarBuilderTest.java") | |
9539 | #:phases | |
9540 | (modify-phases %standard-phases | |
9541 | (add-before 'configure 'chdir | |
9542 | (lambda _ | |
9543 | ;; Tests assume we are in this directory | |
2c8ac364 MW |
9544 | (chdir "core/pax-exam-spi") |
9545 | #t)) | |
7a7c2b75 JL |
9546 | (add-before 'check 'fix-tests |
9547 | (lambda _ | |
9548 | ;; One test checks that this file is present. | |
9549 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi") | |
9550 | (with-output-to-file | |
9551 | "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties" | |
9552 | (lambda _ | |
9553 | (display | |
9554 | (string-append "artifactId = pax-exam-spi\n" | |
9555 | "version = " ,(package-version java-ops4j-pax-exam-core-spi))))) | |
9556 | ;; Maven puts compilation results in the target directory, while we | |
9557 | ;; put them in the build directory. | |
9558 | (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java" | |
9559 | "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java" | |
9560 | "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java") | |
9561 | (("target") "build")) | |
9562 | ;; One test is expected to fail, but it doesn't throw the expected exception | |
9563 | (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java" | |
2c8ac364 MW |
9564 | (("AssertionError") "IllegalArgumentException")) |
9565 | #t))))) | |
7a7c2b75 JL |
9566 | (inputs |
9567 | `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core) | |
9568 | ("lang" ,java-ops4j-base-lang) | |
9569 | ("monitors" ,java-ops4j-base-monitors) | |
9570 | ("store" ,java-ops4j-base-store) | |
9571 | ("io" ,java-ops4j-base-io) | |
9572 | ("spi" ,java-ops4j-base-spi) | |
9573 | ("osgi" ,java-osgi-core) | |
9574 | ("slf4j" ,java-slf4j-api) | |
9575 | ("tinybundles" ,java-ops4j-pax-tinybundles))) | |
9576 | (native-inputs | |
9577 | `(("mockito" ,java-mockito-1) | |
9578 | ("junit" ,java-junit) | |
9579 | ("hamcrest" ,java-hamcrest-core) | |
9580 | ("cglib" ,java-cglib) | |
9581 | ("objenesis" ,java-objenesis) | |
9582 | ("asm" ,java-asm))))) | |
4496d77f JL |
9583 | |
9584 | (define-public java-ops4j-pax-exam-core-junit | |
9585 | (package | |
9586 | (inherit java-ops4j-pax-exam-core) | |
9587 | (name "java-ops4j-pax-exam-core-junit") | |
9588 | (arguments | |
9589 | `(#:jar-name "ops4j-pax-exam-core-junit.jar" | |
9590 | #:source-dir "drivers/pax-exam-junit4/src/main/java" | |
9591 | #:tests? #f)); no tests | |
9592 | (inputs | |
9593 | `(("junit" ,java-junit) | |
9594 | ("slf4j" ,java-slf4j-api) | |
9595 | ("core" ,java-ops4j-pax-exam-core) | |
9596 | ("spi" ,java-ops4j-pax-exam-core-spi))) | |
9597 | (native-inputs '()))) | |
cb05f60d JL |
9598 | |
9599 | (define-public java-fasterxml-jackson-annotations | |
9600 | (package | |
9601 | (name "java-fasterxml-jackson-annotations") | |
93dceea4 | 9602 | (version "2.9.4") |
cb05f60d JL |
9603 | (source (origin |
9604 | (method url-fetch) | |
9605 | (uri (string-append "https://github.com/FasterXML/" | |
9606 | "jackson-annotations/archive/" | |
9607 | "jackson-annotations-" version ".tar.gz")) | |
9608 | (sha256 | |
9609 | (base32 | |
93dceea4 | 9610 | "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4")))) |
cb05f60d JL |
9611 | (build-system ant-build-system) |
9612 | (arguments | |
9613 | `(#:jar-name "jackson-annotations.jar" | |
9614 | #:source-dir "src/main/java" | |
9615 | #:test-dir "src/test")) | |
9616 | (native-inputs | |
9617 | `(("junit" ,java-junit))) | |
9618 | (home-page "https://github.com/FasterXML/jackson-annotations") | |
9619 | (synopsis "General purpose annotations for the Jackson Data Processor") | |
9620 | (description "This package contains general purpose annotations for the | |
9621 | Jackson Data Processor, used on value and handler types. The only annotations | |
9622 | not included are ones that require dependency to the Databind package.") | |
9623 | (license license:asl2.0))) | |
0b5481df JL |
9624 | |
9625 | (define-public java-fasterxml-jackson-core | |
9626 | (package | |
9627 | (name "java-fasterxml-jackson-core") | |
38a0fc38 | 9628 | (version "2.9.4") |
0b5481df JL |
9629 | (source (origin |
9630 | (method url-fetch) | |
9631 | (uri (string-append "https://github.com/FasterXML/" | |
9632 | "jackson-core/archive/" | |
9633 | "jackson-core-" version ".tar.gz")) | |
9634 | (sha256 | |
9635 | (base32 | |
38a0fc38 | 9636 | "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd")))) |
0b5481df JL |
9637 | (build-system ant-build-system) |
9638 | (arguments | |
9639 | `(#:jar-name "jackson-core.jar" | |
9640 | #:source-dir "src/main/java" | |
9641 | #:test-dir "src/test" | |
9642 | #:test-exclude | |
9643 | (list | |
9644 | ;; Expected failure. pom.xml excludes these | |
9645 | "**/failing/**" | |
9646 | ;; Base classes that have no constructor for junit | |
9647 | "**/BaseTest.java" | |
9648 | "**/ConcurrencyReadTest.java" | |
9649 | "**/ManualCharAccessTest.java" | |
9650 | "**/ManualCharAccessTest.java" | |
9651 | "**/TrailingCommasTest.java" | |
9652 | "**/AsyncMissingValuesInObjectTest.java" | |
9653 | "**/AsyncMissingValuesInArrayTest.java") | |
9654 | #:phases | |
9655 | (modify-phases %standard-phases | |
9656 | (add-before 'configure 'generate-PackageVersion.java | |
9657 | (lambda _ | |
9658 | (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java") | |
9659 | (in (string-append out ".in"))) | |
9660 | (copy-file in out) | |
9661 | (substitute* out | |
9662 | (("@package@") "com.fasterxml.jackson.core.json") | |
9663 | (("@projectversion@") ,version) | |
9664 | (("@projectgroupid@") "com.fasterxml.jackson.core") | |
2c8ac364 MW |
9665 | (("@projectartifactid@") "jackson-core"))) |
9666 | #t)) | |
0b5481df JL |
9667 | (add-before 'build 'copy-resources |
9668 | (lambda _ | |
9669 | (copy-recursively "src/main/resources" | |
2c8ac364 MW |
9670 | "build/classes") |
9671 | #t)) | |
0b5481df JL |
9672 | (add-before 'check 'copy-test-resources |
9673 | (lambda _ | |
9674 | (copy-recursively "src/test/resources" | |
2c8ac364 MW |
9675 | "build/test-classes") |
9676 | #t))))) | |
0b5481df JL |
9677 | (native-inputs |
9678 | `(("junit" ,java-junit) | |
9679 | ("hamcrest" ,java-hamcrest-core))) | |
9680 | (home-page "https://github.com/FasterXML/jackson-core") | |
94c38d54 JL |
9681 | (synopsis "Low-level streaming parser and generator abstractions") |
9682 | (description "This package contains core low-level incremental | |
9683 | (streaming) parser and generator abstractions used by the Jackson Data | |
9684 | Processor. It also includes the default implementation of handler types | |
9685 | (parser, generator) that handle JSON format.") | |
0b5481df | 9686 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
f234c7a0 JL |
9687 | |
9688 | (define-public java-fasterxml-jackson-databind | |
9689 | (package | |
9690 | (name "java-fasterxml-jackson-databind") | |
3c1edff5 | 9691 | (version "2.9.4") |
f234c7a0 JL |
9692 | (source (origin |
9693 | (method url-fetch) | |
9694 | (uri (string-append "https://github.com/FasterXML/" | |
9695 | "jackson-databind/archive/" | |
9696 | "jackson-databind-" version ".tar.gz")) | |
9697 | (sha256 | |
9698 | (base32 | |
3c1edff5 | 9699 | "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08")))) |
f234c7a0 JL |
9700 | (build-system ant-build-system) |
9701 | (arguments | |
9702 | `(#:jar-name "jackson-databind.jar" | |
9703 | #:source-dir "src/main/java" | |
9704 | #:tests? #f; requires javax.measures for which I can't find a free implementation | |
9705 | #:phases | |
9706 | (modify-phases %standard-phases | |
9707 | (add-before 'configure 'generate-PackageVersion.java | |
9708 | (lambda _ | |
9709 | (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java") | |
9710 | (in (string-append out ".in"))) | |
9711 | (copy-file in out) | |
9712 | (substitute* out | |
9713 | (("@package@") "com.fasterxml.jackson.databind.cfg") | |
9714 | (("@projectversion@") ,version) | |
9715 | (("@projectgroupid@") "com.fasterxml.jackson.databind") | |
2c8ac364 MW |
9716 | (("@projectartifactid@") "jackson-databind"))) |
9717 | #t)) | |
f234c7a0 JL |
9718 | (add-before 'build 'copy-resources |
9719 | (lambda _ | |
2c8ac364 MW |
9720 | (copy-recursively "src/main/resources" "build/classes") |
9721 | #t))))) | |
f234c7a0 JL |
9722 | (inputs |
9723 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
9724 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core))) | |
9725 | (home-page "https://github.com/FasterXML/jackson-databind") | |
9726 | (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor") | |
9727 | (description "This package contains the general-purpose data-binding | |
9728 | functionality and tree-model for Jackson Data Processor. It builds on core | |
9729 | streaming parser/generator package, and uses Jackson Annotations for | |
9730 | configuration.") | |
9731 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
d57d8b89 JL |
9732 | |
9733 | (define-public java-fasterxml-jackson-modules-base-jaxb | |
9734 | (package | |
9735 | (name "java-fasterxml-jackson-modules-base-jaxb") | |
07207211 | 9736 | (version "2.9.4") |
d57d8b89 JL |
9737 | (source (origin |
9738 | (method url-fetch) | |
9739 | (uri (string-append "https://github.com/FasterXML/" | |
9740 | "jackson-modules-base/archive/" | |
9741 | "jackson-modules-base-" version ".tar.gz")) | |
9742 | (sha256 | |
9743 | (base32 | |
07207211 | 9744 | "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5")))) |
d57d8b89 JL |
9745 | (build-system ant-build-system) |
9746 | (arguments | |
9747 | `(#:jar-name "jackson-modules-base-jaxb.jar" | |
9748 | #:source-dir "jaxb/src/main/java" | |
9749 | #:test-dir "jaxb/src/test" | |
9750 | #:test-exclude | |
9751 | ;; Base class for tests | |
9752 | (list "**/BaseJaxbTest.java") | |
9753 | #:phases | |
9754 | (modify-phases %standard-phases | |
9755 | (add-before 'configure 'generate-PackageVersion.java | |
9756 | (lambda _ | |
9757 | (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/" | |
9758 | "jackson/module/jaxb/PackageVersion.java")) | |
9759 | (in (string-append out ".in"))) | |
9760 | (copy-file in out) | |
9761 | (substitute* out | |
9762 | (("@package@") "com.fasterxml.jackson.module.jaxb") | |
9763 | (("@projectversion@") ,version) | |
9764 | (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb") | |
2c8ac364 MW |
9765 | (("@projectartifactid@") "jackson-module-jaxb"))) |
9766 | #t)) | |
d57d8b89 JL |
9767 | (add-before 'build 'copy-resources |
9768 | (lambda _ | |
2c8ac364 MW |
9769 | (copy-recursively "jaxb/src/main/resources" "build/classes") |
9770 | #t))))) | |
d57d8b89 JL |
9771 | (inputs |
9772 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
9773 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
9774 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind))) | |
9775 | (native-inputs | |
9776 | `(("java-junit" ,java-junit))) | |
9777 | (home-page "https://github.com/FasterXML/jackson-modules-base") | |
9778 | (synopsis "Jaxb annotations jackson module") | |
9779 | (description "This package is the jaxb annotations module for jackson.") | |
9780 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
0f296d37 | 9781 | |
5165fb40 DM |
9782 | (define-public java-fasterxml-jackson-modules-base-mrbean |
9783 | (package | |
9784 | (name "java-fasterxml-jackson-modules-base-mrbean") | |
9785 | (version "2.9.4") | |
9786 | (source (origin | |
9787 | (method url-fetch) | |
9788 | (uri (string-append "https://github.com/FasterXML/" | |
9789 | "jackson-modules-base/archive/" | |
9790 | "jackson-modules-base-" version ".tar.gz")) | |
9791 | (sha256 | |
9792 | (base32 | |
9793 | "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5")))) | |
9794 | (build-system ant-build-system) | |
9795 | (arguments | |
9796 | `(#:jar-name "jackson-modules-base-mrbean.jar" | |
9797 | #:source-dir "mrbean/src/main/java" | |
9798 | #:test-dir "mrbean/src/test" | |
9799 | #:test-exclude | |
9800 | ;; Base class for tests | |
9801 | (list "**/BaseTest.java") | |
9802 | #:phases | |
9803 | (modify-phases %standard-phases | |
9804 | (add-before 'configure 'generate-PackageVersion.java | |
9805 | (lambda _ | |
9806 | (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/" | |
9807 | "jackson/module/mrbean/PackageVersion.java")) | |
9808 | (in (string-append out ".in"))) | |
9809 | (copy-file in out) | |
9810 | (substitute* out | |
9811 | (("@package@") "com.fasterxml.jackson.module.mrbean") | |
9812 | (("@projectversion@") ,version) | |
9813 | (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean") | |
9814 | (("@projectartifactid@") "jackson-module-mrbean"))) | |
9815 | #t))))) | |
9816 | (inputs | |
9817 | `(("java-asm" ,java-asm) | |
9818 | ("java-fasterxml-jackson-annotations" | |
9819 | ,java-fasterxml-jackson-annotations) | |
9820 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
9821 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind))) | |
9822 | (native-inputs | |
9823 | `(("java-junit" ,java-junit))) | |
9824 | (home-page "https://github.com/FasterXML/jackson-modules-base") | |
9825 | (synopsis "POJO type materialization for Java") | |
9826 | (description "This package implements POJO type materialization. | |
9827 | Databinders can construct implementation classes for Java interfaces as part | |
9828 | of deserialization.") | |
9829 | (license license:asl2.0))) | |
9830 | ||
0f296d37 JL |
9831 | (define-public java-snakeyaml |
9832 | (package | |
9833 | (name "java-snakeyaml") | |
9834 | (version "1.18") | |
9835 | (source (origin | |
9836 | (method url-fetch) | |
9837 | (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v" | |
9838 | version ".tar.gz")) | |
307856cd | 9839 | (file-name (string-append name "-" version ".tar.gz")) |
0f296d37 JL |
9840 | (sha256 |
9841 | (base32 | |
b19f155c | 9842 | "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh")))) |
0f296d37 JL |
9843 | (build-system ant-build-system) |
9844 | (arguments | |
9845 | `(#:jar-name "java-snakeyaml.jar" | |
9846 | #:source-dir "src/main/java" | |
9847 | ;; Tests require velocity, a cyclic dependency, and | |
9848 | ;; java-spring-framework-context which is not packaged. | |
9849 | #:tests? #f)) | |
9850 | (home-page "https://bitbucket.org/asomov/snakeyaml") | |
9851 | (synopsis "YAML processor") | |
9852 | (description "SnakeYAML is a YAML processor for the Java Virtual Machine.") | |
9853 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
087c8fd2 JL |
9854 | |
9855 | (define-public java-fasterxml-jackson-dataformat-yaml | |
9856 | (package | |
9857 | (name "java-fasterxml-jackson-dataformat-yaml") | |
1f2be88f | 9858 | (version "2.9.4") |
087c8fd2 JL |
9859 | (source (origin |
9860 | (method url-fetch) | |
9861 | (uri (string-append "https://github.com/FasterXML/" | |
9862 | "jackson-dataformats-text/archive/" | |
9863 | "jackson-dataformats-text-" version ".tar.gz")) | |
9864 | (sha256 | |
9865 | (base32 | |
1f2be88f | 9866 | "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7")))) |
087c8fd2 JL |
9867 | (build-system ant-build-system) |
9868 | (arguments | |
9869 | `(#:jar-name "jackson-dataformat-yaml.jar" | |
9870 | #:source-dir "yaml/src/main/java" | |
9871 | #:test-dir "yaml/src/test" | |
9872 | #:test-exclude (list "**/failing/**.java") | |
9873 | #:phases | |
9874 | (modify-phases %standard-phases | |
9875 | (add-before 'configure 'generate-PackageVersion.java | |
9876 | (lambda _ | |
9877 | (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java") | |
9878 | (in (string-append out ".in"))) | |
9879 | (copy-file in out) | |
9880 | (substitute* out | |
9881 | (("@package@") "com.fasterxml.jackson.dataformat.yaml") | |
9882 | (("@projectversion@") ,version) | |
9883 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml") | |
2c8ac364 MW |
9884 | (("@projectartifactid@") "jackson-dataformat-yaml"))) |
9885 | #t))))) | |
087c8fd2 JL |
9886 | (inputs |
9887 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
9888 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
9889 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) | |
9890 | ("java-snakeyaml" ,java-snakeyaml))) | |
9891 | (native-inputs | |
9892 | `(("junit" ,java-junit) | |
9893 | ("hamcrest" ,java-hamcrest-core) | |
9894 | ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi) | |
9895 | ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit) | |
9896 | ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core))) | |
9897 | (home-page "https://github.com/FasterXML/jackson-dataformats-text") | |
9898 | (synopsis "Yaml backend for Jackson") | |
9899 | (description "Dataformat backends are used to support format alternatives | |
9900 | to JSON, supported by default. This is done by sub-classing Jackson core | |
9901 | abstractions.") | |
9902 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
6fd07b98 JL |
9903 | |
9904 | (define-public java-stax2-api | |
9905 | (package | |
9906 | (name "java-stax2-api") | |
9907 | (version "4.0.0") | |
9908 | (source (origin | |
9909 | (method url-fetch) | |
9910 | (uri (string-append "https://github.com/FasterXML/stax2-api/archive/" | |
9911 | "stax2-api-" version ".tar.gz")) | |
9912 | (sha256 | |
9913 | (base32 | |
9914 | "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq")))) | |
9915 | (build-system ant-build-system) | |
9916 | (arguments | |
9917 | `(#:jar-name "java-stax2-api.jar" | |
9918 | #:source-dir "src/main/java" | |
9919 | #:tests? #f)); no tests | |
9920 | (home-page "https://github.com/FasterXML/stax2-api") | |
9921 | (synopsis "Stax2 API") | |
9922 | (description "Stax2 API is an extension to basic Stax 1.0 API that adds | |
9923 | significant new functionalities, such as full-featured bi-direction validation | |
9924 | interface and high-performance Typed Access API.") | |
9925 | (license license:bsd-2))) | |
40f193f3 JL |
9926 | |
9927 | (define-public java-woodstox-core | |
9928 | (package | |
9929 | (name "java-woodstox-core") | |
9930 | (version "5.0.3") | |
9931 | (source (origin | |
e98fd9fe EF |
9932 | (method git-fetch) |
9933 | (uri (git-reference | |
9934 | (url "https://github.com/FasterXML/woodstox") | |
9935 | (commit (string-append "woodstox-core-" version)))) | |
9936 | (file-name (git-file-name name version)) | |
40f193f3 JL |
9937 | (sha256 |
9938 | (base32 | |
e98fd9fe | 9939 | "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp")))) |
40f193f3 JL |
9940 | (build-system ant-build-system) |
9941 | (arguments | |
9942 | `(#:jar-name "woodstox.jar" | |
9943 | #:test-exclude | |
9944 | (list "**/Base*.java" "failing/**") | |
9945 | #:phases | |
9946 | (modify-phases %standard-phases | |
9947 | (add-before 'build 'remove-msv-dep | |
9948 | (lambda _ | |
9949 | ;; we don't need osgi, and it depends on msv | |
9950 | (delete-file-recursively "src/main/java/com/ctc/wstx/osgi") | |
9951 | ;; msv's latest release is from 2011 and we don't need it | |
9952 | (delete-file-recursively "src/main/java/com/ctc/wstx/msv") | |
9953 | (delete-file-recursively "src/test/java/wstxtest/osgi") | |
2c8ac364 MW |
9954 | (delete-file-recursively "src/test/java/wstxtest/msv") |
9955 | #t)) | |
40f193f3 JL |
9956 | (add-before 'build 'copy-resources |
9957 | (lambda _ | |
2c8ac364 MW |
9958 | (copy-recursively "src/main/resources" "build/classes") |
9959 | #t))))) | |
40f193f3 JL |
9960 | (inputs |
9961 | `(("stax2" ,java-stax2-api))) | |
9962 | (native-inputs | |
9963 | `(("junit" ,java-junit))) | |
9964 | (home-page "https://github.com/FasterXML/woodstox") | |
9965 | (synopsis "Stax XML API implementation") | |
9966 | (description "Woodstox is a stax XML API implementation.") | |
9967 | (license license:asl2.0))) | |
262a4d33 JL |
9968 | |
9969 | (define-public java-fasterxml-jackson-dataformat-xml | |
9970 | (package | |
9971 | (name "java-fasterxml-jackson-dataformat-xml") | |
f3bbe029 | 9972 | (version "2.9.4") |
262a4d33 | 9973 | (source (origin |
3d67269e EF |
9974 | (method git-fetch) |
9975 | (uri (git-reference | |
9976 | (url "https://github.com/FasterXML/jackson-dataformat-xml") | |
9977 | (commit (string-append "jackson-dataformat-xml-" version)))) | |
9978 | (file-name (git-file-name name version)) | |
262a4d33 JL |
9979 | (sha256 |
9980 | (base32 | |
3d67269e | 9981 | "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx")))) |
262a4d33 JL |
9982 | (build-system ant-build-system) |
9983 | (arguments | |
9984 | `(#:jar-name "jackson-dataformat-xml.jar" | |
9985 | #:source-dir "src/main/java" | |
9986 | #:test-exclude | |
9987 | (list "**/failing/**") | |
9988 | #:phases | |
9989 | (modify-phases %standard-phases | |
9990 | (add-before 'configure 'generate-PackageVersion.java | |
9991 | (lambda _ | |
9992 | (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java") | |
9993 | (in (string-append out ".in"))) | |
9994 | (copy-file in out) | |
9995 | (newline) | |
9996 | (substitute* out | |
9997 | (("@package@") "com.fasterxml.jackson.dataformat.xml") | |
9998 | (("@projectversion@") ,version) | |
9999 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml") | |
2c8ac364 MW |
10000 | (("@projectartifactid@") "jackson-dataformat-xml"))) |
10001 | #t)) | |
262a4d33 JL |
10002 | (add-before 'build 'copy-resources |
10003 | (lambda _ | |
2c8ac364 MW |
10004 | (copy-recursively "src/main/resources" "build/classes") |
10005 | #t))))) | |
262a4d33 JL |
10006 | (inputs |
10007 | `(("jackson-annotations" ,java-fasterxml-jackson-annotations) | |
10008 | ("jackson-core" ,java-fasterxml-jackson-core) | |
10009 | ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb) | |
10010 | ("jackson-databind" ,java-fasterxml-jackson-databind) | |
10011 | ("stax2-api" ,java-stax2-api) | |
10012 | ("woodstox" ,java-woodstox-core))) | |
10013 | (native-inputs | |
10014 | `(("junit" ,java-junit) | |
10015 | ("hamcrest" ,java-hamcrest-core))) | |
10016 | (home-page "https://github.com/FasterXML/jackson-dataformat-xml") | |
10017 | (synopsis "Read and write XML") | |
10018 | (description "This package contains Jackson extension component for reading | |
10019 | and writing XML encoded data. | |
10020 | ||
10021 | Further, the goal is to emulate how JAXB data-binding works with \"Code-first\" | |
10022 | approach (that is, no support is added for \"Schema-first\" approach). Support | |
10023 | for JAXB annotations is provided by JAXB annotation module; this module | |
10024 | provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator}, | |
10025 | @code{JsonFactory}) as well as small number of higher level overrides needed to | |
10026 | make data-binding work.") | |
10027 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
90a127c7 JL |
10028 | |
10029 | (define-public java-hdrhistogram | |
10030 | (package | |
10031 | (name "java-hdrhistogram") | |
10032 | (version "2.1.9") | |
10033 | (source (origin | |
819ead35 EF |
10034 | (method git-fetch) |
10035 | (uri (git-reference | |
10036 | (url "https://github.com/HdrHistogram/HdrHistogram") | |
10037 | (commit (string-append "HdrHistogram-" version)))) | |
10038 | (file-name (git-file-name name version)) | |
90a127c7 JL |
10039 | (sha256 |
10040 | (base32 | |
819ead35 | 10041 | "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d")))) |
90a127c7 JL |
10042 | (build-system ant-build-system) |
10043 | (arguments | |
10044 | `(#:jar-name "java-hdrhistogram.jar" | |
10045 | #:source-dir "src/main/java" | |
10046 | #:phases | |
10047 | (modify-phases %standard-phases | |
819ead35 EF |
10048 | (add-after 'unpack 'make-files-writable |
10049 | (lambda _ | |
10050 | (for-each make-file-writable (find-files ".")) | |
10051 | #t)) | |
90a127c7 JL |
10052 | (add-before 'configure 'set-version |
10053 | (lambda _ | |
10054 | (let* ((version-java "src/main/java/org/HdrHistogram/Version.java") | |
10055 | (template (string-append version-java ".template"))) | |
10056 | (copy-file template version-java) | |
10057 | (substitute* version-java | |
10058 | (("\\$VERSION\\$") ,version) | |
10059 | (("\\$BUILD_TIME\\$") "0")) | |
10060 | #t)))))) | |
10061 | (native-inputs | |
10062 | `(("junit" ,java-junit) | |
10063 | ("hamcrest" ,java-hamcrest-core))) | |
10064 | (home-page "https://hdrhistogram.github.io/HdrHistogram") | |
10065 | (synopsis "High dynamic range histogram") | |
61fa3c67 | 10066 | (description "Hdrhistogram creates histograms that support |
90a127c7 JL |
10067 | recording and analyzing sampled data value counts across a configurable integer |
10068 | value range with configurable value precision within the range. Value precision | |
10069 | is expressed as the number of significant digits in the value recording, and | |
10070 | provides control over value quantization behavior across the value range and | |
10071 | the subsequent value resolution at any given level.") | |
10072 | (license license:public-domain))) | |
5d104a27 | 10073 | |
c5ff11dc RW |
10074 | (define-public java-cofoja |
10075 | (package | |
10076 | (name "java-cofoja") | |
10077 | (version "1.3") | |
10078 | (source (origin | |
10079 | (method git-fetch) | |
10080 | (uri (git-reference | |
b0e7b699 | 10081 | (url "https://github.com/nhatminhle/cofoja") |
c5ff11dc RW |
10082 | (commit (string-append "v" version)))) |
10083 | (file-name (string-append "java-cofoja-" version "-checkout")) | |
10084 | (sha256 | |
10085 | (base32 | |
10086 | "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w")))) | |
10087 | (build-system ant-build-system) | |
10088 | (arguments | |
10089 | `(#:build-target "dist" | |
10090 | #:test-target "test" | |
10091 | #:jdk ,icedtea-8 | |
10092 | #:make-flags | |
10093 | (list "-Ddist.dir=dist") | |
10094 | #:modules ((guix build ant-build-system) | |
10095 | (guix build java-utils) | |
10096 | (guix build utils) | |
10097 | (srfi srfi-1) | |
10098 | (ice-9 match)) | |
10099 | #:phases | |
10100 | (modify-phases %standard-phases | |
10101 | ;; The bulid system ignores the class path the ant-build-system sets | |
10102 | ;; up and instead expects to find all dependencies in the "lib" | |
10103 | ;; directory. | |
10104 | (add-after 'unpack 'create-libdir | |
10105 | (lambda* (#:key inputs #:allow-other-keys) | |
10106 | (mkdir-p "lib") | |
10107 | (for-each | |
10108 | (lambda (file) | |
10109 | (let ((target (string-append "lib/" (basename file)))) | |
10110 | (unless (file-exists? target) | |
10111 | (symlink file target)))) | |
10112 | (append-map (match-lambda | |
10113 | ((label . dir) | |
10114 | (find-files dir "\\.jar$"))) | |
10115 | inputs)) | |
10116 | #t)) | |
10117 | (replace 'install (install-jars "dist"))))) | |
10118 | (inputs | |
10119 | `(("java-asm" ,java-asm))) | |
10120 | (native-inputs | |
10121 | `(("java-junit" ,java-junit))) | |
10122 | (home-page "https://github.com/nhatminhle/cofoja") | |
10123 | (synopsis "Contracts for Java") | |
10124 | (description "Contracts for Java, or Cofoja for short, is a contract | |
10125 | programming framework and test tool for Java, which uses annotation processing | |
10126 | and bytecode instrumentation to provide run-time checking. (In particular, | |
10127 | this is not a static analysis tool.)") | |
10128 | (license license:lgpl3+))) | |
10129 | ||
5d104a27 JL |
10130 | (define-public java-aopalliance |
10131 | (package | |
10132 | (name "java-aopalliance") | |
10133 | (version "1.0") | |
10134 | (source (origin | |
10135 | (method git-fetch) | |
10136 | ;; Note: this git repository is not official, but contains the | |
10137 | ;; source code that is in the CVS repository. Downloading the | |
10138 | ;; tarball from sourceforge is undeterministic, and the cvs download | |
10139 | ;; fails. | |
10140 | (uri (git-reference | |
10141 | (url "https://github.com/hoverruan/aopalliance") | |
10142 | (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0"))) | |
10143 | (file-name (string-append name "-" version)) | |
10144 | (sha256 | |
10145 | (base32 | |
10146 | "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr")))) | |
10147 | (build-system ant-build-system) | |
10148 | (arguments | |
10149 | `(#:jar-name "java-aopalliance.jar" | |
10150 | #:jdk ,icedtea-8 | |
10151 | #:tests? #f; no tests | |
6671d6a1 JL |
10152 | #:source-dir "aopalliance/src/main" |
10153 | #:modules ((guix build ant-build-system) | |
10154 | (guix build utils) | |
10155 | (guix build maven pom) | |
10156 | (guix build java-utils) | |
10157 | (sxml simple)) | |
10158 | #:phases | |
10159 | (modify-phases %standard-phases | |
10160 | (add-before 'install 'create-pom | |
10161 | (lambda _ | |
10162 | (with-output-to-file "pom.xml" | |
10163 | (lambda _ | |
10164 | (sxml->xml | |
10165 | `((project | |
10166 | (modelVersion "4.0.0") | |
10167 | (name "aopalliance") | |
10168 | (groupId "aopalliance") | |
10169 | (artifactId "aopalliance") | |
10170 | (version "1.0")))))) | |
10171 | #t)) | |
10172 | (replace 'install | |
10173 | (install-from-pom "pom.xml"))))) | |
5d104a27 JL |
10174 | (home-page "http://aopalliance.sourceforge.net") |
10175 | (synopsis "Aspect-Oriented Programming") | |
10176 | (description "The AOP Alliance project is a joint project between several | |
10177 | software engineering people who are interested in Aspect-Oriented Programming | |
10178 | (AOP) and Java.") | |
10179 | (license license:public-domain))) | |
454536e0 JL |
10180 | |
10181 | (define-public java-javax-inject | |
10182 | (package | |
10183 | (name "java-javax-inject") | |
6671d6a1 | 10184 | (version "1") |
454536e0 | 10185 | (source (origin |
6671d6a1 JL |
10186 | (method git-fetch) |
10187 | (uri (git-reference | |
10188 | (url "https://github.com/javax-inject/javax-inject") | |
10189 | (commit version))) | |
10190 | (file-name (git-file-name name version)) | |
454536e0 JL |
10191 | (sha256 |
10192 | (base32 | |
6671d6a1 | 10193 | "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x")))) |
454536e0 JL |
10194 | (build-system ant-build-system) |
10195 | (arguments | |
10196 | `(#:jar-name "java-javax-inject.jar" | |
6671d6a1 JL |
10197 | #:tests? #f; no tests |
10198 | #:phases | |
10199 | (modify-phases %standard-phases | |
10200 | (replace 'install | |
10201 | (install-from-pom "pom.xml"))))) | |
702a1012 | 10202 | (home-page "https://github.com/javax-inject/javax-inject") |
454536e0 JL |
10203 | (synopsis "JSR-330: Dependency Injection for Java") |
10204 | (description "This package specifies a means for obtaining objects in such | |
10205 | a way as to maximize reusability, testability and maintainability compared to | |
10206 | traditional approaches such as constructors, factories, and service locators | |
10207 | (e.g., JNDI). This process, known as dependency injection, is beneficial to | |
10208 | most nontrivial applications. | |
10209 | ||
10210 | Many types depend on other types. For example, a @var{Stopwatch} might depend | |
10211 | on a @var{TimeSource}. The types on which a type depends are known as its | |
10212 | dependencies. The process of finding an instance of a dependency to use at run | |
10213 | time is known as resolving the dependency. If no such instance can be found, | |
10214 | the dependency is said to be unsatisfied, and the application is broken.") | |
10215 | (license license:asl2.0))) | |
5766984b JL |
10216 | |
10217 | (define-public java-guice | |
10218 | (package | |
10219 | (name "java-guice") | |
10220 | (version "4.1") | |
10221 | (source (origin | |
b176f69f EF |
10222 | (method git-fetch) |
10223 | (uri (git-reference | |
10224 | (url "https://github.com/google/guice") | |
10225 | (commit version))) | |
10226 | (file-name (git-file-name name version)) | |
9936ffe7 BH |
10227 | (modules '((guix build utils))) |
10228 | (snippet | |
10229 | `(begin | |
b176f69f | 10230 | (for-each delete-file (find-files "." ".*.jar")) #t)) |
5766984b JL |
10231 | (sha256 |
10232 | (base32 | |
b176f69f | 10233 | "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq")))) |
5766984b JL |
10234 | (build-system ant-build-system) |
10235 | (arguments | |
10236 | `(#:jar-name "java-guice.jar" | |
10237 | #:jdk ,icedtea-8 | |
10238 | #:tests? #f; FIXME: tests are not in a java sub directory | |
b176f69f EF |
10239 | #:source-dir "core/src" |
10240 | #:phases | |
10241 | (modify-phases %standard-phases | |
10242 | (add-after 'unpack 'make-files-writable | |
10243 | (lambda _ | |
10244 | (for-each make-file-writable (find-files ".")) | |
6671d6a1 JL |
10245 | #t)) |
10246 | (replace 'install | |
10247 | (install-from-pom "core/pom.xml"))))) | |
10248 | (propagated-inputs | |
10249 | `(("java-aopalliance" ,java-aopalliance) | |
10250 | ("java-asm" ,java-asm) | |
5766984b | 10251 | ("java-cglib" ,java-cglib) |
6671d6a1 | 10252 | ("java-guava" ,java-guava) |
5766984b | 10253 | ("java-javax-inject" ,java-javax-inject) |
6671d6a1 | 10254 | ("java-guice-parent-pom" ,java-guice-parent-pom))) |
5766984b JL |
10255 | (home-page "https://github.com/google/guice") |
10256 | (synopsis "Lightweight dependency injection framework") | |
b176f69f | 10257 | (description "Guice is a lightweight dependency injection framework for |
5766984b JL |
10258 | Java 6 and above.") |
10259 | (license license:asl2.0))) | |
ec4e8ad7 JL |
10260 | |
10261 | (define-public java-guice-servlet | |
10262 | (package | |
10263 | (inherit java-guice) | |
10264 | (name "java-guice-servlet") | |
10265 | (arguments | |
10266 | `(#:jar-name "guice-servlet.jar" | |
10267 | #:source-dir "extensions/servlet/src/" | |
10268 | #:jdk ,icedtea-8 | |
b176f69f EF |
10269 | #:tests? #f ; FIXME: not in a java subdir |
10270 | #:phases | |
10271 | (modify-phases %standard-phases | |
10272 | (add-after 'unpack 'make-files-writable | |
10273 | (lambda _ | |
10274 | (for-each make-file-writable (find-files ".")) | |
10275 | #t))))) | |
ec4e8ad7 JL |
10276 | (inputs |
10277 | `(("guice" ,java-guice) | |
10eddaca | 10278 | ("servlet" ,java-classpathx-servletapi) |
ec4e8ad7 | 10279 | ,@(package-inputs java-guice))))) |
b12fe1e5 | 10280 | |
6671d6a1 JL |
10281 | (define java-guice-parent-pom |
10282 | (package | |
10283 | (inherit java-guice) | |
10284 | (name "java-guice-parent-pom") | |
10285 | (arguments | |
10286 | `(#:tests? #f | |
10287 | #:phases | |
10288 | (modify-phases %standard-phases | |
10289 | (delete 'configure) | |
10290 | (delete 'build) | |
10291 | (add-after 'install 'install-extensions | |
10292 | (install-pom-file "extensions/pom.xml")) | |
10293 | (replace 'install | |
10294 | (install-pom-file "pom.xml"))))) | |
10295 | (propagated-inputs | |
10296 | `(("java-google-parent-pom" ,java-google-parent-pom-5))))) | |
10297 | ||
10298 | (define java-google-parent-pom-5 | |
10299 | (package | |
10300 | (name "java-google-parent-pom") | |
10301 | (version "5") | |
10302 | (source (origin | |
10303 | (method git-fetch) | |
10304 | (uri (git-reference | |
10305 | (url "https://github.com/google/google-maven-parents") | |
10306 | (commit (string-append "google-" version)))) | |
10307 | (file-name (git-file-name name version)) | |
10308 | (sha256 | |
10309 | (base32 | |
10310 | "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv")))) | |
10311 | (build-system ant-build-system) | |
10312 | (arguments | |
10313 | `(#:tests? #f | |
10314 | #:phases | |
10315 | (modify-phases %standard-phases | |
10316 | (delete 'configure) | |
10317 | (delete 'build) | |
10318 | (replace 'install | |
10319 | (install-pom-file "pom.xml"))))) | |
10320 | (home-page "https://github.com/google/google-maven-parents") | |
10321 | (synopsis "Google parent pom") | |
10322 | (description "This package contains the Maven parent POM for other Google | |
10323 | Java projects.") | |
10324 | (license license:asl2.0))) | |
10325 | ||
b12fe1e5 JL |
10326 | (define-public java-assertj |
10327 | (package | |
10328 | (name "java-assertj") | |
10329 | (version "3.8.0") | |
10330 | (source (origin | |
04ca89d8 EF |
10331 | (method git-fetch) |
10332 | (uri (git-reference | |
10333 | (url "https://github.com/joel-costigliola/assertj-core") | |
10334 | (commit (string-append "assertj-core-" version)))) | |
10335 | (file-name (git-file-name name version)) | |
b12fe1e5 JL |
10336 | (sha256 |
10337 | (base32 | |
04ca89d8 | 10338 | "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1")))) |
b12fe1e5 JL |
10339 | (build-system ant-build-system) |
10340 | (arguments | |
10341 | `(#:jar-name "java-assertj.jar" | |
10342 | #:jdk ,icedtea-8 | |
10343 | #:source-dir "src/main/java" | |
10344 | #:tests? #f)); depends on tng-junit which depends on assertj | |
10345 | (inputs | |
10346 | `(("cglib" ,java-cglib) | |
10347 | ("junit" ,java-junit) | |
10348 | ("hamcrest" ,java-hamcrest-core))) | |
10349 | (native-inputs | |
10350 | `(("mockito" ,java-mockito-1))) | |
10351 | (home-page "https://joel-costigliola.github.io/assertj/index.html") | |
10352 | (synopsis "Fluent assertions for java") | |
10353 | (description "AssertJ core is a Java library that provides a fluent | |
10354 | interface for writing assertions. Its main goal is to improve test code | |
10355 | readability and make maintenance of tests easier.") | |
10356 | (license license:asl2.0))) | |
6768e0a7 JL |
10357 | |
10358 | (define-public java-jboss-javassist | |
10359 | (package | |
10360 | (name "java-jboss-javassist") | |
10361 | (version "3.21.0") | |
10362 | (source (origin | |
8b408789 EF |
10363 | (method git-fetch) |
10364 | (uri (git-reference | |
10365 | (url "https://github.com/jboss-javassist/javassist") | |
10366 | (commit | |
10367 | (string-append "rel_" | |
10368 | (string-map | |
10369 | (lambda (x) (if (eq? x #\.) #\_ x)) version) | |
10370 | "_ga")))) | |
10371 | (file-name (git-file-name name version)) | |
6768e0a7 JL |
10372 | (sha256 |
10373 | (base32 | |
87ce1fc5 EF |
10374 | "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm")) |
10375 | (modules '((guix build utils))) | |
10376 | (snippet | |
10377 | '(begin | |
10378 | (delete-file "javassist.jar"))))) | |
6768e0a7 JL |
10379 | (build-system ant-build-system) |
10380 | (arguments | |
10381 | `(#:jar-name "java-jboss-javassist.jar" | |
10382 | #:jdk ,icedtea-8 | |
10383 | #:source-dir "src/main" | |
10384 | #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3 | |
10385 | #:phases | |
10386 | (modify-phases %standard-phases | |
8b408789 | 10387 | (add-after 'unpack 'make-files-writable |
6768e0a7 | 10388 | (lambda _ |
8b408789 | 10389 | (for-each make-file-writable (find-files ".")) |
6768e0a7 JL |
10390 | #t))))) |
10391 | (native-inputs | |
10392 | `(("junit" ,java-junit))) | |
10393 | (home-page "https://github.com/jboss-javassist/javassist") | |
10394 | (synopsis "Java bytecode engineering toolkit") | |
10395 | (description "Javassist (JAVA programming ASSISTant) makes Java bytecode | |
10396 | manipulation simple. It is a class library for editing bytecodes in Java; it | |
10397 | enables Java programs to define a new class at runtime and to modify a class | |
10398 | file when the JVM loads it.") | |
10399 | (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl. | |
a6dd06d0 JL |
10400 | |
10401 | (define-public java-jcommander | |
10402 | (package | |
10403 | (name "java-jcommander") | |
10404 | (version "1.71") | |
10405 | (source (origin | |
4e257acf EF |
10406 | (method git-fetch) |
10407 | (uri (git-reference | |
10408 | (url "https://github.com/cbeust/jcommander") | |
10409 | (commit version))) | |
10410 | (file-name (git-file-name name version)) | |
a6dd06d0 JL |
10411 | (sha256 |
10412 | (base32 | |
4e257acf | 10413 | "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57")))) |
a6dd06d0 JL |
10414 | (build-system ant-build-system) |
10415 | (arguments | |
10416 | `(#:jar-name "java-jcommander.jar" | |
10417 | #:jdk ,icedtea-8 | |
10418 | #:tests? #f; requires testng which depends on jcommander | |
10419 | #:source-dir "src/main/java")) | |
dcfdc908 | 10420 | (home-page "https://jcommander.org") |
a6dd06d0 JL |
10421 | (synopsis "Command line parameters parser") |
10422 | (description "JCommander is a very small Java framework that makes it | |
10423 | trivial to parse command line parameters. Parameters are declared with | |
10424 | annotations.") | |
10425 | (license license:asl2.0))) | |
11bc385b JL |
10426 | |
10427 | (define-public java-bsh | |
10428 | (package | |
10429 | (name "java-bsh") | |
10430 | (version "2.0b6") | |
10431 | (source (origin | |
3e51f9eb EF |
10432 | (method git-fetch) |
10433 | (uri (git-reference | |
10434 | (url "https://github.com/beanshell/beanshell") | |
10435 | (commit version))) | |
10436 | (file-name (git-file-name name version)) | |
11bc385b JL |
10437 | (sha256 |
10438 | (base32 | |
b8d977b1 JL |
10439 | "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw")) |
10440 | (modules '((guix build utils))) | |
10441 | (snippet | |
10442 | '(begin | |
10443 | ;; Delete bundled third-party jar archives. | |
10444 | (for-each delete-file (find-files "." ".*.jar$")) | |
10445 | (for-each (lambda (file) (chmod file #o644)) | |
10446 | (find-files "." ".")) | |
10447 | #t)))) | |
11bc385b JL |
10448 | (build-system ant-build-system) |
10449 | (arguments | |
10450 | `(#:build-target "jarall" | |
10451 | #:test-target "junit-tests-all" | |
c1fb0d8e | 10452 | #:make-flags (list "-DDATE" "(no date for reproducibility)") |
11bc385b JL |
10453 | #:phases |
10454 | (modify-phases %standard-phases | |
b8d977b1 JL |
10455 | (add-before 'install 'fix-pom |
10456 | (lambda _ | |
10457 | (substitute* "pom.xml" | |
10458 | (("org.apache-extras.beanshell") "org.beanshell")) | |
10459 | #t)) | |
11bc385b | 10460 | (replace 'install |
51087d51 | 10461 | (install-from-pom "pom.xml"))))) |
b8d977b1 JL |
10462 | (inputs |
10463 | `(("java-classpathx-servletapi" ,java-classpathx-servletapi) | |
10464 | ("java-commons-bsf" ,java-commons-bsf))) | |
10465 | (native-inputs | |
10466 | `(("java-junit" ,java-junit) | |
10467 | ("javacc" ,javacc-3))) | |
11bc385b JL |
10468 | (home-page "http://beanshell.org/") |
10469 | (synopsis "Lightweight Scripting for Java") | |
10470 | (description "BeanShell is a small, free, embeddable Java source | |
10471 | interpreter with object scripting language features, written in Java. | |
10472 | BeanShell dynamically executes standard Java syntax and extends it with common | |
10473 | scripting conveniences such as loose types, commands, and method closures like | |
10474 | those in Perl and JavaScript.") | |
10475 | (license license:asl2.0))) | |
7a343e97 JL |
10476 | |
10477 | (define-public java-fest-util | |
10478 | (package | |
10479 | (name "java-fest-util") | |
10480 | (version "1.2.5") | |
10481 | (source (origin | |
00f3190d EF |
10482 | (method git-fetch) |
10483 | (uri (git-reference | |
10484 | (url "https://github.com/alexruiz/fest-util/") | |
10485 | (commit (string-append "fest-util-" version)))) | |
10486 | (file-name (git-file-name name version)) | |
7a343e97 JL |
10487 | (sha256 |
10488 | (base32 | |
00f3190d | 10489 | "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz")))) |
7a343e97 JL |
10490 | (build-system ant-build-system) |
10491 | (arguments | |
10492 | `(#:jar-name "java-fest-util.jar" | |
10493 | #:source-dir "src/main/java")) | |
10494 | (native-inputs | |
10495 | `(("junit" ,java-junit) | |
10496 | ("hamcrest" ,java-hamcrest-core))) | |
10497 | (home-page "https://github.com/alexruiz/fest-util") | |
10498 | (synopsis "FEST common utilities") | |
10499 | (description "Common utilities used in all FEST module.") | |
10500 | (license license:asl2.0))) | |
3c6c8358 JL |
10501 | |
10502 | (define-public java-fest-test | |
10503 | (package | |
10504 | (name "java-fest-test") | |
10505 | (version "2.1.0") | |
10506 | (source (origin | |
79e74008 EF |
10507 | (method git-fetch) |
10508 | (uri (git-reference | |
10509 | (url "https://github.com/alexruiz/fest-test/") | |
10510 | (commit (string-append "fest-test-" version)))) | |
10511 | (file-name (git-file-name name version)) | |
3c6c8358 JL |
10512 | (sha256 |
10513 | (base32 | |
79e74008 | 10514 | "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn")))) |
3c6c8358 JL |
10515 | (build-system ant-build-system) |
10516 | (arguments | |
10517 | `(#:jar-name "java-fest-test.jar" | |
10518 | #:source-dir "src/main/java" | |
10519 | #:tests? #f)); no tests | |
10520 | (inputs | |
10521 | `(("junit" ,java-junit))) | |
10522 | (home-page "https://github.com/alexruiz/fest-test") | |
10523 | (synopsis "Common FEST testing infrastructure") | |
10524 | (description "Fest-test contains the common FEST testing infrastructure.") | |
10525 | (license license:asl2.0))) | |
ca98e448 JL |
10526 | |
10527 | (define-public java-fest-assert | |
10528 | (package | |
10529 | (name "java-fest-assert") | |
10530 | (version "2.0M10") | |
10531 | (source (origin | |
e9917c69 EF |
10532 | (method git-fetch) |
10533 | (uri (git-reference | |
10534 | (url "https://github.com/alexruiz/fest-assert-2.x/") | |
10535 | (commit (string-append "fest-assert-core-" version)))) | |
10536 | (file-name (git-file-name name version)) | |
ca98e448 JL |
10537 | (sha256 |
10538 | (base32 | |
e9917c69 | 10539 | "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by")))) |
ca98e448 JL |
10540 | (build-system ant-build-system) |
10541 | (arguments | |
10542 | `(#:jar-name "java-fest-assert.jar" | |
10543 | #:source-dir "src/main/java" | |
10544 | #:test-exclude | |
10545 | (list | |
10546 | "**/Abstract*.java" | |
10547 | "**/*BaseTest.java" | |
10548 | ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses | |
10549 | "**/MessageFormatter_format_Test.java" | |
10550 | "**/internal/*/*_assert*_Test.java"))) | |
10551 | (inputs | |
10552 | `(("java-fest-util" ,java-fest-util))) | |
10553 | (native-inputs | |
10554 | `(("java-junit" ,java-junit) | |
10555 | ("java-fest-test" ,java-fest-test) | |
10556 | ("java-hamcrest-core" ,java-hamcrest-core) | |
10557 | ("java-mockito" ,java-mockito-1) | |
10558 | ("java-cglib" ,java-cglib) | |
10559 | ("java-objenesis" ,java-objenesis) | |
10560 | ("java-asm" ,java-asm))) | |
10561 | (home-page "https://github.com/alexruiz/fest-assert-2.x") | |
10562 | (synopsis "FEST fluent assertions") | |
10563 | (description "FEST-Assert provides a fluent interface for assertions.") | |
10564 | (license license:asl2.0))) | |
0442d897 JL |
10565 | |
10566 | (define-public java-testng | |
10567 | (package | |
10568 | (name "java-testng") | |
3422e10e | 10569 | (version "6.14.3") |
0442d897 | 10570 | (source (origin |
36b39d16 RW |
10571 | (method git-fetch) |
10572 | (uri (git-reference | |
b0e7b699 | 10573 | (url "https://github.com/cbeust/testng") |
36b39d16 RW |
10574 | (commit version))) |
10575 | (file-name (string-append name "-" version "-checkout")) | |
0442d897 JL |
10576 | (sha256 |
10577 | (base32 | |
3422e10e | 10578 | "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv")))) |
0442d897 JL |
10579 | (build-system ant-build-system) |
10580 | (arguments | |
10581 | `(#:jdk ,icedtea-8; java.util.function | |
10582 | #:jar-name "java-testng.jar" | |
10583 | #:source-dir "src/main/java" | |
10584 | #:phases | |
10585 | (modify-phases %standard-phases | |
36b39d16 RW |
10586 | ;; FIXME: I don't know why these tests fail |
10587 | (add-after 'unpack 'delete-failing-tests | |
10588 | (lambda _ | |
10589 | (substitute* "src/test/resources/testng.xml" | |
10590 | (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "") | |
10591 | (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "")) | |
10592 | #t)) | |
10593 | ;; We don't have groovy | |
10594 | (add-after 'unpack 'delete-groovy-tests | |
10595 | (lambda _ | |
10596 | (delete-file-recursively "src/test/java/test/dependent/issue1648/") | |
10597 | (substitute* "src/test/resources/testng.xml" | |
10598 | (("<class name=\"test.dependent.issue1648.TestRunner\"/>") "")) | |
10599 | #t)) | |
0442d897 JL |
10600 | (add-before 'build 'copy-resources |
10601 | (lambda _ | |
10602 | (copy-recursively "src/main/resources" "build/classes") | |
10603 | #t)) | |
10604 | (add-before 'check 'copy-test-resources | |
10605 | (lambda _ | |
10606 | (copy-recursively "src/test/resources" "build/test-classes") | |
10607 | #t)) | |
10608 | (replace 'check | |
10609 | (lambda _ | |
2c8ac364 | 10610 | (invoke "ant" "compile-tests") |
0442d897 JL |
10611 | ;; we don't have groovy |
10612 | (substitute* "src/test/resources/testng.xml" | |
10613 | (("<class name=\"test.groovy.GroovyTest\" />") "")) | |
2c8ac364 MW |
10614 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") |
10615 | ":build/classes" | |
10616 | ":build/test-classes") | |
10617 | "-Dtest.resources.dir=src/test/resources" | |
10618 | "org.testng.TestNG" "src/test/resources/testng.xml")))))) | |
0442d897 JL |
10619 | (propagated-inputs |
10620 | `(("junit" ,java-junit) | |
10621 | ("java-jsr305" ,java-jsr305) | |
10622 | ("java-bsh" ,java-bsh) | |
10623 | ("java-jcommander" ,java-jcommander) | |
10624 | ("java-guice" ,java-guice) | |
10625 | ("snakeyaml" ,java-snakeyaml))) | |
10626 | (native-inputs | |
10627 | `(("guava" ,java-guava) | |
10628 | ("java-javax-inject" ,java-javax-inject) | |
10629 | ("java-hamcrest" ,java-hamcrest-all) | |
10630 | ("java-assertj" ,java-assertj) | |
36b39d16 | 10631 | ("java-mockito" ,java-mockito-1) |
0442d897 JL |
10632 | ("cglib" ,java-cglib) |
10633 | ("asm" ,java-asm) | |
10634 | ("aopalliance" ,java-aopalliance))) | |
c9010605 | 10635 | (home-page "https://testng.org") |
0442d897 JL |
10636 | (synopsis "Testing framework") |
10637 | (description "TestNG is a testing framework inspired from JUnit and NUnit | |
10638 | but introducing some new functionalities that make it more powerful and easier | |
10639 | to use.") | |
10640 | (license license:asl2.0))) | |
1717a7de JL |
10641 | |
10642 | (define-public java-jnacl | |
3e87923a RW |
10643 | (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9") |
10644 | (revision "2")) | |
10645 | (package | |
10646 | (name "java-jnacl") | |
10647 | (version (string-append "0.1.0-" revision "." (string-take commit 7))) | |
10648 | (source (origin | |
10649 | (method git-fetch) | |
10650 | (uri (git-reference | |
b0e7b699 | 10651 | (url "https://github.com/neilalexander/jnacl") |
3e87923a | 10652 | (commit commit))) |
6c34ad73 | 10653 | (file-name (git-file-name name version)) |
3e87923a RW |
10654 | (sha256 |
10655 | (base32 | |
10656 | "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb")))) | |
10657 | (build-system ant-build-system) | |
10658 | (arguments | |
8c7d32e0 | 10659 | `(#:jar-name "jnacl.jar" |
3e87923a RW |
10660 | #:source-dir "src/main/java" |
10661 | #:jdk ,icedtea-8 | |
10662 | #:phases | |
10663 | (modify-phases %standard-phases | |
10664 | (add-before 'build 'fix-tests | |
10665 | (lambda _ | |
10666 | (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java" | |
10667 | "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java") | |
10668 | (("assertions.Assertions") "assertions.api.Assertions")) | |
10669 | #t)) | |
10670 | (replace 'check | |
10671 | (lambda _ | |
10672 | (invoke "ant" "compile-tests") | |
10673 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
10674 | ":build/classes" | |
10675 | ":build/test-classes") | |
10676 | "org.testng.TestNG" "-testclass" | |
10677 | "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class") | |
10678 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
10679 | ":build/classes" | |
10680 | ":build/test-classes") | |
10681 | "org.testng.TestNG" "-testclass" | |
2c8ac364 | 10682 | "build/test-classes/com/neilalexander/jnacl/NaClTest.class")))))) |
3e87923a RW |
10683 | (native-inputs |
10684 | `(("java-testng" ,java-testng) | |
10685 | ("java-fest-util" ,java-fest-util) | |
10686 | ("java-fest-assert" ,java-fest-assert))) | |
10687 | (home-page "https://github.com/neilalexander/jnacl") | |
10688 | (synopsis "Java implementation of NaCl") | |
10689 | (description "Pure Java implementation of the NaCl: Networking and | |
1717a7de | 10690 | Cryptography library.") |
3e87923a | 10691 | (license license:bsd-2)))) |
eaf3cb7a JL |
10692 | |
10693 | (define-public java-mvel2 | |
10694 | (package | |
10695 | (name "java-mvel2") | |
10696 | (version "2.3.1") | |
10697 | (source (origin | |
10698 | (method url-fetch) | |
10699 | (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-" | |
10700 | version ".Final.tar.gz")) | |
10701 | (sha256 | |
10702 | (base32 | |
10703 | "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z")))) | |
10704 | (build-system ant-build-system) | |
10705 | (arguments | |
10706 | `(#:jar-name "mvel2.jar" | |
10707 | #:source-dir "src/main/java" | |
10708 | #:test-exclude | |
10709 | (list "**/Abstract*.java" | |
10710 | ;; Base class with no tests | |
10711 | "**/MVELThreadTest.java") | |
10712 | #:phases | |
10713 | (modify-phases %standard-phases | |
10714 | (add-after 'install 'install-bin | |
10715 | (lambda* (#:key outputs #:allow-other-keys) | |
10716 | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) | |
10717 | (mkdir-p bin) | |
10718 | (with-output-to-file (string-append bin "/mvel2") | |
10719 | (lambda _ | |
10720 | (display | |
10721 | (string-append | |
10722 | "#!" (which "bash") "\n" | |
10723 | "if [ \"$#\" -ne \"2\" ]; then\n" | |
10724 | "echo 'Usage: mvel2 <script> <out.dir>'\n" | |
10725 | "exit\n" | |
10726 | "fi\n" | |
10727 | "java -Dout.dir=$2 -cp " (getenv "CLASSPATH") | |
10728 | ":" (assoc-ref outputs "out") "/share/java/mvel2.jar" | |
10729 | " org.mvel2.sh.Main $1")))) | |
10730 | (chmod (string-append bin "/mvel2") #o755)) | |
10731 | #t))))) | |
10732 | (native-inputs | |
10733 | `(("junit" ,java-junit) | |
10734 | ("hamcrest" ,java-hamcrest-core))) | |
10735 | (home-page "https://github.com/mvel/mvel") | |
10736 | (synopsis "MVFLEX Expression Language") | |
10737 | (description "MVEL has largely been inspired by Java syntax, but has some | |
10738 | fundamental differences aimed at making it more efficient as an expression | |
10739 | language, such as operators that directly support collection, array and string | |
10740 | matching, as well as regular expressions. MVEL is used to evaluate expressions | |
10741 | written using Java syntax. | |
10742 | ||
10743 | In addition to the expression language, MVEL serves as a templating language for | |
10744 | configuration and string construction.") | |
10745 | (license license:asl2.0))) | |
d54d7d31 | 10746 | |
9e325e8c RW |
10747 | (define-public java-commons-jexl-2 |
10748 | (package | |
10749 | (name "java-commons-jexl") | |
10750 | (version "2.1.1") | |
10751 | (source (origin | |
10752 | (method url-fetch) | |
10753 | (uri (string-append "mirror://apache/commons/jexl/source/" | |
10754 | "commons-jexl-" version "-src.tar.gz")) | |
10755 | (sha256 | |
10756 | (base32 | |
10757 | "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz")))) | |
10758 | (build-system ant-build-system) | |
10759 | (arguments | |
10760 | `(#:jar-name "commons-jexl-2.jar" | |
10761 | #:jdk ,icedtea-8 | |
10762 | #:source-dir "src/main/java" | |
10763 | #:phases | |
10764 | (modify-phases %standard-phases | |
10765 | (add-before 'check 'disable-broken-tests | |
10766 | (lambda* (#:key inputs #:allow-other-keys) | |
10767 | (with-directory-excursion "src/test/java/org/apache/commons/jexl2/" | |
10768 | (substitute* "ArithmeticTest.java" | |
10769 | (("asserter.assertExpression\\(\"3 / 0\"") "//") | |
10770 | (("asserter.assertExpression\\(\"imanull") "//")) | |
10771 | ;; This test fails with "ambiguous method invocation" | |
10772 | (delete-file "CacheTest.java") | |
10773 | ;; This test doesn't have access to the temp directory | |
10774 | (substitute* "ClassCreatorTest.java" | |
10775 | (("java.io.tmpdir") "user.dir")) | |
10776 | ;; This test fails in trying to detect whether it can run. | |
10777 | (substitute* "ClassCreator.java" | |
10778 | (("boolean canRun =.*") "boolean canRun = false;\n")) | |
10779 | ;; ...and these tests depend on it. | |
10780 | (delete-file "scripting/JexlScriptEngineOptionalTest.java") | |
10781 | (delete-file "scripting/JexlScriptEngineTest.java")) | |
10782 | #t)) | |
10783 | (add-before 'build 'run-javacc | |
10784 | (lambda _ | |
10785 | (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/" | |
080d0b60 RW |
10786 | (invoke "java" "jjtree" "Parser.jjt") |
10787 | (invoke "java" "javacc" "Parser.jj")) | |
10788 | #t))))) | |
9e325e8c RW |
10789 | (inputs |
10790 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal))) | |
10791 | (native-inputs | |
10792 | `(("java-junit" ,java-junit) | |
10793 | ("java-hamcrest-core" ,java-hamcrest-core) | |
10794 | ("javacc" ,javacc-4))) | |
10795 | (home-page "https://commons.apache.org/proper/commons-jexl/") | |
10796 | (synopsis "Java Expression Language ") | |
10797 | (description "JEXL is a library intended to facilitate the implementation | |
10798 | of dynamic and scripting features in applications and frameworks written in | |
10799 | Java. JEXL implements an Expression Language based on some extensions to the | |
10800 | JSTL Expression Language supporting most of the constructs seen in | |
10801 | shell-script or ECMAScript. Its goal is to expose scripting features usable | |
10802 | by technical operatives or consultants working with enterprise platforms.") | |
10803 | (license license:asl2.0))) | |
10804 | ||
d54d7d31 JL |
10805 | (define-public java-lz4 |
10806 | (package | |
10807 | (name "java-lz4") | |
10808 | (version "1.4.0") | |
10809 | (source (origin | |
6632fc28 EF |
10810 | (method git-fetch) |
10811 | (uri (git-reference | |
10812 | (url "https://github.com/lz4/lz4-java") | |
10813 | (commit version))) | |
10814 | (file-name (git-file-name name version)) | |
d54d7d31 JL |
10815 | (sha256 |
10816 | (base32 | |
6632fc28 | 10817 | "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y")))) |
d54d7d31 JL |
10818 | (build-system ant-build-system) |
10819 | (arguments | |
10820 | `(#:jar-name "lz4.jar" | |
10821 | #:jdk ,icedtea-8 | |
10822 | #:source-dir "src/java:src/java-unsafe" | |
10823 | #:tests? #f; FIXME: requires more dependencies | |
10824 | #:phases | |
10825 | (modify-phases %standard-phases | |
6632fc28 EF |
10826 | (add-after 'unpack 'make-files-writable |
10827 | (lambda _ | |
10828 | (for-each make-file-writable (find-files ".")) | |
10829 | #t)) | |
d54d7d31 JL |
10830 | (add-before 'configure 'generate-source |
10831 | (lambda _ | |
10832 | (with-directory-excursion "src/build/source_templates" | |
1b6bc516 RW |
10833 | (invoke "mvel2" "../gen_sources.mvel" "../../java")) |
10834 | #t))))) | |
d54d7d31 JL |
10835 | (native-inputs |
10836 | `(("mvel" ,java-mvel2))) | |
10837 | (home-page "https://jpountz.github.io/lz4-java") | |
10838 | (synopsis "Compression algorithm") | |
10839 | (description "LZ4 - Java is a Java port of the popular lz4 compression | |
10840 | algorithms and xxHash hashing algorithm.") | |
10841 | (license license:asl2.0))) | |
62315865 | 10842 | |
50d70a72 | 10843 | (define-public java-bouncycastle |
62315865 | 10844 | (package |
50d70a72 | 10845 | (name "java-bouncycastle") |
7de292e9 | 10846 | (version "1.67") |
62315865 | 10847 | (source (origin |
a8f01c45 EF |
10848 | (method git-fetch) |
10849 | (uri (git-reference | |
10850 | (url "http://git.bouncycastle.org/repositories/bc-java") | |
10851 | ;(url "https://github.com/bcgit/bc-java") | |
10852 | (commit (string-append "r1rv" (substring version 2 4))))) | |
10853 | (file-name (git-file-name name version)) | |
62315865 JL |
10854 | (sha256 |
10855 | (base32 | |
7de292e9 | 10856 | "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz")) |
50d70a72 JL |
10857 | (modules '((guix build utils))) |
10858 | (snippet | |
10859 | '(begin | |
10860 | (for-each delete-file | |
10861 | (find-files "." "\\.jar$")) | |
10862 | #t)))) | |
62315865 JL |
10863 | (build-system ant-build-system) |
10864 | (arguments | |
50d70a72 | 10865 | `(#:jdk ,icedtea-8 |
0c68f7fd | 10866 | #:tests? #f |
62315865 JL |
10867 | #:phases |
10868 | (modify-phases %standard-phases | |
50d70a72 | 10869 | (replace 'build |
62315865 | 10870 | (lambda _ |
50d70a72 | 10871 | (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider") |
2c8ac364 | 10872 | (invoke "ant" "-f" "ant/jdk15+.xml" "build"))) |
0c68f7fd RW |
10873 | ;; FIXME: the tests freeze. |
10874 | ;; (replace 'check | |
10875 | ;; (lambda _ | |
10876 | ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test"))) | |
50d70a72 JL |
10877 | (replace 'install |
10878 | (install-jars "build/artifacts/jdk1.5/jars"))))) | |
10879 | (inputs | |
10880 | `(("java-javax-mail" ,java-javax-mail))) | |
31208367 JL |
10881 | (native-inputs |
10882 | `(("unzip" ,unzip) | |
50d70a72 JL |
10883 | ("junit" ,java-junit) |
10884 | ("java-native-access" ,java-native-access) | |
10885 | ("java-native-access-platform" ,java-native-access-platform))) | |
31208367 JL |
10886 | (home-page "https://www.bouncycastle.org") |
10887 | (synopsis "Cryptographic library") | |
50d70a72 JL |
10888 | (description "Bouncy Castle is a cryptographic library for the Java |
10889 | programming language.") | |
31208367 | 10890 | (license license:expat))) |
a53d9ac0 JL |
10891 | |
10892 | (define-public java-lmax-disruptor | |
10893 | (package | |
10894 | (name "java-lmax-disruptor") | |
10895 | (version "3.3.7") | |
10896 | (source (origin | |
10897 | (method url-fetch) | |
10898 | (uri (string-append "https://github.com/LMAX-Exchange/disruptor/" | |
10899 | "archive/" version ".tar.gz")) | |
10900 | (file-name (string-append name "-" version ".tar.gz")) | |
10901 | (sha256 | |
10902 | (base32 | |
10903 | "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g")))) | |
10904 | (build-system ant-build-system) | |
10905 | (arguments | |
10906 | `(#:jar-name "java-lmax-disruptor.jar" | |
10907 | #:jdk ,icedtea-8 | |
10908 | #:tests? #f)); tests hang | |
10909 | (inputs | |
10910 | `(("junit" ,java-junit) | |
10911 | ("java-hdrhistogram" ,java-hdrhistogram) | |
10912 | ("java-jmock" ,java-jmock) | |
10913 | ("java-jmock-legacy" ,java-jmock-legacy) | |
10914 | ("java-jmock-junit4" ,java-jmock-junit4) | |
10915 | ("java-hamcrest-all" ,java-hamcrest-all))) | |
10916 | (native-inputs | |
10917 | `(("cglib" ,java-cglib) | |
10918 | ("objenesis" ,java-objenesis) | |
10919 | ("asm" ,java-asm))) | |
10920 | (home-page "https://www.lmax.com/disruptor") | |
10921 | (synopsis "High performance inter-thread communication") | |
10922 | (description "LMAX Disruptor is a software pattern and software component | |
10923 | for high performance inter-thread communication that avoids the need for | |
10924 | message queues or resource locking.") | |
10925 | (license license:asl2.0))) | |
5619556b | 10926 | |
5e3abfc8 RW |
10927 | (define-public java-commons-bcel |
10928 | (package | |
10929 | (name "java-commons-bcel") | |
10930 | (version "6.1") | |
10931 | (source (origin | |
10932 | (method url-fetch) | |
10933 | (uri (string-append "mirror://apache/commons/bcel/source/bcel-" | |
10934 | version "-src.tar.gz")) | |
10935 | (sha256 | |
10936 | (base32 | |
10937 | "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy")))) | |
10938 | (build-system ant-build-system) | |
10939 | (arguments | |
10940 | `(#:jar-name "bcel.jar" | |
10941 | #:jdk ,icedtea-8 | |
10942 | #:source-dir "src/main/java" | |
10943 | #:test-dir "src/test/java" | |
10944 | ;; FIXME: Tests require the unpackaged jna. | |
10945 | #:tests? #f)) | |
10946 | (home-page "https://commons.apache.org/proper/commons-bcel/") | |
10947 | (synopsis "Byte code engineering library") | |
10948 | (description "The Byte Code Engineering Library (Apache Commons BCEL) is | |
10949 | intended to give users a convenient way to analyze, create, and | |
10950 | manipulate (binary) Java class files. Classes are represented by objects | |
10951 | which contain all the symbolic information of the given class: methods, fields | |
10952 | and byte code instructions, in particular. | |
10953 | ||
10954 | Such objects can be read from an existing file, be transformed by a | |
10955 | program (e.g. a class loader at run-time) and written to a file again. An | |
10956 | even more interesting application is the creation of classes from scratch at | |
10957 | run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful | |
10958 | if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format | |
10959 | of Java @code{.class} files.") | |
10960 | (license license:asl2.0))) | |
10961 | ||
5619556b JL |
10962 | (define-public java-xerial-core |
10963 | (package | |
10964 | (name "java-xerial-core") | |
10965 | (version "2.1") | |
10966 | (source (origin | |
10967 | (method url-fetch) | |
10968 | (uri (string-append "https://github.com/xerial/xerial-java/archive/" | |
10969 | version ".tar.gz")) | |
10970 | (file-name (string-append name "-" version ".tar.gz")) | |
10971 | (sha256 | |
10972 | (base32 | |
10973 | "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d")))) | |
10974 | (build-system ant-build-system) | |
10975 | (arguments | |
10976 | `(#:jar-name "xerial-core.jar" | |
10977 | #:source-dir "xerial-core/src/main/java" | |
10978 | #:test-dir "xerial-core/src/test" | |
10979 | #:phases | |
10980 | (modify-phases %standard-phases | |
10981 | (add-before 'build 'copy-resources | |
10982 | (lambda _ | |
10983 | (copy-recursively "xerial-core/src/main/resources" | |
10984 | "build/classes") | |
10985 | #t))))) | |
10986 | (native-inputs | |
10987 | `(("junit" ,java-junit) | |
10988 | ("hamcrest" ,java-hamcrest-core))) | |
10989 | (home-page "https://github.com/xerial/xerial-java") | |
f4548394 | 10990 | (synopsis "Data management libraries for Java") |
5619556b | 10991 | (description "Xerial is a set of data management libraries for the Java |
f4548394 | 10992 | programming language. The ultimate goal of the Xerial project is to manage |
5619556b JL |
10993 | everything as database, including class objects, text format data, data |
10994 | streams, etc.") | |
10995 | (license license:asl2.0))) | |
8d6a4815 JL |
10996 | |
10997 | (define-public java-powermock-reflect | |
10998 | (package | |
10999 | (name "java-powermock-reflect") | |
11000 | (version "1.7.3") | |
11001 | (source (origin | |
11002 | (method url-fetch) | |
11003 | (uri (string-append "https://github.com/powermock/powermock/" | |
11004 | "archive/powermock-" version ".tar.gz")) | |
11005 | (file-name (string-append name "-" version ".tar.gz")) | |
11006 | (sha256 | |
11007 | (base32 | |
11008 | "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy")) | |
11009 | (patches | |
11010 | (search-patches "java-powermock-fix-java-files.patch")))) | |
11011 | (build-system ant-build-system) | |
11012 | (arguments | |
11013 | `(#:jar-name "java-powermock-reflect.jar" | |
11014 | #:jdk ,icedtea-8 | |
11015 | #:source-dir "powermock-reflect/src/main/java" | |
11016 | #:test-dir "powermock-reflect/src/test")) | |
11017 | (inputs | |
11018 | `(("java-objenesis" ,java-objenesis))) | |
11019 | (native-inputs | |
11020 | `(("junit" ,java-junit) | |
11021 | ("cglib" ,java-cglib) | |
11022 | ("asm" ,java-asm) | |
11023 | ("hamcrest" ,java-hamcrest-core) | |
11024 | ("assertj" ,java-assertj))) | |
11025 | (home-page "https://github.com/powermock/powermock") | |
11026 | (synopsis "Mock library extension framework") | |
11027 | (description "PowerMock is a framework that extends other mock libraries | |
11028 | such as EasyMock with more powerful capabilities. PowerMock uses a custom | |
11029 | classloader and bytecode manipulation to enable mocking of static methods, | |
11030 | constructors, final classes and methods, private methods, removal of static | |
11031 | initializers and more. By using a custom classloader no changes need to be | |
11032 | done to the IDE or continuous integration servers which simplifies adoption.") | |
11033 | (license license:asl2.0))) | |
d4a4d5da JL |
11034 | |
11035 | (define-public java-powermock-core | |
11036 | (package | |
11037 | (inherit java-powermock-reflect) | |
11038 | (name "java-powermock-core") | |
11039 | (arguments | |
11040 | `(#:jar-name "java-powermock-core.jar" | |
11041 | #:source-dir "powermock-core/src/main/java" | |
11042 | #:test-dir "powermock-core/src/test" | |
11043 | #:tests? #f; requires powermock-api | |
59e0021c JL |
11044 | #:jdk ,icedtea-8 |
11045 | #:phases | |
11046 | (modify-phases %standard-phases | |
11047 | (add-before 'build 'copy-resources | |
11048 | (lambda _ | |
11049 | (copy-recursively "powermock-core/src/main/resources" | |
2c8ac364 MW |
11050 | "build/classes") |
11051 | #t))))) | |
d4a4d5da JL |
11052 | (inputs |
11053 | `(("reflect" ,java-powermock-reflect) | |
11054 | ("javassist" ,java-jboss-javassist))) | |
11055 | (native-inputs | |
11056 | `(("junit" ,java-junit) | |
11057 | ("assertj" ,java-assertj) | |
11058 | ("mockito" ,java-mockito-1))))) | |
2d5d65d7 JL |
11059 | |
11060 | (define-public java-powermock-api-support | |
11061 | (package | |
11062 | (inherit java-powermock-reflect) | |
11063 | (name "java-powermock-api-support") | |
11064 | (build-system ant-build-system) | |
11065 | (arguments | |
11066 | `(#:jar-name "java-powermock-api-support.jar" | |
11067 | #:jdk ,icedtea-8 | |
11068 | #:source-dir "powermock-api/powermock-api-support/src/main/java" | |
11069 | #:tests? #f)); no tests | |
11070 | (inputs | |
11071 | `(("core" ,java-powermock-core) | |
11072 | ("reflect" ,java-powermock-reflect))))) | |
6c21d46c JL |
11073 | |
11074 | (define-public java-powermock-modules-junit4-common | |
11075 | (package | |
11076 | (inherit java-powermock-reflect) | |
11077 | (name "java-powermock-modules-junit4-common") | |
11078 | (build-system ant-build-system) | |
11079 | (arguments | |
11080 | `(#:jar-name "java-powermock-modules-junit4-common.jar" | |
11081 | #:jdk ,icedtea-8 | |
11082 | #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java" | |
11083 | #:test-dir "powermock-modules/powermock-module-junit4-common/src/test")) | |
11084 | (inputs | |
11085 | `(("core" ,java-powermock-core) | |
11086 | ("easymock" ,java-easymock) | |
11087 | ("reflect" ,java-powermock-reflect) | |
11088 | ("hamcrest" ,java-hamcrest-core) | |
11089 | ("cglib" ,java-cglib))))) | |
33db1681 JL |
11090 | |
11091 | (define-public java-powermock-modules-junit4 | |
11092 | (package | |
11093 | (inherit java-powermock-reflect) | |
11094 | (name "java-powermock-modules-junit4") | |
11095 | (build-system ant-build-system) | |
11096 | (arguments | |
11097 | `(#:jar-name "java-powermock-modules-junit4.jar" | |
11098 | #:jdk ,icedtea-8 | |
11099 | #:source-dir "powermock-modules/powermock-module-junit4/src/main/java" | |
1124683d JL |
11100 | #:test-dir "powermock-modules/powermock-module-junit4/src/test" |
11101 | #:phases | |
11102 | (modify-phases %standard-phases | |
11103 | (add-before 'build 'fix-junit-detection | |
11104 | (lambda _ | |
11105 | ;; Our junit version is 4.12-SNAPSHOT | |
11106 | (substitute* (find-files "powermock-modules/powermock-module-junit4" | |
11107 | "PowerMockJUnit4MethodValidator.java") | |
2c8ac364 MW |
11108 | (("4.12") "4.12-SNAPSHOT")) |
11109 | #t))))) | |
33db1681 JL |
11110 | (inputs |
11111 | `(("core" ,java-powermock-core) | |
11112 | ("reflect" ,java-powermock-reflect) | |
11113 | ("common" ,java-powermock-modules-junit4-common) | |
11114 | ("cglib" ,java-cglib))) | |
11115 | (native-inputs | |
11116 | `(("easymock" ,java-easymock) | |
11117 | ("hamcrest" ,java-hamcrest-core) | |
11118 | ("objenesis" ,java-objenesis) | |
11119 | ("asm" ,java-asm) | |
11120 | ("junit" ,java-junit))))) | |
4d508975 JL |
11121 | |
11122 | (define-public java-powermock-api-easymock | |
11123 | (package | |
11124 | (inherit java-powermock-reflect) | |
11125 | (name "java-powermock-api-easymock") | |
11126 | (build-system ant-build-system) | |
11127 | (arguments | |
11128 | `(#:jar-name "java-powermock-api-easymock.jar" | |
11129 | #:jdk ,icedtea-8 | |
11130 | #:source-dir "powermock-api/powermock-api-easymock/src/main/java" | |
11131 | #:tests? #f; no tests | |
11132 | #:phases | |
11133 | (modify-phases %standard-phases | |
11134 | (add-before 'build 'fix-file | |
11135 | (lambda _ | |
11136 | ;; FIXME: This looks wrong, but it fixes a build error. | |
11137 | (with-directory-excursion "powermock-api/powermock-api-easymock" | |
11138 | (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java" | |
11139 | (("classLoader instanceof MockClassLoader") "false") | |
11140 | (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";"))) | |
11141 | #t))))) | |
11142 | (inputs | |
11143 | `(("core" ,java-powermock-core) | |
11144 | ("easymock" ,java-easymock) | |
11145 | ("reflect" ,java-powermock-reflect) | |
11146 | ("support" ,java-powermock-api-support) | |
11147 | ("cglib" ,java-cglib))))) | |
5fb3e822 JL |
11148 | |
11149 | (define-public java-jboss-jms-api-spec | |
11150 | (package | |
11151 | (name "java-jboss-jms-api-spec") | |
11152 | (version "2.0") | |
11153 | (source (origin | |
11154 | (method url-fetch) | |
11155 | (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/" | |
11156 | "archive/jboss-jms-api_" version | |
11157 | "_spec-1.0.1.Final.tar.gz")) | |
11158 | (sha256 | |
11159 | (base32 | |
11160 | "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m")))) | |
11161 | (build-system ant-build-system) | |
11162 | (arguments | |
11163 | `(#:jar-name "java-jboss-jms-api_spec.jar" | |
11164 | #:jdk ,icedtea-8 | |
11165 | #:source-dir "." | |
11166 | #:tests? #f)); no tests | |
11167 | (home-page "https://github.com/jboss/jboss-jms-api_spec") | |
11168 | (synopsis "Java Message Service API specification") | |
11169 | (description "Java Message Service (JMS) API is used to send messages | |
11170 | messages between two or more clients. It is a messaging standard that allows | |
11171 | application components to create, send, receive, and read messages.") | |
11172 | ; either gpl2 only with GPL Classpath Exception, or cddl. | |
11173 | (license (list license:gpl2 license:cddl1.0)))) | |
3ff47c66 JL |
11174 | |
11175 | (define-public java-mail | |
11176 | (package | |
11177 | (name "java-mail") | |
11178 | (version "1.6.0") | |
11179 | (source (origin | |
11180 | (method url-fetch) | |
11181 | (uri (string-append "https://github.com/javaee/javamail/archive/" | |
11182 | "JAVAMAIL-1_6_0.tar.gz")) | |
11183 | (sha256 | |
11184 | (base32 | |
11185 | "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92")))) | |
11186 | (build-system ant-build-system) | |
11187 | (arguments | |
11188 | `(#:jar-name "java-mail.jar" | |
11189 | #:jdk ,icedtea-8 | |
11190 | #:source-dir "mail/src/main/java" | |
11191 | #:test-dir "mail/src/test" | |
11192 | #:test-exclude | |
11193 | (list "**/CollectorFormatterTest.java" | |
11194 | "**/CompactFormatterTest.java" | |
11195 | "**/DurationFilterTest.java" | |
11196 | "**/MailHandlerTest.java" | |
11197 | "**/GetLocalAddressTest.java" | |
11198 | ;; FIXME: both end with: | |
11199 | ;; java.lang.ClassNotFoundException: | |
11200 | ;; javax.mail.internet.MimeMultipartParseTest | |
11201 | "**/MimeMultipartParseTest.java" | |
11202 | "**/SearchTermSerializationTest.java") | |
11203 | #:phases | |
11204 | (modify-phases %standard-phases | |
11205 | (add-before 'configure 'move-version.java | |
11206 | (lambda _ | |
11207 | (copy-file "mail/src/main/resources/javax/mail/Version.java" | |
218d1dde RW |
11208 | "mail/src/main/java/javax/mail/Version.java") |
11209 | #t)) | |
3ff47c66 JL |
11210 | (add-before 'build 'copy-resources |
11211 | (lambda _ | |
11212 | (copy-recursively "mail/src/main/resources/META-INF" | |
11213 | "build/classes/META-INF") | |
11214 | #t))))) | |
11215 | (native-inputs | |
11216 | `(("junit" ,java-junit) | |
11217 | ("hamcrest" ,java-hamcrest-core))) | |
11218 | (home-page "https://javaee.github.io/javamail/") | |
7230f6d5 | 11219 | (synopsis "Mail-related functionality in Java") |
3ff47c66 JL |
11220 | (description "The JavaMail API provides a platform-independent and |
11221 | protocol-independent framework to build mail and messaging applications.") | |
11222 | ;; General Public License Version 2 only ("GPL") or the Common Development | |
11223 | ;; and Distribution License("CDDL") | |
11224 | (license (list license:cddl1.1 | |
11225 | license:gpl2)))); with classpath exception | |
217b20e4 JL |
11226 | |
11227 | (define-public java-jeromq | |
11228 | (package | |
11229 | (name "java-jeromq") | |
4aa0a1df | 11230 | (version "0.4.3") |
217b20e4 | 11231 | (source (origin |
4aa0a1df RW |
11232 | (method git-fetch) |
11233 | (uri (git-reference | |
b0e7b699 | 11234 | (url "https://github.com/zeromq/jeromq") |
4aa0a1df RW |
11235 | (commit (string-append "v" version)))) |
11236 | (file-name (string-append name "-" version "-checkout")) | |
217b20e4 JL |
11237 | (sha256 |
11238 | (base32 | |
594bd3a0 GB |
11239 | "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj")) |
11240 | (patches (search-patches "java-jeromq-fix-tests.patch")))) | |
217b20e4 JL |
11241 | (build-system ant-build-system) |
11242 | (arguments | |
11243 | `(#:jar-name "java-jeromq.jar" | |
11244 | #:source-dir "src/main/java" | |
11245 | #:jdk ,icedtea-8 | |
11246 | #:test-exclude | |
11247 | (list | |
11248 | "**/Abstract*.java" | |
11249 | ;; Requires network | |
11250 | "**/ZBeaconTest.java" | |
11251 | ;; Failures | |
4aa0a1df | 11252 | "**/DealerSpecTest.java" |
217b20e4 | 11253 | "**/CustomDecoderTest.java" |
594bd3a0 GB |
11254 | "**/CustomEncoderTest.java" |
11255 | "**/ConnectRidTest.java" | |
11256 | "**/ReqSpecTest.java" | |
11257 | "**/PushPullSpecTest.java" | |
11258 | "**/PubSubHwmTest.java" | |
11259 | "**/RouterSpecTest.java" | |
11260 | "**/ProxyTest.java"))) | |
217b20e4 JL |
11261 | (inputs |
11262 | `(("java-jnacl" ,java-jnacl))) | |
11263 | (native-inputs | |
11264 | `(("java-hamcrest-core" ,java-hamcrest-core) | |
11265 | ("junit" ,java-junit))) | |
11266 | (home-page "http://zeromq.org/bindings:java") | |
11267 | (synopsis "Java binding for 0MQ") | |
11268 | (description "Jeromq provides the java bindings for 0MQ.") | |
11269 | (license license:mpl2.0))) | |
46c6905a JL |
11270 | |
11271 | (define-public java-kafka-clients | |
11272 | (package | |
11273 | (name "java-kafka-clients") | |
11274 | (version "1.0.0") | |
11275 | (source (origin | |
11276 | (method url-fetch) | |
11277 | (uri (string-append "mirror://apache/kafka/" version "/kafka-" | |
11278 | version "-src.tgz")) | |
11279 | (sha256 | |
11280 | (base32 | |
11281 | "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq")))) | |
11282 | (build-system ant-build-system) | |
11283 | (arguments | |
11284 | `(#:jar-name "java-kafka-clients.jar" | |
11285 | #:jdk ,icedtea-8 | |
11286 | #:source-dir "clients/src/main/java" | |
11287 | #:test-dir "clients/src/test" | |
11288 | #:test-exclude | |
11289 | (list | |
11290 | ;; This file does not contain a class | |
11291 | "**/IntegrationTest.java" | |
11292 | ;; Requires network | |
11293 | "**/ClientUtilsTest.java" | |
11294 | ;; End with errors that seem related to our powermock | |
11295 | "**/KafkaProducerTest.java" | |
11296 | "**/BufferPoolTest.java"))) | |
11297 | (inputs | |
11298 | `(("java-slf4j-api" ,java-slf4j-api) | |
11299 | ("java-lz4" ,java-lz4))) | |
11300 | (native-inputs | |
11301 | `(("junit" ,java-junit) | |
11302 | ("hamcrest" ,java-hamcrest-all) | |
11303 | ("objenesis" ,java-objenesis) | |
11304 | ("asm" ,java-asm) | |
11305 | ("cglib" ,java-cglib) | |
11306 | ("javassist" ,java-jboss-javassist) | |
11307 | ("snappy" ,java-snappy) | |
11308 | ("easymock" ,java-easymock) | |
11309 | ("powermock" ,java-powermock-core) | |
11310 | ("powermock-easymock" ,java-powermock-api-easymock) | |
11311 | ("powermock-junit4-common" ,java-powermock-modules-junit4-common) | |
11312 | ("powermock-junit4" ,java-powermock-modules-junit4) | |
11313 | ("powermock-support" ,java-powermock-api-support) | |
50d70a72 | 11314 | ("java-bouncycastle" ,java-bouncycastle))) |
46c6905a JL |
11315 | (home-page "https://kafka.apache.org") |
11316 | (synopsis "Distributed streaming platform") | |
11317 | (description "Kafka is a distributed streaming platform, which means: | |
11318 | @itemize | |
11319 | @item it can publish and subscribe to streams of records; | |
11320 | @item it can store streams of records in a fault-tolerant way; | |
11321 | @item it can process streams of records as they occur. | |
11322 | @end itemize") | |
11323 | ;; Either cddl or gpl2 only. | |
11324 | (license (list license:cddl1.1; actually cddl1.1 | |
11325 | license:gpl2)))); with classpath exception | |
0b54e190 JL |
11326 | |
11327 | (define-public java-jdom | |
11328 | (package | |
11329 | (name "java-jdom") | |
11330 | (version "1.1.3") | |
11331 | (source (origin | |
11332 | (method url-fetch) | |
11333 | (uri (string-append "http://jdom.org/dist/binary/archive/jdom-" | |
11334 | version ".tar.gz")) | |
11335 | (sha256 | |
11336 | (base32 | |
11337 | "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl")))) | |
11338 | (build-system ant-build-system) | |
11339 | (arguments | |
11340 | `(#:build-target "package" | |
11341 | #:tests? #f; tests are run as part of the build process | |
11342 | #:phases | |
11343 | (modify-phases %standard-phases | |
11344 | (replace 'install | |
11345 | (install-jars "build"))))) | |
11346 | (home-page "http://jdom.org/") | |
11347 | (synopsis "Access, manipulate, and output XML data") | |
11348 | (description "Java-based solution for accessing, manipulating, and | |
11349 | outputting XML data from Java code.") | |
11350 | (license license:bsd-4))) | |
78745d33 JL |
11351 | |
11352 | (define-public java-geronimo-xbean-reflect | |
11353 | (package | |
11354 | (name "java-geronimo-xbean-reflect") | |
11355 | (version "4.5") | |
11356 | (source (origin | |
11357 | (method svn-fetch) | |
11358 | (uri (svn-reference | |
11359 | (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/") | |
11360 | (revision 1807396))) | |
11361 | (file-name (string-append name "-" version)) | |
11362 | (sha256 | |
11363 | (base32 | |
11364 | "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja")))) | |
11365 | (build-system ant-build-system) | |
11366 | (arguments | |
11367 | `(#:jar-name "geronimo-xbean-reflect.jar" | |
11368 | #:source-dir "xbean-reflect/src/main/java" | |
11369 | #:test-dir "xbean-reflect/src/test" | |
11370 | #:jdk ,icedtea-8 | |
11371 | #:test-exclude | |
11372 | (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java" | |
11373 | "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java" | |
11374 | "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java") | |
11375 | #:phases | |
11376 | (modify-phases %standard-phases | |
11377 | (add-before 'build 'fix-source | |
11378 | (lambda _ | |
11379 | (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/")) | |
11380 | ;; org.apache.xbean.asm6 is actually repackaged java-asm | |
11381 | (substitute* (string-append dir "XbeanAsmParameterNameLoader.java") | |
11382 | (("org.apache.xbean.asm5") "org.objectweb.asm")) | |
02ed96dc JL |
11383 | #t))) |
11384 | (replace 'install (install-from-pom "xbean-reflect/pom.xml"))))) | |
78745d33 JL |
11385 | (inputs |
11386 | `(("asm" ,java-asm) | |
11387 | ("log4j" ,java-log4j-api) | |
11388 | ("log4j-1.2" ,java-log4j-1.2-api) | |
11389 | ("log4j-core" ,java-log4j-core) | |
11390 | ("logging" ,java-commons-logging-minimal))) | |
02ed96dc JL |
11391 | (propagated-inputs |
11392 | `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom))) | |
78745d33 JL |
11393 | (native-inputs |
11394 | `(("junit" ,java-junit))) | |
11395 | (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/") | |
11396 | (synopsis "Dependency injection helper") | |
11397 | (description "Xbean-reflect provides very flexible ways to create objects | |
11398 | and graphs of objects for dependency injection frameworks") | |
11399 | (license license:asl2.0))) | |
09c44196 | 11400 | |
02ed96dc JL |
11401 | (define java-geronimo-genesis-2.1 |
11402 | (package | |
11403 | (name "java-geronimo-genesis") | |
11404 | (version "2.1") | |
11405 | (source (origin | |
11406 | (method svn-fetch) | |
11407 | (uri (svn-reference | |
11408 | (url (string-append "https://svn.apache.org/repos/asf/" | |
11409 | "geronimo/genesis/tags/genesis-" | |
11410 | version)) | |
11411 | (revision 1807396))) | |
11412 | (file-name (string-append name "-" version "-source")) | |
11413 | (sha256 | |
11414 | (base32 | |
11415 | "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31")))) | |
11416 | (build-system ant-build-system) | |
11417 | (arguments | |
11418 | `(#:tests? #f | |
11419 | #:phases | |
11420 | (modify-phases %standard-phases | |
11421 | (delete 'configure) | |
11422 | (delete 'build) | |
11423 | (replace 'install | |
11424 | (install-pom-file "pom.xml")) | |
11425 | (add-after 'install 'install-enforcer-rules | |
11426 | (install-pom-file "genesis-enforcer-rules/pom.xml")) | |
11427 | (add-after 'install 'install-flava | |
11428 | (install-pom-file "genesis-default-flava/pom.xml")) | |
11429 | (add-after 'install 'install-packaging | |
11430 | (install-pom-file "genesis-packaging/pom.xml")) | |
11431 | (add-after 'install-flava 'install-flava-java4 | |
11432 | (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml")) | |
11433 | (add-after 'install-flava 'install-flava-java5 | |
11434 | (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml")) | |
11435 | (add-after 'install-flava 'install-flava-java6 | |
11436 | (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml"))))) | |
11437 | (propagated-inputs | |
11438 | `(("apache-parent-pom" ,apache-parent-pom-13))) | |
11439 | (home-page "https://geronimo.apache.org") | |
11440 | (synopsis "Collection of maven POM files for the Geronimo project") | |
11441 | (description "Apache Geronimo is a server runtime. This package contains | |
11442 | only pom files used by other components in the Geronimo project.") | |
11443 | (license license:asl2.0))) | |
11444 | ||
11445 | (define java-geronimo-parent-pom | |
11446 | (package | |
11447 | (inherit java-geronimo-xbean-reflect) | |
11448 | (name "java-geronimo-parent-pom") | |
11449 | (arguments | |
11450 | `(#:tests? #f | |
11451 | #:phases | |
11452 | (modify-phases %standard-phases | |
11453 | (delete 'configure) | |
11454 | (delete 'build) | |
11455 | (replace 'install | |
11456 | (install-pom-file "pom.xml"))))) | |
11457 | (propagated-inputs | |
11458 | `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1))))) | |
11459 | ||
3fda539b JL |
11460 | (define-public java-geronimo-xbean-bundleutils |
11461 | (package | |
11462 | (inherit java-geronimo-xbean-reflect) | |
11463 | (name "java-geronimo-xbean-bundleutils") | |
11464 | (arguments | |
11465 | `(#:jar-name "geronimo-xbean-bundleutils.jar" | |
11466 | #:source-dir "xbean-bundleutils/src/main/java" | |
11467 | #:test-dir "xbean-bundleutils/src/test" | |
11468 | #:phases | |
11469 | (modify-phases %standard-phases | |
11470 | (add-before 'build 'fix-java | |
11471 | (lambda _ | |
11472 | ;; We use a more recent version of osgi, so this file requires | |
11473 | ;; more interface method implementations. | |
11474 | (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java" | |
11475 | (("import org.osgi.framework.ServiceRegistration;") | |
11476 | "import org.osgi.framework.ServiceRegistration; | |
11477 | import org.osgi.framework.ServiceFactory; | |
11478 | import java.util.Collection; | |
11479 | import org.osgi.framework.ServiceObjects;") | |
11480 | (("public Bundle getBundle\\(\\)") | |
11481 | "@Override | |
11482 | public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) { | |
11483 | throw new UnsupportedOperationException(); | |
11484 | } | |
11485 | @Override | |
11486 | public <S> ServiceRegistration<S> registerService(Class<S> clazz, | |
11487 | ServiceFactory<S> factory, Dictionary<String, ?> properties) { | |
11488 | throw new UnsupportedOperationException(); | |
11489 | } | |
11490 | public Bundle getBundle()")) | |
11491 | #t))))) | |
11492 | (inputs | |
11493 | `(("java-slf4j" ,java-slf4j-api) | |
11494 | ("java-asm" ,java-asm) | |
11495 | ("java-osgi-framework" ,java-osgi-framework) | |
11496 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
11497 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin))))) | |
6671d6a1 | 11498 | |
0cb9ce32 JL |
11499 | (define-public java-geronimo-xbean-asm-util |
11500 | (package | |
11501 | (inherit java-geronimo-xbean-reflect) | |
11502 | (name "java-geronimo-xbean-asm-util") | |
11503 | (arguments | |
11504 | `(#:jar-name "geronimo-xbean-asm-util.jar" | |
11505 | #:source-dir "xbean-asm-util/src/main/java" | |
11506 | #:tests? #f)); no tests | |
11507 | (inputs | |
11508 | `(("java-asm" ,java-asm))) | |
11509 | (native-inputs '()))) | |
6671d6a1 | 11510 | |
8d510f65 JL |
11511 | (define-public java-geronimo-xbean-finder |
11512 | (package | |
11513 | (inherit java-geronimo-xbean-reflect) | |
11514 | (name "java-geronimo-xbean-finder") | |
11515 | (arguments | |
11516 | `(#:jar-name "geronimo-xbean-finder.jar" | |
11517 | #:source-dir "xbean-finder/src/main/java" | |
11518 | #:test-dir "xbean-finder/src/test")) | |
11519 | (inputs | |
11520 | `(("java-slf4j-api" ,java-slf4j-api) | |
11521 | ("java-asm" ,java-asm) | |
11522 | ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils) | |
11523 | ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util) | |
11524 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin) | |
11525 | ("java-osgi-framework" ,java-osgi-framework))) | |
11526 | (native-inputs | |
11527 | `(("java-junit" ,java-junit) | |
11528 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
3fda539b | 11529 | |
09c44196 JL |
11530 | (define-public java-gson |
11531 | (package | |
11532 | (name "java-gson") | |
11533 | (version "2.8.2") | |
11534 | (source (origin | |
11535 | (method url-fetch) | |
11536 | (uri (string-append "https://github.com/google/gson/archive/" | |
11537 | "gson-parent-" version ".tar.gz")) | |
11538 | (sha256 | |
11539 | (base32 | |
11540 | "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9")))) | |
11541 | (build-system ant-build-system) | |
11542 | (arguments | |
11543 | `(#:jar-name "gson.jar" | |
11544 | #:source-dir "gson/src/main/java" | |
11545 | #:test-dir "gson/src/test")) | |
11546 | (native-inputs | |
11547 | `(("java-junit" ,java-junit) | |
11548 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
11549 | (home-page "https://github.com/google/gson") | |
11550 | (synopsis "Java serialization/deserialization library from/to JSON") | |
11551 | (description "Gson is a Java library that can be used to convert Java | |
11552 | Objects into their JSON representation. It can also be used to convert a JSON | |
11553 | string to an equivalent Java object. Gson can work with arbitrary Java objects | |
11554 | including pre-existing objects that you do not have source-code of.") | |
11555 | (license license:asl2.0))) | |
335aa20b JL |
11556 | |
11557 | (define-public java-hawtjni | |
11558 | (package | |
11559 | (name "java-hawtjni") | |
11560 | (version "1.15") | |
11561 | (source (origin | |
11562 | (method url-fetch) | |
11563 | (uri (string-append "https://github.com/fusesource/hawtjni/archive/" | |
11564 | "hawtjni-project-" version ".tar.gz")) | |
11565 | (sha256 | |
11566 | (base32 | |
11567 | "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g")))) | |
11568 | (build-system ant-build-system) | |
11569 | (arguments | |
11570 | `(#:jar-name "hawtjni.jar" | |
11571 | #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java" | |
11572 | #:tests? #f; no tests | |
11573 | #:phases | |
11574 | (modify-phases %standard-phases | |
11575 | (add-before 'build 'build-native | |
11576 | (lambda* (#:key inputs #:allow-other-keys) | |
6338ea9a RW |
11577 | (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))) |
11578 | (with-directory-excursion "hawtjni-generator/src/main/resources/" | |
11579 | (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o" | |
11580 | "-fPIC" "-O2" include) | |
11581 | (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o" | |
11582 | "-fPIC" "-O2" include) | |
11583 | (invoke "gcc" "-o" "libhawtjni.so" "-shared" | |
11584 | "hawtjni.o" "hawtjni-callback.o"))) | |
11585 | #t)) | |
335aa20b JL |
11586 | (add-after 'install 'install-native |
11587 | (lambda* (#:key outputs #:allow-other-keys) | |
11588 | (let* ((out (assoc-ref outputs "out")) | |
11589 | (lib (string-append out "/lib")) | |
11590 | (inc (string-append out "/include"))) | |
335aa20b | 11591 | (with-directory-excursion "hawtjni-generator/src/main/resources/" |
6338ea9a RW |
11592 | (install-file "libhawtjni.so" lib) |
11593 | (install-file "hawtjni.h" inc))) | |
b777e194 JL |
11594 | #t)) |
11595 | (add-before 'install 'install-parent | |
11596 | (install-pom-file "pom.xml")) | |
11597 | (replace 'install | |
11598 | (install-from-pom "hawtjni-runtime/pom.xml"))))) | |
335aa20b JL |
11599 | (inputs |
11600 | `(("java-commons-cli" ,java-commons-cli) | |
11601 | ("java-asm" ,java-asm) | |
11602 | ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder))) | |
11603 | (home-page "https://fusesource.github.io/hawtjni/") | |
11604 | (synopsis "JNI code generator") | |
11605 | (description "HawtJNI is a code generator that produces the JNI code needed | |
11606 | to implement Java native methods. It is based on the jnigen code generator | |
11607 | that is part of the SWT Tools project.") | |
11608 | (license license:asl2.0))) | |
d0c62afa JL |
11609 | |
11610 | (define-public java-jansi-native | |
11611 | (package | |
11612 | (name "java-jansi-native") | |
11613 | (version "1.7") | |
11614 | (source (origin | |
11615 | (method url-fetch) | |
11616 | (uri (string-append "https://github.com/fusesource/jansi-native/" | |
11617 | "archive/jansi-native-" version ".tar.gz")) | |
11618 | (sha256 | |
11619 | (base32 | |
11620 | "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf")))) | |
11621 | (build-system ant-build-system) | |
11622 | (arguments | |
11623 | `(#:jar-name "jansi-native.jar" | |
11624 | #:source-dir "src/main/java" | |
11625 | #:tests? #f; no tests | |
11626 | #:phases | |
11627 | (modify-phases %standard-phases | |
11628 | (add-before 'build 'build-native | |
11629 | (lambda* (#:key inputs #:allow-other-keys) | |
11630 | ;; there are more required files for windows in windows/ | |
11631 | (with-directory-excursion "src/main/native-package/src" | |
11632 | (substitute* "jansi_ttyname.c" | |
11633 | (("#include \"jansi_.*") "")) | |
e85c1bf6 RW |
11634 | (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o" |
11635 | (string-append "-I" (assoc-ref inputs "java-hawtjni") | |
11636 | "/include") | |
11637 | (string-append "-I" (assoc-ref inputs "jdk") | |
11638 | "/include/linux") | |
11639 | "-fPIC" "-O2") | |
2c8ac364 | 11640 | (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")))) |
d0c62afa JL |
11641 | (add-before 'build 'install-native |
11642 | (lambda _ | |
11643 | (let ((dir (string-append "build/classes/META-INF/native/" | |
11644 | ,(match (%current-system) | |
11645 | ((or "i686-linux" "armhf-linux") | |
11646 | "linux32") | |
3c4103c8 LC |
11647 | ((or "x86_64-linux" "aarch64-linux" |
11648 | "mips64el-linux") | |
9820d6ed JN |
11649 | "linux64") |
11650 | (_ "unknown-kernel"))))) | |
d0c62afa JL |
11651 | (install-file "src/main/native-package/src/libjansi.so" dir)) |
11652 | #t)) | |
11653 | (add-after 'install 'install-native | |
11654 | (lambda* (#:key outputs #:allow-other-keys) | |
d0c62afa JL |
11655 | (install-file "src/main/native-package/src/jansi.h" |
11656 | (string-append (assoc-ref outputs "out") "/include")) | |
b777e194 JL |
11657 | #t)) |
11658 | (add-before 'install 'fix-pom | |
11659 | (lambda _ | |
11660 | ;; pom contains variables to complete name, but we don't support that | |
11661 | (substitute* "pom.xml" | |
11662 | (("\\$\\{platform\\}") "native")) | |
11663 | #t)) | |
11664 | (replace 'install | |
11665 | (install-from-pom "pom.xml"))))) | |
11666 | (propagated-inputs | |
d0c62afa JL |
11667 | `(("java-hawtjni" ,java-hawtjni))) |
11668 | (home-page "https://fusesource.github.io/jansi/") | |
11669 | (synopsis "Native library for jansi") | |
3d6925ef RW |
11670 | (description "This package provides the native library for jansi, a small |
11671 | Java library that allows you to use ANSI escape sequences to format your | |
11672 | console output.") | |
d0c62afa | 11673 | (license license:asl2.0))) |
a87ea1ad JL |
11674 | |
11675 | (define-public java-jansi | |
11676 | (package | |
11677 | (name "java-jansi") | |
11678 | (version "1.16") | |
11679 | (source (origin | |
11680 | (method url-fetch) | |
11681 | (uri (string-append "https://github.com/fusesource/jansi/archive/" | |
11682 | "jansi-project-" version ".tar.gz")) | |
11683 | (sha256 | |
11684 | (base32 | |
11685 | "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z")))) | |
11686 | (build-system ant-build-system) | |
11687 | (arguments | |
11688 | `(#:jar-name "jansi.jar" | |
11689 | #:source-dir "jansi/src/main/java" | |
11690 | #:test-dir "jansi/src/test" | |
11691 | #:phases | |
11692 | (modify-phases %standard-phases | |
11693 | (add-after 'check 'clear-term | |
11694 | (lambda _ | |
b777e194 JL |
11695 | (invoke "echo" "-e" "\\e[0m"))) |
11696 | (add-before 'install 'install-parent | |
11697 | (install-pom-file "pom.xml")) | |
11698 | (add-before 'install 'fix-pom | |
11699 | (lambda _ | |
11700 | ;; pom adds jansi native versions for different platforms, but we | |
11701 | ;; only need one, so use native instead | |
11702 | (substitute* "jansi/pom.xml" | |
11703 | (("windows32") "native") | |
11704 | (("windows64") "native") | |
11705 | (("osx") "native") | |
11706 | (("linux32") "native") | |
11707 | (("linux64") "native") | |
11708 | (("freebsd32") "native") | |
11709 | (("freebsd64") "native")) | |
11710 | #t)) | |
11711 | (replace 'install | |
11712 | (install-from-pom "jansi/pom.xml"))))) | |
11713 | (propagated-inputs | |
a87ea1ad JL |
11714 | `(("java-jansi-native" ,java-jansi-native))) |
11715 | (native-inputs | |
11716 | `(("java-junit" ,java-junit) | |
11717 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
11718 | (home-page "https://fusesource.github.io/jansi/") | |
11719 | (synopsis "Portable ANSI escape sequences") | |
11720 | (description "Jansi is a Java library that allows you to use ANSI escape | |
11721 | sequences to format your console output which works on every platform.") | |
11722 | (license license:asl2.0))) | |
cc061329 JL |
11723 | |
11724 | (define-public java-jboss-el-api-spec | |
11725 | (package | |
11726 | (name "java-jboss-el-api-spec") | |
11727 | (version "3.0") | |
11728 | (source (origin | |
11729 | (method url-fetch) | |
11730 | (uri (string-append "https://github.com/jboss/jboss-el-api_spec/" | |
11731 | "archive/jboss-el-api_" version | |
11732 | "_spec-1.0.7.Final.tar.gz")) | |
11733 | (sha256 | |
11734 | (base32 | |
11735 | "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh")))) | |
11736 | (build-system ant-build-system) | |
11737 | (arguments | |
11738 | `(#:jar-name "java-jboss-el-api_spec.jar" | |
51087d51 JL |
11739 | #:modules ((guix build ant-build-system) |
11740 | (guix build utils) | |
11741 | (guix build maven pom) | |
11742 | (guix build java-utils) | |
11743 | (sxml simple)) | |
11744 | #:phases | |
11745 | (modify-phases %standard-phases | |
11746 | ;; the origin of javax.el:javax.el-api is unknown, so we use this package | |
11747 | ;; instead, which implements the same thing. We override the pom file | |
11748 | ;; to "rename" the package so it can be found by maven. | |
11749 | (add-before 'install 'override-pom | |
11750 | (lambda _ | |
11751 | (delete-file "pom.xml") | |
11752 | (with-output-to-file "pom.xml" | |
11753 | (lambda _ | |
11754 | (sxml->xml | |
11755 | `(project | |
11756 | (modelVersion "4.0.0") | |
11757 | (name "el-api") | |
11758 | (groupId "javax.el") | |
11759 | (artifactId "javax.el-api") | |
11760 | (version "3.0"))))) | |
11761 | #t)) | |
11762 | (replace 'install | |
11763 | (install-from-pom "pom.xml"))))) | |
cc061329 JL |
11764 | (inputs |
11765 | `(("java-junit" ,java-junit))) | |
11766 | (home-page "https://github.com/jboss/jboss-el-api_spec") | |
11767 | (synopsis "JSR-341 expression language 3.0 API") | |
11768 | (description "This package contains an implementation of the JSR-341 | |
11769 | specification for the expression language 3.0. It implements an expression | |
11770 | language inspired by ECMAScript and XPath. This language is used with | |
11771 | JavaServer Pages (JSP).") | |
11772 | ;; Either GPL2 only or CDDL. | |
11773 | (license (list license:gpl2 license:cddl1.1)))) | |
cc03a786 JL |
11774 | |
11775 | (define-public java-jboss-interceptors-api-spec | |
11776 | (package | |
11777 | (name "java-jboss-interceptors-api-spec") | |
11778 | (version "1.2") | |
11779 | (source (origin | |
11780 | (method url-fetch) | |
11781 | (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/" | |
11782 | "archive/jboss-interceptors-api_" version | |
11783 | "_spec-1.0.0.Final.tar.gz")) | |
11784 | (sha256 | |
11785 | (base32 | |
11786 | "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z")))) | |
11787 | (build-system ant-build-system) | |
11788 | (arguments | |
11789 | `(#:jar-name "java-jboss-interceptors-api_spec.jar" | |
11790 | #:jdk ,icedtea-8 | |
11791 | #:source-dir "." | |
51087d51 JL |
11792 | #:tests? #f; no tests |
11793 | #:modules ((guix build ant-build-system) | |
11794 | (guix build utils) | |
11795 | (guix build maven pom) | |
11796 | (guix build java-utils) | |
11797 | (sxml simple)) | |
11798 | #:phases | |
11799 | (modify-phases %standard-phases | |
11800 | ;; the origin of javax.interceptor:javax.interceptor-api is unknown, | |
11801 | ;; so we use this package instead, which implements the same thing. | |
11802 | ;; We override the pom file to "rename" the package so it can be found | |
11803 | ;; by maven. | |
11804 | (add-before 'install 'override-pom | |
11805 | (lambda _ | |
11806 | (delete-file "pom.xml") | |
11807 | (with-output-to-file "pom.xml" | |
11808 | (lambda _ | |
11809 | (sxml->xml | |
11810 | `(project | |
11811 | (modelVersion "4.0.0") | |
11812 | (name "interceptor-api") | |
11813 | (groupId "javax.interceptor") | |
11814 | (artifactId "javax.interceptor-api") | |
11815 | (version "3.0"))))) | |
11816 | #t)) | |
11817 | (replace 'install | |
11818 | (install-from-pom "pom.xml"))))) | |
cc03a786 JL |
11819 | (home-page "https://github.com/jboss/jboss-interceptors-api_spec") |
11820 | (synopsis "Interceptors 1.2 API classes from JSR 318") | |
11821 | (description "Java-jboss-interceptors-api-spec implements the Interceptors | |
11822 | API. Interceptors are used to interpose on business method invocations and | |
11823 | specific events.") | |
11824 | ;; Either GPL2 only or CDDL. | |
11825 | (license (list license:gpl2 license:cddl1.1)))) | |
a10a451c JL |
11826 | |
11827 | (define-public java-cdi-api | |
11828 | (package | |
11829 | (name "java-cdi-api") | |
11830 | (version "2.0") | |
11831 | (source (origin | |
11832 | (method url-fetch) | |
11833 | (uri (string-append "https://github.com/cdi-spec/cdi/archive/" | |
11834 | version ".tar.gz")) | |
11835 | (file-name (string-append name "-" version ".tar.gz")) | |
11836 | (sha256 | |
11837 | (base32 | |
11838 | "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y")))) | |
11839 | (build-system ant-build-system) | |
11840 | (arguments | |
11841 | `(#:source-dir "api/src/main/java" | |
11842 | #:jar-name "java-cdi-api.jar" | |
11843 | #:test-dir "api/src/test" | |
11844 | #:jdk ,icedtea-8 | |
51087d51 JL |
11845 | #:tests? #f; Tests fail because we don't have a CDI provider yet |
11846 | #:phases | |
11847 | (modify-phases %standard-phases | |
11848 | (replace 'install | |
11849 | (install-from-pom "api/pom.xml"))))) | |
11850 | (propagated-inputs | |
a10a451c JL |
11851 | `(("java-javax-inject" ,java-javax-inject) |
11852 | ("java-jboss-el-api-spec" ,java-jboss-el-api-spec) | |
51087d51 JL |
11853 | ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec) |
11854 | ("java-weld-parent-pom" ,java-weld-parent-pom))) | |
a10a451c JL |
11855 | (native-inputs |
11856 | `(("java-testng" ,java-testng) | |
11857 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
11858 | (home-page "http://cdi-spec.org/") | |
11859 | (synopsis "Contexts and Dependency Injection APIs") | |
11860 | (description "Java-cdi-api contains the required APIs for Contexts and | |
11861 | Dependency Injection (CDI).") | |
11862 | (license license:asl2.0))) | |
d57fd728 JL |
11863 | |
11864 | (define-public java-joda-convert | |
11865 | (package | |
11866 | (name "java-joda-convert") | |
11867 | (version "1.9.2") | |
11868 | (source (origin | |
11869 | (method url-fetch) | |
11870 | (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v" | |
11871 | version ".tar.gz")) | |
11872 | (file-name (string-append name "-" version ".tar.gz")) | |
11873 | (sha256 | |
11874 | (base32 | |
11875 | "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7")))) | |
11876 | (build-system ant-build-system) | |
11877 | (arguments | |
11878 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
11879 | #:source-dir "src/main/java" | |
11880 | #:test-include (list "**/Test*.java") | |
11881 | ;; Contains only interfaces and base classes (no test) | |
11882 | #:test-exclude (list "**/test*/**.java"))) | |
11883 | (inputs | |
11884 | `(("java-guava" ,java-guava))) | |
11885 | (native-inputs | |
11886 | `(("java-junit" ,java-junit) | |
11887 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
c82ddf33 | 11888 | (home-page "https://www.joda.org/joda-convert/") |
d57fd728 JL |
11889 | (synopsis "Conversion between Objects and Strings") |
11890 | (description "Joda-Convert provides a small set of classes to aid | |
11891 | conversion between Objects and Strings. It is not intended to tackle the | |
11892 | wider problem of Object to Object transformation.") | |
11893 | (license license:asl2.0))) | |
0158ea8a JL |
11894 | |
11895 | (define-public java-joda-time | |
11896 | (package | |
11897 | (name "java-joda-time") | |
11898 | (version "2.9.9") | |
11899 | (source (origin | |
11900 | (method url-fetch) | |
11901 | (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v" | |
11902 | version ".tar.gz")) | |
11903 | (file-name (string-append name "-" version ".tar.gz")) | |
11904 | (sha256 | |
11905 | (base32 | |
11906 | "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1")))) | |
11907 | (build-system ant-build-system) | |
11908 | (arguments | |
11909 | `(#:jar-name "java-joda-time.jar" | |
11910 | #:source-dir "src/main/java" | |
11911 | #:test-include (list "**/Test*.java") | |
11912 | ;; There is no runnable test in these files | |
11913 | #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java") | |
11914 | #:phases | |
11915 | (modify-phases %standard-phases | |
11916 | (add-after 'build 'build-resources | |
11917 | (lambda _ | |
11918 | (mkdir-p "build/classes/org/joda/time/tz/data") | |
11919 | (mkdir-p "build/classes/org/joda/time/format") | |
6d0368eb JL |
11920 | ;; This will produce the following exception: |
11921 | ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap" | |
11922 | ;; which is normal, because it doesn't exist yet. It still generates | |
11923 | ;; the same file as in the binary one can find on maven. | |
11924 | (invoke "java" "-cp" | |
11925 | (string-append "build/classes:" (getenv "CLASSPATH")) | |
11926 | "org.joda.time.tz.ZoneInfoCompiler" | |
11927 | "-src" "src/main/java/org/joda/time/tz/src" | |
11928 | "-dst" "build/classes/org/joda/time/tz/data" | |
11929 | "africa" "antarctica" "asia" "australasia" | |
11930 | "europe" "northamerica" "southamerica" | |
11931 | "pacificnew" "etcetera" "backward" "systemv") | |
0158ea8a JL |
11932 | (for-each (lambda (f) |
11933 | (copy-file f (string-append | |
11934 | "build/classes/org/joda/time/format/" | |
11935 | (basename f)))) | |
11936 | (find-files "src/main/java/org/joda/time/format" ".*.properties")) | |
11937 | #t)) | |
11938 | (add-before 'install 'regenerate-jar | |
11939 | (lambda _ | |
11940 | ;; We need to regenerate the jar file to add generated data. | |
11941 | (delete-file "build/jar/java-joda-time.jar") | |
6d0368eb | 11942 | (invoke "ant" "jar"))) |
0158ea8a JL |
11943 | (add-before 'check 'copy-test-resources |
11944 | (lambda _ | |
11945 | (mkdir-p "build/test-classes/org/joda/time/tz/data") | |
11946 | (copy-file "src/test/resources/tzdata/ZoneInfoMap" | |
11947 | "build/test-classes/org/joda/time/tz/data/ZoneInfoMap") | |
11948 | (copy-recursively "src/test/resources" "build/test-classes") | |
11949 | #t))))) | |
11950 | (inputs | |
11951 | `(("java-joda-convert" ,java-joda-convert))) | |
11952 | (native-inputs | |
11953 | `(("java-junit" ,java-junit) | |
11954 | ("java-hamcrest-core" ,java-hamcrest-core) | |
11955 | ("tzdata" ,tzdata))) | |
14544d2f | 11956 | (home-page "https://www.joda.org/joda-time/") |
0158ea8a JL |
11957 | (synopsis "Replacement for the Java date and time classes") |
11958 | (description "Joda-Time is a replacement for the Java date and time | |
11959 | classes prior to Java SE 8.") | |
11960 | (license license:asl2.0))) | |
6d0368eb JL |
11961 | |
11962 | (define-public java-xerces | |
11963 | (package | |
11964 | (name "java-xerces") | |
695fb93e | 11965 | (version "2.12.1") |
6d0368eb JL |
11966 | (source |
11967 | (origin | |
11968 | (method url-fetch) | |
11969 | (uri (string-append "mirror://apache/xerces/j/source/" | |
11970 | "Xerces-J-src." version ".tar.gz")) | |
11971 | (sha256 | |
695fb93e | 11972 | (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s")) |
6d0368eb JL |
11973 | (patches (search-patches |
11974 | "java-xerces-xjavac_taskdef.patch" | |
11975 | "java-xerces-build_dont_unzip.patch" | |
11976 | "java-xerces-bootclasspath.patch")))) | |
11977 | (build-system ant-build-system) | |
11978 | (arguments | |
11979 | `(#:tests? #f;; Test files are not present | |
11980 | #:test-target "test" | |
11981 | #:jdk ,icedtea-8 | |
11982 | #:phases | |
11983 | (modify-phases %standard-phases | |
11984 | (add-after 'unpack 'create-build.properties | |
11985 | (lambda* (#:key inputs #:allow-other-keys) | |
11986 | (let ((jaxp (assoc-ref inputs "java-jaxp")) | |
11987 | (resolver (assoc-ref inputs "java-apache-xml-commons-resolver"))) | |
11988 | (with-output-to-file "build.properties" | |
11989 | (lambda _ | |
11990 | (format #t | |
11991 | "jar.jaxp = ~a/share/java/jaxp.jar~@ | |
11992 | jar.apis-ext = ~a/share/java/jaxp.jar~@ | |
11993 | jar.resolver = ~a/share/java/xml-resolver.jar~%" | |
11994 | jaxp jaxp resolver))) | |
11995 | ;; Make xerces use our version of jaxp in tests | |
11996 | (substitute* "build.xml" | |
11997 | (("xml-apis.jar") | |
11998 | (string-append jaxp "/share/java/jaxp.jar")) | |
11999 | (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}") | |
12000 | "${jar.apis}"))) | |
12001 | #t)) | |
12002 | (replace 'install (install-jars "build"))))) | |
12003 | (inputs | |
12004 | `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver) | |
12005 | ("java-jaxp" ,java-jaxp))) | |
12006 | (home-page "https://xerces.apache.org/xerces2-j/") | |
12007 | (synopsis "Validating XML parser for Java with DOM level 3 support") | |
12008 | (description "The Xerces2 Java parser is the reference implementation of | |
12009 | XNI, the Xerces Native Interface, and also a fully conforming XML Schema | |
12010 | processor. | |
12011 | ||
12012 | Xerces2-J supports the following standards and APIs: | |
12013 | ||
12014 | @itemize | |
12015 | @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation | |
12016 | @item Namespaces in XML Recommendation | |
12017 | @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and | |
12018 | Range Recommendations | |
12019 | @item Simple API for XML (SAX) 2.0.1 Core and Extension | |
12020 | @item Java APIs for XML Processing (JAXP) 1.2.01 | |
12021 | @item XML Schema 1.0 Structures and Datatypes Recommendations | |
12022 | @item Experimental implementation of the Document Object Model (DOM) Level 3 | |
12023 | Core and Load/Save Working Drafts | |
12024 | @item Provides a partial implementation of the XML Inclusions (XInclude) W3C | |
12025 | Candidate Recommendation | |
12026 | @end itemize | |
12027 | ||
12028 | Xerces is now able to parse documents written according to the XML 1.1 | |
12029 | Candidate Recommendation, except that it does not yet provide an option to | |
12030 | enable normalization checking as described in section 2.13 of this | |
12031 | specification. It also handles namespaces according to the XML Namespaces 1.1 | |
12032 | Candidate Recommendation, and will correctly serialize XML 1.1 documents if | |
12033 | the DOM level 3 load/save API's are in use.") | |
12034 | (license license:asl2.0))) | |
e06bf428 | 12035 | |
ae6922ed DM |
12036 | (define-public java-jakarta-regexp |
12037 | (package | |
12038 | (name "java-jakarta-regexp") | |
12039 | (version "1.5") | |
12040 | (source | |
12041 | (origin | |
12042 | (method url-fetch) | |
12043 | (uri (string-append | |
12044 | "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-" | |
12045 | version ".tar.gz")) | |
12046 | (sha256 | |
12047 | (base32 | |
12048 | "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r")))) | |
12049 | (build-system ant-build-system) | |
12050 | (arguments | |
12051 | `(#:test-target "test" | |
12052 | #:phases | |
12053 | (modify-phases %standard-phases | |
12054 | (replace 'install | |
12055 | (lambda* (#:key outputs #:allow-other-keys) | |
12056 | (let* ((out (assoc-ref outputs "out")) | |
12057 | (out-share (string-append out "/share/java"))) | |
12058 | (mkdir-p out-share) | |
12059 | (for-each (lambda (name) | |
12060 | (install-file name out-share)) | |
12061 | (find-files "build" "^jakarta-regexp-.*\\.jar$")) | |
12062 | #t)))))) | |
12063 | (home-page "https://attic.apache.org/projects/jakarta-regexp.html") | |
12064 | (synopsis "Regular expression parser generator for Java.") | |
12065 | (description "@code{jakarta-regexp} is an old regular expression parser | |
12066 | generator for Java.") | |
12067 | (license license:asl2.0))) | |
12068 | ||
e06bf428 JL |
12069 | (define-public java-jline |
12070 | (package | |
12071 | (name "java-jline") | |
12072 | (version "1.0") | |
12073 | (source (origin | |
12074 | (method url-fetch) | |
12075 | (uri (string-append "https://github.com/jline/jline1/archive/jline-" | |
12076 | version ".tar.gz")) | |
12077 | (sha256 | |
12078 | (base32 | |
12079 | "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir")))) | |
12080 | (build-system ant-build-system) | |
12081 | (arguments | |
12082 | `(#:jar-name "jline.jar" | |
12083 | #:source-dir "src/main/java" | |
12084 | #:test-dir "src/test" | |
12085 | #:phases | |
12086 | (modify-phases %standard-phases | |
12087 | (add-before 'build 'copy-resources | |
12088 | (lambda _ | |
12089 | (copy-recursively "src/main/resources" "build/classes") | |
12090 | #t))))) | |
12091 | (native-inputs | |
12092 | `(("java-junit" ,java-junit))) | |
12093 | (home-page "https://jline.github.io") | |
12094 | (synopsis "Console input handling library") | |
12095 | (description "JLine is a Java library for handling console input. It is | |
12096 | similar in functionality to BSD editline and GNU readline but with additional | |
12097 | features that bring it on par with the Z shell line editor.") | |
12098 | (license license:bsd-3))) | |
7ac4f054 | 12099 | |
49d74311 JL |
12100 | (define-public java-jline-2 |
12101 | (package | |
12102 | (inherit java-jline) | |
12103 | (version "2.14.5") | |
12104 | (source (origin | |
12105 | (method url-fetch) | |
12106 | (uri (string-append "https://github.com/jline/jline2/archive/jline-" | |
12107 | version ".tar.gz")) | |
12108 | (sha256 | |
12109 | (base32 | |
12110 | "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf")))) | |
12111 | (arguments | |
12112 | `(#:jdk ,icedtea-8 | |
12113 | ,@(package-arguments java-jline))) | |
12114 | (inputs | |
12115 | `(("java-jansi" ,java-jansi) | |
12116 | ("java-jansi-native" ,java-jansi-native))) | |
12117 | (native-inputs | |
12118 | `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4) | |
12119 | ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common) | |
12120 | ("java-powermock-api-easymock" ,java-powermock-api-easymock) | |
12121 | ("java-powermock-api-support" ,java-powermock-api-support) | |
12122 | ("java-powermock-core" ,java-powermock-core) | |
12123 | ("java-powermock-reflect" ,java-powermock-reflect) | |
12124 | ("java-easymock" ,java-easymock) | |
12125 | ("java-jboss-javassist" ,java-jboss-javassist) | |
12126 | ("java-objenesis" ,java-objenesis) | |
12127 | ("java-asm" ,java-asm) | |
12128 | ("java-hamcrest-core" ,java-hamcrest-core) | |
12129 | ("java-cglib" ,java-cglib) | |
12130 | ("java-junit" ,java-junit) | |
12131 | ("java-hawtjni" ,java-hawtjni))))) | |
12132 | ||
7ac4f054 JL |
12133 | (define-public java-xmlunit |
12134 | (package | |
12135 | (name "java-xmlunit") | |
12136 | (version "2.5.1") | |
12137 | (source (origin | |
12138 | (method url-fetch) | |
12139 | (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v" | |
12140 | version ".tar.gz")) | |
12141 | (file-name (string-append name "-" version ".tar.gz")) | |
12142 | (sha256 | |
12143 | (base32 | |
12144 | "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z")))) | |
12145 | (build-system ant-build-system) | |
12146 | (arguments | |
12147 | `(#:jar-name "java-xmlunit.jar" | |
12148 | #:source-dir "xmlunit-core/src/main/java" | |
12149 | #:test-dir "xmlunit-core/src/test" | |
12150 | #:phases | |
12151 | (modify-phases %standard-phases | |
12152 | (add-before 'check 'copy-test-resources | |
12153 | (lambda* (#:key inputs #:allow-other-keys) | |
12154 | (copy-recursively (assoc-ref inputs "resources") "../test-resources") | |
12155 | #t))))) | |
12156 | (native-inputs | |
12157 | `(("java-junit" ,java-junit) | |
12158 | ("java-mockito-1" ,java-mockito-1) | |
12159 | ("java-hamcrest-all" ,java-hamcrest-all) | |
12160 | ("java-objenesis" ,java-objenesis) | |
12161 | ("java-asm" ,java-asm) | |
12162 | ("java-cglib" ,java-cglib) | |
12163 | ("resources" | |
12164 | ,(origin | |
12165 | (method git-fetch) | |
12166 | (uri (git-reference | |
b0e7b699 | 12167 | (url "https://github.com/xmlunit/test-resources") |
7ac4f054 JL |
12168 | (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec"))) |
12169 | (file-name "java-xmlunit-test-resources") | |
12170 | (sha256 | |
12171 | (base32 | |
12172 | "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr")))))) | |
c4944d6c | 12173 | (home-page "https://www.xmlunit.org/") |
7ac4f054 JL |
12174 | (synopsis "XML output testing") |
12175 | (description "XMLUnit provides you with the tools to verify the XML you | |
12176 | emit is the one you want to create. It provides helpers to validate against | |
12177 | an XML Schema, assert the values of XPath queries or compare XML documents | |
12178 | against expected outcomes.") | |
12179 | (license license:asl2.0))) | |
73a1f10a JL |
12180 | |
12181 | (define-public java-xmlunit-legacy | |
12182 | (package | |
12183 | (inherit java-xmlunit) | |
12184 | (name "java-xmlunit-legacy") | |
12185 | (arguments | |
12186 | `(#:jar-name "java-xmlunit-legacy.jar" | |
12187 | #:source-dir "xmlunit-legacy/src/main/java" | |
12188 | #:test-dir "xmlunit-legacy/src/test")) | |
12189 | (inputs | |
12190 | `(("java-xmlunit" ,java-xmlunit) | |
12191 | ("java-junit" ,java-junit))) | |
12192 | (native-inputs | |
12193 | `(("java-mockito-1" ,java-mockito-1))))) | |
93abc975 | 12194 | |
f5cc5ead JL |
12195 | (define-public java-xmlunit-matchers |
12196 | (package | |
12197 | (inherit java-xmlunit) | |
12198 | (name "java-xmlunit-matchers") | |
12199 | (arguments | |
12200 | `(#:jar-name "java-xmlunit-matchers.jar" | |
12201 | #:source-dir "xmlunit-matchers/src/main/java" | |
12202 | #:test-dir "xmlunit-matchers/src/test" | |
12203 | #:test-exclude | |
12204 | ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd | |
12205 | (list "**/ValidationMatcherTest.java") | |
12206 | #:phases | |
12207 | (modify-phases %standard-phases | |
12208 | (add-before 'build 'copy-test-class | |
12209 | (lambda _ | |
12210 | (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java" | |
12211 | "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java") | |
12212 | #t)) | |
12213 | (add-before 'build 'fix-test-resources-path | |
12214 | (lambda _ | |
12215 | (substitute* (find-files "xmlunit-matchers/src/test" ".*.java") | |
12216 | (("../test-resources") "test-resources")) | |
12217 | #t)) | |
12218 | (add-before 'check 'copy-test-resources | |
12219 | (lambda* (#:key inputs #:allow-other-keys) | |
12220 | (copy-recursively (assoc-ref inputs "resources") "test-resources") | |
12221 | #t))))) | |
12222 | (inputs | |
12223 | `(("java-xmlunit" ,java-xmlunit) | |
12224 | ("java-junit" ,java-junit))))) | |
12225 | ||
93abc975 RW |
12226 | (define-public java-openchart2 |
12227 | (package | |
12228 | (name "java-openchart2") | |
12229 | (version "1.4.3") | |
12230 | (source (origin | |
12231 | (method url-fetch) | |
12232 | (uri (string-append "http://download.approximatrix.com/openchart2/" | |
12233 | "openchart2-" version ".source.zip")) | |
12234 | (sha256 | |
12235 | (base32 | |
12236 | "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g")))) | |
12237 | (build-system ant-build-system) | |
12238 | (arguments | |
12239 | `(#:test-target "test" | |
12240 | #:phases | |
12241 | (modify-phases %standard-phases | |
12242 | (add-after 'unpack 'fix-junit-errors | |
12243 | (lambda _ | |
12244 | (with-directory-excursion "unittest/src/com/approximatrix/charting/" | |
12245 | (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java" | |
12246 | "coordsystem/ticklocator/NumericYTickLocatorTest.java" | |
12247 | "coordsystem/ticklocator/ObjectXTickLocatorTest.java" | |
12248 | "model/DefaultChartDataModelConstraintsTest.java" | |
12249 | "model/MultiScatterDataModelConstraintsTest.java" | |
12250 | "model/threedimensional/DotPlotDataModelConstraintsTest.java") | |
12251 | (("(assertEquals[^;]+);" before _) | |
12252 | (string-append (string-drop-right before 2) ", 1E-6);")))) | |
12253 | #t)) | |
12254 | (replace 'install (install-jars "."))))) | |
12255 | (native-inputs | |
12256 | `(("unzip" ,unzip) | |
12257 | ("java-junit" ,java-junit) | |
12258 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
a809d632 | 12259 | (home-page "https://approximatrix.com/products/openchart2/") |
93abc975 RW |
12260 | (synopsis "Simple plotting for Java") |
12261 | (description "Openchart2 provides a simple, yet powerful, interface for | |
12262 | Java programmers to create two-dimensional charts and plots. The library | |
12263 | features an assortment of graph styles, including advanced scatter plots, bar | |
12264 | graphs, and pie charts.") | |
12265 | (license license:lgpl2.1+))) | |
5f5b31c6 JL |
12266 | |
12267 | (define-public java-commons-httpclient | |
12268 | (package | |
12269 | (name "java-commons-httpclient") | |
12270 | (version "3.1") | |
12271 | (source (origin | |
12272 | (method url-fetch) | |
9a01efa2 | 12273 | (uri (string-append "mirror://apache/httpcomponents/" |
5f5b31c6 JL |
12274 | "commons-httpclient/source/commons-httpclient-" |
12275 | version "-src.tar.gz")) | |
12276 | (sha256 | |
12277 | (base32 | |
12278 | "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r")))) | |
12279 | (build-system ant-build-system) | |
12280 | (arguments | |
12281 | `(#:build-target "compile" | |
12282 | #:test-target "test" | |
12283 | #:tests? #f; requires junit-textui (junit 3) | |
12284 | #:phases | |
12285 | (modify-phases %standard-phases | |
12286 | (add-before 'build 'fix-accent | |
12287 | (lambda _ | |
12288 | (for-each (lambda (file) | |
12289 | (with-fluids ((%default-port-encoding "ISO-8859-1")) | |
12290 | (substitute* file | |
12291 | (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n")))) | |
12292 | '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java" | |
12293 | "src/examples/TrivialApp.java" "src/examples/ClientApp.java" | |
12294 | "src/test/org/apache/commons/httpclient/TestHttps.java" | |
2c8ac364 MW |
12295 | "src/test/org/apache/commons/httpclient/TestURIUtil2.java")) |
12296 | #t)) | |
5f5b31c6 JL |
12297 | (replace 'install |
12298 | (lambda* (#:key outputs #:allow-other-keys) | |
12299 | (invoke "ant" "dist" | |
12300 | (string-append "-Ddist.home=" (assoc-ref outputs "out") | |
12301 | "/share/java")) | |
12302 | #t))))) | |
12303 | (propagated-inputs | |
12304 | `(("java-commons-logging" ,java-commons-logging-minimal) | |
12305 | ("java-commons-codec" ,java-commons-codec))) | |
12306 | (home-page "https://hc.apache.org") | |
12307 | (synopsis "HTTP/1.1 compliant HTTP agent implementation") | |
12308 | (description "This package contains an HTTP/1.1 compliant HTTP agent | |
12309 | implementation. It also provides reusable components for client-side | |
12310 | authentication, HTTP state management, and HTTP connection management.") | |
12311 | (license license:asl2.0))) | |
5fe981dc JL |
12312 | |
12313 | (define-public java-commons-vfs | |
12314 | (package | |
12315 | (name "java-commons-vfs") | |
12316 | (version "2.2") | |
12317 | (source (origin | |
12318 | (method url-fetch) | |
12319 | (uri (string-append "mirror://apache/commons/vfs/source/" | |
12320 | "commons-vfs2-distribution-" version "-src.tar.gz")) | |
12321 | (file-name (string-append name "-" version ".tar.gz")) | |
12322 | (sha256 | |
12323 | (base32 | |
12324 | "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3")) | |
12325 | (modules '((guix build utils))) | |
12326 | (snippet | |
12327 | '(begin | |
12328 | (for-each delete-file | |
12329 | (find-files "." "\\.jar$")) | |
12330 | #t)))) | |
12331 | (build-system ant-build-system) | |
12332 | (arguments | |
12333 | `(#:jar-name "commons-vfs.jar" | |
12334 | #:source-dir "commons-vfs2/src/main/java" | |
12335 | #:test-dir "commons-vfs2/src/test" | |
12336 | ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ... | |
12337 | #:tests? #f | |
12338 | #:phases | |
12339 | (modify-phases %standard-phases | |
12340 | (add-before 'build 'remove-hadoop-and-webdav | |
12341 | ; Remove these files as they are not required and depend on difficult | |
12342 | ; packages. | |
12343 | (lambda _ | |
12344 | (for-each delete-file-recursively | |
12345 | '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav" | |
2c8ac364 MW |
12346 | "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")) |
12347 | #t))))) | |
5fe981dc JL |
12348 | (inputs |
12349 | `(("java-commons-collections4" ,java-commons-collections4) | |
12350 | ("java-commons-compress" ,java-commons-compress) | |
12351 | ("java-commons-httpclient" ,java-commons-httpclient) | |
12352 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
12353 | ("java-commons-net" ,java-commons-net) | |
12354 | ("java-jsch" ,java-jsch))) | |
4f236f84 | 12355 | (home-page "https://commons.apache.org/proper/commons-vfs/") |
52beae7b | 12356 | (synopsis "Java file system library") |
5fe981dc JL |
12357 | (description "Commons VFS provides a single API for accessing various |
12358 | different file systems. It presents a uniform view of the files from various | |
12359 | different sources, such as the files on local disk, on an HTTP server, or | |
12360 | inside a Zip archive.") | |
12361 | (license license:asl2.0))) | |
f7b512c0 JL |
12362 | |
12363 | (define-public java-jakarta-oro | |
12364 | (package | |
12365 | (name "java-jakarta-oro") | |
12366 | (version "2.0.8") | |
12367 | (source (origin | |
12368 | (method url-fetch) | |
9a01efa2 | 12369 | (uri (string-append "mirror://apache/jakarta/oro/" |
f7b512c0 JL |
12370 | "jakarta-oro-" version ".tar.gz")) |
12371 | (sha256 | |
12372 | (base32 | |
12373 | "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc")) | |
12374 | (modules '((guix build utils))) | |
12375 | (snippet | |
12376 | `(begin | |
12377 | (delete-file (string-append "jakarta-oro-" ,version ".jar")) | |
12378 | #t)))) | |
12379 | (build-system ant-build-system) | |
12380 | (arguments | |
12381 | `(#:build-target "package" | |
c1b11a52 | 12382 | #:make-flags (list "-DDATE" "(no recorded date for reproducibility)") |
f7b512c0 JL |
12383 | #:tests? #f; tests are run as part of the build process |
12384 | #:phases | |
12385 | (modify-phases %standard-phases | |
12386 | (replace 'install | |
12387 | (install-jars ,(string-append "jakarta-oro-" version)))))) | |
12388 | (home-page "https://jakarta.apache.org/oro/") | |
12389 | (synopsis "Text-processing for Java") | |
12390 | (description "The Jakarta-ORO Java classes are a set of text-processing | |
12391 | Java classes that provide Perl5 compatible regular expressions, AWK-like | |
12392 | regular expressions, glob expressions, and utility classes for performing | |
12393 | substitutions, splits, filtering filenames, etc. This library is the successor | |
12394 | of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally | |
12395 | from ORO, Inc.") | |
12396 | (license license:asl1.1))) | |
a970288c JL |
12397 | |
12398 | (define-public java-native-access | |
12399 | (package | |
12400 | (name "java-native-access") | |
12401 | (version "4.5.1") | |
12402 | (source (origin | |
12403 | (method url-fetch) | |
12404 | (uri (string-append "https://github.com/java-native-access/jna/" | |
12405 | "archive/" version ".tar.gz")) | |
12406 | (file-name (string-append name "-" version ".tar.gz")) | |
12407 | (sha256 | |
12408 | (base32 | |
12409 | "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9")) | |
12410 | (modules '((guix build utils))) | |
12411 | (snippet | |
12412 | `(begin | |
12413 | (for-each delete-file (find-files "." ".*.jar")) | |
12414 | (delete-file-recursively "native/libffi") | |
12415 | (delete-file-recursively "dist") | |
12416 | #t)))) | |
12417 | (build-system ant-build-system) | |
12418 | (arguments | |
12419 | `(#:tests? #f; FIXME: tests require reflections.jar | |
12420 | #:test-target "test" | |
12421 | #:make-flags (list "-Ddynlink.native=true") | |
12422 | #:phases | |
12423 | (modify-phases %standard-phases | |
12424 | (add-before 'build 'fix-build.xml | |
12425 | (lambda* (#:key inputs #:allow-other-keys) | |
12426 | (substitute* "build.xml" | |
12427 | ;; Since we removed the bundled ant.jar, give the correct path | |
12428 | (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar")) | |
12429 | ;; We removed generated native libraries. We can only rebuild one | |
12430 | ;; so don't fail if we can't find a native library for another architecture. | |
12431 | (("zipfileset") "zipfileset erroronmissingarchive=\"false\"")) | |
12432 | ;; Copy test dependencies | |
fff4fcc4 | 12433 | (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$")) |
a970288c | 12434 | "lib/junit.jar") |
fff4fcc4 JL |
12435 | (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core") |
12436 | "jar$")) | |
a970288c JL |
12437 | "lib/hamcrest-core.jar") |
12438 | ;; FIXME: once reflections.jar is built, copy it to lib/test. | |
12439 | #t)) | |
12440 | (add-before 'build 'build-native | |
12441 | (lambda _ | |
12442 | (invoke "ant" "-Ddynlink.native=true" "native") | |
12443 | #t)) | |
12444 | (replace 'install | |
12445 | (install-jars "build"))))) | |
12446 | (inputs | |
12447 | `(("libffi" ,libffi) | |
12448 | ("libx11" ,libx11) | |
12449 | ("libxt" ,libxt))) | |
12450 | (native-inputs | |
12451 | `(("java-junit" ,java-junit) | |
12452 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
12453 | (home-page "https://github.com/java-native-access/jna") | |
12454 | (synopsis "Access to native shared libraries from Java") | |
12455 | (description "JNA provides Java programs easy access to native shared | |
12456 | libraries without writing anything but Java code - no JNI or native code is | |
12457 | required. JNA allows you to call directly into native functions using natural | |
12458 | Java method invocation.") | |
12459 | ;; Java Native Access project (JNA) is dual-licensed under 2 | |
12460 | ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0. | |
12461 | (license (list | |
12462 | license:asl2.0 | |
12463 | license:lgpl2.1+)))) | |
cfb55cfc JL |
12464 | |
12465 | (define-public java-native-access-platform | |
12466 | (package | |
12467 | (inherit java-native-access) | |
12468 | (name "java-native-access-platform") | |
12469 | (arguments | |
12470 | `(#:test-target "test" | |
12471 | #:tests? #f; require jna-test.jar | |
12472 | #:phases | |
12473 | (modify-phases %standard-phases | |
12474 | (add-before 'build 'chdir | |
12475 | (lambda _ | |
12476 | (chdir "contrib/platform") | |
12477 | #t)) | |
12478 | (add-after 'chdir 'fix-ant | |
12479 | (lambda* (#:key inputs #:allow-other-keys) | |
12480 | (substitute* "nbproject/project.properties" | |
12481 | (("../../build/jna.jar") | |
12482 | (string-append (assoc-ref inputs "java-native-access") | |
12483 | "/share/java/jna.jar")) | |
12484 | (("../../lib/hamcrest-core-.*.jar") | |
fff4fcc4 JL |
12485 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
12486 | "jar$"))) | |
cfb55cfc | 12487 | (("../../lib/junit.jar") |
fff4fcc4 JL |
12488 | (car (find-files (assoc-ref inputs "java-junit") |
12489 | "jar$")))) | |
cfb55cfc JL |
12490 | #t)) |
12491 | (replace 'install | |
12492 | (install-jars "dist"))))) | |
12493 | (inputs | |
12494 | `(("java-native-access" ,java-native-access))) | |
12495 | (synopsis "Cross-platform mappings for jna") | |
7230f6d5 | 12496 | (description "java-native-access-platform has cross-platform mappings |
cfb55cfc JL |
12497 | and mappings for a number of commonly used platform functions, including a |
12498 | large number of Win32 mappings as well as a set of utility classes that | |
12499 | simplify native access."))) | |
470674a5 JL |
12500 | |
12501 | (define-public java-jsch-agentproxy-core | |
12502 | (package | |
12503 | (name "java-jsch-agentproxy-core") | |
12504 | (version "0.0.8") | |
12505 | (source (origin | |
12506 | (method url-fetch) | |
12507 | (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/" | |
12508 | version ".tar.gz")) | |
12509 | (file-name (string-append name "-" version ".tar.gz")) | |
12510 | (sha256 | |
12511 | (base32 | |
12512 | "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q")))) | |
12513 | (build-system ant-build-system) | |
12514 | (arguments | |
12515 | `(#:jar-name "jsch-agentproxy-core.jar" | |
12516 | #:source-dir "jsch-agent-proxy-core/src/main/java" | |
12517 | #:tests? #f)); no tests | |
12518 | (home-page "https://github.com/ymnk/jsch-agent-proxy") | |
f1d79c97 | 12519 | (synopsis "Core component of the proxy to ssh-agent and Pageant in Java") |
470674a5 JL |
12520 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
12521 | and Pageant included Putty. It will be easily integrated into JSch, and users | |
12522 | will be allowed to use these programs for authentication.") | |
12523 | (license license:bsd-3))) | |
f1d79c97 JL |
12524 | |
12525 | (define-public java-jsch-agentproxy-sshagent | |
12526 | (package | |
12527 | (inherit java-jsch-agentproxy-core) | |
12528 | (name "java-jsch-agentproxy-sshagent") | |
12529 | (arguments | |
12530 | `(#:jar-name "jsch-agentproxy-sshagent.jar" | |
12531 | #:source-dir "jsch-agent-proxy-sshagent/src/main/java" | |
12532 | #:tests? #f)); no tests | |
12533 | (inputs | |
12534 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) | |
12535 | (synopsis "Proxy to ssh-agent") | |
12536 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
12537 | and Pageant included in Putty. This component contains the code for a proxy to | |
12538 | ssh-agent."))) | |
f438e638 JL |
12539 | |
12540 | (define-public java-jsch-agentproxy-usocket-jna | |
12541 | (package | |
12542 | (inherit java-jsch-agentproxy-core) | |
12543 | (name "java-jsch-agentproxy-usocket-jna") | |
12544 | (arguments | |
12545 | `(#:jar-name "jsch-agentproxy-usocket-jna.jar" | |
12546 | #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java" | |
12547 | #:tests? #f)); no tests | |
12548 | (inputs | |
12549 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
12550 | ("java-native-access" ,java-native-access))) | |
12551 | (synopsis "USocketFactory implementation using JNA") | |
12552 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
12553 | and Pageant included in Putty. This component contains an implementation of | |
12554 | USocketFactory using @dfn{JNA} (Java Native Access)."))) | |
475225e3 JL |
12555 | |
12556 | (define-public java-jsch-agentproxy-pageant | |
12557 | (package | |
12558 | (inherit java-jsch-agentproxy-core) | |
12559 | (name "java-jsch-agentproxy-pageant") | |
12560 | (arguments | |
12561 | `(#:jar-name "jsch-agentproxy-pageant.jar" | |
12562 | #:source-dir "jsch-agent-proxy-pageant/src/main/java" | |
12563 | #:tests? #f)); no tests | |
12564 | (inputs | |
12565 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
12566 | ("java-native-access" ,java-native-access) | |
12567 | ("java-native-access-platform" ,java-native-access-platform))) | |
12568 | (synopsis "Proxy to pageant") | |
12569 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
12570 | and Pageant included in Putty. This component contains the code for a proxy to | |
12571 | pageant."))) | |
96d6d9c7 JL |
12572 | |
12573 | (define-public java-jsch-agentproxy-usocket-nc | |
12574 | (package | |
12575 | (inherit java-jsch-agentproxy-core) | |
12576 | (name "java-jsch-agentproxy-usocket-nc") | |
12577 | (arguments | |
12578 | `(#:jar-name "jsch-agentproxy-usocket-nc.jar" | |
12579 | #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java" | |
12580 | #:tests? #f)); no tests | |
12581 | (inputs | |
12582 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) | |
12583 | (synopsis "USocketFactory implementation using netcat") | |
12584 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
12585 | and Pageant included in Putty. This component contains an implementation of | |
12586 | USocketFactory using netcat."))) | |
5a46b17b JL |
12587 | |
12588 | (define-public java-jsch-agentproxy-connector-factory | |
12589 | (package | |
12590 | (inherit java-jsch-agentproxy-core) | |
12591 | (name "java-jsch-agentproxy-connector-factory") | |
12592 | (arguments | |
12593 | `(#:jar-name "jsch-agentproxy-connector-factory.jar" | |
12594 | #:source-dir "jsch-agent-proxy-connector-factory/src/main/java" | |
12595 | #:tests? #f)); no tests | |
12596 | (inputs | |
12597 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
12598 | ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent) | |
12599 | ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna) | |
12600 | ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant) | |
12601 | ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc))) | |
12602 | (synopsis "Connector factory for jsch agent proxy") | |
12603 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
12604 | and Pageant included in Putty. This component contains a connector factory."))) | |
b0fbf596 JL |
12605 | |
12606 | (define-public java-jsch-agentproxy-jsch | |
12607 | (package | |
12608 | (inherit java-jsch-agentproxy-core) | |
12609 | (name "java-jsch-agentproxy-jsch") | |
12610 | (arguments | |
12611 | `(#:jar-name "jsch-agentproxy-jsch.jar" | |
12612 | #:source-dir "jsch-agent-proxy-jsch/src/main/java" | |
12613 | #:tests? #f)); no tests | |
12614 | (inputs | |
12615 | `(("java-jsch" ,java-jsch) | |
12616 | ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) | |
12617 | (synopsis "JSch integration library for agentproxy") | |
12618 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
12619 | and Pageant included in Putty. This component contains a library to use | |
12620 | jsch-agent-proxy with JSch."))) | |
f1f4a4f0 JL |
12621 | |
12622 | (define-public java-apache-ivy | |
12623 | (package | |
12624 | (name "java-apache-ivy") | |
12625 | (version "2.4.0") | |
12626 | (source (origin | |
12627 | (method url-fetch) | |
12628 | (uri (string-append "mirror://apache//ant/ivy/" version | |
12629 | "/apache-ivy-" version "-src.tar.gz")) | |
12630 | (sha256 | |
12631 | (base32 | |
12632 | "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0")) | |
12633 | (patches | |
12634 | (search-patches | |
12635 | "java-apache-ivy-port-to-latest-bouncycastle.patch")))) | |
12636 | (build-system ant-build-system) | |
12637 | (arguments | |
12638 | `(#:jar-name "ivy.jar" | |
12639 | #:tests? #f | |
12640 | #:phases | |
12641 | (modify-phases %standard-phases | |
12642 | (add-before 'build 'remove-example | |
12643 | (lambda _ | |
12644 | (delete-file-recursively "src/example") | |
12645 | #t)) | |
12646 | (add-before 'build 'copy-resources | |
12647 | (lambda _ | |
12648 | (with-directory-excursion "src/java" | |
12649 | (for-each (lambda (file) | |
12650 | (install-file file (string-append "../../build/classes/" (dirname file)))) | |
12651 | (append | |
12652 | (find-files "." ".*.css") | |
12653 | (find-files "." ".*.ent") | |
12654 | (find-files "." ".*.html") | |
12655 | (find-files "." ".*.properties") | |
12656 | (find-files "." ".*.xsd") | |
12657 | (find-files "." ".*.xsl") | |
2c8ac364 MW |
12658 | (find-files "." ".*.xml")))) |
12659 | #t)) | |
f1f4a4f0 JL |
12660 | (add-before 'build 'fix-vfs |
12661 | (lambda _ | |
12662 | (substitute* | |
12663 | '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java" | |
12664 | "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java") | |
12665 | (("import org.apache.commons.vfs") "import org.apache.commons.vfs2")) | |
12666 | #t)) | |
12667 | (add-before 'install 'copy-manifest | |
12668 | (lambda _ | |
12669 | (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF") | |
12670 | #t)) | |
12671 | (add-before 'install 'repack | |
12672 | (lambda _ | |
12673 | (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar" | |
2c8ac364 | 12674 | "-C" "build/classes" "."))) |
f1f4a4f0 JL |
12675 | (add-after 'install 'install-bin |
12676 | (lambda* (#:key outputs #:allow-other-keys) | |
12677 | (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) | |
12678 | (ivy (string-append bin "/ivy")) | |
12679 | (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar"))) | |
12680 | (mkdir-p bin) | |
12681 | (with-output-to-file ivy | |
12682 | (lambda _ | |
12683 | (display (string-append | |
12684 | "#!" (which "sh") "\n" | |
12685 | "if [[ -z $CLASSPATH ]]; then\n" | |
12686 | " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n" | |
12687 | "else\n" | |
12688 | " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n" | |
12689 | "fi\n" | |
12690 | (which "java") " -cp $cp org.apache.ivy.Main $@\n")))) | |
12691 | (chmod ivy #o755) | |
12692 | #t)))))) | |
12693 | (inputs | |
12694 | `(("java-bouncycastle" ,java-bouncycastle) | |
12695 | ("java-commons-cli" ,java-commons-cli) | |
12696 | ("java-commons-collections" ,java-commons-collections) | |
12697 | ("java-commons-httpclient" ,java-commons-httpclient) | |
12698 | ("java-commons-lang" ,java-commons-lang) | |
12699 | ("java-commons-vfs" ,java-commons-vfs) | |
12700 | ("java-jakarta-oro" ,java-jakarta-oro) | |
12701 | ("java-jsch" ,java-jsch) | |
12702 | ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
12703 | ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory) | |
12704 | ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch) | |
12705 | ("java-junit" ,java-junit))) | |
12706 | (home-page "https://ant.apache.org/ivy") | |
12707 | (synopsis "Dependency manager for the Java programming language") | |
12708 | (description "Ivy is a tool for managing (recording, tracking, resolving | |
12709 | and reporting) project dependencies. It is characterized by the following: | |
12710 | ||
12711 | @itemize | |
12712 | @item flexibility and configurability - Ivy is essentially process agnostic | |
12713 | and is not tied to any methodology or structure. Instead it provides the | |
12714 | necessary flexibility and configurability to be adapted to a broad range | |
12715 | of dependency management and build processes. | |
12716 | @item tight integration with Apache Ant - while available as a standalone tool, | |
12717 | Ivy works particularly well with Apache Ant providing a number of | |
12718 | powerful Ant tasks ranging from dependency resolution to dependency | |
12719 | reporting and publication. | |
12720 | @end itemize") | |
12721 | (license license:asl2.0))) | |
1a1810f5 JL |
12722 | |
12723 | (define-public java-eclipse-sisu-inject | |
12724 | (package | |
12725 | (name "java-eclipse-sisu-inject") | |
6671d6a1 | 12726 | (version "0.3.4") |
1a1810f5 | 12727 | (source (origin |
ae69b39e BH |
12728 | (method git-fetch) |
12729 | (uri (git-reference | |
12730 | (url "https://github.com/eclipse/sisu.inject/") | |
6671d6a1 | 12731 | (commit (string-append "releases/" version)))) |
ae69b39e | 12732 | (file-name (git-file-name name version)) |
1a1810f5 JL |
12733 | (sha256 |
12734 | (base32 | |
6671d6a1 | 12735 | "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6")))) |
1a1810f5 JL |
12736 | (build-system ant-build-system) |
12737 | (arguments | |
12738 | `(#:jar-name "eclipse-sisu-inject.jar" | |
12739 | #:source-dir "org.eclipse.sisu.inject/src" | |
6671d6a1 JL |
12740 | #:tests? #f; no tests |
12741 | #:phases | |
12742 | (modify-phases %standard-phases | |
12743 | (replace 'install | |
12744 | (install-from-pom "org.eclipse.sisu.inject/pom.xml"))))) | |
12745 | (propagated-inputs | |
1a1810f5 | 12746 | `(("java-guice" ,java-guice) |
6671d6a1 JL |
12747 | ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom))) |
12748 | (inputs | |
12749 | `(("java-guice-servlet" ,java-guice-servlet) | |
1a1810f5 | 12750 | ("java-javax-inject" ,java-javax-inject) |
4b472f6a | 12751 | ("java-javaee-servletapi" ,java-javaee-servletapi) |
1a1810f5 JL |
12752 | ("java-junit" ,java-junit) |
12753 | ("java-slf4j-api" ,java-slf4j-api) | |
12754 | ("java-jsr305" ,java-jsr305) | |
12755 | ("java-jsr250" ,java-jsr250) | |
12756 | ("java-cdi-api" ,java-cdi-api) | |
12757 | ("java-osgi-framework" ,java-osgi-framework) | |
12758 | ("java-osgi-util-tracker" ,java-osgi-util-tracker) | |
12759 | ("java-testng" ,java-testng))) | |
12760 | (home-page "https://www.eclipse.org/sisu/") | |
12761 | (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring") | |
12762 | (description "Sisu is a modular JSR330-based container that supports | |
12763 | classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses | |
12764 | Google-Guice to perform dependency injection and provide the core JSR330 | |
12765 | support, but removes the need to write explicit bindings in Guice modules. | |
12766 | Integration with other containers via the Eclipse Extension Registry and the | |
12767 | OSGi Service Registry is a goal of this project.") | |
12768 | (license license:epl1.0))) | |
7049dea1 | 12769 | |
6671d6a1 JL |
12770 | (define java-sisu-inject-parent-pom |
12771 | (package | |
12772 | (inherit java-eclipse-sisu-inject) | |
12773 | (name "java-sisu-inject-parent-pom") | |
12774 | (arguments | |
12775 | `(#:tests? #f | |
12776 | #:phases | |
12777 | (modify-phases %standard-phases | |
12778 | (delete 'configure) | |
12779 | (delete 'build) | |
12780 | (replace 'install | |
12781 | (install-pom-file "pom.xml"))))) | |
12782 | (propagated-inputs '()))) | |
12783 | ||
7049dea1 JL |
12784 | (define-public java-eclipse-sisu-plexus |
12785 | (package | |
12786 | (name "java-eclipse-sisu-plexus") | |
e0c0b078 | 12787 | (version "0.3.4") |
7049dea1 | 12788 | (source (origin |
3560a2cd EF |
12789 | (method git-fetch) |
12790 | (uri (git-reference | |
b0e7b699 | 12791 | (url "https://github.com/eclipse/sisu.plexus") |
3560a2cd EF |
12792 | (commit (string-append "releases/" version)))) |
12793 | (file-name (git-file-name name version)) | |
7049dea1 JL |
12794 | (sha256 |
12795 | (base32 | |
e0c0b078 | 12796 | "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f")) |
7049dea1 JL |
12797 | (modules '((guix build utils))) |
12798 | (snippet | |
12799 | '(begin | |
12800 | (for-each delete-file (find-files "." ".*.jar")) | |
12801 | (rename-file "org.eclipse.sisu.plexus.tests/src" | |
12802 | "org.eclipse.sisu.plexus.tests/java") | |
12803 | #t)))) | |
12804 | (build-system ant-build-system) | |
12805 | (arguments | |
12806 | `(#:jar-name "eclipse-sisu-plexus.jar" | |
12807 | #:source-dir "org.eclipse.sisu.plexus/src" | |
12808 | #:test-dir "org.eclipse.sisu.plexus.tests" | |
12809 | #:test-exclude | |
12810 | (list | |
12811 | ;; This test fails probably because we can't generate the necessary | |
12812 | ;; meta-inf files. | |
12813 | "**/PlexusLoggingTest.*" | |
12814 | ;; FIXME: This test fails because of some injection error | |
12815 | "**/PlexusRequirementTest.*") | |
12816 | #:jdk ,icedtea-8 | |
12817 | #:phases | |
12818 | (modify-phases %standard-phases | |
12819 | (add-before 'build 'copy-resources | |
12820 | (lambda _ | |
12821 | (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml" | |
12822 | "build/classes/META-INF/plexus") | |
12823 | #t)) | |
12824 | (add-before 'check 'build-test-jar | |
12825 | (lambda _ | |
12826 | (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/" | |
12827 | (mkdir "build") | |
12828 | (with-directory-excursion "java" | |
12829 | (apply invoke "javac" "-cp" | |
12830 | (string-append (getenv "CLASSPATH") | |
12831 | ":../../../../../build/classes") | |
12832 | (find-files "." ".*.java")) | |
12833 | (for-each (lambda (file) (install-file file (string-append "../build/" file))) | |
12834 | (find-files "." ".*.jar"))) | |
12835 | (mkdir-p "build/META-INF/plexus") | |
12836 | (copy-file "resources/META-INF/plexus/components.xml" | |
12837 | "build/META-INF/plexus/components.xml") | |
12838 | (with-directory-excursion "build" | |
12839 | (invoke "jar" "cf" "../../../component-jar-0.1.jar" "."))) | |
12840 | (with-directory-excursion "org.eclipse.sisu.plexus.tests/" | |
12841 | (copy-recursively "META-INF" "../build/test-classes/META-INF") | |
12842 | (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java" | |
12843 | (("resources/component-jar") | |
12844 | "org.eclipse.sisu.plexus.tests/resources/component-jar"))) | |
51087d51 JL |
12845 | #t)) |
12846 | (replace 'install | |
12847 | (install-from-pom "org.eclipse.sisu.plexus/pom.xml"))))) | |
12848 | (propagated-inputs | |
7049dea1 | 12849 | `(("java-plexus-classworlds" ,java-plexus-classworlds) |
51087d51 | 12850 | ("java-plexus-utils" ,java-plexus-utils) |
7049dea1 | 12851 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
51087d51 | 12852 | ("java-cdi-api" ,java-cdi-api) |
7049dea1 | 12853 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
51087d51 JL |
12854 | ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom))) |
12855 | (inputs | |
12856 | `(("java-osgi-framework" ,java-osgi-framework) | |
7049dea1 | 12857 | ("java-slf4j-api" ,java-slf4j-api) |
51087d51 JL |
12858 | ("java-javax-inject" ,java-javax-inject) |
12859 | ("java-guice" ,java-guice) | |
12860 | ("java-guava" ,java-guava) | |
7049dea1 | 12861 | ("java-aopalliance" ,java-aopalliance) |
51087d51 JL |
12862 | ("java-asm" ,java-asm) |
12863 | ("java-cglib" ,java-cglib))) | |
12864 | (native-inputs | |
12865 | `(("java-junit" ,java-junit))) | |
7049dea1 JL |
12866 | (home-page "https://www.eclipse.org/sisu/") |
12867 | (synopsis "Plexus support for the sisu container") | |
12868 | (description "Sisu is a modular JSR330-based container that supports | |
12869 | classpath scanning, auto-binding, and dynamic auto-wiring. This package | |
12870 | adds Plexus support to the Sisu-Inject container.") | |
12871 | (license license:epl1.0))) | |
3fa18fe7 | 12872 | |
51087d51 JL |
12873 | (define java-sisu-plexus-parent-pom |
12874 | (package | |
12875 | (inherit java-eclipse-sisu-plexus) | |
12876 | (name "java-sisu-plexus-parent-pom") | |
12877 | (arguments | |
12878 | `(#:tests? #f | |
12879 | #:phases | |
12880 | (modify-phases %standard-phases | |
12881 | (delete 'configure) | |
12882 | (delete 'build) | |
12883 | (replace 'install | |
12884 | (install-pom-file "pom.xml"))))) | |
12885 | (propagated-inputs | |
12886 | `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9))))) | |
12887 | ||
3fa18fe7 JL |
12888 | (define-public java-commons-compiler |
12889 | (package | |
12890 | (name "java-commons-compiler") | |
12891 | (version "3.0.8") | |
12892 | (source (origin | |
12893 | (method git-fetch) | |
12894 | (uri (git-reference | |
12895 | (url "https://github.com/janino-compiler/janino") | |
12896 | (commit "91aa95686d1e4ca3b16a984a03a38686572331b2"))) | |
12897 | (file-name (string-append name "-" version)) | |
12898 | (sha256 | |
12899 | (base32 | |
12900 | "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r")) | |
12901 | (modules '((guix build utils))) | |
12902 | (snippet | |
12903 | '(begin | |
12904 | (for-each delete-file | |
12905 | (find-files "." "\\.jar$")) | |
12906 | #t)))) | |
12907 | (build-system ant-build-system) | |
12908 | (arguments | |
12909 | `(#:jar-name "commons-compiler.jar" | |
12910 | #:source-dir "commons-compiler/src/main" | |
12911 | #:tests? #f)); no tests | |
12912 | (home-page "https://github.com/janino-compiler/janino") | |
12913 | (synopsis "Java compiler") | |
12914 | (description "Commons-compiler contains an API for janino, including the | |
12915 | @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator} | |
12916 | and @code{ISimpleCompiler} interfaces.") | |
12917 | (license license:bsd-3))) | |
3402e651 JL |
12918 | |
12919 | (define-public java-janino | |
12920 | (package | |
12921 | (inherit java-commons-compiler) | |
12922 | (name "java-janino") | |
12923 | (arguments | |
12924 | `(#:jar-name "janino.jar" | |
12925 | #:source-dir "src/main/java" | |
12926 | #:phases | |
12927 | (modify-phases %standard-phases | |
12928 | (add-before 'configure 'chdir | |
12929 | (lambda _ | |
2c8ac364 MW |
12930 | (chdir "janino") |
12931 | #t))))) | |
3402e651 JL |
12932 | (inputs |
12933 | `(("java-commons-compiler" ,java-commons-compiler))) | |
12934 | (native-inputs | |
12935 | `(("java-junit" ,java-junit) | |
12936 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
12937 | (description "Janino is a Java compiler. Janino can compile a set of | |
12938 | source files to a set of class files like @code{javac}, but also compile a | |
12939 | Java expression, block, class body or source file in memory, load the bytecode | |
12940 | and execute it directly in the same JVM. @code{janino} can also be used for | |
12941 | static code analysis or code manipulation."))) | |
7d8207a4 JL |
12942 | |
12943 | (define-public java-logback-core | |
12944 | (package | |
12945 | (name "java-logback-core") | |
12946 | (version "1.2.3") | |
12947 | (source (origin | |
12948 | (method url-fetch) | |
12949 | (uri (string-append "https://github.com/qos-ch/logback/archive/v_" | |
12950 | version ".tar.gz")) | |
b1ccd2a1 | 12951 | (file-name (string-append name "-" version ".tar.gz")) |
7d8207a4 JL |
12952 | (sha256 |
12953 | (base32 | |
12954 | "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi")) | |
12955 | (modules '((guix build utils))) | |
12956 | (snippet | |
2c8ac364 MW |
12957 | '(begin |
12958 | (delete-file-recursively "logback-access/lib") | |
12959 | #t)))) | |
7d8207a4 JL |
12960 | (build-system ant-build-system) |
12961 | (arguments | |
12962 | `(#:jar-name "logback.jar" | |
12963 | #:source-dir "src/main/java" | |
12964 | #:test-dir "src/test" | |
12965 | #:test-exclude | |
12966 | ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator | |
12967 | ;; which creates FastClasses | |
12968 | (list "**/AllCoreTest.*" | |
12969 | "**/AutoFlushingObjectWriterTest.*" | |
12970 | "**/PackageTest.*" | |
12971 | "**/ResilientOutputStreamTest.*" | |
12972 | ;; And we still don't want to run abstract classes | |
12973 | "**/Abstract*.*") | |
12974 | #:phases | |
12975 | (modify-phases %standard-phases | |
12976 | (add-before 'configure 'chdir | |
12977 | (lambda _ | |
12978 | (chdir "logback-core") | |
12979 | #t))))) | |
12980 | (inputs | |
12981 | `(("java-javax-mail" ,java-javax-mail) | |
4b472f6a | 12982 | ("servlet" ,java-javaee-servletapi) |
7d8207a4 JL |
12983 | ("java-commons-compiler" ,java-commons-compiler) |
12984 | ("java-janino" ,java-janino))) | |
12985 | (native-inputs | |
12986 | `(("java-junit" ,java-junit) | |
12987 | ("java-hamcrest-core" ,java-hamcrest-core) | |
12988 | ("java-mockito-1" ,java-mockito-1) | |
12989 | ("java-cglib" ,java-cglib) | |
12990 | ("java-asm" ,java-asm) | |
12991 | ("java-objenesis" ,java-objenesis) | |
12992 | ("java-joda-time" ,java-joda-time))) | |
12993 | (home-page "https://logback.qos.ch") | |
12994 | (synopsis "Logging for java") | |
12995 | (description "Logback is intended as a successor to the popular log4j project. | |
12996 | This module lays the groundwork for the other two modules.") | |
12997 | ;; Either epl1.0 or lgpl2.1 | |
12998 | (license (list license:epl1.0 | |
12999 | license:lgpl2.1)))) | |
3a69f5f2 JL |
13000 | |
13001 | (define-public java-logback-classic | |
13002 | (package | |
13003 | (inherit java-logback-core) | |
13004 | (name "java-logback-classic") | |
13005 | (arguments | |
13006 | `(#:jar-name "logback-classic.jar" | |
13007 | #:source-dir "src/main/java" | |
13008 | #:test-dir "src/test" | |
13009 | #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix | |
13010 | #:jdk ,icedtea-8 | |
13011 | #:phases | |
13012 | (modify-phases %standard-phases | |
13013 | (add-before 'configure 'chdir | |
13014 | (lambda _ | |
13015 | (chdir "logback-classic") | |
13016 | #t)) | |
13017 | (replace 'build | |
13018 | (lambda* (#:key inputs #:allow-other-keys) | |
13019 | (mkdir-p "build/classes") | |
13020 | (setenv "CLASSPATH" | |
13021 | (string-join | |
13022 | (apply append (map (lambda (input) | |
13023 | (find-files (assoc-ref inputs input) | |
13024 | ".*.jar")) | |
13025 | '("java-logback-core" "java-slf4j-api" | |
4b472f6a | 13026 | "java-commons-compiler" "servlet" |
3a69f5f2 JL |
13027 | "groovy"))) |
13028 | ":")) | |
13029 | (apply invoke "groovyc" "-d" "build/classes" "-j" | |
13030 | (find-files "src/main/" ".*\\.(groovy|java)$")) | |
13031 | (invoke "ant" "jar") | |
13032 | #t))))) | |
13033 | (inputs | |
13034 | `(("java-logback-core" ,java-logback-core) | |
13035 | ("java-slf4j-api" ,java-slf4j-api) | |
13036 | ,@(package-inputs java-logback-core))) | |
13037 | (native-inputs | |
13038 | `(("groovy" ,groovy))) | |
13039 | (description "Logback is intended as a successor to the popular log4j project. | |
13040 | This module can be assimilated to a significantly improved version of log4j. | |
13041 | Moreover, @code{logback-classic} natively implements the slf4j API so that you | |
13042 | can readily switch back and forth between logback and other logging frameworks | |
13043 | such as log4j or @code{java.util.logging} (JUL)."))) | |
ab621bf1 | 13044 | |
c786dff0 LC |
13045 | (define-public java-jgit |
13046 | (package | |
13047 | (name "java-jgit") | |
13048 | (version "4.7.0.201704051617-r") | |
13049 | (source (origin | |
13050 | (method url-fetch) | |
13051 | (uri (string-append "https://repo1.maven.org/maven2/" | |
13052 | "org/eclipse/jgit/org.eclipse.jgit/" | |
13053 | version "/org.eclipse.jgit-" | |
13054 | version "-sources.jar")) | |
13055 | (sha256 | |
13056 | (base32 | |
13057 | "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k")))) | |
13058 | (build-system ant-build-system) | |
13059 | (arguments | |
13060 | `(#:tests? #f ; There are no tests to run. | |
13061 | #:jar-name "jgit.jar" | |
13062 | ;; JGit must be built with a JDK supporting Java 8. | |
13063 | #:jdk ,icedtea-8 | |
13064 | ;; Target our older default JDK. | |
13065 | #:make-flags (list "-Dtarget=1.7") | |
13066 | #:phases | |
13067 | (modify-phases %standard-phases | |
13068 | ;; The jar file generated by the default build.xml does not include | |
13069 | ;; the text properties files, so we need to add them. | |
13070 | (add-after 'build 'add-properties | |
13071 | (lambda* (#:key jar-name #:allow-other-keys) | |
13072 | (with-directory-excursion "src" | |
13073 | (apply invoke "jar" "-uf" | |
13074 | (string-append "../build/jar/" jar-name) | |
13075 | (find-files "." "\\.properties$"))) | |
13076 | #t))))) | |
13077 | (inputs | |
13078 | `(("java-classpathx-servletapi" ,java-classpathx-servletapi) | |
13079 | ("java-javaewah" ,java-javaewah) | |
13080 | ("java-jsch" ,java-jsch) | |
13081 | ("java-slf4j-api" ,java-slf4j-api))) | |
13082 | (home-page "https://eclipse.org/jgit/") | |
13083 | (synopsis "Java library implementing the Git version control system") | |
13084 | (description "JGit is a lightweight, pure Java library implementing the | |
13085 | Git version control system, providing repository access routines, support for | |
13086 | network protocols, and core version control algorithms.") | |
13087 | (license license:edl1.0))) | |
13088 | ||
13089 | ;; For axoloti. This package can still be built with icedtea-7, which is | |
13090 | ;; currently used as the default JDK. | |
13091 | (define-public java-jgit-4.2 | |
13092 | (package (inherit java-jgit) | |
13093 | (version "4.2.0.201601211800-r") | |
13094 | (source (origin | |
13095 | (method url-fetch) | |
13096 | (uri (string-append "https://repo1.maven.org/maven2/" | |
13097 | "org/eclipse/jgit/org.eclipse.jgit/" | |
13098 | version "/org.eclipse.jgit-" | |
13099 | version "-sources.jar")) | |
13100 | (sha256 | |
13101 | (base32 | |
13102 | "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm")))) | |
13103 | (build-system ant-build-system) | |
13104 | (arguments | |
13105 | (substitute-keyword-arguments (package-arguments java-jgit) | |
13106 | ;; Build for default JDK. | |
13107 | ((#:jdk _) icedtea-7) | |
13108 | ((#:phases phases) | |
13109 | `(modify-phases ,phases | |
13110 | (add-after 'unpack 'use-latest-javaewah-API | |
13111 | (lambda _ | |
13112 | (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java" | |
13113 | (("wordinbits") "WORD_IN_BITS")) | |
13114 | #t)))))) | |
13115 | (inputs | |
13116 | `(("java-javaewah" ,java-javaewah) | |
13117 | ("java-jsch" ,java-jsch) | |
13118 | ("java-slf4j-api" ,java-slf4j-api))))) | |
717b6ba6 CZ |
13119 | |
13120 | (define-public abcl | |
13121 | (package | |
13122 | (name "abcl") | |
514001e9 | 13123 | (version "1.6.0") |
717b6ba6 CZ |
13124 | (source |
13125 | (origin | |
13126 | (method url-fetch) | |
13127 | (uri (string-append "https://abcl.org/releases/" | |
13128 | version "/abcl-src-" version ".tar.gz")) | |
13129 | (sha256 | |
13130 | (base32 | |
514001e9 | 13131 | "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9")) |
717b6ba6 CZ |
13132 | (patches |
13133 | (search-patches | |
13134 | "abcl-fix-build-xml.patch")))) | |
13135 | (build-system ant-build-system) | |
13136 | (native-inputs | |
13137 | `(("java-junit" ,java-junit))) | |
13138 | (arguments | |
13139 | `(#:build-target "abcl.jar" | |
13140 | #:test-target "abcl.test" | |
13141 | #:phases | |
13142 | (modify-phases %standard-phases | |
13143 | (replace 'install | |
13144 | (lambda* (#:key outputs #:allow-other-keys) | |
13145 | (let ((share (string-append (assoc-ref outputs "out") | |
13146 | "/share/java/")) | |
13147 | (bin (string-append (assoc-ref outputs "out") | |
13148 | "/bin/"))) | |
13149 | (mkdir-p share) | |
13150 | (install-file "dist/abcl.jar" share) | |
13151 | (install-file "dist/abcl-contrib.jar" share) | |
13152 | (mkdir-p bin) | |
13153 | (with-output-to-file (string-append bin "abcl") | |
13154 | (lambda _ | |
13155 | (let ((classpath (string-append | |
13156 | share "abcl.jar" | |
13157 | ":" | |
13158 | share "abcl-contrib.jar"))) | |
13159 | (display (string-append | |
13160 | "#!" (which "sh") "\n" | |
13161 | "if [[ -z $CLASSPATH ]]; then\n" | |
13162 | " cp=\"" classpath "\"\n" | |
13163 | "else\n" | |
13164 | " cp=\"" classpath ":$CLASSPATH\"\n" | |
13165 | "fi\n" | |
13166 | "exec " (which "java") | |
13167 | " -cp $cp org.armedbear.lisp.Main $@\n"))))) | |
13168 | (chmod (string-append bin "abcl") #o755) | |
13169 | #t)))))) | |
13170 | (home-page "https://abcl.org/") | |
13171 | (synopsis "Common Lisp Implementation on the JVM") | |
13172 | (description | |
13173 | "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common | |
13174 | Lisp language featuring both an interpreter and a compiler, running in the | |
13175 | JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine | |
13176 | in any Java application. Additionally, it can be used to implement (parts of) | |
13177 | the application using Java to Lisp integration APIs.") | |
13178 | (license (list license:gpl2+ | |
13179 | ;; named-readtables is released under 3 clause BSD | |
13180 | license:bsd-3 | |
13181 | ;; jfli is released under CPL 1.0 | |
13182 | license:cpl1.0)))) | |
da655b1e JL |
13183 | |
13184 | (define-public java-jsonp-api | |
13185 | (package | |
13186 | (name "java-jsonp-api") | |
83c4c502 | 13187 | (version "1.1.6") |
da655b1e JL |
13188 | (source (origin |
13189 | (method git-fetch) | |
13190 | (uri (git-reference | |
13191 | (url "https://github.com/eclipse-ee4j/jsonp") | |
83c4c502 | 13192 | (commit (string-append "1.1-" version "-RELEASE")))) |
da655b1e JL |
13193 | (file-name (git-file-name name version)) |
13194 | (sha256 | |
13195 | (base32 | |
83c4c502 | 13196 | "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc")))) |
da655b1e JL |
13197 | (build-system ant-build-system) |
13198 | (arguments | |
13199 | `(#:jar-name "jsonp-api.jar" | |
13200 | #:tests? #f | |
13201 | #:source-dir "api/src/main/java" | |
13202 | #:test-dir "api/src/test")) | |
13203 | (home-page "https://eclipse-ee4j.github.io/jsonp/") | |
13204 | (synopsis "JSON Processing in Java") | |
13205 | (description "JSON Processing (JSON-P) is a Java API to process (e.g. | |
13206 | parse, generate, transform and query) JSON messages. It produces and | |
13207 | consumes JSON text in a streaming fashion (similar to StAX API for XML) | |
44a057a1 | 13208 | and allows building a Java object model for JSON text using API classes |
da655b1e JL |
13209 | (similar to DOM API for XML).") |
13210 | ;; either gpl2 only with classpath exception, or epl2.0. | |
13211 | (license (list license:gpl2 | |
13212 | license:epl2.0)))) | |
d45f73c9 JL |
13213 | |
13214 | (define-public java-jsonp-impl | |
13215 | (package | |
13216 | (inherit java-jsonp-api) | |
13217 | (name "java-jsonp-impl") | |
13218 | (arguments | |
13219 | `(#:jar-name "jsonp-impl.jar" | |
13220 | #:tests? #f | |
13221 | #:source-dir "impl/src/main/java" | |
83c4c502 JL |
13222 | #:test-dir "impl/src/test" |
13223 | #:phases | |
13224 | (modify-phases %standard-phases | |
13225 | (add-before 'build 'copy-resources | |
13226 | (lambda _ | |
13227 | (copy-recursively | |
13228 | "impl/src/main/resources/" | |
13229 | "build/classes") | |
13230 | #t))))) | |
d45f73c9 JL |
13231 | (propagated-inputs |
13232 | `(("java-jsonp-api" ,java-jsonp-api))) | |
13233 | (description "JSON Processing (JSON-P) is a Java API to process (e.g. | |
13234 | parse, generate, transform and query) JSON messages. This package contains | |
13235 | a reference implementation of that API."))) | |
357f4564 JL |
13236 | |
13237 | (define-public java-xmp | |
13238 | (package | |
13239 | (name "java-xmp") | |
13240 | (version "5.1.3") | |
13241 | (source (origin | |
13242 | (method url-fetch) | |
13243 | (uri (string-append "http://download.macromedia.com/pub/developer" | |
13244 | "/xmp/sdk/XMPCoreJava-" version ".zip")) | |
13245 | (sha256 | |
13246 | (base32 | |
13247 | "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7")))) | |
13248 | (build-system ant-build-system) | |
13249 | (arguments | |
13250 | `(#:build-target "build" | |
13251 | #:tests? #f; no tests | |
13252 | #:phases | |
13253 | (modify-phases %standard-phases | |
13254 | (add-after 'unpack 'chdir | |
13255 | (lambda _ | |
13256 | (chdir "XMPCore") | |
13257 | #t)) | |
13258 | (add-before 'build 'fix-timestamp | |
13259 | (lambda _ | |
13260 | (substitute* "build.xml" | |
13261 | (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT")) | |
13262 | #t)) | |
13263 | (replace 'install | |
13264 | (install-jars ".")) | |
13265 | (add-after 'install 'install-doc | |
13266 | (lambda* (#:key outputs #:allow-other-keys) | |
13267 | (copy-recursively | |
13268 | "docs" | |
13269 | (string-append (assoc-ref outputs "out") "/share/doc/java-xmp")) | |
13270 | #t))))) | |
13271 | (native-inputs | |
13272 | `(("unzip" ,unzip))) | |
13273 | (home-page "https://www.adobe.com/devnet/xmp.html") | |
13274 | (synopsis "Extensible Metadat Platform (XMP) support in Java") | |
13275 | (description "Adobe's Extensible Metadata Platform (XMP) is a labeling | |
13276 | technology that allows you to embed data about a file, known as metadata, | |
13277 | into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore | |
13278 | library and the API is similar.") | |
13279 | (license license:bsd-3))) | |
a005c63a JL |
13280 | |
13281 | (define-public java-metadata-extractor | |
13282 | (package | |
13283 | (name "java-metadata-extractor") | |
13284 | (version "2.11.0") | |
13285 | (source (origin | |
13286 | (method git-fetch) | |
13287 | (uri (git-reference | |
13288 | (url "https://github.com/drewnoakes/metadata-extractor") | |
13289 | (commit version))) | |
13290 | (file-name (git-file-name name version)) | |
13291 | (sha256 | |
13292 | (base32 | |
13293 | "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj")))) | |
13294 | (build-system ant-build-system) | |
13295 | (arguments | |
13296 | `(#:jar-name "metadata-extractor.jar" | |
13297 | #:source-dir "Source" | |
13298 | #:test-dir "Tests" | |
13299 | #:phases | |
13300 | (modify-phases %standard-phases | |
13301 | (add-before 'check 'fix-test-dir | |
13302 | (lambda _ | |
13303 | (substitute* "build.xml" | |
13304 | (("/java\">") "\">")) | |
13305 | #t))))) | |
13306 | (propagated-inputs | |
13307 | `(("java-xmp" ,java-xmp))) | |
13308 | (native-inputs | |
13309 | `(("java-hamcrest-core" ,java-hamcrest-core) | |
13310 | ("java-junit" ,java-junit))) | |
13311 | (home-page "https://github.com/drewnoakes/metadata-extractor") | |
13312 | (synopsis "Extract metadata from image and video files") | |
13313 | (description "Metadata-extractor is a straightforward Java library for | |
13314 | reading metadata from image files. It is able to read metadata in Exif, | |
13315 | IPTC, XMP, ICC and more formats.") | |
13316 | (license license:asl2.0))) | |
0dd6089d JL |
13317 | |
13318 | (define-public java-svg-salamander | |
13319 | (package | |
13320 | (name "java-svg-salamander") | |
13321 | (version "1.1.2") | |
13322 | (source (origin | |
13323 | (method git-fetch) | |
13324 | (uri (git-reference | |
13325 | (url "https://github.com/blackears/svgSalamander") | |
13326 | (commit (string-append "v" version)))) | |
13327 | (file-name (git-file-name name version)) | |
13328 | (sha256 | |
13329 | (base32 | |
13330 | "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf")) | |
13331 | (modules '((guix build utils))) | |
13332 | (snippet | |
58c3a4f5 BH |
13333 | '(begin |
13334 | (for-each delete-file (find-files "." ".*.jar")) | |
13335 | #t)) | |
0dd6089d JL |
13336 | (patches |
13337 | (search-patches "java-svg-salamander-Fix-non-det.patch")))) | |
13338 | (build-system ant-build-system) | |
13339 | (arguments | |
13340 | `(#:tests? #f; no tests | |
13341 | #:phases | |
13342 | (modify-phases %standard-phases | |
13343 | (add-after 'unpack 'chdir | |
13344 | (lambda _ | |
13345 | (chdir "svg-core") | |
13346 | #t)) | |
13347 | (add-before 'build 'copy-jars | |
13348 | (lambda* (#:key inputs #:allow-other-keys) | |
13349 | (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$")) | |
13350 | "../libraries/javacc.jar") | |
13351 | (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$")) | |
13352 | "../libraries/ant.jar") | |
13353 | #t)) | |
13354 | (replace 'install | |
13355 | (install-jars "dist"))))) | |
13356 | (native-inputs | |
13357 | `(("javacc" ,javacc))) | |
13358 | (home-page "https://github.com/blackears/svgSalamander") | |
13359 | (synopsis "SVG engine for Java") | |
13360 | (description "SVG Salamander is an SVG engine for Java that's designed | |
13361 | to be small, fast, and allow programmers to use it with a minimum of fuss. | |
13362 | It's in particular targeted for making it easy to integrate SVG into Java | |
13363 | games and making it much easier for artists to design 2D game content - from | |
13364 | rich interactive menus to charts and graphcs to complex animations.") | |
13365 | (license license:bsd-2))) | |
ff56e6ef JL |
13366 | |
13367 | (define-public java-jboss-transaction-api-spec | |
13368 | (package | |
13369 | (name "java-jboss-transaction-api-spec") | |
13370 | (version "1.2+1.1.1") | |
13371 | (source (origin | |
13372 | (method git-fetch) | |
13373 | (uri (git-reference | |
13374 | (url "https://github.com/jboss/jboss-transaction-api_spec") | |
13375 | (commit "jboss-transaction-api_1.2_spec-1.1.1.Final"))) | |
13376 | (file-name (git-file-name name version)) | |
13377 | (sha256 | |
13378 | (base32 | |
13379 | "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy")))) | |
13380 | (build-system ant-build-system) | |
13381 | (arguments | |
13382 | `(#:jar-name "java-jboss-transaction-api_spec.jar" | |
13383 | #:source-dir "src/main/java" | |
13384 | #:tests? #f)); no tests | |
13385 | (inputs | |
13386 | `(("java-cdi-api" ,java-cdi-api) | |
13387 | ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec))) | |
13388 | (home-page "https://github.com/jboss/jboss-transaction-api_spec") | |
13389 | (synopsis "Generic transaction management API in Java") | |
13390 | (description "Java-jboss-transaction-api-spec implements the Transactions | |
13391 | API. A transaction is a unit of work containing one or more operations | |
13392 | involving one or more shared resources having ACID (Atomicity, Consistency, | |
13393 | Isolation and Durability) properties.") | |
13394 | ;; either gpl2 only with classpath exception or cddl. | |
13395 | (license (list license:gpl2 license:cddl1.0)))) | |
8ba990e6 JL |
13396 | |
13397 | (define-public java-picocli | |
13398 | (package | |
13399 | (name "java-picocli") | |
13400 | (version "4.3.2") | |
13401 | (source (origin | |
13402 | (method git-fetch) | |
13403 | (uri (git-reference | |
13404 | (url "https://github.com/remkop/picocli") | |
13405 | (commit (string-append "v" version)))) | |
b5698f5b | 13406 | (file-name (git-file-name name version)) |
8ba990e6 JL |
13407 | (sha256 |
13408 | (base32 | |
13409 | "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c")))) | |
13410 | (build-system ant-build-system) | |
13411 | (arguments | |
13412 | `(#:jar-name "picocli.jar" | |
13413 | #:source-dir "src/main/java" | |
13414 | ;; Tests require missing dependencies (junitparams, system-rules) | |
13415 | #:tests? #f)) | |
13416 | (home-page "https://picocli.info") | |
13417 | (synopsis "REPL for the JVM") | |
13418 | (description "Picocli is a framework for building command line applications | |
13419 | for the JVM. It supports colors, autocompletion, subcommands, and more. Written | |
13420 | in Java, usable from Groovy, Kotlin, Scala, etc.") | |
13421 | (license license:asl2.0))) | |
a5f8d4e0 JL |
13422 | |
13423 | (define-public java-jetbrains-annotations | |
13424 | (package | |
13425 | (name "java-jetbrains-annotations") | |
13426 | (version "19.0.0") | |
13427 | (source (origin | |
13428 | (method git-fetch) | |
13429 | (uri (git-reference | |
13430 | (url "https://github.com/JetBrains/java-annotations") | |
13431 | (commit version))) | |
13432 | (file-name (git-file-name name version)) | |
13433 | (sha256 | |
13434 | (base32 | |
13435 | "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v")))) | |
13436 | (build-system ant-build-system) | |
13437 | (arguments | |
13438 | `(#:jar-name "jetbrains-annotations.jar" | |
13439 | #:source-dir "common/src/main/java:java8/src/main/java" | |
13440 | #:tests? #f)); no tests | |
13441 | (home-page "https://github.com/JetBrains/java-annotations") | |
13442 | (synopsis "Annotations for Java and other JVM languages") | |
13443 | (description "This package contains a set of Java annotations which can be | |
13444 | used in JVM-based languages. They serve as an additional documentation and | |
13445 | can be interpreted by IDEs and static analysis tools to improve code analysis.") | |
13446 | (license license:expat))) | |
491ed320 JL |
13447 | |
13448 | (define-public java-javaparser | |
13449 | (package | |
13450 | (name "java-javaparser") | |
13451 | (version "3.16.1") | |
13452 | (source (origin | |
13453 | (method git-fetch) | |
13454 | (uri (git-reference | |
13455 | (url "https://github.com/javaparser/javaparser") | |
13456 | (commit (string-append "javaparser-parent-" version)))) | |
13457 | (file-name (git-file-name name version)) | |
13458 | (sha256 | |
13459 | (base32 | |
13460 | "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9")) | |
13461 | (modules '((guix build utils))) | |
13462 | (snippet | |
13463 | '(begin | |
13464 | (for-each delete-file | |
13465 | (find-files "." "\\.jar$")) | |
13466 | #t)))) | |
13467 | (build-system ant-build-system) | |
13468 | (arguments | |
13469 | `(#:tests? #f; tests require jbehave and junit5 | |
13470 | #:phases | |
13471 | (modify-phases %standard-phases | |
13472 | (add-before 'build 'fill-template | |
13473 | (lambda _ | |
13474 | (with-directory-excursion "javaparser-core/src/main" | |
13475 | (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java" | |
13476 | "java/com/github/javaparser/JavaParserBuild.java") | |
13477 | (substitute* "java/com/github/javaparser/JavaParserBuild.java" | |
13478 | (("\\$\\{project.version\\}") ,version) | |
13479 | (("\\$\\{project.name\\}") "javaparser") | |
13480 | (("\\$\\{project.build.finalName\\}") "javaparser") | |
13481 | (("\\$\\{maven.version\\}") "fake") | |
13482 | (("\\$\\{maven.build.version\\}") "fake") | |
13483 | (("\\$\\{build.timestamp\\}") "0") | |
13484 | (("\\$\\{java.vendor\\}") "Guix") | |
13485 | (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix") | |
13486 | (("\\$\\{java.version\\}") "1.8") | |
13487 | (("\\$\\{os.arch\\}") "any") | |
13488 | (("\\$\\{os.name\\}") "GuixSD") | |
13489 | (("\\$\\{os.version\\}") "not available"))) | |
13490 | #t)) | |
13491 | (add-before 'build 'generate-javacc | |
13492 | (lambda _ | |
13493 | (with-directory-excursion "javaparser-core/src/main/java" | |
13494 | (invoke "java" "javacc" "../javacc/java.jj")) | |
13495 | #t)) | |
13496 | (add-before 'build 'copy-javacc-support | |
13497 | (lambda _ | |
13498 | (with-directory-excursion "javaparser-core/src/main" | |
13499 | (copy-recursively "javacc-support" "java")) | |
13500 | #t)) | |
13501 | (replace 'build | |
13502 | (lambda _ | |
13503 | (define (build name) | |
13504 | (format #t "Building ~a~%" name) | |
13505 | (delete-file-recursively "build/classes") | |
13506 | (mkdir-p "build/classes") | |
13507 | (apply invoke "javac" | |
13508 | "-cp" (string-append (getenv "CLASSPATH") ":" | |
13509 | (string-join (find-files "build/jar" ".") | |
13510 | ":")) | |
13511 | "-d" "build/classes" | |
13512 | (find-files (string-append name "/src/main/java") | |
13513 | ".*.java")) | |
13514 | (invoke "jar" "-cf" (string-append "build/jar/" name ".jar") | |
13515 | "-C" "build/classes" ".")) | |
13516 | (mkdir-p "build/classes") | |
13517 | (mkdir-p "build/test-classes") | |
13518 | (mkdir-p "build/jar") | |
13519 | (build "javaparser-core") | |
13520 | (build "javaparser-core-serialization") | |
13521 | (build "javaparser-core-generators") | |
13522 | (build "javaparser-core-metamodel-generator") | |
13523 | (build "javaparser-symbol-solver-core") | |
13524 | #t)) | |
13525 | (replace 'install | |
13526 | (install-jars "build/jar"))))) | |
13527 | (inputs | |
13528 | `(("java-guava" ,java-guava) | |
13529 | ("java-jboss-javassist" ,java-jboss-javassist) | |
13530 | ("java-jsonp-api" ,java-jsonp-api))) | |
13531 | (native-inputs | |
13532 | `(("javacc" ,javacc))) | |
13533 | (home-page "http://javaparser.org/") | |
13534 | (synopsis "Parser for Java") | |
13535 | (description | |
13536 | "This project contains a set of libraries implementing a Java 1.0 - Java | |
13537 | 11 Parser with advanced analysis functionalities.") | |
13538 | (license (list | |
13539 | ;; either lgpl or asl | |
13540 | license:lgpl3+ | |
13541 | license:asl2.0)))) |