Commit | Line | Data |
---|---|---|
0760e3a1 | 1 | ;;; GNU Guix --- Functional package management for GNU |
84b226c2 | 2 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019 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> |
a1a5ef20 | 6 | ;;; Copyright © 2017, 2018 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> |
64b2efc1 | 12 | ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il> |
0760e3a1 RW |
13 | ;;; |
14 | ;;; This file is part of GNU Guix. | |
15 | ;;; | |
16 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
17 | ;;; under the terms of the GNU General Public License as published by | |
18 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
19 | ;;; your option) any later version. | |
20 | ;;; | |
21 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
22 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
23 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
24 | ;;; GNU General Public License for more details. | |
25 | ;;; | |
26 | ;;; You should have received a copy of the GNU General Public License | |
27 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
28 | ||
29 | (define-module (gnu packages java) | |
30 | #:use-module ((guix licenses) #:prefix license:) | |
31 | #:use-module (guix packages) | |
32 | #:use-module (guix download) | |
62c9bfaa | 33 | #:use-module (guix hg-download) |
72885a4c | 34 | #:use-module (guix git-download) |
78745d33 | 35 | #:use-module (guix svn-download) |
f6789047 | 36 | #:use-module (guix utils) |
068e476f | 37 | #:use-module (guix build-system ant) |
0760e3a1 | 38 | #:use-module (guix build-system gnu) |
6a5829d9 | 39 | #:use-module (guix build-system trivial) |
0760e3a1 RW |
40 | #:use-module (gnu packages) |
41 | #:use-module (gnu packages attr) | |
42 | #:use-module (gnu packages autotools) | |
43 | #:use-module (gnu packages base) | |
44 | #:use-module (gnu packages bash) | |
f21403e2 | 45 | #:use-module (gnu packages certs) |
0760e3a1 RW |
46 | #:use-module (gnu packages cpio) |
47 | #:use-module (gnu packages cups) | |
48 | #:use-module (gnu packages compression) | |
dd741059 | 49 | #:use-module (gnu packages elf) |
0760e3a1 RW |
50 | #:use-module (gnu packages fontutils) |
51 | #:use-module (gnu packages gawk) | |
72885a4c | 52 | #:use-module (gnu packages gettext) |
0760e3a1 | 53 | #:use-module (gnu packages gcc) |
8581c813 | 54 | #:use-module (gnu packages gl) |
0760e3a1 RW |
55 | #:use-module (gnu packages ghostscript) ;lcms |
56 | #:use-module (gnu packages gnome) | |
3a69f5f2 | 57 | #:use-module (gnu packages groovy) |
0760e3a1 | 58 | #:use-module (gnu packages gtk) |
6a5829d9 | 59 | #:use-module (gnu packages guile) |
afb5858d | 60 | #:use-module (gnu packages icu4c) |
0760e3a1 | 61 | #:use-module (gnu packages image) |
24155bf4 | 62 | #:use-module (gnu packages java-compression) |
c4fd86f9 | 63 | #:use-module (gnu packages libffi) |
0760e3a1 | 64 | #:use-module (gnu packages linux) ;alsa |
2f0d0418 | 65 | #:use-module (gnu packages maths) |
aff0cce9 | 66 | #:use-module (gnu packages nss) |
bcb078a4 | 67 | #:use-module (gnu packages onc-rpc) |
5766984b | 68 | #:use-module (gnu packages web) |
0760e3a1 | 69 | #:use-module (gnu packages wget) |
0760e3a1 RW |
70 | #:use-module (gnu packages pkg-config) |
71 | #:use-module (gnu packages perl) | |
c4fd86f9 | 72 | #:use-module (gnu packages popt) |
89e34644 | 73 | #:use-module (gnu packages kerberos) |
0760e3a1 RW |
74 | #:use-module (gnu packages xml) |
75 | #:use-module (gnu packages xorg) | |
f6789047 | 76 | #:use-module (gnu packages texinfo) |
2d15f601 RW |
77 | #:use-module ((srfi srfi-1) #:select (fold alist-delete)) |
78 | #:use-module (srfi srfi-11) | |
79 | #:use-module (ice-9 match)) | |
0760e3a1 | 80 | |
e1ae3587 RW |
81 | \f |
82 | ;;; | |
83 | ;;; Java bootstrap toolchain. | |
84 | ;;; | |
85 | ||
86 | ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We | |
269fb7d3 RW |
87 | ;; use it to build a simple version of GNU Classpath, the Java standard |
88 | ;; library. We chose version 0.93 because it is the last version that can be | |
89 | ;; built with Jikes. With Jikes and this version of GNU Classpath we can | |
90 | ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is | |
91 | ;; the last version of JamVM that works with a version of GNU classpath that | |
92 | ;; does not require ECJ. These three packages make up the bootstrap JDK. | |
93 | ||
94 | ;; This is sufficient to build an older version of Ant, which is needed to | |
95 | ;; build an older version of ECJ, an incremental Java compiler, both of which | |
96 | ;; are written in Java. | |
e1ae3587 | 97 | ;; |
269fb7d3 RW |
98 | ;; ECJ is needed to build the latest release (0.99) and the development |
99 | ;; version of GNU Classpath. The development version of GNU Classpath has | |
100 | ;; much more support for Java 1.6 than the latest release, but we need to | |
101 | ;; build 0.99 first to get a working version of javah. ECJ, the development | |
102 | ;; version of GNU Classpath, and the latest version of JamVM make up the | |
103 | ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x | |
104 | ;; build framework. We then build the more recent JDKs Icedtea 2.x and | |
105 | ;; Icedtea 3.x. | |
e1ae3587 RW |
106 | |
107 | (define jikes | |
108 | (package | |
109 | (name "jikes") | |
110 | (version "1.22") | |
111 | (source (origin | |
112 | (method url-fetch) | |
113 | (uri (string-append "mirror://sourceforge/jikes/Jikes/" | |
114 | version "/jikes-" version ".tar.bz2")) | |
115 | (sha256 | |
116 | (base32 | |
117 | "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c")))) | |
118 | (build-system gnu-build-system) | |
119 | (home-page "http://jikes.sourceforge.net/") | |
120 | (synopsis "Compiler for the Java language") | |
121 | (description "Jikes is a compiler that translates Java source files as | |
122 | defined in The Java Language Specification into the bytecoded instruction set | |
123 | and binary format defined in The Java Virtual Machine Specification.") | |
124 | (license license:ibmpl1.0))) | |
125 | ||
45f762ee RW |
126 | ;; This is the last version of GNU Classpath that can be built without ECJ. |
127 | (define classpath-bootstrap | |
2551fee8 | 128 | (package |
45f762ee RW |
129 | (name "classpath") |
130 | (version "0.93") | |
2551fee8 RW |
131 | (source (origin |
132 | (method url-fetch) | |
45f762ee RW |
133 | (uri (string-append "mirror://gnu/classpath/classpath-" |
134 | version ".tar.gz")) | |
2551fee8 RW |
135 | (sha256 |
136 | (base32 | |
bab9793f EF |
137 | "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz")) |
138 | (patches (search-patches "classpath-aarch64-support.patch")))) | |
2551fee8 RW |
139 | (build-system gnu-build-system) |
140 | (arguments | |
141 | `(#:configure-flags | |
45f762ee RW |
142 | (list (string-append "JAVAC=" |
143 | (assoc-ref %build-inputs "jikes") | |
144 | "/bin/jikes") | |
2551fee8 RW |
145 | "--disable-Werror" |
146 | "--disable-gmp" | |
147 | "--disable-gtk-peer" | |
45f762ee | 148 | "--disable-gconf-peer" |
2551fee8 RW |
149 | "--disable-plugin" |
150 | "--disable-dssi" | |
151 | "--disable-alsa" | |
45f762ee RW |
152 | "--disable-gjdoc") |
153 | #:phases | |
154 | (modify-phases %standard-phases | |
4fb59c9e RW |
155 | ;; XXX: This introduces a memory leak as we remove a call to free up |
156 | ;; memory for the file name string. This was necessary because of a | |
157 | ;; runtime error that would have prevented us from building | |
158 | ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685 | |
159 | ;; for the gnarly details. | |
160 | (add-after 'unpack 'remove-call-to-free | |
161 | (lambda _ | |
162 | (substitute* "native/jni/java-io/java_io_VMFile.c" | |
163 | (("result = cpio_isFileExists.*" m) | |
164 | (string-append m "\n//"))) | |
165 | #t)) | |
45f762ee | 166 | (add-after 'install 'install-data |
0c66a4eb | 167 | (lambda _ (invoke "make" "install-data")))))) |
2551fee8 RW |
168 | (native-inputs |
169 | `(("jikes" ,jikes) | |
170 | ("fastjar" ,fastjar) | |
45f762ee | 171 | ("libltdl" ,libltdl) |
2551fee8 | 172 | ("pkg-config" ,pkg-config))) |
45f762ee RW |
173 | (home-page "https://www.gnu.org/software/classpath/") |
174 | (synopsis "Essential libraries for Java") | |
175 | (description "GNU Classpath is a project to create core class libraries | |
176 | for use with runtimes, compilers and tools for the Java programming | |
177 | language.") | |
178 | ;; GPLv2 or later, with special linking exception. | |
179 | (license license:gpl2+))) | |
57f6c50d | 180 | |
063629aa RW |
181 | ;; This is the last version of JamVM that works with a version of GNU |
182 | ;; classpath that does not require ECJ. | |
183 | (define jamvm-1-bootstrap | |
57f6c50d | 184 | (package |
063629aa RW |
185 | (name "jamvm") |
186 | (version "1.5.1") | |
57f6c50d RW |
187 | (source (origin |
188 | (method url-fetch) | |
063629aa RW |
189 | (uri (string-append "mirror://sourceforge/jamvm/jamvm/" |
190 | "JamVM%20" version "/jamvm-" | |
191 | version ".tar.gz")) | |
64b2efc1 | 192 | (patches (search-patches "jamvm-arm.patch")) |
57f6c50d RW |
193 | (sha256 |
194 | (base32 | |
063629aa | 195 | "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36")))) |
57f6c50d RW |
196 | (build-system gnu-build-system) |
197 | (arguments | |
c4fd86f9 | 198 | `(#:configure-flags |
063629aa | 199 | (list (string-append "--with-classpath-install-dir=" |
fc37b4af RW |
200 | (assoc-ref %build-inputs "classpath")) |
201 | "--disable-int-caching" | |
202 | "--enable-runtime-reloc-checks" | |
203 | "--enable-ffi"))) | |
57f6c50d | 204 | (inputs |
063629aa | 205 | `(("classpath" ,classpath-bootstrap) |
57f6c50d | 206 | ("jikes" ,jikes) |
fc37b4af | 207 | ("libffi" ,libffi) |
063629aa | 208 | ("zlib" ,zlib))) |
22bd735a RW |
209 | ;; When built with a recent GCC and glibc the configure step of icedtea-6 |
210 | ;; fails with an invalid instruction error. | |
211 | (native-inputs | |
212 | `(("gcc" ,gcc-5) | |
213 | ("libc" ,glibc-2.28))) | |
063629aa RW |
214 | (home-page "http://jamvm.sourceforge.net/") |
215 | (synopsis "Small Java Virtual Machine") | |
216 | (description "JamVM is a Java Virtual Machine conforming to the JVM | |
217 | specification edition 2 (blue book). It is extremely small. However, unlike | |
218 | other small VMs it supports the full spec, including object finalisation and | |
219 | JNI.") | |
220 | (license license:gpl2+))) | |
2551fee8 | 221 | |
5783bd77 RW |
222 | (define ant-bootstrap |
223 | (package | |
224 | (name "ant-bootstrap") | |
225 | ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which | |
226 | ;; are not supported. The 1.8.x series is the last to use only features | |
ff4d9fdf RW |
227 | ;; supported by Jikes. |
228 | (version "1.8.4") | |
5783bd77 RW |
229 | (source (origin |
230 | (method url-fetch) | |
231 | (uri (string-append "http://archive.apache.org/dist/" | |
232 | "ant/source/apache-ant-" | |
233 | version "-src.tar.bz2")) | |
234 | (sha256 | |
235 | (base32 | |
ff4d9fdf | 236 | "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx")))) |
5783bd77 RW |
237 | (build-system gnu-build-system) |
238 | (arguments | |
cded3a75 GB |
239 | `(#:imported-modules ((guix build syscalls) |
240 | ,@%gnu-build-system-modules) | |
241 | #:modules ((srfi srfi-1) | |
242 | (guix build gnu-build-system) | |
243 | (guix build utils) | |
244 | (guix build syscalls)) | |
245 | #:tests? #f ; no "check" target | |
5783bd77 RW |
246 | #:phases |
247 | (modify-phases %standard-phases | |
d4fd4c3a | 248 | (delete 'bootstrap) |
5783bd77 RW |
249 | (delete 'configure) |
250 | (replace 'build | |
251 | (lambda* (#:key inputs #:allow-other-keys) | |
aa432388 | 252 | (setenv "JAVA_HOME" (assoc-ref inputs "jamvm")) |
5783bd77 | 253 | (setenv "JAVACMD" |
aa432388 RW |
254 | (string-append (assoc-ref inputs "jamvm") |
255 | "/bin/jamvm")) | |
5783bd77 | 256 | (setenv "JAVAC" |
aa432388 RW |
257 | (string-append (assoc-ref inputs "jikes") |
258 | "/bin/jikes")) | |
259 | (setenv "CLASSPATH" | |
260 | (string-append (assoc-ref inputs "jamvm") | |
261 | "/lib/rt.jar")) | |
5783bd77 | 262 | |
d4fd4c3a RW |
263 | ;; Ant complains if this file doesn't exist. |
264 | (setenv "HOME" "/tmp") | |
265 | (with-output-to-file "/tmp/.ant.properties" | |
266 | (lambda _ (display ""))) | |
5783bd77 RW |
267 | |
268 | ;; Use jikes instead of javac for <javac ...> tags in build.xml | |
269 | (setenv "ANT_OPTS" "-Dbuild.compiler=jikes") | |
270 | ||
271 | ;; jikes produces lots of warnings, but they are not very | |
272 | ;; interesting, so we silence them. | |
273 | (setenv "$BOOTJAVAC_OPTS" "-nowarn") | |
274 | ||
d4fd4c3a RW |
275 | ;; Without these JamVM options the build may freeze. |
276 | (substitute* "bootstrap.sh" | |
277 | (("^\"\\$\\{JAVACMD\\}\" " m) | |
a495998b EF |
278 | ,@(if (string-prefix? "armhf" (or (%current-system) |
279 | (%current-target-system))) | |
280 | `((string-append m "-Xnocompact ")) | |
281 | `((string-append m "-Xnocompact -Xnoinlining "))))) | |
d4fd4c3a | 282 | |
5783bd77 RW |
283 | ;; Disable tests because we are bootstrapping and thus don't have |
284 | ;; any of the dependencies required to build and run the tests. | |
285 | (substitute* "build.xml" | |
286 | (("depends=\"jars,test-jar\"") "depends=\"jars\"")) | |
8e14634a EF |
287 | (invoke "bash" "bootstrap.sh" |
288 | (string-append "-Ddist.dir=" | |
289 | (assoc-ref %outputs "out"))))) | |
cded3a75 GB |
290 | (add-after 'build 'strip-jar-timestamps ;based on ant-build-system |
291 | (lambda* (#:key outputs #:allow-other-keys) | |
292 | (define (repack-archive jar) | |
293 | (let* ((dir (mkdtemp! "jar-contents.XXXXXX")) | |
294 | (manifest (string-append dir "/META-INF/MANIFESTS.MF"))) | |
295 | (with-directory-excursion dir | |
296 | (invoke "unzip" jar)) | |
297 | (delete-file jar) | |
298 | ;; XXX: copied from (gnu build install) | |
299 | (for-each (lambda (file) | |
300 | (let ((s (lstat file))) | |
301 | (unless (eq? (stat:type s) 'symlink) | |
302 | (utime file 0 0 0 0)))) | |
303 | (find-files dir #:directories? #t)) | |
304 | ;; It is important that the manifest appears first. | |
305 | (with-directory-excursion dir | |
306 | (let* ((files (find-files "." ".*" #:directories? #t)) | |
307 | ;; To ensure that the reference scanner can | |
308 | ;; detect all store references in the jars | |
309 | ;; we disable compression with the "-0" option. | |
310 | (command (if (file-exists? manifest) | |
311 | `("zip" "-0" "-X" ,jar ,manifest | |
312 | ,@files) | |
313 | `("zip" "-0" "-X" ,jar ,@files)))) | |
314 | (apply invoke command))))) | |
315 | (for-each repack-archive | |
316 | (find-files | |
317 | (string-append (assoc-ref %outputs "out") "/lib") | |
318 | "\\.jar$")) | |
319 | #t)) | |
5783bd77 RW |
320 | (delete 'install)))) |
321 | (native-inputs | |
322 | `(("jikes" ,jikes) | |
cded3a75 GB |
323 | ("jamvm" ,jamvm-1-bootstrap) |
324 | ("unzip" ,unzip) | |
b42b5afd | 325 | ("zip" ,zip))) |
5783bd77 RW |
326 | (home-page "http://ant.apache.org") |
327 | (synopsis "Build tool for Java") | |
328 | (description | |
329 | "Ant is a platform-independent build tool for Java. It is similar to | |
330 | make but is implemented using the Java language, requires the Java platform, | |
331 | and is best suited to building Java projects. Ant uses XML to describe the | |
332 | build process and its dependencies, whereas Make uses Makefile format.") | |
333 | (license license:asl2.0))) | |
334 | ||
5461721f RW |
335 | ;; Version 3.2.2 is the last version without a dependency on a full-fledged |
336 | ;; compiler for Java 1.5. | |
337 | (define ecj-bootstrap | |
338 | (package | |
339 | (name "ecj-bootstrap") | |
340 | (version "3.2.2") | |
341 | (source (origin | |
342 | (method url-fetch) | |
343 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
344 | "downloads/drops/R-" version | |
345 | "-200702121330/ecjsrc.zip")) | |
346 | (sha256 | |
347 | (base32 | |
348 | "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307")))) | |
349 | ;; It would be so much easier if we could use the ant-build-system, but we | |
350 | ;; cannot as we don't have ant at this point. We use ecj for | |
351 | ;; bootstrapping the JDK. | |
352 | (build-system gnu-build-system) | |
353 | (arguments | |
354 | `(#:modules ((guix build gnu-build-system) | |
355 | (guix build utils) | |
356 | (srfi srfi-1)) | |
357 | #:tests? #f ; there are no tests | |
358 | #:phases | |
359 | (modify-phases %standard-phases | |
360 | (replace 'configure | |
361 | (lambda* (#:key inputs #:allow-other-keys) | |
362 | (setenv "CLASSPATH" | |
363 | (string-join | |
6c775dc6 RW |
364 | (cons (string-append (assoc-ref inputs "jamvm") |
365 | "/lib/rt.jar") | |
366 | (find-files (string-append | |
367 | (assoc-ref inputs "ant-bootstrap") | |
368 | "/lib") | |
369 | "\\.jar$")) | |
5461721f RW |
370 | ":")) |
371 | #t)) | |
372 | (replace 'build | |
373 | (lambda* (#:key inputs #:allow-other-keys) | |
374 | ;; The unpack phase enters the "org" directory by mistake. | |
375 | (chdir "..") | |
376 | ||
377 | ;; Create a simple manifest to make ecj executable. | |
378 | (with-output-to-file "manifest" | |
379 | (lambda _ | |
380 | (display "Manifest-Version: 1.0 | |
381 | Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"))) | |
382 | ||
383 | ;; Compile it all! | |
0b302a16 EF |
384 | (and (apply invoke "jikes" |
385 | (find-files "." "\\.java$")) | |
386 | (invoke "fastjar" "cvfm" | |
387 | "ecj-bootstrap.jar" "manifest" ".")))) | |
5461721f RW |
388 | (replace 'install |
389 | (lambda* (#:key outputs #:allow-other-keys) | |
390 | (let ((share (string-append (assoc-ref outputs "out") | |
391 | "/share/java/"))) | |
392 | (mkdir-p share) | |
393 | (install-file "ecj-bootstrap.jar" share) | |
394 | #t)))))) | |
395 | (native-inputs | |
396 | `(("ant-bootstrap" ,ant-bootstrap) | |
397 | ("unzip" ,unzip) | |
6c775dc6 RW |
398 | ("jikes" ,jikes) |
399 | ("jamvm" ,jamvm-1-bootstrap) | |
5461721f RW |
400 | ("fastjar" ,fastjar))) |
401 | (home-page "https://eclipse.org") | |
402 | (synopsis "Eclipse Java development tools core batch compiler") | |
403 | (description "This package provides the Eclipse Java core batch compiler | |
404 | for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a | |
405 | requirement for all GNU Classpath releases after version 0.93.") | |
406 | (license license:epl1.0))) | |
407 | ||
6a5829d9 RW |
408 | (define ecj-javac-wrapper |
409 | (package (inherit ecj-bootstrap) | |
410 | (name "ecj-javac-wrapper") | |
411 | (source #f) | |
412 | (build-system trivial-build-system) | |
413 | (arguments | |
414 | `(#:modules ((guix build utils)) | |
415 | #:builder | |
c4f06c11 | 416 | (begin |
6a5829d9 RW |
417 | (use-modules (guix build utils)) |
418 | (let* ((bin (string-append (assoc-ref %outputs "out") "/bin")) | |
419 | (target (string-append bin "/javac")) | |
420 | (guile (string-append (assoc-ref %build-inputs "guile") | |
421 | "/bin/guile")) | |
422 | (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap") | |
423 | "/share/java/ecj-bootstrap.jar")) | |
c4f06c11 RW |
424 | (java (string-append (assoc-ref %build-inputs "jamvm") |
425 | "/bin/jamvm")) | |
426 | (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath") | |
427 | "/share/classpath"))) | |
51602aac RW |
428 | (string-append jvmlib "/glibj.zip:" |
429 | jvmlib "/tools.zip")))) | |
6a5829d9 RW |
430 | (mkdir-p bin) |
431 | (with-output-to-file target | |
432 | (lambda _ | |
433 | (format #t "#!~a --no-auto-compile\n!#\n" guile) | |
434 | (write | |
435 | `(begin (use-modules (ice-9 match) | |
436 | (ice-9 receive) | |
437 | (ice-9 hash-table) | |
438 | (srfi srfi-1) | |
439 | (srfi srfi-26)) | |
440 | (define defaults | |
441 | '(("-bootclasspath" ,bootcp) | |
442 | ("-source" "1.5") | |
443 | ("-target" "1.5") | |
444 | ("-cp" "."))) | |
445 | (define (main args) | |
446 | (let ((classpath (getenv "CLASSPATH"))) | |
447 | (setenv "CLASSPATH" | |
c4f06c11 RW |
448 | (string-join (list ,ecj |
449 | ,(string-append (assoc-ref %build-inputs "jamvm") | |
450 | "/lib/rt.jar") | |
451 | (or classpath "")) | |
452 | ":"))) | |
6a5829d9 RW |
453 | (receive (vm-args other-args) |
454 | ;; Separate VM arguments from arguments to ECJ. | |
455 | (partition (cut string-prefix? "-J" <>) | |
456 | (fold (lambda (default acc) | |
457 | (if (member (first default) acc) | |
458 | acc (append default acc))) | |
459 | args defaults)) | |
460 | (apply system* ,java | |
461 | (append | |
462 | ;; Remove "-J" prefix | |
463 | (map (cut string-drop <> 2) vm-args) | |
464 | '("org.eclipse.jdt.internal.compiler.batch.Main") | |
465 | (cons "-nowarn" other-args))))) | |
466 | ;; Entry point | |
467 | (let ((args (cdr (command-line)))) | |
468 | (if (null? args) | |
469 | (format (current-error-port) "javac: no arguments given!\n") | |
470 | (main args))))))) | |
471 | (chmod target #o755) | |
472 | #t)))) | |
473 | (native-inputs | |
474 | `(("guile" ,guile-2.2) | |
475 | ("ecj-bootstrap" ,ecj-bootstrap) | |
c4f06c11 RW |
476 | ("jamvm" ,jamvm-1-bootstrap) |
477 | ("classpath" ,classpath-bootstrap))) | |
6a5829d9 RW |
478 | (description "This package provides a wrapper around the @dfn{Eclipse |
479 | compiler for Java} (ecj) with a command line interface that is compatible with | |
480 | the standard javac executable."))) | |
481 | ||
8778da03 RW |
482 | ;; The classpath-bootstrap was built without a virtual machine, so it does not |
483 | ;; provide a wrapper for javah. We cannot build the development version of | |
484 | ;; Classpath without javah. | |
485 | (define classpath-0.99 | |
486 | (package (inherit classpath-bootstrap) | |
d3551e86 RW |
487 | (version "0.99") |
488 | (source (origin | |
489 | (method url-fetch) | |
490 | (uri (string-append "mirror://gnu/classpath/classpath-" | |
491 | version ".tar.gz")) | |
492 | (sha256 | |
493 | (base32 | |
bab9793f EF |
494 | "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr")) |
495 | (patches (search-patches "classpath-aarch64-support.patch")))) | |
d3551e86 RW |
496 | (arguments |
497 | `(#:configure-flags | |
498 | (list (string-append "--with-ecj-jar=" | |
499 | (assoc-ref %build-inputs "ecj-bootstrap") | |
500 | "/share/java/ecj-bootstrap.jar") | |
501 | (string-append "JAVAC=" | |
502 | (assoc-ref %build-inputs "ecj-javac-wrapper") | |
503 | "/bin/javac") | |
504 | (string-append "JAVA=" | |
8778da03 RW |
505 | (assoc-ref %build-inputs "jamvm") |
506 | "/bin/jamvm") | |
d3551e86 RW |
507 | "GCJ_JAVAC_TRUE=no" |
508 | "ac_cv_prog_java_works=yes" ; trust me | |
509 | "--disable-Werror" | |
510 | "--disable-gmp" | |
511 | "--disable-gtk-peer" | |
512 | "--disable-gconf-peer" | |
513 | "--disable-plugin" | |
514 | "--disable-dssi" | |
515 | "--disable-alsa" | |
516 | "--disable-gjdoc") | |
517 | #:phases | |
518 | (modify-phases %standard-phases | |
519 | (add-after 'install 'install-data | |
15a59c21 | 520 | (lambda _ (invoke "make" "install-data")))))) |
d3551e86 RW |
521 | (native-inputs |
522 | `(("ecj-bootstrap" ,ecj-bootstrap) | |
523 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) | |
524 | ("fastjar" ,fastjar) | |
8778da03 RW |
525 | ("jamvm" ,jamvm-1-bootstrap) |
526 | ("classpath" ,classpath-bootstrap) | |
d3551e86 | 527 | ("libltdl" ,libltdl) |
8778da03 | 528 | ("pkg-config" ,pkg-config))))) |
d3551e86 | 529 | |
c98d7a66 RW |
530 | ;; We need this because classpath-bootstrap does not provide all of the tools |
531 | ;; we need to build classpath-devel. | |
04d7cae2 | 532 | (define classpath-jamvm-wrappers |
c98d7a66 | 533 | (package (inherit classpath-0.99) |
04d7cae2 RW |
534 | (name "classpath-jamvm-wrappers") |
535 | (source #f) | |
536 | (build-system trivial-build-system) | |
537 | (arguments | |
538 | `(#:modules ((guix build utils)) | |
539 | #:builder | |
540 | (begin | |
541 | (use-modules (guix build utils)) | |
542 | (let* ((bash (assoc-ref %build-inputs "bash")) | |
543 | (jamvm (assoc-ref %build-inputs "jamvm")) | |
544 | (classpath (assoc-ref %build-inputs "classpath")) | |
545 | (bin (string-append (assoc-ref %outputs "out") | |
546 | "/bin/"))) | |
547 | (mkdir-p bin) | |
548 | (for-each (lambda (tool) | |
549 | (with-output-to-file (string-append bin tool) | |
550 | (lambda _ | |
e3ec1258 EF |
551 | ,@(if (string-prefix? "armhf" (or (%current-system) |
552 | (%current-target-system))) | |
553 | `((format #t "#!~a/bin/sh | |
554 | ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \ | |
555 | gnu.classpath.tools.~a.~a $@" | |
556 | bash jamvm classpath tool | |
557 | (if (string=? "native2ascii" tool) | |
558 | "Native2ASCII" "Main"))) | |
559 | `((format #t "#!~a/bin/sh | |
40e3a197 | 560 | ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \ |
04d7cae2 RW |
561 | gnu.classpath.tools.~a.~a $@" |
562 | bash jamvm classpath tool | |
563 | (if (string=? "native2ascii" tool) | |
e3ec1258 | 564 | "Native2ASCII" "Main")))))) |
04d7cae2 RW |
565 | (chmod (string-append bin tool) #o755)) |
566 | (list "javah" | |
567 | "rmic" | |
568 | "rmid" | |
569 | "orbd" | |
570 | "rmiregistry" | |
571 | "native2ascii")) | |
572 | #t)))) | |
573 | (native-inputs | |
574 | `(("bash" ,bash) | |
c98d7a66 RW |
575 | ("jamvm" ,jamvm-1-bootstrap) |
576 | ("classpath" ,classpath-0.99))) | |
04d7cae2 RW |
577 | (inputs '()) |
578 | (synopsis "Executables from GNU Classpath") | |
579 | (description "This package provides wrappers around the tools provided by | |
580 | the GNU Classpath library. They are executed by the JamVM virtual | |
581 | machine."))) | |
582 | ||
72885a4c RW |
583 | ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since |
584 | ;; then Classpath has gained much more support for Java 1.6. | |
585 | (define-public classpath-devel | |
586 | (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103") | |
587 | (revision "1")) | |
8778da03 | 588 | (package (inherit classpath-bootstrap) |
72885a4c RW |
589 | (version (string-append "0.99-" revision "." (string-take commit 9))) |
590 | (source (origin | |
591 | (method git-fetch) | |
592 | (uri (git-reference | |
5f13bf09 | 593 | (url "https://git.savannah.gnu.org/git/classpath.git") |
72885a4c | 594 | (commit commit))) |
51988e3a | 595 | (file-name (string-append "classpath-" version "-checkout")) |
72885a4c RW |
596 | (sha256 |
597 | (base32 | |
598 | "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4")))) | |
599 | (arguments | |
93c103ab RW |
600 | `(#:make-flags |
601 | ;; Ensure that the initial heap size is smaller than the maximum | |
602 | ;; size. By default only Xmx is set, which can lead to invalid | |
603 | ;; memory settings on some machines with a lot of memory. | |
604 | '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M") | |
605 | #:configure-flags | |
72885a4c RW |
606 | (list (string-append "--with-ecj-jar=" |
607 | (assoc-ref %build-inputs "ecj-bootstrap") | |
608 | "/share/java/ecj-bootstrap.jar") | |
93c103ab | 609 | (string-append "--with-javac=" |
72885a4c RW |
610 | (assoc-ref %build-inputs "ecj-javac-wrapper") |
611 | "/bin/javac") | |
612 | (string-append "JAVA=" | |
613 | (assoc-ref %build-inputs "jamvm") | |
614 | "/bin/jamvm") | |
615 | "GCJ_JAVAC_TRUE=no" | |
616 | "ac_cv_prog_java_works=yes" ; trust me | |
617 | "--disable-Werror" | |
618 | "--disable-gmp" | |
619 | "--disable-gtk-peer" | |
620 | "--disable-gconf-peer" | |
621 | "--disable-plugin" | |
622 | "--disable-dssi" | |
623 | "--disable-alsa" | |
624 | "--disable-gjdoc") | |
625 | #:phases | |
626 | (modify-phases %standard-phases | |
2a69f48e RW |
627 | ;; XXX The bootstrap phase executes autogen.sh, which fails after |
628 | ;; complaining about the lack of gettext. | |
629 | (replace 'bootstrap | |
630 | (lambda _ (invoke "autoreconf" "-vif"))) | |
72885a4c RW |
631 | (add-after 'unpack 'remove-unsupported-annotations |
632 | (lambda _ | |
633 | (substitute* (find-files "java" "\\.java$") | |
634 | (("@Override") "")) | |
635 | #t)) | |
636 | (add-after 'install 'install-data | |
4c65eb43 | 637 | (lambda _ (invoke "make" "install-data")))))) |
72885a4c RW |
638 | (native-inputs |
639 | `(("autoconf" ,autoconf) | |
640 | ("automake" ,automake) | |
641 | ("libtool" ,libtool) | |
642 | ("gettext" ,gettext-minimal) | |
643 | ("texinfo" ,texinfo) | |
644 | ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah | |
645 | ("ecj-bootstrap" ,ecj-bootstrap) | |
b5a0d427 | 646 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
72885a4c | 647 | ("fastjar" ,fastjar) |
58d2b135 | 648 | ("jamvm" ,jamvm-1-bootstrap) |
72885a4c RW |
649 | ("libltdl" ,libltdl) |
650 | ("pkg-config" ,pkg-config)))))) | |
651 | ||
58d2b135 RW |
652 | (define jamvm |
653 | (package (inherit jamvm-1-bootstrap) | |
654 | (version "2.0.0") | |
655 | (source (origin | |
656 | (method url-fetch) | |
657 | (uri (string-append "mirror://sourceforge/jamvm/jamvm/" | |
658 | "JamVM%20" version "/jamvm-" | |
659 | version ".tar.gz")) | |
660 | (sha256 | |
661 | (base32 | |
662 | "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn")))) | |
663 | (build-system gnu-build-system) | |
664 | (arguments | |
665 | `(#:configure-flags | |
666 | (list (string-append "--with-classpath-install-dir=" | |
667 | (assoc-ref %build-inputs "classpath"))))) | |
8c6091e3 RW |
668 | (inputs |
669 | `(("classpath" ,classpath-devel) | |
b5a0d427 | 670 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
8c6091e3 RW |
671 | ("zlib" ,zlib))))) |
672 | ||
b5a0d427 RW |
673 | (define ecj-javac-wrapper-final |
674 | (package (inherit ecj-javac-wrapper) | |
1bf56c72 RW |
675 | (native-inputs |
676 | `(("guile" ,guile-2.2) | |
677 | ("ecj-bootstrap" ,ecj-bootstrap) | |
678 | ("jamvm" ,jamvm) | |
679 | ("classpath" ,classpath-devel))))) | |
680 | ||
98419316 | 681 | ;; The bootstrap JDK consisting of jamvm, classpath-devel, |
b5a0d427 RW |
682 | ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's |
683 | ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x, | |
684 | ;; which uses Java 6 only. | |
98419316 RW |
685 | (define-public icedtea-6 |
686 | (package | |
687 | (name "icedtea") | |
688 | (version "1.13.13") | |
689 | (source (origin | |
690 | (method url-fetch) | |
691 | (uri (string-append | |
692 | "http://icedtea.wildebeest.org/download/source/icedtea6-" | |
693 | version ".tar.xz")) | |
694 | (sha256 | |
695 | (base32 | |
696 | "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg")) | |
697 | (modules '((guix build utils))) | |
698 | (snippet | |
6cbee49d MW |
699 | '(begin |
700 | (substitute* "Makefile.in" | |
701 | ;; do not leak information about the build host | |
702 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") | |
703 | "DISTRIBUTION_ID=\"\\\"guix\\\"\"")) | |
704 | #t)))) | |
98419316 RW |
705 | (build-system gnu-build-system) |
706 | (outputs '("out" ; Java Runtime Environment | |
707 | "jdk" ; Java Development Kit | |
708 | "doc")) ; all documentation | |
709 | (arguments | |
710 | `(;; There are many failing tests and many are known to fail upstream. | |
711 | #:tests? #f | |
712 | ||
713 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build | |
714 | ;; gremlin) doesn't support it yet, so skip this phase. | |
715 | #:validate-runpath? #f | |
716 | ||
717 | #:modules ((guix build utils) | |
718 | (guix build gnu-build-system) | |
719 | (srfi srfi-19)) | |
720 | ||
721 | #:configure-flags | |
722 | `("--enable-bootstrap" | |
723 | "--enable-nss" | |
724 | "--without-rhino" | |
725 | "--with-parallel-jobs" | |
726 | "--disable-downloading" | |
727 | "--disable-tests" | |
728 | ,(string-append "--with-ecj=" | |
729 | (assoc-ref %build-inputs "ecj") | |
730 | "/share/java/ecj-bootstrap.jar") | |
731 | ,(string-append "--with-jar=" | |
732 | (assoc-ref %build-inputs "fastjar") | |
733 | "/bin/fastjar") | |
734 | ,(string-append "--with-jdk-home=" | |
735 | (assoc-ref %build-inputs "classpath")) | |
736 | ,(string-append "--with-java=" | |
737 | (assoc-ref %build-inputs "jamvm") | |
738 | "/bin/jamvm")) | |
739 | #:phases | |
740 | (modify-phases %standard-phases | |
741 | (replace 'unpack | |
742 | (lambda* (#:key source inputs #:allow-other-keys) | |
2c8ac364 MW |
743 | (invoke "tar" "xvf" source) |
744 | (chdir (string-append "icedtea6-" ,version)) | |
745 | (mkdir "openjdk") | |
746 | (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk") | |
747 | ;; The convenient OpenJDK source bundle is no longer | |
748 | ;; available for download, so we have to take the sources | |
749 | ;; from the Mercurial repositories and change the Makefile | |
750 | ;; to avoid tests for the OpenJDK zip archive. | |
751 | (with-directory-excursion "openjdk" | |
752 | (for-each (lambda (part) | |
753 | (mkdir part) | |
754 | (copy-recursively | |
755 | (assoc-ref inputs | |
756 | (string-append part "-src")) | |
757 | part)) | |
873325b0 | 758 | '("jdk" "corba" |
2c8ac364 | 759 | "langtools" "jaxp" "jaxws"))) |
873325b0 MB |
760 | (with-directory-excursion "openjdk" |
761 | (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src")) | |
762 | (rename-file "hg-checkout" "hotspot")) | |
306c1e61 RW |
763 | (substitute* "patches/freetypeversion.patch" |
764 | (("REQUIRED_FREETYPE_VERSION = 2.2.1") | |
765 | "REQUIRED_FREETYPE_VERSION = 2.10.1")) | |
2c8ac364 MW |
766 | (substitute* "Makefile.in" |
767 | (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;") | |
768 | "echo \"trust me\";") | |
769 | ;; The contents of the bootstrap directory must be | |
770 | ;; writeable but when copying from the store they are | |
771 | ;; not. | |
772 | (("mkdir -p lib/rt" line) | |
773 | (string-append line "; chmod -R u+w $(BOOT_DIR)"))) | |
774 | (invoke "chmod" "-R" "u+w" "openjdk"))) | |
98419316 RW |
775 | (add-after 'unpack 'use-classpath |
776 | (lambda* (#:key inputs #:allow-other-keys) | |
b5a0d427 RW |
777 | (let ((jvmlib (assoc-ref inputs "classpath")) |
778 | (jamvm (assoc-ref inputs "jamvm"))) | |
98419316 RW |
779 | ;; Classpath does not provide rt.jar. |
780 | (substitute* "Makefile.in" | |
781 | (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") | |
782 | (string-append jvmlib "/share/classpath/glibj.zip"))) | |
783 | ;; Make sure we can find all classes. | |
784 | (setenv "CLASSPATH" | |
785 | (string-append jvmlib "/share/classpath/glibj.zip:" | |
b5a0d427 RW |
786 | jvmlib "/share/classpath/tools.zip:" |
787 | jamvm "/lib/rt.jar")) | |
98419316 RW |
788 | (setenv "JAVACFLAGS" |
789 | (string-append "-cp " | |
790 | jvmlib "/share/classpath/glibj.zip:" | |
791 | jvmlib "/share/classpath/tools.zip"))) | |
792 | #t)) | |
793 | (add-after 'unpack 'patch-patches | |
794 | (lambda _ | |
795 | ;; shebang in patches so that they apply cleanly | |
796 | (substitute* '("patches/jtreg-jrunscript.patch" | |
797 | "patches/hotspot/hs23/drop_unlicensed_test.patch") | |
798 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
799 | #t)) | |
800 | (add-after 'unpack 'patch-paths | |
801 | (lambda* (#:key inputs #:allow-other-keys) | |
802 | ;; buildtree.make generates shell scripts, so we need to replace | |
803 | ;; the generated shebang | |
804 | (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make") | |
805 | (("/bin/sh") (which "bash"))) | |
806 | ||
807 | (let ((corebin (string-append | |
808 | (assoc-ref inputs "coreutils") "/bin/")) | |
809 | (binbin (string-append | |
810 | (assoc-ref inputs "binutils") "/bin/")) | |
811 | (grepbin (string-append | |
812 | (assoc-ref inputs "grep") "/bin/"))) | |
813 | (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk" | |
814 | "openjdk/corba/make/common/shared/Defs-linux.gmk") | |
815 | (("UNIXCOMMAND_PATH = /bin/") | |
816 | (string-append "UNIXCOMMAND_PATH = " corebin)) | |
817 | (("USRBIN_PATH = /usr/bin/") | |
818 | (string-append "USRBIN_PATH = " corebin)) | |
819 | (("DEVTOOLS_PATH *= */usr/bin/") | |
820 | (string-append "DEVTOOLS_PATH = " corebin)) | |
821 | (("COMPILER_PATH *= */usr/bin/") | |
822 | (string-append "COMPILER_PATH = " | |
823 | (assoc-ref inputs "gcc") "/bin/")) | |
824 | (("DEF_OBJCOPY *=.*objcopy") | |
825 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) | |
826 | ||
827 | ;; fix path to alsa header | |
828 | (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk" | |
829 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
830 | (string-append "ALSA_INCLUDE=" | |
831 | (assoc-ref inputs "alsa-lib") | |
832 | "/include/alsa/version.h"))) | |
833 | ||
834 | ;; fix hard-coded utility paths | |
835 | (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk" | |
836 | "openjdk/corba/make/common/shared/Defs-utils.gmk") | |
837 | (("ECHO *=.*echo") | |
838 | (string-append "ECHO = " (which "echo"))) | |
839 | (("^GREP *=.*grep") | |
840 | (string-append "GREP = " (which "grep"))) | |
841 | (("EGREP *=.*egrep") | |
842 | (string-append "EGREP = " (which "egrep"))) | |
843 | (("CPIO *=.*cpio") | |
844 | (string-append "CPIO = " (which "cpio"))) | |
845 | (("READELF *=.*readelf") | |
846 | (string-append "READELF = " (which "readelf"))) | |
847 | (("^ *AR *=.*ar") | |
848 | (string-append "AR = " (which "ar"))) | |
849 | (("^ *TAR *=.*tar") | |
850 | (string-append "TAR = " (which "tar"))) | |
851 | (("AS *=.*as") | |
852 | (string-append "AS = " (which "as"))) | |
853 | (("LD *=.*ld") | |
854 | (string-append "LD = " (which "ld"))) | |
855 | (("STRIP *=.*strip") | |
856 | (string-append "STRIP = " (which "strip"))) | |
857 | (("NM *=.*nm") | |
858 | (string-append "NM = " (which "nm"))) | |
859 | (("^SH *=.*sh") | |
860 | (string-append "SH = " (which "bash"))) | |
861 | (("^FIND *=.*find") | |
862 | (string-append "FIND = " (which "find"))) | |
863 | (("LDD *=.*ldd") | |
864 | (string-append "LDD = " (which "ldd"))) | |
865 | (("NAWK *=.*(n|g)awk") | |
866 | (string-append "NAWK = " (which "gawk"))) | |
867 | (("XARGS *=.*xargs") | |
868 | (string-append "XARGS = " (which "xargs"))) | |
869 | (("UNZIP *=.*unzip") | |
870 | (string-append "UNZIP = " (which "unzip"))) | |
871 | (("ZIPEXE *=.*zip") | |
872 | (string-append "ZIPEXE = " (which "zip"))) | |
873 | (("SED *=.*sed") | |
874 | (string-append "SED = " (which "sed")))) | |
875 | ||
876 | ;; Some of these timestamps cause problems as they are more than | |
877 | ;; 10 years ago, failing the build process. | |
878 | (substitute* | |
879 | "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties" | |
880 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") | |
881 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") | |
882 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") | |
883 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")) | |
884 | #t))) | |
885 | (add-before 'configure 'set-additional-paths | |
886 | (lambda* (#:key inputs #:allow-other-keys) | |
887 | (setenv "CPATH" | |
888 | (string-append (assoc-ref inputs "libxrender") | |
889 | "/include/X11/extensions" ":" | |
890 | (assoc-ref inputs "libxtst") | |
891 | "/include/X11/extensions" ":" | |
892 | (assoc-ref inputs "libxinerama") | |
893 | "/include/X11/extensions" ":" | |
894 | (or (getenv "CPATH") ""))) | |
895 | (setenv "ALT_CUPS_HEADERS_PATH" | |
896 | (string-append (assoc-ref inputs "cups") | |
897 | "/include")) | |
898 | (setenv "ALT_FREETYPE_HEADERS_PATH" | |
899 | (string-append (assoc-ref inputs "freetype") | |
900 | "/include")) | |
901 | (setenv "ALT_FREETYPE_LIB_PATH" | |
902 | (string-append (assoc-ref inputs "freetype") | |
903 | "/lib")) | |
904 | #t)) | |
0bc11cc7 GB |
905 | (add-before 'build 'disable-os-version-check |
906 | ;; allow build on linux major version change | |
907 | (lambda _ | |
908 | (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok") | |
909 | #t)) | |
98419316 RW |
910 | (replace 'install |
911 | (lambda* (#:key outputs #:allow-other-keys) | |
912 | (let ((doc (string-append (assoc-ref outputs "doc") | |
913 | "/share/doc/icedtea")) | |
914 | (jre (assoc-ref outputs "out")) | |
915 | (jdk (assoc-ref outputs "jdk"))) | |
916 | (copy-recursively "openjdk.build/docs" doc) | |
917 | (copy-recursively "openjdk.build/j2re-image" jre) | |
918 | (copy-recursively "openjdk.build/j2sdk-image" jdk)) | |
919 | #t))))) | |
920 | (native-inputs | |
921 | `(("ant" ,ant-bootstrap) | |
922 | ("alsa-lib" ,alsa-lib) | |
923 | ("attr" ,attr) | |
924 | ("classpath" ,classpath-devel) | |
925 | ("coreutils" ,coreutils) | |
926 | ("cpio" ,cpio) | |
927 | ("cups" ,cups) | |
928 | ("ecj" ,ecj-bootstrap) | |
b5a0d427 | 929 | ("ecj-javac" ,ecj-javac-wrapper-final) |
98419316 RW |
930 | ("fastjar" ,fastjar) |
931 | ("fontconfig" ,fontconfig) | |
932 | ("freetype" ,freetype) | |
933 | ("gtk" ,gtk+-2) | |
934 | ("gawk" ,gawk) | |
935 | ("giflib" ,giflib) | |
936 | ("grep" ,grep) | |
937 | ("jamvm" ,jamvm) | |
938 | ("lcms" ,lcms) | |
939 | ("libjpeg" ,libjpeg) | |
bcb078a4 | 940 | ("libnsl" ,libnsl) |
98419316 RW |
941 | ("libpng" ,libpng) |
942 | ("libtool" ,libtool) | |
943 | ("libx11" ,libx11) | |
944 | ("libxcomposite" ,libxcomposite) | |
945 | ("libxi" ,libxi) | |
946 | ("libxinerama" ,libxinerama) | |
947 | ("libxrender" ,libxrender) | |
948 | ("libxslt" ,libxslt) ;for xsltproc | |
949 | ("libxt" ,libxt) | |
950 | ("libxtst" ,libxtst) | |
951 | ("mit-krb5" ,mit-krb5) | |
952 | ("nss" ,nss) | |
953 | ("nss-certs" ,nss-certs) | |
954 | ("perl" ,perl) | |
955 | ("pkg-config" ,pkg-config) | |
956 | ("procps" ,procps) ;for "free", even though I'm not sure we should use it | |
957 | ("unzip" ,unzip) | |
958 | ("wget" ,wget) | |
959 | ("which" ,which) | |
960 | ("zip" ,zip) | |
961 | ("zlib" ,zlib) | |
962 | ("openjdk-src" | |
963 | ,(origin | |
964 | (method hg-fetch) | |
965 | (uri (hg-reference | |
966 | (url "http://hg.openjdk.java.net/jdk6/jdk6/") | |
967 | (changeset "jdk6-b41"))) | |
968 | (sha256 | |
969 | (base32 | |
970 | "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv")))) | |
971 | ("jdk-src" | |
972 | ,(origin | |
973 | (method hg-fetch) | |
974 | (uri (hg-reference | |
975 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/") | |
976 | (changeset "jdk6-b41"))) | |
977 | (sha256 | |
978 | (base32 | |
979 | "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9")))) | |
980 | ("hotspot-src" | |
981 | ,(origin | |
982 | (method hg-fetch) | |
983 | (uri (hg-reference | |
984 | (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/") | |
985 | (changeset "jdk6-b41"))) | |
986 | (sha256 | |
987 | (base32 | |
1cdff8cd GB |
988 | "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd")) |
989 | (patches | |
990 | (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch")))) | |
98419316 RW |
991 | ("corba-src" |
992 | ,(origin | |
993 | (method hg-fetch) | |
994 | (uri (hg-reference | |
995 | (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/") | |
996 | (changeset "jdk6-b41"))) | |
997 | (sha256 | |
998 | (base32 | |
999 | "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q")))) | |
1000 | ("langtools-src" | |
1001 | ,(origin | |
1002 | (method hg-fetch) | |
1003 | (uri (hg-reference | |
1004 | (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/") | |
1005 | (changeset "jdk6-b41"))) | |
1006 | (sha256 | |
1007 | (base32 | |
1008 | "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d")))) | |
1009 | ("jaxp-src" | |
1010 | ,(origin | |
1011 | (method hg-fetch) | |
1012 | (uri (hg-reference | |
1013 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/") | |
1014 | (changeset "jdk6-b41"))) | |
1015 | (sha256 | |
1016 | (base32 | |
1017 | "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm")))) | |
1018 | ("jaxws-src" | |
1019 | ,(origin | |
1020 | (method hg-fetch) | |
1021 | (uri (hg-reference | |
1022 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/") | |
1023 | (changeset "jdk6-b41"))) | |
1024 | (sha256 | |
1025 | (base32 | |
1026 | "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0")))))) | |
1027 | (home-page "http://icedtea.classpath.org") | |
1028 | (synopsis "Java development kit") | |
1029 | (description | |
1030 | "This package provides the OpenJDK built with the IcedTea build harness. | |
1031 | This version of the OpenJDK is no longer maintained and is only used for | |
1032 | bootstrapping purposes.") | |
1033 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the | |
1034 | ;; same license as both GNU Classpath and OpenJDK. | |
1035 | (license license:gpl2+))) | |
1036 | ||
a243e12a | 1037 | (define-public icedtea-7 |
7f6485e7 | 1038 | (let* ((version "2.6.13") |
f6789047 RW |
1039 | (drop (lambda (name hash) |
1040 | (origin | |
1041 | (method url-fetch) | |
1042 | (uri (string-append | |
d30ce4a7 | 1043 | "http://icedtea.classpath.org/download/drops" |
f6789047 RW |
1044 | "/icedtea7/" version "/" name ".tar.bz2")) |
1045 | (sha256 (base32 hash)))))) | |
71053e14 RW |
1046 | (package |
1047 | (name "icedtea") | |
f6789047 RW |
1048 | (version version) |
1049 | (source (origin | |
1050 | (method url-fetch) | |
1051 | (uri (string-append | |
1052 | "http://icedtea.wildebeest.org/download/source/icedtea-" | |
1053 | version ".tar.xz")) | |
1054 | (sha256 | |
1055 | (base32 | |
7f6485e7 | 1056 | "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh")) |
f6789047 RW |
1057 | (modules '((guix build utils))) |
1058 | (snippet | |
6cbee49d MW |
1059 | '(begin |
1060 | (substitute* "Makefile.in" | |
1061 | ;; do not leak information about the build host | |
1062 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") | |
1063 | "DISTRIBUTION_ID=\"\\\"guix\\\"\"")) | |
1064 | #t)))) | |
71053e14 RW |
1065 | (build-system gnu-build-system) |
1066 | (outputs '("out" ; Java Runtime Environment | |
1067 | "jdk" ; Java Development Kit | |
1068 | "doc")) ; all documentation | |
f6789047 RW |
1069 | (arguments |
1070 | `(;; There are many test failures. Some are known to | |
1071 | ;; fail upstream, others relate to not having an X | |
1072 | ;; server running at test time, yet others are a | |
1073 | ;; complete mystery to me. | |
1074 | ||
1075 | ;; hotspot: passed: 241; failed: 45; error: 2 | |
1076 | ;; langtools: passed: 1,934; failed: 26 | |
1077 | ;; jdk: unknown | |
1078 | #:tests? #f | |
71053e14 RW |
1079 | |
1080 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build | |
1081 | ;; gremlin) doesn't support it yet, so skip this phase. | |
1082 | #:validate-runpath? #f | |
1083 | ||
f6789047 RW |
1084 | ;; Apparently, the C locale is needed for some of the tests. |
1085 | #:locale "C" | |
71053e14 RW |
1086 | |
1087 | #:modules ((guix build utils) | |
1088 | (guix build gnu-build-system) | |
1089 | (ice-9 match) | |
1090 | (ice-9 popen) | |
71053e14 RW |
1091 | (srfi srfi-19) |
1092 | (srfi srfi-26)) | |
1093 | ||
1094 | #:configure-flags | |
e2098e2d RW |
1095 | ;; TODO: package pcsc and sctp, and add to inputs |
1096 | `("--disable-system-pcsc" | |
1097 | "--disable-system-sctp" | |
1098 | "--enable-bootstrap" | |
1099 | "--enable-nss" | |
1100 | "--without-rhino" | |
1101 | "--disable-downloading" | |
1102 | "--disable-tests" ;they are run in the check phase instead | |
1103 | "--with-openjdk-src-dir=./openjdk.src" | |
1104 | ,(string-append "--with-jdk-home=" | |
1105 | (assoc-ref %build-inputs "jdk"))) | |
71053e14 RW |
1106 | |
1107 | #:phases | |
1108 | (modify-phases %standard-phases | |
1109 | (replace 'unpack | |
1110 | (lambda* (#:key source inputs #:allow-other-keys) | |
1111 | (let ((target (string-append "icedtea-" ,version)) | |
1112 | (unpack (lambda* (name #:optional dir) | |
1113 | (let ((dir (or dir | |
1114 | (string-drop-right name 5)))) | |
1115 | (mkdir dir) | |
2c8ac364 MW |
1116 | (invoke "tar" "xvf" |
1117 | (assoc-ref inputs name) | |
1118 | "-C" dir | |
1119 | "--strip-components=1"))))) | |
71053e14 | 1120 | (mkdir target) |
2c8ac364 MW |
1121 | (invoke "tar" "xvf" source |
1122 | "-C" target "--strip-components=1") | |
1123 | (chdir target) | |
1124 | (unpack "openjdk-src" "openjdk.src") | |
1125 | (with-directory-excursion "openjdk.src" | |
1126 | (for-each unpack | |
1127 | (filter (cut string-suffix? "-drop" <>) | |
1128 | (map (match-lambda | |
1129 | ((name . _) name)) | |
1130 | inputs)))) | |
1131 | #t))) | |
6b7e09ae RW |
1132 | (add-after 'unpack 'patch-bitrot |
1133 | (lambda _ | |
1134 | (substitute* '("patches/boot/revert-6973616.patch" | |
1135 | "openjdk.src/jdk/make/common/shared/Defs-versions.gmk") | |
1136 | (("REQUIRED_FREETYPE_VERSION = 2.2.1") | |
1137 | "REQUIRED_FREETYPE_VERSION = 2.10.1")) | |
1138 | ;; As of attr 2.4.48 this header is no longer | |
1139 | ;; included. It is provided by the libc instead. | |
1140 | (substitute* '("configure" | |
1141 | "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c") | |
1142 | (("attr/xattr.h") "sys/xattr.h")) | |
1143 | #t)) | |
71053e14 RW |
1144 | (add-after 'unpack 'fix-x11-extension-include-path |
1145 | (lambda* (#:key inputs #:allow-other-keys) | |
1146 | (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk" | |
1147 | (((string-append "\\$\\(firstword \\$\\(wildcard " | |
1148 | "\\$\\(OPENWIN_HOME\\)" | |
1149 | "/include/X11/extensions\\).*$")) | |
1150 | (string-append (assoc-ref inputs "libxrender") | |
1151 | "/include/X11/extensions" | |
1152 | " -I" (assoc-ref inputs "libxtst") | |
1153 | "/include/X11/extensions" | |
1154 | " -I" (assoc-ref inputs "libxinerama") | |
1155 | "/include/X11/extensions")) | |
1156 | (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") "")) | |
1157 | #t)) | |
1158 | (add-after 'unpack 'patch-paths | |
1159 | (lambda _ | |
1160 | ;; buildtree.make generates shell scripts, so we need to replace | |
1161 | ;; the generated shebang | |
1162 | (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make") | |
1163 | (("/bin/sh") (which "bash"))) | |
1164 | ||
1165 | (let ((corebin (string-append | |
1166 | (assoc-ref %build-inputs "coreutils") "/bin/")) | |
1167 | (binbin (string-append | |
1168 | (assoc-ref %build-inputs "binutils") "/bin/")) | |
1169 | (grepbin (string-append | |
1170 | (assoc-ref %build-inputs "grep") "/bin/"))) | |
1171 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk" | |
1172 | "openjdk.src/corba/make/common/shared/Defs-linux.gmk") | |
1173 | (("UNIXCOMMAND_PATH = /bin/") | |
1174 | (string-append "UNIXCOMMAND_PATH = " corebin)) | |
1175 | (("USRBIN_PATH = /usr/bin/") | |
1176 | (string-append "USRBIN_PATH = " corebin)) | |
1177 | (("DEVTOOLS_PATH *= */usr/bin/") | |
1178 | (string-append "DEVTOOLS_PATH = " corebin)) | |
1179 | (("COMPILER_PATH *= */usr/bin/") | |
1180 | (string-append "COMPILER_PATH = " | |
1181 | (assoc-ref %build-inputs "gcc") "/bin/")) | |
1182 | (("DEF_OBJCOPY *=.*objcopy") | |
1183 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) | |
1184 | ||
1185 | ;; fix path to alsa header | |
1186 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" | |
1187 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
1188 | (string-append "ALSA_INCLUDE=" | |
1189 | (assoc-ref %build-inputs "alsa-lib") | |
1190 | "/include/alsa/version.h"))) | |
1191 | ||
1192 | ;; fix hard-coded utility paths | |
1193 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk" | |
1194 | "openjdk.src/corba/make/common/shared/Defs-utils.gmk") | |
1195 | (("ECHO *=.*echo") | |
1196 | (string-append "ECHO = " (which "echo"))) | |
1197 | (("^GREP *=.*grep") | |
1198 | (string-append "GREP = " (which "grep"))) | |
1199 | (("EGREP *=.*egrep") | |
1200 | (string-append "EGREP = " (which "egrep"))) | |
1201 | (("CPIO *=.*cpio") | |
1202 | (string-append "CPIO = " (which "cpio"))) | |
1203 | (("READELF *=.*readelf") | |
1204 | (string-append "READELF = " (which "readelf"))) | |
1205 | (("^ *AR *=.*ar") | |
1206 | (string-append "AR = " (which "ar"))) | |
1207 | (("^ *TAR *=.*tar") | |
1208 | (string-append "TAR = " (which "tar"))) | |
1209 | (("AS *=.*as") | |
1210 | (string-append "AS = " (which "as"))) | |
1211 | (("LD *=.*ld") | |
1212 | (string-append "LD = " (which "ld"))) | |
1213 | (("STRIP *=.*strip") | |
1214 | (string-append "STRIP = " (which "strip"))) | |
1215 | (("NM *=.*nm") | |
1216 | (string-append "NM = " (which "nm"))) | |
1217 | (("^SH *=.*sh") | |
1218 | (string-append "SH = " (which "bash"))) | |
1219 | (("^FIND *=.*find") | |
1220 | (string-append "FIND = " (which "find"))) | |
1221 | (("LDD *=.*ldd") | |
1222 | (string-append "LDD = " (which "ldd"))) | |
1223 | (("NAWK *=.*(n|g)awk") | |
1224 | (string-append "NAWK = " (which "gawk"))) | |
1225 | (("XARGS *=.*xargs") | |
1226 | (string-append "XARGS = " (which "xargs"))) | |
1227 | (("UNZIP *=.*unzip") | |
1228 | (string-append "UNZIP = " (which "unzip"))) | |
1229 | (("ZIPEXE *=.*zip") | |
1230 | (string-append "ZIPEXE = " (which "zip"))) | |
1231 | (("SED *=.*sed") | |
1232 | (string-append "SED = " (which "sed")))) | |
1233 | ||
1234 | ;; Some of these timestamps cause problems as they are more than | |
1235 | ;; 10 years ago, failing the build process. | |
1236 | (substitute* | |
1237 | "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties" | |
1238 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") | |
1239 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") | |
1240 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") | |
1241 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))) | |
1242 | #t)) | |
1243 | (add-before 'configure 'set-additional-paths | |
1244 | (lambda* (#:key inputs #:allow-other-keys) | |
e2098e2d RW |
1245 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" |
1246 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
1247 | (string-append "ALSA_INCLUDE=" | |
1248 | (assoc-ref inputs "alsa-lib") | |
1249 | "/include/alsa/version.h"))) | |
1250 | (setenv "CC" "gcc") | |
1251 | (setenv "CPATH" | |
1252 | (string-append (assoc-ref inputs "libxcomposite") | |
1253 | "/include/X11/extensions" ":" | |
1254 | (assoc-ref inputs "libxrender") | |
1255 | "/include/X11/extensions" ":" | |
1256 | (assoc-ref inputs "libxtst") | |
1257 | "/include/X11/extensions" ":" | |
1258 | (assoc-ref inputs "libxinerama") | |
1259 | "/include/X11/extensions" ":" | |
1260 | (or (getenv "CPATH") ""))) | |
1261 | (setenv "ALT_OBJCOPY" (which "objcopy")) | |
1262 | (setenv "ALT_CUPS_HEADERS_PATH" | |
1263 | (string-append (assoc-ref inputs "cups") | |
1264 | "/include")) | |
1265 | (setenv "ALT_FREETYPE_HEADERS_PATH" | |
1266 | (string-append (assoc-ref inputs "freetype") | |
1267 | "/include")) | |
1268 | (setenv "ALT_FREETYPE_LIB_PATH" | |
1269 | (string-append (assoc-ref inputs "freetype") | |
1270 | "/lib")) | |
71053e14 | 1271 | #t)) |
59199e1a GB |
1272 | (add-before 'build 'disable-os-version-check |
1273 | ;; allow build on linux major version change | |
1274 | (lambda _ | |
1275 | (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok") | |
1276 | #t)) | |
71053e14 RW |
1277 | (add-before 'check 'fix-test-framework |
1278 | (lambda _ | |
1279 | ;; Fix PATH in test environment | |
1280 | (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java" | |
1281 | (("PATH=/bin:/usr/bin") | |
1282 | (string-append "PATH=" (getenv "PATH")))) | |
1283 | (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java" | |
1284 | (("/usr/bin/env") (which "env"))) | |
1285 | (substitute* "openjdk.src/hotspot/test/test_env.sh" | |
1286 | (("/bin/rm") (which "rm")) | |
1287 | (("/bin/cp") (which "cp")) | |
1288 | (("/bin/mv") (which "mv"))) | |
1289 | #t)) | |
1290 | (add-before 'check 'fix-hotspot-tests | |
1291 | (lambda _ | |
1292 | (with-directory-excursion "openjdk.src/hotspot/test/" | |
1293 | (substitute* "jprt.config" | |
1294 | (("PATH=\"\\$\\{path4sdk\\}\"") | |
1295 | (string-append "PATH=" (getenv "PATH"))) | |
1296 | (("make=/usr/bin/make") | |
1297 | (string-append "make=" (which "make")))) | |
1298 | (substitute* '("runtime/6626217/Test6626217.sh" | |
1299 | "runtime/7110720/Test7110720.sh") | |
1300 | (("/bin/rm") (which "rm")) | |
1301 | (("/bin/cp") (which "cp")) | |
1302 | (("/bin/mv") (which "mv")))) | |
1303 | #t)) | |
1304 | (add-before 'check 'fix-jdk-tests | |
1305 | (lambda _ | |
1306 | (with-directory-excursion "openjdk.src/jdk/test/" | |
1307 | (substitute* "com/sun/jdi/JdbReadTwiceTest.sh" | |
1308 | (("/bin/pwd") (which "pwd"))) | |
1309 | (substitute* "com/sun/jdi/ShellScaffold.sh" | |
1310 | (("/bin/kill") (which "kill"))) | |
1311 | (substitute* "start-Xvfb.sh" | |
1312 | ;;(("/usr/bin/X11/Xvfb") (which "Xvfb")) | |
1313 | (("/usr/bin/nohup") (which "nohup"))) | |
1314 | (substitute* "javax/security/auth/Subject/doAs/Test.sh" | |
1315 | (("/bin/rm") (which "rm"))) | |
1316 | (substitute* "tools/launcher/MultipleJRE.sh" | |
1317 | (("echo \"#!/bin/sh\"") | |
1318 | (string-append "echo \"#!" (which "rm") "\"")) | |
1319 | (("/usr/bin/zip") (which "zip"))) | |
1320 | (substitute* "com/sun/jdi/OnThrowTest.java" | |
1321 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
1322 | (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java" | |
1323 | (("/usr/bin/uptime") (which "uptime"))) | |
1324 | (substitute* "java/lang/ProcessBuilder/Basic.java" | |
1325 | (("/usr/bin/env") (which "env")) | |
1326 | (("/bin/false") (which "false")) | |
1327 | (("/bin/true") (which "true")) | |
1328 | (("/bin/cp") (which "cp")) | |
1329 | (("/bin/sh") (which "sh"))) | |
1330 | (substitute* "java/lang/ProcessBuilder/FeelingLucky.java" | |
1331 | (("/bin/sh") (which "sh"))) | |
1332 | (substitute* "java/lang/ProcessBuilder/Zombies.java" | |
1333 | (("/usr/bin/perl") (which "perl")) | |
1334 | (("/bin/ps") (which "ps")) | |
1335 | (("/bin/true") (which "true"))) | |
1336 | (substitute* "java/lang/Runtime/exec/ConcurrentRead.java" | |
1337 | (("/usr/bin/tee") (which "tee"))) | |
1338 | (substitute* "java/lang/Runtime/exec/ExecWithDir.java" | |
1339 | (("/bin/true") (which "true"))) | |
1340 | (substitute* "java/lang/Runtime/exec/ExecWithInput.java" | |
1341 | (("/bin/cat") (which "cat"))) | |
1342 | (substitute* "java/lang/Runtime/exec/ExitValue.java" | |
1343 | (("/bin/sh") (which "sh")) | |
1344 | (("/bin/true") (which "true")) | |
1345 | (("/bin/kill") (which "kill"))) | |
1346 | (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java" | |
1347 | (("/usr/bin/echo") (which "echo"))) | |
1348 | (substitute* "java/lang/Runtime/exec/LotsOfOutput.java" | |
1349 | (("/usr/bin/cat") (which "cat"))) | |
1350 | (substitute* "java/lang/Runtime/exec/SleepyCat.java" | |
1351 | (("/bin/cat") (which "cat")) | |
1352 | (("/bin/sleep") (which "sleep")) | |
1353 | (("/bin/sh") (which "sh"))) | |
1354 | (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java" | |
1355 | (("/bin/cat") (which "cat"))) | |
1356 | (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java" | |
1357 | (("/bin/chmod") (which "chmod"))) | |
1358 | (substitute* "java/util/zip/ZipFile/Assortment.java" | |
1359 | (("/bin/sh") (which "sh")))) | |
1360 | #t)) | |
1361 | (replace 'check | |
1362 | (lambda _ | |
1363 | ;; The "make check-*" targets always return zero, so we need to | |
1364 | ;; check for errors in the associated log files to determine | |
1365 | ;; whether any tests have failed. | |
1366 | (use-modules (ice-9 rdelim)) | |
1367 | (let* ((error-pattern (make-regexp "^(Error|FAILED):.*")) | |
1368 | (checker (lambda (port) | |
1369 | (let loop () | |
1370 | (let ((line (read-line port))) | |
1371 | (cond | |
1372 | ((eof-object? line) #t) | |
2c8ac364 MW |
1373 | ((regexp-exec error-pattern line) |
1374 | (error "test failed")) | |
71053e14 RW |
1375 | (else (loop))))))) |
1376 | (run-test (lambda (test) | |
2c8ac364 | 1377 | (invoke "make" test) |
71053e14 RW |
1378 | (call-with-input-file |
1379 | (string-append "test/" test ".log") | |
1380 | checker)))) | |
2c8ac364 MW |
1381 | (when #f ; skip tests |
1382 | (run-test "check-hotspot") | |
1383 | (run-test "check-langtools") | |
fa41a089 MW |
1384 | (run-test "check-jdk")) |
1385 | #t))) | |
71053e14 RW |
1386 | (replace 'install |
1387 | (lambda* (#:key outputs #:allow-other-keys) | |
1388 | (let ((doc (string-append (assoc-ref outputs "doc") | |
1389 | "/share/doc/icedtea")) | |
1390 | (jre (assoc-ref outputs "out")) | |
1391 | (jdk (assoc-ref outputs "jdk"))) | |
1392 | (copy-recursively "openjdk.build/docs" doc) | |
1393 | (copy-recursively "openjdk.build/j2re-image" jre) | |
1394 | (copy-recursively "openjdk.build/j2sdk-image" jdk)) | |
1395 | #t)) | |
491dc2fb RJ |
1396 | ;; Some of the libraries in the lib/amd64 folder link to libjvm.so. |
1397 | ;; But that shared object is located in the server/ folder, so it | |
1398 | ;; cannot be found. This phase creates a symbolic link in the | |
1399 | ;; lib/amd64 folder so that the other libraries can find it. | |
1400 | ;; | |
1401 | ;; See: | |
1402 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html | |
1403 | ;; | |
1404 | ;; FIXME: Find the bug in the build system, so that this symlink is | |
1405 | ;; not needed. | |
1406 | (add-after 'install 'install-libjvm | |
1407 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1408 | (let* ((lib-path (string-append (assoc-ref outputs "out") | |
d3e22bcc LC |
1409 | ;; See 'INSTALL_ARCH_DIR' in |
1410 | ;; 'configure'. | |
1b6f99ea RW |
1411 | ,(match (%current-system) |
1412 | ("i686-linux" | |
048d21a8 | 1413 | "/lib/i386") |
1b6f99ea | 1414 | ("x86_64-linux" |
048d21a8 | 1415 | "/lib/amd64") |
d3e22bcc | 1416 | ("armhf-linux" |
048d21a8 | 1417 | "/lib/arm") |
d3e22bcc | 1418 | ("aarch64-linux" |
048d21a8 | 1419 | "/lib/aarch64"))))) |
491dc2fb RJ |
1420 | (symlink (string-append lib-path "/server/libjvm.so") |
1421 | (string-append lib-path "/libjvm.so"))) | |
1422 | #t)) | |
71053e14 RW |
1423 | ;; By default IcedTea only generates an empty keystore. In order to |
1424 | ;; be able to use certificates in Java programs we need to generate a | |
1425 | ;; keystore from a set of certificates. For convenience we use the | |
1426 | ;; certificates from the nss-certs package. | |
1427 | (add-after 'install 'install-keystore | |
1428 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1429 | (let* ((keystore "cacerts") | |
1430 | (certs-dir (string-append (assoc-ref inputs "nss-certs") | |
1431 | "/etc/ssl/certs")) | |
1432 | (keytool (string-append (assoc-ref outputs "jdk") | |
1433 | "/bin/keytool"))) | |
1434 | (define (extract-cert file target) | |
1435 | (call-with-input-file file | |
1436 | (lambda (in) | |
1437 | (call-with-output-file target | |
1438 | (lambda (out) | |
1439 | (let loop ((line (read-line in 'concat)) | |
1440 | (copying? #f)) | |
1441 | (cond | |
1442 | ((eof-object? line) #t) | |
1443 | ((string-prefix? "-----BEGIN" line) | |
1444 | (display line out) | |
1445 | (loop (read-line in 'concat) #t)) | |
1446 | ((string-prefix? "-----END" line) | |
1447 | (display line out) | |
1448 | #t) | |
1449 | (else | |
1450 | (when copying? (display line out)) | |
1451 | (loop (read-line in 'concat) copying?))))))))) | |
1452 | (define (import-cert cert) | |
1453 | (format #t "Importing certificate ~a\n" (basename cert)) | |
1454 | (let ((temp "tmpcert")) | |
1455 | (extract-cert cert temp) | |
1456 | (let ((port (open-pipe* OPEN_WRITE keytool | |
1457 | "-import" | |
1458 | "-alias" (basename cert) | |
1459 | "-keystore" keystore | |
1460 | "-storepass" "changeit" | |
1461 | "-file" temp))) | |
1462 | (display "yes\n" port) | |
1463 | (when (not (zero? (status:exit-val (close-pipe port)))) | |
1464 | (format #t "failed to import ~a\n" cert))) | |
1465 | (delete-file temp))) | |
1466 | ||
1467 | ;; This is necessary because the certificate directory contains | |
1468 | ;; files with non-ASCII characters in their names. | |
1469 | (setlocale LC_ALL "en_US.utf8") | |
1470 | (setenv "LC_ALL" "en_US.utf8") | |
1471 | ||
1472 | (for-each import-cert (find-files certs-dir "\\.pem$")) | |
1473 | (mkdir-p (string-append (assoc-ref outputs "out") | |
1474 | "/lib/security")) | |
1475 | (mkdir-p (string-append (assoc-ref outputs "jdk") | |
1476 | "/jre/lib/security")) | |
1477 | ||
1478 | ;; The cacerts files we are going to overwrite are chmod'ed as | |
1479 | ;; read-only (444) in icedtea-8 (which derives from this | |
1480 | ;; package). We have to change this so we can overwrite them. | |
1481 | (chmod (string-append (assoc-ref outputs "out") | |
1482 | "/lib/security/" keystore) #o644) | |
1483 | (chmod (string-append (assoc-ref outputs "jdk") | |
1484 | "/jre/lib/security/" keystore) #o644) | |
1485 | ||
1486 | (install-file keystore | |
1487 | (string-append (assoc-ref outputs "out") | |
1488 | "/lib/security")) | |
1489 | (install-file keystore | |
1490 | (string-append (assoc-ref outputs "jdk") | |
1491 | "/jre/lib/security")) | |
1492 | #t)))))) | |
f6789047 | 1493 | (native-inputs |
d9148890 | 1494 | `(("openjdk-src" |
f6789047 | 1495 | ,(drop "openjdk" |
7f6485e7 | 1496 | "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l")) |
f6789047 RW |
1497 | ("corba-drop" |
1498 | ,(drop "corba" | |
7f6485e7 | 1499 | "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz")) |
f6789047 RW |
1500 | ("jaxp-drop" |
1501 | ,(drop "jaxp" | |
7f6485e7 | 1502 | "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl")) |
f6789047 RW |
1503 | ("jaxws-drop" |
1504 | ,(drop "jaxws" | |
7f6485e7 | 1505 | "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk")) |
f6789047 RW |
1506 | ("jdk-drop" |
1507 | ,(drop "jdk" | |
7f6485e7 | 1508 | "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd")) |
f6789047 RW |
1509 | ("langtools-drop" |
1510 | ,(drop "langtools" | |
7f6485e7 | 1511 | "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj")) |
f6789047 | 1512 | ("hotspot-drop" |
db024183 GB |
1513 | ,(origin |
1514 | (method url-fetch) | |
1515 | (uri (string-append | |
1516 | "http://icedtea.classpath.org/downloads/drops" | |
1517 | "/icedtea7/" version "/hotspot.tar.bz2")) | |
1518 | (sha256 | |
1519 | (base32 | |
1520 | "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws")) | |
1521 | (patches (search-patches | |
1522 | "icedtea-7-hotspot-gcc-segfault-workaround.patch")))) | |
e2098e2d | 1523 | ("ant" ,ant-bootstrap) |
71053e14 | 1524 | ("attr" ,attr) |
71053e14 RW |
1525 | ("coreutils" ,coreutils) |
1526 | ("diffutils" ,diffutils) ;for tests | |
1527 | ("gawk" ,gawk) | |
1528 | ("grep" ,grep) | |
1529 | ("libtool" ,libtool) | |
1530 | ("pkg-config" ,pkg-config) | |
1531 | ("wget" ,wget) | |
1532 | ("which" ,which) | |
1533 | ("cpio" ,cpio) | |
1534 | ("zip" ,zip) | |
1535 | ("unzip" ,unzip) | |
1536 | ("fastjar" ,fastjar) | |
1537 | ("libxslt" ,libxslt) ;for xsltproc | |
1538 | ("nss-certs" ,nss-certs) | |
1539 | ("perl" ,perl) | |
1540 | ("procps" ,procps) ;for "free", even though I'm not sure we should use it | |
e2098e2d | 1541 | ("jdk" ,icedtea-6 "jdk"))) |
b711df02 | 1542 | (inputs |
71053e14 RW |
1543 | `(("alsa-lib" ,alsa-lib) |
1544 | ("cups" ,cups) | |
1545 | ("libx11" ,libx11) | |
1546 | ("libxcomposite" ,libxcomposite) | |
1547 | ("libxt" ,libxt) | |
1548 | ("libxtst" ,libxtst) | |
1549 | ("libxi" ,libxi) | |
1550 | ("libxinerama" ,libxinerama) | |
1551 | ("libxrender" ,libxrender) | |
1552 | ("libjpeg" ,libjpeg) | |
1553 | ("libpng" ,libpng) | |
1554 | ("mit-krb5" ,mit-krb5) | |
1555 | ("nss" ,nss) | |
1556 | ("giflib" ,giflib) | |
1557 | ("fontconfig" ,fontconfig) | |
1558 | ("freetype" ,freetype) | |
1559 | ("lcms" ,lcms) | |
1560 | ("zlib" ,zlib) | |
1561 | ("gtk" ,gtk+-2))) | |
1562 | (home-page "http://icedtea.classpath.org") | |
1563 | (synopsis "Java development kit") | |
1564 | (description | |
1565 | "This package provides the Java development kit OpenJDK built with the | |
1566 | IcedTea build harness.") | |
d3e22bcc LC |
1567 | |
1568 | ;; 'configure' lists "mips" and "mipsel", but not "mips64el'. | |
1569 | (supported-systems (delete "mips64el-linux" %supported-systems)) | |
1570 | ||
71053e14 RW |
1571 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the |
1572 | ;; same license as both GNU Classpath and OpenJDK. | |
1573 | (license license:gpl2+)))) | |
d2540f80 | 1574 | |
349a3147 | 1575 | (define-public icedtea-8 |
1d97d8ff | 1576 | (let* ((version "3.7.0") |
349a3147 RW |
1577 | (drop (lambda (name hash) |
1578 | (origin | |
1579 | (method url-fetch) | |
1580 | (uri (string-append | |
db531f73 | 1581 | "http://icedtea.classpath.org/download/drops" |
349a3147 RW |
1582 | "/icedtea8/" version "/" name ".tar.xz")) |
1583 | (sha256 (base32 hash)))))) | |
1584 | (package (inherit icedtea-7) | |
1d97d8ff | 1585 | (version "3.7.0") |
349a3147 RW |
1586 | (source (origin |
1587 | (method url-fetch) | |
1588 | (uri (string-append | |
1589 | "http://icedtea.wildebeest.org/download/source/icedtea-" | |
1590 | version ".tar.xz")) | |
1591 | (sha256 | |
1592 | (base32 | |
1d97d8ff | 1593 | "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w")) |
349a3147 RW |
1594 | (modules '((guix build utils))) |
1595 | (snippet | |
0c729ef4 | 1596 | '(begin |
f2785bd6 RW |
1597 | (substitute* '("configure" |
1598 | "acinclude.m4") | |
0c729ef4 RW |
1599 | ;; Do not embed build time |
1600 | (("(DIST_ID=\"Custom build).*$" _ prefix) | |
1601 | (string-append prefix "\"\n")) | |
1602 | ;; Do not leak information about the build host | |
1603 | (("DIST_NAME=\"\\$build_os\"") | |
1604 | "DIST_NAME=\"guix\"")) | |
1605 | #t)))) | |
349a3147 | 1606 | (arguments |
f2785bd6 RW |
1607 | `(#:imported-modules |
1608 | ((guix build ant-build-system) | |
1609 | (guix build syscalls) | |
1610 | ,@%gnu-build-system-modules) | |
1611 | ,@(substitute-keyword-arguments (package-arguments icedtea-7) | |
1612 | ((#:modules modules) | |
1613 | `((guix build utils) | |
1614 | (guix build gnu-build-system) | |
1615 | ((guix build ant-build-system) #:prefix ant:) | |
1616 | (ice-9 match) | |
1617 | (ice-9 popen) | |
1618 | (srfi srfi-19) | |
1619 | (srfi srfi-26))) | |
1620 | ((#:configure-flags flags) | |
1621 | `(let ((jdk (assoc-ref %build-inputs "jdk"))) | |
1622 | `( ;;"--disable-bootstrap" | |
1623 | "--enable-bootstrap" | |
1624 | "--enable-nss" | |
1625 | "--disable-downloading" | |
1626 | "--disable-system-pcsc" | |
1627 | "--disable-system-sctp" | |
1628 | "--disable-tests" ;they are run in the check phase instead | |
1629 | "--with-openjdk-src-dir=./openjdk.src" | |
1630 | ,(string-append "--with-jdk-home=" jdk)))) | |
1631 | ((#:phases phases) | |
1632 | `(modify-phases ,phases | |
1633 | (delete 'fix-x11-extension-include-path) | |
1634 | (delete 'patch-paths) | |
1635 | (delete 'set-additional-paths) | |
1636 | (delete 'patch-patches) | |
6b7e09ae | 1637 | (delete 'patch-bitrot) |
f2785bd6 RW |
1638 | ;; Prevent the keytool from recording the current time when |
1639 | ;; adding certificates at build time. | |
1640 | (add-after 'unpack 'patch-keystore | |
1641 | (lambda _ | |
1642 | (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java" | |
1643 | (("date = new Date\\(\\);") | |
1644 | "\ | |
1645 | date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\ | |
1646 | new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\ | |
1647 | new Date();")) | |
1648 | #t)) | |
1649 | (add-after 'unpack 'patch-jni-libs | |
1650 | ;; Hardcode dynamically loaded libraries. | |
1651 | (lambda _ | |
1652 | (let* ((library-path (search-path-as-string->list | |
1653 | (getenv "LIBRARY_PATH"))) | |
1654 | (find-library (lambda (name) | |
1655 | (search-path | |
1656 | library-path | |
1657 | (string-append "lib" name ".so"))))) | |
1658 | (for-each | |
1659 | (lambda (file) | |
1660 | (catch 'decoding-error | |
1661 | (lambda () | |
1662 | (substitute* file | |
1663 | (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" | |
1664 | _ name version) | |
1665 | (format #f "\"~a\"" (find-library name))) | |
1666 | (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) | |
1667 | (format #f "\"~a\"" (find-library name))))) | |
1668 | (lambda _ | |
1669 | ;; Those are safe to skip. | |
1670 | (format (current-error-port) | |
1671 | "warning: failed to substitute: ~a~%" | |
1672 | file)))) | |
1673 | (find-files "openjdk.src/jdk/src/solaris/native" | |
1674 | "\\.c|\\.h")) | |
1675 | #t))) | |
1676 | (replace 'install | |
1677 | (lambda* (#:key outputs #:allow-other-keys) | |
1678 | (let ((doc (string-append (assoc-ref outputs "doc") | |
1679 | "/share/doc/icedtea")) | |
1680 | (jre (assoc-ref outputs "out")) | |
1681 | (jdk (assoc-ref outputs "jdk"))) | |
1682 | (copy-recursively "openjdk.build/docs" doc) | |
1683 | (copy-recursively "openjdk.build/images/j2re-image" jre) | |
1684 | (copy-recursively "openjdk.build/images/j2sdk-image" jdk) | |
1685 | ;; Install the nss.cfg file to JRE to enable SSL/TLS | |
1686 | ;; support via NSS. | |
1687 | (copy-file (string-append jdk "/jre/lib/security/nss.cfg") | |
1688 | (string-append jre "/lib/security/nss.cfg")) | |
1689 | #t))) | |
1690 | (add-after 'install 'strip-jar-timestamps | |
1691 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))))) | |
349a3147 RW |
1692 | (native-inputs |
1693 | `(("jdk" ,icedtea-7 "jdk") | |
1694 | ("openjdk-src" | |
1695 | ,(drop "openjdk" | |
1d97d8ff | 1696 | "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p")) |
12eecbf0 LF |
1697 | ("aarch32-drop" |
1698 | ,(drop "aarch32" | |
1d97d8ff | 1699 | "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg")) |
349a3147 RW |
1700 | ("corba-drop" |
1701 | ,(drop "corba" | |
1d97d8ff | 1702 | "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah")) |
349a3147 RW |
1703 | ("jaxp-drop" |
1704 | ,(drop "jaxp" | |
1d97d8ff | 1705 | "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i")) |
349a3147 RW |
1706 | ("jaxws-drop" |
1707 | ,(drop "jaxws" | |
1d97d8ff | 1708 | "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf")) |
349a3147 RW |
1709 | ("jdk-drop" |
1710 | ,(drop "jdk" | |
1d97d8ff | 1711 | "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl")) |
349a3147 RW |
1712 | ("langtools-drop" |
1713 | ,(drop "langtools" | |
1d97d8ff | 1714 | "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw")) |
349a3147 | 1715 | ("hotspot-drop" |
673135df GB |
1716 | ,(origin |
1717 | (method url-fetch) | |
1718 | (uri (string-append | |
1719 | "http://icedtea.classpath.org/download/drops" | |
1720 | "/icedtea8/" version "/hotspot.tar.xz")) | |
1721 | (sha256 | |
1722 | (base32 | |
1723 | "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm")) | |
1724 | (patches (search-patches | |
1725 | "icedtea-7-hotspot-gcc-segfault-workaround.patch")))) | |
349a3147 RW |
1726 | ("nashorn-drop" |
1727 | ,(drop "nashorn" | |
1d97d8ff | 1728 | "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa")) |
fd34d4f4 LF |
1729 | ("shenandoah-drop" |
1730 | ,(drop "shenandoah" | |
1d97d8ff | 1731 | "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy")) |
349a3147 | 1732 | ,@(fold alist-delete (package-native-inputs icedtea-7) |
e2098e2d | 1733 | '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop" |
349a3147 RW |
1734 | "jdk-drop" "langtools-drop" "hotspot-drop"))))))) |
1735 | ||
dd741059 JL |
1736 | (define-public openjdk9 |
1737 | (package | |
1738 | (name "openjdk") | |
1739 | (version "9.181") | |
1740 | (source (origin | |
1741 | (method url-fetch) | |
1742 | (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2") | |
1743 | (file-name (string-append name "-" version ".tar.bz2")) | |
1744 | (sha256 | |
1745 | (base32 | |
1746 | "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq")) | |
1747 | (modules '((guix build utils))) | |
1748 | (snippet | |
1749 | `(begin | |
1750 | (for-each delete-file (find-files "." ".*.bin$")) | |
1751 | (for-each delete-file (find-files "." ".*.exe$")) | |
1752 | (for-each delete-file (find-files "." ".*.jar$")) | |
1753 | #t)))) | |
1754 | (build-system gnu-build-system) | |
1755 | (outputs '("out" "jdk" "doc")) | |
1756 | (arguments | |
1757 | `(#:tests? #f; require jtreg | |
1758 | #:imported-modules | |
1759 | ((guix build syscalls) | |
1760 | ,@%gnu-build-system-modules) | |
1761 | #:phases | |
1762 | (modify-phases %standard-phases | |
1763 | (add-after 'patch-source-shebangs 'fix-java-shebangs | |
1764 | (lambda _ | |
1765 | ;; This file was "fixed" by patch-source-shebangs, but it requires | |
1766 | ;; this exact first line. | |
1767 | (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem" | |
1768 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) | |
1769 | #t)) | |
1770 | (replace 'configure | |
1771 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1772 | ;; TODO: unbundle libpng and lcms | |
1773 | (invoke "bash" "./configure" | |
1774 | (string-append "--with-freetype=" (assoc-ref inputs "freetype")) | |
1775 | "--disable-freetype-bundling" | |
1776 | "--disable-warnings-as-errors" | |
1777 | "--disable-hotspot-gtest" | |
1778 | "--with-giflib=system" | |
1779 | "--with-libjpeg=system" | |
1780 | (string-append "--prefix=" (assoc-ref outputs "out"))) | |
1781 | #t)) | |
1782 | (replace 'build | |
1783 | (lambda _ | |
1784 | (with-output-to-file ".src-rev" | |
1785 | (lambda _ | |
1786 | (display ,version))) | |
1787 | (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes") | |
1788 | (invoke "make" "all") | |
1789 | #t)) | |
1790 | ;; Some of the libraries in the lib/ folder link to libjvm.so. | |
1791 | ;; But that shared object is located in the server/ folder, so it | |
1792 | ;; cannot be found. This phase creates a symbolic link in the | |
1793 | ;; lib/ folder so that the other libraries can find it. | |
1794 | ;; | |
1795 | ;; See: | |
1796 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html | |
1797 | ;; | |
1798 | ;; FIXME: Find the bug in the build system, so that this symlink is | |
1799 | ;; not needed. | |
1800 | (add-after 'install 'install-libjvm | |
1801 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1802 | (let* ((lib-out (string-append (assoc-ref outputs "out") | |
1803 | "/lib")) | |
1804 | (lib-jdk (string-append (assoc-ref outputs "jdk") | |
1805 | "/lib"))) | |
1806 | (symlink (string-append lib-jdk "/server/libjvm.so") | |
1807 | (string-append lib-jdk "/libjvm.so")) | |
1808 | (symlink (string-append lib-out "/server/libjvm.so") | |
1809 | (string-append lib-out "/libjvm.so"))) | |
1810 | #t)) | |
1811 | (replace 'install | |
1812 | (lambda* (#:key outputs #:allow-other-keys) | |
1813 | (let ((out (assoc-ref outputs "out")) | |
1814 | (jdk (assoc-ref outputs "jdk")) | |
1815 | (doc (assoc-ref outputs "doc")) | |
1816 | (images (car (find-files "build" ".*-server-release" | |
1817 | #:directories? #t)))) | |
1818 | (copy-recursively (string-append images "/images/jdk") jdk) | |
1819 | (copy-recursively (string-append images "/images/jre") out) | |
1820 | (copy-recursively (string-append images "/images/docs") doc)) | |
1821 | #t)) | |
1822 | (add-after 'install 'strip-zip-timestamps | |
1823 | (lambda* (#:key outputs #:allow-other-keys) | |
1824 | (use-modules (guix build syscalls)) | |
1825 | (for-each (lambda (zip) | |
1826 | (let ((dir (mkdtemp! "zip-contents.XXXXXX"))) | |
1827 | (with-directory-excursion dir | |
1828 | (invoke "unzip" zip)) | |
1829 | (delete-file zip) | |
1830 | (for-each (lambda (file) | |
1831 | (let ((s (lstat file))) | |
1832 | (unless (eq? (stat:type s) 'symlink) | |
1833 | (format #t "reset ~a~%" file) | |
1834 | (utime file 0 0 0 0)))) | |
1835 | (find-files dir #:directories? #t)) | |
1836 | (with-directory-excursion dir | |
1837 | (let ((files (find-files "." ".*" #:directories? #t))) | |
1838 | (apply invoke "zip" "-0" "-X" zip files))))) | |
1839 | (find-files (assoc-ref outputs "doc") ".*.zip$")) | |
1840 | #t))))) | |
1841 | (inputs | |
1842 | `(("alsa-lib" ,alsa-lib) | |
1843 | ("cups" ,cups) | |
1844 | ("fontconfig" ,fontconfig) | |
1845 | ("freetype" ,freetype) | |
1846 | ("giflib" ,giflib) | |
1847 | ("lcms" ,lcms) | |
1848 | ("libelf" ,libelf) | |
1849 | ("libjpeg" ,libjpeg) | |
1850 | ("libice" ,libice) | |
1851 | ("libpng" ,libpng) | |
1852 | ("libx11" ,libx11) | |
1853 | ("libxcomposite" ,libxcomposite) | |
1854 | ("libxi" ,libxi) | |
1855 | ("libxinerama" ,libxinerama) | |
1856 | ("libxrender" ,libxrender) | |
1857 | ("libxt" ,libxt) | |
1858 | ("libxtst" ,libxtst))) | |
1859 | (native-inputs | |
1860 | `(("icedtea-8" ,icedtea-8) | |
1861 | ("icedtea-8:jdk" ,icedtea-8 "jdk") | |
1862 | ("unzip" ,unzip) | |
1863 | ("which" ,which) | |
1864 | ("zip" ,zip))) | |
1865 | (home-page "https://openjdk.java.net/projects/jdk9/") | |
1866 | (synopsis "Java development kit") | |
1867 | (description | |
1868 | "This package provides the Java development kit OpenJDK.") | |
1869 | (license license:gpl2+))) | |
1870 | ||
16b89ecc JL |
1871 | (define-public openjdk10 |
1872 | (package | |
1873 | (inherit openjdk9) | |
1874 | (name "openjdk") | |
1875 | (version "10.46") | |
1876 | (source (origin | |
1877 | (method url-fetch) | |
1878 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2") | |
1879 | (file-name (string-append name "-" version ".tar.bz2")) | |
1880 | (sha256 | |
1881 | (base32 | |
1882 | "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4")) | |
accb5c31 GB |
1883 | (patches (search-patches |
1884 | "openjdk-10-idlj-reproducibility.patch")) | |
16b89ecc JL |
1885 | (modules '((guix build utils))) |
1886 | (snippet | |
1887 | `(begin | |
1888 | (for-each delete-file (find-files "." ".*.bin$")) | |
1889 | (for-each delete-file (find-files "." ".*.exe$")) | |
1890 | (for-each delete-file (find-files "." ".*.jar$")) | |
1891 | #t)))) | |
1892 | (arguments | |
1893 | (substitute-keyword-arguments (package-arguments openjdk9) | |
1894 | ((#:phases phases) | |
1895 | `(modify-phases ,phases | |
1896 | (replace 'fix-java-shebangs | |
1897 | (lambda _ | |
1898 | ;; This file was "fixed" by patch-source-shebangs, but it requires | |
1899 | ;; this exact first line. | |
1900 | (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem" | |
1901 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) | |
1902 | #t)) | |
1903 | (replace 'configure | |
1904 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1905 | (invoke "bash" "./configure" | |
1906 | (string-append "--with-freetype=" (assoc-ref inputs "freetype")) | |
1907 | "--disable-freetype-bundling" | |
1908 | "--disable-warnings-as-errors" | |
1909 | "--disable-hotspot-gtest" | |
1910 | "--with-giflib=system" | |
1911 | "--with-libjpeg=system" | |
1912 | "--with-native-debug-symbols=zipped" | |
1913 | (string-append "--prefix=" (assoc-ref outputs "out"))) | |
1914 | #t)))))) | |
1915 | (native-inputs | |
1916 | `(("openjdk9" ,openjdk9) | |
1917 | ("openjdk9:jdk" ,openjdk9 "jdk") | |
1918 | ("unzip" ,unzip) | |
1919 | ("which" ,which) | |
1920 | ("zip" ,zip))))) | |
1921 | ||
95bc85b7 GB |
1922 | (define-public openjdk11 |
1923 | (package | |
1924 | (name "openjdk") | |
1925 | (version "11.28") | |
1926 | (source (origin | |
1927 | (method url-fetch) | |
1928 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2") | |
1929 | (file-name (string-append name "-" version ".tar.bz2")) | |
1930 | (sha256 | |
1931 | (base32 | |
1932 | "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w")) | |
1933 | (modules '((guix build utils))) | |
1934 | (snippet | |
1935 | `(begin | |
1936 | (for-each delete-file (find-files "." ".*.bin$")) | |
1937 | (for-each delete-file (find-files "." ".*.exe$")) | |
1938 | (for-each delete-file (find-files "." ".*.jar$")) | |
1939 | #t)))) | |
1940 | (build-system gnu-build-system) | |
1941 | (outputs '("out" "jdk" "doc")) | |
1942 | (arguments | |
1943 | `(#:imported-modules | |
1944 | ((guix build syscalls) | |
1945 | (ice-9 binary-ports) | |
1946 | (rnrs bytevectors) | |
1947 | ,@%gnu-build-system-modules) | |
1948 | #:tests? #f; requires jtreg | |
1949 | ;; TODO package jtreg | |
1950 | ;; disable parallel builds, as the openjdk build system does not like -j | |
1951 | #:parallel-build? #f | |
1952 | #:parallel-tests? #f | |
1953 | ;; reenable parallel builds and tests by adding the flags manually | |
1954 | #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count)))) | |
1955 | #:configure-flags | |
1956 | `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise | |
1957 | "--disable-warnings-as-errors" | |
1958 | ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894 | |
1959 | "--with-native-debug-symbols=zipped" | |
1960 | ;; do not use the bundled libraries | |
1961 | "--with-giflib=system" | |
1962 | "--with-lcms=system" | |
1963 | "--with-libjpeg=system" | |
1964 | "--with-libpng=system" | |
70d23edf | 1965 | "--with-version-pre=" |
95bc85b7 GB |
1966 | ;; allow the build system to locate the system freetype |
1967 | ,(string-append "--with-freetype-include=" | |
1968 | (assoc-ref %build-inputs "freetype") "/include") | |
1969 | ,(string-append "--with-freetype-lib=" | |
1970 | (assoc-ref %build-inputs "freetype") "/lib")) | |
1971 | ;; TODO | |
1972 | #:phases | |
1973 | (modify-phases %standard-phases | |
1974 | (add-after 'patch-source-shebangs 'fix-java-shebangs | |
1975 | (lambda _ | |
1976 | ;; This file was "fixed" by patch-source-shebangs, but it requires | |
1977 | ;; this exact first line. | |
1978 | (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem" | |
1979 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) | |
1980 | #t)) | |
1981 | (replace 'build | |
1982 | (lambda _ | |
1983 | (with-output-to-file ".src-rev" | |
1984 | (lambda _ | |
1985 | (display ,version))) | |
1986 | (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes") | |
1987 | (invoke "make" "all") | |
1988 | #t)) | |
1989 | ;; jdk 11 does not build jre by default any more | |
1990 | ;; building it anyways | |
1991 | ;; for further information see: | |
1992 | ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356 | |
1993 | (add-after 'build 'build-jre | |
1994 | (lambda _ | |
1995 | (invoke "make" "legacy-jre-image") | |
1996 | #t)) | |
1997 | (replace 'install | |
1998 | (lambda* (#:key outputs #:allow-other-keys) | |
1999 | (let ((out (assoc-ref outputs "out")) | |
2000 | (jdk (assoc-ref outputs "jdk")) | |
2001 | (doc (assoc-ref outputs "doc")) | |
2002 | (images (car (find-files "build" ".*-server-release" | |
2003 | #:directories? #t)))) | |
2004 | (copy-recursively (string-append images "/images/jdk") jdk) | |
2005 | (copy-recursively (string-append images "/images/jre") out) | |
2006 | (copy-recursively (string-append images "/images/docs") doc)) | |
2007 | #t)) | |
2008 | ;; Some of the libraries in the lib/ folder link to libjvm.so. | |
2009 | ;; But that shared object is located in the server/ folder, so it | |
2010 | ;; cannot be found. This phase creates a symbolic link in the | |
2011 | ;; lib/ folder so that the other libraries can find it. | |
2012 | ;; | |
2013 | ;; See: | |
2014 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html | |
2015 | ;; | |
2016 | ;; FIXME: Find the bug in the build system, so that this symlink is | |
2017 | ;; not needed. | |
2018 | (add-after 'install 'install-libjvm | |
2019 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2020 | (let* ((lib-out (string-append (assoc-ref outputs "out") | |
2021 | "/lib")) | |
2022 | (lib-jdk (string-append (assoc-ref outputs "jdk") | |
2023 | "/lib"))) | |
2024 | (symlink (string-append lib-jdk "/server/libjvm.so") | |
2025 | (string-append lib-jdk "/libjvm.so")) | |
2026 | (symlink (string-append lib-out "/server/libjvm.so") | |
2027 | (string-append lib-out "/libjvm.so"))) | |
2028 | #t)) | |
2029 | (add-after 'install 'strip-character-data-timestamps | |
2030 | (lambda* (#:key outputs #:allow-other-keys) | |
2031 | (use-modules (guix build syscalls)) | |
2032 | (let ((archive (string-append | |
2033 | (assoc-ref outputs "jdk") "/lib/src.zip")) | |
2034 | (dir (mkdtemp! "zip-contents.XXXXXX"))) | |
2035 | (with-directory-excursion dir | |
2036 | (invoke "unzip" archive)) | |
2037 | (delete-file archive) | |
2038 | (with-directory-excursion dir | |
2039 | (let ((char-data-files (find-files "." "CharacterData.*"))) | |
2040 | (for-each (lambda (file) | |
2041 | (substitute* file | |
2042 | (((string-append "This file was generated " | |
2043 | "AUTOMATICALLY from a template " | |
2044 | "file.*")) | |
2045 | (string-append "This file was generated " | |
2046 | "AUTOMATICALLY from a template " | |
2047 | "file")))) | |
2048 | char-data-files))) | |
2049 | (with-directory-excursion dir | |
2050 | (let ((files (find-files "." ".*" #:directories? #t))) | |
2051 | (apply invoke "zip" "-0" "-X" archive files)))))) | |
2052 | (add-after 'strip-character-data-timestamps 'strip-archive-timestamps | |
2053 | (lambda* (#:key outputs #:allow-other-keys) | |
2054 | (use-modules (guix build syscalls) | |
2055 | (ice-9 binary-ports) | |
2056 | (rnrs bytevectors)) | |
2057 | (letrec ((repack-archive | |
2058 | (lambda (archive) | |
2059 | (let ((dir (mkdtemp! "zip-contents.XXXXXX"))) | |
2060 | (with-directory-excursion dir | |
2061 | (invoke "unzip" archive)) | |
2062 | (delete-file archive) | |
2063 | (for-each (compose repack-archive canonicalize-path) | |
2064 | (find-files dir "(ct.sym|.*.jar)$")) | |
2065 | (let ((reset-file-timestamp | |
2066 | (lambda (file) | |
2067 | (let ((s (lstat file))) | |
2068 | (unless (eq? (stat:type s) 'symlink) | |
2069 | (format #t "reset ~a~%" file) | |
2070 | (utime file 0 0 0 0)))))) | |
2071 | (for-each reset-file-timestamp | |
2072 | (find-files dir #:directories? #t))) | |
2073 | (with-directory-excursion dir | |
2074 | (let ((files (find-files "." ".*" #:directories? #t))) | |
2075 | (apply invoke "zip" "-0" "-X" archive files))))))) | |
2076 | (for-each repack-archive | |
2077 | (find-files (assoc-ref outputs "doc") ".*.zip$")) | |
2078 | (for-each repack-archive | |
2079 | (find-files (assoc-ref outputs "jdk") | |
2080 | ".*.(zip|jar|diz)$")) | |
2081 | (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym")) | |
2082 | (let ((repack-jmod | |
2083 | (lambda (file-name) | |
2084 | (call-with-input-file file-name | |
2085 | (lambda (file) | |
2086 | (let ((header #vu8(#x4a #x4d #x01 #x00))) | |
2087 | (if (equal? (get-bytevector-n | |
2088 | file (bytevector-length header)) | |
2089 | header) | |
2090 | (let* ((header-length (bytevector-length header)) | |
2091 | (temp-file (mkstemp! | |
2092 | (string-copy | |
2093 | "temp-file.XXXXXX"))) | |
2094 | (temp-filename (port-filename temp-file)) | |
2095 | (content-length | |
2096 | (- (stat:size (stat file)) | |
2097 | header-length))) | |
2098 | (sendfile temp-file file content-length header-length) | |
2099 | (delete-file file-name) | |
2100 | (close-port temp-file) | |
2101 | (repack-archive (canonicalize-path temp-filename)) | |
2102 | (call-with-output-file file-name | |
2103 | (lambda (file) | |
2104 | (put-bytevector file header) | |
2105 | (call-with-input-file temp-filename | |
2106 | (lambda (temp-file) | |
2107 | (sendfile | |
2108 | file temp-file | |
2109 | (stat:size (stat temp-file)) 0))))))))))))) | |
2110 | (for-each repack-jmod | |
2111 | (find-files (assoc-ref outputs "jdk") ".*.jmod$"))) | |
2112 | #t))) | |
2113 | (add-after 'install 'remove-timestamp-from-api-summary | |
2114 | (lambda* (#:key outputs #:allow-other-keys) | |
2115 | (substitute* (string-append (assoc-ref outputs "doc") | |
2116 | "/api/overview-summary.html") | |
2117 | (("Generated by javadoc \\(11-internal\\).*$") | |
2118 | "Generated by javadoc (11-internal) -->\n")) | |
2119 | #t))))) | |
2120 | (inputs | |
2121 | `(("alsa-lib" ,alsa-lib) | |
2122 | ("cups" ,cups) | |
2123 | ("fontconfig" ,fontconfig) | |
2124 | ("freetype" ,freetype) | |
2125 | ("giflib" ,giflib) | |
2126 | ("lcms" ,lcms) | |
2127 | ("libjpeg" ,libjpeg) | |
2128 | ("libpng" ,libpng) | |
2129 | ("libx11" ,libx11) | |
2130 | ("libxext" ,libxext) | |
2131 | ("libxrender" ,libxrender) | |
2132 | ("libxt" ,libxt) | |
2133 | ("libxtst" ,libxtst))) | |
2134 | (native-inputs | |
2135 | `(("autoconf" ,autoconf) | |
2136 | ("openjdk10" ,openjdk10) | |
2137 | ("openjdk10:jdk" ,openjdk10 "jdk") | |
2138 | ("pkg-config" ,pkg-config) | |
2139 | ("unzip" ,unzip) | |
2140 | ("which" ,which) | |
2141 | ("zip" ,zip))) | |
2142 | (home-page "https://openjdk.java.net/projects/jdk/11/") | |
2143 | (synopsis "Java development kit") | |
2144 | (description | |
2145 | "This package provides the Java development kit OpenJDK.") | |
2146 | (license license:gpl2+))) | |
2147 | ||
64dc8e9e GB |
2148 | (define-public openjdk12 |
2149 | (package | |
2150 | (inherit openjdk11) | |
2151 | (name "openjdk") | |
2152 | (version "12.33") | |
2153 | (source (origin | |
2154 | (method url-fetch) | |
2155 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2") | |
2156 | (file-name (string-append name "-" version ".tar.bz2")) | |
2157 | (sha256 | |
2158 | (base32 | |
2159 | "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2")) | |
2160 | (modules '((guix build utils))) | |
2161 | (snippet | |
2162 | `(begin | |
2163 | (for-each delete-file (find-files "." ".*.bin$")) | |
2164 | (for-each delete-file (find-files "." ".*.exe$")) | |
2165 | (for-each delete-file (find-files "." ".*.jar$")) | |
2166 | #t)))) | |
2167 | (inputs | |
2168 | `(("alsa-lib" ,alsa-lib) | |
2169 | ("cups" ,cups) | |
2170 | ("fontconfig" ,fontconfig) | |
2171 | ("freetype" ,freetype) | |
2172 | ("giflib" ,giflib) | |
2173 | ("lcms" ,lcms) | |
2174 | ("libjpeg" ,libjpeg) | |
2175 | ("libpng" ,libpng) | |
2176 | ("libx11" ,libx11) | |
2177 | ("libxext" ,libxext) | |
2178 | ("libxrandr" ,libxrandr) | |
2179 | ("libxrender" ,libxrender) | |
2180 | ("libxt" ,libxt) | |
2181 | ("libxtst" ,libxtst))) | |
2182 | (native-inputs | |
2183 | `(("autoconf" ,autoconf) | |
2184 | ("openjdk11" ,openjdk11) | |
2185 | ("openjdk11:jdk" ,openjdk11 "jdk") | |
2186 | ("pkg-config" ,pkg-config) | |
2187 | ("unzip" ,unzip) | |
2188 | ("which" ,which) | |
2189 | ("zip" ,zip))) | |
2190 | (home-page "https://openjdk.java.net/projects/jdk/12"))) | |
2191 | ||
33aa65e0 | 2192 | (define-public icedtea icedtea-8) |
068e476f | 2193 | |
5490480c | 2194 | \f |
8bbd0408 RW |
2195 | (define-public ant/java8 |
2196 | (package (inherit ant-bootstrap) | |
2197 | (name "ant") | |
2198 | (version "1.10.1") | |
2199 | (source (origin | |
2200 | (method url-fetch) | |
2201 | (uri (string-append "mirror://apache/ant/source/apache-ant-" | |
2202 | version "-src.tar.gz")) | |
2203 | (sha256 | |
2204 | (base32 | |
2205 | "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8")) | |
2206 | (modules '((guix build utils))) | |
2207 | (snippet | |
2208 | '(begin | |
2209 | (for-each delete-file | |
2210 | (find-files "lib/optional" "\\.jar$")) | |
2211 | #t)))) | |
2212 | (arguments | |
2213 | (substitute-keyword-arguments (package-arguments ant-bootstrap) | |
2214 | ((#:phases phases) | |
2215 | `(modify-phases ,phases | |
2216 | (add-after 'unpack 'remove-scripts | |
2217 | ;; Remove bat / cmd scripts for DOS as well as the antRun and runant | |
2218 | ;; wrappers. | |
2219 | (lambda _ | |
2220 | (for-each delete-file | |
2221 | (find-files "src/script" | |
2222 | "(.*\\.(bat|cmd)|runant.*|antRun.*)")) | |
2223 | #t)) | |
2224 | (replace 'build | |
2225 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2226 | (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) | |
2227 | ||
2228 | ;; Disable tests to avoid dependency on hamcrest-core, which needs | |
2229 | ;; Ant to build. This is necessary in addition to disabling the | |
2230 | ;; "check" phase, because the dependency on "test-jar" would always | |
2231 | ;; result in the tests to be run. | |
2232 | (substitute* "build.xml" | |
2233 | (("depends=\"jars,test-jar\"") "depends=\"jars\"")) | |
2c8ac364 MW |
2234 | (invoke "bash" "bootstrap.sh" |
2235 | (string-append "-Ddist.dir=" | |
2236 | (assoc-ref outputs "out"))))))))) | |
8bbd0408 | 2237 | (native-inputs |
1c7ef07e GB |
2238 | `(("jdk" ,icedtea-8 "jdk") |
2239 | ("zip" ,zip) | |
2240 | ("unzip" ,unzip))))) | |
8bbd0408 | 2241 | |
e441fc56 RW |
2242 | ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series |
2243 | ;; requires Java 8. | |
2244 | (define-public ant | |
2245 | (package (inherit ant/java8) | |
2246 | (version "1.9.9") | |
2247 | (source (origin | |
2248 | (method url-fetch) | |
2249 | (uri (string-append "mirror://apache/ant/source/apache-ant-" | |
2250 | version "-src.tar.gz")) | |
2251 | (sha256 | |
2252 | (base32 | |
2253 | "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n")))) | |
2254 | (native-inputs | |
3b6ba18b GB |
2255 | `(("jdk" ,icedtea-7 "jdk") |
2256 | ("zip" ,zip) | |
2257 | ("unzip" ,unzip))))) | |
e441fc56 | 2258 | |
9ce7ac99 RW |
2259 | (define-public ant-apache-bcel |
2260 | (package | |
2261 | (inherit ant/java8) | |
2262 | (name "ant-apache-bcel") | |
2263 | (arguments | |
2264 | (substitute-keyword-arguments (package-arguments ant/java8) | |
2265 | ((#:phases phases) | |
2266 | `(modify-phases ,phases | |
2267 | (add-after 'unpack 'link-bcel | |
2268 | (lambda* (#:key inputs #:allow-other-keys) | |
2269 | (for-each (lambda (file) | |
2270 | (symlink file | |
2271 | (string-append "lib/optional/" | |
2272 | (basename file)))) | |
2273 | (find-files (assoc-ref inputs "java-commons-bcel") | |
2274 | "\\.jar$")) | |
2275 | #t)) | |
2276 | (add-after 'build 'install | |
2277 | (lambda* (#:key outputs #:allow-other-keys) | |
2278 | (let* ((out (assoc-ref outputs "out")) | |
2279 | (share (string-append out "/share/java")) | |
2280 | (bin (string-append out "/bin")) | |
2281 | (lib (string-append out "/lib"))) | |
2282 | (mkdir-p share) | |
2283 | (install-file (string-append lib "/ant-apache-bcel.jar") share) | |
2284 | (delete-file-recursively bin) | |
2285 | (delete-file-recursively lib) | |
2286 | #t))))))) | |
2287 | (inputs | |
2288 | `(("java-commons-bcel" ,java-commons-bcel) | |
2289 | ,@(package-inputs ant/java8))))) | |
2290 | ||
fa6c4213 RW |
2291 | (define-public ant-junit |
2292 | (package | |
2293 | (inherit ant/java8) | |
2294 | (name "ant-junit") | |
2295 | (arguments | |
2296 | (substitute-keyword-arguments (package-arguments ant/java8) | |
2297 | ((#:phases phases) | |
2298 | `(modify-phases ,phases | |
2299 | (add-after 'unpack 'link-junit | |
2300 | (lambda* (#:key inputs #:allow-other-keys) | |
2301 | (for-each (lambda (file) | |
2302 | (symlink file | |
2303 | (string-append "lib/optional/" | |
2304 | (basename file)))) | |
2305 | (find-files (assoc-ref inputs "java-junit") | |
2306 | "\\.jar$")) | |
2307 | #t)) | |
2308 | (add-after 'build 'install | |
2309 | (lambda* (#:key outputs #:allow-other-keys) | |
2310 | (let* ((out (assoc-ref outputs "out")) | |
2311 | (share (string-append out "/share/java")) | |
2312 | (bin (string-append out "/bin")) | |
2313 | (lib (string-append out "/lib"))) | |
2314 | (mkdir-p share) | |
2315 | (install-file (string-append lib "/ant-junit.jar") share) | |
2316 | (delete-file-recursively bin) | |
2317 | (delete-file-recursively lib) | |
2318 | #t))))))) | |
2319 | (inputs | |
2320 | `(("java-junit" ,java-junit) | |
2321 | ,@(package-inputs ant/java8))))) | |
2322 | ||
53fb0476 | 2323 | (define-public javacc-4 |
fc8d100b RW |
2324 | (package |
2325 | (name "javacc") | |
53fb0476 | 2326 | (version "4.1") |
fc8d100b | 2327 | (source (origin |
53fb0476 AV |
2328 | (method git-fetch) |
2329 | (uri (git-reference | |
2330 | (url "https://github.com/javacc/javacc.git") | |
2331 | (commit "release_41"))) | |
2332 | (file-name (string-append "javacc-" version "-checkout")) | |
fc8d100b RW |
2333 | (sha256 |
2334 | (base32 | |
6662d65f AV |
2335 | "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0")) |
2336 | (modules '((guix build utils))) | |
2337 | ;; delete bundled jars | |
2338 | (snippet '(begin (delete-file-recursively "lib") #t)))) | |
fc8d100b | 2339 | (build-system ant-build-system) |
53fb0476 AV |
2340 | ;; Tests fail with |
2341 | ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60: | |
2342 | ;; JAVACODE failed | |
fc8d100b | 2343 | (arguments |
53fb0476 | 2344 | `(#:tests? #f |
fc8d100b RW |
2345 | #:phases |
2346 | (modify-phases %standard-phases | |
6662d65f AV |
2347 | ;; Delete tests to avoid build failure (we don't run them anyway). |
2348 | (add-after 'unpack 'delete-tests | |
fc8d100b | 2349 | (lambda _ |
6662d65f AV |
2350 | (for-each delete-file |
2351 | '("src/org/javacc/JavaCCTestCase.java" | |
2352 | "src/org/javacc/parser/ExpansionTest.java" | |
2353 | "src/org/javacc/parser/OptionsTest.java" | |
2354 | "src/org/javacc/jjtree/JJTreeOptionsTest.java")) | |
2355 | (for-each delete-file-recursively | |
2356 | '("src/org/javacc/parser/test" | |
2357 | "src/org/javacc/jjdoc/test")) | |
2358 | #t)) | |
53fb0476 | 2359 | (replace 'install (install-jars "bin/lib"))))) |
fc8d100b RW |
2360 | (home-page "https://javacc.org/") |
2361 | (synopsis "Java parser generator") | |
2362 | (description "Java Compiler Compiler (JavaCC) is the most popular parser | |
2363 | generator for use with Java applications. A parser generator is a tool that | |
2364 | reads a grammar specification and converts it to a Java program that can | |
2365 | recognize matches to the grammar. In addition to the parser generator itself, | |
2366 | JavaCC provides other standard capabilities related to parser generation such | |
2367 | as tree building (via a tool called JJTree included with JavaCC), actions, | |
2368 | debugging, etc.") | |
2369 | (license license:bsd-3))) | |
2370 | ||
53fb0476 AV |
2371 | (define-public javacc |
2372 | (package | |
2373 | (inherit javacc-4) | |
6b66e470 | 2374 | (version "7.0.4") |
ebf8048d TGR |
2375 | (source |
2376 | (origin | |
2377 | (method git-fetch) | |
2378 | (uri (git-reference | |
2379 | (url "https://github.com/javacc/javacc.git") | |
2380 | (commit version))) | |
2381 | (file-name (git-file-name "javacc" version)) | |
2382 | (sha256 | |
2383 | (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i")) | |
2384 | (modules '((guix build utils))) | |
2385 | ;; Delete bundled jars. | |
2386 | (snippet '(begin (for-each delete-file-recursively | |
2387 | '("bootstrap" "lib")) | |
2388 | #t)))) | |
6688c41e | 2389 | (arguments |
6b66e470 | 2390 | `(#:make-flags ; bootstrap from javacc-4 |
33428d12 AV |
2391 | (list (string-append "-Dbootstrap-jar=" |
2392 | (assoc-ref %build-inputs "javacc") | |
2393 | "/share/java/javacc.jar")) | |
2394 | #:test-target "test" | |
6688c41e RW |
2395 | #:phases |
2396 | (modify-phases %standard-phases | |
33428d12 AV |
2397 | (replace 'install (install-jars "target"))))) |
2398 | (native-inputs | |
2399 | `(("javacc" ,javacc-4))))) | |
6688c41e | 2400 | |
c1cb8576 RW |
2401 | ;; This is the last 3.x release of ECJ |
2402 | (define-public java-ecj-3 | |
2403 | (package | |
2404 | (name "java-ecj") | |
2405 | (version "3.8.2") | |
2406 | (source (origin | |
2407 | (method url-fetch) | |
2408 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
2409 | "downloads/drops/R-" version | |
2410 | "-201301310800/ecjsrc-" version ".jar")) | |
2411 | (sha256 | |
2412 | (base32 | |
2413 | "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04")))) | |
2414 | (build-system ant-build-system) | |
2415 | (arguments | |
2416 | `(#:tests? #f ; none included | |
2417 | #:jdk ,icedtea-7 ; doesn't build with JDK8+ | |
2418 | #:make-flags (list "-f" "src/build.xml") | |
2419 | #:build-target "build" | |
2420 | #:phases | |
2421 | (modify-phases %standard-phases | |
2422 | (add-after 'unpack 'fix-manifest | |
2423 | (lambda _ | |
2424 | ;; Record the main class to make ecj executable. | |
2425 | (with-atomic-file-replacement "src/META-INF/MANIFEST.MF" | |
2426 | (lambda (in out) | |
2427 | (display "Manifest-Version: 1.0 | |
2428 | Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" | |
2c8ac364 MW |
2429 | out))) |
2430 | #t)) | |
c1cb8576 RW |
2431 | (replace 'install (install-jars "."))))) |
2432 | (home-page "https://eclipse.org") | |
2433 | (synopsis "Eclipse Java development tools core batch compiler") | |
2434 | (description "This package provides the Eclipse Java core batch compiler.") | |
2435 | (license license:epl1.0))) | |
2436 | ||
f201b18e RW |
2437 | ;; This is needed for java-cisd-args4j |
2438 | (define-public java-ecj-3.5 | |
2439 | (package (inherit java-ecj-3) | |
2440 | (version "3.5.1") | |
2441 | (source (origin | |
2442 | (method url-fetch/zipbomb) | |
2443 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
2444 | "downloads/drops/R-" version | |
2445 | "-200909170800/ecjsrc-" version ".zip")) | |
2446 | (sha256 | |
2447 | (base32 | |
2448 | "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7")))) | |
2449 | (build-system ant-build-system) | |
2450 | (arguments | |
2451 | `(#:tests? #f ; none included | |
2452 | #:jdk ,icedtea-7 ; doesn't build with JDK8+ | |
2453 | #:build-target "build" | |
2454 | #:phases | |
2455 | (modify-phases %standard-phases | |
2456 | (add-after 'unpack 'fix-manifest | |
2457 | (lambda _ | |
2458 | ;; Record the main class to make ecj executable. | |
2459 | (with-atomic-file-replacement "META-INF/MANIFEST.MF" | |
2460 | (lambda (in out) | |
2461 | (dump-port in out) | |
2462 | (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" | |
2c8ac364 MW |
2463 | out))) |
2464 | #t)) | |
f201b18e RW |
2465 | (replace 'install (install-jars "."))))) |
2466 | (native-inputs | |
2467 | `(("unzip" ,unzip))))) | |
2468 | ||
30d55473 RW |
2469 | (define-public java-cisd-base |
2470 | (let ((revision 38938) | |
2471 | (base-version "14.12.0")) | |
2472 | (package | |
2473 | (name "java-cisd-base") | |
2474 | (version (string-append base-version "-" (number->string revision))) | |
2475 | (source (origin | |
2476 | (method svn-fetch) | |
2477 | (uri (svn-reference | |
2478 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2479 | "base/tags/release/" | |
2480 | (version-major+minor base-version) | |
2481 | ".x/" base-version "/base/")) | |
2482 | (revision revision))) | |
2483 | (file-name (string-append "java-cisd-base-" version "-checkout")) | |
2484 | (sha256 | |
2485 | (base32 | |
2486 | "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy")) | |
2487 | (modules '((guix build utils))) | |
2488 | (snippet | |
2489 | '(begin | |
2490 | ;; Delete included gradle jar | |
2491 | (delete-file-recursively "gradle/wrapper") | |
2492 | ;; Delete pre-built native libraries | |
2493 | (delete-file-recursively "libs") | |
2494 | #t)))) | |
2495 | (build-system ant-build-system) | |
2496 | (arguments | |
2497 | `(#:make-flags '("-file" "build/build.xml") | |
2498 | #:test-target "jar-test" | |
2499 | #:jdk ,icedtea-8 | |
2500 | #:phases | |
2501 | (modify-phases %standard-phases | |
2502 | (add-after 'unpack 'unpack-build-resources | |
2503 | (lambda* (#:key inputs #:allow-other-keys) | |
2504 | (copy-recursively (assoc-ref inputs "build-resources") | |
2505 | "../build_resources") | |
2506 | #t)) | |
2507 | (add-after 'unpack-build-resources 'fix-dependencies | |
2508 | (lambda* (#:key inputs #:allow-other-keys) | |
2509 | (substitute* "build/build.xml" | |
2510 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") | |
2511 | (string-append (assoc-ref inputs "java-testng") | |
2512 | "/share/java/java-testng.jar")) | |
2513 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") | |
2514 | (string-append (assoc-ref inputs "java-commons-lang") | |
2515 | "/share/java/commons-lang-" | |
2516 | ,(package-version java-commons-lang) ".jar")) | |
2517 | (("\\$\\{lib\\}/commons-io/commons-io.jar") | |
2518 | (string-append (assoc-ref inputs "java-commons-io") | |
2519 | "/share/java/commons-io-" | |
2520 | ,(package-version java-commons-io) | |
2521 | "-SNAPSHOT.jar")) | |
2522 | ;; Remove dependency on svn | |
2523 | (("<build-info.*") "") | |
2524 | (("\\$\\{revision.number\\}") | |
2525 | ,(number->string revision)) | |
2526 | (("\\$\\{version.number\\}") ,base-version)) | |
2527 | ;; Remove dependency on classycle | |
2528 | (substitute* "../build_resources/ant/build-common.xml" | |
2529 | (("<taskdef name=\"dependency-checker.*") "") | |
2530 | (("classname=\"classycle.*") "") | |
2531 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) | |
2532 | #t)) | |
2533 | ;; A few tests fail because of the lack of a proper /etc/groups and | |
2534 | ;; /etc/passwd file in the build container. | |
2535 | (add-after 'unpack 'disable-broken-tests | |
2536 | (lambda _ | |
2537 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java" | |
2538 | (("Unix.isOperational\\(\\)") "false")) | |
2539 | #t)) | |
2540 | ;; These decorators are almost useless and pull in an unpackaged | |
2541 | ;; dependency. | |
2542 | (add-after 'unpack 'remove-useless-decorators | |
2543 | (lambda _ | |
2544 | (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java" | |
2545 | (("@Private") "") | |
2546 | (("import ch.rinn.restrictions.Private;") "")) | |
2547 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java" | |
2548 | (("@Friend.*") "") | |
2549 | (("import ch.rinn.restrictions.Friend;") "")) | |
2550 | #t)) | |
2551 | (add-before 'configure 'build-native-code | |
2552 | (lambda* (#:key inputs #:allow-other-keys) | |
2553 | (let ((jdk (assoc-ref inputs "jdk")) | |
2554 | (dir ,(match (%current-system) | |
2555 | ("i686-linux" | |
2556 | "i386-Linux") | |
2557 | ((or "armhf-linux" "aarch64-linux") | |
2558 | "arm-Linux") | |
2559 | ((or "x86_64-linux") | |
2560 | "amd64-Linux") | |
2561 | (_ "unknown-Linux")))) | |
2562 | (with-directory-excursion "source/c" | |
2563 | (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c" | |
2564 | (string-append "-I" jdk "/include") | |
2565 | (string-append "-I" jdk "/include/linux") | |
2566 | "-o" "libunix.so") | |
2567 | (invoke "gcc" "-shared" "-O3" "-fPIC" | |
2568 | "-DMACHINE_BYTE_ORDER=1" | |
2569 | "copyCommon.c" | |
2570 | "copyByteChar.c" | |
2571 | "copyByteDouble.c" | |
2572 | "copyByteFloat.c" | |
2573 | "copyByteInt.c" | |
2574 | "copyByteLong.c" | |
2575 | "copyByteShort.c" | |
2576 | (string-append "-I" jdk "/include") | |
2577 | (string-append "-I" jdk "/include/linux") | |
2578 | "-o" "libnativedata.so")) | |
2579 | (install-file "source/c/libunix.so" | |
2580 | (string-append "libs/native/unix/" dir)) | |
2581 | (install-file "source/c/libnativedata.so" | |
2582 | (string-append "libs/native/nativedata/" dir)) | |
2583 | #t))) | |
2584 | ;; In the "check" phase we only build the test executable. | |
2585 | (add-after 'check 'run-tests | |
2586 | (lambda _ | |
2587 | (invoke "java" "-jar" "targets/dist/sis-base-test.jar") | |
2588 | (delete-file "targets/dist/sis-base-test.jar") | |
2589 | #t)) | |
2590 | (replace 'install (install-jars "targets/dist"))))) | |
2591 | (native-inputs | |
2592 | `(("jdk" ,icedtea-8) | |
2593 | ("java-commons-lang" ,java-commons-lang) | |
2594 | ("java-commons-io" ,java-commons-io) | |
2595 | ("java-testng" ,java-testng) | |
2596 | ("build-resources" | |
2597 | ,(origin | |
2598 | (method svn-fetch) | |
2599 | (uri (svn-reference | |
2600 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2601 | "base/tags/release/" | |
2602 | (version-major+minor base-version) | |
2603 | ".x/" base-version | |
2604 | "/build_resources/")) | |
2605 | (revision revision))) | |
2606 | (sha256 | |
2607 | (base32 | |
2608 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) | |
2609 | (home-page "http://svnsis.ethz.ch") | |
2610 | (synopsis "Utility classes for libraries from ETH Zurich") | |
2611 | (description "This library supplies some utility classes needed for | |
2612 | libraries from the SIS division at ETH Zurich like jHDF5.") | |
2613 | ;; The C sources are under a non-copyleft license, which looks like a | |
2614 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. | |
2615 | (license (list license:asl2.0 | |
2616 | (license:non-copyleft "file://source/c/COPYING")))))) | |
2617 | ||
04ddca26 RW |
2618 | (define-public java-cisd-args4j |
2619 | (let ((revision 39162) | |
2620 | (base-version "9.11.2")) | |
2621 | (package | |
2622 | (name "java-cisd-args4j") | |
2623 | (version (string-append base-version "-" (number->string revision))) | |
2624 | (source (origin | |
2625 | (method svn-fetch) | |
2626 | (uri (svn-reference | |
2627 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2628 | "args4j/tags/release/" | |
2629 | (version-major+minor base-version) | |
2630 | ".x/" base-version "/args4j/")) | |
2631 | (revision revision))) | |
2632 | (file-name (string-append "java-cisd-args4j-" version "-checkout")) | |
2633 | (sha256 | |
2634 | (base32 | |
2635 | "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2")))) | |
2636 | (build-system ant-build-system) | |
2637 | (arguments | |
2638 | `(#:make-flags '("-file" "build/build.xml") | |
2639 | #:tests? #f ; there are no tests | |
2640 | ;; There are weird build failures with JDK8, such as: "The type | |
2641 | ;; java.io.ObjectInputStream cannot be resolved. It is indirectly | |
2642 | ;; referenced from required .class files" | |
2643 | #:jdk ,icedtea-7 | |
2644 | #:modules ((guix build ant-build-system) | |
2645 | (guix build utils) | |
2646 | (guix build java-utils) | |
2647 | (sxml simple) | |
2648 | (sxml transform) | |
2649 | (sxml xpath)) | |
2650 | #:phases | |
2651 | (modify-phases %standard-phases | |
2652 | (add-after 'unpack 'unpack-build-resources | |
2653 | (lambda* (#:key inputs #:allow-other-keys) | |
2654 | (mkdir-p "../build_resources") | |
2655 | (invoke "tar" "xf" (assoc-ref inputs "build-resources") | |
2656 | "-C" "../build_resources" | |
2657 | "--strip-components=1") | |
2658 | (mkdir-p "../build_resources/lib") | |
2659 | #t)) | |
2660 | (add-after 'unpack-build-resources 'fix-dependencies | |
2661 | (lambda* (#:key inputs #:allow-other-keys) | |
2662 | ;; FIXME: There should be a more convenient abstraction for | |
2663 | ;; editing XML files. | |
2664 | (with-directory-excursion "../build_resources/ant/" | |
2665 | (chmod "build-common.xml" #o664) | |
2666 | (call-with-output-file "build-common.xml.new" | |
2667 | (lambda (port) | |
2668 | (sxml->xml | |
2669 | (pre-post-order | |
2670 | (with-input-from-file "build-common.xml" | |
2671 | (lambda _ (xml->sxml #:trim-whitespace? #t))) | |
2672 | `(;; Remove dependency on classycle and custom ant tasks | |
2673 | (taskdef . ,(lambda (tag . kids) | |
2674 | (let ((name ((sxpath '(name *text*)) kids))) | |
2675 | (if (or (member "build-info" name) | |
2676 | (member "dependency-checker" name) | |
2677 | (member "build-java-subprojects" name) | |
2678 | (member "project-classpath" name)) | |
2679 | '() ; skip | |
2680 | `(,tag ,@kids))))) | |
2681 | (typedef . ,(lambda (tag . kids) | |
2682 | (let ((name ((sxpath '(name *text*)) kids))) | |
2683 | (if (member "recursive-jar" name) | |
2684 | '() ; skip | |
2685 | `(,tag ,@kids))))) | |
2686 | (build-java-subprojects . ,(lambda _ '())) | |
2687 | ;; Ignore everything else | |
2688 | (*default* . ,(lambda (tag . kids) `(,tag ,@kids))) | |
2689 | (*text* . ,(lambda (_ txt) txt)))) | |
2690 | port))) | |
2691 | (rename-file "build-common.xml.new" "build-common.xml")) | |
2692 | (substitute* "build/build.xml" | |
2693 | (("\\$\\{lib\\}/cisd-base/cisd-base.jar") | |
2694 | (string-append (assoc-ref inputs "java-cisd-base") | |
2695 | "/share/java/sis-base.jar")) | |
2696 | ;; Remove dependency on svn | |
2697 | (("<build-info.*") "") | |
2698 | (("\\$\\{revision.number\\}") | |
2699 | ,(number->string revision)) | |
2700 | (("\\$\\{version.number\\}") ,base-version) | |
2701 | ;; Don't use custom ant tasks. | |
2702 | (("recursive-jar") "jar") | |
2703 | (("<project-classpath.*") "")) | |
2704 | #t)) | |
2705 | (replace 'install (install-jars "targets/dist"))))) | |
2706 | (inputs | |
2707 | `(("java-cisd-base" ,java-cisd-base))) | |
2708 | (native-inputs | |
2709 | `(("ecj" ,java-ecj-3.5) | |
2710 | ("build-resources" | |
2711 | ,(origin | |
2712 | (method svn-fetch) | |
2713 | (uri (svn-reference | |
2714 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2715 | "args4j/tags/release/" | |
2716 | (version-major+minor base-version) | |
2717 | ".x/" base-version | |
2718 | "/build_resources/")) | |
2719 | (revision revision))) | |
2720 | (sha256 | |
2721 | (base32 | |
2722 | "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf")) | |
2723 | (modules '((guix build utils))) | |
2724 | ;; Delete bundled pre-built jars. | |
2725 | (snippet | |
2726 | '(begin (delete-file-recursively "lib/") #t)))))) | |
2727 | (home-page "http://svnsis.ethz.ch") | |
2728 | (synopsis "Command line parser library") | |
2729 | (description "This package provides a parser for command line arguments.") | |
2730 | (license license:asl2.0)))) | |
2731 | ||
2f0d0418 RW |
2732 | (define-public java-cisd-jhdf5 |
2733 | (let ((revision 39162) | |
2734 | (base-version "14.12.6")) | |
2735 | (package | |
2736 | (name "java-cisd-jhdf5") | |
2737 | (version (string-append base-version "-" (number->string revision))) | |
2738 | (source (origin | |
2739 | (method svn-fetch) | |
2740 | (uri (svn-reference | |
2741 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2742 | "jhdf5/tags/release/" | |
2743 | (version-major+minor base-version) | |
2744 | ".x/" base-version "/jhdf5/")) | |
2745 | (revision revision))) | |
2746 | (file-name (string-append "java-cisd-jhdf5-" version "-checkout")) | |
2747 | (sha256 | |
2748 | (base32 | |
2749 | "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0")) | |
2750 | (modules '((guix build utils))) | |
2751 | (snippet | |
2752 | '(begin | |
2753 | ;; Delete included gradle jar | |
2754 | (delete-file-recursively "gradle/wrapper") | |
2755 | ;; Delete pre-built native libraries | |
2756 | (delete-file-recursively "libs") | |
2757 | #t)))) | |
2758 | (build-system ant-build-system) | |
2759 | (arguments | |
2760 | `(#:make-flags '("-file" "build/build.xml") | |
2761 | #:build-target "jar-all" | |
2762 | #:test-target "jar-test" | |
2763 | #:jdk ,icedtea-8 | |
2764 | #:phases | |
2765 | (modify-phases %standard-phases | |
1ed386fc RW |
2766 | ;; FIXME: this build phase fails. |
2767 | (delete 'generate-jar-indices) | |
2f0d0418 RW |
2768 | ;; Don't erase results from the build phase when building tests. |
2769 | (add-after 'unpack 'separate-test-target-from-clean | |
2770 | (lambda _ | |
2771 | (substitute* "build/build.xml" | |
2772 | (("\"jar-test\" depends=\"clean, ") | |
2773 | "\"jar-test\" depends=\"")) | |
2774 | #t)) | |
2775 | (add-after 'unpack 'unpack-build-resources | |
2776 | (lambda* (#:key inputs #:allow-other-keys) | |
2777 | (copy-recursively (assoc-ref inputs "build-resources") | |
2778 | "../build_resources") | |
2779 | (delete-file-recursively "../build_resources/lib/") | |
2780 | (mkdir-p "../build_resources/lib") | |
2781 | ;; Remove dependency on classycle | |
2782 | (substitute* "../build_resources/ant/build-common.xml" | |
2783 | (("<taskdef name=\"dependency-checker.*") "") | |
2784 | (("classname=\"classycle.*") "") | |
2785 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) | |
2786 | ;; Remove dependency on svn | |
2787 | (substitute* "build/build.xml" | |
2788 | (("<build-info.*") "") | |
2789 | (("\\$\\{revision.number\\}") | |
2790 | ,(number->string revision)) | |
2791 | (("\\$\\{version.number\\}") ,base-version)) | |
2792 | #t)) | |
2793 | (add-after 'unpack-build-resources 'fix-dependencies | |
2794 | (lambda* (#:key inputs #:allow-other-keys) | |
2795 | (substitute* "../build_resources/ant/build-common.xml" | |
2796 | (("../libraries/testng/testng-jdk15.jar") | |
2797 | (string-append (assoc-ref inputs "java-testng") | |
2798 | "/share/java/java-testng.jar"))) | |
2799 | (substitute* "build/build.xml" | |
2800 | (("\\$\\{lib\\}/sis-base/sis-base.jar") | |
2801 | (string-append (assoc-ref inputs "java-cisd-base") | |
2802 | "/share/java/sis-base.jar")) | |
2803 | (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar") | |
2804 | (string-append (assoc-ref inputs "java-cisd-args4j") | |
2805 | "/share/java/cisd-args4j.jar")) | |
2806 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") | |
2807 | (string-append (assoc-ref inputs "java-commons-lang") | |
2808 | "/share/java/commons-lang-" | |
2809 | ,(package-version java-commons-lang) ".jar")) | |
2810 | (("\\$\\{lib\\}/commons-io/commons-io.jar") | |
2811 | (string-append (assoc-ref inputs "java-commons-io") | |
2812 | "/share/java/commons-io-" | |
2813 | ,(package-version java-commons-io) | |
2814 | "-SNAPSHOT.jar")) | |
2815 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") | |
2816 | (string-append (assoc-ref inputs "java-testng") | |
2817 | "/share/java/java-testng.jar")) | |
2818 | (("\\$\\{lib\\}/junit4/junit.jar") | |
2819 | (string-append (assoc-ref inputs "java-junit") | |
2820 | "/share/java/junit.jar")) | |
2821 | (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar") | |
2822 | (string-append (assoc-ref inputs "java-hamcrest-core") | |
2823 | "/share/java/hamcrest-core.jar"))) | |
2824 | ;; Remove dependency on ch.rinn.restrictions | |
2825 | (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/" | |
2826 | (substitute* '("BitSetConversionUtils.java" | |
2827 | "HDF5Utils.java") | |
2828 | (("import ch.rinn.restrictions.Private;") "") | |
2829 | (("@Private") ""))) | |
2830 | (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/" | |
2831 | (substitute* '("BitSetConversionTest.java" | |
2832 | "h5ar/HDF5ArchiverTest.java") | |
2833 | (("import ch.rinn.restrictions.Friend;") "") | |
2834 | (("@Friend.*") "")) | |
2835 | ;; Remove leftovers from removing @Friend | |
2836 | (substitute* "h5ar/HDF5ArchiverTest.java" | |
2837 | (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)") | |
2838 | ""))) | |
2839 | #t)) | |
2840 | (add-before 'configure 'build-native-library | |
2841 | (lambda* (#:key inputs #:allow-other-keys) | |
2842 | (let ((jdk (assoc-ref inputs "jdk")) | |
2843 | (hdf5 (assoc-ref inputs "hdf5")) | |
2844 | (dir ,(match (%current-system) | |
2845 | ("i686-linux" | |
2846 | "i386-Linux") | |
2847 | ((or "armhf-linux" "aarch64-linux") | |
2848 | "arm-Linux") | |
2849 | ((or "x86_64-linux") | |
2850 | "amd64-Linux") | |
2851 | (_ "unknown-Linux")))) | |
2852 | (with-directory-excursion "source/c" | |
2853 | (apply invoke `("gcc" "-shared" "-O3" | |
2854 | "-fPIC" | |
2855 | "-Wl,--exclude-libs,ALL" | |
2856 | ,@(find-files "jhdf5" "\\.c$") | |
2857 | ,@(find-files "hdf-java" "\\.c$") | |
2858 | ,(string-append "-I" hdf5 "/include") | |
2859 | ,(string-append "-I" jdk "/include") | |
2860 | ,(string-append "-I" jdk "/include/linux") | |
2861 | ,(string-append hdf5 "/lib/libhdf5.a") | |
2862 | "-o" "libjhdf5.so" "-lz"))) | |
2863 | (install-file "source/c/libjhdf5.so" | |
2864 | (string-append "libs/native/jhdf5/" dir)) | |
2865 | #t))) | |
2866 | ;; In the "check" phase we only build the test executable. | |
2867 | (add-after 'check 'run-tests | |
2868 | (lambda _ | |
2869 | (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar") | |
2870 | (delete-file "targets/dist/sis-jhdf5-test.jar") | |
2871 | #t)) | |
2872 | (replace 'install | |
2873 | (install-jars "targets/dist"))))) | |
2874 | (inputs | |
2875 | `(("java-cisd-base" ,java-cisd-base) | |
2876 | ("java-cisd-args4j" ,java-cisd-args4j) | |
2877 | ("java-commons-lang" ,java-commons-lang) | |
2878 | ("java-commons-io" ,java-commons-io) | |
2879 | ("hdf5" ,hdf5) | |
2880 | ("zlib" ,zlib))) | |
2881 | (native-inputs | |
2882 | `(("jdk" ,icedtea-8) | |
2883 | ("java-testng" ,java-testng) | |
2884 | ("java-junit" ,java-junit) | |
2885 | ("java-jmock" ,java-jmock) | |
2886 | ("java-hamcrest-core" ,java-hamcrest-core) | |
2887 | ("build-resources" | |
2888 | ,(origin | |
2889 | (method svn-fetch) | |
2890 | (uri (svn-reference | |
2891 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2892 | "jhdf5/tags/release/" | |
2893 | (version-major+minor base-version) | |
2894 | ".x/" base-version | |
2895 | "/build_resources/")) | |
2896 | (revision revision))) | |
2897 | (sha256 | |
2898 | (base32 | |
2899 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) | |
2900 | (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/") | |
2901 | (synopsis "Java binding for HDF5") | |
2902 | (description "JHDF5 is a high-level API in Java for reading and writing | |
2903 | HDF5 files, building on the libraries provided by the HDF Group.") | |
2904 | ;; The C sources are under a non-copyleft license, which looks like a | |
2905 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. | |
2906 | (license (list license:asl2.0 | |
2907 | (license:non-copyleft "file://source/c/COPYING")))))) | |
2908 | ||
218d093b RW |
2909 | (define-public java-classpathx-servletapi |
2910 | (package | |
2911 | (name "java-classpathx-servletapi") | |
ae307724 | 2912 | (version "3.0.1") |
218d093b RW |
2913 | (source (origin |
2914 | (method url-fetch) | |
2915 | (uri (string-append "mirror://gnu/classpathx/servletapi/" | |
2916 | "servletapi-" version ".tar.gz")) | |
2917 | (sha256 | |
2918 | (base32 | |
ae307724 | 2919 | "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x")))) |
218d093b RW |
2920 | (build-system ant-build-system) |
2921 | (arguments | |
2922 | `(#:tests? #f ; there is no test target | |
2923 | #:build-target "compile" | |
218d093b | 2924 | #:make-flags |
ae307724 | 2925 | (list "-Dbuild.compiler=javac1.8" |
218d093b RW |
2926 | (string-append "-Ddist=" (assoc-ref %outputs "out"))) |
2927 | #:phases | |
2928 | (modify-phases %standard-phases | |
2929 | (replace 'install | |
2930 | (lambda* (#:key make-flags #:allow-other-keys) | |
2c8ac364 | 2931 | (apply invoke `("ant" "dist" ,@make-flags))))))) |
218d093b RW |
2932 | (home-page "https://www.gnu.org/software/classpathx/") |
2933 | (synopsis "Java servlet API implementation") | |
2934 | (description "This is the GNU servlet API distribution, part of the | |
2935 | ClasspathX project. It provides implementations of version 3.0 of the servlet | |
2936 | API and version 2.1 of the Java ServerPages API.") | |
2937 | (license license:gpl3+))) | |
2938 | ||
10d62a88 BH |
2939 | (define-public java-javaee-servletapi |
2940 | (package | |
2941 | (name "java-javaee-servletapi") | |
2942 | (version "3.1.0") | |
2943 | (source (origin | |
2944 | (method url-fetch) | |
2945 | (uri (string-append "https://github.com/javaee/servlet-spec/" | |
2946 | "archive/" version ".zip")) | |
2947 | (file-name (string-append name "-" version ".zip")) | |
2948 | (sha256 | |
2949 | (base32 | |
2950 | "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w")))) | |
2951 | (build-system ant-build-system) | |
2952 | (arguments | |
2953 | `(#:jar-name "javax-servletapi.jar" | |
2954 | ;; no tests | |
2955 | #:tests? #f | |
2956 | #:source-dir "src/main/java")) | |
2957 | (native-inputs | |
2958 | `(("unzip" ,unzip))) | |
2959 | (home-page "https://javaee.github.io/servlet-spec/") | |
2960 | (synopsis "Java servlet API") | |
2961 | (description "Java Servlet is the foundation web specification in the | |
2962 | Java Enterprise Platform. Developers can build web applications using the | |
2963 | Servlet API to interact with the request/response workflow. This project | |
2964 | provides information on the continued development of the Java Servlet | |
2965 | specification.") | |
2966 | ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1. | |
2967 | ;; Some files are licensed under ASL 2.0. | |
2968 | (license (list license:asl2.0 license:gpl2 license:cddl1.1)))) | |
2969 | ||
5490480c RW |
2970 | (define-public java-swt |
2971 | (package | |
2972 | (name "java-swt") | |
8710d4dd | 2973 | (version "4.7.1a") |
5490480c RW |
2974 | (source |
2975 | ;; The types of many variables and procedures differ in the sources | |
2976 | ;; dependent on whether the target architecture is a 32-bit system or a | |
2977 | ;; 64-bit system. Instead of patching the sources on demand in a build | |
2978 | ;; phase we download either the 32-bit archive (which mostly uses "int" | |
2979 | ;; types) or the 64-bit archive (which mostly uses "long" types). | |
8710d4dd RW |
2980 | (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9") |
2981 | (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q") | |
5490480c RW |
2982 | (file32 "x86") |
2983 | (file64 "x86_64")) | |
2984 | (let-values (((hash file) | |
2985 | (match (or (%current-target-system) (%current-system)) | |
2986 | ("x86_64-linux" (values hash64 file64)) | |
2987 | (_ (values hash32 file32))))) | |
2988 | (origin | |
2989 | (method url-fetch) | |
2990 | (uri (string-append | |
8710d4dd RW |
2991 | "http://download.eclipse.org/eclipse/downloads/drops4/" |
2992 | "R-" version "-201710090410/swt-" version | |
2993 | "-gtk-linux-" file ".zip")) | |
5490480c RW |
2994 | (sha256 (base32 hash)))))) |
2995 | (build-system ant-build-system) | |
2996 | (arguments | |
2997 | `(#:jar-name "swt.jar" | |
8710d4dd | 2998 | #:jdk ,icedtea-8 |
5490480c RW |
2999 | #:tests? #f ; no "check" target |
3000 | #:phases | |
3001 | (modify-phases %standard-phases | |
3002 | (replace 'unpack | |
3003 | (lambda* (#:key source #:allow-other-keys) | |
2c8ac364 MW |
3004 | (mkdir "swt") |
3005 | (invoke "unzip" source "-d" "swt") | |
3006 | (chdir "swt") | |
3007 | (mkdir "src") | |
3008 | (invoke "unzip" "src.zip" "-d" "src"))) | |
5490480c RW |
3009 | ;; The classpath contains invalid icecat jars. Since we don't need |
3010 | ;; anything other than the JDK on the classpath, we can simply unset | |
3011 | ;; it. | |
3012 | (add-after 'configure 'unset-classpath | |
3013 | (lambda _ (unsetenv "CLASSPATH") #t)) | |
3014 | (add-before 'build 'build-native | |
3015 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3016 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) | |
3017 | ;; Build shared libraries. Users of SWT have to set the system | |
3018 | ;; property swt.library.path to the "lib" directory of this | |
3019 | ;; package output. | |
3020 | (mkdir-p lib) | |
3021 | (setenv "OUTPUT_DIR" lib) | |
3022 | (with-directory-excursion "src" | |
2c8ac364 | 3023 | (invoke "bash" "build.sh"))))) |
5490480c RW |
3024 | (add-after 'install 'install-native |
3025 | (lambda* (#:key outputs #:allow-other-keys) | |
3026 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) | |
3027 | (for-each (lambda (file) | |
3028 | (install-file file lib)) | |
3029 | (find-files "." "\\.so$")) | |
3030 | #t)))))) | |
3031 | (inputs | |
8710d4dd | 3032 | `(("gtk" ,gtk+-2) |
5490480c RW |
3033 | ("libxtst" ,libxtst) |
3034 | ("libxt" ,libxt) | |
3035 | ("mesa" ,mesa) | |
3036 | ("glu" ,glu))) | |
3037 | (native-inputs | |
3038 | `(("pkg-config" ,pkg-config) | |
3039 | ("unzip" ,unzip))) | |
3040 | (home-page "https://www.eclipse.org/swt/") | |
3041 | (synopsis "Widget toolkit for Java") | |
3042 | (description | |
3043 | "SWT is a widget toolkit for Java designed to provide efficient, portable | |
3044 | access to the user-interface facilities of the operating systems on which it | |
3045 | is implemented.") | |
3046 | ;; SWT code is licensed under EPL1.0 | |
3047 | ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1 | |
3048 | ;; Cairo bindings contain code under MPL1.1 | |
3049 | ;; XULRunner 1.9 bindings contain code under MPL2.0 | |
3050 | (license (list | |
3051 | license:epl1.0 | |
3052 | license:mpl1.1 | |
3053 | license:mpl2.0 | |
3054 | license:lgpl2.1+)))) | |
3055 | ||
068e476f RJ |
3056 | (define-public java-xz |
3057 | (package | |
3058 | (name "java-xz") | |
92966847 | 3059 | (version "1.6") |
068e476f RJ |
3060 | (source (origin |
3061 | (method url-fetch) | |
3062 | (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip")) | |
3063 | (sha256 | |
3064 | (base32 | |
92966847 | 3065 | "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x")))) |
068e476f RJ |
3066 | (build-system ant-build-system) |
3067 | (arguments | |
3068 | `(#:tests? #f ; There are no tests to run. | |
3069 | #:jar-name ,(string-append "xz-" version ".jar") | |
3070 | #:phases | |
3071 | (modify-phases %standard-phases | |
3072 | ;; The unpack phase enters the "maven" directory by accident. | |
3073 | (add-after 'unpack 'chdir | |
3074 | (lambda _ (chdir "..") #t))))) | |
3075 | (native-inputs | |
3076 | `(("unzip" ,unzip))) | |
d6ddc5ab | 3077 | (home-page "https://tukaani.org/xz/java.html") |
068e476f RJ |
3078 | (synopsis "Implementation of XZ data compression in pure Java") |
3079 | (description "This library aims to be a complete implementation of XZ data | |
3080 | compression in pure Java. Single-threaded streamed compression and | |
3081 | decompression and random access decompression have been fully implemented.") | |
3082 | (license license:public-domain))) | |
04100c3b RW |
3083 | |
3084 | ;; java-hamcrest-core uses qdox version 1.12. We package this version instead | |
3085 | ;; of the latest release. | |
3086 | (define-public java-qdox-1.12 | |
3087 | (package | |
3088 | (name "java-qdox") | |
3089 | (version "1.12.1") | |
3090 | (source (origin | |
3091 | (method url-fetch) | |
3092 | (uri (string-append "http://central.maven.org/maven2/" | |
3093 | "com/thoughtworks/qdox/qdox/" version | |
3094 | "/qdox-" version "-sources.jar")) | |
3095 | (sha256 | |
3096 | (base32 | |
3097 | "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl")))) | |
3098 | (build-system ant-build-system) | |
3099 | (arguments | |
3100 | `(;; Tests require junit | |
3101 | #:tests? #f | |
3102 | #:jar-name "qdox.jar" | |
3103 | #:phases | |
3104 | (modify-phases %standard-phases | |
3105 | (replace 'unpack | |
3106 | (lambda* (#:key source #:allow-other-keys) | |
3107 | (mkdir "src") | |
3108 | (with-directory-excursion "src" | |
2c8ac364 | 3109 | (invoke "jar" "-xf" source)))) |
04100c3b RW |
3110 | ;; At this point we don't have junit, so we must remove the API |
3111 | ;; tests. | |
3112 | (add-after 'unpack 'delete-tests | |
3113 | (lambda _ | |
3114 | (delete-file-recursively "src/com/thoughtworks/qdox/junit") | |
3115 | #t))))) | |
3116 | (home-page "http://qdox.codehaus.org/") | |
3117 | (synopsis "Parse definitions from Java source files") | |
3118 | (description | |
3119 | "QDox is a high speed, small footprint parser for extracting | |
3120 | class/interface/method definitions from source files complete with JavaDoc | |
b13cf17f | 3121 | @code{@@tags}. It is designed to be used by active code generators or |
04100c3b RW |
3122 | documentation tools.") |
3123 | (license license:asl2.0))) | |
e7e28510 RW |
3124 | |
3125 | (define-public java-jarjar | |
3126 | (package | |
3127 | (name "java-jarjar") | |
3128 | (version "1.4") | |
3129 | (source (origin | |
3130 | (method url-fetch) | |
3131 | (uri (string-append | |
3132 | "https://storage.googleapis.com/google-code-archive-downloads/v2/" | |
3133 | "code.google.com/jarjar/jarjar-src-" version ".zip")) | |
3134 | (sha256 | |
3135 | (base32 | |
88aa75e9 GB |
3136 | "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl")) |
3137 | (modules '((guix build utils))) | |
3138 | (snippet | |
3139 | '(begin | |
3140 | ;; Delete bundled thirds-party jar archives. | |
3141 | ;; TODO: unbundle maven-plugin-api. | |
3142 | (delete-file "lib/asm-4.0.jar") | |
3143 | (delete-file "lib/asm-commons-4.0.jar") | |
3144 | (delete-file "lib/junit-4.8.1.jar") | |
3145 | #t)))) | |
e7e28510 RW |
3146 | (build-system ant-build-system) |
3147 | (arguments | |
3148 | `(;; Tests require junit, which ultimately depends on this package. | |
3149 | #:tests? #f | |
3150 | #:build-target "jar" | |
3151 | #:phases | |
3152 | (modify-phases %standard-phases | |
88aa75e9 GB |
3153 | (add-before 'build 'do-not-use-bundled-asm |
3154 | (lambda* (#:key inputs #:allow-other-keys) | |
3155 | (substitute* "build.xml" | |
3156 | (("<path id=\"path.build\">") | |
3157 | (string-append "<path id=\"path.build\"><fileset dir=\"" | |
3158 | (assoc-ref inputs "java-asm-bootstrap") | |
3159 | "/share/java\" includes=\"**/*.jar\"/>")) | |
3160 | (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "") | |
3161 | (("lib/asm-commons-4.0.jar") | |
3162 | (string-append (assoc-ref inputs "java-asm-bootstrap") | |
3163 | "/share/java/asm-6.0.jar")) | |
3164 | (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>") | |
3165 | (string-append "<include name=\"org/objectweb/asm/" | |
3166 | "commons/Remap*.class\"/>" | |
3167 | "<include name=\"org/objectweb/asm/*.class\"/>" | |
3168 | "<include name=\"org/objectweb/asm/" | |
3169 | "signature/*.class\"/>" | |
3170 | "<include name=\"org/objectweb/asm/" | |
3171 | "commons/SignatureRemapper.class\"/>"))) | |
3172 | #t)) | |
e7e28510 RW |
3173 | (replace 'install |
3174 | (lambda* (#:key outputs #:allow-other-keys) | |
3175 | (let ((target (string-append (assoc-ref outputs "out") | |
3176 | "/share/java"))) | |
3177 | (install-file (string-append "dist/jarjar-" ,version ".jar") | |
3178 | target)) | |
3179 | #t))))) | |
88aa75e9 GB |
3180 | (inputs |
3181 | `(("java-asm-bootstrap" ,java-asm-bootstrap))) | |
e7e28510 RW |
3182 | (native-inputs |
3183 | `(("unzip" ,unzip))) | |
3184 | (home-page "https://code.google.com/archive/p/jarjar/") | |
3185 | (synopsis "Repackage Java libraries") | |
3186 | (description | |
3187 | "Jar Jar Links is a utility that makes it easy to repackage Java | |
3188 | libraries and embed them into your own distribution. Jar Jar Links includes | |
3189 | an Ant task that extends the built-in @code{jar} task.") | |
3190 | (license license:asl2.0))) | |
87c31a21 RW |
3191 | |
3192 | (define-public java-hamcrest-core | |
3193 | (package | |
3194 | (name "java-hamcrest-core") | |
3195 | (version "1.3") | |
3196 | (source (origin | |
3197 | (method url-fetch) | |
00672896 HG |
3198 | (uri (string-append "https://github.com/hamcrest/JavaHamcrest/" |
3199 | "archive/hamcrest-java-" version ".tar.gz")) | |
87c31a21 RW |
3200 | (sha256 |
3201 | (base32 | |
00672896 | 3202 | "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva")) |
87c31a21 RW |
3203 | (modules '((guix build utils))) |
3204 | (snippet | |
3205 | '(begin | |
00672896 HG |
3206 | ;; Delete bundled thirds-party jar archives. |
3207 | (delete-file-recursively "lib") | |
87c31a21 RW |
3208 | #t)))) |
3209 | (build-system ant-build-system) | |
3210 | (arguments | |
3211 | `(#:tests? #f ; Tests require junit | |
a8d3cb62 RW |
3212 | #:modules ((guix build ant-build-system) |
3213 | (guix build utils) | |
3214 | (srfi srfi-1)) | |
87c31a21 | 3215 | #:make-flags (list (string-append "-Dversion=" ,version)) |
fae0b4ca | 3216 | #:test-target "unit-test" |
87c31a21 RW |
3217 | #:build-target "core" |
3218 | #:phases | |
3219 | (modify-phases %standard-phases | |
3220 | ;; Disable unit tests, because they require junit, which requires | |
3221 | ;; hamcrest-core. We also give a fixed value to the "Built-Date" | |
3222 | ;; attribute from the manifest for reproducibility. | |
3223 | (add-before 'configure 'patch-build.xml | |
3224 | (lambda _ | |
3225 | (substitute* "build.xml" | |
3226 | (("unit-test, ") "") | |
3227 | (("\\$\\{build.timestamp\\}") "guix")) | |
3228 | #t)) | |
3229 | ;; Java's "getMethods()" returns methods in an unpredictable order. | |
3230 | ;; To make the output of the generated code deterministic we must | |
3231 | ;; sort the array of methods. | |
3232 | (add-after 'unpack 'make-method-order-deterministic | |
3233 | (lambda _ | |
3234 | (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java" | |
3235 | (("import java\\.util\\.Iterator;" line) | |
3236 | (string-append line "\n" | |
3237 | "import java.util.Arrays; import java.util.Comparator;")) | |
3238 | (("allMethods = cls\\.getMethods\\(\\);" line) | |
3239 | (string-append "_" line | |
3240 | " | |
3241 | private Method[] getSortedMethods() { | |
3242 | Arrays.sort(_allMethods, new Comparator<Method>() { | |
3243 | @Override | |
3244 | public int compare(Method a, Method b) { | |
3245 | return a.toString().compareTo(b.toString()); | |
3246 | } | |
3247 | }); | |
3248 | return _allMethods; | |
3249 | } | |
3250 | ||
2c8ac364 MW |
3251 | private Method[] allMethods = getSortedMethods();"))) |
3252 | #t)) | |
87c31a21 RW |
3253 | (add-before 'build 'do-not-use-bundled-qdox |
3254 | (lambda* (#:key inputs #:allow-other-keys) | |
3255 | (substitute* "build.xml" | |
3256 | (("lib/generator/qdox-1.12.jar") | |
3257 | (string-append (assoc-ref inputs "java-qdox-1.12") | |
3258 | "/share/java/qdox.jar"))) | |
3259 | #t)) | |
fab959d3 HG |
3260 | ;; build.xml searches for .jar files in this directoy, which |
3261 | ;; we remove from the source archive. | |
3262 | (add-before 'build 'create-dummy-directories | |
3263 | (lambda _ | |
3264 | (mkdir-p "lib/integration") | |
3265 | #t)) | |
87c31a21 RW |
3266 | (replace 'install |
3267 | (lambda* (#:key outputs #:allow-other-keys) | |
a8d3cb62 RW |
3268 | (let* ((target (string-append (assoc-ref outputs "out") |
3269 | "/share/java/")) | |
3270 | (version-suffix ,(string-append "-" version ".jar")) | |
3271 | (install-without-version-suffix | |
3272 | (lambda (jar) | |
3273 | (copy-file jar | |
3274 | (string-append target | |
3275 | (basename jar version-suffix) | |
3276 | ".jar"))))) | |
3277 | (mkdir-p target) | |
3278 | (for-each | |
3279 | install-without-version-suffix | |
3280 | (find-files "build" | |
3281 | (lambda (name _) | |
3282 | (and (string-suffix? ".jar" name) | |
3283 | (not (string-suffix? "-sources.jar" name))))))) | |
3284 | #t))))) | |
87c31a21 RW |
3285 | (native-inputs |
3286 | `(("java-qdox-1.12" ,java-qdox-1.12) | |
3287 | ("java-jarjar" ,java-jarjar))) | |
3288 | (home-page "http://hamcrest.org/") | |
3289 | (synopsis "Library of matchers for building test expressions") | |
3290 | (description | |
3291 | "This package provides a library of matcher objects (also known as | |
3292 | constraints or predicates) allowing @code{match} rules to be defined | |
3293 | declaratively, to be used in other frameworks. Typical scenarios include | |
3294 | testing frameworks, mocking libraries and UI validation rules.") | |
3295 | (license license:bsd-2))) | |
d0184f44 RW |
3296 | |
3297 | (define-public java-junit | |
3298 | (package | |
3299 | (name "java-junit") | |
3300 | (version "4.12") | |
3301 | (source (origin | |
3302 | (method url-fetch) | |
3303 | (uri (string-append "https://github.com/junit-team/junit/" | |
3304 | "archive/r" version ".tar.gz")) | |
3305 | (file-name (string-append name "-" version ".tar.gz")) | |
3306 | (sha256 | |
3307 | (base32 | |
3308 | "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws")) | |
3309 | (modules '((guix build utils))) | |
3310 | (snippet | |
3311 | '(begin | |
3312 | ;; Delete bundled jar archives. | |
3313 | (delete-file-recursively "lib") | |
3314 | #t)))) | |
3315 | (build-system ant-build-system) | |
3316 | (arguments | |
3317 | `(#:tests? #f ; no tests | |
3318 | #:jar-name "junit.jar")) | |
3319 | (inputs | |
3320 | `(("java-hamcrest-core" ,java-hamcrest-core))) | |
3321 | (home-page "http://junit.org/") | |
3322 | (synopsis "Test framework for Java") | |
3323 | (description | |
3324 | "JUnit is a simple framework to write repeatable tests for Java projects. | |
3325 | JUnit provides assertions for testing expected results, test fixtures for | |
3326 | sharing common test data, and test runners for running tests.") | |
3327 | (license license:epl1.0))) | |
9fb20d01 RW |
3328 | |
3329 | (define-public java-plexus-utils | |
3330 | (package | |
3331 | (name "java-plexus-utils") | |
0cd8efcc | 3332 | (version "3.2.0") |
9fb20d01 RW |
3333 | (source (origin |
3334 | (method url-fetch) | |
3335 | (uri (string-append "https://github.com/codehaus-plexus/" | |
3336 | "plexus-utils/archive/plexus-utils-" | |
3337 | version ".tar.gz")) | |
3338 | (sha256 | |
3339 | (base32 | |
0cd8efcc | 3340 | "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz")))) |
9fb20d01 RW |
3341 | (build-system ant-build-system) |
3342 | ;; FIXME: The default build.xml does not include a target to install | |
3343 | ;; javadoc files. | |
3344 | (arguments | |
3345 | `(#:jar-name "plexus-utils.jar" | |
3346 | #:source-dir "src/main" | |
3347 | #:phases | |
3348 | (modify-phases %standard-phases | |
3349 | (add-after 'unpack 'fix-reference-to-/bin-and-/usr | |
3350 | (lambda _ | |
3351 | (substitute* "src/main/java/org/codehaus/plexus/util/\ | |
3352 | cli/shell/BourneShell.java" | |
3353 | (("/bin/sh") (which "sh")) | |
3354 | (("/usr/") (getcwd))) | |
3355 | #t)) | |
3356 | (add-after 'unpack 'fix-or-disable-broken-tests | |
3357 | (lambda _ | |
3358 | (with-directory-excursion "src/test/java/org/codehaus/plexus/util" | |
3359 | (substitute* '("cli/CommandlineTest.java" | |
3360 | "cli/shell/BourneShellTest.java") | |
3361 | (("/bin/sh") (which "sh")) | |
3362 | (("/bin/echo") (which "echo"))) | |
3363 | ||
3364 | ;; This test depends on MavenProjectStub, but we don't have | |
3365 | ;; a package for Maven. | |
3366 | (delete-file "introspection/ReflectionValueExtractorTest.java") | |
3367 | ||
3368 | ;; FIXME: The command line tests fail, maybe because they use | |
3369 | ;; absolute paths. | |
3370 | (delete-file "cli/CommandlineTest.java")) | |
3371 | #t))))) | |
3372 | (native-inputs | |
0cd8efcc JL |
3373 | `(("java-hamcrest-core" ,java-hamcrest-core) |
3374 | ("java-junit" ,java-junit))) | |
9fb20d01 RW |
3375 | (home-page "http://codehaus-plexus.github.io/plexus-utils/") |
3376 | (synopsis "Common utilities for the Plexus framework") | |
3377 | (description "This package provides various Java utility classes for the | |
3378 | Plexus framework to ease working with strings, files, command lines, XML and | |
3379 | more.") | |
3380 | (license license:asl2.0))) | |
1e555562 HG |
3381 | |
3382 | (define-public java-plexus-interpolation | |
3383 | (package | |
3384 | (name "java-plexus-interpolation") | |
3385 | (version "1.23") | |
3386 | (source (origin | |
3387 | (method url-fetch) | |
3388 | (uri (string-append "https://github.com/codehaus-plexus/" | |
3389 | "plexus-interpolation/archive/" | |
3390 | "plexus-interpolation-" version ".tar.gz")) | |
3391 | (sha256 | |
3392 | (base32 | |
fd75eb6c | 3393 | "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn")))) |
1e555562 HG |
3394 | (build-system ant-build-system) |
3395 | (arguments | |
3396 | `(#:jar-name "plexus-interpolation.jar" | |
3397 | #:source-dir "src/main")) | |
3398 | (native-inputs | |
3399 | `(("java-junit" ,java-junit) | |
3400 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
3401 | (home-page "http://codehaus-plexus.github.io/plexus-interpolation/") | |
3402 | (synopsis "Java components for interpolating ${} strings and the like") | |
3403 | (description "Plexus interpolator is a modular, flexible interpolation | |
3404 | framework for the expression language style commonly seen in Maven, Plexus, | |
3405 | and other related projects. | |
3406 | ||
3407 | It has its foundation in the @code{org.codehaus.plexus.utils.interpolation} | |
3408 | package within @code{plexus-utils}, but has been separated in order to allow | |
3409 | these two libraries to vary independently of one another.") | |
3410 | (license license:asl2.0))) | |
8f8ed9aa | 3411 | |
bb27eb0d JL |
3412 | (define-public java-plexus-classworlds |
3413 | (package | |
3414 | (name "java-plexus-classworlds") | |
3415 | (version "2.5.2") | |
3416 | (source (origin | |
3417 | (method url-fetch) | |
3418 | (uri (string-append "https://github.com/codehaus-plexus/" | |
3419 | "plexus-classworlds/archive/plexus-classworlds-" | |
3420 | version ".tar.gz")) | |
3421 | (sha256 | |
3422 | (base32 | |
3423 | "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g")))) | |
3424 | (build-system ant-build-system) | |
3425 | (arguments | |
3426 | `(#:jar-name "plexus-classworlds.jar" | |
3427 | #:source-dir "src/main" | |
3428 | #:tests? #f));; FIXME: we need to generate some resources as in pom.xml | |
3429 | (native-inputs | |
3430 | `(("java-junit" ,java-junit))) | |
3431 | (home-page "http://codehaus-plexus.github.io/plexus-classworlds/") | |
3432 | (synopsis "Java class loader framework") | |
f4548394 TGR |
3433 | (description "Plexus classworlds replaces the native @code{ClassLoader} |
3434 | mechanism of Java. It is especially useful for dynamic loading of application | |
bb27eb0d JL |
3435 | components.") |
3436 | (license license:asl2.0))) | |
3437 | ||
a7ad92ad | 3438 | (define java-plexus-container-default-bootstrap |
0726d4ea JL |
3439 | (package |
3440 | (name "java-plexus-container-default-bootstrap") | |
3441 | (version "1.7.1") | |
3442 | (source (origin | |
3443 | (method url-fetch) | |
3444 | (uri (string-append "https://github.com/codehaus-plexus/plexus-containers" | |
3445 | "/archive/plexus-containers-" version ".tar.gz")) | |
3446 | (sha256 | |
3447 | (base32 | |
3448 | "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc")))) | |
3449 | (build-system ant-build-system) | |
3450 | (arguments | |
3451 | `(#:jar-name "container-default.jar" | |
3452 | #:source-dir "plexus-container-default/src/main/java" | |
3453 | #:test-dir "plexus-container-default/src/test" | |
3454 | #:jdk ,icedtea-8 | |
3455 | #:tests? #f; requires plexus-archiver, which depends on this package | |
3456 | #:phases | |
3457 | (modify-phases %standard-phases | |
3458 | (add-before 'build 'copy-resources | |
3459 | (lambda _ | |
3460 | (copy-recursively | |
3461 | "plexus-container-default/src/main/resources/" | |
3462 | "build/classes") | |
3463 | #t))))) | |
3464 | (inputs | |
3465 | `(("worldclass" ,java-plexus-classworlds) | |
3466 | ("xbean" ,java-geronimo-xbean-reflect) | |
3467 | ("utils" ,java-plexus-utils) | |
3468 | ("junit" ,java-junit) | |
3469 | ("guava" ,java-guava))) | |
3470 | (home-page "https://github.com/codehaus-plexus/plexus-containers") | |
f4548394 | 3471 | (synopsis "Inversion-of-control container") |
0726d4ea | 3472 | (description "Plexus-default-container is Plexus' inversion-of-control |
f4548394 | 3473 | (@dfn{IoC}) container. It is composed of its public API and its default |
0726d4ea JL |
3474 | implementation.") |
3475 | (license license:asl2.0))) | |
3476 | ||
0858b9dc JL |
3477 | (define-public java-plexus-io |
3478 | (package | |
3479 | (name "java-plexus-io") | |
3480 | (version "3.0.0") | |
3481 | (source (origin | |
3482 | (method url-fetch) | |
3483 | (uri (string-append "https://github.com/codehaus-plexus/plexus-io" | |
3484 | "/archive/plexus-io-" version ".tar.gz")) | |
3485 | (sha256 | |
3486 | (base32 | |
3487 | "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw")))) | |
3488 | (build-system ant-build-system) | |
3489 | (arguments | |
3490 | `(#:jar-name "plexus-io.jar" | |
3491 | #:source-dir "src/main/java" | |
3492 | #:test-dir "src/test" | |
3493 | #:jdk ,icedtea-8 | |
3494 | #:phases | |
3495 | (modify-phases %standard-phases | |
3496 | (add-before 'build 'copy-resources | |
3497 | (lambda _ | |
3498 | (mkdir-p "build/classes/META-INF/plexus") | |
3499 | (copy-file "src/main/resources/META-INF/plexus/components.xml" | |
3500 | "build/classes/META-INF/plexus/components.xml") | |
3501 | #t))))) | |
3502 | (inputs | |
3503 | `(("utils" ,java-plexus-utils) | |
3504 | ("commons-io" ,java-commons-io) | |
3505 | ("java-jsr305" ,java-jsr305))) | |
3506 | (native-inputs | |
3507 | `(("junit" ,java-junit) | |
3508 | ("hamcrest" ,java-hamcrest-core) | |
3509 | ("guava" ,java-guava) | |
3510 | ("classworlds" ,java-plexus-classworlds) | |
3511 | ("xbean" ,java-geronimo-xbean-reflect) | |
3512 | ("container-default" ,java-plexus-container-default-bootstrap))) | |
3513 | (home-page "https://github.com/codehaus-plexus/plexus-io") | |
3514 | (synopsis "I/O plexus components") | |
3515 | (description "Plexus IO is a set of plexus components, which are designed | |
3516 | for use in I/O operations. This implementation using plexus components allows | |
3517 | reusing it in maven.") | |
3518 | (license license:asl2.0))) | |
3519 | ||
b51df3ca JL |
3520 | (define-public java-plexus-archiver |
3521 | (package | |
3522 | (name "java-plexus-archiver") | |
6f737ae6 | 3523 | (version "4.1.0") |
b51df3ca JL |
3524 | (source (origin |
3525 | (method url-fetch) | |
3526 | (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver" | |
3527 | "/archive/plexus-archiver-" version ".tar.gz")) | |
3528 | (sha256 | |
3529 | (base32 | |
6f737ae6 | 3530 | "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg")))) |
b51df3ca JL |
3531 | (build-system ant-build-system) |
3532 | (arguments | |
3533 | `(#:jar-name "plexus-archiver.jar" | |
3534 | #:source-dir "src/main/java" | |
3535 | #:jdk ,icedtea-8 | |
3536 | #:test-dir "src/test" | |
3537 | #:test-exclude (list "**/Abstract*.java" "**/Base*.java") | |
3538 | #:phases | |
3539 | (modify-phases %standard-phases | |
3540 | (add-before 'check 'remove-failing | |
3541 | (lambda _ | |
3542 | ;; Requires an older version of plexus container | |
3543 | (delete-file | |
2c8ac364 MW |
3544 | "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java") |
3545 | #t)) | |
6f737ae6 JL |
3546 | (add-before 'check 'fix-test-building |
3547 | (lambda _ | |
3548 | (substitute* "build.xml" | |
3549 | (("srcdir=\"src/test\"") "srcdir=\"src/test/java\"")) | |
3550 | #t)) | |
b51df3ca JL |
3551 | (add-before 'build 'copy-resources |
3552 | (lambda _ | |
3553 | (mkdir-p "build/classes/META-INF/plexus") | |
3554 | (copy-file "src/main/resources/META-INF/plexus/components.xml" | |
3555 | "build/classes/META-INF/plexus/components.xml") | |
3556 | #t))))) | |
3557 | (inputs | |
3558 | `(("utils" ,java-plexus-utils) | |
3559 | ("commons-io" ,java-commons-io) | |
3560 | ("snappy" ,java-iq80-snappy) | |
3561 | ("io" ,java-plexus-io) | |
3562 | ("compress" ,java-commons-compress) | |
3563 | ("container-default" ,java-plexus-container-default-bootstrap) | |
3564 | ("snappy" ,java-snappy) | |
3565 | ("java-jsr305" ,java-jsr305))) | |
3566 | (native-inputs | |
6f737ae6 JL |
3567 | `(("java-hamcrest-core" ,java-hamcrest-core) |
3568 | ("junit" ,java-junit) | |
b51df3ca JL |
3569 | ("classworld" ,java-plexus-classworlds) |
3570 | ("xbean" ,java-geronimo-xbean-reflect) | |
3571 | ("xz" ,java-tukaani-xz) | |
3572 | ("guava" ,java-guava))) | |
3573 | (home-page "https://github.com/codehaus-plexus/plexus-archiver") | |
3574 | (synopsis "Archiver component of the Plexus project") | |
3575 | (description "Plexus-archiver contains a component to deal with project | |
3576 | archives (jar).") | |
3577 | (license license:asl2.0))) | |
3578 | ||
a0837294 JL |
3579 | (define-public java-plexus-container-default |
3580 | (package | |
3581 | (inherit java-plexus-container-default-bootstrap) | |
3582 | (name "java-plexus-container-default") | |
3583 | (arguments | |
3584 | `(#:jar-name "container-default.jar" | |
3585 | #:source-dir "plexus-container-default/src/main/java" | |
3586 | #:test-dir "plexus-container-default/src/test" | |
3587 | #:test-exclude (list ;"**/*Test.java" | |
3588 | "**/Abstract*.java" | |
3589 | ;; Requires plexus-hierarchy | |
3590 | "**/PlexusHierarchyTest.java" | |
3591 | ;; Failures | |
3592 | "**/ComponentRealmCompositionTest.java" | |
3593 | "**/PlexusContainerTest.java") | |
3594 | #:jdk ,icedtea-8 | |
3595 | #:phases | |
3596 | (modify-phases %standard-phases | |
3597 | (add-before 'build 'copy-resources | |
3598 | (lambda _ | |
3599 | (copy-recursively | |
3600 | "plexus-container-default/src/main/resources/" | |
3601 | "build/classes") | |
3602 | #t)) | |
3603 | (add-before 'check 'fix-paths | |
3604 | (lambda _ | |
3605 | (let ((dir "plexus-container-default/src/test/java/org/codehaus")) | |
3606 | (substitute* | |
3607 | (string-append | |
3608 | dir "/plexus/component/composition/" | |
3609 | "ComponentRealmCompositionTest.java") | |
3610 | (("src/test") "plexus-container-default/src/test")) | |
3611 | #t)))))) | |
3612 | (inputs | |
3613 | `(("worldclass" ,java-plexus-classworlds) | |
3614 | ("xbean" ,java-geronimo-xbean-reflect) | |
3615 | ("utils" ,java-plexus-utils) | |
3616 | ("junit" ,java-junit) | |
3617 | ("guava" ,java-guava))) | |
3618 | (native-inputs | |
3619 | `(("archiver" ,java-plexus-archiver) | |
3620 | ("hamcrest" ,java-hamcrest-core))))) | |
3621 | ||
3214afab JL |
3622 | (define-public java-plexus-component-annotations |
3623 | (package | |
3624 | (inherit java-plexus-container-default) | |
3625 | (name "java-plexus-component-annotations") | |
3626 | (arguments | |
3627 | `(#:jar-name "plexus-component-annotations.jar" | |
3628 | #:source-dir "plexus-component-annotations/src/main/java" | |
3629 | #:tests? #f)); no tests | |
3630 | (inputs '()) | |
3631 | (native-inputs '()) | |
3632 | (synopsis "Plexus descriptors generator") | |
3633 | (description "This package is a Maven plugin to generate Plexus descriptors | |
3634 | from source tags and class annotations."))) | |
3635 | ||
4f77ba17 JL |
3636 | (define-public java-plexus-cipher |
3637 | (package | |
3638 | (name "java-plexus-cipher") | |
3639 | (version "1.7") | |
3640 | (source (origin | |
3641 | (method url-fetch) | |
3642 | (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher" | |
3643 | "/archive/plexus-cipher-" version ".tar.gz")) | |
3644 | (sha256 | |
3645 | (base32 | |
3646 | "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3")))) | |
3647 | (build-system ant-build-system) | |
3648 | (arguments | |
3649 | `(#:jar-name "plexus-cipher.jar" | |
3650 | #:source-dir "src/main/java" | |
3651 | #:jdk ,icedtea-8 | |
3652 | #:tests? #f; FIXME: requires sisu-inject-bean | |
3653 | #:phases | |
3654 | (modify-phases %standard-phases | |
3655 | (add-before 'build 'copy-resources | |
3656 | (lambda _ | |
3657 | (copy-recursively "src/main/resources" "build/classes") | |
3658 | (mkdir-p "build/classes/META-INF/sisu") | |
3659 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
3660 | (lambda _ | |
3661 | (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n"))) | |
3662 | #t))))) | |
3663 | (inputs | |
3664 | `(("java-cdi-api" ,java-cdi-api) | |
3665 | ("java-javax-inject" ,java-javax-inject))) | |
3666 | (home-page "https://github.com/sonatype/plexus-cipher") | |
3667 | (synopsis "Encryption/decryption Component") | |
3668 | (description "Plexus-cipher contains a component to deal with encryption | |
3669 | and decryption.") | |
3670 | (license license:asl2.0))) | |
3671 | ||
239126d4 JL |
3672 | (define-public java-plexus-compiler-api |
3673 | (package | |
3674 | (name "java-plexus-compiler-api") | |
a70182b0 | 3675 | (version "2.8.4") |
239126d4 JL |
3676 | (source (origin |
3677 | (method url-fetch) | |
3678 | (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler" | |
3679 | "/archive/plexus-compiler-" version ".tar.gz")) | |
3680 | (sha256 | |
3681 | (base32 | |
a70182b0 | 3682 | "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h")))) |
239126d4 JL |
3683 | (build-system ant-build-system) |
3684 | (arguments | |
3685 | `(#:jar-name "plexus-compiler-api.jar" | |
3686 | #:source-dir "plexus-compiler-api/src/main/java" | |
3687 | #:jdk ,icedtea-8 | |
3688 | #:test-dir "plexus-compiler-api/src/test")) | |
3689 | (inputs | |
3690 | `(("java-plexus-container-default" ,java-plexus-container-default) | |
3691 | ("java-plexus-util" ,java-plexus-utils))) | |
3692 | (native-inputs | |
3693 | `(("java-junit" ,java-junit))) | |
3694 | (home-page "https://github.com/codehaus-plexus/plexus-compiler") | |
3695 | (synopsis "Plexus Compilers component's API to manipulate compilers") | |
3696 | (description "This package contains the API used by components to manipulate | |
3697 | compilers.") | |
3698 | (license (list license:asl2.0 | |
3699 | license:expat)))) | |
3700 | ||
f8a519fa JL |
3701 | (define-public java-plexus-compiler-javac |
3702 | (package | |
3703 | (inherit java-plexus-compiler-api) | |
3704 | (name "java-plexus-compiler-javac") | |
3705 | (arguments | |
3706 | `(#:jar-name "plexus-compiler-javac.jar" | |
3707 | #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java" | |
3708 | #:jdk ,icedtea-8 | |
3709 | #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package. | |
3710 | #:test-dir "plexus-compilers/plexus-compiler-javac/src/test")) | |
3711 | (inputs | |
3712 | `(("java-plexus-compiler-api" ,java-plexus-compiler-api) | |
3713 | ("java-plexus-utils" ,java-plexus-utils) | |
3714 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
3715 | (native-inputs | |
3716 | `(("java-junit" ,java-junit))) | |
3717 | (synopsis "Javac Compiler support for Plexus Compiler component") | |
3718 | (description "This package contains the Javac Compiler support for Plexus | |
3719 | Compiler component."))) | |
3720 | ||
0aa85081 JL |
3721 | (define-public java-plexus-sec-dispatcher |
3722 | (package | |
3723 | (name "java-plexus-sec-dispatcher") | |
3724 | (version "1.4") ;; Newest release listed at the Maven Central Repository. | |
3725 | (source (origin | |
3726 | ;; This project doesn't tag releases or publish tarballs, so we take | |
3727 | ;; the "prepare release plexus-sec-dispatcher-1.4" git commit. | |
3728 | (method url-fetch) | |
3729 | (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/" | |
3730 | "archive/7db8f88048.tar.gz")) | |
3731 | (sha256 | |
3732 | (base32 | |
3733 | "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp")) | |
3734 | (file-name (string-append name "-" version ".tar.gz")))) | |
3735 | (arguments | |
3736 | `(#:jar-name "plexus-sec-dispatcher.jar" | |
3737 | #:source-dir "src/main/java" | |
3738 | #:jdk ,icedtea-8 | |
3739 | #:phases | |
3740 | (modify-phases %standard-phases | |
3741 | (add-before 'build 'generate-models | |
3742 | (lambda* (#:key inputs #:allow-other-keys) | |
3743 | (define (modello-single-mode file version mode) | |
2c8ac364 MW |
3744 | (invoke "java" |
3745 | "org.codehaus.modello.ModelloCli" | |
3746 | file mode "src/main/java" version | |
3747 | "false" "true")) | |
0aa85081 | 3748 | (let ((file "src/main/mdo/settings-security.mdo")) |
0aa85081 JL |
3749 | (modello-single-mode file "1.0.0" "java") |
3750 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
2c8ac364 MW |
3751 | (modello-single-mode file "1.0.0" "xpp3-writer")) |
3752 | #t)) | |
0aa85081 JL |
3753 | (add-before 'build 'generate-components.xml |
3754 | (lambda _ | |
3755 | (mkdir-p "build/classes/META-INF/plexus") | |
3756 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
3757 | (lambda _ | |
3758 | (display | |
3759 | "<component-set>\n | |
3760 | <components>\n | |
3761 | <component>\n | |
3762 | <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n | |
3763 | <role-hint>default</role-hint>\n | |
3764 | <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n | |
3765 | <description></description>\n | |
3766 | <requirements>\n | |
3767 | <requirement>\n | |
3768 | <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n | |
3769 | <field-name>_cipher</field-name>\n | |
3770 | </requirement>\n | |
3771 | <requirement>\n | |
3772 | <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n | |
3773 | <field-name>_decryptors</field-name>\n | |
3774 | </requirement>\n | |
3775 | </requirements>\n | |
3776 | <configuration>\n | |
3777 | <_configuration-file>~/.settings-security.xml</_configuration-file>\n | |
3778 | </configuration>\n | |
3779 | </component>\n | |
3780 | </components>\n | |
2c8ac364 MW |
3781 | </component-set>\n"))) |
3782 | #t)) | |
0aa85081 JL |
3783 | (add-before 'check 'fix-paths |
3784 | (lambda _ | |
2c8ac364 MW |
3785 | (copy-recursively "src/test/resources" "target") |
3786 | #t))))) | |
0aa85081 JL |
3787 | (inputs |
3788 | `(("java-plexus-cipher" ,java-plexus-cipher))) | |
3789 | (native-inputs | |
3790 | `(("java-modello-core" ,java-modello-core) | |
3791 | ;; for modello: | |
3792 | ("java-plexus-container-default" ,java-plexus-container-default) | |
3793 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
3794 | ("java-plexus-utils" ,java-plexus-utils) | |
3795 | ("java-guava" ,java-guava) | |
3796 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
3797 | ("java-sisu-build-api" ,java-sisu-build-api) | |
3798 | ;; modello plugins: | |
3799 | ("java-modellop-plugins-java" ,java-modello-plugins-java) | |
3800 | ("java-modellop-plugins-xml" ,java-modello-plugins-xml) | |
3801 | ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3) | |
3802 | ;; for tests | |
3803 | ("java-junit" ,java-junit))) | |
3804 | (build-system ant-build-system) | |
3805 | (home-page "https://github.com/sonatype/plexus-sec-dispatcher") | |
3806 | (synopsis "Plexus Security Dispatcher Component") | |
3807 | (description "This package is the Plexus Security Dispatcher Component. | |
3808 | This component decrypts a string passed to it.") | |
3809 | (license license:asl2.0))) | |
3810 | ||
7d65489f JL |
3811 | (define-public java-plexus-cli |
3812 | (package | |
3813 | (name "java-plexus-cli") | |
3814 | (version "1.7") | |
3815 | (source (origin | |
3816 | (method git-fetch) | |
3817 | (uri (git-reference | |
3818 | (url "https://github.com/sonatype/plexus-cli") | |
3819 | (commit "a776afa6bca84e5107bedb69440329cdb24ed645"))) | |
3820 | (file-name (string-append name "-" version)) | |
3821 | (sha256 | |
3822 | (base32 | |
3823 | "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx")))) | |
3824 | (build-system ant-build-system) | |
3825 | (arguments | |
3826 | `(#:jar-name "plexus-cli.jar" | |
3827 | #:source-dir "src/main/java" | |
3828 | #:jdk ,icedtea-8 | |
3829 | #:test-dir "src/test")) | |
3830 | (inputs | |
3831 | `(("java-commons-cli" ,java-commons-cli) | |
3832 | ("java-plexus-container-default" ,java-plexus-container-default) | |
3833 | ("java-plexus-classworlds" ,java-plexus-classworlds))) | |
3834 | (native-inputs | |
3835 | `(("java-plexus-utils" ,java-plexus-utils) | |
3836 | ("java-junit" ,java-junit) | |
3837 | ("java-guava" ,java-guava))) | |
3838 | (home-page "https://codehaus-plexus.github.io/plexus-cli") | |
3839 | (synopsis "CLI building library for plexus") | |
3840 | (description "This package is a library to help creating CLI around | |
3841 | Plexus components.") | |
3842 | (license license:asl2.0))) | |
3843 | ||
8f524749 JL |
3844 | (define-public java-sisu-build-api |
3845 | (package | |
3846 | (name "java-sisu-build-api") | |
3847 | (version "0.0.7") | |
3848 | (source (origin | |
3849 | (method url-fetch) | |
3850 | (uri (string-append "https://github.com/sonatype/sisu-build-api/" | |
3851 | "archive/plexus-build-api-" version ".tar.gz")) | |
3852 | (sha256 | |
3853 | (base32 | |
3854 | "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2")))) | |
3855 | (build-system ant-build-system) | |
3856 | (arguments | |
3857 | `(#:jar-name "sisu-build-api.jar" | |
3858 | #:source-dir "src/main/java" | |
3859 | #:jdk ,icedtea-8 | |
3860 | #:tests? #f; FIXME: how to run the tests? | |
3861 | #:phases | |
3862 | (modify-phases %standard-phases | |
3863 | (add-before 'build 'copy-resources | |
3864 | (lambda _ | |
3865 | (copy-recursively "src/main/resources" "build/classes") | |
3866 | (substitute* (find-files "build/classes") | |
3867 | (("\\$\\{project.version\\}") ,version)) | |
3868 | #t)) | |
3869 | (add-before 'build 'generate-plexus-compontent | |
3870 | (lambda _ | |
3871 | (mkdir-p "build/classes/META-INF/plexus") | |
3872 | ;; This file is required for plexus to inject this package. | |
3873 | ;; FIXME: how is it generated? | |
3874 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
3875 | (lambda _ | |
3876 | (display | |
3877 | "<component-set>\n | |
3878 | <components>\n | |
3879 | <component>\n | |
3880 | <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n | |
3881 | <role-hint>default</role-hint>\n | |
3882 | <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n | |
3883 | <description>Filesystem based non-incremental build context implementation\n | |
3884 | which behaves as if all files were just created.</description>\n | |
3885 | </component>\n | |
3886 | </components>\n | |
3887 | </component-set>\n"))) | |
3888 | #t))))) | |
3889 | (inputs | |
3890 | `(("java-plexus-utils" ,java-plexus-utils) | |
3891 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
3892 | (home-page "https://github.com/sonatype/sisu-build-api/") | |
3893 | (synopsis "Base build API for maven") | |
3894 | (description "This package contains the base build API for maven and | |
3895 | a default implementation of it. This API is about scanning files in a | |
3896 | project and determining what files need to be rebuilt.") | |
3897 | (license license:asl2.0))) | |
3898 | ||
b26c8b61 JL |
3899 | (define-public java-modello-core |
3900 | (package | |
3901 | (name "java-modello-core") | |
3902 | (version "1.9.1") | |
3903 | (source (origin | |
3904 | (method url-fetch) | |
3905 | (uri (string-append "https://github.com/codehaus-plexus/modello" | |
3906 | "/archive/modello-" version ".tar.gz")) | |
3907 | (sha256 | |
3908 | (base32 | |
3909 | "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh")))) | |
3910 | (build-system ant-build-system) | |
3911 | (arguments | |
3912 | `(#:jar-name "modello-core.jar" | |
3913 | #:source-dir "modello-core/src/main/java" | |
3914 | #:test-dir "modello-core/src/test" | |
3915 | #:main-class "org.codehaus.modello.ModelloCli" | |
3916 | #:jdk ,icedtea-8 | |
3917 | #:phases | |
3918 | (modify-phases %standard-phases | |
3919 | (add-before 'build 'copy-resources | |
3920 | (lambda _ | |
3921 | (mkdir-p "build/classes/META-INF/plexus") | |
3922 | (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml" | |
3923 | "build/classes/META-INF/plexus/components.xml") | |
3924 | #t)) | |
3925 | (add-before 'check 'fix-tests | |
3926 | (lambda _ | |
3927 | (with-directory-excursion "modello-core/src/test/java/org/codehaus" | |
3928 | (substitute* '("modello/core/DefaultModelloCoreTest.java" | |
3929 | "modello/core/io/ModelReaderTest.java") | |
3930 | (("src/test") "modello-core/src/test"))) | |
3931 | #t))))) | |
3932 | (inputs | |
3933 | `(("java-plexus-utils" ,java-plexus-utils) | |
3934 | ("java-plexus-container-default" ,java-plexus-container-default) | |
3935 | ("java-sisu-build-api" ,java-sisu-build-api))) | |
3936 | (native-inputs | |
3937 | `(("java-junit" ,java-junit) | |
3938 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
3939 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
3940 | ("java-guava" ,java-guava))) | |
3941 | (home-page "http://codehaus-plexus.github.io/modello/") | |
3942 | (synopsis "Framework for code generation from a simple model") | |
3943 | (description "Modello is a framework for code generation from a simple model. | |
3944 | ||
3945 | Modello generates code from a simple model format: based on a plugin | |
3946 | architecture, various types of code and descriptors can be generated from the | |
3947 | single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers, | |
3948 | XSD and documentation.") | |
3949 | (license (list | |
3950 | license:expat | |
3951 | ;; Although this package uses only files licensed under expat, | |
3952 | ;; other parts of the source are licensed under different | |
3953 | ;; licenses. We include them to be inherited by other packages. | |
3954 | license:asl2.0 | |
3955 | ;; Some files in modello-plugin-java are licensed under a | |
3956 | ;; 5-clause BSD license. | |
3957 | (license:non-copyleft | |
3958 | (string-append "file:///modello-plugins/modello-plugin-java/" | |
3959 | "src/main/java/org/codehaus/modello/plugin/" | |
3960 | "java/javasource/JNaming.java")))))) | |
3961 | ||
fc620bef JL |
3962 | (define-public java-modello-plugins-java |
3963 | (package | |
3964 | (inherit java-modello-core) | |
3965 | (name "java-modello-plugins-java") | |
3966 | (arguments | |
3967 | `(#:jar-name "modello-plugins-java.jar" | |
3968 | #:source-dir "modello-plugins/modello-plugin-java/src/main/java" | |
3969 | #:test-dir "modello-plugins/modello-plugin-java/src/test" | |
3970 | #:jdk ,icedtea-8 | |
3971 | #:tests? #f; requires maven-model, which depends on this package | |
3972 | #:phases | |
3973 | (modify-phases %standard-phases | |
3974 | (add-before 'build 'copy-resources | |
3975 | (lambda _ | |
3976 | (mkdir-p "build/classes") | |
3977 | (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources" | |
3978 | "build/classes") | |
3979 | #t))))) | |
3980 | (inputs | |
3981 | `(("java-modello-core" ,java-modello-core) | |
3982 | ,@(package-inputs java-modello-core))) | |
3983 | (synopsis "Modello Java Plugin") | |
3984 | (description "Modello Java Plugin generates Java objects for the model."))) | |
3985 | ||
a0ce95ba JL |
3986 | (define-public java-modello-plugins-xml |
3987 | (package | |
3988 | (inherit java-modello-core) | |
3989 | (name "java-modello-plugins-xml") | |
3990 | (arguments | |
3991 | `(#:jar-name "modello-plugins-xml.jar" | |
3992 | #:source-dir "modello-plugins/modello-plugin-xml/src/main/java" | |
3993 | #:test-dir "modello-plugins/modello-plugin-xml/src/test" | |
3994 | #:jdk ,icedtea-8 | |
3995 | #:phases | |
3996 | (modify-phases %standard-phases | |
3997 | (add-before 'build 'copy-resources | |
3998 | (lambda _ | |
3999 | (mkdir-p "build/classes") | |
4000 | (copy-recursively | |
4001 | "modello-plugins/modello-plugin-xml/src/main/resources" | |
4002 | "build/classes") | |
4003 | #t)) | |
4004 | (add-before 'check 'fix-paths | |
4005 | (lambda _ | |
4006 | (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test" | |
4007 | (substitute* | |
4008 | "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java" | |
2c8ac364 MW |
4009 | (("src/test") "modello-plugins/modello-plugin-xml/src/test"))) |
4010 | #t))))) | |
a0ce95ba JL |
4011 | (inputs |
4012 | `(("java-modello-core" ,java-modello-core) | |
4013 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
4014 | ,@(package-inputs java-modello-core))) | |
4015 | (synopsis "Modello XML Plugin") | |
4016 | (description "Modello XML Plugin contains shared code for every plugins | |
4017 | working on XML representation of the model."))) | |
4018 | ||
e4708560 JL |
4019 | (define-public java-modello-test |
4020 | (package | |
4021 | (inherit java-modello-core) | |
4022 | (name "java-modello-test") | |
4023 | (arguments | |
4024 | `(#:jar-name "modello-test.jar" | |
4025 | #:source-dir "modello-test/src/main/java" | |
4026 | #:tests? #f; no tests | |
4027 | #:jdk ,icedtea-8)) | |
4028 | (inputs | |
4029 | `(("java-plexus-utils" ,java-plexus-utils) | |
4030 | ("java-plexus-compiler-api" ,java-plexus-compiler-api) | |
4031 | ("java-plexus-compiler-javac" ,java-plexus-compiler-javac) | |
4032 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
4033 | (synopsis "Modello test package") | |
4034 | (description "The modello test package contains the basis to create | |
4035 | Modello generator unit-tests, including sample models and xml files to test | |
4036 | every feature for every plugin."))) | |
4037 | ||
36607d3b JL |
4038 | (define-public java-modello-plugins-xpp3 |
4039 | (package | |
4040 | (inherit java-modello-core) | |
4041 | (name "java-modello-plugins-xpp3") | |
4042 | (arguments | |
4043 | `(#:jar-name "modello-plugins-xpp3.jar" | |
4044 | #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java" | |
4045 | #:test-dir "modello-plugins/modello-plugin-xpp3/src/test" | |
4046 | ;; One of the test dependencies is maven-model which depends on this package. | |
4047 | #:tests? #f | |
4048 | #:jdk ,icedtea-8 | |
4049 | #:phases | |
4050 | (modify-phases %standard-phases | |
4051 | (add-before 'build 'copy-resources | |
4052 | (lambda _ | |
4053 | (mkdir-p "build/classes") | |
4054 | (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources" | |
4055 | "build/classes") | |
4056 | #t))))) | |
4057 | (inputs | |
4058 | `(("java-modello-core" ,java-modello-core) | |
4059 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
4060 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) | |
4061 | ,@(package-inputs java-modello-core))) | |
4062 | (native-inputs | |
4063 | `(("java-xmlunit" ,java-xmlunit) | |
4064 | ("java-modello-test" ,java-modello-test) | |
4065 | ,@(package-native-inputs java-modello-core))) | |
4066 | (synopsis "Modello XPP3 Plugin") | |
4067 | (description "The modello XPP3 plugin generates XML readers and writers based | |
4068 | on the XPP3 API (XML Pull Parser)."))) | |
4069 | ||
8f8ed9aa RW |
4070 | (define-public java-asm |
4071 | (package | |
4072 | (name "java-asm") | |
d0e9ded7 | 4073 | (version "6.0") |
8f8ed9aa RW |
4074 | (source (origin |
4075 | (method url-fetch) | |
4076 | (uri (string-append "http://download.forge.ow2.org/asm/" | |
4077 | "asm-" version ".tar.gz")) | |
4078 | (sha256 | |
4079 | (base32 | |
d0e9ded7 | 4080 | "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00")))) |
8f8ed9aa | 4081 | (build-system ant-build-system) |
d0e9ded7 | 4082 | (propagated-inputs |
9d216017 GB |
4083 | `(("java-aqute-bndlib" ,java-aqute-bndlib) |
4084 | ("java-aqute-libg" ,java-aqute-libg))) | |
8f8ed9aa RW |
4085 | (arguments |
4086 | `(#:build-target "compile" | |
4087 | ;; The tests require an old version of Janino, which no longer compiles | |
4088 | ;; with the JDK7. | |
4089 | #:tests? #f | |
d0e9ded7 GB |
4090 | #:make-flags |
4091 | (list | |
4092 | ;; We don't need these extra ant tasks, but the build system asks us to | |
4093 | ;; provide a path anyway. | |
4094 | "-Dobjectweb.ant.tasks.path=dummy-path" | |
4095 | ;; The java-aqute.bndlib JAR file will be put onto the classpath and | |
4096 | ;; used during the build automatically by ant-build-system, but | |
4097 | ;; java-asm's build.xml fails unless we provide something here. | |
4098 | "-Dbiz.aQute.bnd.path=dummy-path") | |
8f8ed9aa RW |
4099 | #:phases |
4100 | (modify-phases %standard-phases | |
4101 | (add-before 'install 'build-jars | |
4102 | (lambda* (#:key make-flags #:allow-other-keys) | |
4103 | ;; We cannot use the "jar" target because it depends on a couple | |
4104 | ;; of unpackaged, complicated tools. | |
4105 | (mkdir "dist") | |
2c8ac364 MW |
4106 | (invoke "jar" |
4107 | "-cf" (string-append "dist/asm-" ,version ".jar") | |
4108 | "-C" "output/build/tmp" "."))) | |
8f8ed9aa RW |
4109 | (replace 'install |
4110 | (install-jars "dist"))))) | |
4111 | (native-inputs | |
4112 | `(("java-junit" ,java-junit))) | |
4113 | (home-page "http://asm.ow2.org/") | |
4114 | (synopsis "Very small and fast Java bytecode manipulation framework") | |
4115 | (description "ASM is an all purpose Java bytecode manipulation and | |
4116 | analysis framework. It can be used to modify existing classes or dynamically | |
4117 | generate classes, directly in binary form. The provided common | |
4118 | transformations and analysis algorithms allow to easily assemble custom | |
4119 | complex transformations and code analysis tools.") | |
4120 | (license license:bsd-3))) | |
607fe24a | 4121 | |
bfb4004d GB |
4122 | (define java-asm-bootstrap |
4123 | (package | |
4124 | (inherit java-asm) | |
4125 | (name "java-asm-bootstrap") | |
4126 | (arguments | |
4127 | (substitute-keyword-arguments (package-arguments java-asm) | |
4128 | ((#:tests? _) #f))) | |
4129 | (native-inputs `()) | |
4130 | (propagated-inputs | |
4131 | `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap) | |
4132 | ("java-aqute-libg" ,java-aqute-libg-bootstrap) | |
4133 | ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib) | |
de99ba7e | 4134 | (delete `("java-aqute-libg" ,java-aqute-libg) |
bfb4004d GB |
4135 | (package-inputs java-asm))))))) |
4136 | ||
607fe24a RW |
4137 | (define-public java-cglib |
4138 | (package | |
4139 | (name "java-cglib") | |
4140 | (version "3.2.4") | |
5c44505b TGR |
4141 | (source |
4142 | (origin | |
4143 | (method git-fetch) | |
4144 | (uri (git-reference | |
4145 | (url "https://github.com/cglib/cglib.git") | |
4146 | (commit (string-append | |
4147 | "RELEASE_" | |
4148 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) | |
4149 | version))))) | |
4150 | (file-name (git-file-name name version)) | |
4151 | (sha256 | |
4152 | (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v")))) | |
607fe24a RW |
4153 | (build-system ant-build-system) |
4154 | (arguments | |
4155 | `(;; FIXME: tests fail because junit runs | |
4156 | ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem | |
4157 | ;; to describe a test at all. | |
4158 | #:tests? #f | |
4159 | #:jar-name "cglib.jar" | |
4160 | #:phases | |
4161 | (modify-phases %standard-phases | |
4162 | (add-after 'unpack 'chdir | |
4163 | (lambda _ (chdir "cglib") #t))))) | |
4164 | (inputs | |
4165 | `(("java-asm" ,java-asm) | |
4166 | ("java-junit" ,java-junit))) | |
4167 | (home-page "https://github.com/cglib/cglib/") | |
4168 | (synopsis "Java byte code generation library") | |
4169 | (description "The byte code generation library CGLIB is a high level API | |
4170 | to generate and transform Java byte code.") | |
4171 | (license license:asl2.0))) | |
33e34bfe RW |
4172 | |
4173 | (define-public java-objenesis | |
4174 | (package | |
4175 | (name "java-objenesis") | |
4176 | (version "2.5.1") | |
4177 | (source (origin | |
4178 | (method url-fetch) | |
4179 | (uri (string-append "https://github.com/easymock/objenesis/" | |
4180 | "archive/" version ".tar.gz")) | |
4181 | (file-name (string-append "objenesis-" version ".tar.gz")) | |
4182 | (sha256 | |
4183 | (base32 | |
4184 | "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6")))) | |
4185 | (build-system ant-build-system) | |
4186 | (arguments | |
4187 | `(#:jar-name "objenesis.jar" | |
4188 | #:source-dir "main/src/" | |
4189 | #:test-dir "main/src/test/")) | |
4190 | (native-inputs | |
4191 | `(("java-junit" ,java-junit) | |
4192 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4193 | (home-page "http://objenesis.org/") | |
4194 | (synopsis "Bypass the constructor when creating an object") | |
4195 | (description "Objenesis is a small Java library that serves one purpose: | |
4196 | to instantiate a new object of a particular class. It is common to see | |
4197 | restrictions in libraries stating that classes must require a default | |
4198 | constructor. Objenesis aims to overcome these restrictions by bypassing the | |
4199 | constructor on object instantiation.") | |
4200 | (license license:asl2.0))) | |
ae589876 RW |
4201 | |
4202 | (define-public java-easymock | |
4203 | (package | |
4204 | (name "java-easymock") | |
4205 | (version "3.4") | |
4206 | (source (origin | |
4207 | (method url-fetch) | |
4208 | (uri (string-append "https://github.com/easymock/easymock/" | |
4209 | "archive/easymock-" version ".tar.gz")) | |
4210 | (sha256 | |
4211 | (base32 | |
4212 | "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi")))) | |
4213 | (build-system ant-build-system) | |
4214 | (arguments | |
4215 | `(#:jar-name "easymock.jar" | |
4216 | #:source-dir "core/src/main" | |
4217 | #:test-dir "core/src/test" | |
4218 | #:phases | |
4219 | (modify-phases %standard-phases | |
4220 | ;; FIXME: Android support requires the following packages to be | |
4221 | ;; available: com.google.dexmaker.stock.ProxyBuilder | |
4222 | (add-after 'unpack 'delete-android-support | |
4223 | (lambda _ | |
4224 | (with-directory-excursion "core/src/main/java/org/easymock/internal" | |
4225 | (substitute* "MocksControl.java" | |
4226 | (("AndroidSupport.isAndroid\\(\\)") "false") | |
4227 | (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") "")) | |
4228 | (delete-file "AndroidClassProxyFactory.java")) | |
4229 | #t)) | |
4230 | (add-after 'unpack 'delete-broken-tests | |
4231 | (lambda _ | |
4232 | (with-directory-excursion "core/src/test/java/org/easymock" | |
4233 | ;; This test depends on dexmaker. | |
4234 | (delete-file "tests2/ClassExtensionHelperTest.java") | |
4235 | ||
4236 | ;; This is not a test. | |
4237 | (delete-file "tests/BaseEasyMockRunnerTest.java") | |
4238 | ||
4239 | ;; This test should be executed with a different runner... | |
4240 | (delete-file "tests2/EasyMockAnnotationsTest.java") | |
4241 | ;; ...but deleting it means that we also have to delete these | |
4242 | ;; dependent files. | |
4243 | (delete-file "tests2/EasyMockRunnerTest.java") | |
4244 | (delete-file "tests2/EasyMockRuleTest.java") | |
4245 | ||
4246 | ;; This test fails because the file "easymock.properties" does | |
4247 | ;; not exist. | |
4248 | (delete-file "tests2/EasyMockPropertiesTest.java")) | |
4249 | #t))))) | |
4250 | (inputs | |
4251 | `(("java-asm" ,java-asm) | |
4252 | ("java-cglib" ,java-cglib) | |
4253 | ("java-objenesis" ,java-objenesis))) | |
4254 | (native-inputs | |
4255 | `(("java-junit" ,java-junit) | |
4256 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4257 | (home-page "http://easymock.org") | |
4258 | (synopsis "Java library providing mock objects for unit tests") | |
4259 | (description "EasyMock is a Java library that provides an easy way to use | |
4260 | mock objects in unit testing.") | |
4261 | (license license:asl2.0))) | |
7aa37023 | 4262 | |
f12ad6c7 RW |
4263 | (define-public java-jmock-1 |
4264 | (package | |
4265 | (name "java-jmock") | |
4266 | (version "1.2.0") | |
4267 | (source (origin | |
4268 | (method url-fetch) | |
4269 | (uri (string-append "https://github.com/jmock-developers/" | |
4270 | "jmock-library/archive/" version ".tar.gz")) | |
4271 | (file-name (string-append "jmock-" version ".tar.gz")) | |
4272 | (sha256 | |
4273 | (base32 | |
4274 | "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0")))) | |
4275 | (build-system ant-build-system) | |
4276 | (arguments | |
4277 | `(#:build-target "jars" | |
4278 | #:test-target "run.tests" | |
4279 | #:phases | |
4280 | (modify-phases %standard-phases | |
4281 | (replace 'install (install-jars "build"))))) | |
4282 | (home-page "http://www.jmock.org") | |
4283 | (synopsis "Mock object library for test-driven development") | |
4284 | (description "JMock is a library that supports test-driven development of | |
4285 | Java code with mock objects. Mock objects help you design and test the | |
4286 | interactions between the objects in your programs. | |
4287 | ||
4288 | The jMock library | |
4289 | ||
4290 | @itemize | |
4291 | @item makes it quick and easy to define mock objects | |
4292 | @item lets you precisely specify the interactions between | |
4293 | your objects, reducing the brittleness of your tests | |
4294 | @item plugs into your favourite test framework | |
4295 | @item is easy to extend. | |
4296 | @end itemize\n") | |
4297 | (license license:bsd-3))) | |
4298 | ||
045124ae JL |
4299 | (define-public java-jmock |
4300 | (package | |
4301 | (inherit java-jmock-1) | |
4302 | (name "java-jmock") | |
4303 | (version "2.8.2") | |
4304 | (source (origin | |
4305 | (method url-fetch) | |
4306 | (uri (string-append "https://github.com/jmock-developers/" | |
4307 | "jmock-library/archive/" version ".tar.gz")) | |
4308 | (file-name (string-append name "-" version ".tar.gz")) | |
4309 | (sha256 | |
4310 | (base32 | |
4311 | "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0")))) | |
4312 | (inputs | |
4313 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
4314 | ("java-asm" ,java-asm) | |
4315 | ("java-bsh" ,java-bsh) | |
4316 | ("java-junit" ,java-junit))) | |
4317 | (native-inputs | |
4318 | `(("cglib" ,java-cglib))) | |
4319 | (arguments | |
4320 | `(#:jar-name "java-jmock.jar" | |
4321 | #:source-dir "jmock/src/main/java" | |
4322 | #:test-dir "jmock/src/test")))) | |
4323 | ||
25436c6d JL |
4324 | (define-public java-jmock-junit4 |
4325 | (package | |
4326 | (inherit java-jmock) | |
4327 | (name "java-jmock-junit4") | |
4328 | (arguments | |
4329 | `(#:jar-name "java-jmock-junit4.jar" | |
4330 | #:source-dir "jmock-junit4/src/main/java" | |
4331 | #:test-dir "jmock-junit4/src/test")) | |
4332 | (inputs | |
4333 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
4334 | ("java-asm" ,java-asm) | |
4335 | ("java-bsh" ,java-bsh) | |
4336 | ("java-jmock" ,java-jmock) | |
4337 | ("java-jumit" ,java-junit))))) | |
4338 | ||
e84b899d JL |
4339 | (define-public java-jmock-legacy |
4340 | (package | |
4341 | (inherit java-jmock) | |
4342 | (name "java-jmock-legacy") | |
4343 | (arguments | |
4344 | `(#:jar-name "java-jmock-legacy.jar" | |
4345 | #:source-dir "jmock-legacy/src/main/java" | |
4346 | #:test-dir "jmock-legacy/src/test" | |
4347 | #:phases | |
4348 | (modify-phases %standard-phases | |
4349 | (add-before 'check 'copy-tests | |
4350 | (lambda _ | |
4351 | ;; This file is a dependancy of some tests | |
4352 | (let ((file "org/jmock/test/acceptance/PackageProtectedType.java")) | |
4353 | (copy-file (string-append "jmock/src/test/java/" file) | |
4354 | (string-append "jmock-legacy/src/test/java/" file)) | |
4355 | #t)))))) | |
4356 | (inputs | |
4357 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
4358 | ("java-objenesis" ,java-objenesis) | |
4359 | ("java-cglib" ,java-cglib) | |
4360 | ("java-jmock" ,java-jmock) | |
4361 | ("java-asm" ,java-asm) | |
4362 | ("java-bsh" ,java-bsh) | |
4363 | ("java-junit" ,java-junit))) | |
4364 | (native-inputs | |
4365 | `(("java-jmock-junit4" ,java-jmock-junit4))))) | |
4366 | ||
439c59da RW |
4367 | (define-public java-hamcrest-all |
4368 | (package (inherit java-hamcrest-core) | |
4369 | (name "java-hamcrest-all") | |
4370 | (arguments | |
bfc007e1 RW |
4371 | `(#:jdk ,icedtea-8 |
4372 | ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core) | |
4373 | ((#:build-target _) "bigjar") | |
4374 | ((#:phases phases) | |
4375 | `(modify-phases ,phases | |
4376 | ;; Some build targets override the classpath, so we need to patch | |
4377 | ;; the build.xml to ensure that required dependencies are on the | |
4378 | ;; classpath. | |
4379 | (add-after 'unpack 'patch-classpath-for-integration | |
4380 | (lambda* (#:key inputs #:allow-other-keys) | |
4381 | (substitute* "build.xml" | |
4382 | ((" build/hamcrest-library-\\$\\{version\\}.jar" line) | |
4383 | (string-join | |
4384 | (cons line | |
4385 | (append | |
4386 | (find-files (assoc-ref inputs "java-junit") "\\.jar$") | |
4387 | (find-files (assoc-ref inputs "java-jmock") "\\.jar$") | |
4388 | (find-files (assoc-ref inputs "java-easymock") "\\.jar$"))) | |
2cc63e6f RW |
4389 | ";")) |
4390 | (("build/hamcrest-core-\\$\\{version\\}\\.jar") | |
4391 | (string-append (assoc-ref inputs "java-hamcrest-core") | |
4392 | "/share/java/hamcrest-core.jar"))) | |
bfc007e1 | 4393 | #t))))))) |
439c59da RW |
4394 | (inputs |
4395 | `(("java-junit" ,java-junit) | |
4396 | ("java-jmock" ,java-jmock-1) | |
2cc63e6f RW |
4397 | ;; This is necessary because of what seems to be a race condition. |
4398 | ;; This package would sometimes fail to build because hamcrest-core.jar | |
4399 | ;; could not be found, even though it is built as part of this package. | |
4400 | ;; Adding java-hamcrest-core appears to fix this problem. See | |
4401 | ;; https://debbugs.gnu.org/31390 for more information. | |
4402 | ("java-hamcrest-core" ,java-hamcrest-core) | |
439c59da | 4403 | ("java-easymock" ,java-easymock) |
439c59da RW |
4404 | ,@(package-inputs java-hamcrest-core))))) |
4405 | ||
7aa37023 RW |
4406 | (define-public java-jopt-simple |
4407 | (package | |
4408 | (name "java-jopt-simple") | |
4409 | (version "5.0.3") | |
4410 | (source (origin | |
4411 | (method url-fetch) | |
4412 | (uri (string-append "http://repo1.maven.org/maven2/" | |
4413 | "net/sf/jopt-simple/jopt-simple/" | |
4414 | version "/jopt-simple-" | |
4415 | version "-sources.jar")) | |
4416 | (sha256 | |
4417 | (base32 | |
4418 | "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa")))) | |
4419 | (build-system ant-build-system) | |
4420 | (arguments | |
4421 | `(#:tests? #f ; there are no tests | |
4422 | #:jar-name "jopt-simple.jar")) | |
4423 | (home-page "https://pholser.github.io/jopt-simple/") | |
4424 | (synopsis "Java library for parsing command line options") | |
4425 | (description "JOpt Simple is a Java library for parsing command line | |
4426 | options, such as those you might pass to an invocation of @code{javac}. In | |
4427 | the interest of striving for simplicity, as closely as possible JOpt Simple | |
4428 | attempts to honor the command line option syntaxes of POSIX @code{getopt} and | |
4429 | GNU @code{getopt_long}. It also aims to make option parser configuration and | |
4430 | retrieval of options and their arguments simple and expressive, without being | |
4431 | overly clever.") | |
4432 | (license license:expat))) | |
840969e8 RW |
4433 | |
4434 | (define-public java-commons-math3 | |
4435 | (package | |
4436 | (name "java-commons-math3") | |
4437 | (version "3.6.1") | |
4438 | (source (origin | |
4439 | (method url-fetch) | |
4440 | (uri (string-append "mirror://apache/commons/math/source/" | |
4441 | "commons-math3-" version "-src.tar.gz")) | |
4442 | (sha256 | |
4443 | (base32 | |
4444 | "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6")))) | |
4445 | (build-system ant-build-system) | |
4446 | (arguments | |
4447 | `(#:build-target "jar" | |
4448 | #:test-target "test" | |
4449 | #:make-flags | |
4450 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
4451 | (junit (assoc-ref %build-inputs "java-junit"))) | |
4452 | (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") | |
4453 | (string-append "-Dhamcrest.jar=" hamcrest | |
4454 | "/share/java/hamcrest-core.jar"))) | |
4455 | #:phases | |
4456 | (modify-phases %standard-phases | |
4457 | ;; We want to build the jar in the build phase and run the tests | |
4458 | ;; later in a separate phase. | |
4459 | (add-after 'unpack 'untangle-targets | |
4460 | (lambda _ | |
4461 | (substitute* "build.xml" | |
4462 | (("name=\"jar\" depends=\"test\"") | |
4463 | "name=\"jar\" depends=\"compile\"")) | |
4464 | #t)) | |
4465 | ;; There is no install target. | |
4466 | (replace 'install | |
4467 | (install-jars "target"))))) | |
4468 | (native-inputs | |
4469 | `(("java-junit" ,java-junit) | |
4470 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4471 | (home-page "http://commons.apache.org/math/") | |
4472 | (synopsis "Apache Commons mathematics library") | |
4473 | (description "Commons Math is a library of lightweight, self-contained | |
4474 | mathematics and statistics components addressing the most common problems not | |
4475 | available in the Java programming language or Commons Lang.") | |
4476 | (license license:asl2.0))) | |
62c9bfaa RW |
4477 | |
4478 | (define-public java-jmh | |
4479 | (package | |
4480 | (name "java-jmh") | |
4481 | (version "1.17.5") | |
4482 | (source (origin | |
4483 | (method hg-fetch) | |
4484 | (uri (hg-reference | |
4485 | (url "http://hg.openjdk.java.net/code-tools/jmh/") | |
4486 | (changeset version))) | |
4487 | (file-name (string-append name "-" version "-checkout")) | |
4488 | (sha256 | |
4489 | (base32 | |
4490 | "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084")))) | |
4491 | (build-system ant-build-system) | |
4492 | (arguments | |
4493 | `(#:jar-name "jmh-core.jar" | |
4494 | #:source-dir "jmh-core/src/main" | |
4495 | #:test-dir "jmh-core/src/test" | |
4496 | #:phases | |
4497 | (modify-phases %standard-phases | |
4498 | ;; This seems to be a bug in the JDK. It may not be necessary in | |
4499 | ;; future versions of the JDK. | |
4500 | (add-after 'unpack 'fix-bug | |
4501 | (lambda _ | |
4502 | (with-directory-excursion | |
4503 | "jmh-core/src/main/java/org/openjdk/jmh/runner/options" | |
4504 | (substitute* '("IntegerValueConverter.java" | |
4505 | "ThreadsValueConverter.java") | |
4506 | (("public Class<Integer> valueType") | |
4507 | "public Class<? extends Integer> valueType"))) | |
4508 | #t))))) | |
4509 | (inputs | |
4510 | `(("java-jopt-simple" ,java-jopt-simple) | |
4511 | ("java-commons-math3" ,java-commons-math3))) | |
4512 | (native-inputs | |
4513 | `(("java-junit" ,java-junit) | |
4514 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4515 | (home-page "http://openjdk.java.net/projects/code-tools/jmh/") | |
4516 | (synopsis "Benchmark harness for the JVM") | |
4517 | (description "JMH is a Java harness for building, running, and analysing | |
4518 | nano/micro/milli/macro benchmarks written in Java and other languages | |
f4548394 | 4519 | targeting the JVM.") |
62c9bfaa RW |
4520 | ;; GPLv2 only |
4521 | (license license:gpl2))) | |
56ebb4e9 RW |
4522 | |
4523 | (define-public java-commons-collections4 | |
4524 | (package | |
4525 | (name "java-commons-collections4") | |
4526 | (version "4.1") | |
4527 | (source (origin | |
4528 | (method url-fetch) | |
4529 | (uri (string-append "mirror://apache/commons/collections/source/" | |
4530 | "commons-collections4-" version "-src.tar.gz")) | |
4531 | (sha256 | |
4532 | (base32 | |
4533 | "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl")))) | |
4534 | (build-system ant-build-system) | |
4535 | (arguments | |
4536 | `(#:test-target "test" | |
4537 | #:make-flags | |
4538 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
4539 | (junit (assoc-ref %build-inputs "java-junit")) | |
4540 | (easymock (assoc-ref %build-inputs "java-easymock"))) | |
4541 | (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") | |
4542 | (string-append "-Dhamcrest.jar=" hamcrest | |
4543 | "/share/java/hamcrest-core.jar") | |
4544 | (string-append "-Deasymock.jar=" easymock | |
4545 | "/share/java/easymock.jar"))) | |
4546 | #:phases | |
4547 | (modify-phases %standard-phases | |
4548 | (replace 'install | |
4549 | (install-jars "target"))))) | |
4550 | (native-inputs | |
4551 | `(("java-junit" ,java-junit) | |
4552 | ("java-hamcrest-core" ,java-hamcrest-core) | |
4553 | ("java-easymock" ,java-easymock))) | |
4554 | (home-page "http://commons.apache.org/collections/") | |
4555 | (synopsis "Collections framework") | |
4556 | (description "The Java Collections Framework is the recognised standard | |
4557 | for collection handling in Java. Commons-Collections seek to build upon the | |
4558 | JDK classes by providing new interfaces, implementations and utilities. There | |
4559 | are many features, including: | |
4560 | ||
4561 | @itemize | |
4562 | @item @code{Bag} interface for collections that have a number of copies of | |
4563 | each object | |
4564 | @item @code{BidiMap} interface for maps that can be looked up from value to | |
4565 | key as well and key to value | |
4566 | @item @code{MapIterator} interface to provide simple and quick iteration over | |
4567 | maps | |
4568 | @item Transforming decorators that alter each object as it is added to the | |
4569 | collection | |
4570 | @item Composite collections that make multiple collections look like one | |
4571 | @item Ordered maps and sets that retain the order elements are added in, | |
4572 | including an LRU based map | |
4573 | @item Reference map that allows keys and/or values to be garbage collected | |
4574 | under close control | |
4575 | @item Many comparator implementations | |
4576 | @item Many iterator implementations | |
4577 | @item Adapter classes from array and enumerations to collections | |
4578 | @item Utilities to test or create typical set-theory properties of collections | |
4579 | such as union, intersection, and closure. | |
4580 | @end itemize\n") | |
4581 | (license license:asl2.0))) | |
6af63e65 | 4582 | |
229a9864 JL |
4583 | (define-public java-commons-collections |
4584 | (package | |
4585 | (inherit java-commons-collections4) | |
4586 | (name "java-commons-collections") | |
4587 | (version "3.2.2") | |
4588 | (source (origin | |
4589 | (method url-fetch) | |
4590 | (uri (string-append "mirror://apache/commons/collections/source/" | |
4591 | "commons-collections-" version "-src.tar.gz")) | |
4592 | (sha256 | |
4593 | (base32 | |
7c7323e4 GB |
4594 | "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387")) |
4595 | (patches | |
4596 | (search-patches "java-commons-collections-fix-java8.patch")))) | |
229a9864 JL |
4597 | (arguments |
4598 | (substitute-keyword-arguments (package-arguments java-commons-collections4) | |
4599 | ((#:phases phases) | |
4600 | `(modify-phases ,phases | |
4601 | ;; The manifest is required by the build procedure | |
4602 | (add-before 'build 'add-manifest | |
4603 | (lambda _ | |
4604 | (mkdir-p "build/conf") | |
4605 | (call-with-output-file "build/conf/MANIFEST.MF" | |
4606 | (lambda (file) | |
2c8ac364 MW |
4607 | (format file "Manifest-Version: 1.0\n"))) |
4608 | #t)) | |
229a9864 JL |
4609 | (replace 'install |
4610 | (install-jars "build")))))))) | |
4611 | ||
5aa2f3f4 JL |
4612 | (define java-commons-collections-test-classes |
4613 | (package | |
4614 | (inherit java-commons-collections) | |
4615 | (arguments | |
4616 | `(#:jar-name "commons-collections-test-classes.jar" | |
4617 | #:source-dir "src/test" | |
4618 | #:tests? #f)) | |
4619 | (inputs | |
4620 | `(("collection" ,java-commons-collections))))) | |
4621 | ||
4622 | (define-public java-commons-beanutils | |
4623 | (package | |
4624 | (name "java-commons-beanutils") | |
4625 | (version "1.9.3") | |
4626 | (source (origin | |
4627 | (method url-fetch) | |
4628 | (uri (string-append "mirror://apache/commons/beanutils/source/" | |
4629 | "commons-beanutils-" version "-src.tar.gz")) | |
4630 | (sha256 | |
4631 | (base32 | |
4632 | "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk")))) | |
4633 | (build-system ant-build-system) | |
4634 | (arguments | |
4635 | `(#:test-target "test" | |
4636 | #:tests? #f | |
4637 | #:phases | |
4638 | (modify-phases %standard-phases | |
4639 | (replace 'install | |
4640 | (lambda* (#:key outputs #:allow-other-keys) | |
4641 | (rename-file (string-append "dist/commons-beanutils-" ,version | |
4642 | "-SNAPSHOT.jar") | |
4643 | "commons-beanutils.jar") | |
4644 | (install-file "commons-beanutils.jar" | |
4645 | (string-append (assoc-ref outputs "out") "/share/java/")) | |
4646 | #t))))) | |
4647 | (inputs | |
4648 | `(("logging" ,java-commons-logging-minimal) | |
4649 | ("collections" ,java-commons-collections))) | |
4650 | (native-inputs | |
4651 | `(("junit" ,java-junit) | |
4652 | ("collections-test" ,java-commons-collections-test-classes))) | |
4653 | (home-page "http://commons.apache.org/beanutils/") | |
4654 | (synopsis "Dynamically set or get properties in Java") | |
4655 | (description "BeanUtils provides a simplified interface to reflection and | |
4656 | introspection to set or get dynamically determined properties through their | |
4657 | setter and getter method.") | |
4658 | (license license:asl2.0))) | |
4659 | ||
6af63e65 HG |
4660 | (define-public java-commons-io |
4661 | (package | |
4662 | (name "java-commons-io") | |
4663 | (version "2.5") | |
4664 | (source | |
4665 | (origin | |
4666 | (method url-fetch) | |
4667 | (uri (string-append "mirror://apache/commons/io/source/" | |
4668 | "commons-io-" version "-src.tar.gz")) | |
4669 | (sha256 | |
4670 | (base32 | |
4671 | "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3")))) | |
4672 | (build-system ant-build-system) | |
4673 | (outputs '("out" "doc")) | |
4674 | (arguments | |
4675 | `(#:test-target "test" | |
4676 | #:make-flags | |
4677 | (list (string-append "-Djunit.jar=" | |
4678 | (assoc-ref %build-inputs "java-junit") | |
4679 | "/share/java/junit.jar")) | |
4680 | #:phases | |
4681 | (modify-phases %standard-phases | |
4682 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
4683 | (replace 'install (install-jars "target")) | |
4684 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) | |
4685 | (native-inputs | |
4686 | `(("java-junit" ,java-junit) | |
4687 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4688 | (home-page "http://commons.apache.org/io/") | |
4689 | (synopsis "Common useful IO related classes") | |
4690 | (description "Commons-IO contains utility classes, stream implementations, | |
4691 | file filters and endian classes.") | |
4692 | (license license:asl2.0))) | |
d631b5f3 | 4693 | |
46f9022c DM |
4694 | (define-public java-commons-exec-1.1 |
4695 | (package | |
4696 | (name "java-commons-exec") | |
4697 | (version "1.1") | |
4698 | (source | |
4699 | (origin | |
4700 | (method url-fetch) | |
4701 | (uri (string-append "mirror://apache/commons/exec/source/" | |
4702 | "commons-exec-" version "-src.tar.gz")) | |
4703 | (sha256 | |
4704 | (base32 | |
4705 | "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk")))) | |
4706 | (build-system ant-build-system) | |
4707 | (arguments | |
4708 | `(#:test-target "test" | |
4709 | #:make-flags | |
4710 | (list (string-append "-Dmaven.junit.jar=" | |
4711 | (assoc-ref %build-inputs "java-junit") | |
4712 | "/share/java/junit.jar")) | |
4713 | #:phases | |
4714 | (modify-phases %standard-phases | |
4715 | (add-before 'build 'delete-network-tests | |
4716 | (lambda _ | |
4717 | (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java") | |
4718 | (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java" | |
4719 | (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") "")) | |
4720 | #t)) | |
4721 | ;; The "build" phase automatically tests. | |
4722 | (delete 'check) | |
4723 | (replace 'install (install-jars "target"))))) | |
4724 | (native-inputs | |
4725 | `(("java-junit" ,java-junit))) | |
4726 | (home-page "http://commons.apache.org/proper/commons-exec/") | |
4727 | (synopsis "Common program execution related classes") | |
4728 | (description "Commons-Exec simplifies executing external processes.") | |
4729 | (license license:asl2.0))) | |
4730 | ||
4731 | (define-public java-commons-exec | |
4732 | (package | |
4733 | (inherit java-commons-exec-1.1) | |
4734 | (version "1.3") | |
4735 | (source | |
4736 | (origin | |
4737 | (method url-fetch) | |
4738 | (uri (string-append "mirror://apache/commons/exec/source/" | |
4739 | "commons-exec-" version "-src.tar.gz")) | |
4740 | (sha256 | |
4741 | (base32 | |
4742 | "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv")))) | |
4743 | (arguments | |
4744 | `(#:test-target "test" | |
4745 | #:make-flags | |
4746 | (list (string-append "-Dmaven.junit.jar=" | |
4747 | (assoc-ref %build-inputs "java-junit") | |
4748 | "/share/java/junit.jar") | |
4749 | "-Dmaven.compiler.source=1.7" | |
4750 | "-Dmaven.compiler.target=1.7") | |
4751 | #:phases | |
4752 | (modify-phases %standard-phases | |
4753 | (add-before 'build 'delete-network-tests | |
4754 | (lambda* (#:key inputs #:allow-other-keys) | |
4755 | ;; This test hangs indefinitely. | |
4756 | (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java") | |
4757 | (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java" | |
4758 | (("ping -c 10 127.0.0.1") "sleep 10")) | |
4759 | (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java" | |
4760 | (("/bin/ls") "ls")) | |
4761 | (call-with-output-file "src/test/scripts/ping.sh" | |
4762 | (lambda (port) | |
4763 | (format port "#!~a/bin/sh\nsleep $1\n" | |
4764 | (assoc-ref inputs "bash")))) | |
4765 | #t)) | |
4766 | ;; The "build" phase automatically tests. | |
4767 | (delete 'check) | |
4768 | (replace 'install (install-jars "target"))))) | |
4769 | (native-inputs | |
4770 | `(("java-junit" ,java-junit) | |
4771 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
4772 | ||
d631b5f3 HG |
4773 | (define-public java-commons-lang |
4774 | (package | |
4775 | (name "java-commons-lang") | |
4776 | (version "2.6") | |
4777 | (source | |
4778 | (origin | |
4779 | (method url-fetch) | |
4780 | (uri (string-append "mirror://apache/commons/lang/source/" | |
4781 | "commons-lang-" version "-src.tar.gz")) | |
4782 | (sha256 | |
4783 | (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5")))) | |
4784 | (build-system ant-build-system) | |
4785 | (outputs '("out" "doc")) | |
4786 | (arguments | |
4787 | `(#:test-target "test" | |
e5a96113 | 4788 | #:test-exclude (list "**/Abstract*.java" "**/Random*.java") |
d631b5f3 HG |
4789 | #:phases |
4790 | (modify-phases %standard-phases | |
4791 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
4792 | (add-before 'check 'disable-failing-test | |
4793 | (lambda _ | |
4794 | ;; Disable a failing test | |
4795 | (substitute* "src/test/java/org/apache/commons/lang/\ | |
4796 | time/FastDateFormatTest.java" | |
4797 | (("public void testFormat\\(\\)") | |
4798 | "public void disabled_testFormat()")) | |
4799 | #t)) | |
4800 | (replace 'install (install-jars "target")) | |
4801 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) | |
4802 | (native-inputs | |
4803 | `(("java-junit" ,java-junit))) | |
4804 | (home-page "http://commons.apache.org/lang/") | |
4805 | (synopsis "Extension of the java.lang package") | |
4806 | (description "The Commons Lang components contains a set of Java classes | |
4807 | that provide helper methods for standard Java classes, especially those found | |
4808 | in the @code{java.lang} package in the Sun JDK. The following classes are | |
4809 | included: | |
4810 | ||
4811 | @itemize | |
4812 | @item StringUtils - Helper for @code{java.lang.String}. | |
4813 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets | |
4814 | of characters such as @code{[a-z]} and @code{[abcdez]}. | |
4815 | @item RandomStringUtils - Helper for creating randomised strings. | |
4816 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. | |
4817 | @item NumberRange - A range of numbers with an upper and lower bound. | |
4818 | @item ObjectUtils - Helper for @code{java.lang.Object}. | |
4819 | @item SerializationUtils - Helper for serializing objects. | |
4820 | @item SystemUtils - Utility class defining the Java system properties. | |
4821 | @item NestedException package - A sub-package for the creation of nested | |
4822 | exceptions. | |
4823 | @item Enum package - A sub-package for the creation of enumerated types. | |
4824 | @item Builder package - A sub-package for the creation of @code{equals}, | |
4825 | @code{hashCode}, @code{compareTo} and @code{toString} methods. | |
4826 | @end itemize\n") | |
4827 | (license license:asl2.0))) | |
82e18864 HG |
4828 | |
4829 | (define-public java-commons-lang3 | |
4830 | (package | |
4831 | (name "java-commons-lang3") | |
4832 | (version "3.4") | |
4833 | (source | |
4834 | (origin | |
4835 | (method url-fetch) | |
4836 | (uri (string-append "mirror://apache/commons/lang/source/" | |
4837 | "commons-lang3-" version "-src.tar.gz")) | |
4838 | (sha256 | |
4839 | (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg")))) | |
4840 | (build-system ant-build-system) | |
4841 | (outputs '("out" "doc")) | |
4842 | (arguments | |
4843 | `(#:test-target "test" | |
4844 | #:make-flags | |
4845 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all")) | |
4846 | (junit (assoc-ref %build-inputs "java-junit")) | |
4847 | (easymock (assoc-ref %build-inputs "java-easymock")) | |
4848 | (io (assoc-ref %build-inputs "java-commons-io"))) | |
4849 | (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") | |
4850 | (string-append "-Dhamcrest.jar=" hamcrest | |
4851 | "/share/java/hamcrest-all.jar") | |
4852 | (string-append "-Dcommons-io.jar=" io | |
4853 | "/share/java/commons-io-" | |
4854 | ,(package-version java-commons-io) | |
4855 | "-SNAPSHOT.jar") | |
4856 | (string-append "-Deasymock.jar=" easymock | |
4857 | "/share/java/easymock.jar"))) | |
4858 | #:phases | |
4859 | (modify-phases %standard-phases | |
4860 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
4861 | (replace 'install (install-jars "target")) | |
4862 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) | |
4863 | (native-inputs | |
4864 | `(("java-junit" ,java-junit) | |
4865 | ("java-commons-io" ,java-commons-io) | |
4866 | ("java-hamcrest-all" ,java-hamcrest-all) | |
4867 | ("java-easymock" ,java-easymock))) | |
4868 | (home-page "http://commons.apache.org/lang/") | |
4869 | (synopsis "Extension of the java.lang package") | |
4870 | (description "The Commons Lang components contains a set of Java classes | |
4871 | that provide helper methods for standard Java classes, especially those found | |
4872 | in the @code{java.lang} package. The following classes are included: | |
4873 | ||
4874 | @itemize | |
4875 | @item StringUtils - Helper for @code{java.lang.String}. | |
4876 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of | |
4877 | characters such as @code{[a-z]} and @code{[abcdez]}. | |
4878 | @item RandomStringUtils - Helper for creating randomised strings. | |
4879 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. | |
4880 | @item NumberRange - A range of numbers with an upper and lower bound. | |
4881 | @item ObjectUtils - Helper for @code{java.lang.Object}. | |
4882 | @item SerializationUtils - Helper for serializing objects. | |
4883 | @item SystemUtils - Utility class defining the Java system properties. | |
4884 | @item NestedException package - A sub-package for the creation of nested | |
4885 | exceptions. | |
4886 | @item Enum package - A sub-package for the creation of enumerated types. | |
4887 | @item Builder package - A sub-package for the creation of @code{equals}, | |
4888 | @code{hashCode}, @code{compareTo} and @code{toString} methods. | |
4889 | @end itemize\n") | |
4890 | (license license:asl2.0))) | |
1c188f4e | 4891 | |
afb13a10 JL |
4892 | (define-public java-commons-bsf |
4893 | (package | |
4894 | (name "java-commons-bsf") | |
4895 | (version "2.4.0") | |
4896 | (source (origin | |
4897 | (method url-fetch) | |
4898 | (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-" | |
4899 | version ".tar.gz")) | |
4900 | (sha256 | |
4901 | (base32 | |
4902 | "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas")) | |
4903 | (modules '((guix build utils))) | |
4904 | (snippet | |
4905 | '(begin | |
4906 | (for-each delete-file | |
4907 | (find-files "." "\\.jar$")) | |
4908 | #t)))) | |
4909 | (build-system ant-build-system) | |
4910 | (arguments | |
4911 | `(#:build-target "jar" | |
4912 | #:tests? #f; No test file | |
4913 | #:modules ((guix build ant-build-system) | |
4914 | (guix build utils) | |
4915 | (guix build java-utils) | |
4916 | (sxml simple)) | |
4917 | #:phases | |
4918 | (modify-phases %standard-phases | |
4919 | (add-before 'build 'create-properties | |
4920 | (lambda _ | |
4921 | ;; This file is missing from the distribution | |
4922 | (call-with-output-file "build-properties.xml" | |
4923 | (lambda (port) | |
4924 | (sxml->xml | |
4925 | `(project (@ (basedir ".") (name "build-properties") (default "")) | |
4926 | (property (@ (name "project.name") (value "bsf"))) | |
4927 | (property (@ (name "source.level") (value "1.5"))) | |
4928 | (property (@ (name "build.lib") (value "build/jar"))) | |
4929 | (property (@ (name "src.dir") (value "src"))) | |
4930 | (property (@ (name "tests.dir") (value "src/org/apache/bsf/test"))) | |
4931 | (property (@ (name "build.tests") (value "build/test-classes"))) | |
4932 | (property (@ (name "build.dest") (value "build/classes")))) | |
2c8ac364 MW |
4933 | port))) |
4934 | #t)) | |
afb13a10 JL |
4935 | (replace 'install (install-jars "build"))))) |
4936 | (native-inputs | |
4937 | `(("java-junit" ,java-junit))) | |
4938 | (inputs | |
4939 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal))) | |
4940 | (home-page "https://commons.apache.org/proper/commons-bsf") | |
4941 | (synopsis "Bean Scripting Framework") | |
4942 | (description "The Bean Scripting Framework (BSF) is a set of Java classes | |
4943 | which provides scripting language support within Java applications, and access | |
4944 | to Java objects and methods from scripting languages. BSF allows one to write | |
4945 | JSPs in languages other than Java while providing access to the Java class | |
4946 | library. In addition, BSF permits any Java application to be implemented in | |
4947 | part (or dynamically extended) by a language that is embedded within it. This | |
4948 | is achieved by providing an API that permits calling scripting language engines | |
4949 | from within Java, as well as an object registry that exposes Java objects to | |
4950 | these scripting language engines.") | |
4951 | (license license:asl2.0))) | |
4952 | ||
66006fe5 JL |
4953 | (define-public java-commons-jxpath |
4954 | (package | |
4955 | (name "java-commons-jxpath") | |
4956 | (version "1.3") | |
4957 | (source (origin | |
4958 | (method url-fetch) | |
4959 | (uri (string-append "mirror://apache/commons/jxpath/source/" | |
4960 | "commons-jxpath-" version "-src.tar.gz")) | |
4961 | (sha256 | |
4962 | (base32 | |
4963 | "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs")))) | |
4964 | (build-system ant-build-system) | |
4965 | (arguments | |
4966 | `(#:jar-name "commons-jxpath.jar" | |
4967 | ;; tests require more dependencies, including mockrunner which depends on old software | |
4968 | #:tests? #f | |
4969 | #:source-dir "src/java")) | |
4970 | (inputs | |
10eddaca | 4971 | `(("servlet" ,java-classpathx-servletapi) |
66006fe5 JL |
4972 | ("java-jdom" ,java-jdom) |
4973 | ("java-commons-beanutils" ,java-commons-beanutils))) | |
4974 | (native-inputs | |
4975 | `(("java-junit" ,java-junit))) | |
4976 | (home-page "http://commons.apache.org/jxpath/") | |
4977 | (synopsis "Simple interpreter of an expression language called XPath.") | |
4978 | (description "The org.apache.commons.jxpath package defines a simple | |
4979 | interpreter of an expression language called XPath. JXPath applies XPath | |
4980 | expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet | |
4981 | contexts, DOM etc, including mixtures thereof.") | |
4982 | (license license:asl2.0))) | |
4983 | ||
a1a5ef20 JL |
4984 | (define-public java-jsr250 |
4985 | (package | |
4986 | (name "java-jsr250") | |
4987 | (version "1.3") | |
4988 | (source (origin | |
4989 | (method url-fetch) | |
4990 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4991 | "javax/annotation/javax.annotation-api/" | |
4992 | version "/javax.annotation-api-" | |
4993 | version "-sources.jar")) | |
4994 | (sha256 | |
4995 | (base32 | |
4996 | "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz")))) | |
4997 | (build-system ant-build-system) | |
4998 | (arguments | |
4999 | `(#:tests? #f ; no tests included | |
5000 | #:jdk ,icedtea-8 | |
5001 | #:jar-name "jsr250.jar")) | |
5002 | (home-page "https://jcp.org/en/jsr/detail?id=250") | |
5003 | (synopsis "Security-related annotations") | |
5004 | (description "This package provides annotations for security. It provides | |
5005 | packages in the @code{javax.annotation} and @code{javax.annotation.security} | |
5006 | namespaces.") | |
5007 | ;; either cddl or gpl2 only, with classpath exception | |
5008 | (license (list license:cddl1.0 | |
5009 | license:gpl2)))) | |
5010 | ||
0d4a0d60 RW |
5011 | (define-public java-jsr305 |
5012 | (package | |
5013 | (name "java-jsr305") | |
5014 | (version "3.0.1") | |
5015 | (source (origin | |
5016 | (method url-fetch) | |
5017 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5018 | "com/google/code/findbugs/" | |
5019 | "jsr305/" version "/jsr305-" | |
5020 | version "-sources.jar")) | |
5021 | (sha256 | |
5022 | (base32 | |
5023 | "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n")))) | |
5024 | (build-system ant-build-system) | |
5025 | (arguments | |
5026 | `(#:tests? #f ; no tests included | |
5027 | #:jar-name "jsr305.jar")) | |
5028 | (home-page "http://findbugs.sourceforge.net/") | |
5029 | (synopsis "Annotations for the static analyzer called findbugs") | |
5030 | (description "This package provides annotations for the findbugs package. | |
5031 | It provides packages in the @code{javax.annotations} namespace.") | |
5032 | (license license:asl2.0))) | |
5033 | ||
4f3e47ea RW |
5034 | (define-public java-guava |
5035 | (package | |
5036 | (name "java-guava") | |
5037 | ;; This is the last release of Guava that can be built with Java 7. | |
5038 | (version "20.0") | |
5039 | (source (origin | |
5040 | (method url-fetch) | |
5041 | (uri (string-append "https://github.com/google/guava/" | |
5042 | "releases/download/v" version | |
5043 | "/guava-" version "-sources.jar")) | |
5044 | (sha256 | |
5045 | (base32 | |
5046 | "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr")))) | |
5047 | (build-system ant-build-system) | |
5048 | (arguments | |
5049 | `(#:tests? #f ; no tests included | |
5050 | #:jar-name "guava.jar" | |
5051 | #:phases | |
5052 | (modify-phases %standard-phases | |
5053 | (add-after 'unpack 'trim-sources | |
5054 | (lambda _ | |
5055 | (with-directory-excursion "src/com/google/common" | |
5056 | ;; Remove annotations to avoid extra dependencies: | |
5057 | ;; * "j2objc" annotations are used when converting Java to | |
5058 | ;; Objective C; | |
5059 | ;; * "errorprone" annotations catch common Java mistakes at | |
5060 | ;; compile time; | |
5061 | ;; * "IgnoreJRERequirement" is used for Android. | |
5062 | (substitute* (find-files "." "\\.java$") | |
5063 | (("import com.google.j2objc.*") "") | |
5064 | (("import com.google.errorprone.annotation.*") "") | |
5065 | (("import org.codehaus.mojo.animal_sniffer.*") "") | |
5066 | (("@CanIgnoreReturnValue") "") | |
5067 | (("@LazyInit") "") | |
5068 | (("@WeakOuter") "") | |
5069 | (("@RetainedWith") "") | |
5070 | (("@Weak") "") | |
5071 | (("@ForOverride") "") | |
5072 | (("@J2ObjCIncompatible") "") | |
5073 | (("@IgnoreJRERequirement") ""))) | |
5074 | #t))))) | |
5075 | (inputs | |
5076 | `(("java-jsr305" ,java-jsr305))) | |
5077 | (home-page "https://github.com/google/guava") | |
5078 | (synopsis "Google core libraries for Java") | |
5079 | (description "Guava is a set of core libraries that includes new | |
5080 | collection types (such as multimap and multiset), immutable collections, a | |
5081 | graph library, functional types, an in-memory cache, and APIs/utilities for | |
5082 | concurrency, I/O, hashing, primitives, reflection, string processing, and much | |
5083 | more!") | |
5084 | (license license:asl2.0))) | |
5085 | ||
af8f8281 RW |
5086 | ;; The java-commons-logging package provides adapters to many different |
5087 | ;; logging frameworks. To avoid an excessive dependency graph we try to build | |
5088 | ;; it with only a minimal set of adapters. | |
5089 | (define-public java-commons-logging-minimal | |
5090 | (package | |
5091 | (name "java-commons-logging-minimal") | |
5092 | (version "1.2") | |
5093 | (source (origin | |
5094 | (method url-fetch) | |
5095 | (uri (string-append "mirror://apache/commons/logging/source/" | |
5096 | "commons-logging-" version "-src.tar.gz")) | |
5097 | (sha256 | |
5098 | (base32 | |
5099 | "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9")))) | |
5100 | (build-system ant-build-system) | |
5101 | (arguments | |
5102 | `(#:tests? #f ; avoid dependency on logging frameworks | |
5103 | #:jar-name "commons-logging-minimal.jar" | |
5104 | #:phases | |
5105 | (modify-phases %standard-phases | |
5106 | (add-after 'unpack 'delete-adapters-and-tests | |
5107 | (lambda _ | |
5108 | ;; Delete all adapters except for NoOpLog, SimpleLog, and | |
5109 | ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl | |
5110 | ;; is used by applications; SimpleLog is the only actually usable | |
5111 | ;; implementation that does not depend on another logging | |
5112 | ;; framework. | |
5113 | (for-each | |
5114 | (lambda (file) | |
5115 | (delete-file (string-append | |
5116 | "src/main/java/org/apache/commons/logging/impl/" file))) | |
5117 | (list "Jdk13LumberjackLogger.java" | |
5118 | "WeakHashtable.java" | |
5119 | "Log4JLogger.java" | |
5120 | "ServletContextCleaner.java" | |
5121 | "Jdk14Logger.java" | |
5122 | "AvalonLogger.java" | |
5123 | "LogKitLogger.java")) | |
5124 | (delete-file-recursively "src/test") | |
5125 | #t))))) | |
5126 | (home-page "http://commons.apache.org/logging/") | |
5127 | (synopsis "Common API for logging implementations") | |
5128 | (description "The Logging package is a thin bridge between different | |
5129 | logging implementations. A library that uses the commons-logging API can be | |
5130 | used with any logging implementation at runtime.") | |
5131 | (license license:asl2.0))) | |
5132 | ||
90e65abe RW |
5133 | ;; This is the last release of the 1.x series. |
5134 | (define-public java-mockito-1 | |
5135 | (package | |
5136 | (name "java-mockito") | |
5137 | (version "1.10.19") | |
5138 | (source (origin | |
5139 | (method url-fetch) | |
5140 | (uri (string-append "http://repo1.maven.org/maven2/" | |
5141 | "org/mockito/mockito-core/" version | |
5142 | "/mockito-core-" version "-sources.jar")) | |
5143 | (sha256 | |
5144 | (base32 | |
5145 | "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc")))) | |
5146 | (build-system ant-build-system) | |
5147 | (arguments | |
5148 | `(#:jar-name "mockito.jar" | |
5149 | #:tests? #f ; no tests included | |
5150 | ;; FIXME: patch-and-repack does not support jars, so we have to apply | |
5151 | ;; patches in build phases. | |
5152 | #:phases | |
5153 | (modify-phases %standard-phases | |
5154 | ;; Mockito was developed against a different version of hamcrest, | |
5155 | ;; which does not require matcher implementations to provide an | |
5156 | ;; implementation of the "describeMismatch" method. We add this | |
5157 | ;; simple definition to pass the build with our version of hamcrest. | |
5158 | (add-after 'unpack 'fix-hamcrest-build-error | |
5159 | (lambda _ | |
5160 | (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java" | |
5161 | (("public Matcher getActualMatcher\\(\\) .*" line) | |
5162 | (string-append " | |
5163 | public void describeMismatch(Object item, Description description) { | |
5164 | actualMatcher.describeMismatch(item, description); | |
5165 | }" | |
5166 | line))) | |
5167 | #t)) | |
5168 | ;; Mockito bundles cglib. We have a cglib package, so let's use | |
5169 | ;; that instead. | |
5170 | (add-after 'unpack 'use-system-libraries | |
5171 | (lambda _ | |
5172 | (with-directory-excursion "src/org/mockito/internal/creation/cglib" | |
5173 | (substitute* '("CGLIBHacker.java" | |
5174 | "CglibMockMaker.java" | |
5175 | "ClassImposterizer.java" | |
5176 | "DelegatingMockitoMethodProxy.java" | |
5177 | "MethodInterceptorFilter.java" | |
5178 | "MockitoNamingPolicy.java" | |
5179 | "SerializableMockitoMethodProxy.java" | |
5180 | "SerializableNoOp.java") | |
5181 | (("import org.mockito.cglib") "import net.sf.cglib"))) | |
5182 | #t))))) | |
5183 | (inputs | |
5184 | `(("java-junit" ,java-junit) | |
5185 | ("java-objenesis" ,java-objenesis) | |
5186 | ("java-cglib" ,java-cglib) | |
5187 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
5188 | (home-page "http://mockito.org") | |
5189 | (synopsis "Mockito is a mock library for Java") | |
5190 | (description "Mockito is a mocking library for Java which lets you write | |
5191 | tests with a clean and simple API. It generates mocks using reflection, and | |
5192 | it records all mock invocations, including methods arguments.") | |
5193 | (license license:asl2.0))) | |
5194 | ||
4f4d2e47 RW |
5195 | (define-public java-httpcomponents-httpcore |
5196 | (package | |
5197 | (name "java-httpcomponents-httpcore") | |
5198 | (version "4.4.6") | |
5199 | (source (origin | |
5200 | (method url-fetch) | |
5201 | (uri (string-append "mirror://apache//httpcomponents/httpcore/" | |
5202 | "source/httpcomponents-core-" | |
5203 | version "-src.tar.gz")) | |
5204 | (sha256 | |
5205 | (base32 | |
5206 | "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy")))) | |
5207 | (build-system ant-build-system) | |
5208 | (arguments | |
5209 | `(#:jar-name "httpcomponents-httpcore.jar" | |
5210 | #:phases | |
5211 | (modify-phases %standard-phases | |
5212 | (add-after 'unpack 'chdir | |
5213 | (lambda _ (chdir "httpcore") #t))))) | |
5214 | (inputs | |
5215 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
5216 | ("java-commons-lang3" ,java-commons-lang3))) | |
5217 | (native-inputs | |
5218 | `(("java-junit" ,java-junit) | |
5219 | ("java-mockito" ,java-mockito-1))) | |
5220 | (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html") | |
5221 | (synopsis "Low level HTTP transport components") | |
5222 | (description "HttpCore is a set of low level HTTP transport components | |
5223 | that can be used to build custom client and server side HTTP services with a | |
5224 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based | |
5225 | on the classic Java I/O and non-blocking, event driven I/O model based on Java | |
5226 | NIO. | |
5227 | ||
5228 | This package provides the blocking I/O model library.") | |
5229 | (license license:asl2.0))) | |
5230 | ||
3a068b43 RW |
5231 | (define-public java-httpcomponents-httpcore-nio |
5232 | (package (inherit java-httpcomponents-httpcore) | |
5233 | (name "java-httpcomponents-httpcore-nio") | |
5234 | (arguments | |
5235 | `(#:jar-name "httpcomponents-httpcore-nio.jar" | |
5236 | #:phases | |
5237 | (modify-phases %standard-phases | |
5238 | (add-after 'unpack 'chdir | |
5239 | (lambda _ (chdir "httpcore-nio") #t))))) | |
5240 | (inputs | |
5241 | `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
5242 | ("java-hamcrest-core" ,java-hamcrest-core) | |
5243 | ,@(package-inputs java-httpcomponents-httpcore))) | |
5244 | (description "HttpCore is a set of low level HTTP transport components | |
5245 | that can be used to build custom client and server side HTTP services with a | |
5246 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based | |
5247 | on the classic Java I/O and non-blocking, event driven I/O model based on Java | |
5248 | NIO. | |
5249 | ||
5250 | This package provides the non-blocking I/O model library based on Java | |
5251 | NIO."))) | |
5252 | ||
e1dd78f6 RW |
5253 | (define-public java-httpcomponents-httpcore-ab |
5254 | (package (inherit java-httpcomponents-httpcore) | |
5255 | (name "java-httpcomponents-httpcore-ab") | |
5256 | (arguments | |
5257 | `(#:jar-name "httpcomponents-httpcore-ab.jar" | |
5258 | #:phases | |
5259 | (modify-phases %standard-phases | |
5260 | (add-after 'unpack 'chdir | |
5261 | (lambda _ (chdir "httpcore-ab") #t))))) | |
5262 | (inputs | |
5263 | `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
5264 | ("java-commons-cli" ,java-commons-cli) | |
5265 | ("java-hamcrest-core" ,java-hamcrest-core) | |
5266 | ,@(package-inputs java-httpcomponents-httpcore))) | |
5267 | (synopsis "Apache HttpCore benchmarking tool") | |
5268 | (description "This package provides the HttpCore benchmarking tool. It is | |
5269 | an Apache AB clone based on HttpCore."))) | |
5270 | ||
14a671d8 RW |
5271 | (define-public java-httpcomponents-httpclient |
5272 | (package | |
5273 | (name "java-httpcomponents-httpclient") | |
5274 | (version "4.5.3") | |
5275 | (source (origin | |
5276 | (method url-fetch) | |
5277 | (uri (string-append "mirror://apache/httpcomponents/httpclient/" | |
5278 | "source/httpcomponents-client-" | |
5279 | version "-src.tar.gz")) | |
5280 | (sha256 | |
5281 | (base32 | |
5282 | "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1")))) | |
5283 | (build-system ant-build-system) | |
5284 | (arguments | |
5285 | `(#:jar-name "httpcomponents-httpclient.jar" | |
5286 | #:phases | |
5287 | (modify-phases %standard-phases | |
5288 | (add-after 'unpack 'chdir | |
5289 | (lambda _ (chdir "httpclient") #t))))) | |
5290 | (inputs | |
5291 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
5292 | ("java-commons-codec" ,java-commons-codec) | |
5293 | ("java-hamcrest-core" ,java-hamcrest-core) | |
5294 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
5295 | ("java-mockito" ,java-mockito-1) | |
5296 | ("java-junit" ,java-junit))) | |
5297 | (home-page "https://hc.apache.org/httpcomponents-client-ga/") | |
5298 | (synopsis "HTTP client library for Java") | |
5299 | (description "Although the @code{java.net} package provides basic | |
5300 | functionality for accessing resources via HTTP, it doesn't provide the full | |
5301 | flexibility or functionality needed by many applications. @code{HttpClient} | |
5302 | seeks to fill this void by providing an efficient, up-to-date, and | |
5303 | feature-rich package implementing the client side of the most recent HTTP | |
5304 | standards and recommendations.") | |
5305 | (license license:asl2.0))) | |
5306 | ||
cbce5de2 RW |
5307 | (define-public java-httpcomponents-httpmime |
5308 | (package (inherit java-httpcomponents-httpclient) | |
5309 | (name "java-httpcomponents-httpmime") | |
5310 | (arguments | |
5311 | `(#:jar-name "httpcomponents-httpmime.jar" | |
5312 | #:phases | |
5313 | (modify-phases %standard-phases | |
5314 | (add-after 'unpack 'chdir | |
5315 | (lambda _ (chdir "httpmime") #t))))) | |
5316 | (inputs | |
5317 | `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) | |
5318 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
5319 | ("java-junit" ,java-junit) | |
5320 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
5321 | ||
4b34c21f RW |
5322 | (define-public java-commons-net |
5323 | (package | |
5324 | (name "java-commons-net") | |
5325 | (version "3.6") | |
5326 | (source (origin | |
5327 | (method url-fetch) | |
5328 | (uri (string-append "mirror://apache/commons/net/source/" | |
5329 | "commons-net-" version "-src.tar.gz")) | |
5330 | (sha256 | |
5331 | (base32 | |
5332 | "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr")))) | |
5333 | (build-system ant-build-system) | |
5334 | (arguments | |
5335 | `(;; FIXME: MainTest.java tries to read "examples.properties" (which | |
5336 | ;; should be "resources/examples/examples.properties"), but gets "null" | |
5337 | ;; instead. | |
5338 | #:tests? #f | |
5339 | #:jar-name "commons-net.jar")) | |
5340 | (native-inputs | |
5341 | `(("java-junit" ,java-junit) | |
5342 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
5343 | (home-page "http://commons.apache.org/net/") | |
5344 | (synopsis "Client library for many basic Internet protocols") | |
5345 | (description "The Apache Commons Net library implements the client side of | |
5346 | many basic Internet protocols. The purpose of the library is to provide | |
5347 | fundamental protocol access, not higher-level abstractions.") | |
5348 | (license license:asl2.0))) | |
5349 | ||
808cb58f RW |
5350 | (define-public java-jsch |
5351 | (package | |
5352 | (name "java-jsch") | |
1c8ba10a | 5353 | (version "0.1.55") |
808cb58f RW |
5354 | (source (origin |
5355 | (method url-fetch) | |
5356 | (uri (string-append "mirror://sourceforge/jsch/jsch/" | |
5357 | version "/jsch-" version ".zip")) | |
5358 | (sha256 | |
5359 | (base32 | |
1c8ba10a | 5360 | "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6")))) |
808cb58f RW |
5361 | (build-system ant-build-system) |
5362 | (arguments | |
5363 | `(#:build-target "dist" | |
1c8ba10a | 5364 | #:tests? #f ; no tests included |
808cb58f RW |
5365 | #:phases |
5366 | (modify-phases %standard-phases | |
5367 | (replace 'install (install-jars "dist"))))) | |
5368 | (native-inputs | |
5369 | `(("unzip" ,unzip))) | |
5370 | (home-page "http://www.jcraft.com/jsch/") | |
5371 | (synopsis "Pure Java implementation of SSH2") | |
5372 | (description "JSch is a pure Java implementation of SSH2. JSch allows you | |
5373 | to connect to an SSH server and use port forwarding, X11 forwarding, file | |
5374 | transfer, etc., and you can integrate its functionality into your own Java | |
5375 | programs.") | |
5376 | (license license:bsd-3))) | |
5377 | ||
a6244698 RW |
5378 | (define-public java-commons-compress |
5379 | (package | |
5380 | (name "java-commons-compress") | |
5381 | (version "1.13") | |
5382 | (source (origin | |
5383 | (method url-fetch) | |
5384 | (uri (string-append "mirror://apache/commons/compress/source/" | |
5385 | "commons-compress-" version "-src.tar.gz")) | |
5386 | (sha256 | |
5387 | (base32 | |
5388 | "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8")))) | |
5389 | (build-system ant-build-system) | |
5390 | (arguments | |
5391 | `(#:jar-name "commons-compress.jar" | |
5392 | #:phases | |
5393 | (modify-phases %standard-phases | |
5394 | (add-after 'unpack 'delete-bad-tests | |
5395 | (lambda _ | |
5396 | (with-directory-excursion "src/test/java/org/apache/commons/compress/" | |
5397 | ;; FIXME: These tests really should not fail. Maybe they are | |
5398 | ;; indicative of problems with our Java packaging work. | |
5399 | ||
5400 | ;; This test fails with a null pointer exception. | |
5401 | (delete-file "archivers/sevenz/SevenZOutputFileTest.java") | |
5402 | ;; This test fails to open test resources. | |
5403 | (delete-file "archivers/zip/ExplodeSupportTest.java") | |
5404 | ||
5405 | ;; FIXME: This test adds a dependency on powermock, which is hard to | |
5406 | ;; package at this point. | |
5407 | ;; https://github.com/powermock/powermock | |
5408 | (delete-file "archivers/sevenz/SevenZNativeHeapTest.java")) | |
5409 | #t))))) | |
5410 | (inputs | |
5411 | `(("java-junit" ,java-junit) | |
5412 | ("java-hamcrest-core" ,java-hamcrest-core) | |
5413 | ("java-mockito" ,java-mockito-1) | |
5414 | ("java-xz" ,java-xz))) | |
5415 | (home-page "https://commons.apache.org/proper/commons-compress/") | |
5416 | (synopsis "Java library for working with compressed files") | |
5417 | (description "The Apache Commons Compress library defines an API for | |
5418 | working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ, | |
5419 | Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.") | |
5420 | (license license:asl2.0))) | |
5421 | ||
51263ff5 JL |
5422 | (define-public java-commons-csv |
5423 | (package | |
5424 | (name "java-commons-csv") | |
5425 | (version "1.4") | |
5426 | (source (origin | |
5427 | (method url-fetch) | |
5428 | (uri (string-append "mirror://apache/commons/csv/source/" | |
5429 | "commons-csv-" version "-src.tar.gz")) | |
5430 | (sha256 | |
5431 | (base32 | |
5432 | "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij")))) | |
5433 | (build-system ant-build-system) | |
5434 | (arguments | |
5435 | `(#:jar-name "commons-csv.jar" | |
5436 | #:source-dir "src/main/java" | |
5437 | #:tests? #f)); FIXME: requires java-h2 | |
5438 | (inputs | |
5439 | `(("java-hamcrest-core" ,java-hamcrest-core) | |
5440 | ("java-commons-io" ,java-commons-io) | |
5441 | ("java-commons-lang3" ,java-commons-lang3) | |
5442 | ("junit" ,java-junit))) | |
5443 | (home-page "https://commons.apache.org/proper/commons-csv/") | |
5444 | (synopsis "Read and write CSV documents") | |
5445 | (description "Commons CSV reads and writes files in variations of the Comma | |
5446 | Separated Value (CSV) format. The most common CSV formats are predefined in the | |
5447 | CSVFormat class: | |
5448 | ||
5449 | @itemize | |
5450 | @item Microsoft Excel | |
5451 | @item Informix UNLOAD | |
5452 | @item Informix UNLOAD CSV | |
5453 | @item MySQL | |
5454 | @item RFC 4180 | |
5455 | @item TDF | |
5456 | @end itemize | |
5457 | ||
5458 | Custom formats can be created using a fluent style API.") | |
5459 | (license license:asl2.0))) | |
5460 | ||
6ee6d0b5 RW |
5461 | (define-public java-osgi-annotation |
5462 | (package | |
5463 | (name "java-osgi-annotation") | |
5464 | (version "6.0.0") | |
5465 | (source (origin | |
5466 | (method url-fetch) | |
5467 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5468 | "org/osgi/org.osgi.annotation/" version "/" | |
5469 | "org.osgi.annotation-" version "-sources.jar")) | |
5470 | (sha256 | |
5471 | (base32 | |
5472 | "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w")))) | |
5473 | (build-system ant-build-system) | |
5474 | (arguments | |
5475 | `(#:tests? #f ; no tests | |
5476 | #:jar-name "osgi-annotation.jar")) | |
c353d014 | 5477 | (home-page "https://www.osgi.org") |
6ee6d0b5 RW |
5478 | (synopsis "Annotation module of OSGi framework") |
5479 | (description | |
5480 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
5481 | and service platform for the Java programming language. This package contains | |
5482 | the OSGi annotation module, providing additional services to help dynamic | |
5483 | components.") | |
5484 | (license license:asl2.0))) | |
5485 | ||
37e2e5d4 RW |
5486 | (define-public java-osgi-core |
5487 | (package | |
5488 | (name "java-osgi-core") | |
5489 | (version "6.0.0") | |
5490 | (source (origin | |
5491 | (method url-fetch) | |
5492 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5493 | "org/osgi/org.osgi.core/" version "/" | |
5494 | "org.osgi.core-" version "-sources.jar")) | |
5495 | (sha256 | |
5496 | (base32 | |
5497 | "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv")))) | |
5498 | (build-system ant-build-system) | |
5499 | (arguments | |
5500 | `(#:tests? #f ; no tests | |
5501 | #:jar-name "osgi-core.jar")) | |
5502 | (inputs | |
5503 | `(("java-osgi-annotation" ,java-osgi-annotation))) | |
c353d014 | 5504 | (home-page "https://www.osgi.org") |
37e2e5d4 RW |
5505 | (synopsis "Core module of OSGi framework") |
5506 | (description | |
5507 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
5508 | and service platform for the Java programming language. This package contains | |
5509 | the OSGi Core module.") | |
5510 | (license license:asl2.0))) | |
5511 | ||
8af92c8f RW |
5512 | (define-public java-osgi-service-event |
5513 | (package | |
5514 | (name "java-osgi-service-event") | |
5515 | (version "1.3.1") | |
5516 | (source (origin | |
5517 | (method url-fetch) | |
5518 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5519 | "org/osgi/org.osgi.service.event/" | |
5520 | version "/org.osgi.service.event-" | |
5521 | version "-sources.jar")) | |
5522 | (sha256 | |
5523 | (base32 | |
5524 | "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm")))) | |
5525 | (build-system ant-build-system) | |
5526 | (arguments | |
5527 | `(#:tests? #f ; no tests | |
5528 | #:jar-name "osgi-service-event.jar")) | |
5529 | (inputs | |
5530 | `(("java-osgi-annotation" ,java-osgi-annotation) | |
5531 | ("java-osgi-core" ,java-osgi-core))) | |
c353d014 | 5532 | (home-page "https://www.osgi.org") |
8af92c8f RW |
5533 | (synopsis "OSGi service event module") |
5534 | (description | |
5535 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
5536 | and service platform for the Java programming language. This package contains | |
5537 | the OSGi @code{org.osgi.service.event} module.") | |
5538 | (license license:asl2.0))) | |
5539 | ||
674e93a0 RW |
5540 | (define-public java-eclipse-osgi |
5541 | (package | |
5542 | (name "java-eclipse-osgi") | |
5543 | (version "3.11.3") | |
5544 | (source (origin | |
5545 | (method url-fetch) | |
5546 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5547 | "org/eclipse/platform/org.eclipse.osgi/" | |
5548 | version "/org.eclipse.osgi-" | |
5549 | version "-sources.jar")) | |
5550 | (sha256 | |
5551 | (base32 | |
5552 | "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b")))) | |
5553 | (build-system ant-build-system) | |
5554 | (arguments | |
5555 | `(#:tests? #f ; no tests included | |
5556 | #:jar-name "eclipse-equinox-osgi.jar")) | |
5557 | (inputs | |
5558 | `(("java-osgi-annotation" ,java-osgi-annotation))) | |
5559 | (home-page "http://www.eclipse.org/equinox/") | |
5560 | (synopsis "Eclipse Equinox OSGi framework") | |
5561 | (description "This package provides an implementation of the OSGi Core | |
5562 | specification.") | |
5563 | (license license:epl1.0))) | |
5564 | ||
81b55b1e RW |
5565 | (define-public java-eclipse-equinox-common |
5566 | (package | |
5567 | (name "java-eclipse-equinox-common") | |
e40e3792 | 5568 | (version "3.10.200") |
81b55b1e RW |
5569 | (source (origin |
5570 | (method url-fetch) | |
5571 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5572 | "org/eclipse/platform/org.eclipse.equinox.common/" | |
5573 | version "/org.eclipse.equinox.common-" | |
5574 | version "-sources.jar")) | |
5575 | (sha256 | |
5576 | (base32 | |
e40e3792 | 5577 | "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj")))) |
81b55b1e RW |
5578 | (build-system ant-build-system) |
5579 | (arguments | |
5580 | `(#:tests? #f ; no tests included | |
5581 | #:jar-name "eclipse-equinox-common.jar")) | |
5582 | (inputs | |
5583 | `(("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5584 | (home-page "http://www.eclipse.org/equinox/") | |
5585 | (synopsis "Common Eclipse runtime") | |
5586 | (description "This package provides the common Eclipse runtime.") | |
5587 | (license license:epl1.0))) | |
5588 | ||
90368ad9 RW |
5589 | (define-public java-eclipse-core-jobs |
5590 | (package | |
5591 | (name "java-eclipse-core-jobs") | |
5592 | (version "3.8.0") | |
5593 | (source (origin | |
5594 | (method url-fetch) | |
5595 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5596 | "org/eclipse/platform/org.eclipse.core.jobs/" | |
5597 | version "/org.eclipse.core.jobs-" | |
5598 | version "-sources.jar")) | |
5599 | (sha256 | |
5600 | (base32 | |
5601 | "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b")))) | |
5602 | (build-system ant-build-system) | |
5603 | (arguments | |
5604 | `(#:tests? #f ; no tests included | |
5605 | #:jar-name "eclipse-core-jobs.jar")) | |
5606 | (inputs | |
5607 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5608 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5609 | (home-page "http://www.eclipse.org/equinox/") | |
5610 | (synopsis "Eclipse jobs mechanism") | |
5611 | (description "This package provides the Eclipse jobs mechanism.") | |
5612 | (license license:epl1.0))) | |
5613 | ||
fbaf09eb RW |
5614 | (define-public java-eclipse-equinox-registry |
5615 | (package | |
5616 | (name "java-eclipse-equinox-registry") | |
5617 | (version "3.6.100") | |
5618 | (source (origin | |
5619 | (method url-fetch) | |
5620 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5621 | "org/eclipse/platform/org.eclipse.equinox.registry/" | |
5622 | version "/org.eclipse.equinox.registry-" | |
5623 | version "-sources.jar")) | |
5624 | (sha256 | |
5625 | (base32 | |
5626 | "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k")))) | |
5627 | (build-system ant-build-system) | |
5628 | (arguments | |
5629 | `(#:tests? #f ; no tests included | |
5630 | #:jar-name "eclipse-equinox-registry.jar")) | |
5631 | (inputs | |
5632 | `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
5633 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5634 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5635 | (home-page "http://www.eclipse.org/equinox/") | |
5636 | (synopsis "Eclipse extension registry support") | |
5637 | (description "This package provides support for the Eclipse extension | |
5638 | registry.") | |
5639 | (license license:epl1.0))) | |
5640 | ||
65214c87 RW |
5641 | (define-public java-eclipse-equinox-app |
5642 | (package | |
5643 | (name "java-eclipse-equinox-app") | |
5644 | (version "1.3.400") | |
5645 | (source (origin | |
5646 | (method url-fetch) | |
5647 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5648 | "org/eclipse/platform/org.eclipse.equinox.app/" | |
5649 | version "/org.eclipse.equinox.app-" | |
5650 | version "-sources.jar")) | |
5651 | (sha256 | |
5652 | (base32 | |
5653 | "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab")))) | |
5654 | (build-system ant-build-system) | |
5655 | (arguments | |
5656 | `(#:tests? #f ; no tests included | |
5657 | #:jar-name "eclipse-equinox-app.jar")) | |
5658 | (inputs | |
5659 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5660 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5661 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
5662 | ("java-osgi-service-event" ,java-osgi-service-event))) | |
5663 | (home-page "http://www.eclipse.org/equinox/") | |
5664 | (synopsis "Equinox application container") | |
5665 | (description "This package provides the Equinox application container for | |
5666 | Eclipse.") | |
5667 | (license license:epl1.0))) | |
5668 | ||
3f970214 RW |
5669 | (define-public java-eclipse-equinox-preferences |
5670 | (package | |
5671 | (name "java-eclipse-equinox-preferences") | |
5672 | (version "3.6.1") | |
5673 | (source (origin | |
5674 | (method url-fetch) | |
5675 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5676 | "org/eclipse/platform/org.eclipse.equinox.preferences/" | |
5677 | version "/org.eclipse.equinox.preferences-" | |
5678 | version "-sources.jar")) | |
5679 | (sha256 | |
5680 | (base32 | |
5681 | "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2")))) | |
5682 | (build-system ant-build-system) | |
5683 | (arguments | |
5684 | `(#:tests? #f ; no tests included | |
5685 | #:jar-name "eclipse-equinox-preferences.jar")) | |
5686 | (inputs | |
5687 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5688 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5689 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5690 | (home-page "http://www.eclipse.org/equinox/") | |
5691 | (synopsis "Eclipse preferences mechanism") | |
5692 | (description "This package provides the Eclipse preferences mechanism with | |
5693 | the module @code{org.eclipse.equinox.preferences}.") | |
5694 | (license license:epl1.0))) | |
5695 | ||
4ad3d4f3 RW |
5696 | (define-public java-eclipse-core-contenttype |
5697 | (package | |
5698 | (name "java-eclipse-core-contenttype") | |
5699 | (version "3.5.100") | |
5700 | (source (origin | |
5701 | (method url-fetch) | |
5702 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5703 | "org/eclipse/platform/org.eclipse.core.contenttype/" | |
5704 | version "/org.eclipse.core.contenttype-" | |
5705 | version "-sources.jar")) | |
5706 | (sha256 | |
5707 | (base32 | |
5708 | "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi")))) | |
5709 | (build-system ant-build-system) | |
5710 | (arguments | |
5711 | `(#:tests? #f ; no tests included | |
5712 | #:jar-name "eclipse-core-contenttype.jar")) | |
5713 | (inputs | |
5714 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5715 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5716 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5717 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5718 | (home-page "http://www.eclipse.org/") | |
5719 | (synopsis "Eclipse content mechanism") | |
5720 | (description "This package provides the Eclipse content mechanism in the | |
5721 | @code{org.eclipse.core.contenttype} module.") | |
5722 | (license license:epl1.0))) | |
5723 | ||
6a7f7e49 RW |
5724 | (define-public java-eclipse-core-runtime |
5725 | (package | |
5726 | (name "java-eclipse-core-runtime") | |
4fa9b6e6 | 5727 | (version "3.15.100") |
6a7f7e49 RW |
5728 | (source (origin |
5729 | (method url-fetch) | |
5730 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5731 | "org/eclipse/platform/org.eclipse.core.runtime/" | |
5732 | version "/org.eclipse.core.runtime-" | |
5733 | version "-sources.jar")) | |
5734 | (sha256 | |
5735 | (base32 | |
4fa9b6e6 | 5736 | "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r")))) |
6a7f7e49 RW |
5737 | (build-system ant-build-system) |
5738 | (arguments | |
5739 | `(#:tests? #f ; no tests included | |
5740 | #:jar-name "eclipse-core-runtime.jar")) | |
5741 | (inputs | |
5742 | `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5743 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
5744 | ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
5745 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5746 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5747 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5748 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5749 | (home-page "https://www.eclipse.org/") | |
5750 | (synopsis "Eclipse core runtime") | |
5751 | (description "This package provides the Eclipse core runtime with the | |
5752 | module @code{org.eclipse.core.runtime}.") | |
5753 | (license license:epl1.0))) | |
5754 | ||
b3806a15 RW |
5755 | (define-public java-eclipse-core-filesystem |
5756 | (package | |
5757 | (name "java-eclipse-core-filesystem") | |
5758 | (version "1.6.1") | |
5759 | (source (origin | |
5760 | (method url-fetch) | |
5761 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5762 | "org/eclipse/platform/org.eclipse.core.filesystem/" | |
5763 | version "/org.eclipse.core.filesystem-" | |
5764 | version "-sources.jar")) | |
5765 | (sha256 | |
5766 | (base32 | |
5767 | "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj")))) | |
5768 | (build-system ant-build-system) | |
5769 | (arguments | |
5770 | `(#:tests? #f ; no tests included | |
5771 | #:jar-name "eclipse-core-filesystem.jar")) | |
5772 | (inputs | |
5773 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5774 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5775 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5776 | (home-page "https://www.eclipse.org/") | |
5777 | (synopsis "Eclipse core file system") | |
5778 | (description "This package provides the Eclipse core file system with the | |
5779 | module @code{org.eclipse.core.filesystem}.") | |
5780 | (license license:epl1.0))) | |
5781 | ||
e96060de RW |
5782 | (define-public java-eclipse-core-expressions |
5783 | (package | |
5784 | (name "java-eclipse-core-expressions") | |
5785 | (version "3.5.100") | |
5786 | (source (origin | |
5787 | (method url-fetch) | |
5788 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5789 | "org/eclipse/platform/org.eclipse.core.expressions/" | |
5790 | version "/org.eclipse.core.expressions-" | |
5791 | version "-sources.jar")) | |
5792 | (sha256 | |
5793 | (base32 | |
5794 | "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f")))) | |
5795 | (build-system ant-build-system) | |
5796 | (arguments | |
5797 | `(#:tests? #f ; no tests included | |
5798 | #:jar-name "eclipse-core-expressions.jar")) | |
5799 | (inputs | |
5800 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5801 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5802 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5803 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5804 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5805 | (home-page "https://www.eclipse.org/") | |
5806 | (synopsis "Eclipse core expression language") | |
5807 | (description "This package provides the Eclipse core expression language | |
5808 | with the @code{org.eclipse.core.expressions} module.") | |
5809 | (license license:epl1.0))) | |
5810 | ||
e8d0f7c8 RW |
5811 | (define-public java-eclipse-core-variables |
5812 | (package | |
5813 | (name "java-eclipse-core-variables") | |
5814 | (version "3.3.0") | |
5815 | (source (origin | |
5816 | (method url-fetch) | |
5817 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5818 | "org/eclipse/platform/org.eclipse.core.variables/" | |
5819 | version "/org.eclipse.core.variables-" | |
5820 | version "-sources.jar")) | |
5821 | (sha256 | |
5822 | (base32 | |
5823 | "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy")))) | |
5824 | (build-system ant-build-system) | |
5825 | (arguments | |
5826 | `(#:tests? #f ; no tests included | |
5827 | #:jar-name "eclipse-core-variables.jar")) | |
5828 | (inputs | |
5829 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5830 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5831 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5832 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5833 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5834 | (home-page "https://www.eclipse.org/platform") | |
5835 | (synopsis "Eclipse core variables") | |
5836 | (description "This package provides the Eclipse core variables module | |
5837 | @code{org.eclipse.core.variables}.") | |
5838 | (license license:epl1.0))) | |
5839 | ||
7c3d479e RW |
5840 | (define-public java-eclipse-ant-core |
5841 | (package | |
5842 | (name "java-eclipse-ant-core") | |
5843 | (version "3.4.100") | |
5844 | (source (origin | |
5845 | (method url-fetch) | |
5846 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5847 | "org/eclipse/platform/org.eclipse.ant.core/" | |
5848 | version "/org.eclipse.ant.core-" | |
5849 | version "-sources.jar")) | |
5850 | (sha256 | |
5851 | (base32 | |
5852 | "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7")))) | |
5853 | (build-system ant-build-system) | |
5854 | (arguments | |
5855 | `(#:tests? #f ; no tests included | |
5856 | #:jar-name "eclipse-ant-core.jar")) | |
5857 | (inputs | |
5858 | `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
5859 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5860 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5861 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5862 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5863 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5864 | ("java-eclipse-core-variables" ,java-eclipse-core-variables) | |
5865 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5866 | (home-page "https://www.eclipse.org/platform") | |
5867 | (synopsis "Ant build tool core libraries") | |
5868 | (description "This package provides the ant build tool core libraries with | |
5869 | the module @code{org.eclipse.ant.core}.") | |
5870 | (license license:epl1.0))) | |
5871 | ||
6636f638 RW |
5872 | (define-public java-eclipse-core-resources |
5873 | (package | |
5874 | (name "java-eclipse-core-resources") | |
c8427a5e | 5875 | (version "3.13.200") |
6636f638 RW |
5876 | (source (origin |
5877 | (method url-fetch) | |
5878 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5879 | "org/eclipse/platform/org.eclipse.core.resources/" | |
5880 | version "/org.eclipse.core.resources-" | |
5881 | version "-sources.jar")) | |
5882 | (sha256 | |
5883 | (base32 | |
c8427a5e | 5884 | "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs")))) |
6636f638 RW |
5885 | (build-system ant-build-system) |
5886 | (arguments | |
5887 | `(#:tests? #f ; no tests included | |
5888 | #:jar-name "eclipse-core-resources.jar")) | |
5889 | (inputs | |
5890 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5891 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5892 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5893 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5894 | ("java-eclipse-core-expressions" ,java-eclipse-core-expressions) | |
5895 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
5896 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
5897 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5898 | ("java-eclipse-ant-core" ,java-eclipse-ant-core) | |
5899 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5900 | (home-page "https://www.eclipse.org/") | |
5901 | (synopsis "Eclipse core resource management") | |
5902 | (description "This package provides the Eclipse core resource management | |
5903 | module @code{org.eclipse.core.resources}.") | |
5904 | (license license:epl1.0))) | |
5905 | ||
afb5858d RW |
5906 | (define-public java-eclipse-compare-core |
5907 | (package | |
5908 | (name "java-eclipse-compare-core") | |
5909 | (version "3.6.0") | |
5910 | (source (origin | |
5911 | (method url-fetch) | |
5912 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5913 | "org/eclipse/platform/org.eclipse.compare.core/" | |
5914 | version "/org.eclipse.compare.core-" | |
5915 | version "-sources.jar")) | |
5916 | (sha256 | |
5917 | (base32 | |
5918 | "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg")))) | |
5919 | (build-system ant-build-system) | |
5920 | (arguments | |
5921 | `(#:tests? #f ; no tests included | |
5922 | #:jar-name "eclipse-compare-core.jar")) | |
5923 | (inputs | |
5924 | `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5925 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5926 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
5927 | ("java-icu4j" ,java-icu4j))) | |
5928 | (home-page "https://www.eclipse.org/") | |
5929 | (synopsis "Eclipse core compare support") | |
5930 | (description "This package provides the Eclipse core compare support | |
5931 | module @code{org.eclipse.compare.core}.") | |
5932 | (license license:epl1.0))) | |
5933 | ||
1bb191fc RW |
5934 | (define-public java-eclipse-team-core |
5935 | (package | |
5936 | (name "java-eclipse-team-core") | |
5937 | (version "3.8.0") | |
5938 | (source (origin | |
5939 | (method url-fetch) | |
5940 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5941 | "org/eclipse/platform/org.eclipse.team.core/" | |
5942 | version "/org.eclipse.team.core-" | |
5943 | version "-sources.jar")) | |
5944 | (sha256 | |
5945 | (base32 | |
5946 | "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7")))) | |
5947 | (build-system ant-build-system) | |
5948 | (arguments | |
5949 | `(#:tests? #f ; no tests included | |
5950 | #:jar-name "eclipse-team-core.jar")) | |
5951 | (inputs | |
5952 | `(("java-eclipse-compare-core" ,java-eclipse-compare-core) | |
5953 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5954 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
5955 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
5956 | ("java-eclipse-core-resources" ,java-eclipse-core-resources) | |
5957 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5958 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5959 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5960 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5961 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5962 | (home-page "https://www.eclipse.org/platform") | |
5963 | (synopsis "Eclipse team support core") | |
5964 | (description "This package provides the Eclipse team support core module | |
5965 | @code{org.eclipse.team.core}.") | |
5966 | (license license:epl1.0))) | |
5967 | ||
31342529 RW |
5968 | (define-public java-eclipse-core-commands |
5969 | (package | |
5970 | (name "java-eclipse-core-commands") | |
5971 | (version "3.8.1") | |
5972 | (source (origin | |
5973 | (method url-fetch) | |
5974 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5975 | "org/eclipse/platform/org.eclipse.core.commands/" | |
5976 | version "/org.eclipse.core.commands-" | |
5977 | version "-sources.jar")) | |
5978 | (sha256 | |
5979 | (base32 | |
5980 | "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9")))) | |
5981 | (build-system ant-build-system) | |
5982 | (arguments | |
5983 | `(#:tests? #f ; no tests included | |
5984 | #:jar-name "eclipse-core-commands.jar")) | |
5985 | (inputs | |
5986 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common))) | |
5987 | (home-page "https://www.eclipse.org/platform") | |
5988 | (synopsis "Eclipse core commands") | |
5989 | (description "This package provides Eclipse core commands in the module | |
5990 | @code{org.eclipse.core.commands}.") | |
5991 | (license license:epl1.0))) | |
5992 | ||
bf96acf7 RW |
5993 | (define-public java-eclipse-text |
5994 | (package | |
5995 | (name "java-eclipse-text") | |
5996 | (version "3.6.0") | |
5997 | (source (origin | |
5998 | (method url-fetch) | |
5999 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6000 | "org/eclipse/platform/org.eclipse.text/" | |
6001 | version "/org.eclipse.text-" | |
6002 | version "-sources.jar")) | |
6003 | (sha256 | |
6004 | (base32 | |
6005 | "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1")))) | |
6006 | (build-system ant-build-system) | |
6007 | (arguments | |
6008 | `(#:tests? #f ; no tests included | |
6009 | #:jar-name "eclipse-text.jar" | |
6010 | #:phases | |
6011 | (modify-phases %standard-phases | |
6012 | ;; When creating a new category we must make sure that the new list | |
6013 | ;; matches List<Position>. By default it seems to be too generic | |
6014 | ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>. | |
6015 | ;; Without this we get this error: | |
6016 | ;; | |
6017 | ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376: | |
6018 | ;; error: method put in interface Map<K,V> cannot be applied to given types; | |
6019 | ;; [javac] fPositions.put(category, new ArrayList<>()); | |
6020 | ;; [javac] ^ | |
6021 | ;; [javac] required: String,List<Position> | |
6022 | ;; [javac] found: String,ArrayList<Object> | |
6023 | ;; [javac] reason: actual argument ArrayList<Object> cannot be converted | |
6024 | ;; to List<Position> by method invocation conversion | |
6025 | ;; [javac] where K,V are type-variables: | |
6026 | ;; [javac] K extends Object declared in interface Map | |
6027 | ;; [javac] V extends Object declared in interface Map | |
6028 | ;; | |
6029 | ;; I don't know if this is a good fix. I suspect it is not, but it | |
6030 | ;; seems to work. | |
6031 | (add-after 'unpack 'fix-compilation-error | |
6032 | (lambda _ | |
6033 | (substitute* "src/org/eclipse/jface/text/AbstractDocument.java" | |
6034 | (("Positions.put\\(category, new ArrayList<>\\(\\)\\);") | |
6035 | "Positions.put(category, new ArrayList<Position>());")) | |
6036 | #t))))) | |
6037 | (inputs | |
6038 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
6039 | ("java-eclipse-core-commands" ,java-eclipse-core-commands) | |
6040 | ("java-icu4j" ,java-icu4j))) | |
6041 | (home-page "http://www.eclipse.org/platform") | |
6042 | (synopsis "Eclipse text library") | |
6043 | (description "Platform Text is part of the Platform UI project and | |
6044 | provides the basic building blocks for text and text editors within Eclipse | |
6045 | and contributes the Eclipse default text editor.") | |
6046 | (license license:epl1.0))) | |
6047 | ||
c24d11b7 RW |
6048 | (define-public java-eclipse-jdt-core |
6049 | (package | |
6050 | (name "java-eclipse-jdt-core") | |
43d6776b | 6051 | (version "3.16.0") |
c24d11b7 RW |
6052 | (source (origin |
6053 | (method url-fetch) | |
6054 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6055 | "org/eclipse/jdt/org.eclipse.jdt.core/" | |
6056 | version "/org.eclipse.jdt.core-" | |
6057 | version "-sources.jar")) | |
6058 | (sha256 | |
6059 | (base32 | |
43d6776b | 6060 | "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k")))) |
c24d11b7 RW |
6061 | (build-system ant-build-system) |
6062 | (arguments | |
6063 | `(#:tests? #f ; no tests included | |
84b226c2 RW |
6064 | #:jar-name "eclipse-jdt-core.jar" |
6065 | #:phases | |
6066 | (modify-phases %standard-phases | |
6067 | (add-after 'unpack 'move-sources | |
6068 | (lambda _ | |
6069 | (with-directory-excursion "src/jdtCompilerAdaptersrc/" | |
6070 | (for-each (lambda (file) | |
6071 | (install-file file (string-append "../" (dirname file)))) | |
6072 | (find-files "." ".*"))) | |
6073 | (delete-file-recursively "src/jdtCompilerAdaptersrc/") | |
6074 | #t)) | |
6075 | (add-before 'build 'copy-resources | |
6076 | (lambda _ | |
6077 | (with-directory-excursion "src" | |
6078 | (for-each (lambda (file) | |
6079 | (install-file file (string-append "../build/classes/" (dirname file)))) | |
6080 | (find-files "." ".*.(props|properties|rsc)"))) | |
6081 | #t))))) | |
c24d11b7 RW |
6082 | (inputs |
6083 | `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
6084 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
6085 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
6086 | ("java-eclipse-core-resources" ,java-eclipse-core-resources) | |
6087 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
6088 | ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
6089 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
6090 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
6091 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
6092 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
6093 | ("java-eclipse-text" ,java-eclipse-text))) | |
6094 | (home-page "https://www.eclipse.org/jdt") | |
6095 | (synopsis "Java development tools core libraries") | |
6096 | (description "This package provides the core libraries of the Eclipse Java | |
6097 | development tools.") | |
6098 | (license license:epl1.0))) | |
6099 | ||
74c2339f RW |
6100 | (define-public java-eclipse-jdt-compiler-apt |
6101 | (package | |
6102 | (name "java-eclipse-jdt-compiler-apt") | |
6103 | (version "1.3.400") | |
6104 | (source (origin | |
6105 | (method url-fetch) | |
6106 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6107 | "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/" | |
6108 | version "/org.eclipse.jdt.compiler.apt-" | |
6109 | version "-sources.jar")) | |
6110 | (sha256 | |
6111 | (base32 | |
6112 | "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8")))) | |
6113 | (build-system ant-build-system) | |
6114 | (arguments | |
6115 | `(#:tests? #f ; no tests included | |
6116 | #:jar-name "eclipse-jdt-compiler-apt.jar" | |
6117 | #:jdk ,openjdk11)) | |
6118 | (inputs | |
6119 | `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core))) | |
6120 | (home-page "https://www.eclipse.org/jdt/apt/") | |
6121 | (synopsis "Annotation processing tool") | |
6122 | (description "APT stands for Annotation Processing Tool. APT provides a | |
6123 | means for generating files and compiling new Java classes based on annotations | |
6124 | found in your source code.") | |
6125 | (license license:epl2.0))) | |
6126 | ||
a5cdcf6c RW |
6127 | (define-public java-javax-mail |
6128 | (package | |
6129 | (name "java-javax-mail") | |
6130 | (version "1.5.6") | |
6131 | (source (origin | |
6132 | (method url-fetch) | |
6133 | (uri (string-append "https://repo1.maven.org/maven2/" | |
6134 | "com/sun/mail/javax.mail/" | |
6135 | version "/javax.mail-" | |
6136 | version "-sources.jar")) | |
6137 | (sha256 | |
6138 | (base32 | |
6139 | "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9")))) | |
6140 | (build-system ant-build-system) | |
6141 | (arguments | |
6142 | `(#:tests? #f ; no tests | |
6143 | #:jar-name "javax-mail.jar")) | |
6144 | (home-page "https://javamail.java.net") | |
6145 | (synopsis "Reference implementation of the JavaMail API") | |
6146 | (description | |
6147 | "This package provides versions of the JavaMail API implementation, IMAP, | |
6148 | SMTP, and POP3 service providers, some examples, and documentation for the | |
6149 | JavaMail API.") | |
6150 | ;; GPLv2 only with "classpath exception". | |
6151 | (license license:gpl2))) | |
6152 | ||
0e660c4d RW |
6153 | (define-public java-log4j-api |
6154 | (package | |
6155 | (name "java-log4j-api") | |
6156 | (version "2.4.1") | |
6157 | (source (origin | |
6158 | (method url-fetch) | |
6159 | (uri (string-append "mirror://apache/logging/log4j/" version | |
6160 | "/apache-log4j-" version "-src.tar.gz")) | |
6161 | (sha256 | |
6162 | (base32 | |
6163 | "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd")))) | |
6164 | (build-system ant-build-system) | |
6165 | (arguments | |
6166 | `(#:tests? #f ; tests require unpackaged software | |
6167 | #:jar-name "log4j-api.jar" | |
6168 | #:make-flags | |
6169 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") | |
6170 | "/share/java")) | |
6171 | #:phases | |
6172 | (modify-phases %standard-phases | |
6173 | (add-after 'unpack 'enter-dir | |
6174 | (lambda _ (chdir "log4j-api") #t)) | |
6175 | ;; FIXME: The tests require additional software that has not been | |
6176 | ;; packaged yet, such as | |
6177 | ;; * org.apache.maven | |
6178 | ;; * org.apache.felix | |
6179 | (add-after 'enter-dir 'delete-tests | |
6180 | (lambda _ (delete-file-recursively "src/test") #t))))) | |
6181 | (inputs | |
6182 | `(("java-osgi-core" ,java-osgi-core) | |
6183 | ("java-hamcrest-core" ,java-hamcrest-core) | |
6184 | ("java-junit" ,java-junit))) | |
6185 | (home-page "http://logging.apache.org/log4j/2.x/") | |
6186 | (synopsis "API module of the Log4j logging framework for Java") | |
6187 | (description | |
6188 | "This package provides the API module of the Log4j logging framework for | |
6189 | Java.") | |
6190 | (license license:asl2.0))) | |
6191 | ||
dfef4231 JL |
6192 | (define-public java-log4j-core |
6193 | (package | |
6194 | (inherit java-log4j-api) | |
6195 | (name "java-log4j-core") | |
6196 | (inputs | |
6197 | `(("java-osgi-core" ,java-osgi-core) | |
6198 | ("java-hamcrest-core" ,java-hamcrest-core) | |
6199 | ("java-log4j-api" ,java-log4j-api) | |
6200 | ("java-mail" ,java-mail) | |
6201 | ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec) | |
6202 | ("java-lmax-disruptor" ,java-lmax-disruptor) | |
6203 | ("java-kafka" ,java-kafka-clients) | |
6204 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) | |
6205 | ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
6206 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
6207 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) | |
6208 | ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml) | |
6209 | ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml) | |
6210 | ("java-commons-compress" ,java-commons-compress) | |
6211 | ("java-commons-csv" ,java-commons-csv) | |
6212 | ("java-jeromq" ,java-jeromq) | |
6213 | ("java-junit" ,java-junit))) | |
6214 | (native-inputs | |
6215 | `(("hamcrest" ,java-hamcrest-all) | |
6216 | ("java-commons-io" ,java-commons-io) | |
6217 | ("java-commons-lang3" ,java-commons-lang3) | |
6218 | ("slf4j" ,java-slf4j-api))) | |
6219 | (arguments | |
6220 | `(#:tests? #f ; tests require more dependencies | |
6221 | #:test-dir "src/test" | |
6222 | #:source-dir "src/main/java" | |
6223 | #:jar-name "log4j-core.jar" | |
6224 | #:jdk ,icedtea-8 | |
6225 | #:make-flags | |
6226 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") | |
6227 | "/share/java")) | |
6228 | #:phases | |
6229 | (modify-phases %standard-phases | |
6230 | (add-after 'unpack 'enter-dir | |
6231 | (lambda _ (chdir "log4j-core") #t))))) | |
6232 | (synopsis "Core component of the Log4j framework") | |
6233 | (description "This package provides the core component of the Log4j | |
6234 | logging framework for Java."))) | |
6235 | ||
2caf873e JL |
6236 | (define-public java-log4j-1.2-api |
6237 | (package | |
6238 | (inherit java-log4j-api) | |
6239 | (name "java-log4j-1.2-api") | |
6240 | (arguments | |
6241 | `(#:jar-name "java-log4j-1.2-api.jar" | |
6242 | #:source-dir "log4j-1.2-api/src/main/java" | |
6243 | #:jdk ,icedtea-8 | |
6244 | ;; Tests require maven-model (and other maven subprojects), which is a | |
6245 | ;; cyclic dependency. | |
6246 | #:tests? #f)) | |
6247 | (inputs | |
6248 | `(("log4j-api" ,java-log4j-api) | |
6249 | ("log4j-core" ,java-log4j-core) | |
6250 | ("osgi-core" ,java-osgi-core) | |
6251 | ("eclipse-osgi" ,java-eclipse-osgi) | |
6252 | ("java-lmax-disruptor" ,java-lmax-disruptor))))) | |
6253 | ||
1c188f4e HG |
6254 | (define-public java-commons-cli |
6255 | (package | |
6256 | (name "java-commons-cli") | |
37602dd8 | 6257 | (version "1.4") |
1c188f4e HG |
6258 | (source (origin |
6259 | (method url-fetch) | |
6260 | (uri (string-append "mirror://apache/commons/cli/source/" | |
6261 | "commons-cli-" version "-src.tar.gz")) | |
6262 | (sha256 | |
6263 | (base32 | |
37602dd8 | 6264 | "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1")))) |
1c188f4e HG |
6265 | (build-system ant-build-system) |
6266 | ;; TODO: javadoc | |
6267 | (arguments | |
6268 | `(#:jar-name "commons-cli.jar")) | |
6269 | (native-inputs | |
6270 | `(("java-junit" ,java-junit) | |
6271 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
6272 | (home-page "http://commons.apache.org/cli/") | |
6273 | (synopsis "Command line arguments and options parsing library") | |
6274 | (description "The Apache Commons CLI library provides an API for parsing | |
6275 | command line options passed to programs. It is also able to print help | |
6276 | messages detailing the options available for a command line tool. | |
6277 | ||
6278 | Commons CLI supports different types of options: | |
6279 | ||
6280 | @itemize | |
6281 | @item POSIX like options (ie. tar -zxvf foo.tar.gz) | |
6282 | @item GNU like long options (ie. du --human-readable --max-depth=1) | |
6283 | @item Java like properties (ie. java -Djava.awt.headless=true Foo) | |
6284 | @item Short options with value attached (ie. gcc -O2 foo.c) | |
6285 | @item long options with single hyphen (ie. ant -projecthelp) | |
6286 | @end itemize | |
6287 | ||
6288 | This is a part of the Apache Commons Project.") | |
6289 | (license license:asl2.0))) | |
0a8519bc HG |
6290 | |
6291 | (define-public java-commons-codec | |
6292 | (package | |
6293 | (name "java-commons-codec") | |
6294 | (version "1.10") | |
6295 | (source (origin | |
6296 | (method url-fetch) | |
6297 | (uri (string-append "mirror://apache/commons/codec/source/" | |
6298 | "commons-codec-" version "-src.tar.gz")) | |
6299 | (sha256 | |
6300 | (base32 | |
6301 | "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65")))) | |
6302 | (build-system ant-build-system) | |
6303 | (outputs '("out" "doc")) | |
6304 | (arguments | |
6305 | `(#:test-target "test" | |
6306 | #:make-flags | |
6307 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
6308 | (junit (assoc-ref %build-inputs "java-junit"))) | |
6309 | (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") | |
6310 | (string-append "-Dhamcrest.jar=" hamcrest | |
6311 | "/share/java/hamcrest-core.jar") | |
6312 | ;; Do not append version to jar. | |
6313 | "-Dfinal.name=commons-codec")) | |
6314 | #:phases | |
6315 | (modify-phases %standard-phases | |
6316 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
6317 | (replace 'install (install-jars "dist")) | |
6318 | (add-after 'install 'install-doc (install-javadoc "dist/docs/api"))))) | |
6319 | (native-inputs | |
6320 | `(("java-junit" ,java-junit) | |
6321 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
6322 | (home-page "http://commons.apache.org/codec/") | |
6323 | (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs") | |
6324 | (description "The codec package contains simple encoder and decoders for | |
6325 | various formats such as Base64 and Hexadecimal. In addition to these widely | |
6326 | used encoders and decoders, the codec package also maintains a collection of | |
6327 | phonetic encoding utilities. | |
6328 | ||
6329 | This is a part of the Apache Commons Project.") | |
6330 | (license license:asl2.0))) | |
7d91c1b9 HG |
6331 | |
6332 | (define-public java-commons-daemon | |
6333 | (package | |
6334 | (name "java-commons-daemon") | |
6335 | (version "1.0.15") | |
6336 | (source (origin | |
6337 | (method url-fetch) | |
6338 | (uri (string-append "mirror://apache/commons/daemon/source/" | |
6339 | "commons-daemon-" version "-src.tar.gz")) | |
6340 | (sha256 | |
6341 | (base32 | |
6342 | "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi")))) | |
6343 | (build-system ant-build-system) | |
6344 | (arguments | |
6345 | `(#:test-target "test" | |
6346 | #:phases | |
6347 | (modify-phases %standard-phases | |
6348 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
6349 | (replace 'install (install-jars "dist")) | |
6350 | (add-after 'install 'install-doc (install-javadoc "dist/docs/api"))))) | |
6351 | (native-inputs | |
6352 | `(("java-junit" ,java-junit))) | |
6353 | (home-page "http://commons.apache.org/daemon/") | |
6354 | (synopsis "Library to launch Java applications as daemons") | |
6355 | (description "The Daemon package from Apache Commons can be used to | |
6356 | implement Java applications which can be launched as daemons. For example the | |
6357 | program will be notified about a shutdown so that it can perform cleanup tasks | |
6358 | before its process of execution is destroyed by the operation system. | |
6359 | ||
6360 | This package contains the Java library. You will also need the actual binary | |
6361 | for your architecture which is provided by the jsvc package. | |
6362 | ||
6363 | This is a part of the Apache Commons Project.") | |
6364 | (license license:asl2.0))) | |
9f68e74a | 6365 | |
eb270ecf RW |
6366 | (define-public java-javaewah |
6367 | (package | |
6368 | (name "java-javaewah") | |
6369 | (version "1.1.6") | |
6370 | (source (origin | |
6371 | (method url-fetch) | |
6372 | (uri (string-append "https://github.com/lemire/javaewah/" | |
6373 | "archive/JavaEWAH-" version ".tar.gz")) | |
6374 | (sha256 | |
6375 | (base32 | |
6376 | "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b")))) | |
6377 | (build-system ant-build-system) | |
6378 | (arguments `(#:jar-name "javaewah.jar")) | |
6379 | (inputs | |
6380 | `(("java-junit" ,java-junit) | |
6381 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
6382 | (home-page "https://github.com/lemire/javaewah") | |
6383 | (synopsis "Compressed alternative to the Java @code{BitSet} class") | |
6384 | (description "This is a word-aligned compressed variant of the Java | |
6385 | @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like | |
6386 | compression scheme. It can be used to implement bitmap indexes. | |
6387 | ||
6388 | The goal of word-aligned compression is not to achieve the best compression, | |
6389 | but rather to improve query processing time. Hence, JavaEWAH tries to save CPU | |
6390 | cycles, maybe at the expense of storage. However, the EWAH scheme is always | |
6391 | more efficient storage-wise than an uncompressed bitmap (as implemented in the | |
6392 | @code{BitSet} class by Sun).") | |
6393 | ;; GPL2.0 derivates are explicitly allowed. | |
6394 | (license license:asl2.0))) | |
6395 | ||
f8e4d022 RW |
6396 | (define-public java-slf4j-api |
6397 | (package | |
6398 | (name "java-slf4j-api") | |
6399 | (version "1.7.25") | |
6400 | (source (origin | |
6401 | (method url-fetch) | |
6402 | (uri (string-append "https://www.slf4j.org/dist/slf4j-" | |
6403 | version ".tar.gz")) | |
6404 | (sha256 | |
6405 | (base32 | |
6406 | "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb")) | |
6407 | (modules '((guix build utils))) | |
6408 | ;; Delete bundled jars. | |
6409 | (snippet | |
6410 | '(begin | |
6411 | (for-each delete-file (find-files "." "\\.jar$")) | |
6412 | #t)))) | |
6413 | (build-system ant-build-system) | |
6414 | (arguments | |
dcf7a8a6 | 6415 | `(#:jar-name "slf4j-api.jar" |
f8e4d022 | 6416 | #:source-dir "slf4j-api/src/main" |
dcf7a8a6 JL |
6417 | #:test-dir "slf4j-api/src/test" |
6418 | #:phases | |
6419 | (modify-phases %standard-phases | |
6420 | (add-after 'build 'regenerate-jar | |
6421 | (lambda _ | |
6422 | ;; pom.xml ignores these files in the jar creation process. If we don't, | |
6423 | ;; we get the error "This code should have never made it into slf4j-api.jar" | |
6424 | (delete-file-recursively "build/classes/org/slf4j/impl") | |
2c8ac364 MW |
6425 | (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C" |
6426 | "build/classes" "."))) | |
dcf7a8a6 JL |
6427 | (add-before 'check 'dont-test-abstract-classes |
6428 | (lambda _ | |
6429 | ;; abstract classes are not meant to be run with junit | |
6430 | (substitute* "build.xml" | |
6431 | (("<include name=\"\\*\\*/\\*Test.java\" />") | |
6432 | (string-append "<include name=\"**/*Test.java\" />" | |
6433 | "<exclude name=\"**/MultithreadedInitializationTest" | |
2c8ac364 MW |
6434 | ".java\" />"))) |
6435 | #t))))) | |
f8e4d022 RW |
6436 | (inputs |
6437 | `(("java-junit" ,java-junit) | |
6438 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
6439 | (home-page "https://www.slf4j.org/") | |
6440 | (synopsis "Simple logging facade for Java") | |
6441 | (description "The Simple Logging Facade for Java (SLF4J) serves as a | |
6442 | simple facade or abstraction for various logging | |
6443 | frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j}) | |
6444 | allowing the end user to plug in the desired logging framework at deployment | |
6445 | time.") | |
6446 | (license license:expat))) | |
6447 | ||
6d047cc4 GB |
6448 | (define java-slf4j-api-bootstrap |
6449 | (package | |
6450 | (inherit java-slf4j-api) | |
6451 | (name "java-slf4j-api-bootstrap") | |
6452 | (inputs `()) | |
6453 | (arguments | |
6454 | (substitute-keyword-arguments (package-arguments java-slf4j-api) | |
6455 | ((#:tests? _ #f) #f))))) | |
6456 | ||
88f256a1 TD |
6457 | (define-public java-slf4j-simple |
6458 | (package | |
6459 | (name "java-slf4j-simple") | |
6460 | (version "1.7.25") | |
6461 | (source (package-source java-slf4j-api)) | |
6462 | (build-system ant-build-system) | |
6463 | (arguments | |
6464 | `(#:jar-name "slf4j-simple.jar" | |
6465 | #:source-dir "slf4j-simple/src/main" | |
6466 | #:test-dir "slf4j-simple/src/test" | |
6467 | #:phases | |
6468 | (modify-phases %standard-phases | |
6469 | ;; The tests need some test classes from slf4j-api | |
6470 | (add-before 'check 'build-slf4j-api-test-helpers | |
6471 | (lambda _ | |
6472 | ;; Add current dir to CLASSPATH ... | |
6473 | (setenv "CLASSPATH" | |
6474 | (string-append (getcwd) ":" (getenv "CLASSPATH"))) | |
6475 | ;; ... and build test helper classes here: | |
2c8ac364 MW |
6476 | (apply invoke |
6477 | `("javac" "-d" "." | |
6478 | ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))) | |
88f256a1 TD |
6479 | (inputs |
6480 | `(("java-junit" ,java-junit) | |
6481 | ("java-hamcrest-core" ,java-hamcrest-core) | |
6482 | ("java-slf4j-api" ,java-slf4j-api))) | |
6483 | (home-page "https://www.slf4j.org/") | |
6484 | (synopsis "Simple implementation of simple logging facade for Java") | |
6485 | (description "SLF4J binding for the Simple implementation, which outputs | |
6486 | all events to System.err. Only messages of level INFO and higher are | |
6487 | printed.") | |
6488 | (license license:expat))) | |
6489 | ||
9f68e74a JL |
6490 | (define-public antlr2 |
6491 | (package | |
6492 | (name "antlr2") | |
6493 | (version "2.7.7") | |
6494 | (source (origin | |
6495 | (method url-fetch) | |
6496 | (uri (string-append "http://www.antlr2.org/download/antlr-" | |
6497 | version ".tar.gz")) | |
6498 | (sha256 | |
6499 | (base32 | |
6500 | "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5")) | |
6501 | (modules '((guix build utils))) | |
6502 | (snippet | |
6503 | '(begin | |
6504 | (delete-file "antlr.jar") | |
6505 | (substitute* "lib/cpp/antlr/CharScanner.hpp" | |
6506 | (("#include <map>") | |
6507 | (string-append | |
6d225e89 RW |
6508 | "#include <map>\n" |
6509 | "#define EOF (-1)\n" | |
6510 | "#include <strings.h>"))) | |
9f68e74a | 6511 | (substitute* "configure" |
6d225e89 RW |
6512 | (("/bin/sh") "sh")) |
6513 | #t)))) | |
9f68e74a JL |
6514 | (build-system gnu-build-system) |
6515 | (arguments | |
6d225e89 | 6516 | `(#:tests? #f ; no test target |
3ad90395 RW |
6517 | #:imported-modules ((guix build ant-build-system) |
6518 | (guix build syscalls) | |
6519 | ,@%gnu-build-system-modules) | |
6520 | #:modules (((guix build ant-build-system) #:prefix ant:) | |
6521 | (guix build gnu-build-system) | |
6522 | (guix build utils)) | |
9f68e74a JL |
6523 | #:phases |
6524 | (modify-phases %standard-phases | |
6525 | (add-after 'install 'strip-jar-timestamps | |
3ad90395 | 6526 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps)) |
79f6fc0d JL |
6527 | (add-before 'configure 'fix-timestamp |
6528 | (lambda _ | |
6529 | (substitute* "configure" | |
6530 | (("^TIMESTAMP.*") "TIMESTAMP=19700101\n")) | |
6531 | #t)) | |
9f68e74a JL |
6532 | (add-after 'configure 'fix-bin-ls |
6533 | (lambda _ | |
3ad90395 RW |
6534 | (substitute* (find-files "." "Makefile") |
6535 | (("/bin/ls") "ls")) | |
6536 | #t))))) | |
9f68e74a JL |
6537 | (native-inputs |
6538 | `(("which" ,which) | |
6539 | ("zip" ,zip) | |
6540 | ("java" ,icedtea "jdk"))) | |
6541 | (inputs | |
6542 | `(("java" ,icedtea))) | |
6543 | (home-page "http://www.antlr2.org") | |
6544 | (synopsis "Framework for constructing recognizers, compilers, and translators") | |
6545 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) | |
6546 | is a language tool that provides a framework for constructing recognizers, | |
6547 | compilers, and translators from grammatical descriptions containing Java, C#, | |
6548 | C++, or Python actions. ANTLR provides excellent support for tree construction, | |
6549 | tree walking, and translation.") | |
6550 | (license license:public-domain))) | |
a0f15eff | 6551 | |
e44112e1 | 6552 | (define-public java-stringtemplate-3 |
a0f15eff | 6553 | (package |
e44112e1 | 6554 | (name "java-stringtemplate") |
a0f15eff JL |
6555 | (version "3.2.1") |
6556 | (source (origin | |
6557 | (method url-fetch) | |
6558 | (uri (string-append "https://github.com/antlr/website-st4/raw/" | |
6559 | "gh-pages/download/stringtemplate-" | |
6560 | version ".tar.gz")) | |
6561 | (sha256 | |
6562 | (base32 | |
6563 | "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is")))) | |
6564 | (build-system ant-build-system) | |
6565 | (arguments | |
129d926d | 6566 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
2fcda6d2 | 6567 | #:test-dir "test" |
b101b4e8 RW |
6568 | #:modules ((guix build ant-build-system) |
6569 | (guix build utils) | |
6570 | (srfi srfi-1)) | |
a0f15eff JL |
6571 | #:phases |
6572 | (modify-phases %standard-phases | |
2fcda6d2 RW |
6573 | (add-before 'check 'fix-tests |
6574 | (lambda _ | |
6575 | (substitute* "build.xml" | |
6576 | (("\\$\\{test.home\\}/java") | |
6577 | "${test.home}/org")) | |
6578 | #t)) | |
a0f15eff JL |
6579 | (add-before 'build 'generate-grammar |
6580 | (lambda _ | |
b101b4e8 | 6581 | (with-directory-excursion "src/org/antlr/stringtemplate/language/" |
2c8ac364 MW |
6582 | (for-each (lambda (file) |
6583 | (format #t "~a\n" file) | |
6584 | (invoke "antlr" file)) | |
6585 | '("template.g" "angle.bracket.template.g" "action.g" | |
6586 | "eval.g" "group.g" "interface.g"))) | |
6587 | #t))))) | |
a0f15eff | 6588 | (native-inputs |
2fcda6d2 RW |
6589 | `(("antlr" ,antlr2) |
6590 | ("java-junit" ,java-junit))) | |
a0f15eff JL |
6591 | (home-page "http://www.stringtemplate.org") |
6592 | (synopsis "Template engine to generate formatted text output") | |
6593 | (description "StringTemplate is a java template engine (with ports for C#, | |
6594 | Objective-C, JavaScript, Scala) for generating source code, web pages, emails, | |
6595 | or any other formatted text output. StringTemplate is particularly good at | |
6596 | code generators, multiple site skins, and internationalization / localization. | |
6597 | StringTemplate also powers ANTLR.") | |
6598 | (license license:bsd-3))) | |
4ad8aed7 JL |
6599 | |
6600 | ;; antlr3 is partially written using antlr3 grammar files. It also depends on | |
6601 | ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar | |
6602 | ;; files and uses antlr3 at runtime. The latest version requires a recent version | |
6603 | ;; of antlr3 at runtime. | |
6604 | ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3. | |
6605 | ;; This version of ST4 is sufficient for the latest antlr3. | |
6606 | ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build | |
6607 | ;; the latest ST4 with it. Then we build our final antlr3 that will be linked | |
6608 | ;; against the latest ST4. | |
6609 | ;; antlr3.3 still depends on antlr3 to generate some files, so we use an | |
6610 | ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses | |
6611 | ;; only grammar files with the antlr2 syntax. | |
6612 | ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3. | |
6613 | ||
64b7efc0 | 6614 | (define-public java-stringtemplate |
407df789 | 6615 | (package (inherit java-stringtemplate-3) |
64b7efc0 | 6616 | (name "java-stringtemplate") |
4ad8aed7 JL |
6617 | (version "4.0.8") |
6618 | (source (origin | |
6619 | (method url-fetch) | |
6620 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/" | |
6621 | version ".tar.gz")) | |
6622 | (file-name (string-append name "-" version ".tar.gz")) | |
6623 | (sha256 | |
6624 | (base32 | |
6625 | "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087")))) | |
6626 | (build-system ant-build-system) | |
6627 | (arguments | |
6db77c7c RW |
6628 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
6629 | #:tests? #f ; FIXME: tests fail for unknown reasons | |
6630 | #:test-dir "test" | |
f4aa4cfe RW |
6631 | #:modules ((guix build ant-build-system) |
6632 | (guix build utils) | |
6633 | (srfi srfi-1)) | |
4ad8aed7 JL |
6634 | #:phases |
6635 | (modify-phases %standard-phases | |
6db77c7c RW |
6636 | (add-before 'check 'fix-test-target |
6637 | (lambda _ | |
6638 | (substitute* "build.xml" | |
6639 | (("\\$\\{test.home\\}/java") "${test.home}/") | |
6640 | (("\\*Test.java") "Test*.java")) | |
6641 | #t)) | |
4ad8aed7 | 6642 | (add-before 'build 'generate-grammar |
f4aa4cfe RW |
6643 | (lambda _ |
6644 | (with-directory-excursion "src/org/stringtemplate/v4/compiler/" | |
2c8ac364 MW |
6645 | (for-each (lambda (file) |
6646 | (format #t "~a\n" file) | |
6647 | (invoke "antlr3" file)) | |
6648 | '("STParser.g" "Group.g" "CodeGenerator.g"))) | |
6649 | #t))))) | |
4ad8aed7 JL |
6650 | (inputs |
6651 | `(("antlr3" ,antlr3-bootstrap) | |
6652 | ("antlr2" ,antlr2) | |
6db77c7c RW |
6653 | ("java-stringtemplate" ,java-stringtemplate-3) |
6654 | ("java-junit" ,java-junit))))) | |
4ad8aed7 | 6655 | |
1345eeb0 | 6656 | (define java-stringtemplate-4.0.6 |
64b7efc0 | 6657 | (package (inherit java-stringtemplate) |
1345eeb0 | 6658 | (name "java-stringtemplate") |
4ad8aed7 JL |
6659 | (version "4.0.6") |
6660 | (source (origin | |
6661 | (method url-fetch) | |
6662 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-" | |
6663 | version ".tar.gz")) | |
6664 | (file-name (string-append name "-" version ".tar.gz")) | |
6665 | (sha256 | |
6666 | (base32 | |
6667 | "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp")))) | |
6668 | (inputs | |
6669 | `(("antlr3" ,antlr3-3.3) | |
6670 | ("antlr2" ,antlr2) | |
e44112e1 | 6671 | ("java-stringtemplate" ,java-stringtemplate-3))))) |
4ad8aed7 JL |
6672 | |
6673 | (define-public antlr3 | |
6674 | (package | |
6675 | (name "antlr3") | |
6676 | (version "3.5.2") | |
6677 | (source (origin | |
6678 | (method url-fetch) | |
6679 | (uri (string-append "https://github.com/antlr/antlr3/archive/" | |
6680 | version ".tar.gz")) | |
6681 | (file-name (string-append name "-" version ".tar.gz")) | |
6682 | (sha256 | |
6683 | (base32 | |
fd75eb6c | 6684 | "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6")))) |
4ad8aed7 JL |
6685 | (build-system ant-build-system) |
6686 | (arguments | |
6687 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
6688 | #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3" | |
6689 | #:tests? #f | |
6690 | #:phases | |
6691 | (modify-phases %standard-phases | |
6692 | (add-after 'install 'bin-install | |
6693 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
6694 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) | |
6695 | (bin (string-append (assoc-ref outputs "out") "/bin"))) | |
6696 | (mkdir-p bin) | |
6697 | (with-output-to-file (string-append bin "/antlr3") | |
6698 | (lambda _ | |
6699 | (display | |
6700 | (string-append "#!" (which "sh") "\n" | |
6701 | "java -cp " jar "/" ,name "-" ,version ".jar:" | |
6702 | (string-concatenate | |
6703 | (find-files (assoc-ref inputs "stringtemplate") | |
6704 | ".*\\.jar")) | |
6705 | ":" | |
6706 | (string-concatenate | |
6707 | (find-files (assoc-ref inputs "stringtemplate4") | |
6708 | ".*\\.jar")) | |
6709 | ":" | |
6710 | (string-concatenate | |
6711 | (find-files (string-append | |
6712 | (assoc-ref inputs "antlr") | |
6713 | "/lib") | |
6714 | ".*\\.jar")) | |
6715 | " org.antlr.Tool $*")))) | |
2c8ac364 MW |
6716 | (chmod (string-append bin "/antlr3") #o755)) |
6717 | #t)) | |
4ad8aed7 JL |
6718 | (add-before 'build 'generate-grammar |
6719 | (lambda _ | |
6720 | (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/") | |
6721 | (for-each (lambda (file) | |
6722 | (display file) | |
6723 | (newline) | |
2c8ac364 | 6724 | (invoke "antlr3" file)) |
4ad8aed7 JL |
6725 | '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g" |
6726 | "AssignTokenTypesWalker.g" | |
6727 | "ActionTranslator.g" "TreeToNFAConverter.g" | |
6728 | "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g" | |
6729 | "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g")) | |
6730 | (substitute* "ANTLRParser.java" | |
6731 | (("public Object getTree") "public GrammarAST getTree")) | |
6732 | (substitute* "ANTLRv3Parser.java" | |
6733 | (("public Object getTree") "public CommonTree getTree")) | |
6734 | (chdir "../../../../../java") | |
4ad8aed7 JL |
6735 | (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java" |
6736 | (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*; | |
6737 | import org.antlr.grammar.v3.ANTLRTreePrinter;")) | |
6738 | (substitute* "org/antlr/tool/ErrorManager.java" | |
6739 | (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") "")) | |
2c8ac364 MW |
6740 | (chdir "../../../..") |
6741 | #t)) | |
4ad8aed7 JL |
6742 | (add-before 'build 'fix-build-xml |
6743 | (lambda _ | |
6744 | (substitute* "build.xml" | |
6745 | (("<exec") "<copy todir=\"${classes.dir}\"> | |
6746 | <fileset dir=\"tool/src/main/resources\"> | |
6747 | <include name=\"**/*.stg\"/> | |
6748 | <include name=\"**/*.st\"/> | |
6749 | <include name=\"**/*.sti\"/> | |
6750 | <include name=\"**/STLexer.tokens\"/> | |
6751 | </fileset> | |
2c8ac364 MW |
6752 | </copy><exec")) |
6753 | #t))))) | |
4ad8aed7 JL |
6754 | (native-inputs |
6755 | `(("antlr" ,antlr2) | |
6756 | ("antlr3" ,antlr3-bootstrap))) | |
6757 | (inputs | |
6758 | `(("junit" ,java-junit) | |
e44112e1 | 6759 | ("stringtemplate" ,java-stringtemplate-3) |
64b7efc0 | 6760 | ("stringtemplate4" ,java-stringtemplate))) |
4ad8aed7 | 6761 | (propagated-inputs |
e44112e1 | 6762 | `(("stringtemplate" ,java-stringtemplate-3) |
4ad8aed7 | 6763 | ("antlr" ,antlr2) |
1345eeb0 | 6764 | ("stringtemplate4" ,java-stringtemplate-4.0.6))) |
4ad8aed7 JL |
6765 | (home-page "http://www.antlr3.org") |
6766 | (synopsis "Framework for constructing recognizers, compilers, and translators") | |
6767 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) | |
6768 | is a language tool that provides a framework for constructing recognizers, | |
6769 | compilers, and translators from grammatical descriptions containing Java, C#, | |
6770 | C++, or Python actions. ANTLR provides excellent support for tree construction, | |
6771 | tree walking, and translation.") | |
6772 | (license license:bsd-3))) | |
6773 | ||
6774 | (define antlr3-bootstrap | |
6775 | (package | |
6776 | (inherit antlr3) | |
6777 | (name "antlr3-bootstrap") | |
6778 | (native-inputs | |
6779 | `(("antlr" ,antlr2) | |
6780 | ("antlr3" ,antlr3-3.3))) | |
6781 | (inputs | |
6782 | `(("junit" ,java-junit))))) | |
6783 | ||
6784 | (define antlr3-3.3 | |
6785 | (package | |
6786 | (inherit antlr3) | |
6787 | (name "antlr3") | |
6788 | (version "3.3") | |
6789 | (source (origin | |
6790 | (method url-fetch) | |
6791 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" | |
6792 | "gh-pages/download/antlr-" | |
6793 | version ".tar.gz")) | |
6794 | (sha256 | |
6795 | (base32 | |
48c86220 GB |
6796 | "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m")) |
6797 | (patches | |
6798 | (search-patches "antlr3-3_3-fix-java8-compilation.patch")))) | |
4ad8aed7 JL |
6799 | (arguments |
6800 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
a9540107 RW |
6801 | #:source-dir (string-join '("tool/src/main/java" |
6802 | "runtime/Java/src/main/java" | |
6803 | "tool/src/main/antlr2" | |
6804 | "tool/src/main/antlr3") | |
6805 | ":") | |
6806 | #:tests? #f ; FIXME: tests seem to require maven plugin | |
6807 | #:modules ((guix build ant-build-system) | |
6808 | (guix build utils) | |
6809 | (srfi srfi-1)) | |
4ad8aed7 JL |
6810 | #:phases |
6811 | (modify-phases %standard-phases | |
6812 | (add-after 'install 'bin-install | |
6813 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
a9540107 RW |
6814 | (let* ((out (assoc-ref outputs "out")) |
6815 | (jar (string-append out "/share/java")) | |
6816 | (bin (string-append out "/bin"))) | |
4ad8aed7 JL |
6817 | (mkdir-p bin) |
6818 | (with-output-to-file (string-append bin "/antlr3") | |
6819 | (lambda _ | |
6820 | (display | |
a9540107 RW |
6821 | (string-append |
6822 | "#!" (which "sh") "\n" | |
6823 | "java -cp " jar "/antlr3-3.3.jar:" | |
6824 | (string-join | |
6825 | (append (find-files (assoc-ref inputs "java-stringtemplate") | |
6826 | ".*\\.jar$") | |
6827 | (find-files (string-append (assoc-ref inputs "antlr") | |
6828 | "/lib") | |
6829 | ".*\\.jar$")) | |
6830 | ":") | |
6831 | " org.antlr.Tool $*")))) | |
6832 | (chmod (string-append bin "/antlr3") #o755) | |
6833 | #t))) | |
4ad8aed7 JL |
6834 | (add-before 'build 'generate-grammar |
6835 | (lambda _ | |
4ad8aed7 JL |
6836 | (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java" |
6837 | (("import org.antlr.grammar.v2.\\*;") | |
6838 | "import org.antlr.grammar.v2.*;\n | |
6839 | import org.antlr.grammar.v2.TreeToNFAConverter;\n | |
6840 | import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n | |
a9540107 | 6841 | import org.antlr.grammar.v2.ANTLRTreePrinter;")) |
2c8ac364 MW |
6842 | (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/" |
6843 | (for-each (lambda (file) | |
6844 | (format #t "~a\n" file) | |
6845 | (invoke "antlr" file)) | |
6846 | '("antlr.g" "antlr.print.g" "assign.types.g" | |
6847 | "buildnfa.g" "codegen.g" "define.g"))) | |
6848 | (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/" | |
6849 | (for-each (lambda (file) | |
6850 | (format #t "~a\n" file) | |
6851 | (invoke "antlr3" file)) | |
6852 | '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g" | |
6853 | "ANTLRv3Tree.g"))) | |
6854 | #t)) | |
4ad8aed7 JL |
6855 | (add-before 'build 'fix-build-xml |
6856 | (lambda _ | |
6857 | (substitute* "build.xml" | |
6858 | (("<exec") "<copy todir=\"${classes.dir}\"> | |
6859 | <fileset dir=\"tool/src/main/resources\"> | |
6860 | <include name=\"**/*.stg\"/> | |
6861 | <include name=\"**/*.st\"/> | |
6862 | <include name=\"**/*.sti\"/> | |
6863 | <include name=\"**/STLexer.tokens\"/> | |
6864 | </fileset> | |
a9540107 RW |
6865 | </copy><exec")) |
6866 | #t))))) | |
4ad8aed7 JL |
6867 | (native-inputs |
6868 | `(("antlr" ,antlr2) | |
6869 | ("antlr3" ,antlr3-3.1))) | |
6870 | (inputs | |
6871 | `(("junit" ,java-junit))) | |
6872 | (propagated-inputs | |
e44112e1 | 6873 | `(("java-stringtemplate" ,java-stringtemplate-3) |
4ad8aed7 JL |
6874 | ("antlr" ,antlr2) |
6875 | ("antlr3" ,antlr3-3.1))))) | |
6876 | ||
6877 | (define antlr3-3.1 | |
6878 | (package | |
6879 | (inherit antlr3) | |
4ad8aed7 JL |
6880 | (version "3.1") |
6881 | (source (origin | |
6882 | (method url-fetch) | |
6883 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" | |
6884 | "gh-pages/download/antlr-" | |
6885 | version ".tar.gz")) | |
6886 | (sha256 | |
6887 | (base32 | |
4c763b4d GB |
6888 | "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z")) |
6889 | (patches | |
6890 | (search-patches "antlr3-3_1-fix-java8-compilation.patch")))) | |
4ad8aed7 | 6891 | (arguments |
ec32bc98 | 6892 | `(#:jar-name (string-append "antlr3-" ,version ".jar") |
4ad8aed7 JL |
6893 | #:source-dir "src:runtime/Java/src" |
6894 | #:tests? #f | |
6895 | #:phases | |
6896 | (modify-phases %standard-phases | |
6897 | (add-after 'install 'bin-install | |
6898 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
6899 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) | |
6900 | (bin (string-append (assoc-ref outputs "out") "/bin"))) | |
6901 | (mkdir-p bin) | |
6902 | (with-output-to-file (string-append bin "/antlr3") | |
6903 | (lambda _ | |
6904 | (display | |
6905 | (string-append "#!" (which "sh") "\n" | |
57e37764 | 6906 | "java -cp " jar "/antlr3-3.1.jar:" |
4ad8aed7 JL |
6907 | (string-concatenate |
6908 | (find-files (assoc-ref inputs "stringtemplate") | |
6909 | ".*\\.jar")) | |
6910 | ":" | |
6911 | (string-concatenate | |
6912 | (find-files (string-append | |
6913 | (assoc-ref inputs "antlr") | |
6914 | "/lib") | |
6915 | ".*\\.jar")) | |
6916 | " org.antlr.Tool $*")))) | |
2c8ac364 MW |
6917 | (chmod (string-append bin "/antlr3") #o755)) |
6918 | #t)) | |
4ad8aed7 JL |
6919 | (add-before 'build 'generate-grammar |
6920 | (lambda _ | |
6921 | (let ((dir "src/org/antlr/tool/")) | |
6922 | (for-each (lambda (file) | |
6923 | (display file) | |
6924 | (newline) | |
13f38d31 | 6925 | (invoke "antlr" "-o" dir (string-append dir file))) |
4ad8aed7 JL |
6926 | '("antlr.g" "antlr.print.g" "assign.types.g" |
6927 | "buildnfa.g" "define.g"))) | |
6928 | (format #t "codegen.g\n") | |
13f38d31 RW |
6929 | (invoke "antlr" "-o" "src/org/antlr/codegen" |
6930 | "src/org/antlr/codegen/codegen.g") | |
6931 | #t)) | |
4ad8aed7 JL |
6932 | (add-before 'build 'fix-build-xml |
6933 | (lambda _ | |
6934 | (substitute* "build.xml" | |
6935 | (("<exec") "<copy todir=\"${classes.dir}\"> | |
6936 | <fileset dir=\"src\"> | |
6937 | <include name=\"**/*.stg\"/> | |
6938 | <include name=\"**/*.st\"/> | |
6939 | <include name=\"**/*.sti\"/> | |
6940 | <include name=\"**/STLexer.tokens\"/> | |
6941 | </fileset> | |
2c8ac364 MW |
6942 | </copy><exec")) |
6943 | #t))))) | |
4ad8aed7 JL |
6944 | (native-inputs |
6945 | `(("antlr" ,antlr2))) | |
6946 | (inputs | |
6947 | `(("junit" ,java-junit))) | |
6948 | (propagated-inputs | |
e44112e1 | 6949 | `(("stringtemplate" ,java-stringtemplate-3))))) |
d44bcd7a | 6950 | |
742242a5 GB |
6951 | (define-public java-commons-cli-1.2 |
6952 | ;; This is a bootstrap dependency for Maven2. | |
6953 | (package | |
6954 | (inherit java-commons-cli) | |
6955 | (version "1.2") | |
6956 | (source (origin | |
6957 | (method url-fetch) | |
6958 | (uri (string-append "mirror://apache/commons/cli/source/" | |
6959 | "commons-cli-" version "-src.tar.gz")) | |
6960 | (sha256 | |
6961 | (base32 | |
6962 | "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm")))) | |
6963 | (arguments | |
6964 | `(#:jar-name "commons-cli.jar" | |
6965 | #:phases | |
6966 | (modify-phases %standard-phases | |
6967 | (add-before 'check 'fix-build-xml | |
6968 | (lambda* (#:key inputs #:allow-other-keys) | |
6969 | (substitute* "build.xml" | |
6970 | (("dir=\"\\$\\{test.home\\}/java\"") | |
6971 | "dir=\"${test.home}\"")) | |
6972 | #t))))) | |
6973 | (native-inputs | |
6974 | `(("java-junit" ,java-junit))))) | |
30deadee JL |
6975 | |
6976 | (define-public java-microemulator-cldc | |
6977 | (package | |
6978 | (name "java-microemulator-cldc") | |
6979 | (version "2.0.4") | |
6980 | (source (origin | |
6981 | (method url-fetch) | |
6982 | (uri (string-append "https://github.com/barteo/microemu/archive/" | |
6983 | "microemulator_" | |
6984 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) | |
6985 | version) | |
6986 | ".tar.gz")) | |
6987 | (file-name (string-append name "-" version ".tar.gz")) | |
6988 | (sha256 | |
6989 | (base32 | |
6990 | "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll")))) | |
6991 | (build-system ant-build-system) | |
6992 | (arguments | |
6993 | `(#:jar-name "microemulator-cldc.jar" | |
6994 | #:source-dir "microemu-cldc/src/main/java" | |
6995 | #:tests? #f)); Requires even older software | |
6996 | (home-page "https://github.com/barteo/microemu") | |
6997 | (synopsis "J2ME CLDC emulator") | |
6998 | (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP | |
6999 | Emulator. It allows to demonstrate MIDlet based applications in web browser | |
7000 | applet and can be run as a standalone java application.") | |
7001 | (license (list license:asl2.0 | |
7002 | ;; or altenatively: | |
7003 | license:lgpl2.1+)))) | |
8e2f3e5e JL |
7004 | |
7005 | (define-public java-datanucleus-javax-persistence | |
7006 | (package | |
7007 | (name "java-datanucleus-javax-persistence") | |
7008 | (version "2.2.0") | |
7009 | (source (origin | |
7010 | (method url-fetch) | |
7011 | (uri (string-append "https://github.com/datanucleus/" | |
7012 | "javax.persistence/archive/javax.persistence-" | |
7013 | version "-release.tar.gz")) | |
7014 | (sha256 | |
7015 | (base32 | |
7016 | "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx")))) | |
7017 | (build-system ant-build-system) | |
7018 | (arguments | |
7019 | `(#:jar-name "java-datanucleus-javax-persistence.jar" | |
7020 | #:jdk ,icedtea-8 | |
7021 | #:source-dir "src/main/java" | |
7022 | #:tests? #f)); no tests | |
7023 | (home-page "https://github.com/datanucleus/javax.persistence") | |
7024 | (synopsis "JPA API") | |
7025 | (description "This package contains a clean definition of JPA API intended | |
7026 | for use with DataNucleus JPA since the JCP haven't provided an official JPA API | |
7027 | jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification | |
7028 | used to generate this API.") | |
7029 | (license (list license:edl1.0 license:epl1.0)))) | |
3240ddbf JL |
7030 | |
7031 | (define-public java-osgi-cmpn | |
7032 | (package | |
7033 | (name "java-osgi-cmpn") | |
7034 | (version "6.0.0") | |
7035 | (source (origin | |
7036 | (method url-fetch) | |
7037 | (uri (string-append "http://central.maven.org/maven2/" | |
7038 | "org/osgi/osgi.cmpn/" version "/osgi.cmpn-" | |
7039 | version "-sources.jar")) | |
7040 | (sha256 | |
7041 | (base32 | |
7042 | "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys")))) | |
7043 | (build-system ant-build-system) | |
7044 | (arguments | |
7045 | `(#:jar-name "osgi-cmpn.jar" | |
7046 | #:tests? #f)); no tests | |
7047 | (inputs | |
7048 | `(("annotation" ,java-osgi-annotation) | |
7049 | ("core" ,java-osgi-core) | |
7050 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) | |
7051 | ("microemulator" ,java-microemulator-cldc) | |
7052 | ("servlet" ,java-classpathx-servletapi))) | |
c353d014 | 7053 | (home-page "https://www.osgi.org") |
3240ddbf JL |
7054 | (synopsis "Compendium specification module of OSGi framework") |
7055 | (description | |
7056 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7057 | and service platform for the Java programming language. This package contains | |
7058 | the compendium specification module, providing interfaces and classes for use | |
7059 | in compiling bundles.") | |
7060 | (license license:asl2.0))) | |
747c7574 JL |
7061 | |
7062 | (define-public java-osgi-service-component-annotations | |
7063 | (package | |
7064 | (name "java-osgi-service-component-annotations") | |
7065 | (version "1.3.0") | |
7066 | (source (origin | |
7067 | (method url-fetch) | |
7068 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7069 | "org.osgi.service.component.annotations/" | |
7070 | version "/org.osgi.service.component.annotations-" | |
7071 | version "-sources.jar")) | |
7072 | (sha256 | |
7073 | (base32 | |
7074 | "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0")))) | |
7075 | (build-system ant-build-system) | |
7076 | (arguments | |
7077 | `(#:jar-name "osgi-service-component-annotations.jar" | |
7078 | #:tests? #f)); no tests | |
7079 | (inputs | |
7080 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 7081 | (home-page "https://www.osgi.org") |
747c7574 JL |
7082 | (synopsis "Support annotations for osgi-service-component") |
7083 | (description | |
7084 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7085 | and service platform for the Java programming language. This package contains | |
7086 | the support annotations for osgi-service-component.") | |
7087 | (license license:asl2.0))) | |
999b5fb4 JL |
7088 | |
7089 | (define-public java-osgi-dto | |
7090 | (package | |
7091 | (name "java-osgi-dto") | |
7092 | (version "1.0.0") | |
7093 | (source (origin | |
7094 | (method url-fetch) | |
7095 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7096 | "org.osgi.dto/" version "/org.osgi.dto-" | |
7097 | version "-sources.jar")) | |
7098 | (sha256 | |
7099 | (base32 | |
7100 | "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr")))) | |
7101 | (build-system ant-build-system) | |
7102 | (arguments | |
7103 | `(#:jar-name "osgi-dto.jar" | |
7104 | #:tests? #f)); no tests | |
7105 | (inputs | |
7106 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 7107 | (home-page "https://www.osgi.org") |
999b5fb4 JL |
7108 | (synopsis "Data Transfer Objects") |
7109 | (description | |
7110 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7111 | and service platform for the Java programming language. This package contains | |
7112 | the Data Transfer Objects. It is easily serializable having only public fields | |
7113 | of primitive types and their wrapper classes, Strings, and DTOs. List, Set, | |
7114 | Map and array aggregates may also be used. The aggregates must only hold | |
7115 | objects of the listed types or aggregates.") | |
7116 | (license license:asl2.0))) | |
c304ce6a JL |
7117 | |
7118 | (define-public java-osgi-resource | |
7119 | (package | |
7120 | (name "java-osgi-resource") | |
7121 | (version "1.0.0") | |
7122 | (source (origin | |
7123 | (method url-fetch) | |
7124 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7125 | "org.osgi.resource/" | |
7126 | version "/org.osgi.resource-" | |
7127 | version "-sources.jar")) | |
7128 | (sha256 | |
7129 | (base32 | |
7130 | "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d")))) | |
7131 | (build-system ant-build-system) | |
7132 | (arguments | |
7133 | `(#:jar-name "osgi-resource.jar" | |
7134 | #:tests? #f)); no tests | |
7135 | (inputs | |
7136 | `(("annotation" ,java-osgi-annotation) | |
7137 | ("dto" ,java-osgi-dto))) | |
c353d014 | 7138 | (home-page "https://www.osgi.org") |
c304ce6a JL |
7139 | (synopsis "OSGI Resource") |
7140 | (description | |
7141 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7142 | and service platform for the Java programming language. This package contains | |
7143 | the definition of common types in osgi packages.") | |
7144 | (license license:asl2.0))) | |
c2b14516 JL |
7145 | |
7146 | (define-public java-osgi-namespace-contract | |
7147 | (package | |
7148 | (name "java-osgi-namespace-contract") | |
7149 | (version "1.0.0") | |
7150 | (source (origin | |
7151 | (method url-fetch) | |
7152 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7153 | "org.osgi.namespace.contract/" | |
7154 | version "/org.osgi.namespace.contract-" | |
7155 | version "-sources.jar")) | |
7156 | (sha256 | |
7157 | (base32 | |
7158 | "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36")))) | |
7159 | (build-system ant-build-system) | |
7160 | (inputs | |
7161 | `(("resource" ,java-osgi-resource) | |
7162 | ("annotation" ,java-osgi-annotation))) | |
7163 | (arguments | |
7164 | `(#:jar-name "osgi-namespace-contract.jar" | |
7165 | #:tests? #f)); no tests | |
c353d014 | 7166 | (home-page "https://www.osgi.org") |
c2b14516 JL |
7167 | (synopsis "Contract Capability and Requirement Namespace") |
7168 | (description | |
7169 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7170 | and service platform for the Java programming language. This package contains | |
7171 | the names for the attributes and directives for a namespace with contracts.") | |
7172 | (license license:asl2.0))) | |
f809c963 JL |
7173 | |
7174 | (define-public java-osgi-namespace-extender | |
7175 | (package | |
7176 | (name "java-osgi-namespace-extender") | |
7177 | (version "1.0.1") | |
7178 | (source (origin | |
7179 | (method url-fetch) | |
7180 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7181 | "org.osgi.namespace.extender/" | |
7182 | version "/org.osgi.namespace.extender-" | |
7183 | version "-sources.jar")) | |
7184 | (sha256 | |
7185 | (base32 | |
7186 | "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz")))) | |
7187 | (build-system ant-build-system) | |
7188 | (inputs | |
7189 | `(("resource" ,java-osgi-resource) | |
7190 | ("annotation" ,java-osgi-annotation))) | |
7191 | (arguments | |
7192 | `(#:jar-name "osgi-namespace-extendent.jar" | |
7193 | #:tests? #f)); no tests | |
c353d014 | 7194 | (home-page "https://www.osgi.org") |
f809c963 JL |
7195 | (synopsis "Extender Capability and Requirement Namespace") |
7196 | (description | |
7197 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7198 | and service platform for the Java programming language. This package contains | |
b784962d JL |
7199 | the names for the attributes and directives for an extender namespace.") |
7200 | (license license:asl2.0))) | |
7201 | ||
7202 | (define-public java-osgi-namespace-service | |
7203 | (package | |
7204 | (name "java-osgi-namespace-service") | |
7205 | (version "1.0.0") | |
7206 | (source (origin | |
7207 | (method url-fetch) | |
7208 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7209 | "org.osgi.namespace.service/" | |
7210 | version "/org.osgi.namespace.service-" | |
7211 | version "-sources.jar")) | |
7212 | (sha256 | |
7213 | (base32 | |
7214 | "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8")))) | |
7215 | (build-system ant-build-system) | |
7216 | (inputs | |
7217 | `(("resource" ,java-osgi-resource) | |
7218 | ("annotation" ,java-osgi-annotation))) | |
7219 | (arguments | |
7220 | `(#:jar-name "osgi-namespace-service.jar" | |
7221 | #:tests? #f)); no tests | |
c353d014 | 7222 | (home-page "https://www.osgi.org") |
b784962d JL |
7223 | (synopsis "Service Capability and Requirement Namespace") |
7224 | (description | |
7225 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7226 | and service platform for the Java programming language. This package contains | |
7227 | the names for the attributes and directives for a service namespace.") | |
f809c963 | 7228 | (license license:asl2.0))) |
0f0c5218 JL |
7229 | |
7230 | (define-public java-osgi-util-function | |
7231 | (package | |
7232 | (name "java-osgi-util-function") | |
7233 | (version "1.0.0") | |
7234 | (source (origin | |
7235 | (method url-fetch) | |
7236 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7237 | "org.osgi.util.function/" | |
7238 | version "/org.osgi.util.function-" | |
7239 | version "-sources.jar")) | |
7240 | (sha256 | |
7241 | (base32 | |
7242 | "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x")))) | |
7243 | (build-system ant-build-system) | |
7244 | (arguments | |
7245 | `(#:jar-name "osgi-util-function.jar" | |
7246 | #:tests? #f)); no tests | |
7247 | (inputs | |
7248 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 7249 | (home-page "https://www.osgi.org") |
0f0c5218 JL |
7250 | (synopsis "OSGI Util Function") |
7251 | (description | |
7252 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7253 | and service platform for the Java programming language. This package contains | |
7254 | an interface for a function that accepts a single argument and produces a result.") | |
7255 | (license license:asl2.0))) | |
27103135 JL |
7256 | |
7257 | (define-public java-osgi-util-promise | |
7258 | (package | |
7259 | (name "java-osgi-util-promise") | |
7260 | (version "1.0.0") | |
7261 | (source (origin | |
7262 | (method url-fetch) | |
7263 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7264 | "org.osgi.util.promise/" | |
7265 | version "/org.osgi.util.promise-" | |
7266 | version "-sources.jar")) | |
7267 | (sha256 | |
7268 | (base32 | |
7269 | "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c")))) | |
7270 | (build-system ant-build-system) | |
7271 | (arguments | |
7272 | `(#:jar-name "osgi-util-promise.jar" | |
7273 | #:tests? #f)); no tests | |
7274 | (inputs | |
7275 | `(("annotation" ,java-osgi-annotation) | |
7276 | ("function" ,java-osgi-util-function))) | |
c353d014 | 7277 | (home-page "https://www.osgi.org") |
27103135 JL |
7278 | (synopsis "Promise of a value") |
7279 | (description | |
7280 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7281 | and service platform for the Java programming language. This package contains | |
7282 | an interface and utilitary classes for promises. A Promise represents a future | |
7283 | value. It handles the interactions for asynchronous processing.") | |
7284 | (license license:asl2.0))) | |
2b1fdb2b JL |
7285 | |
7286 | (define-public java-osgi-service-metatype-annotations | |
7287 | (package | |
7288 | (name "java-osgi-service-metatype-annotations") | |
7289 | (version "1.3.0") | |
7290 | (source (origin | |
7291 | (method url-fetch) | |
7292 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7293 | "org.osgi.service.metatype.annotations/" | |
7294 | version "/org.osgi.service.metatype.annotations-" | |
7295 | version "-sources.jar")) | |
7296 | (sha256 | |
7297 | (base32 | |
7298 | "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6")))) | |
7299 | (build-system ant-build-system) | |
7300 | (arguments | |
7301 | `(#:jar-name "osgi-service-metatype-annotations.jar" | |
7302 | #:tests? #f)); no tests | |
7303 | (inputs | |
7304 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 7305 | (home-page "https://www.osgi.org") |
2b1fdb2b JL |
7306 | (synopsis "Support annotations for metatype") |
7307 | (description | |
7308 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7309 | and service platform for the Java programming language. This package contains | |
7310 | the support annotations for metatype.") | |
7311 | (license license:asl2.0))) | |
a13acfbe JL |
7312 | |
7313 | (define-public java-osgi-service-repository | |
7314 | (package | |
7315 | (name "java-osgi-service-repository") | |
7316 | (version "1.1.0") | |
7317 | (source (origin | |
7318 | (method url-fetch) | |
7319 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7320 | "org.osgi.service.repository/" | |
7321 | version "/org.osgi.service.repository-" | |
7322 | version "-sources.jar")) | |
7323 | (sha256 | |
7324 | (base32 | |
7325 | "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n")))) | |
7326 | (build-system ant-build-system) | |
7327 | (arguments | |
7328 | `(#:jar-name "osgi-service-repository.jar" | |
7329 | #:tests? #f)); no tests | |
7330 | (inputs | |
7331 | `(("annotation" ,java-osgi-annotation) | |
7332 | ("promise" ,java-osgi-util-promise) | |
7333 | ("resource" ,java-osgi-resource))) | |
c353d014 | 7334 | (home-page "https://www.osgi.org") |
a13acfbe JL |
7335 | (synopsis "OSGI service repository") |
7336 | (description | |
7337 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7338 | and service platform for the Java programming language. This package contains | |
7339 | a repository service that contains resources.") | |
7340 | (license license:asl2.0))) | |
dfd91541 JL |
7341 | |
7342 | (define-public java-osgi-framework | |
7343 | (package | |
7344 | (name "java-osgi-framework") | |
7345 | (version "1.8.0") | |
7346 | (source (origin | |
7347 | (method url-fetch) | |
7348 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7349 | "org.osgi.framework/" version "/org.osgi.framework-" | |
7350 | version "-sources.jar")) | |
7351 | (sha256 | |
7352 | (base32 | |
7353 | "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s")))) | |
7354 | (build-system ant-build-system) | |
7355 | (arguments | |
7356 | `(#:jar-name "osgi-framework.jar" | |
7357 | #:tests? #f)); no tests | |
7358 | (inputs | |
7359 | `(("annotation" ,java-osgi-annotation) | |
7360 | ("resource" ,java-osgi-resource) | |
7361 | ("dto" ,java-osgi-dto))) | |
c353d014 | 7362 | (home-page "https://www.osgi.org") |
dfd91541 JL |
7363 | (synopsis "OSGi framework") |
7364 | (description | |
7365 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7366 | and service platform for the Java programming language.") | |
7367 | (license license:asl2.0))) | |
98c9f16c JL |
7368 | |
7369 | (define-public java-osgi-service-log | |
7370 | (package | |
7371 | (name "java-osgi-service-log") | |
7372 | (version "1.3.0") | |
7373 | (source (origin | |
7374 | (method url-fetch) | |
7375 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7376 | "org.osgi.service.log/" | |
7377 | version "/org.osgi.service.log-" | |
7378 | version "-sources.jar")) | |
7379 | (sha256 | |
7380 | (base32 | |
7381 | "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0")))) | |
7382 | (build-system ant-build-system) | |
7383 | (arguments | |
7384 | `(#:jar-name "osgi-service-log.jar" | |
7385 | #:tests? #f)); no tests | |
7386 | (inputs | |
7387 | `(("java-osgi-framework" ,java-osgi-framework))) | |
c353d014 | 7388 | (home-page "https://www.osgi.org") |
98c9f16c JL |
7389 | (synopsis "Provides methods for bundles to write messages to the log") |
7390 | (description | |
7391 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7392 | and service platform for the Java programming language. This package contains | |
7393 | the log service.") | |
7394 | (license license:asl2.0))) | |
dd76d44b JL |
7395 | |
7396 | (define-public java-osgi-service-jdbc | |
7397 | (package | |
7398 | (name "java-osgi-service-jdbc") | |
7399 | (version "1.0.0") | |
7400 | (source (origin | |
7401 | (method url-fetch) | |
7402 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7403 | "org.osgi.service.jdbc/" | |
7404 | version "/org.osgi.service.jdbc-" | |
7405 | version "-sources.jar")) | |
7406 | (sha256 | |
7407 | (base32 | |
7408 | "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz")))) | |
7409 | (build-system ant-build-system) | |
7410 | (arguments | |
7411 | `(#:jar-name "osgi-service-jdbc.jar" | |
7412 | #:tests? #f)); no tests | |
c353d014 | 7413 | (home-page "https://www.osgi.org") |
dd76d44b JL |
7414 | (synopsis "Factory for JDBC connection factories") |
7415 | (description | |
7416 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7417 | and service platform for the Java programming language. This package contains | |
7418 | a factory for JDBC connection factories. There are 3 preferred connection | |
7419 | factories for getting JDBC connections: | |
7420 | ||
7421 | @itemize | |
7422 | @item @code{javax.sql.DataSource}; | |
7423 | @item @code{javax.sql.ConnectionPoolDataSource}; | |
7424 | @item @code{javax.sql.XADataSource}. | |
7425 | @end itemize") | |
7426 | (license license:asl2.0))) | |
291d3f22 JL |
7427 | |
7428 | (define-public java-osgi-service-resolver | |
7429 | (package | |
7430 | (name "java-osgi-service-resolver") | |
7431 | (version "1.0.1") | |
7432 | (source (origin | |
7433 | (method url-fetch) | |
7434 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7435 | "org.osgi.service.resolver/" | |
7436 | version "/org.osgi.service.resolver-" | |
7437 | version "-sources.jar")) | |
7438 | (sha256 | |
7439 | (base32 | |
7440 | "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd")))) | |
7441 | (build-system ant-build-system) | |
7442 | (arguments | |
7443 | `(#:jar-name "osgi-service-resolver.jar" | |
7444 | #:tests? #f)); no tests | |
7445 | (inputs | |
7446 | `(("annotation" ,java-osgi-annotation) | |
7447 | ("resource" ,java-osgi-resource))) | |
c353d014 | 7448 | (home-page "https://www.osgi.org") |
291d3f22 JL |
7449 | (synopsis "OSGI Resolver service") |
7450 | (description | |
7451 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7452 | and service platform for the Java programming language. This package contains | |
7453 | a resolver service that resolves the specified resources in the context supplied | |
7454 | by the caller.") | |
7455 | (license license:asl2.0))) | |
1884bb81 JL |
7456 | |
7457 | (define-public java-osgi-util-tracker | |
7458 | (package | |
7459 | (name "java-osgi-util-tracker") | |
7460 | (version "1.5.1") | |
7461 | (source (origin | |
7462 | (method url-fetch) | |
7463 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7464 | "org.osgi.util.tracker/" | |
7465 | version "/org.osgi.util.tracker-" | |
7466 | version "-sources.jar")) | |
7467 | (sha256 | |
7468 | (base32 | |
7469 | "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz")))) | |
7470 | (build-system ant-build-system) | |
7471 | (arguments | |
7472 | `(#:jar-name "osgi-util-tracker.jar" | |
7473 | #:tests? #f)); no tests | |
7474 | (inputs | |
7475 | `(("framework" ,java-osgi-framework) | |
7476 | ("annotation" ,java-osgi-annotation))) | |
c353d014 | 7477 | (home-page "https://www.osgi.org") |
1884bb81 JL |
7478 | (synopsis "Bundle tracking") |
7479 | (description | |
7480 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7481 | and service platform for the Java programming language. This package contains | |
7482 | bundle tracking utility classes.") | |
7483 | (license license:asl2.0))) | |
fb9c48b8 JL |
7484 | |
7485 | (define-public java-osgi-service-cm | |
7486 | (package | |
7487 | (name "java-osgi-service-cm") | |
7488 | (version "1.5.0") | |
7489 | (source (origin | |
7490 | (method url-fetch) | |
7491 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7492 | "org.osgi.service.cm/" | |
7493 | version "/org.osgi.service.cm-" | |
7494 | version "-sources.jar")) | |
7495 | (sha256 | |
7496 | (base32 | |
7497 | "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6")))) | |
7498 | (build-system ant-build-system) | |
7499 | (arguments | |
7500 | `(#:jar-name "osgi-service-cm.jar" | |
7501 | #:tests? #f)); no tests | |
7502 | (inputs | |
7503 | `(("framework" ,java-osgi-framework) | |
7504 | ("annotation" ,java-osgi-annotation))) | |
c353d014 | 7505 | (home-page "https://www.osgi.org") |
fb9c48b8 JL |
7506 | (synopsis "OSGI Configuration Management") |
7507 | (description | |
7508 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7509 | and service platform for the Java programming language. This package contains | |
7510 | utility classes for the configuration of services.") | |
7511 | (license license:asl2.0))) | |
500aac75 JL |
7512 | |
7513 | (define-public java-osgi-service-packageadmin | |
7514 | (package | |
7515 | (name "java-osgi-service-packageadmin") | |
7516 | (version "1.2.0") | |
7517 | (source (origin | |
7518 | (method url-fetch) | |
7519 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
7520 | "org.osgi.service.packageadmin/" | |
7521 | version "/org.osgi.service.packageadmin-" | |
7522 | version "-sources.jar")) | |
7523 | (sha256 | |
7524 | (base32 | |
7525 | "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52")))) | |
7526 | (build-system ant-build-system) | |
7527 | (arguments | |
7528 | `(#:jar-name "osgi-service-packageadmin.jar" | |
7529 | #:tests? #f)); no tests | |
7530 | (inputs | |
7531 | `(("framework" ,java-osgi-framework))) | |
c353d014 | 7532 | (home-page "https://www.osgi.org") |
500aac75 JL |
7533 | (synopsis "OSGI Package Administration") |
7534 | (description | |
7535 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
7536 | and service platform for the Java programming language. This package contains | |
7537 | the packageadmin service.") | |
7538 | (license license:asl2.0))) | |
77a4f1ae JL |
7539 | |
7540 | (define-public java-ops4j-base-lang | |
7541 | (package | |
7542 | (name "java-ops4j-base-lang") | |
7543 | (version "1.5.0") | |
7544 | (source (origin | |
7545 | (method url-fetch) | |
7546 | (uri (string-append "https://github.com/ops4j/org.ops4j.base/" | |
7547 | "archive/base-" version ".tar.gz")) | |
7548 | (sha256 | |
7549 | (base32 | |
7550 | "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw")))) | |
7551 | (build-system ant-build-system) | |
7552 | (arguments | |
7553 | `(#:jar-name "java-ops4j-base-lang.jar" | |
7554 | #:source-dir "ops4j-base-lang/src/main/java" | |
7555 | #:tests? #f; no tests | |
7556 | #:phases | |
7557 | (modify-phases %standard-phases | |
7558 | (add-before 'build 'add-test-file | |
7559 | (lambda _ | |
7560 | ;; That file is required by a test in ops4j-pax-exam-core-spi | |
7561 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang") | |
7562 | (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties" | |
7563 | (lambda _ | |
7564 | (display | |
7565 | (string-append | |
7566 | "version=" ,version "\n" | |
7567 | "groupId=org.ops4j.base" | |
2c8ac364 MW |
7568 | "artifactId=ops4j-base-lang\n")))) |
7569 | #t))))) | |
77a4f1ae JL |
7570 | (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview") |
7571 | (synopsis "Utility classes and extensions to be used in OPS4J projects") | |
7572 | (description "OPS4J stands for Open Participation Software for Java. This | |
7573 | package contains utilities and extensions related to @code{java.lang}.") | |
7574 | (license license:asl2.0))) | |
b2353495 JL |
7575 | |
7576 | (define-public java-ops4j-base-monitors | |
7577 | (package | |
7578 | (inherit java-ops4j-base-lang) | |
7579 | (name "java-ops4j-base-monitors") | |
7580 | (arguments | |
7581 | `(#:jar-name "java-ops4j-base-monitors.jar" | |
7582 | #:source-dir "ops4j-base-monitors/src/main/java" | |
7583 | #:tests? #f)); no tests | |
7584 | (inputs | |
7585 | `(("lang" ,java-ops4j-base-lang))) | |
7586 | (description "OPS4J stands for Open Participation Software for Java. This | |
7587 | package contains utilities and extensions related to monitoring."))) | |
322d349a JL |
7588 | |
7589 | (define-public java-ops4j-base-io | |
7590 | (package | |
7591 | (inherit java-ops4j-base-lang) | |
7592 | (name "java-ops4j-base-io") | |
7593 | (arguments | |
7594 | `(#:jar-name "java-ops4j-base-io.jar" | |
7595 | #:source-dir "ops4j-base-io/src/main/java" | |
7596 | #:test-dir "ops4j-base-io/src/test" | |
7597 | #:test-exclude | |
7598 | (list "**/ListerTest.java"))) | |
7599 | (inputs | |
7600 | `(("lang" ,java-ops4j-base-monitors) | |
7601 | ("lang" ,java-ops4j-base-lang))) | |
7602 | (native-inputs | |
7603 | `(("junit" ,java-junit) | |
7604 | ("hamcrest" ,java-hamcrest-core))) | |
7605 | (description "OPS4J stands for Open Participation Software for Java. This | |
7606 | package contains utilities and extensions related to handling streams and files."))) | |
559919c1 JL |
7607 | |
7608 | (define-public java-ops4j-base-util | |
7609 | (package | |
7610 | (inherit java-ops4j-base-lang) | |
7611 | (name "java-ops4j-base-util") | |
7612 | (arguments | |
7613 | `(#:jar-name "java-ops4j-base-util.jar" | |
7614 | #:source-dir "ops4j-base-util/src/main/java" | |
7615 | #:test-dir "ops4j-base-util/src/test")) | |
7616 | (inputs | |
7617 | `(("lang" ,java-ops4j-base-lang))) | |
7618 | (native-inputs | |
7619 | `(("junit" ,java-junit))) | |
7620 | (description "OPS4J stands for Open Participation Software for Java. This | |
7621 | package contains utilities and extensions related to environment, i18n and | |
7622 | mime types."))) | |
60dcec7a JL |
7623 | |
7624 | (define-public java-ops4j-base-util-property | |
7625 | (package | |
7626 | (inherit java-ops4j-base-lang) | |
7627 | (name "java-ops4j-base-util-property") | |
7628 | (arguments | |
7629 | `(#:jar-name "java-ops4j-base-util-property.jar" | |
7630 | #:source-dir "ops4j-base-util-property/src/main/java" | |
7631 | #:tests? #f)); no tests | |
7632 | (inputs | |
7633 | `(("lang" ,java-ops4j-base-lang) | |
7634 | ("util" ,java-ops4j-base-util))) | |
7635 | (description "OPS4J stands for Open Participation Software for Java. This | |
7636 | package contains utilities and extensions related to resolving properties from | |
7637 | different sources."))) | |
0edf8cf0 JL |
7638 | |
7639 | (define-public java-ops4j-base-store | |
7640 | (package | |
7641 | (inherit java-ops4j-base-lang) | |
7642 | (name "java-ops4j-base-store") | |
7643 | (arguments | |
7644 | `(#:jar-name "java-ops4j-base-store.jar" | |
7645 | #:source-dir "ops4j-base-store/src/main/java" | |
7646 | #:tests? #f)); no tests | |
7647 | (inputs | |
7648 | `(("lang" ,java-ops4j-base-lang) | |
7649 | ("slf4j" ,java-slf4j-api) | |
7650 | ("io" ,java-ops4j-base-io))) | |
7651 | (description "OPS4J stands for Open Participation Software for Java. This | |
7652 | package contains utilities for storing and retrieving data from an | |
7653 | @code{InputStream}."))) | |
214fcd8a JL |
7654 | |
7655 | (define-public java-ops4j-base-spi | |
7656 | (package | |
7657 | (inherit java-ops4j-base-lang) | |
7658 | (name "java-ops4j-base-spi") | |
7659 | (arguments | |
7660 | `(#:jar-name "java-ops4j-base-spi.jar" | |
7661 | #:source-dir "ops4j-base-spi/src/main/java" | |
7662 | #:test-dir "ops4j-base-spi/src/test")) | |
7663 | (native-inputs | |
7664 | `(("junit" ,java-junit) | |
7665 | ("hamcrest" ,java-hamcrest-core))) | |
7666 | (description "OPS4J stands for Open Participation Software for Java. This | |
7667 | package contains utilities for obtaining services via the Java SE 6 | |
7668 | @code{ServiceLoader}."))) | |
e1edf42e JL |
7669 | |
7670 | (define-public java-aqute-bnd-annotation | |
7671 | (package | |
7672 | (name "java-aqute-bnd-annotation") | |
2cac8891 | 7673 | (version "3.5.0") |
e1edf42e JL |
7674 | (source (origin |
7675 | (method url-fetch) | |
7676 | (uri (string-append "https://github.com/bndtools/bnd/archive/" | |
7677 | version ".REL.tar.gz")) | |
7678 | (file-name (string-append name "-" version ".tar.gz")) | |
7679 | (sha256 | |
7680 | (base32 | |
2cac8891 | 7681 | "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl")))) |
e1edf42e JL |
7682 | (build-system ant-build-system) |
7683 | (arguments | |
7684 | `(#:jar-name "java-aqute-bnd-annotation.jar" | |
7685 | #:source-dir "biz.aQute.bnd.annotation/src" | |
7686 | #:tests? #f)); empty test dir | |
7687 | (home-page "http://bnd.bndtools.org/") | |
7688 | (synopsis "Tools for OSGi") | |
7689 | (description "Bnd is a swiss army knife for OSGi, it creates manifest | |
7690 | headers based on analyzing the class code, it verifies the project settings, | |
7691 | it manages project dependencies, gives diffs jars, and much more.") | |
7692 | (license license:asl2.0))) | |
60ba2978 JL |
7693 | |
7694 | (define-public java-aqute-libg | |
7695 | (package | |
7696 | (inherit java-aqute-bnd-annotation) | |
7697 | (name "java-aqute-libg") | |
7698 | (arguments | |
7699 | `(#:jar-name "java-aqute-libg.jar" | |
78754995 GB |
7700 | ;; The build fails when source/target more recent than 1.7. This |
7701 | ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327 | |
7702 | ;; | |
7703 | ;; It is closed as won't fix. There is no way to change the source | |
7704 | ;; so that it works on 1.8, and still works on 1.6, the upstream | |
7705 | ;; target. It work fine on 1.7, so we use 1.7. | |
7706 | #:make-flags (list "-Dant.build.javac.source=1.7" | |
7707 | "-Dant.build.javac.target=1.7") | |
2ab089b7 GB |
7708 | #:phases |
7709 | (modify-phases %standard-phases | |
7710 | (add-before 'configure 'chdir | |
7711 | ;; Change to aQute.libg directory, so that the relative | |
7712 | ;; paths in the tests aren't broken. | |
7713 | (lambda _ | |
7714 | (chdir "aQute.libg") | |
7715 | #t)) | |
7716 | (add-before 'check 'create-test-directory | |
7717 | ;; Copy the test directory to test/java, since that's where | |
7718 | ;; ant-build-system's default project in build.xml expects to find | |
7719 | ;; the test classes. Leave a copy in the original place to not | |
7720 | ;; break paths in tests. | |
7721 | (lambda _ | |
7722 | (mkdir "src/test") | |
7723 | (copy-recursively "test" "src/test/java") | |
7724 | #t))))) | |
60ba2978 JL |
7725 | (inputs |
7726 | `(("slf4j" ,java-slf4j-api) | |
7727 | ("osgi-annot" ,java-osgi-annotation) | |
7728 | ("java-osgi-cmpn" ,java-osgi-cmpn) | |
2ab089b7 GB |
7729 | ("osgi" ,java-osgi-core))) |
7730 | (native-inputs | |
7731 | `(("hamcrest" ,java-hamcrest-core) | |
7732 | ("java-junit" ,java-junit))))) | |
5f26a131 | 7733 | |
288a5959 GB |
7734 | (define java-aqute-libg-bootstrap |
7735 | (package | |
7736 | (inherit java-aqute-libg) | |
7737 | (name "java-aqute-libg-bootstrap") | |
aca7dcdd GB |
7738 | (arguments |
7739 | ;; Disable tests, at this stage of bootstrap we have no test frameworks. | |
3785ccd2 GB |
7740 | (substitute-keyword-arguments (package-arguments java-aqute-libg) |
7741 | ((#:tests? _ #f) #f))) | |
288a5959 GB |
7742 | (inputs |
7743 | `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap) | |
7744 | ,@(delete `("slf4j" ,java-slf4j-api) | |
aca7dcdd GB |
7745 | (package-inputs java-aqute-libg)))) |
7746 | (native-inputs '()))) | |
288a5959 | 7747 | |
5f26a131 JL |
7748 | (define-public java-aqute-bndlib |
7749 | (package | |
7750 | (inherit java-aqute-bnd-annotation) | |
7751 | (name "java-aqute-bndlib") | |
7752 | (arguments | |
7753 | `(#:jar-name "java-bndlib.jar" | |
7754 | #:source-dir "biz.aQute.bndlib/src" | |
7755 | #:tests? #f)); no tests | |
7756 | (inputs | |
7757 | `(("slf4j" ,java-slf4j-api) | |
7758 | ("osgi-annot" ,java-osgi-annotation) | |
7759 | ("java-aqute-libg" ,java-aqute-libg) | |
7760 | ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation) | |
7761 | ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations) | |
7762 | ("java-osgi-service-repository" ,java-osgi-service-repository) | |
7763 | ("java-osgi-service-log" ,java-osgi-service-log) | |
7764 | ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations) | |
7765 | ("java-osgi-namespace-contract" ,java-osgi-namespace-contract) | |
7766 | ("java-osgi-namespace-extender" ,java-osgi-namespace-extender) | |
7767 | ("java-osgi-namespace-service" ,java-osgi-namespace-service) | |
7768 | ("promise" ,java-osgi-util-promise) | |
7769 | ("osgi" ,java-osgi-core))))) | |
25aef81d | 7770 | |
869803aa GB |
7771 | (define java-aqute-bndlib-bootstrap |
7772 | (package | |
7773 | (inherit java-aqute-bndlib) | |
7774 | (name "java-aqute-bndlib-bootstrap") | |
7775 | (inputs | |
7776 | `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap) | |
7777 | ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap) | |
7778 | ,@(delete `("slf4j" ,java-slf4j-api) | |
7779 | (delete `("java-aqute-libg" ,java-aqute-libg) | |
7780 | (package-inputs java-aqute-bndlib))))))) | |
7781 | ||
25aef81d JL |
7782 | (define-public java-ops4j-pax-tinybundles |
7783 | (package | |
7784 | (name "java-ops4j-pax-tinybundles") | |
7785 | (version "2.1.1") | |
7786 | (source (origin | |
7787 | (method url-fetch) | |
7788 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/" | |
7789 | "archive/tinybundles-" version ".tar.gz")) | |
7790 | (sha256 | |
7791 | (base32 | |
7792 | "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871")))) | |
7793 | (arguments | |
7794 | `(#:jar-name "java-ops4j-pax-tinybundles.jar" | |
7795 | #:source-dir "src/main/java" | |
7796 | #:test-exclude | |
7797 | ;; Abstract base classes for other tests | |
7798 | (list "**/BndTest.java" "**/CoreTest.java") | |
7799 | #:phases | |
7800 | (modify-phases %standard-phases | |
7801 | (add-before 'check 'fix-version | |
7802 | (lambda _ | |
7803 | ;; This test has a reference to an old version of bndlib we are not | |
7804 | ;; packaging. It uses the version referenced in pom.xml. We replace | |
7805 | ;; it with our own version. | |
7806 | (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java" | |
0f277802 | 7807 | (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*") |
2c8ac364 MW |
7808 | ,(package-version java-aqute-bndlib))) |
7809 | #t))))) | |
25aef81d JL |
7810 | (inputs |
7811 | `(("lang" ,java-ops4j-base-lang) | |
7812 | ("io" ,java-ops4j-base-io) | |
7813 | ("store" ,java-ops4j-base-store) | |
7814 | ("slf4j" ,java-slf4j-api) | |
7815 | ("libg" ,java-aqute-libg) | |
7816 | ("bndlib" ,java-aqute-bndlib))) | |
7817 | (native-inputs | |
7818 | `(("junit" ,java-junit) | |
7819 | ("hamcrest" ,java-hamcrest-core) | |
7820 | ("log4j" ,java-log4j-api) | |
7821 | ("bndannotation" ,java-aqute-bnd-annotation) | |
7822 | ("framework" ,java-osgi-framework))) | |
7823 | (build-system ant-build-system) | |
7824 | (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles") | |
7825 | (synopsis "Java APIs to create OSGi related artifacts") | |
7826 | (description "Tinybundles is all about creating OSGi related artifacts like | |
6fa0914a | 7827 | Bundles, Fragments and Deployment Packages with Java Api. It is very convenient |
25aef81d JL |
7828 | to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the |
7829 | other hand, this library can be a foundation of real end user tools that need | |
7830 | to create those artifacts.") | |
7831 | (license license:asl2.0))) | |
e179add0 JL |
7832 | |
7833 | (define-public java-ops4j-pax-exam-core | |
7834 | (package | |
7835 | (name "java-ops4j-pax-exam-core") | |
7836 | (version "4.11.0") | |
7837 | (source (origin | |
7838 | (method url-fetch) | |
7839 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/" | |
7840 | "archive/exam-reactor-" version ".tar.gz")) | |
7841 | (sha256 | |
7842 | (base32 | |
7843 | "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g")))) | |
7844 | (arguments | |
7845 | `(#:jar-name "java-ops4j-pax-exam-core.jar" | |
7846 | #:source-dir "core/pax-exam/src/main/java" | |
7847 | #:test-dir "core/pax-exam/src/test")) | |
7848 | (inputs | |
7849 | `(("slf4j" ,java-slf4j-api) | |
7850 | ("lang" ,java-ops4j-base-lang) | |
7851 | ("io" ,java-ops4j-base-io) | |
7852 | ("util-property" ,java-ops4j-base-util-property) | |
7853 | ("util-store" ,java-ops4j-base-store) | |
7854 | ("java-osgi-core" ,java-osgi-core))) | |
7855 | (native-inputs | |
7856 | `(("junit" ,java-junit) | |
7857 | ("hamcrest" ,java-hamcrest-core))) | |
7858 | (build-system ant-build-system) | |
7859 | (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview") | |
7860 | (synopsis "In-Container Testing for OSGi, Java EE and CDI") | |
7861 | (description "Pax Exam creates OSGi bundles for testing purposes. It lets | |
7862 | the user take control of the OSGi framework, the test framework (e.g. JUnit) and | |
7863 | the system under test at the same time.") | |
7864 | (license license:asl2.0))) | |
7a7c2b75 JL |
7865 | |
7866 | (define-public java-ops4j-pax-exam-core-spi | |
7867 | (package | |
7868 | (inherit java-ops4j-pax-exam-core) | |
7869 | (name "java-ops4j-pax-exam-core-spi") | |
7870 | (arguments | |
7871 | `(#:jar-name "java-ops4j-pax-exam-spi.jar" | |
7872 | #:source-dir "src/main/java" | |
7873 | #:test-exclude | |
7874 | (list | |
7875 | ;; Abstract base class, not a test | |
7876 | "**/BaseStagedReactorTest.java" | |
7877 | ;; Depends on org.mortbay.jetty.testwars:test-war-dump | |
7878 | "**/WarBuilderTest.java") | |
7879 | #:phases | |
7880 | (modify-phases %standard-phases | |
7881 | (add-before 'configure 'chdir | |
7882 | (lambda _ | |
7883 | ;; Tests assume we are in this directory | |
2c8ac364 MW |
7884 | (chdir "core/pax-exam-spi") |
7885 | #t)) | |
7a7c2b75 JL |
7886 | (add-before 'check 'fix-tests |
7887 | (lambda _ | |
7888 | ;; One test checks that this file is present. | |
7889 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi") | |
7890 | (with-output-to-file | |
7891 | "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties" | |
7892 | (lambda _ | |
7893 | (display | |
7894 | (string-append "artifactId = pax-exam-spi\n" | |
7895 | "version = " ,(package-version java-ops4j-pax-exam-core-spi))))) | |
7896 | ;; Maven puts compilation results in the target directory, while we | |
7897 | ;; put them in the build directory. | |
7898 | (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java" | |
7899 | "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java" | |
7900 | "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java") | |
7901 | (("target") "build")) | |
7902 | ;; One test is expected to fail, but it doesn't throw the expected exception | |
7903 | (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java" | |
2c8ac364 MW |
7904 | (("AssertionError") "IllegalArgumentException")) |
7905 | #t))))) | |
7a7c2b75 JL |
7906 | (inputs |
7907 | `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core) | |
7908 | ("lang" ,java-ops4j-base-lang) | |
7909 | ("monitors" ,java-ops4j-base-monitors) | |
7910 | ("store" ,java-ops4j-base-store) | |
7911 | ("io" ,java-ops4j-base-io) | |
7912 | ("spi" ,java-ops4j-base-spi) | |
7913 | ("osgi" ,java-osgi-core) | |
7914 | ("slf4j" ,java-slf4j-api) | |
7915 | ("tinybundles" ,java-ops4j-pax-tinybundles))) | |
7916 | (native-inputs | |
7917 | `(("mockito" ,java-mockito-1) | |
7918 | ("junit" ,java-junit) | |
7919 | ("hamcrest" ,java-hamcrest-core) | |
7920 | ("cglib" ,java-cglib) | |
7921 | ("objenesis" ,java-objenesis) | |
7922 | ("asm" ,java-asm))))) | |
4496d77f JL |
7923 | |
7924 | (define-public java-ops4j-pax-exam-core-junit | |
7925 | (package | |
7926 | (inherit java-ops4j-pax-exam-core) | |
7927 | (name "java-ops4j-pax-exam-core-junit") | |
7928 | (arguments | |
7929 | `(#:jar-name "ops4j-pax-exam-core-junit.jar" | |
7930 | #:source-dir "drivers/pax-exam-junit4/src/main/java" | |
7931 | #:tests? #f)); no tests | |
7932 | (inputs | |
7933 | `(("junit" ,java-junit) | |
7934 | ("slf4j" ,java-slf4j-api) | |
7935 | ("core" ,java-ops4j-pax-exam-core) | |
7936 | ("spi" ,java-ops4j-pax-exam-core-spi))) | |
7937 | (native-inputs '()))) | |
cb05f60d JL |
7938 | |
7939 | (define-public java-fasterxml-jackson-annotations | |
7940 | (package | |
7941 | (name "java-fasterxml-jackson-annotations") | |
93dceea4 | 7942 | (version "2.9.4") |
cb05f60d JL |
7943 | (source (origin |
7944 | (method url-fetch) | |
7945 | (uri (string-append "https://github.com/FasterXML/" | |
7946 | "jackson-annotations/archive/" | |
7947 | "jackson-annotations-" version ".tar.gz")) | |
7948 | (sha256 | |
7949 | (base32 | |
93dceea4 | 7950 | "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4")))) |
cb05f60d JL |
7951 | (build-system ant-build-system) |
7952 | (arguments | |
7953 | `(#:jar-name "jackson-annotations.jar" | |
7954 | #:source-dir "src/main/java" | |
7955 | #:test-dir "src/test")) | |
7956 | (native-inputs | |
7957 | `(("junit" ,java-junit))) | |
7958 | (home-page "https://github.com/FasterXML/jackson-annotations") | |
7959 | (synopsis "General purpose annotations for the Jackson Data Processor") | |
7960 | (description "This package contains general purpose annotations for the | |
7961 | Jackson Data Processor, used on value and handler types. The only annotations | |
7962 | not included are ones that require dependency to the Databind package.") | |
7963 | (license license:asl2.0))) | |
0b5481df JL |
7964 | |
7965 | (define-public java-fasterxml-jackson-core | |
7966 | (package | |
7967 | (name "java-fasterxml-jackson-core") | |
38a0fc38 | 7968 | (version "2.9.4") |
0b5481df JL |
7969 | (source (origin |
7970 | (method url-fetch) | |
7971 | (uri (string-append "https://github.com/FasterXML/" | |
7972 | "jackson-core/archive/" | |
7973 | "jackson-core-" version ".tar.gz")) | |
7974 | (sha256 | |
7975 | (base32 | |
38a0fc38 | 7976 | "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd")))) |
0b5481df JL |
7977 | (build-system ant-build-system) |
7978 | (arguments | |
7979 | `(#:jar-name "jackson-core.jar" | |
7980 | #:source-dir "src/main/java" | |
7981 | #:test-dir "src/test" | |
7982 | #:test-exclude | |
7983 | (list | |
7984 | ;; Expected failure. pom.xml excludes these | |
7985 | "**/failing/**" | |
7986 | ;; Base classes that have no constructor for junit | |
7987 | "**/BaseTest.java" | |
7988 | "**/ConcurrencyReadTest.java" | |
7989 | "**/ManualCharAccessTest.java" | |
7990 | "**/ManualCharAccessTest.java" | |
7991 | "**/TrailingCommasTest.java" | |
7992 | "**/AsyncMissingValuesInObjectTest.java" | |
7993 | "**/AsyncMissingValuesInArrayTest.java") | |
7994 | #:phases | |
7995 | (modify-phases %standard-phases | |
7996 | (add-before 'configure 'generate-PackageVersion.java | |
7997 | (lambda _ | |
7998 | (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java") | |
7999 | (in (string-append out ".in"))) | |
8000 | (copy-file in out) | |
8001 | (substitute* out | |
8002 | (("@package@") "com.fasterxml.jackson.core.json") | |
8003 | (("@projectversion@") ,version) | |
8004 | (("@projectgroupid@") "com.fasterxml.jackson.core") | |
2c8ac364 MW |
8005 | (("@projectartifactid@") "jackson-core"))) |
8006 | #t)) | |
0b5481df JL |
8007 | (add-before 'build 'copy-resources |
8008 | (lambda _ | |
8009 | (copy-recursively "src/main/resources" | |
2c8ac364 MW |
8010 | "build/classes") |
8011 | #t)) | |
0b5481df JL |
8012 | (add-before 'check 'copy-test-resources |
8013 | (lambda _ | |
8014 | (copy-recursively "src/test/resources" | |
2c8ac364 MW |
8015 | "build/test-classes") |
8016 | #t))))) | |
0b5481df JL |
8017 | (native-inputs |
8018 | `(("junit" ,java-junit) | |
8019 | ("hamcrest" ,java-hamcrest-core))) | |
8020 | (home-page "https://github.com/FasterXML/jackson-core") | |
8021 | (synopsis "") | |
8022 | (description "") | |
8023 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
f234c7a0 JL |
8024 | |
8025 | (define-public java-fasterxml-jackson-databind | |
8026 | (package | |
8027 | (name "java-fasterxml-jackson-databind") | |
3c1edff5 | 8028 | (version "2.9.4") |
f234c7a0 JL |
8029 | (source (origin |
8030 | (method url-fetch) | |
8031 | (uri (string-append "https://github.com/FasterXML/" | |
8032 | "jackson-databind/archive/" | |
8033 | "jackson-databind-" version ".tar.gz")) | |
8034 | (sha256 | |
8035 | (base32 | |
3c1edff5 | 8036 | "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08")))) |
f234c7a0 JL |
8037 | (build-system ant-build-system) |
8038 | (arguments | |
8039 | `(#:jar-name "jackson-databind.jar" | |
8040 | #:source-dir "src/main/java" | |
8041 | #:tests? #f; requires javax.measures for which I can't find a free implementation | |
8042 | #:phases | |
8043 | (modify-phases %standard-phases | |
8044 | (add-before 'configure 'generate-PackageVersion.java | |
8045 | (lambda _ | |
8046 | (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java") | |
8047 | (in (string-append out ".in"))) | |
8048 | (copy-file in out) | |
8049 | (substitute* out | |
8050 | (("@package@") "com.fasterxml.jackson.databind.cfg") | |
8051 | (("@projectversion@") ,version) | |
8052 | (("@projectgroupid@") "com.fasterxml.jackson.databind") | |
2c8ac364 MW |
8053 | (("@projectartifactid@") "jackson-databind"))) |
8054 | #t)) | |
f234c7a0 JL |
8055 | (add-before 'build 'copy-resources |
8056 | (lambda _ | |
2c8ac364 MW |
8057 | (copy-recursively "src/main/resources" "build/classes") |
8058 | #t))))) | |
f234c7a0 JL |
8059 | (inputs |
8060 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
8061 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core))) | |
8062 | (home-page "https://github.com/FasterXML/jackson-databind") | |
8063 | (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor") | |
8064 | (description "This package contains the general-purpose data-binding | |
8065 | functionality and tree-model for Jackson Data Processor. It builds on core | |
8066 | streaming parser/generator package, and uses Jackson Annotations for | |
8067 | configuration.") | |
8068 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
d57d8b89 JL |
8069 | |
8070 | (define-public java-fasterxml-jackson-modules-base-jaxb | |
8071 | (package | |
8072 | (name "java-fasterxml-jackson-modules-base-jaxb") | |
07207211 | 8073 | (version "2.9.4") |
d57d8b89 JL |
8074 | (source (origin |
8075 | (method url-fetch) | |
8076 | (uri (string-append "https://github.com/FasterXML/" | |
8077 | "jackson-modules-base/archive/" | |
8078 | "jackson-modules-base-" version ".tar.gz")) | |
8079 | (sha256 | |
8080 | (base32 | |
07207211 | 8081 | "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5")))) |
d57d8b89 JL |
8082 | (build-system ant-build-system) |
8083 | (arguments | |
8084 | `(#:jar-name "jackson-modules-base-jaxb.jar" | |
8085 | #:source-dir "jaxb/src/main/java" | |
8086 | #:test-dir "jaxb/src/test" | |
8087 | #:test-exclude | |
8088 | ;; Base class for tests | |
8089 | (list "**/BaseJaxbTest.java") | |
8090 | #:phases | |
8091 | (modify-phases %standard-phases | |
8092 | (add-before 'configure 'generate-PackageVersion.java | |
8093 | (lambda _ | |
8094 | (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/" | |
8095 | "jackson/module/jaxb/PackageVersion.java")) | |
8096 | (in (string-append out ".in"))) | |
8097 | (copy-file in out) | |
8098 | (substitute* out | |
8099 | (("@package@") "com.fasterxml.jackson.module.jaxb") | |
8100 | (("@projectversion@") ,version) | |
8101 | (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb") | |
2c8ac364 MW |
8102 | (("@projectartifactid@") "jackson-module-jaxb"))) |
8103 | #t)) | |
d57d8b89 JL |
8104 | (add-before 'build 'copy-resources |
8105 | (lambda _ | |
2c8ac364 MW |
8106 | (copy-recursively "jaxb/src/main/resources" "build/classes") |
8107 | #t))))) | |
d57d8b89 JL |
8108 | (inputs |
8109 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
8110 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
8111 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind))) | |
8112 | (native-inputs | |
8113 | `(("java-junit" ,java-junit))) | |
8114 | (home-page "https://github.com/FasterXML/jackson-modules-base") | |
8115 | (synopsis "Jaxb annotations jackson module") | |
8116 | (description "This package is the jaxb annotations module for jackson.") | |
8117 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
0f296d37 | 8118 | |
5165fb40 DM |
8119 | (define-public java-fasterxml-jackson-modules-base-mrbean |
8120 | (package | |
8121 | (name "java-fasterxml-jackson-modules-base-mrbean") | |
8122 | (version "2.9.4") | |
8123 | (source (origin | |
8124 | (method url-fetch) | |
8125 | (uri (string-append "https://github.com/FasterXML/" | |
8126 | "jackson-modules-base/archive/" | |
8127 | "jackson-modules-base-" version ".tar.gz")) | |
8128 | (sha256 | |
8129 | (base32 | |
8130 | "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5")))) | |
8131 | (build-system ant-build-system) | |
8132 | (arguments | |
8133 | `(#:jar-name "jackson-modules-base-mrbean.jar" | |
8134 | #:source-dir "mrbean/src/main/java" | |
8135 | #:test-dir "mrbean/src/test" | |
8136 | #:test-exclude | |
8137 | ;; Base class for tests | |
8138 | (list "**/BaseTest.java") | |
8139 | #:phases | |
8140 | (modify-phases %standard-phases | |
8141 | (add-before 'configure 'generate-PackageVersion.java | |
8142 | (lambda _ | |
8143 | (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/" | |
8144 | "jackson/module/mrbean/PackageVersion.java")) | |
8145 | (in (string-append out ".in"))) | |
8146 | (copy-file in out) | |
8147 | (substitute* out | |
8148 | (("@package@") "com.fasterxml.jackson.module.mrbean") | |
8149 | (("@projectversion@") ,version) | |
8150 | (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean") | |
8151 | (("@projectartifactid@") "jackson-module-mrbean"))) | |
8152 | #t))))) | |
8153 | (inputs | |
8154 | `(("java-asm" ,java-asm) | |
8155 | ("java-fasterxml-jackson-annotations" | |
8156 | ,java-fasterxml-jackson-annotations) | |
8157 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
8158 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind))) | |
8159 | (native-inputs | |
8160 | `(("java-junit" ,java-junit))) | |
8161 | (home-page "https://github.com/FasterXML/jackson-modules-base") | |
8162 | (synopsis "POJO type materialization for Java") | |
8163 | (description "This package implements POJO type materialization. | |
8164 | Databinders can construct implementation classes for Java interfaces as part | |
8165 | of deserialization.") | |
8166 | (license license:asl2.0))) | |
8167 | ||
0f296d37 JL |
8168 | (define-public java-snakeyaml |
8169 | (package | |
8170 | (name "java-snakeyaml") | |
8171 | (version "1.18") | |
8172 | (source (origin | |
8173 | (method url-fetch) | |
8174 | (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v" | |
8175 | version ".tar.gz")) | |
307856cd | 8176 | (file-name (string-append name "-" version ".tar.gz")) |
0f296d37 JL |
8177 | (sha256 |
8178 | (base32 | |
8179 | "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg")))) | |
8180 | (build-system ant-build-system) | |
8181 | (arguments | |
8182 | `(#:jar-name "java-snakeyaml.jar" | |
8183 | #:source-dir "src/main/java" | |
8184 | ;; Tests require velocity, a cyclic dependency, and | |
8185 | ;; java-spring-framework-context which is not packaged. | |
8186 | #:tests? #f)) | |
8187 | (home-page "https://bitbucket.org/asomov/snakeyaml") | |
8188 | (synopsis "YAML processor") | |
8189 | (description "SnakeYAML is a YAML processor for the Java Virtual Machine.") | |
8190 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
087c8fd2 JL |
8191 | |
8192 | (define-public java-fasterxml-jackson-dataformat-yaml | |
8193 | (package | |
8194 | (name "java-fasterxml-jackson-dataformat-yaml") | |
1f2be88f | 8195 | (version "2.9.4") |
087c8fd2 JL |
8196 | (source (origin |
8197 | (method url-fetch) | |
8198 | (uri (string-append "https://github.com/FasterXML/" | |
8199 | "jackson-dataformats-text/archive/" | |
8200 | "jackson-dataformats-text-" version ".tar.gz")) | |
8201 | (sha256 | |
8202 | (base32 | |
1f2be88f | 8203 | "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7")))) |
087c8fd2 JL |
8204 | (build-system ant-build-system) |
8205 | (arguments | |
8206 | `(#:jar-name "jackson-dataformat-yaml.jar" | |
8207 | #:source-dir "yaml/src/main/java" | |
8208 | #:test-dir "yaml/src/test" | |
8209 | #:test-exclude (list "**/failing/**.java") | |
8210 | #:phases | |
8211 | (modify-phases %standard-phases | |
8212 | (add-before 'configure 'generate-PackageVersion.java | |
8213 | (lambda _ | |
8214 | (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java") | |
8215 | (in (string-append out ".in"))) | |
8216 | (copy-file in out) | |
8217 | (substitute* out | |
8218 | (("@package@") "com.fasterxml.jackson.dataformat.yaml") | |
8219 | (("@projectversion@") ,version) | |
8220 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml") | |
2c8ac364 MW |
8221 | (("@projectartifactid@") "jackson-dataformat-yaml"))) |
8222 | #t))))) | |
087c8fd2 JL |
8223 | (inputs |
8224 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
8225 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
8226 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) | |
8227 | ("java-snakeyaml" ,java-snakeyaml))) | |
8228 | (native-inputs | |
8229 | `(("junit" ,java-junit) | |
8230 | ("hamcrest" ,java-hamcrest-core) | |
8231 | ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi) | |
8232 | ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit) | |
8233 | ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core))) | |
8234 | (home-page "https://github.com/FasterXML/jackson-dataformats-text") | |
8235 | (synopsis "Yaml backend for Jackson") | |
8236 | (description "Dataformat backends are used to support format alternatives | |
8237 | to JSON, supported by default. This is done by sub-classing Jackson core | |
8238 | abstractions.") | |
8239 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
6fd07b98 JL |
8240 | |
8241 | (define-public java-stax2-api | |
8242 | (package | |
8243 | (name "java-stax2-api") | |
8244 | (version "4.0.0") | |
8245 | (source (origin | |
8246 | (method url-fetch) | |
8247 | (uri (string-append "https://github.com/FasterXML/stax2-api/archive/" | |
8248 | "stax2-api-" version ".tar.gz")) | |
8249 | (sha256 | |
8250 | (base32 | |
8251 | "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq")))) | |
8252 | (build-system ant-build-system) | |
8253 | (arguments | |
8254 | `(#:jar-name "java-stax2-api.jar" | |
8255 | #:source-dir "src/main/java" | |
8256 | #:tests? #f)); no tests | |
8257 | (home-page "https://github.com/FasterXML/stax2-api") | |
8258 | (synopsis "Stax2 API") | |
8259 | (description "Stax2 API is an extension to basic Stax 1.0 API that adds | |
8260 | significant new functionalities, such as full-featured bi-direction validation | |
8261 | interface and high-performance Typed Access API.") | |
8262 | (license license:bsd-2))) | |
40f193f3 JL |
8263 | |
8264 | (define-public java-woodstox-core | |
8265 | (package | |
8266 | (name "java-woodstox-core") | |
8267 | (version "5.0.3") | |
8268 | (source (origin | |
8269 | (method url-fetch) | |
8270 | (uri (string-append "https://github.com/FasterXML/woodstox/archive/" | |
8271 | "woodstox-core-" version ".tar.gz")) | |
8272 | (sha256 | |
8273 | (base32 | |
8274 | "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4")))) | |
8275 | (build-system ant-build-system) | |
8276 | (arguments | |
8277 | `(#:jar-name "woodstox.jar" | |
8278 | #:test-exclude | |
8279 | (list "**/Base*.java" "failing/**") | |
8280 | #:phases | |
8281 | (modify-phases %standard-phases | |
8282 | (add-before 'build 'remove-msv-dep | |
8283 | (lambda _ | |
8284 | ;; we don't need osgi, and it depends on msv | |
8285 | (delete-file-recursively "src/main/java/com/ctc/wstx/osgi") | |
8286 | ;; msv's latest release is from 2011 and we don't need it | |
8287 | (delete-file-recursively "src/main/java/com/ctc/wstx/msv") | |
8288 | (delete-file-recursively "src/test/java/wstxtest/osgi") | |
2c8ac364 MW |
8289 | (delete-file-recursively "src/test/java/wstxtest/msv") |
8290 | #t)) | |
40f193f3 JL |
8291 | (add-before 'build 'copy-resources |
8292 | (lambda _ | |
2c8ac364 MW |
8293 | (copy-recursively "src/main/resources" "build/classes") |
8294 | #t))))) | |
40f193f3 JL |
8295 | (inputs |
8296 | `(("stax2" ,java-stax2-api))) | |
8297 | (native-inputs | |
8298 | `(("junit" ,java-junit))) | |
8299 | (home-page "https://github.com/FasterXML/woodstox") | |
8300 | (synopsis "Stax XML API implementation") | |
8301 | (description "Woodstox is a stax XML API implementation.") | |
8302 | (license license:asl2.0))) | |
262a4d33 JL |
8303 | |
8304 | (define-public java-fasterxml-jackson-dataformat-xml | |
8305 | (package | |
8306 | (name "java-fasterxml-jackson-dataformat-xml") | |
f3bbe029 | 8307 | (version "2.9.4") |
262a4d33 JL |
8308 | (source (origin |
8309 | (method url-fetch) | |
8310 | (uri (string-append "https://github.com/FasterXML/" | |
8311 | "jackson-dataformat-xml/archive/" | |
8312 | "jackson-dataformat-xml-" version ".tar.gz")) | |
8313 | (sha256 | |
8314 | (base32 | |
f3bbe029 | 8315 | "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq")))) |
262a4d33 JL |
8316 | (build-system ant-build-system) |
8317 | (arguments | |
8318 | `(#:jar-name "jackson-dataformat-xml.jar" | |
8319 | #:source-dir "src/main/java" | |
8320 | #:test-exclude | |
8321 | (list "**/failing/**") | |
8322 | #:phases | |
8323 | (modify-phases %standard-phases | |
8324 | (add-before 'configure 'generate-PackageVersion.java | |
8325 | (lambda _ | |
8326 | (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java") | |
8327 | (in (string-append out ".in"))) | |
8328 | (copy-file in out) | |
8329 | (newline) | |
8330 | (substitute* out | |
8331 | (("@package@") "com.fasterxml.jackson.dataformat.xml") | |
8332 | (("@projectversion@") ,version) | |
8333 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml") | |
2c8ac364 MW |
8334 | (("@projectartifactid@") "jackson-dataformat-xml"))) |
8335 | #t)) | |
262a4d33 JL |
8336 | (add-before 'build 'copy-resources |
8337 | (lambda _ | |
2c8ac364 MW |
8338 | (copy-recursively "src/main/resources" "build/classes") |
8339 | #t))))) | |
262a4d33 JL |
8340 | (inputs |
8341 | `(("jackson-annotations" ,java-fasterxml-jackson-annotations) | |
8342 | ("jackson-core" ,java-fasterxml-jackson-core) | |
8343 | ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb) | |
8344 | ("jackson-databind" ,java-fasterxml-jackson-databind) | |
8345 | ("stax2-api" ,java-stax2-api) | |
8346 | ("woodstox" ,java-woodstox-core))) | |
8347 | (native-inputs | |
8348 | `(("junit" ,java-junit) | |
8349 | ("hamcrest" ,java-hamcrest-core))) | |
8350 | (home-page "https://github.com/FasterXML/jackson-dataformat-xml") | |
8351 | (synopsis "Read and write XML") | |
8352 | (description "This package contains Jackson extension component for reading | |
8353 | and writing XML encoded data. | |
8354 | ||
8355 | Further, the goal is to emulate how JAXB data-binding works with \"Code-first\" | |
8356 | approach (that is, no support is added for \"Schema-first\" approach). Support | |
8357 | for JAXB annotations is provided by JAXB annotation module; this module | |
8358 | provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator}, | |
8359 | @code{JsonFactory}) as well as small number of higher level overrides needed to | |
8360 | make data-binding work.") | |
8361 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
90a127c7 JL |
8362 | |
8363 | (define-public java-hdrhistogram | |
8364 | (package | |
8365 | (name "java-hdrhistogram") | |
8366 | (version "2.1.9") | |
8367 | (source (origin | |
8368 | (method url-fetch) | |
8369 | (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/" | |
8370 | "archive/HdrHistogram-" version ".tar.gz")) | |
8371 | (sha256 | |
8372 | (base32 | |
8373 | "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv")))) | |
8374 | (build-system ant-build-system) | |
8375 | (arguments | |
8376 | `(#:jar-name "java-hdrhistogram.jar" | |
8377 | #:source-dir "src/main/java" | |
8378 | #:phases | |
8379 | (modify-phases %standard-phases | |
8380 | (add-before 'configure 'set-version | |
8381 | (lambda _ | |
8382 | (let* ((version-java "src/main/java/org/HdrHistogram/Version.java") | |
8383 | (template (string-append version-java ".template"))) | |
8384 | (copy-file template version-java) | |
8385 | (substitute* version-java | |
8386 | (("\\$VERSION\\$") ,version) | |
8387 | (("\\$BUILD_TIME\\$") "0")) | |
8388 | #t)))))) | |
8389 | (native-inputs | |
8390 | `(("junit" ,java-junit) | |
8391 | ("hamcrest" ,java-hamcrest-core))) | |
8392 | (home-page "https://hdrhistogram.github.io/HdrHistogram") | |
8393 | (synopsis "High dynamic range histogram") | |
8394 | (description "Hdrhistogram allows to create histograms that support | |
8395 | recording and analyzing sampled data value counts across a configurable integer | |
8396 | value range with configurable value precision within the range. Value precision | |
8397 | is expressed as the number of significant digits in the value recording, and | |
8398 | provides control over value quantization behavior across the value range and | |
8399 | the subsequent value resolution at any given level.") | |
8400 | (license license:public-domain))) | |
5d104a27 | 8401 | |
c5ff11dc RW |
8402 | (define-public java-cofoja |
8403 | (package | |
8404 | (name "java-cofoja") | |
8405 | (version "1.3") | |
8406 | (source (origin | |
8407 | (method git-fetch) | |
8408 | (uri (git-reference | |
8409 | (url "https://github.com/nhatminhle/cofoja.git") | |
8410 | (commit (string-append "v" version)))) | |
8411 | (file-name (string-append "java-cofoja-" version "-checkout")) | |
8412 | (sha256 | |
8413 | (base32 | |
8414 | "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w")))) | |
8415 | (build-system ant-build-system) | |
8416 | (arguments | |
8417 | `(#:build-target "dist" | |
8418 | #:test-target "test" | |
8419 | #:jdk ,icedtea-8 | |
8420 | #:make-flags | |
8421 | (list "-Ddist.dir=dist") | |
8422 | #:modules ((guix build ant-build-system) | |
8423 | (guix build java-utils) | |
8424 | (guix build utils) | |
8425 | (srfi srfi-1) | |
8426 | (ice-9 match)) | |
8427 | #:phases | |
8428 | (modify-phases %standard-phases | |
8429 | ;; The bulid system ignores the class path the ant-build-system sets | |
8430 | ;; up and instead expects to find all dependencies in the "lib" | |
8431 | ;; directory. | |
8432 | (add-after 'unpack 'create-libdir | |
8433 | (lambda* (#:key inputs #:allow-other-keys) | |
8434 | (mkdir-p "lib") | |
8435 | (for-each | |
8436 | (lambda (file) | |
8437 | (let ((target (string-append "lib/" (basename file)))) | |
8438 | (unless (file-exists? target) | |
8439 | (symlink file target)))) | |
8440 | (append-map (match-lambda | |
8441 | ((label . dir) | |
8442 | (find-files dir "\\.jar$"))) | |
8443 | inputs)) | |
8444 | #t)) | |
8445 | (replace 'install (install-jars "dist"))))) | |
8446 | (inputs | |
8447 | `(("java-asm" ,java-asm))) | |
8448 | (native-inputs | |
8449 | `(("java-junit" ,java-junit))) | |
8450 | (home-page "https://github.com/nhatminhle/cofoja") | |
8451 | (synopsis "Contracts for Java") | |
8452 | (description "Contracts for Java, or Cofoja for short, is a contract | |
8453 | programming framework and test tool for Java, which uses annotation processing | |
8454 | and bytecode instrumentation to provide run-time checking. (In particular, | |
8455 | this is not a static analysis tool.)") | |
8456 | (license license:lgpl3+))) | |
8457 | ||
5d104a27 JL |
8458 | (define-public java-aopalliance |
8459 | (package | |
8460 | (name "java-aopalliance") | |
8461 | (version "1.0") | |
8462 | (source (origin | |
8463 | (method git-fetch) | |
8464 | ;; Note: this git repository is not official, but contains the | |
8465 | ;; source code that is in the CVS repository. Downloading the | |
8466 | ;; tarball from sourceforge is undeterministic, and the cvs download | |
8467 | ;; fails. | |
8468 | (uri (git-reference | |
8469 | (url "https://github.com/hoverruan/aopalliance") | |
8470 | (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0"))) | |
8471 | (file-name (string-append name "-" version)) | |
8472 | (sha256 | |
8473 | (base32 | |
8474 | "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr")))) | |
8475 | (build-system ant-build-system) | |
8476 | (arguments | |
8477 | `(#:jar-name "java-aopalliance.jar" | |
8478 | #:jdk ,icedtea-8 | |
8479 | #:tests? #f; no tests | |
8480 | #:source-dir "aopalliance/src/main")) | |
8481 | (home-page "http://aopalliance.sourceforge.net") | |
8482 | (synopsis "Aspect-Oriented Programming") | |
8483 | (description "The AOP Alliance project is a joint project between several | |
8484 | software engineering people who are interested in Aspect-Oriented Programming | |
8485 | (AOP) and Java.") | |
8486 | (license license:public-domain))) | |
454536e0 JL |
8487 | |
8488 | (define-public java-javax-inject | |
8489 | (package | |
8490 | (name "java-javax-inject") | |
8491 | (version "tck-1") | |
8492 | (source (origin | |
8493 | (method url-fetch) | |
8494 | (uri (string-append "https://github.com/javax-inject/javax-inject/" | |
8495 | "archive/javax.inject-" version ".tar.gz")) | |
8496 | (sha256 | |
8497 | (base32 | |
8498 | "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0")))) | |
8499 | (build-system ant-build-system) | |
8500 | (arguments | |
8501 | `(#:jar-name "java-javax-inject.jar" | |
8502 | #:jdk ,icedtea-8 | |
8503 | #:tests? #f)); no tests | |
8504 | (home-page "http://github.com/javax-inject/javax-inject") | |
8505 | (synopsis "JSR-330: Dependency Injection for Java") | |
8506 | (description "This package specifies a means for obtaining objects in such | |
8507 | a way as to maximize reusability, testability and maintainability compared to | |
8508 | traditional approaches such as constructors, factories, and service locators | |
8509 | (e.g., JNDI). This process, known as dependency injection, is beneficial to | |
8510 | most nontrivial applications. | |
8511 | ||
8512 | Many types depend on other types. For example, a @var{Stopwatch} might depend | |
8513 | on a @var{TimeSource}. The types on which a type depends are known as its | |
8514 | dependencies. The process of finding an instance of a dependency to use at run | |
8515 | time is known as resolving the dependency. If no such instance can be found, | |
8516 | the dependency is said to be unsatisfied, and the application is broken.") | |
8517 | (license license:asl2.0))) | |
5766984b JL |
8518 | |
8519 | (define-public java-guice | |
8520 | (package | |
8521 | (name "java-guice") | |
8522 | (version "4.1") | |
8523 | (source (origin | |
8524 | (method url-fetch) | |
8525 | (uri (string-append "https://github.com/google/guice/archive/" | |
8526 | version ".tar.gz")) | |
8527 | (file-name (string-append name "-" version ".tar.gz")) | |
9936ffe7 BH |
8528 | (modules '((guix build utils))) |
8529 | (snippet | |
8530 | `(begin | |
8531 | (for-each delete-file (find-files "." ".*.jar")))) | |
5766984b JL |
8532 | (sha256 |
8533 | (base32 | |
8534 | "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp")))) | |
8535 | (build-system ant-build-system) | |
8536 | (arguments | |
8537 | `(#:jar-name "java-guice.jar" | |
8538 | #:jdk ,icedtea-8 | |
8539 | #:tests? #f; FIXME: tests are not in a java sub directory | |
8540 | #:source-dir "core/src")) | |
8541 | (inputs | |
8542 | `(("guava" ,java-guava) | |
8543 | ("java-cglib" ,java-cglib) | |
8544 | ("java-aopalliance" ,java-aopalliance) | |
8545 | ("java-javax-inject" ,java-javax-inject) | |
8546 | ("java-asm" ,java-asm))) | |
8547 | (home-page "https://github.com/google/guice") | |
8548 | (synopsis "Lightweight dependency injection framework") | |
8549 | (description "Guice is a lightweight dependency injection framework fo | |
8550 | Java 6 and above.") | |
8551 | (license license:asl2.0))) | |
ec4e8ad7 JL |
8552 | |
8553 | (define-public java-guice-servlet | |
8554 | (package | |
8555 | (inherit java-guice) | |
8556 | (name "java-guice-servlet") | |
8557 | (arguments | |
8558 | `(#:jar-name "guice-servlet.jar" | |
8559 | #:source-dir "extensions/servlet/src/" | |
8560 | #:jdk ,icedtea-8 | |
8561 | #:tests? #f)); FIXME: not in a java subdir | |
8562 | (inputs | |
8563 | `(("guice" ,java-guice) | |
10eddaca | 8564 | ("servlet" ,java-classpathx-servletapi) |
ec4e8ad7 | 8565 | ,@(package-inputs java-guice))))) |
b12fe1e5 JL |
8566 | |
8567 | (define-public java-assertj | |
8568 | (package | |
8569 | (name "java-assertj") | |
8570 | (version "3.8.0") | |
8571 | (source (origin | |
8572 | (method url-fetch) | |
8573 | (uri (string-append "https://github.com/joel-costigliola/" | |
8574 | "assertj-core/archive/" | |
8575 | "assertj-core-" version ".tar.gz")) | |
8576 | (sha256 | |
8577 | (base32 | |
8578 | "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz")))) | |
8579 | (build-system ant-build-system) | |
8580 | (arguments | |
8581 | `(#:jar-name "java-assertj.jar" | |
8582 | #:jdk ,icedtea-8 | |
8583 | #:source-dir "src/main/java" | |
8584 | #:tests? #f)); depends on tng-junit which depends on assertj | |
8585 | (inputs | |
8586 | `(("cglib" ,java-cglib) | |
8587 | ("junit" ,java-junit) | |
8588 | ("hamcrest" ,java-hamcrest-core))) | |
8589 | (native-inputs | |
8590 | `(("mockito" ,java-mockito-1))) | |
8591 | (home-page "https://joel-costigliola.github.io/assertj/index.html") | |
8592 | (synopsis "Fluent assertions for java") | |
8593 | (description "AssertJ core is a Java library that provides a fluent | |
8594 | interface for writing assertions. Its main goal is to improve test code | |
8595 | readability and make maintenance of tests easier.") | |
8596 | (license license:asl2.0))) | |
6768e0a7 JL |
8597 | |
8598 | (define-public java-jboss-javassist | |
8599 | (package | |
8600 | (name "java-jboss-javassist") | |
8601 | (version "3.21.0") | |
8602 | (source (origin | |
8603 | (method url-fetch) | |
8604 | (uri (string-append "https://github.com/jboss-javassist/javassist/" | |
8605 | "archive/rel_" | |
8606 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) | |
8607 | "_ga.tar.gz")) | |
8608 | (sha256 | |
8609 | (base32 | |
8610 | "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf")))) | |
8611 | (build-system ant-build-system) | |
8612 | (arguments | |
8613 | `(#:jar-name "java-jboss-javassist.jar" | |
8614 | #:jdk ,icedtea-8 | |
8615 | #:source-dir "src/main" | |
8616 | #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3 | |
8617 | #:phases | |
8618 | (modify-phases %standard-phases | |
8619 | (add-before 'configure 'remove-binary | |
8620 | (lambda _ | |
8621 | (delete-file "javassist.jar") | |
8622 | #t))))) | |
8623 | (native-inputs | |
8624 | `(("junit" ,java-junit))) | |
8625 | (home-page "https://github.com/jboss-javassist/javassist") | |
8626 | (synopsis "Java bytecode engineering toolkit") | |
8627 | (description "Javassist (JAVA programming ASSISTant) makes Java bytecode | |
8628 | manipulation simple. It is a class library for editing bytecodes in Java; it | |
8629 | enables Java programs to define a new class at runtime and to modify a class | |
8630 | file when the JVM loads it.") | |
8631 | (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl. | |
a6dd06d0 JL |
8632 | |
8633 | (define-public java-jcommander | |
8634 | (package | |
8635 | (name "java-jcommander") | |
8636 | (version "1.71") | |
8637 | (source (origin | |
8638 | (method url-fetch) | |
8639 | (uri (string-append "https://github.com/cbeust/jcommander/archive/" | |
8640 | version ".tar.gz")) | |
8641 | (file-name (string-append name "-" version ".tar.gz")) | |
8642 | (sha256 | |
8643 | (base32 | |
8644 | "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx")))) | |
8645 | (build-system ant-build-system) | |
8646 | (arguments | |
8647 | `(#:jar-name "java-jcommander.jar" | |
8648 | #:jdk ,icedtea-8 | |
8649 | #:tests? #f; requires testng which depends on jcommander | |
8650 | #:source-dir "src/main/java")) | |
8651 | (home-page "http://jcommander.org") | |
8652 | (synopsis "Command line parameters parser") | |
8653 | (description "JCommander is a very small Java framework that makes it | |
8654 | trivial to parse command line parameters. Parameters are declared with | |
8655 | annotations.") | |
8656 | (license license:asl2.0))) | |
11bc385b JL |
8657 | |
8658 | (define-public java-bsh | |
8659 | (package | |
8660 | (name "java-bsh") | |
8661 | (version "2.0b6") | |
8662 | (source (origin | |
8663 | (method url-fetch) | |
8664 | (uri (string-append "https://github.com/beanshell/beanshell/archive/" | |
8665 | version ".tar.gz")) | |
8666 | (file-name (string-append name "-" version ".tar.gz")) | |
8667 | (sha256 | |
8668 | (base32 | |
8669 | "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv")))) | |
8670 | (build-system ant-build-system) | |
8671 | (arguments | |
8672 | `(#:build-target "jarall" | |
8673 | #:test-target "junit-tests-all" | |
8674 | #:phases | |
8675 | (modify-phases %standard-phases | |
8676 | (replace 'install | |
8677 | (lambda* (#:key outputs #:allow-other-keys) | |
8678 | (let ((share (string-append (assoc-ref outputs "out") "/share/java"))) | |
8679 | (mkdir-p share) | |
8680 | (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar")) | |
8681 | #t)))))) | |
8682 | (home-page "http://beanshell.org/") | |
8683 | (synopsis "Lightweight Scripting for Java") | |
8684 | (description "BeanShell is a small, free, embeddable Java source | |
8685 | interpreter with object scripting language features, written in Java. | |
8686 | BeanShell dynamically executes standard Java syntax and extends it with common | |
8687 | scripting conveniences such as loose types, commands, and method closures like | |
8688 | those in Perl and JavaScript.") | |
8689 | (license license:asl2.0))) | |
7a343e97 JL |
8690 | |
8691 | (define-public java-fest-util | |
8692 | (package | |
8693 | (name "java-fest-util") | |
8694 | (version "1.2.5") | |
8695 | (source (origin | |
8696 | (method url-fetch) | |
8697 | (uri (string-append "https://github.com/alexruiz/fest-util/" | |
8698 | "archive/fest-util-" version ".tar.gz")) | |
8699 | (sha256 | |
8700 | (base32 | |
8701 | "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8")))) | |
8702 | (build-system ant-build-system) | |
8703 | (arguments | |
8704 | `(#:jar-name "java-fest-util.jar" | |
8705 | #:source-dir "src/main/java")) | |
8706 | (native-inputs | |
8707 | `(("junit" ,java-junit) | |
8708 | ("hamcrest" ,java-hamcrest-core))) | |
8709 | (home-page "https://github.com/alexruiz/fest-util") | |
8710 | (synopsis "FEST common utilities") | |
8711 | (description "Common utilities used in all FEST module.") | |
8712 | (license license:asl2.0))) | |
3c6c8358 JL |
8713 | |
8714 | (define-public java-fest-test | |
8715 | (package | |
8716 | (name "java-fest-test") | |
8717 | (version "2.1.0") | |
8718 | (source (origin | |
8719 | (method url-fetch) | |
8720 | (uri (string-append "https://github.com/alexruiz/fest-test/" | |
8721 | "archive/fest-test-" version ".tar.gz")) | |
8722 | (sha256 | |
8723 | (base32 | |
8724 | "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g")))) | |
8725 | (build-system ant-build-system) | |
8726 | (arguments | |
8727 | `(#:jar-name "java-fest-test.jar" | |
8728 | #:source-dir "src/main/java" | |
8729 | #:tests? #f)); no tests | |
8730 | (inputs | |
8731 | `(("junit" ,java-junit))) | |
8732 | (home-page "https://github.com/alexruiz/fest-test") | |
8733 | (synopsis "Common FEST testing infrastructure") | |
8734 | (description "Fest-test contains the common FEST testing infrastructure.") | |
8735 | (license license:asl2.0))) | |
ca98e448 JL |
8736 | |
8737 | (define-public java-fest-assert | |
8738 | (package | |
8739 | (name "java-fest-assert") | |
8740 | (version "2.0M10") | |
8741 | (source (origin | |
8742 | (method url-fetch) | |
8743 | (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/" | |
8744 | "archive/fest-assert-core-" version ".tar.gz")) | |
8745 | (sha256 | |
8746 | (base32 | |
8747 | "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw")))) | |
8748 | (build-system ant-build-system) | |
8749 | (arguments | |
8750 | `(#:jar-name "java-fest-assert.jar" | |
8751 | #:source-dir "src/main/java" | |
8752 | #:test-exclude | |
8753 | (list | |
8754 | "**/Abstract*.java" | |
8755 | "**/*BaseTest.java" | |
8756 | ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses | |
8757 | "**/MessageFormatter_format_Test.java" | |
8758 | "**/internal/*/*_assert*_Test.java"))) | |
8759 | (inputs | |
8760 | `(("java-fest-util" ,java-fest-util))) | |
8761 | (native-inputs | |
8762 | `(("java-junit" ,java-junit) | |
8763 | ("java-fest-test" ,java-fest-test) | |
8764 | ("java-hamcrest-core" ,java-hamcrest-core) | |
8765 | ("java-mockito" ,java-mockito-1) | |
8766 | ("java-cglib" ,java-cglib) | |
8767 | ("java-objenesis" ,java-objenesis) | |
8768 | ("java-asm" ,java-asm))) | |
8769 | (home-page "https://github.com/alexruiz/fest-assert-2.x") | |
8770 | (synopsis "FEST fluent assertions") | |
8771 | (description "FEST-Assert provides a fluent interface for assertions.") | |
8772 | (license license:asl2.0))) | |
0442d897 JL |
8773 | |
8774 | (define-public java-testng | |
8775 | (package | |
8776 | (name "java-testng") | |
3422e10e | 8777 | (version "6.14.3") |
0442d897 | 8778 | (source (origin |
36b39d16 RW |
8779 | (method git-fetch) |
8780 | (uri (git-reference | |
8781 | (url "https://github.com/cbeust/testng.git") | |
8782 | (commit version))) | |
8783 | (file-name (string-append name "-" version "-checkout")) | |
0442d897 JL |
8784 | (sha256 |
8785 | (base32 | |
3422e10e | 8786 | "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv")))) |
0442d897 JL |
8787 | (build-system ant-build-system) |
8788 | (arguments | |
8789 | `(#:jdk ,icedtea-8; java.util.function | |
8790 | #:jar-name "java-testng.jar" | |
8791 | #:source-dir "src/main/java" | |
8792 | #:phases | |
8793 | (modify-phases %standard-phases | |
36b39d16 RW |
8794 | ;; FIXME: I don't know why these tests fail |
8795 | (add-after 'unpack 'delete-failing-tests | |
8796 | (lambda _ | |
8797 | (substitute* "src/test/resources/testng.xml" | |
8798 | (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "") | |
8799 | (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "")) | |
8800 | #t)) | |
8801 | ;; We don't have groovy | |
8802 | (add-after 'unpack 'delete-groovy-tests | |
8803 | (lambda _ | |
8804 | (delete-file-recursively "src/test/java/test/dependent/issue1648/") | |
8805 | (substitute* "src/test/resources/testng.xml" | |
8806 | (("<class name=\"test.dependent.issue1648.TestRunner\"/>") "")) | |
8807 | #t)) | |
0442d897 JL |
8808 | (add-before 'build 'copy-resources |
8809 | (lambda _ | |
8810 | (copy-recursively "src/main/resources" "build/classes") | |
8811 | #t)) | |
8812 | (add-before 'check 'copy-test-resources | |
8813 | (lambda _ | |
8814 | (copy-recursively "src/test/resources" "build/test-classes") | |
8815 | #t)) | |
8816 | (replace 'check | |
8817 | (lambda _ | |
2c8ac364 | 8818 | (invoke "ant" "compile-tests") |
0442d897 JL |
8819 | ;; we don't have groovy |
8820 | (substitute* "src/test/resources/testng.xml" | |
8821 | (("<class name=\"test.groovy.GroovyTest\" />") "")) | |
2c8ac364 MW |
8822 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") |
8823 | ":build/classes" | |
8824 | ":build/test-classes") | |
8825 | "-Dtest.resources.dir=src/test/resources" | |
8826 | "org.testng.TestNG" "src/test/resources/testng.xml")))))) | |
0442d897 JL |
8827 | (propagated-inputs |
8828 | `(("junit" ,java-junit) | |
8829 | ("java-jsr305" ,java-jsr305) | |
8830 | ("java-bsh" ,java-bsh) | |
8831 | ("java-jcommander" ,java-jcommander) | |
8832 | ("java-guice" ,java-guice) | |
8833 | ("snakeyaml" ,java-snakeyaml))) | |
8834 | (native-inputs | |
8835 | `(("guava" ,java-guava) | |
8836 | ("java-javax-inject" ,java-javax-inject) | |
8837 | ("java-hamcrest" ,java-hamcrest-all) | |
8838 | ("java-assertj" ,java-assertj) | |
36b39d16 | 8839 | ("java-mockito" ,java-mockito-1) |
0442d897 JL |
8840 | ("cglib" ,java-cglib) |
8841 | ("asm" ,java-asm) | |
8842 | ("aopalliance" ,java-aopalliance))) | |
8843 | (home-page "http://testng.org") | |
8844 | (synopsis "Testing framework") | |
8845 | (description "TestNG is a testing framework inspired from JUnit and NUnit | |
8846 | but introducing some new functionalities that make it more powerful and easier | |
8847 | to use.") | |
8848 | (license license:asl2.0))) | |
1717a7de JL |
8849 | |
8850 | (define-public java-jnacl | |
3e87923a RW |
8851 | (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9") |
8852 | (revision "2")) | |
8853 | (package | |
8854 | (name "java-jnacl") | |
8855 | (version (string-append "0.1.0-" revision "." (string-take commit 7))) | |
8856 | (source (origin | |
8857 | (method git-fetch) | |
8858 | (uri (git-reference | |
8859 | (url "https://github.com/neilalexander/jnacl.git") | |
8860 | (commit commit))) | |
6c34ad73 | 8861 | (file-name (git-file-name name version)) |
3e87923a RW |
8862 | (sha256 |
8863 | (base32 | |
8864 | "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb")))) | |
8865 | (build-system ant-build-system) | |
8866 | (arguments | |
8c7d32e0 | 8867 | `(#:jar-name "jnacl.jar" |
3e87923a RW |
8868 | #:source-dir "src/main/java" |
8869 | #:jdk ,icedtea-8 | |
8870 | #:phases | |
8871 | (modify-phases %standard-phases | |
8872 | (add-before 'build 'fix-tests | |
8873 | (lambda _ | |
8874 | (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java" | |
8875 | "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java") | |
8876 | (("assertions.Assertions") "assertions.api.Assertions")) | |
8877 | #t)) | |
8878 | (replace 'check | |
8879 | (lambda _ | |
8880 | (invoke "ant" "compile-tests") | |
8881 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
8882 | ":build/classes" | |
8883 | ":build/test-classes") | |
8884 | "org.testng.TestNG" "-testclass" | |
8885 | "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class") | |
8886 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
8887 | ":build/classes" | |
8888 | ":build/test-classes") | |
8889 | "org.testng.TestNG" "-testclass" | |
2c8ac364 | 8890 | "build/test-classes/com/neilalexander/jnacl/NaClTest.class")))))) |
3e87923a RW |
8891 | (native-inputs |
8892 | `(("java-testng" ,java-testng) | |
8893 | ("java-fest-util" ,java-fest-util) | |
8894 | ("java-fest-assert" ,java-fest-assert))) | |
8895 | (home-page "https://github.com/neilalexander/jnacl") | |
8896 | (synopsis "Java implementation of NaCl") | |
8897 | (description "Pure Java implementation of the NaCl: Networking and | |
1717a7de | 8898 | Cryptography library.") |
3e87923a | 8899 | (license license:bsd-2)))) |
eaf3cb7a JL |
8900 | |
8901 | (define-public java-mvel2 | |
8902 | (package | |
8903 | (name "java-mvel2") | |
8904 | (version "2.3.1") | |
8905 | (source (origin | |
8906 | (method url-fetch) | |
8907 | (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-" | |
8908 | version ".Final.tar.gz")) | |
8909 | (sha256 | |
8910 | (base32 | |
8911 | "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z")))) | |
8912 | (build-system ant-build-system) | |
8913 | (arguments | |
8914 | `(#:jar-name "mvel2.jar" | |
8915 | #:source-dir "src/main/java" | |
8916 | #:test-exclude | |
8917 | (list "**/Abstract*.java" | |
8918 | ;; Base class with no tests | |
8919 | "**/MVELThreadTest.java") | |
8920 | #:phases | |
8921 | (modify-phases %standard-phases | |
8922 | (add-after 'install 'install-bin | |
8923 | (lambda* (#:key outputs #:allow-other-keys) | |
8924 | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) | |
8925 | (mkdir-p bin) | |
8926 | (with-output-to-file (string-append bin "/mvel2") | |
8927 | (lambda _ | |
8928 | (display | |
8929 | (string-append | |
8930 | "#!" (which "bash") "\n" | |
8931 | "if [ \"$#\" -ne \"2\" ]; then\n" | |
8932 | "echo 'Usage: mvel2 <script> <out.dir>'\n" | |
8933 | "exit\n" | |
8934 | "fi\n" | |
8935 | "java -Dout.dir=$2 -cp " (getenv "CLASSPATH") | |
8936 | ":" (assoc-ref outputs "out") "/share/java/mvel2.jar" | |
8937 | " org.mvel2.sh.Main $1")))) | |
8938 | (chmod (string-append bin "/mvel2") #o755)) | |
8939 | #t))))) | |
8940 | (native-inputs | |
8941 | `(("junit" ,java-junit) | |
8942 | ("hamcrest" ,java-hamcrest-core))) | |
8943 | (home-page "https://github.com/mvel/mvel") | |
8944 | (synopsis "MVFLEX Expression Language") | |
8945 | (description "MVEL has largely been inspired by Java syntax, but has some | |
8946 | fundamental differences aimed at making it more efficient as an expression | |
8947 | language, such as operators that directly support collection, array and string | |
8948 | matching, as well as regular expressions. MVEL is used to evaluate expressions | |
8949 | written using Java syntax. | |
8950 | ||
8951 | In addition to the expression language, MVEL serves as a templating language for | |
8952 | configuration and string construction.") | |
8953 | (license license:asl2.0))) | |
d54d7d31 | 8954 | |
9e325e8c RW |
8955 | (define-public java-commons-jexl-2 |
8956 | (package | |
8957 | (name "java-commons-jexl") | |
8958 | (version "2.1.1") | |
8959 | (source (origin | |
8960 | (method url-fetch) | |
8961 | (uri (string-append "mirror://apache/commons/jexl/source/" | |
8962 | "commons-jexl-" version "-src.tar.gz")) | |
8963 | (sha256 | |
8964 | (base32 | |
8965 | "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz")))) | |
8966 | (build-system ant-build-system) | |
8967 | (arguments | |
8968 | `(#:jar-name "commons-jexl-2.jar" | |
8969 | #:jdk ,icedtea-8 | |
8970 | #:source-dir "src/main/java" | |
8971 | #:phases | |
8972 | (modify-phases %standard-phases | |
8973 | (add-before 'check 'disable-broken-tests | |
8974 | (lambda* (#:key inputs #:allow-other-keys) | |
8975 | (with-directory-excursion "src/test/java/org/apache/commons/jexl2/" | |
8976 | (substitute* "ArithmeticTest.java" | |
8977 | (("asserter.assertExpression\\(\"3 / 0\"") "//") | |
8978 | (("asserter.assertExpression\\(\"imanull") "//")) | |
8979 | ;; This test fails with "ambiguous method invocation" | |
8980 | (delete-file "CacheTest.java") | |
8981 | ;; This test doesn't have access to the temp directory | |
8982 | (substitute* "ClassCreatorTest.java" | |
8983 | (("java.io.tmpdir") "user.dir")) | |
8984 | ;; This test fails in trying to detect whether it can run. | |
8985 | (substitute* "ClassCreator.java" | |
8986 | (("boolean canRun =.*") "boolean canRun = false;\n")) | |
8987 | ;; ...and these tests depend on it. | |
8988 | (delete-file "scripting/JexlScriptEngineOptionalTest.java") | |
8989 | (delete-file "scripting/JexlScriptEngineTest.java")) | |
8990 | #t)) | |
8991 | (add-before 'build 'run-javacc | |
8992 | (lambda _ | |
8993 | (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/" | |
080d0b60 RW |
8994 | (invoke "java" "jjtree" "Parser.jjt") |
8995 | (invoke "java" "javacc" "Parser.jj")) | |
8996 | #t))))) | |
9e325e8c RW |
8997 | (inputs |
8998 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal))) | |
8999 | (native-inputs | |
9000 | `(("java-junit" ,java-junit) | |
9001 | ("java-hamcrest-core" ,java-hamcrest-core) | |
9002 | ("javacc" ,javacc-4))) | |
9003 | (home-page "https://commons.apache.org/proper/commons-jexl/") | |
9004 | (synopsis "Java Expression Language ") | |
9005 | (description "JEXL is a library intended to facilitate the implementation | |
9006 | of dynamic and scripting features in applications and frameworks written in | |
9007 | Java. JEXL implements an Expression Language based on some extensions to the | |
9008 | JSTL Expression Language supporting most of the constructs seen in | |
9009 | shell-script or ECMAScript. Its goal is to expose scripting features usable | |
9010 | by technical operatives or consultants working with enterprise platforms.") | |
9011 | (license license:asl2.0))) | |
9012 | ||
d54d7d31 JL |
9013 | (define-public java-lz4 |
9014 | (package | |
9015 | (name "java-lz4") | |
9016 | (version "1.4.0") | |
9017 | (source (origin | |
9018 | (method url-fetch) | |
9019 | (uri (string-append "https://github.com/lz4/lz4-java/archive/" | |
9020 | version ".tar.gz")) | |
9021 | (file-name (string-append name "-" version ".tar.gz")) | |
9022 | (sha256 | |
9023 | (base32 | |
9024 | "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54")))) | |
9025 | (build-system ant-build-system) | |
9026 | (arguments | |
9027 | `(#:jar-name "lz4.jar" | |
9028 | #:jdk ,icedtea-8 | |
9029 | #:source-dir "src/java:src/java-unsafe" | |
9030 | #:tests? #f; FIXME: requires more dependencies | |
9031 | #:phases | |
9032 | (modify-phases %standard-phases | |
9033 | (add-before 'configure 'generate-source | |
9034 | (lambda _ | |
9035 | (with-directory-excursion "src/build/source_templates" | |
1b6bc516 RW |
9036 | (invoke "mvel2" "../gen_sources.mvel" "../../java")) |
9037 | #t))))) | |
d54d7d31 JL |
9038 | (native-inputs |
9039 | `(("mvel" ,java-mvel2))) | |
9040 | (home-page "https://jpountz.github.io/lz4-java") | |
9041 | (synopsis "Compression algorithm") | |
9042 | (description "LZ4 - Java is a Java port of the popular lz4 compression | |
9043 | algorithms and xxHash hashing algorithm.") | |
9044 | (license license:asl2.0))) | |
62315865 | 9045 | |
50d70a72 | 9046 | (define-public java-bouncycastle |
62315865 | 9047 | (package |
50d70a72 | 9048 | (name "java-bouncycastle") |
248a9e16 | 9049 | (version "1.60") |
62315865 JL |
9050 | (source (origin |
9051 | (method url-fetch) | |
50d70a72 | 9052 | (uri (string-append "https://github.com/bcgit/bc-java/archive/r" |
248a9e16 | 9053 | (substring version 0 1) "v" |
50d70a72 | 9054 | (substring version 2 4) ".tar.gz")) |
62315865 JL |
9055 | (sha256 |
9056 | (base32 | |
248a9e16 | 9057 | "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv")) |
50d70a72 JL |
9058 | (modules '((guix build utils))) |
9059 | (snippet | |
9060 | '(begin | |
9061 | (for-each delete-file | |
9062 | (find-files "." "\\.jar$")) | |
9063 | #t)))) | |
62315865 JL |
9064 | (build-system ant-build-system) |
9065 | (arguments | |
50d70a72 | 9066 | `(#:jdk ,icedtea-8 |
0c68f7fd | 9067 | #:tests? #f |
62315865 JL |
9068 | #:phases |
9069 | (modify-phases %standard-phases | |
50d70a72 | 9070 | (replace 'build |
62315865 | 9071 | (lambda _ |
50d70a72 | 9072 | (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider") |
2c8ac364 | 9073 | (invoke "ant" "-f" "ant/jdk15+.xml" "build"))) |
0c68f7fd RW |
9074 | ;; FIXME: the tests freeze. |
9075 | ;; (replace 'check | |
9076 | ;; (lambda _ | |
9077 | ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test"))) | |
50d70a72 JL |
9078 | (replace 'install |
9079 | (install-jars "build/artifacts/jdk1.5/jars"))))) | |
9080 | (inputs | |
9081 | `(("java-javax-mail" ,java-javax-mail))) | |
31208367 JL |
9082 | (native-inputs |
9083 | `(("unzip" ,unzip) | |
50d70a72 JL |
9084 | ("junit" ,java-junit) |
9085 | ("java-native-access" ,java-native-access) | |
9086 | ("java-native-access-platform" ,java-native-access-platform))) | |
31208367 JL |
9087 | (home-page "https://www.bouncycastle.org") |
9088 | (synopsis "Cryptographic library") | |
50d70a72 JL |
9089 | (description "Bouncy Castle is a cryptographic library for the Java |
9090 | programming language.") | |
31208367 | 9091 | (license license:expat))) |
a53d9ac0 JL |
9092 | |
9093 | (define-public java-lmax-disruptor | |
9094 | (package | |
9095 | (name "java-lmax-disruptor") | |
9096 | (version "3.3.7") | |
9097 | (source (origin | |
9098 | (method url-fetch) | |
9099 | (uri (string-append "https://github.com/LMAX-Exchange/disruptor/" | |
9100 | "archive/" version ".tar.gz")) | |
9101 | (file-name (string-append name "-" version ".tar.gz")) | |
9102 | (sha256 | |
9103 | (base32 | |
9104 | "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g")))) | |
9105 | (build-system ant-build-system) | |
9106 | (arguments | |
9107 | `(#:jar-name "java-lmax-disruptor.jar" | |
9108 | #:jdk ,icedtea-8 | |
9109 | #:tests? #f)); tests hang | |
9110 | (inputs | |
9111 | `(("junit" ,java-junit) | |
9112 | ("java-hdrhistogram" ,java-hdrhistogram) | |
9113 | ("java-jmock" ,java-jmock) | |
9114 | ("java-jmock-legacy" ,java-jmock-legacy) | |
9115 | ("java-jmock-junit4" ,java-jmock-junit4) | |
9116 | ("java-hamcrest-all" ,java-hamcrest-all))) | |
9117 | (native-inputs | |
9118 | `(("cglib" ,java-cglib) | |
9119 | ("objenesis" ,java-objenesis) | |
9120 | ("asm" ,java-asm))) | |
9121 | (home-page "https://www.lmax.com/disruptor") | |
9122 | (synopsis "High performance inter-thread communication") | |
9123 | (description "LMAX Disruptor is a software pattern and software component | |
9124 | for high performance inter-thread communication that avoids the need for | |
9125 | message queues or resource locking.") | |
9126 | (license license:asl2.0))) | |
5619556b | 9127 | |
5e3abfc8 RW |
9128 | (define-public java-commons-bcel |
9129 | (package | |
9130 | (name "java-commons-bcel") | |
9131 | (version "6.1") | |
9132 | (source (origin | |
9133 | (method url-fetch) | |
9134 | (uri (string-append "mirror://apache/commons/bcel/source/bcel-" | |
9135 | version "-src.tar.gz")) | |
9136 | (sha256 | |
9137 | (base32 | |
9138 | "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy")))) | |
9139 | (build-system ant-build-system) | |
9140 | (arguments | |
9141 | `(#:jar-name "bcel.jar" | |
9142 | #:jdk ,icedtea-8 | |
9143 | #:source-dir "src/main/java" | |
9144 | #:test-dir "src/test/java" | |
9145 | ;; FIXME: Tests require the unpackaged jna. | |
9146 | #:tests? #f)) | |
9147 | (home-page "https://commons.apache.org/proper/commons-bcel/") | |
9148 | (synopsis "Byte code engineering library") | |
9149 | (description "The Byte Code Engineering Library (Apache Commons BCEL) is | |
9150 | intended to give users a convenient way to analyze, create, and | |
9151 | manipulate (binary) Java class files. Classes are represented by objects | |
9152 | which contain all the symbolic information of the given class: methods, fields | |
9153 | and byte code instructions, in particular. | |
9154 | ||
9155 | Such objects can be read from an existing file, be transformed by a | |
9156 | program (e.g. a class loader at run-time) and written to a file again. An | |
9157 | even more interesting application is the creation of classes from scratch at | |
9158 | run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful | |
9159 | if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format | |
9160 | of Java @code{.class} files.") | |
9161 | (license license:asl2.0))) | |
9162 | ||
5619556b JL |
9163 | (define-public java-xerial-core |
9164 | (package | |
9165 | (name "java-xerial-core") | |
9166 | (version "2.1") | |
9167 | (source (origin | |
9168 | (method url-fetch) | |
9169 | (uri (string-append "https://github.com/xerial/xerial-java/archive/" | |
9170 | version ".tar.gz")) | |
9171 | (file-name (string-append name "-" version ".tar.gz")) | |
9172 | (sha256 | |
9173 | (base32 | |
9174 | "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d")))) | |
9175 | (build-system ant-build-system) | |
9176 | (arguments | |
9177 | `(#:jar-name "xerial-core.jar" | |
9178 | #:source-dir "xerial-core/src/main/java" | |
9179 | #:test-dir "xerial-core/src/test" | |
9180 | #:phases | |
9181 | (modify-phases %standard-phases | |
9182 | (add-before 'build 'copy-resources | |
9183 | (lambda _ | |
9184 | (copy-recursively "xerial-core/src/main/resources" | |
9185 | "build/classes") | |
9186 | #t))))) | |
9187 | (native-inputs | |
9188 | `(("junit" ,java-junit) | |
9189 | ("hamcrest" ,java-hamcrest-core))) | |
9190 | (home-page "https://github.com/xerial/xerial-java") | |
f4548394 | 9191 | (synopsis "Data management libraries for Java") |
5619556b | 9192 | (description "Xerial is a set of data management libraries for the Java |
f4548394 | 9193 | programming language. The ultimate goal of the Xerial project is to manage |
5619556b JL |
9194 | everything as database, including class objects, text format data, data |
9195 | streams, etc.") | |
9196 | (license license:asl2.0))) | |
8d6a4815 JL |
9197 | |
9198 | (define-public java-powermock-reflect | |
9199 | (package | |
9200 | (name "java-powermock-reflect") | |
9201 | (version "1.7.3") | |
9202 | (source (origin | |
9203 | (method url-fetch) | |
9204 | (uri (string-append "https://github.com/powermock/powermock/" | |
9205 | "archive/powermock-" version ".tar.gz")) | |
9206 | (file-name (string-append name "-" version ".tar.gz")) | |
9207 | (sha256 | |
9208 | (base32 | |
9209 | "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy")) | |
9210 | (patches | |
9211 | (search-patches "java-powermock-fix-java-files.patch")))) | |
9212 | (build-system ant-build-system) | |
9213 | (arguments | |
9214 | `(#:jar-name "java-powermock-reflect.jar" | |
9215 | #:jdk ,icedtea-8 | |
9216 | #:source-dir "powermock-reflect/src/main/java" | |
9217 | #:test-dir "powermock-reflect/src/test")) | |
9218 | (inputs | |
9219 | `(("java-objenesis" ,java-objenesis))) | |
9220 | (native-inputs | |
9221 | `(("junit" ,java-junit) | |
9222 | ("cglib" ,java-cglib) | |
9223 | ("asm" ,java-asm) | |
9224 | ("hamcrest" ,java-hamcrest-core) | |
9225 | ("assertj" ,java-assertj))) | |
9226 | (home-page "https://github.com/powermock/powermock") | |
9227 | (synopsis "Mock library extension framework") | |
9228 | (description "PowerMock is a framework that extends other mock libraries | |
9229 | such as EasyMock with more powerful capabilities. PowerMock uses a custom | |
9230 | classloader and bytecode manipulation to enable mocking of static methods, | |
9231 | constructors, final classes and methods, private methods, removal of static | |
9232 | initializers and more. By using a custom classloader no changes need to be | |
9233 | done to the IDE or continuous integration servers which simplifies adoption.") | |
9234 | (license license:asl2.0))) | |
d4a4d5da JL |
9235 | |
9236 | (define-public java-powermock-core | |
9237 | (package | |
9238 | (inherit java-powermock-reflect) | |
9239 | (name "java-powermock-core") | |
9240 | (arguments | |
9241 | `(#:jar-name "java-powermock-core.jar" | |
9242 | #:source-dir "powermock-core/src/main/java" | |
9243 | #:test-dir "powermock-core/src/test" | |
9244 | #:tests? #f; requires powermock-api | |
59e0021c JL |
9245 | #:jdk ,icedtea-8 |
9246 | #:phases | |
9247 | (modify-phases %standard-phases | |
9248 | (add-before 'build 'copy-resources | |
9249 | (lambda _ | |
9250 | (copy-recursively "powermock-core/src/main/resources" | |
2c8ac364 MW |
9251 | "build/classes") |
9252 | #t))))) | |
d4a4d5da JL |
9253 | (inputs |
9254 | `(("reflect" ,java-powermock-reflect) | |
9255 | ("javassist" ,java-jboss-javassist))) | |
9256 | (native-inputs | |
9257 | `(("junit" ,java-junit) | |
9258 | ("assertj" ,java-assertj) | |
9259 | ("mockito" ,java-mockito-1))))) | |
2d5d65d7 JL |
9260 | |
9261 | (define-public java-powermock-api-support | |
9262 | (package | |
9263 | (inherit java-powermock-reflect) | |
9264 | (name "java-powermock-api-support") | |
9265 | (build-system ant-build-system) | |
9266 | (arguments | |
9267 | `(#:jar-name "java-powermock-api-support.jar" | |
9268 | #:jdk ,icedtea-8 | |
9269 | #:source-dir "powermock-api/powermock-api-support/src/main/java" | |
9270 | #:tests? #f)); no tests | |
9271 | (inputs | |
9272 | `(("core" ,java-powermock-core) | |
9273 | ("reflect" ,java-powermock-reflect))))) | |
6c21d46c JL |
9274 | |
9275 | (define-public java-powermock-modules-junit4-common | |
9276 | (package | |
9277 | (inherit java-powermock-reflect) | |
9278 | (name "java-powermock-modules-junit4-common") | |
9279 | (build-system ant-build-system) | |
9280 | (arguments | |
9281 | `(#:jar-name "java-powermock-modules-junit4-common.jar" | |
9282 | #:jdk ,icedtea-8 | |
9283 | #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java" | |
9284 | #:test-dir "powermock-modules/powermock-module-junit4-common/src/test")) | |
9285 | (inputs | |
9286 | `(("core" ,java-powermock-core) | |
9287 | ("easymock" ,java-easymock) | |
9288 | ("reflect" ,java-powermock-reflect) | |
9289 | ("hamcrest" ,java-hamcrest-core) | |
9290 | ("cglib" ,java-cglib))))) | |
33db1681 JL |
9291 | |
9292 | (define-public java-powermock-modules-junit4 | |
9293 | (package | |
9294 | (inherit java-powermock-reflect) | |
9295 | (name "java-powermock-modules-junit4") | |
9296 | (build-system ant-build-system) | |
9297 | (arguments | |
9298 | `(#:jar-name "java-powermock-modules-junit4.jar" | |
9299 | #:jdk ,icedtea-8 | |
9300 | #:source-dir "powermock-modules/powermock-module-junit4/src/main/java" | |
1124683d JL |
9301 | #:test-dir "powermock-modules/powermock-module-junit4/src/test" |
9302 | #:phases | |
9303 | (modify-phases %standard-phases | |
9304 | (add-before 'build 'fix-junit-detection | |
9305 | (lambda _ | |
9306 | ;; Our junit version is 4.12-SNAPSHOT | |
9307 | (substitute* (find-files "powermock-modules/powermock-module-junit4" | |
9308 | "PowerMockJUnit4MethodValidator.java") | |
2c8ac364 MW |
9309 | (("4.12") "4.12-SNAPSHOT")) |
9310 | #t))))) | |
33db1681 JL |
9311 | (inputs |
9312 | `(("core" ,java-powermock-core) | |
9313 | ("reflect" ,java-powermock-reflect) | |
9314 | ("common" ,java-powermock-modules-junit4-common) | |
9315 | ("cglib" ,java-cglib))) | |
9316 | (native-inputs | |
9317 | `(("easymock" ,java-easymock) | |
9318 | ("hamcrest" ,java-hamcrest-core) | |
9319 | ("objenesis" ,java-objenesis) | |
9320 | ("asm" ,java-asm) | |
9321 | ("junit" ,java-junit))))) | |
4d508975 JL |
9322 | |
9323 | (define-public java-powermock-api-easymock | |
9324 | (package | |
9325 | (inherit java-powermock-reflect) | |
9326 | (name "java-powermock-api-easymock") | |
9327 | (build-system ant-build-system) | |
9328 | (arguments | |
9329 | `(#:jar-name "java-powermock-api-easymock.jar" | |
9330 | #:jdk ,icedtea-8 | |
9331 | #:source-dir "powermock-api/powermock-api-easymock/src/main/java" | |
9332 | #:tests? #f; no tests | |
9333 | #:phases | |
9334 | (modify-phases %standard-phases | |
9335 | (add-before 'build 'fix-file | |
9336 | (lambda _ | |
9337 | ;; FIXME: This looks wrong, but it fixes a build error. | |
9338 | (with-directory-excursion "powermock-api/powermock-api-easymock" | |
9339 | (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java" | |
9340 | (("classLoader instanceof MockClassLoader") "false") | |
9341 | (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";"))) | |
9342 | #t))))) | |
9343 | (inputs | |
9344 | `(("core" ,java-powermock-core) | |
9345 | ("easymock" ,java-easymock) | |
9346 | ("reflect" ,java-powermock-reflect) | |
9347 | ("support" ,java-powermock-api-support) | |
9348 | ("cglib" ,java-cglib))))) | |
5fb3e822 JL |
9349 | |
9350 | (define-public java-jboss-jms-api-spec | |
9351 | (package | |
9352 | (name "java-jboss-jms-api-spec") | |
9353 | (version "2.0") | |
9354 | (source (origin | |
9355 | (method url-fetch) | |
9356 | (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/" | |
9357 | "archive/jboss-jms-api_" version | |
9358 | "_spec-1.0.1.Final.tar.gz")) | |
9359 | (sha256 | |
9360 | (base32 | |
9361 | "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m")))) | |
9362 | (build-system ant-build-system) | |
9363 | (arguments | |
9364 | `(#:jar-name "java-jboss-jms-api_spec.jar" | |
9365 | #:jdk ,icedtea-8 | |
9366 | #:source-dir "." | |
9367 | #:tests? #f)); no tests | |
9368 | (home-page "https://github.com/jboss/jboss-jms-api_spec") | |
9369 | (synopsis "Java Message Service API specification") | |
9370 | (description "Java Message Service (JMS) API is used to send messages | |
9371 | messages between two or more clients. It is a messaging standard that allows | |
9372 | application components to create, send, receive, and read messages.") | |
9373 | ; either gpl2 only with GPL Classpath Exception, or cddl. | |
9374 | (license (list license:gpl2 license:cddl1.0)))) | |
3ff47c66 JL |
9375 | |
9376 | (define-public java-mail | |
9377 | (package | |
9378 | (name "java-mail") | |
9379 | (version "1.6.0") | |
9380 | (source (origin | |
9381 | (method url-fetch) | |
9382 | (uri (string-append "https://github.com/javaee/javamail/archive/" | |
9383 | "JAVAMAIL-1_6_0.tar.gz")) | |
9384 | (sha256 | |
9385 | (base32 | |
9386 | "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92")))) | |
9387 | (build-system ant-build-system) | |
9388 | (arguments | |
9389 | `(#:jar-name "java-mail.jar" | |
9390 | #:jdk ,icedtea-8 | |
9391 | #:source-dir "mail/src/main/java" | |
9392 | #:test-dir "mail/src/test" | |
9393 | #:test-exclude | |
9394 | (list "**/CollectorFormatterTest.java" | |
9395 | "**/CompactFormatterTest.java" | |
9396 | "**/DurationFilterTest.java" | |
9397 | "**/MailHandlerTest.java" | |
9398 | "**/GetLocalAddressTest.java" | |
9399 | ;; FIXME: both end with: | |
9400 | ;; java.lang.ClassNotFoundException: | |
9401 | ;; javax.mail.internet.MimeMultipartParseTest | |
9402 | "**/MimeMultipartParseTest.java" | |
9403 | "**/SearchTermSerializationTest.java") | |
9404 | #:phases | |
9405 | (modify-phases %standard-phases | |
9406 | (add-before 'configure 'move-version.java | |
9407 | (lambda _ | |
9408 | (copy-file "mail/src/main/resources/javax/mail/Version.java" | |
218d1dde RW |
9409 | "mail/src/main/java/javax/mail/Version.java") |
9410 | #t)) | |
3ff47c66 JL |
9411 | (add-before 'build 'copy-resources |
9412 | (lambda _ | |
9413 | (copy-recursively "mail/src/main/resources/META-INF" | |
9414 | "build/classes/META-INF") | |
9415 | #t))))) | |
9416 | (native-inputs | |
9417 | `(("junit" ,java-junit) | |
9418 | ("hamcrest" ,java-hamcrest-core))) | |
9419 | (home-page "https://javaee.github.io/javamail/") | |
9420 | (synopsis "Mail-related functionnalities in Java") | |
9421 | (description "The JavaMail API provides a platform-independent and | |
9422 | protocol-independent framework to build mail and messaging applications.") | |
9423 | ;; General Public License Version 2 only ("GPL") or the Common Development | |
9424 | ;; and Distribution License("CDDL") | |
9425 | (license (list license:cddl1.1 | |
9426 | license:gpl2)))); with classpath exception | |
217b20e4 JL |
9427 | |
9428 | (define-public java-jeromq | |
9429 | (package | |
9430 | (name "java-jeromq") | |
4aa0a1df | 9431 | (version "0.4.3") |
217b20e4 | 9432 | (source (origin |
4aa0a1df RW |
9433 | (method git-fetch) |
9434 | (uri (git-reference | |
9435 | (url "https://github.com/zeromq/jeromq.git") | |
9436 | (commit (string-append "v" version)))) | |
9437 | (file-name (string-append name "-" version "-checkout")) | |
217b20e4 JL |
9438 | (sha256 |
9439 | (base32 | |
594bd3a0 GB |
9440 | "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj")) |
9441 | (patches (search-patches "java-jeromq-fix-tests.patch")))) | |
217b20e4 JL |
9442 | (build-system ant-build-system) |
9443 | (arguments | |
9444 | `(#:jar-name "java-jeromq.jar" | |
9445 | #:source-dir "src/main/java" | |
9446 | #:jdk ,icedtea-8 | |
9447 | #:test-exclude | |
9448 | (list | |
9449 | "**/Abstract*.java" | |
9450 | ;; Requires network | |
9451 | "**/ZBeaconTest.java" | |
9452 | ;; Failures | |
4aa0a1df | 9453 | "**/DealerSpecTest.java" |
217b20e4 | 9454 | "**/CustomDecoderTest.java" |
594bd3a0 GB |
9455 | "**/CustomEncoderTest.java" |
9456 | "**/ConnectRidTest.java" | |
9457 | "**/ReqSpecTest.java" | |
9458 | "**/PushPullSpecTest.java" | |
9459 | "**/PubSubHwmTest.java" | |
9460 | "**/RouterSpecTest.java" | |
9461 | "**/ProxyTest.java"))) | |
217b20e4 JL |
9462 | (inputs |
9463 | `(("java-jnacl" ,java-jnacl))) | |
9464 | (native-inputs | |
9465 | `(("java-hamcrest-core" ,java-hamcrest-core) | |
9466 | ("junit" ,java-junit))) | |
9467 | (home-page "http://zeromq.org/bindings:java") | |
9468 | (synopsis "Java binding for 0MQ") | |
9469 | (description "Jeromq provides the java bindings for 0MQ.") | |
9470 | (license license:mpl2.0))) | |
46c6905a JL |
9471 | |
9472 | (define-public java-kafka-clients | |
9473 | (package | |
9474 | (name "java-kafka-clients") | |
9475 | (version "1.0.0") | |
9476 | (source (origin | |
9477 | (method url-fetch) | |
9478 | (uri (string-append "mirror://apache/kafka/" version "/kafka-" | |
9479 | version "-src.tgz")) | |
9480 | (sha256 | |
9481 | (base32 | |
9482 | "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq")))) | |
9483 | (build-system ant-build-system) | |
9484 | (arguments | |
9485 | `(#:jar-name "java-kafka-clients.jar" | |
9486 | #:jdk ,icedtea-8 | |
9487 | #:source-dir "clients/src/main/java" | |
9488 | #:test-dir "clients/src/test" | |
9489 | #:test-exclude | |
9490 | (list | |
9491 | ;; This file does not contain a class | |
9492 | "**/IntegrationTest.java" | |
9493 | ;; Requires network | |
9494 | "**/ClientUtilsTest.java" | |
9495 | ;; End with errors that seem related to our powermock | |
9496 | "**/KafkaProducerTest.java" | |
9497 | "**/BufferPoolTest.java"))) | |
9498 | (inputs | |
9499 | `(("java-slf4j-api" ,java-slf4j-api) | |
9500 | ("java-lz4" ,java-lz4))) | |
9501 | (native-inputs | |
9502 | `(("junit" ,java-junit) | |
9503 | ("hamcrest" ,java-hamcrest-all) | |
9504 | ("objenesis" ,java-objenesis) | |
9505 | ("asm" ,java-asm) | |
9506 | ("cglib" ,java-cglib) | |
9507 | ("javassist" ,java-jboss-javassist) | |
9508 | ("snappy" ,java-snappy) | |
9509 | ("easymock" ,java-easymock) | |
9510 | ("powermock" ,java-powermock-core) | |
9511 | ("powermock-easymock" ,java-powermock-api-easymock) | |
9512 | ("powermock-junit4-common" ,java-powermock-modules-junit4-common) | |
9513 | ("powermock-junit4" ,java-powermock-modules-junit4) | |
9514 | ("powermock-support" ,java-powermock-api-support) | |
50d70a72 | 9515 | ("java-bouncycastle" ,java-bouncycastle))) |
46c6905a JL |
9516 | (home-page "https://kafka.apache.org") |
9517 | (synopsis "Distributed streaming platform") | |
9518 | (description "Kafka is a distributed streaming platform, which means: | |
9519 | @itemize | |
9520 | @item it can publish and subscribe to streams of records; | |
9521 | @item it can store streams of records in a fault-tolerant way; | |
9522 | @item it can process streams of records as they occur. | |
9523 | @end itemize") | |
9524 | ;; Either cddl or gpl2 only. | |
9525 | (license (list license:cddl1.1; actually cddl1.1 | |
9526 | license:gpl2)))); with classpath exception | |
0b54e190 JL |
9527 | |
9528 | (define-public java-jdom | |
9529 | (package | |
9530 | (name "java-jdom") | |
9531 | (version "1.1.3") | |
9532 | (source (origin | |
9533 | (method url-fetch) | |
9534 | (uri (string-append "http://jdom.org/dist/binary/archive/jdom-" | |
9535 | version ".tar.gz")) | |
9536 | (sha256 | |
9537 | (base32 | |
9538 | "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl")))) | |
9539 | (build-system ant-build-system) | |
9540 | (arguments | |
9541 | `(#:build-target "package" | |
9542 | #:tests? #f; tests are run as part of the build process | |
9543 | #:phases | |
9544 | (modify-phases %standard-phases | |
9545 | (replace 'install | |
9546 | (install-jars "build"))))) | |
9547 | (home-page "http://jdom.org/") | |
9548 | (synopsis "Access, manipulate, and output XML data") | |
9549 | (description "Java-based solution for accessing, manipulating, and | |
9550 | outputting XML data from Java code.") | |
9551 | (license license:bsd-4))) | |
78745d33 JL |
9552 | |
9553 | (define-public java-geronimo-xbean-reflect | |
9554 | (package | |
9555 | (name "java-geronimo-xbean-reflect") | |
9556 | (version "4.5") | |
9557 | (source (origin | |
9558 | (method svn-fetch) | |
9559 | (uri (svn-reference | |
9560 | (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/") | |
9561 | (revision 1807396))) | |
9562 | (file-name (string-append name "-" version)) | |
9563 | (sha256 | |
9564 | (base32 | |
9565 | "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja")))) | |
9566 | (build-system ant-build-system) | |
9567 | (arguments | |
9568 | `(#:jar-name "geronimo-xbean-reflect.jar" | |
9569 | #:source-dir "xbean-reflect/src/main/java" | |
9570 | #:test-dir "xbean-reflect/src/test" | |
9571 | #:jdk ,icedtea-8 | |
9572 | #:test-exclude | |
9573 | (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java" | |
9574 | "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java" | |
9575 | "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java") | |
9576 | #:phases | |
9577 | (modify-phases %standard-phases | |
9578 | (add-before 'build 'fix-source | |
9579 | (lambda _ | |
9580 | (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/")) | |
9581 | ;; org.apache.xbean.asm6 is actually repackaged java-asm | |
9582 | (substitute* (string-append dir "XbeanAsmParameterNameLoader.java") | |
9583 | (("org.apache.xbean.asm5") "org.objectweb.asm")) | |
9584 | #t)))))) | |
9585 | (inputs | |
9586 | `(("asm" ,java-asm) | |
9587 | ("log4j" ,java-log4j-api) | |
9588 | ("log4j-1.2" ,java-log4j-1.2-api) | |
9589 | ("log4j-core" ,java-log4j-core) | |
9590 | ("logging" ,java-commons-logging-minimal))) | |
9591 | (native-inputs | |
9592 | `(("junit" ,java-junit))) | |
9593 | (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/") | |
9594 | (synopsis "Dependency injection helper") | |
9595 | (description "Xbean-reflect provides very flexible ways to create objects | |
9596 | and graphs of objects for dependency injection frameworks") | |
9597 | (license license:asl2.0))) | |
09c44196 | 9598 | |
3fda539b JL |
9599 | (define-public java-geronimo-xbean-bundleutils |
9600 | (package | |
9601 | (inherit java-geronimo-xbean-reflect) | |
9602 | (name "java-geronimo-xbean-bundleutils") | |
9603 | (arguments | |
9604 | `(#:jar-name "geronimo-xbean-bundleutils.jar" | |
9605 | #:source-dir "xbean-bundleutils/src/main/java" | |
9606 | #:test-dir "xbean-bundleutils/src/test" | |
9607 | #:phases | |
9608 | (modify-phases %standard-phases | |
9609 | (add-before 'build 'fix-java | |
9610 | (lambda _ | |
9611 | ;; We use a more recent version of osgi, so this file requires | |
9612 | ;; more interface method implementations. | |
9613 | (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java" | |
9614 | (("import org.osgi.framework.ServiceRegistration;") | |
9615 | "import org.osgi.framework.ServiceRegistration; | |
9616 | import org.osgi.framework.ServiceFactory; | |
9617 | import java.util.Collection; | |
9618 | import org.osgi.framework.ServiceObjects;") | |
9619 | (("public Bundle getBundle\\(\\)") | |
9620 | "@Override | |
9621 | public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) { | |
9622 | throw new UnsupportedOperationException(); | |
9623 | } | |
9624 | @Override | |
9625 | public <S> ServiceRegistration<S> registerService(Class<S> clazz, | |
9626 | ServiceFactory<S> factory, Dictionary<String, ?> properties) { | |
9627 | throw new UnsupportedOperationException(); | |
9628 | } | |
9629 | public Bundle getBundle()")) | |
9630 | #t))))) | |
9631 | (inputs | |
9632 | `(("java-slf4j" ,java-slf4j-api) | |
9633 | ("java-asm" ,java-asm) | |
9634 | ("java-osgi-framework" ,java-osgi-framework) | |
9635 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
9636 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin))))) | |
0cb9ce32 JL |
9637 | |
9638 | (define-public java-geronimo-xbean-asm-util | |
9639 | (package | |
9640 | (inherit java-geronimo-xbean-reflect) | |
9641 | (name "java-geronimo-xbean-asm-util") | |
9642 | (arguments | |
9643 | `(#:jar-name "geronimo-xbean-asm-util.jar" | |
9644 | #:source-dir "xbean-asm-util/src/main/java" | |
9645 | #:tests? #f)); no tests | |
9646 | (inputs | |
9647 | `(("java-asm" ,java-asm))) | |
9648 | (native-inputs '()))) | |
8d510f65 JL |
9649 | |
9650 | (define-public java-geronimo-xbean-finder | |
9651 | (package | |
9652 | (inherit java-geronimo-xbean-reflect) | |
9653 | (name "java-geronimo-xbean-finder") | |
9654 | (arguments | |
9655 | `(#:jar-name "geronimo-xbean-finder.jar" | |
9656 | #:source-dir "xbean-finder/src/main/java" | |
9657 | #:test-dir "xbean-finder/src/test")) | |
9658 | (inputs | |
9659 | `(("java-slf4j-api" ,java-slf4j-api) | |
9660 | ("java-asm" ,java-asm) | |
9661 | ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils) | |
9662 | ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util) | |
9663 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin) | |
9664 | ("java-osgi-framework" ,java-osgi-framework))) | |
9665 | (native-inputs | |
9666 | `(("java-junit" ,java-junit) | |
9667 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
3fda539b | 9668 | |
09c44196 JL |
9669 | (define-public java-gson |
9670 | (package | |
9671 | (name "java-gson") | |
9672 | (version "2.8.2") | |
9673 | (source (origin | |
9674 | (method url-fetch) | |
9675 | (uri (string-append "https://github.com/google/gson/archive/" | |
9676 | "gson-parent-" version ".tar.gz")) | |
9677 | (sha256 | |
9678 | (base32 | |
9679 | "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9")))) | |
9680 | (build-system ant-build-system) | |
9681 | (arguments | |
9682 | `(#:jar-name "gson.jar" | |
9683 | #:source-dir "gson/src/main/java" | |
9684 | #:test-dir "gson/src/test")) | |
9685 | (native-inputs | |
9686 | `(("java-junit" ,java-junit) | |
9687 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
9688 | (home-page "https://github.com/google/gson") | |
9689 | (synopsis "Java serialization/deserialization library from/to JSON") | |
9690 | (description "Gson is a Java library that can be used to convert Java | |
9691 | Objects into their JSON representation. It can also be used to convert a JSON | |
9692 | string to an equivalent Java object. Gson can work with arbitrary Java objects | |
9693 | including pre-existing objects that you do not have source-code of.") | |
9694 | (license license:asl2.0))) | |
335aa20b JL |
9695 | |
9696 | (define-public java-hawtjni | |
9697 | (package | |
9698 | (name "java-hawtjni") | |
9699 | (version "1.15") | |
9700 | (source (origin | |
9701 | (method url-fetch) | |
9702 | (uri (string-append "https://github.com/fusesource/hawtjni/archive/" | |
9703 | "hawtjni-project-" version ".tar.gz")) | |
9704 | (sha256 | |
9705 | (base32 | |
9706 | "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g")))) | |
9707 | (build-system ant-build-system) | |
9708 | (arguments | |
9709 | `(#:jar-name "hawtjni.jar" | |
9710 | #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java" | |
9711 | #:tests? #f; no tests | |
9712 | #:phases | |
9713 | (modify-phases %standard-phases | |
9714 | (add-before 'build 'build-native | |
9715 | (lambda* (#:key inputs #:allow-other-keys) | |
6338ea9a RW |
9716 | (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))) |
9717 | (with-directory-excursion "hawtjni-generator/src/main/resources/" | |
9718 | (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o" | |
9719 | "-fPIC" "-O2" include) | |
9720 | (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o" | |
9721 | "-fPIC" "-O2" include) | |
9722 | (invoke "gcc" "-o" "libhawtjni.so" "-shared" | |
9723 | "hawtjni.o" "hawtjni-callback.o"))) | |
9724 | #t)) | |
335aa20b JL |
9725 | (add-after 'install 'install-native |
9726 | (lambda* (#:key outputs #:allow-other-keys) | |
9727 | (let* ((out (assoc-ref outputs "out")) | |
9728 | (lib (string-append out "/lib")) | |
9729 | (inc (string-append out "/include"))) | |
335aa20b | 9730 | (with-directory-excursion "hawtjni-generator/src/main/resources/" |
6338ea9a RW |
9731 | (install-file "libhawtjni.so" lib) |
9732 | (install-file "hawtjni.h" inc))) | |
335aa20b JL |
9733 | #t))))) |
9734 | (inputs | |
9735 | `(("java-commons-cli" ,java-commons-cli) | |
9736 | ("java-asm" ,java-asm) | |
9737 | ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder))) | |
9738 | (home-page "https://fusesource.github.io/hawtjni/") | |
9739 | (synopsis "JNI code generator") | |
9740 | (description "HawtJNI is a code generator that produces the JNI code needed | |
9741 | to implement Java native methods. It is based on the jnigen code generator | |
9742 | that is part of the SWT Tools project.") | |
9743 | (license license:asl2.0))) | |
d0c62afa JL |
9744 | |
9745 | (define-public java-jansi-native | |
9746 | (package | |
9747 | (name "java-jansi-native") | |
9748 | (version "1.7") | |
9749 | (source (origin | |
9750 | (method url-fetch) | |
9751 | (uri (string-append "https://github.com/fusesource/jansi-native/" | |
9752 | "archive/jansi-native-" version ".tar.gz")) | |
9753 | (sha256 | |
9754 | (base32 | |
9755 | "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf")))) | |
9756 | (build-system ant-build-system) | |
9757 | (arguments | |
9758 | `(#:jar-name "jansi-native.jar" | |
9759 | #:source-dir "src/main/java" | |
9760 | #:tests? #f; no tests | |
9761 | #:phases | |
9762 | (modify-phases %standard-phases | |
9763 | (add-before 'build 'build-native | |
9764 | (lambda* (#:key inputs #:allow-other-keys) | |
9765 | ;; there are more required files for windows in windows/ | |
9766 | (with-directory-excursion "src/main/native-package/src" | |
9767 | (substitute* "jansi_ttyname.c" | |
9768 | (("#include \"jansi_.*") "")) | |
e85c1bf6 RW |
9769 | (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o" |
9770 | (string-append "-I" (assoc-ref inputs "java-hawtjni") | |
9771 | "/include") | |
9772 | (string-append "-I" (assoc-ref inputs "jdk") | |
9773 | "/include/linux") | |
9774 | "-fPIC" "-O2") | |
2c8ac364 | 9775 | (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")))) |
d0c62afa JL |
9776 | (add-before 'build 'install-native |
9777 | (lambda _ | |
9778 | (let ((dir (string-append "build/classes/META-INF/native/" | |
9779 | ,(match (%current-system) | |
9780 | ((or "i686-linux" "armhf-linux") | |
9781 | "linux32") | |
3c4103c8 LC |
9782 | ((or "x86_64-linux" "aarch64-linux" |
9783 | "mips64el-linux") | |
d0c62afa JL |
9784 | "linux64"))))) |
9785 | (install-file "src/main/native-package/src/libjansi.so" dir)) | |
9786 | #t)) | |
9787 | (add-after 'install 'install-native | |
9788 | (lambda* (#:key outputs #:allow-other-keys) | |
d0c62afa JL |
9789 | (install-file "src/main/native-package/src/jansi.h" |
9790 | (string-append (assoc-ref outputs "out") "/include")) | |
9791 | #t))))) | |
9792 | (inputs | |
9793 | `(("java-hawtjni" ,java-hawtjni))) | |
9794 | (home-page "https://fusesource.github.io/jansi/") | |
9795 | (synopsis "Native library for jansi") | |
3d6925ef RW |
9796 | (description "This package provides the native library for jansi, a small |
9797 | Java library that allows you to use ANSI escape sequences to format your | |
9798 | console output.") | |
d0c62afa | 9799 | (license license:asl2.0))) |
a87ea1ad JL |
9800 | |
9801 | (define-public java-jansi | |
9802 | (package | |
9803 | (name "java-jansi") | |
9804 | (version "1.16") | |
9805 | (source (origin | |
9806 | (method url-fetch) | |
9807 | (uri (string-append "https://github.com/fusesource/jansi/archive/" | |
9808 | "jansi-project-" version ".tar.gz")) | |
9809 | (sha256 | |
9810 | (base32 | |
9811 | "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z")))) | |
9812 | (build-system ant-build-system) | |
9813 | (arguments | |
9814 | `(#:jar-name "jansi.jar" | |
9815 | #:source-dir "jansi/src/main/java" | |
9816 | #:test-dir "jansi/src/test" | |
9817 | #:phases | |
9818 | (modify-phases %standard-phases | |
9819 | (add-after 'check 'clear-term | |
9820 | (lambda _ | |
2c8ac364 | 9821 | (invoke "echo" "-e" "\\e[0m")))))) |
a87ea1ad JL |
9822 | (inputs |
9823 | `(("java-jansi-native" ,java-jansi-native))) | |
9824 | (native-inputs | |
9825 | `(("java-junit" ,java-junit) | |
9826 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
9827 | (home-page "https://fusesource.github.io/jansi/") | |
9828 | (synopsis "Portable ANSI escape sequences") | |
9829 | (description "Jansi is a Java library that allows you to use ANSI escape | |
9830 | sequences to format your console output which works on every platform.") | |
9831 | (license license:asl2.0))) | |
cc061329 JL |
9832 | |
9833 | (define-public java-jboss-el-api-spec | |
9834 | (package | |
9835 | (name "java-jboss-el-api-spec") | |
9836 | (version "3.0") | |
9837 | (source (origin | |
9838 | (method url-fetch) | |
9839 | (uri (string-append "https://github.com/jboss/jboss-el-api_spec/" | |
9840 | "archive/jboss-el-api_" version | |
9841 | "_spec-1.0.7.Final.tar.gz")) | |
9842 | (sha256 | |
9843 | (base32 | |
9844 | "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh")))) | |
9845 | (build-system ant-build-system) | |
9846 | (arguments | |
9847 | `(#:jar-name "java-jboss-el-api_spec.jar" | |
9848 | #:jdk ,icedtea-8)) | |
9849 | (inputs | |
9850 | `(("java-junit" ,java-junit))) | |
9851 | (home-page "https://github.com/jboss/jboss-el-api_spec") | |
9852 | (synopsis "JSR-341 expression language 3.0 API") | |
9853 | (description "This package contains an implementation of the JSR-341 | |
9854 | specification for the expression language 3.0. It implements an expression | |
9855 | language inspired by ECMAScript and XPath. This language is used with | |
9856 | JavaServer Pages (JSP).") | |
9857 | ;; Either GPL2 only or CDDL. | |
9858 | (license (list license:gpl2 license:cddl1.1)))) | |
cc03a786 JL |
9859 | |
9860 | (define-public java-jboss-interceptors-api-spec | |
9861 | (package | |
9862 | (name "java-jboss-interceptors-api-spec") | |
9863 | (version "1.2") | |
9864 | (source (origin | |
9865 | (method url-fetch) | |
9866 | (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/" | |
9867 | "archive/jboss-interceptors-api_" version | |
9868 | "_spec-1.0.0.Final.tar.gz")) | |
9869 | (sha256 | |
9870 | (base32 | |
9871 | "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z")))) | |
9872 | (build-system ant-build-system) | |
9873 | (arguments | |
9874 | `(#:jar-name "java-jboss-interceptors-api_spec.jar" | |
9875 | #:jdk ,icedtea-8 | |
9876 | #:source-dir "." | |
9877 | #:tests? #f)); no tests | |
9878 | (home-page "https://github.com/jboss/jboss-interceptors-api_spec") | |
9879 | (synopsis "Interceptors 1.2 API classes from JSR 318") | |
9880 | (description "Java-jboss-interceptors-api-spec implements the Interceptors | |
9881 | API. Interceptors are used to interpose on business method invocations and | |
9882 | specific events.") | |
9883 | ;; Either GPL2 only or CDDL. | |
9884 | (license (list license:gpl2 license:cddl1.1)))) | |
a10a451c JL |
9885 | |
9886 | (define-public java-cdi-api | |
9887 | (package | |
9888 | (name "java-cdi-api") | |
9889 | (version "2.0") | |
9890 | (source (origin | |
9891 | (method url-fetch) | |
9892 | (uri (string-append "https://github.com/cdi-spec/cdi/archive/" | |
9893 | version ".tar.gz")) | |
9894 | (file-name (string-append name "-" version ".tar.gz")) | |
9895 | (sha256 | |
9896 | (base32 | |
9897 | "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y")))) | |
9898 | (build-system ant-build-system) | |
9899 | (arguments | |
9900 | `(#:source-dir "api/src/main/java" | |
9901 | #:jar-name "java-cdi-api.jar" | |
9902 | #:test-dir "api/src/test" | |
9903 | #:jdk ,icedtea-8 | |
9904 | #:tests? #f)); Tests fail because we don't have a CDI provider yet | |
9905 | (inputs | |
9906 | `(("java-javax-inject" ,java-javax-inject) | |
9907 | ("java-jboss-el-api-spec" ,java-jboss-el-api-spec) | |
9908 | ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec))) | |
9909 | (native-inputs | |
9910 | `(("java-testng" ,java-testng) | |
9911 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
9912 | (home-page "http://cdi-spec.org/") | |
9913 | (synopsis "Contexts and Dependency Injection APIs") | |
9914 | (description "Java-cdi-api contains the required APIs for Contexts and | |
9915 | Dependency Injection (CDI).") | |
9916 | (license license:asl2.0))) | |
d57fd728 JL |
9917 | |
9918 | (define-public java-joda-convert | |
9919 | (package | |
9920 | (name "java-joda-convert") | |
9921 | (version "1.9.2") | |
9922 | (source (origin | |
9923 | (method url-fetch) | |
9924 | (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v" | |
9925 | version ".tar.gz")) | |
9926 | (file-name (string-append name "-" version ".tar.gz")) | |
9927 | (sha256 | |
9928 | (base32 | |
9929 | "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7")))) | |
9930 | (build-system ant-build-system) | |
9931 | (arguments | |
9932 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
9933 | #:source-dir "src/main/java" | |
9934 | #:test-include (list "**/Test*.java") | |
9935 | ;; Contains only interfaces and base classes (no test) | |
9936 | #:test-exclude (list "**/test*/**.java"))) | |
9937 | (inputs | |
9938 | `(("java-guava" ,java-guava))) | |
9939 | (native-inputs | |
9940 | `(("java-junit" ,java-junit) | |
9941 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
9942 | (home-page "http://www.joda.org/joda-convert/") | |
9943 | (synopsis "Conversion between Objects and Strings") | |
9944 | (description "Joda-Convert provides a small set of classes to aid | |
9945 | conversion between Objects and Strings. It is not intended to tackle the | |
9946 | wider problem of Object to Object transformation.") | |
9947 | (license license:asl2.0))) | |
0158ea8a JL |
9948 | |
9949 | (define-public java-joda-time | |
9950 | (package | |
9951 | (name "java-joda-time") | |
9952 | (version "2.9.9") | |
9953 | (source (origin | |
9954 | (method url-fetch) | |
9955 | (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v" | |
9956 | version ".tar.gz")) | |
9957 | (file-name (string-append name "-" version ".tar.gz")) | |
9958 | (sha256 | |
9959 | (base32 | |
9960 | "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1")))) | |
9961 | (build-system ant-build-system) | |
9962 | (arguments | |
9963 | `(#:jar-name "java-joda-time.jar" | |
9964 | #:source-dir "src/main/java" | |
9965 | #:test-include (list "**/Test*.java") | |
9966 | ;; There is no runnable test in these files | |
9967 | #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java") | |
9968 | #:phases | |
9969 | (modify-phases %standard-phases | |
9970 | (add-after 'build 'build-resources | |
9971 | (lambda _ | |
9972 | (mkdir-p "build/classes/org/joda/time/tz/data") | |
9973 | (mkdir-p "build/classes/org/joda/time/format") | |
6d0368eb JL |
9974 | ;; This will produce the following exception: |
9975 | ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap" | |
9976 | ;; which is normal, because it doesn't exist yet. It still generates | |
9977 | ;; the same file as in the binary one can find on maven. | |
9978 | (invoke "java" "-cp" | |
9979 | (string-append "build/classes:" (getenv "CLASSPATH")) | |
9980 | "org.joda.time.tz.ZoneInfoCompiler" | |
9981 | "-src" "src/main/java/org/joda/time/tz/src" | |
9982 | "-dst" "build/classes/org/joda/time/tz/data" | |
9983 | "africa" "antarctica" "asia" "australasia" | |
9984 | "europe" "northamerica" "southamerica" | |
9985 | "pacificnew" "etcetera" "backward" "systemv") | |
0158ea8a JL |
9986 | (for-each (lambda (f) |
9987 | (copy-file f (string-append | |
9988 | "build/classes/org/joda/time/format/" | |
9989 | (basename f)))) | |
9990 | (find-files "src/main/java/org/joda/time/format" ".*.properties")) | |
9991 | #t)) | |
9992 | (add-before 'install 'regenerate-jar | |
9993 | (lambda _ | |
9994 | ;; We need to regenerate the jar file to add generated data. | |
9995 | (delete-file "build/jar/java-joda-time.jar") | |
6d0368eb | 9996 | (invoke "ant" "jar"))) |
0158ea8a JL |
9997 | (add-before 'check 'copy-test-resources |
9998 | (lambda _ | |
9999 | (mkdir-p "build/test-classes/org/joda/time/tz/data") | |
10000 | (copy-file "src/test/resources/tzdata/ZoneInfoMap" | |
10001 | "build/test-classes/org/joda/time/tz/data/ZoneInfoMap") | |
10002 | (copy-recursively "src/test/resources" "build/test-classes") | |
10003 | #t))))) | |
10004 | (inputs | |
10005 | `(("java-joda-convert" ,java-joda-convert))) | |
10006 | (native-inputs | |
10007 | `(("java-junit" ,java-junit) | |
10008 | ("java-hamcrest-core" ,java-hamcrest-core) | |
10009 | ("tzdata" ,tzdata))) | |
10010 | (home-page "http://www.joda.org/joda-time/") | |
10011 | (synopsis "Replacement for the Java date and time classes") | |
10012 | (description "Joda-Time is a replacement for the Java date and time | |
10013 | classes prior to Java SE 8.") | |
10014 | (license license:asl2.0))) | |
6d0368eb JL |
10015 | |
10016 | (define-public java-xerces | |
10017 | (package | |
10018 | (name "java-xerces") | |
10019 | (version "2.11.0") | |
10020 | (source | |
10021 | (origin | |
10022 | (method url-fetch) | |
10023 | (uri (string-append "mirror://apache/xerces/j/source/" | |
10024 | "Xerces-J-src." version ".tar.gz")) | |
10025 | (sha256 | |
10026 | (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm")) | |
10027 | (patches (search-patches | |
10028 | "java-xerces-xjavac_taskdef.patch" | |
10029 | "java-xerces-build_dont_unzip.patch" | |
10030 | "java-xerces-bootclasspath.patch")))) | |
10031 | (build-system ant-build-system) | |
10032 | (arguments | |
10033 | `(#:tests? #f;; Test files are not present | |
10034 | #:test-target "test" | |
10035 | #:jdk ,icedtea-8 | |
10036 | #:phases | |
10037 | (modify-phases %standard-phases | |
10038 | (add-after 'unpack 'create-build.properties | |
10039 | (lambda* (#:key inputs #:allow-other-keys) | |
10040 | (let ((jaxp (assoc-ref inputs "java-jaxp")) | |
10041 | (resolver (assoc-ref inputs "java-apache-xml-commons-resolver"))) | |
10042 | (with-output-to-file "build.properties" | |
10043 | (lambda _ | |
10044 | (format #t | |
10045 | "jar.jaxp = ~a/share/java/jaxp.jar~@ | |
10046 | jar.apis-ext = ~a/share/java/jaxp.jar~@ | |
10047 | jar.resolver = ~a/share/java/xml-resolver.jar~%" | |
10048 | jaxp jaxp resolver))) | |
10049 | ;; Make xerces use our version of jaxp in tests | |
10050 | (substitute* "build.xml" | |
10051 | (("xml-apis.jar") | |
10052 | (string-append jaxp "/share/java/jaxp.jar")) | |
10053 | (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}") | |
10054 | "${jar.apis}"))) | |
10055 | #t)) | |
10056 | (replace 'install (install-jars "build"))))) | |
10057 | (inputs | |
10058 | `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver) | |
10059 | ("java-jaxp" ,java-jaxp))) | |
10060 | (home-page "https://xerces.apache.org/xerces2-j/") | |
10061 | (synopsis "Validating XML parser for Java with DOM level 3 support") | |
10062 | (description "The Xerces2 Java parser is the reference implementation of | |
10063 | XNI, the Xerces Native Interface, and also a fully conforming XML Schema | |
10064 | processor. | |
10065 | ||
10066 | Xerces2-J supports the following standards and APIs: | |
10067 | ||
10068 | @itemize | |
10069 | @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation | |
10070 | @item Namespaces in XML Recommendation | |
10071 | @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and | |
10072 | Range Recommendations | |
10073 | @item Simple API for XML (SAX) 2.0.1 Core and Extension | |
10074 | @item Java APIs for XML Processing (JAXP) 1.2.01 | |
10075 | @item XML Schema 1.0 Structures and Datatypes Recommendations | |
10076 | @item Experimental implementation of the Document Object Model (DOM) Level 3 | |
10077 | Core and Load/Save Working Drafts | |
10078 | @item Provides a partial implementation of the XML Inclusions (XInclude) W3C | |
10079 | Candidate Recommendation | |
10080 | @end itemize | |
10081 | ||
10082 | Xerces is now able to parse documents written according to the XML 1.1 | |
10083 | Candidate Recommendation, except that it does not yet provide an option to | |
10084 | enable normalization checking as described in section 2.13 of this | |
10085 | specification. It also handles namespaces according to the XML Namespaces 1.1 | |
10086 | Candidate Recommendation, and will correctly serialize XML 1.1 documents if | |
10087 | the DOM level 3 load/save API's are in use.") | |
10088 | (license license:asl2.0))) | |
e06bf428 | 10089 | |
ae6922ed DM |
10090 | (define-public java-jakarta-regexp |
10091 | (package | |
10092 | (name "java-jakarta-regexp") | |
10093 | (version "1.5") | |
10094 | (source | |
10095 | (origin | |
10096 | (method url-fetch) | |
10097 | (uri (string-append | |
10098 | "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-" | |
10099 | version ".tar.gz")) | |
10100 | (sha256 | |
10101 | (base32 | |
10102 | "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r")))) | |
10103 | (build-system ant-build-system) | |
10104 | (arguments | |
10105 | `(#:test-target "test" | |
10106 | #:phases | |
10107 | (modify-phases %standard-phases | |
10108 | (replace 'install | |
10109 | (lambda* (#:key outputs #:allow-other-keys) | |
10110 | (let* ((out (assoc-ref outputs "out")) | |
10111 | (out-share (string-append out "/share/java"))) | |
10112 | (mkdir-p out-share) | |
10113 | (for-each (lambda (name) | |
10114 | (install-file name out-share)) | |
10115 | (find-files "build" "^jakarta-regexp-.*\\.jar$")) | |
10116 | #t)))))) | |
10117 | (home-page "https://attic.apache.org/projects/jakarta-regexp.html") | |
10118 | (synopsis "Regular expression parser generator for Java.") | |
10119 | (description "@code{jakarta-regexp} is an old regular expression parser | |
10120 | generator for Java.") | |
10121 | (license license:asl2.0))) | |
10122 | ||
e06bf428 JL |
10123 | (define-public java-jline |
10124 | (package | |
10125 | (name "java-jline") | |
10126 | (version "1.0") | |
10127 | (source (origin | |
10128 | (method url-fetch) | |
10129 | (uri (string-append "https://github.com/jline/jline1/archive/jline-" | |
10130 | version ".tar.gz")) | |
10131 | (sha256 | |
10132 | (base32 | |
10133 | "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir")))) | |
10134 | (build-system ant-build-system) | |
10135 | (arguments | |
10136 | `(#:jar-name "jline.jar" | |
10137 | #:source-dir "src/main/java" | |
10138 | #:test-dir "src/test" | |
10139 | #:phases | |
10140 | (modify-phases %standard-phases | |
10141 | (add-before 'build 'copy-resources | |
10142 | (lambda _ | |
10143 | (copy-recursively "src/main/resources" "build/classes") | |
10144 | #t))))) | |
10145 | (native-inputs | |
10146 | `(("java-junit" ,java-junit))) | |
10147 | (home-page "https://jline.github.io") | |
10148 | (synopsis "Console input handling library") | |
10149 | (description "JLine is a Java library for handling console input. It is | |
10150 | similar in functionality to BSD editline and GNU readline but with additional | |
10151 | features that bring it on par with the Z shell line editor.") | |
10152 | (license license:bsd-3))) | |
7ac4f054 | 10153 | |
49d74311 JL |
10154 | (define-public java-jline-2 |
10155 | (package | |
10156 | (inherit java-jline) | |
10157 | (version "2.14.5") | |
10158 | (source (origin | |
10159 | (method url-fetch) | |
10160 | (uri (string-append "https://github.com/jline/jline2/archive/jline-" | |
10161 | version ".tar.gz")) | |
10162 | (sha256 | |
10163 | (base32 | |
10164 | "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf")))) | |
10165 | (arguments | |
10166 | `(#:jdk ,icedtea-8 | |
10167 | ,@(package-arguments java-jline))) | |
10168 | (inputs | |
10169 | `(("java-jansi" ,java-jansi) | |
10170 | ("java-jansi-native" ,java-jansi-native))) | |
10171 | (native-inputs | |
10172 | `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4) | |
10173 | ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common) | |
10174 | ("java-powermock-api-easymock" ,java-powermock-api-easymock) | |
10175 | ("java-powermock-api-support" ,java-powermock-api-support) | |
10176 | ("java-powermock-core" ,java-powermock-core) | |
10177 | ("java-powermock-reflect" ,java-powermock-reflect) | |
10178 | ("java-easymock" ,java-easymock) | |
10179 | ("java-jboss-javassist" ,java-jboss-javassist) | |
10180 | ("java-objenesis" ,java-objenesis) | |
10181 | ("java-asm" ,java-asm) | |
10182 | ("java-hamcrest-core" ,java-hamcrest-core) | |
10183 | ("java-cglib" ,java-cglib) | |
10184 | ("java-junit" ,java-junit) | |
10185 | ("java-hawtjni" ,java-hawtjni))))) | |
10186 | ||
7ac4f054 JL |
10187 | (define-public java-xmlunit |
10188 | (package | |
10189 | (name "java-xmlunit") | |
10190 | (version "2.5.1") | |
10191 | (source (origin | |
10192 | (method url-fetch) | |
10193 | (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v" | |
10194 | version ".tar.gz")) | |
10195 | (file-name (string-append name "-" version ".tar.gz")) | |
10196 | (sha256 | |
10197 | (base32 | |
10198 | "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z")))) | |
10199 | (build-system ant-build-system) | |
10200 | (arguments | |
10201 | `(#:jar-name "java-xmlunit.jar" | |
10202 | #:source-dir "xmlunit-core/src/main/java" | |
10203 | #:test-dir "xmlunit-core/src/test" | |
10204 | #:phases | |
10205 | (modify-phases %standard-phases | |
10206 | (add-before 'check 'copy-test-resources | |
10207 | (lambda* (#:key inputs #:allow-other-keys) | |
10208 | (copy-recursively (assoc-ref inputs "resources") "../test-resources") | |
10209 | #t))))) | |
10210 | (native-inputs | |
10211 | `(("java-junit" ,java-junit) | |
10212 | ("java-mockito-1" ,java-mockito-1) | |
10213 | ("java-hamcrest-all" ,java-hamcrest-all) | |
10214 | ("java-objenesis" ,java-objenesis) | |
10215 | ("java-asm" ,java-asm) | |
10216 | ("java-cglib" ,java-cglib) | |
10217 | ("resources" | |
10218 | ,(origin | |
10219 | (method git-fetch) | |
10220 | (uri (git-reference | |
10221 | (url "https://github.com/xmlunit/test-resources.git") | |
10222 | (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec"))) | |
10223 | (file-name "java-xmlunit-test-resources") | |
10224 | (sha256 | |
10225 | (base32 | |
10226 | "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr")))))) | |
10227 | (home-page "http://www.xmlunit.org/") | |
10228 | (synopsis "XML output testing") | |
10229 | (description "XMLUnit provides you with the tools to verify the XML you | |
10230 | emit is the one you want to create. It provides helpers to validate against | |
10231 | an XML Schema, assert the values of XPath queries or compare XML documents | |
10232 | against expected outcomes.") | |
10233 | (license license:asl2.0))) | |
73a1f10a JL |
10234 | |
10235 | (define-public java-xmlunit-legacy | |
10236 | (package | |
10237 | (inherit java-xmlunit) | |
10238 | (name "java-xmlunit-legacy") | |
10239 | (arguments | |
10240 | `(#:jar-name "java-xmlunit-legacy.jar" | |
10241 | #:source-dir "xmlunit-legacy/src/main/java" | |
10242 | #:test-dir "xmlunit-legacy/src/test")) | |
10243 | (inputs | |
10244 | `(("java-xmlunit" ,java-xmlunit) | |
10245 | ("java-junit" ,java-junit))) | |
10246 | (native-inputs | |
10247 | `(("java-mockito-1" ,java-mockito-1))))) | |
93abc975 | 10248 | |
f5cc5ead JL |
10249 | (define-public java-xmlunit-matchers |
10250 | (package | |
10251 | (inherit java-xmlunit) | |
10252 | (name "java-xmlunit-matchers") | |
10253 | (arguments | |
10254 | `(#:jar-name "java-xmlunit-matchers.jar" | |
10255 | #:source-dir "xmlunit-matchers/src/main/java" | |
10256 | #:test-dir "xmlunit-matchers/src/test" | |
10257 | #:test-exclude | |
10258 | ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd | |
10259 | (list "**/ValidationMatcherTest.java") | |
10260 | #:phases | |
10261 | (modify-phases %standard-phases | |
10262 | (add-before 'build 'copy-test-class | |
10263 | (lambda _ | |
10264 | (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java" | |
10265 | "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java") | |
10266 | #t)) | |
10267 | (add-before 'build 'fix-test-resources-path | |
10268 | (lambda _ | |
10269 | (substitute* (find-files "xmlunit-matchers/src/test" ".*.java") | |
10270 | (("../test-resources") "test-resources")) | |
10271 | #t)) | |
10272 | (add-before 'check 'copy-test-resources | |
10273 | (lambda* (#:key inputs #:allow-other-keys) | |
10274 | (copy-recursively (assoc-ref inputs "resources") "test-resources") | |
10275 | #t))))) | |
10276 | (inputs | |
10277 | `(("java-xmlunit" ,java-xmlunit) | |
10278 | ("java-junit" ,java-junit))))) | |
10279 | ||
93abc975 RW |
10280 | (define-public java-openchart2 |
10281 | (package | |
10282 | (name "java-openchart2") | |
10283 | (version "1.4.3") | |
10284 | (source (origin | |
10285 | (method url-fetch) | |
10286 | (uri (string-append "http://download.approximatrix.com/openchart2/" | |
10287 | "openchart2-" version ".source.zip")) | |
10288 | (sha256 | |
10289 | (base32 | |
10290 | "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g")))) | |
10291 | (build-system ant-build-system) | |
10292 | (arguments | |
10293 | `(#:test-target "test" | |
10294 | #:phases | |
10295 | (modify-phases %standard-phases | |
10296 | (add-after 'unpack 'fix-junit-errors | |
10297 | (lambda _ | |
10298 | (with-directory-excursion "unittest/src/com/approximatrix/charting/" | |
10299 | (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java" | |
10300 | "coordsystem/ticklocator/NumericYTickLocatorTest.java" | |
10301 | "coordsystem/ticklocator/ObjectXTickLocatorTest.java" | |
10302 | "model/DefaultChartDataModelConstraintsTest.java" | |
10303 | "model/MultiScatterDataModelConstraintsTest.java" | |
10304 | "model/threedimensional/DotPlotDataModelConstraintsTest.java") | |
10305 | (("(assertEquals[^;]+);" before _) | |
10306 | (string-append (string-drop-right before 2) ", 1E-6);")))) | |
10307 | #t)) | |
10308 | (replace 'install (install-jars "."))))) | |
10309 | (native-inputs | |
10310 | `(("unzip" ,unzip) | |
10311 | ("java-junit" ,java-junit) | |
10312 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
10313 | (home-page "http://approximatrix.com/products/openchart2/") | |
10314 | (synopsis "Simple plotting for Java") | |
10315 | (description "Openchart2 provides a simple, yet powerful, interface for | |
10316 | Java programmers to create two-dimensional charts and plots. The library | |
10317 | features an assortment of graph styles, including advanced scatter plots, bar | |
10318 | graphs, and pie charts.") | |
10319 | (license license:lgpl2.1+))) | |
5f5b31c6 JL |
10320 | |
10321 | (define-public java-commons-httpclient | |
10322 | (package | |
10323 | (name "java-commons-httpclient") | |
10324 | (version "3.1") | |
10325 | (source (origin | |
10326 | (method url-fetch) | |
10327 | (uri (string-append "https://archive.apache.org/dist/httpcomponents/" | |
10328 | "commons-httpclient/source/commons-httpclient-" | |
10329 | version "-src.tar.gz")) | |
10330 | (sha256 | |
10331 | (base32 | |
10332 | "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r")))) | |
10333 | (build-system ant-build-system) | |
10334 | (arguments | |
10335 | `(#:build-target "compile" | |
10336 | #:test-target "test" | |
10337 | #:tests? #f; requires junit-textui (junit 3) | |
10338 | #:phases | |
10339 | (modify-phases %standard-phases | |
10340 | (add-before 'build 'fix-accent | |
10341 | (lambda _ | |
10342 | (for-each (lambda (file) | |
10343 | (with-fluids ((%default-port-encoding "ISO-8859-1")) | |
10344 | (substitute* file | |
10345 | (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n")))) | |
10346 | '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java" | |
10347 | "src/examples/TrivialApp.java" "src/examples/ClientApp.java" | |
10348 | "src/test/org/apache/commons/httpclient/TestHttps.java" | |
2c8ac364 MW |
10349 | "src/test/org/apache/commons/httpclient/TestURIUtil2.java")) |
10350 | #t)) | |
5f5b31c6 JL |
10351 | (replace 'install |
10352 | (lambda* (#:key outputs #:allow-other-keys) | |
10353 | (invoke "ant" "dist" | |
10354 | (string-append "-Ddist.home=" (assoc-ref outputs "out") | |
10355 | "/share/java")) | |
10356 | #t))))) | |
10357 | (propagated-inputs | |
10358 | `(("java-commons-logging" ,java-commons-logging-minimal) | |
10359 | ("java-commons-codec" ,java-commons-codec))) | |
10360 | (home-page "https://hc.apache.org") | |
10361 | (synopsis "HTTP/1.1 compliant HTTP agent implementation") | |
10362 | (description "This package contains an HTTP/1.1 compliant HTTP agent | |
10363 | implementation. It also provides reusable components for client-side | |
10364 | authentication, HTTP state management, and HTTP connection management.") | |
10365 | (license license:asl2.0))) | |
5fe981dc JL |
10366 | |
10367 | (define-public java-commons-vfs | |
10368 | (package | |
10369 | (name "java-commons-vfs") | |
10370 | (version "2.2") | |
10371 | (source (origin | |
10372 | (method url-fetch) | |
10373 | (uri (string-append "mirror://apache/commons/vfs/source/" | |
10374 | "commons-vfs2-distribution-" version "-src.tar.gz")) | |
10375 | (file-name (string-append name "-" version ".tar.gz")) | |
10376 | (sha256 | |
10377 | (base32 | |
10378 | "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3")) | |
10379 | (modules '((guix build utils))) | |
10380 | (snippet | |
10381 | '(begin | |
10382 | (for-each delete-file | |
10383 | (find-files "." "\\.jar$")) | |
10384 | #t)))) | |
10385 | (build-system ant-build-system) | |
10386 | (arguments | |
10387 | `(#:jar-name "commons-vfs.jar" | |
10388 | #:source-dir "commons-vfs2/src/main/java" | |
10389 | #:test-dir "commons-vfs2/src/test" | |
10390 | ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ... | |
10391 | #:tests? #f | |
10392 | #:phases | |
10393 | (modify-phases %standard-phases | |
10394 | (add-before 'build 'remove-hadoop-and-webdav | |
10395 | ; Remove these files as they are not required and depend on difficult | |
10396 | ; packages. | |
10397 | (lambda _ | |
10398 | (for-each delete-file-recursively | |
10399 | '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav" | |
2c8ac364 MW |
10400 | "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")) |
10401 | #t))))) | |
5fe981dc JL |
10402 | (inputs |
10403 | `(("java-commons-collections4" ,java-commons-collections4) | |
10404 | ("java-commons-compress" ,java-commons-compress) | |
10405 | ("java-commons-httpclient" ,java-commons-httpclient) | |
10406 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
10407 | ("java-commons-net" ,java-commons-net) | |
10408 | ("java-jsch" ,java-jsch))) | |
10409 | (home-page "http://commons.apache.org/proper/commons-vfs/") | |
52beae7b | 10410 | (synopsis "Java file system library") |
5fe981dc JL |
10411 | (description "Commons VFS provides a single API for accessing various |
10412 | different file systems. It presents a uniform view of the files from various | |
10413 | different sources, such as the files on local disk, on an HTTP server, or | |
10414 | inside a Zip archive.") | |
10415 | (license license:asl2.0))) | |
f7b512c0 JL |
10416 | |
10417 | (define-public java-jakarta-oro | |
10418 | (package | |
10419 | (name "java-jakarta-oro") | |
10420 | (version "2.0.8") | |
10421 | (source (origin | |
10422 | (method url-fetch) | |
10423 | (uri (string-append "https://archive.apache.org/dist/jakarta/oro/" | |
10424 | "jakarta-oro-" version ".tar.gz")) | |
10425 | (sha256 | |
10426 | (base32 | |
10427 | "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc")) | |
10428 | (modules '((guix build utils))) | |
10429 | (snippet | |
10430 | `(begin | |
10431 | (delete-file (string-append "jakarta-oro-" ,version ".jar")) | |
10432 | #t)))) | |
10433 | (build-system ant-build-system) | |
10434 | (arguments | |
10435 | `(#:build-target "package" | |
10436 | #:tests? #f; tests are run as part of the build process | |
10437 | #:phases | |
10438 | (modify-phases %standard-phases | |
10439 | (replace 'install | |
10440 | (install-jars ,(string-append "jakarta-oro-" version)))))) | |
10441 | (home-page "https://jakarta.apache.org/oro/") | |
10442 | (synopsis "Text-processing for Java") | |
10443 | (description "The Jakarta-ORO Java classes are a set of text-processing | |
10444 | Java classes that provide Perl5 compatible regular expressions, AWK-like | |
10445 | regular expressions, glob expressions, and utility classes for performing | |
10446 | substitutions, splits, filtering filenames, etc. This library is the successor | |
10447 | of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally | |
10448 | from ORO, Inc.") | |
10449 | (license license:asl1.1))) | |
a970288c JL |
10450 | |
10451 | (define-public java-native-access | |
10452 | (package | |
10453 | (name "java-native-access") | |
10454 | (version "4.5.1") | |
10455 | (source (origin | |
10456 | (method url-fetch) | |
10457 | (uri (string-append "https://github.com/java-native-access/jna/" | |
10458 | "archive/" version ".tar.gz")) | |
10459 | (file-name (string-append name "-" version ".tar.gz")) | |
10460 | (sha256 | |
10461 | (base32 | |
10462 | "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9")) | |
10463 | (modules '((guix build utils))) | |
10464 | (snippet | |
10465 | `(begin | |
10466 | (for-each delete-file (find-files "." ".*.jar")) | |
10467 | (delete-file-recursively "native/libffi") | |
10468 | (delete-file-recursively "dist") | |
10469 | #t)))) | |
10470 | (build-system ant-build-system) | |
10471 | (arguments | |
10472 | `(#:tests? #f; FIXME: tests require reflections.jar | |
10473 | #:test-target "test" | |
10474 | #:make-flags (list "-Ddynlink.native=true") | |
10475 | #:phases | |
10476 | (modify-phases %standard-phases | |
10477 | (add-before 'build 'fix-build.xml | |
10478 | (lambda* (#:key inputs #:allow-other-keys) | |
10479 | (substitute* "build.xml" | |
10480 | ;; Since we removed the bundled ant.jar, give the correct path | |
10481 | (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar")) | |
10482 | ;; We removed generated native libraries. We can only rebuild one | |
10483 | ;; so don't fail if we can't find a native library for another architecture. | |
10484 | (("zipfileset") "zipfileset erroronmissingarchive=\"false\"")) | |
10485 | ;; Copy test dependencies | |
10486 | (copy-file (string-append (assoc-ref inputs "java-junit") | |
10487 | "/share/java/junit.jar") | |
10488 | "lib/junit.jar") | |
10489 | (copy-file (string-append (assoc-ref inputs "java-hamcrest-core") | |
10490 | "/share/java/hamcrest-core.jar") | |
10491 | "lib/hamcrest-core.jar") | |
10492 | ;; FIXME: once reflections.jar is built, copy it to lib/test. | |
10493 | #t)) | |
10494 | (add-before 'build 'build-native | |
10495 | (lambda _ | |
10496 | (invoke "ant" "-Ddynlink.native=true" "native") | |
10497 | #t)) | |
10498 | (replace 'install | |
10499 | (install-jars "build"))))) | |
10500 | (inputs | |
10501 | `(("libffi" ,libffi) | |
10502 | ("libx11" ,libx11) | |
10503 | ("libxt" ,libxt))) | |
10504 | (native-inputs | |
10505 | `(("java-junit" ,java-junit) | |
10506 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
10507 | (home-page "https://github.com/java-native-access/jna") | |
10508 | (synopsis "Access to native shared libraries from Java") | |
10509 | (description "JNA provides Java programs easy access to native shared | |
10510 | libraries without writing anything but Java code - no JNI or native code is | |
10511 | required. JNA allows you to call directly into native functions using natural | |
10512 | Java method invocation.") | |
10513 | ;; Java Native Access project (JNA) is dual-licensed under 2 | |
10514 | ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0. | |
10515 | (license (list | |
10516 | license:asl2.0 | |
10517 | license:lgpl2.1+)))) | |
cfb55cfc JL |
10518 | |
10519 | (define-public java-native-access-platform | |
10520 | (package | |
10521 | (inherit java-native-access) | |
10522 | (name "java-native-access-platform") | |
10523 | (arguments | |
10524 | `(#:test-target "test" | |
10525 | #:tests? #f; require jna-test.jar | |
10526 | #:phases | |
10527 | (modify-phases %standard-phases | |
10528 | (add-before 'build 'chdir | |
10529 | (lambda _ | |
10530 | (chdir "contrib/platform") | |
10531 | #t)) | |
10532 | (add-after 'chdir 'fix-ant | |
10533 | (lambda* (#:key inputs #:allow-other-keys) | |
10534 | (substitute* "nbproject/project.properties" | |
10535 | (("../../build/jna.jar") | |
10536 | (string-append (assoc-ref inputs "java-native-access") | |
10537 | "/share/java/jna.jar")) | |
10538 | (("../../lib/hamcrest-core-.*.jar") | |
10539 | (string-append (assoc-ref inputs "java-hamcrest-core") | |
10540 | "/share/java/hamcrest-core.jar")) | |
10541 | (("../../lib/junit.jar") | |
10542 | (string-append (assoc-ref inputs "java-junit") | |
10543 | "/share/java/junit.jar"))) | |
10544 | #t)) | |
10545 | (replace 'install | |
10546 | (install-jars "dist"))))) | |
10547 | (inputs | |
10548 | `(("java-native-access" ,java-native-access))) | |
10549 | (synopsis "Cross-platform mappings for jna") | |
10550 | (description "java-native-access-platfrom has cross-platform mappings | |
10551 | and mappings for a number of commonly used platform functions, including a | |
10552 | large number of Win32 mappings as well as a set of utility classes that | |
10553 | simplify native access."))) | |
470674a5 JL |
10554 | |
10555 | (define-public java-jsch-agentproxy-core | |
10556 | (package | |
10557 | (name "java-jsch-agentproxy-core") | |
10558 | (version "0.0.8") | |
10559 | (source (origin | |
10560 | (method url-fetch) | |
10561 | (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/" | |
10562 | version ".tar.gz")) | |
10563 | (file-name (string-append name "-" version ".tar.gz")) | |
10564 | (sha256 | |
10565 | (base32 | |
10566 | "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q")))) | |
10567 | (build-system ant-build-system) | |
10568 | (arguments | |
10569 | `(#:jar-name "jsch-agentproxy-core.jar" | |
10570 | #:source-dir "jsch-agent-proxy-core/src/main/java" | |
10571 | #:tests? #f)); no tests | |
10572 | (home-page "https://github.com/ymnk/jsch-agent-proxy") | |
f1d79c97 | 10573 | (synopsis "Core component of the proxy to ssh-agent and Pageant in Java") |
470674a5 JL |
10574 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
10575 | and Pageant included Putty. It will be easily integrated into JSch, and users | |
10576 | will be allowed to use these programs for authentication.") | |
10577 | (license license:bsd-3))) | |
f1d79c97 JL |
10578 | |
10579 | (define-public java-jsch-agentproxy-sshagent | |
10580 | (package | |
10581 | (inherit java-jsch-agentproxy-core) | |
10582 | (name "java-jsch-agentproxy-sshagent") | |
10583 | (arguments | |
10584 | `(#:jar-name "jsch-agentproxy-sshagent.jar" | |
10585 | #:source-dir "jsch-agent-proxy-sshagent/src/main/java" | |
10586 | #:tests? #f)); no tests | |
10587 | (inputs | |
10588 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) | |
10589 | (synopsis "Proxy to ssh-agent") | |
10590 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
10591 | and Pageant included in Putty. This component contains the code for a proxy to | |
10592 | ssh-agent."))) | |
f438e638 JL |
10593 | |
10594 | (define-public java-jsch-agentproxy-usocket-jna | |
10595 | (package | |
10596 | (inherit java-jsch-agentproxy-core) | |
10597 | (name "java-jsch-agentproxy-usocket-jna") | |
10598 | (arguments | |
10599 | `(#:jar-name "jsch-agentproxy-usocket-jna.jar" | |
10600 | #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java" | |
10601 | #:tests? #f)); no tests | |
10602 | (inputs | |
10603 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
10604 | ("java-native-access" ,java-native-access))) | |
10605 | (synopsis "USocketFactory implementation using JNA") | |
10606 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
10607 | and Pageant included in Putty. This component contains an implementation of | |
10608 | USocketFactory using @dfn{JNA} (Java Native Access)."))) | |
475225e3 JL |
10609 | |
10610 | (define-public java-jsch-agentproxy-pageant | |
10611 | (package | |
10612 | (inherit java-jsch-agentproxy-core) | |
10613 | (name "java-jsch-agentproxy-pageant") | |
10614 | (arguments | |
10615 | `(#:jar-name "jsch-agentproxy-pageant.jar" | |
10616 | #:source-dir "jsch-agent-proxy-pageant/src/main/java" | |
10617 | #:tests? #f)); no tests | |
10618 | (inputs | |
10619 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
10620 | ("java-native-access" ,java-native-access) | |
10621 | ("java-native-access-platform" ,java-native-access-platform))) | |
10622 | (synopsis "Proxy to pageant") | |
10623 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
10624 | and Pageant included in Putty. This component contains the code for a proxy to | |
10625 | pageant."))) | |
96d6d9c7 JL |
10626 | |
10627 | (define-public java-jsch-agentproxy-usocket-nc | |
10628 | (package | |
10629 | (inherit java-jsch-agentproxy-core) | |
10630 | (name "java-jsch-agentproxy-usocket-nc") | |
10631 | (arguments | |
10632 | `(#:jar-name "jsch-agentproxy-usocket-nc.jar" | |
10633 | #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java" | |
10634 | #:tests? #f)); no tests | |
10635 | (inputs | |
10636 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) | |
10637 | (synopsis "USocketFactory implementation using netcat") | |
10638 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
10639 | and Pageant included in Putty. This component contains an implementation of | |
10640 | USocketFactory using netcat."))) | |
5a46b17b JL |
10641 | |
10642 | (define-public java-jsch-agentproxy-connector-factory | |
10643 | (package | |
10644 | (inherit java-jsch-agentproxy-core) | |
10645 | (name "java-jsch-agentproxy-connector-factory") | |
10646 | (arguments | |
10647 | `(#:jar-name "jsch-agentproxy-connector-factory.jar" | |
10648 | #:source-dir "jsch-agent-proxy-connector-factory/src/main/java" | |
10649 | #:tests? #f)); no tests | |
10650 | (inputs | |
10651 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
10652 | ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent) | |
10653 | ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna) | |
10654 | ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant) | |
10655 | ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc))) | |
10656 | (synopsis "Connector factory for jsch agent proxy") | |
10657 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
10658 | and Pageant included in Putty. This component contains a connector factory."))) | |
b0fbf596 JL |
10659 | |
10660 | (define-public java-jsch-agentproxy-jsch | |
10661 | (package | |
10662 | (inherit java-jsch-agentproxy-core) | |
10663 | (name "java-jsch-agentproxy-jsch") | |
10664 | (arguments | |
10665 | `(#:jar-name "jsch-agentproxy-jsch.jar" | |
10666 | #:source-dir "jsch-agent-proxy-jsch/src/main/java" | |
10667 | #:tests? #f)); no tests | |
10668 | (inputs | |
10669 | `(("java-jsch" ,java-jsch) | |
10670 | ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) | |
10671 | (synopsis "JSch integration library for agentproxy") | |
10672 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
10673 | and Pageant included in Putty. This component contains a library to use | |
10674 | jsch-agent-proxy with JSch."))) | |
f1f4a4f0 JL |
10675 | |
10676 | (define-public java-apache-ivy | |
10677 | (package | |
10678 | (name "java-apache-ivy") | |
10679 | (version "2.4.0") | |
10680 | (source (origin | |
10681 | (method url-fetch) | |
10682 | (uri (string-append "mirror://apache//ant/ivy/" version | |
10683 | "/apache-ivy-" version "-src.tar.gz")) | |
10684 | (sha256 | |
10685 | (base32 | |
10686 | "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0")) | |
10687 | (patches | |
10688 | (search-patches | |
10689 | "java-apache-ivy-port-to-latest-bouncycastle.patch")))) | |
10690 | (build-system ant-build-system) | |
10691 | (arguments | |
10692 | `(#:jar-name "ivy.jar" | |
10693 | #:tests? #f | |
10694 | #:phases | |
10695 | (modify-phases %standard-phases | |
10696 | (add-before 'build 'remove-example | |
10697 | (lambda _ | |
10698 | (delete-file-recursively "src/example") | |
10699 | #t)) | |
10700 | (add-before 'build 'copy-resources | |
10701 | (lambda _ | |
10702 | (with-directory-excursion "src/java" | |
10703 | (for-each (lambda (file) | |
10704 | (install-file file (string-append "../../build/classes/" (dirname file)))) | |
10705 | (append | |
10706 | (find-files "." ".*.css") | |
10707 | (find-files "." ".*.ent") | |
10708 | (find-files "." ".*.html") | |
10709 | (find-files "." ".*.properties") | |
10710 | (find-files "." ".*.xsd") | |
10711 | (find-files "." ".*.xsl") | |
2c8ac364 MW |
10712 | (find-files "." ".*.xml")))) |
10713 | #t)) | |
f1f4a4f0 JL |
10714 | (add-before 'build 'fix-vfs |
10715 | (lambda _ | |
10716 | (substitute* | |
10717 | '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java" | |
10718 | "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java") | |
10719 | (("import org.apache.commons.vfs") "import org.apache.commons.vfs2")) | |
10720 | #t)) | |
10721 | (add-before 'install 'copy-manifest | |
10722 | (lambda _ | |
10723 | (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF") | |
10724 | #t)) | |
10725 | (add-before 'install 'repack | |
10726 | (lambda _ | |
10727 | (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar" | |
2c8ac364 | 10728 | "-C" "build/classes" "."))) |
f1f4a4f0 JL |
10729 | (add-after 'install 'install-bin |
10730 | (lambda* (#:key outputs #:allow-other-keys) | |
10731 | (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) | |
10732 | (ivy (string-append bin "/ivy")) | |
10733 | (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar"))) | |
10734 | (mkdir-p bin) | |
10735 | (with-output-to-file ivy | |
10736 | (lambda _ | |
10737 | (display (string-append | |
10738 | "#!" (which "sh") "\n" | |
10739 | "if [[ -z $CLASSPATH ]]; then\n" | |
10740 | " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n" | |
10741 | "else\n" | |
10742 | " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n" | |
10743 | "fi\n" | |
10744 | (which "java") " -cp $cp org.apache.ivy.Main $@\n")))) | |
10745 | (chmod ivy #o755) | |
10746 | #t)))))) | |
10747 | (inputs | |
10748 | `(("java-bouncycastle" ,java-bouncycastle) | |
10749 | ("java-commons-cli" ,java-commons-cli) | |
10750 | ("java-commons-collections" ,java-commons-collections) | |
10751 | ("java-commons-httpclient" ,java-commons-httpclient) | |
10752 | ("java-commons-lang" ,java-commons-lang) | |
10753 | ("java-commons-vfs" ,java-commons-vfs) | |
10754 | ("java-jakarta-oro" ,java-jakarta-oro) | |
10755 | ("java-jsch" ,java-jsch) | |
10756 | ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
10757 | ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory) | |
10758 | ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch) | |
10759 | ("java-junit" ,java-junit))) | |
10760 | (home-page "https://ant.apache.org/ivy") | |
10761 | (synopsis "Dependency manager for the Java programming language") | |
10762 | (description "Ivy is a tool for managing (recording, tracking, resolving | |
10763 | and reporting) project dependencies. It is characterized by the following: | |
10764 | ||
10765 | @itemize | |
10766 | @item flexibility and configurability - Ivy is essentially process agnostic | |
10767 | and is not tied to any methodology or structure. Instead it provides the | |
10768 | necessary flexibility and configurability to be adapted to a broad range | |
10769 | of dependency management and build processes. | |
10770 | @item tight integration with Apache Ant - while available as a standalone tool, | |
10771 | Ivy works particularly well with Apache Ant providing a number of | |
10772 | powerful Ant tasks ranging from dependency resolution to dependency | |
10773 | reporting and publication. | |
10774 | @end itemize") | |
10775 | (license license:asl2.0))) | |
1a1810f5 JL |
10776 | |
10777 | (define-public java-eclipse-sisu-inject | |
10778 | (package | |
10779 | (name "java-eclipse-sisu-inject") | |
10780 | (version "0.3.3") | |
10781 | (source (origin | |
ae69b39e BH |
10782 | (method git-fetch) |
10783 | (uri (git-reference | |
10784 | (url "https://github.com/eclipse/sisu.inject/") | |
10785 | (commit "releases/0.3.3"))) | |
10786 | (file-name (git-file-name name version)) | |
1a1810f5 JL |
10787 | (sha256 |
10788 | (base32 | |
ae69b39e | 10789 | "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7")))) |
1a1810f5 JL |
10790 | (build-system ant-build-system) |
10791 | (arguments | |
10792 | `(#:jar-name "eclipse-sisu-inject.jar" | |
10793 | #:source-dir "org.eclipse.sisu.inject/src" | |
10794 | #:jdk ,icedtea-8 | |
10795 | #:tests? #f)); no tests | |
10796 | (inputs | |
10797 | `(("java-guice" ,java-guice) | |
10798 | ("java-guice-servlet" ,java-guice-servlet) | |
10799 | ("java-javax-inject" ,java-javax-inject) | |
4b472f6a | 10800 | ("java-javaee-servletapi" ,java-javaee-servletapi) |
1a1810f5 JL |
10801 | ("java-junit" ,java-junit) |
10802 | ("java-slf4j-api" ,java-slf4j-api) | |
10803 | ("java-jsr305" ,java-jsr305) | |
10804 | ("java-jsr250" ,java-jsr250) | |
10805 | ("java-cdi-api" ,java-cdi-api) | |
10806 | ("java-osgi-framework" ,java-osgi-framework) | |
10807 | ("java-osgi-util-tracker" ,java-osgi-util-tracker) | |
10808 | ("java-testng" ,java-testng))) | |
10809 | (home-page "https://www.eclipse.org/sisu/") | |
10810 | (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring") | |
10811 | (description "Sisu is a modular JSR330-based container that supports | |
10812 | classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses | |
10813 | Google-Guice to perform dependency injection and provide the core JSR330 | |
10814 | support, but removes the need to write explicit bindings in Guice modules. | |
10815 | Integration with other containers via the Eclipse Extension Registry and the | |
10816 | OSGi Service Registry is a goal of this project.") | |
10817 | (license license:epl1.0))) | |
7049dea1 JL |
10818 | |
10819 | (define-public java-eclipse-sisu-plexus | |
10820 | (package | |
10821 | (name "java-eclipse-sisu-plexus") | |
10822 | (version "0.3.3") | |
10823 | (source (origin | |
10824 | (method url-fetch) | |
10825 | (uri (string-append "https://github.com/eclipse/sisu.plexus/" | |
10826 | "archive/releases/" version ".tar.gz")) | |
10827 | (sha256 | |
10828 | (base32 | |
10829 | "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9")) | |
10830 | (modules '((guix build utils))) | |
10831 | (snippet | |
10832 | '(begin | |
10833 | (for-each delete-file (find-files "." ".*.jar")) | |
10834 | (rename-file "org.eclipse.sisu.plexus.tests/src" | |
10835 | "org.eclipse.sisu.plexus.tests/java") | |
10836 | #t)))) | |
10837 | (build-system ant-build-system) | |
10838 | (arguments | |
10839 | `(#:jar-name "eclipse-sisu-plexus.jar" | |
10840 | #:source-dir "org.eclipse.sisu.plexus/src" | |
10841 | #:test-dir "org.eclipse.sisu.plexus.tests" | |
10842 | #:test-exclude | |
10843 | (list | |
10844 | ;; This test fails probably because we can't generate the necessary | |
10845 | ;; meta-inf files. | |
10846 | "**/PlexusLoggingTest.*" | |
10847 | ;; FIXME: This test fails because of some injection error | |
10848 | "**/PlexusRequirementTest.*") | |
10849 | #:jdk ,icedtea-8 | |
10850 | #:phases | |
10851 | (modify-phases %standard-phases | |
10852 | (add-before 'build 'copy-resources | |
10853 | (lambda _ | |
10854 | (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml" | |
10855 | "build/classes/META-INF/plexus") | |
10856 | #t)) | |
10857 | (add-before 'check 'build-test-jar | |
10858 | (lambda _ | |
10859 | (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/" | |
10860 | (mkdir "build") | |
10861 | (with-directory-excursion "java" | |
10862 | (apply invoke "javac" "-cp" | |
10863 | (string-append (getenv "CLASSPATH") | |
10864 | ":../../../../../build/classes") | |
10865 | (find-files "." ".*.java")) | |
10866 | (for-each (lambda (file) (install-file file (string-append "../build/" file))) | |
10867 | (find-files "." ".*.jar"))) | |
10868 | (mkdir-p "build/META-INF/plexus") | |
10869 | (copy-file "resources/META-INF/plexus/components.xml" | |
10870 | "build/META-INF/plexus/components.xml") | |
10871 | (with-directory-excursion "build" | |
10872 | (invoke "jar" "cf" "../../../component-jar-0.1.jar" "."))) | |
10873 | (with-directory-excursion "org.eclipse.sisu.plexus.tests/" | |
10874 | (copy-recursively "META-INF" "../build/test-classes/META-INF") | |
10875 | (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java" | |
10876 | (("resources/component-jar") | |
10877 | "org.eclipse.sisu.plexus.tests/resources/component-jar"))) | |
10878 | #t))))) | |
10879 | (inputs | |
10880 | `(("java-plexus-classworlds" ,java-plexus-classworlds) | |
10881 | ("java-plexus-util" ,java-plexus-utils) | |
10882 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
10883 | ("java-osgi-framework" ,java-osgi-framework) | |
10884 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
10885 | ("java-guice" ,java-guice) | |
10886 | ("java-javax-inject" ,java-javax-inject) | |
10887 | ("java-slf4j-api" ,java-slf4j-api) | |
10888 | ("java-junit" ,java-junit))) | |
10889 | (native-inputs | |
10890 | `(("java-guava" ,java-guava) | |
10891 | ("java-aopalliance" ,java-aopalliance) | |
10892 | ("java-cglib" ,java-cglib) | |
10893 | ("java-asm" ,java-asm))) | |
10894 | (home-page "https://www.eclipse.org/sisu/") | |
10895 | (synopsis "Plexus support for the sisu container") | |
10896 | (description "Sisu is a modular JSR330-based container that supports | |
10897 | classpath scanning, auto-binding, and dynamic auto-wiring. This package | |
10898 | adds Plexus support to the Sisu-Inject container.") | |
10899 | (license license:epl1.0))) | |
3fa18fe7 JL |
10900 | |
10901 | (define-public java-commons-compiler | |
10902 | (package | |
10903 | (name "java-commons-compiler") | |
10904 | (version "3.0.8") | |
10905 | (source (origin | |
10906 | (method git-fetch) | |
10907 | (uri (git-reference | |
10908 | (url "https://github.com/janino-compiler/janino") | |
10909 | (commit "91aa95686d1e4ca3b16a984a03a38686572331b2"))) | |
10910 | (file-name (string-append name "-" version)) | |
10911 | (sha256 | |
10912 | (base32 | |
10913 | "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r")) | |
10914 | (modules '((guix build utils))) | |
10915 | (snippet | |
10916 | '(begin | |
10917 | (for-each delete-file | |
10918 | (find-files "." "\\.jar$")) | |
10919 | #t)))) | |
10920 | (build-system ant-build-system) | |
10921 | (arguments | |
10922 | `(#:jar-name "commons-compiler.jar" | |
10923 | #:source-dir "commons-compiler/src/main" | |
10924 | #:tests? #f)); no tests | |
10925 | (home-page "https://github.com/janino-compiler/janino") | |
10926 | (synopsis "Java compiler") | |
10927 | (description "Commons-compiler contains an API for janino, including the | |
10928 | @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator} | |
10929 | and @code{ISimpleCompiler} interfaces.") | |
10930 | (license license:bsd-3))) | |
3402e651 JL |
10931 | |
10932 | (define-public java-janino | |
10933 | (package | |
10934 | (inherit java-commons-compiler) | |
10935 | (name "java-janino") | |
10936 | (arguments | |
10937 | `(#:jar-name "janino.jar" | |
10938 | #:source-dir "src/main/java" | |
10939 | #:phases | |
10940 | (modify-phases %standard-phases | |
10941 | (add-before 'configure 'chdir | |
10942 | (lambda _ | |
2c8ac364 MW |
10943 | (chdir "janino") |
10944 | #t))))) | |
3402e651 JL |
10945 | (inputs |
10946 | `(("java-commons-compiler" ,java-commons-compiler))) | |
10947 | (native-inputs | |
10948 | `(("java-junit" ,java-junit) | |
10949 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
10950 | (description "Janino is a Java compiler. Janino can compile a set of | |
10951 | source files to a set of class files like @code{javac}, but also compile a | |
10952 | Java expression, block, class body or source file in memory, load the bytecode | |
10953 | and execute it directly in the same JVM. @code{janino} can also be used for | |
10954 | static code analysis or code manipulation."))) | |
7d8207a4 JL |
10955 | |
10956 | (define-public java-logback-core | |
10957 | (package | |
10958 | (name "java-logback-core") | |
10959 | (version "1.2.3") | |
10960 | (source (origin | |
10961 | (method url-fetch) | |
10962 | (uri (string-append "https://github.com/qos-ch/logback/archive/v_" | |
10963 | version ".tar.gz")) | |
b1ccd2a1 | 10964 | (file-name (string-append name "-" version ".tar.gz")) |
7d8207a4 JL |
10965 | (sha256 |
10966 | (base32 | |
10967 | "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi")) | |
10968 | (modules '((guix build utils))) | |
10969 | (snippet | |
2c8ac364 MW |
10970 | '(begin |
10971 | (delete-file-recursively "logback-access/lib") | |
10972 | #t)))) | |
7d8207a4 JL |
10973 | (build-system ant-build-system) |
10974 | (arguments | |
10975 | `(#:jar-name "logback.jar" | |
10976 | #:source-dir "src/main/java" | |
10977 | #:test-dir "src/test" | |
10978 | #:test-exclude | |
10979 | ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator | |
10980 | ;; which creates FastClasses | |
10981 | (list "**/AllCoreTest.*" | |
10982 | "**/AutoFlushingObjectWriterTest.*" | |
10983 | "**/PackageTest.*" | |
10984 | "**/ResilientOutputStreamTest.*" | |
10985 | ;; And we still don't want to run abstract classes | |
10986 | "**/Abstract*.*") | |
10987 | #:phases | |
10988 | (modify-phases %standard-phases | |
10989 | (add-before 'configure 'chdir | |
10990 | (lambda _ | |
10991 | (chdir "logback-core") | |
10992 | #t))))) | |
10993 | (inputs | |
10994 | `(("java-javax-mail" ,java-javax-mail) | |
4b472f6a | 10995 | ("servlet" ,java-javaee-servletapi) |
7d8207a4 JL |
10996 | ("java-commons-compiler" ,java-commons-compiler) |
10997 | ("java-janino" ,java-janino))) | |
10998 | (native-inputs | |
10999 | `(("java-junit" ,java-junit) | |
11000 | ("java-hamcrest-core" ,java-hamcrest-core) | |
11001 | ("java-mockito-1" ,java-mockito-1) | |
11002 | ("java-cglib" ,java-cglib) | |
11003 | ("java-asm" ,java-asm) | |
11004 | ("java-objenesis" ,java-objenesis) | |
11005 | ("java-joda-time" ,java-joda-time))) | |
11006 | (home-page "https://logback.qos.ch") | |
11007 | (synopsis "Logging for java") | |
11008 | (description "Logback is intended as a successor to the popular log4j project. | |
11009 | This module lays the groundwork for the other two modules.") | |
11010 | ;; Either epl1.0 or lgpl2.1 | |
11011 | (license (list license:epl1.0 | |
11012 | license:lgpl2.1)))) | |
3a69f5f2 JL |
11013 | |
11014 | (define-public java-logback-classic | |
11015 | (package | |
11016 | (inherit java-logback-core) | |
11017 | (name "java-logback-classic") | |
11018 | (arguments | |
11019 | `(#:jar-name "logback-classic.jar" | |
11020 | #:source-dir "src/main/java" | |
11021 | #:test-dir "src/test" | |
11022 | #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix | |
11023 | #:jdk ,icedtea-8 | |
11024 | #:phases | |
11025 | (modify-phases %standard-phases | |
11026 | (add-before 'configure 'chdir | |
11027 | (lambda _ | |
11028 | (chdir "logback-classic") | |
11029 | #t)) | |
11030 | (replace 'build | |
11031 | (lambda* (#:key inputs #:allow-other-keys) | |
11032 | (mkdir-p "build/classes") | |
11033 | (setenv "CLASSPATH" | |
11034 | (string-join | |
11035 | (apply append (map (lambda (input) | |
11036 | (find-files (assoc-ref inputs input) | |
11037 | ".*.jar")) | |
11038 | '("java-logback-core" "java-slf4j-api" | |
4b472f6a | 11039 | "java-commons-compiler" "servlet" |
3a69f5f2 JL |
11040 | "groovy"))) |
11041 | ":")) | |
11042 | (apply invoke "groovyc" "-d" "build/classes" "-j" | |
11043 | (find-files "src/main/" ".*\\.(groovy|java)$")) | |
11044 | (invoke "ant" "jar") | |
11045 | #t))))) | |
11046 | (inputs | |
11047 | `(("java-logback-core" ,java-logback-core) | |
11048 | ("java-slf4j-api" ,java-slf4j-api) | |
11049 | ,@(package-inputs java-logback-core))) | |
11050 | (native-inputs | |
11051 | `(("groovy" ,groovy))) | |
11052 | (description "Logback is intended as a successor to the popular log4j project. | |
11053 | This module can be assimilated to a significantly improved version of log4j. | |
11054 | Moreover, @code{logback-classic} natively implements the slf4j API so that you | |
11055 | can readily switch back and forth between logback and other logging frameworks | |
11056 | such as log4j or @code{java.util.logging} (JUL)."))) | |
ab621bf1 JL |
11057 | |
11058 | (define-public java-qdox | |
11059 | (package | |
11060 | (name "java-qdox") | |
11061 | ; Newer version exists, but this version is required by java-plexus-component-metadata | |
11062 | (version "2.0-M2") | |
11063 | (source (origin | |
11064 | (method url-fetch) | |
11065 | ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox | |
11066 | ;; Older releases at https://github.com/codehaus/qdox/ | |
11067 | ;; Note: The release at maven is pre-generated. The release at | |
11068 | ;; github requires jflex. | |
11069 | (uri (string-append "http://central.maven.org/maven2/" | |
11070 | "com/thoughtworks/qdox/qdox/" version | |
11071 | "/qdox-" version "-sources.jar")) | |
11072 | (sha256 | |
11073 | (base32 | |
11074 | "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x")))) | |
11075 | (build-system ant-build-system) | |
11076 | (arguments | |
11077 | `(#:jar-name "qdox.jar" | |
11078 | #:tests? #f)); no tests | |
11079 | (home-page "http://qdox.codehaus.org/") | |
11080 | (synopsis "Parse definitions from Java source files") | |
11081 | (description "QDox is a high speed, small footprint parser for extracting | |
11082 | class/interface/method definitions from source files complete with JavaDoc | |
11083 | @code{@@tags}. It is designed to be used by active code generators or | |
11084 | documentation tools.") | |
11085 | (license license:asl2.0))) | |
c786dff0 LC |
11086 | |
11087 | (define-public java-jgit | |
11088 | (package | |
11089 | (name "java-jgit") | |
11090 | (version "4.7.0.201704051617-r") | |
11091 | (source (origin | |
11092 | (method url-fetch) | |
11093 | (uri (string-append "https://repo1.maven.org/maven2/" | |
11094 | "org/eclipse/jgit/org.eclipse.jgit/" | |
11095 | version "/org.eclipse.jgit-" | |
11096 | version "-sources.jar")) | |
11097 | (sha256 | |
11098 | (base32 | |
11099 | "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k")))) | |
11100 | (build-system ant-build-system) | |
11101 | (arguments | |
11102 | `(#:tests? #f ; There are no tests to run. | |
11103 | #:jar-name "jgit.jar" | |
11104 | ;; JGit must be built with a JDK supporting Java 8. | |
11105 | #:jdk ,icedtea-8 | |
11106 | ;; Target our older default JDK. | |
11107 | #:make-flags (list "-Dtarget=1.7") | |
11108 | #:phases | |
11109 | (modify-phases %standard-phases | |
11110 | ;; The jar file generated by the default build.xml does not include | |
11111 | ;; the text properties files, so we need to add them. | |
11112 | (add-after 'build 'add-properties | |
11113 | (lambda* (#:key jar-name #:allow-other-keys) | |
11114 | (with-directory-excursion "src" | |
11115 | (apply invoke "jar" "-uf" | |
11116 | (string-append "../build/jar/" jar-name) | |
11117 | (find-files "." "\\.properties$"))) | |
11118 | #t))))) | |
11119 | (inputs | |
11120 | `(("java-classpathx-servletapi" ,java-classpathx-servletapi) | |
11121 | ("java-javaewah" ,java-javaewah) | |
11122 | ("java-jsch" ,java-jsch) | |
11123 | ("java-slf4j-api" ,java-slf4j-api))) | |
11124 | (home-page "https://eclipse.org/jgit/") | |
11125 | (synopsis "Java library implementing the Git version control system") | |
11126 | (description "JGit is a lightweight, pure Java library implementing the | |
11127 | Git version control system, providing repository access routines, support for | |
11128 | network protocols, and core version control algorithms.") | |
11129 | (license license:edl1.0))) | |
11130 | ||
11131 | ;; For axoloti. This package can still be built with icedtea-7, which is | |
11132 | ;; currently used as the default JDK. | |
11133 | (define-public java-jgit-4.2 | |
11134 | (package (inherit java-jgit) | |
11135 | (version "4.2.0.201601211800-r") | |
11136 | (source (origin | |
11137 | (method url-fetch) | |
11138 | (uri (string-append "https://repo1.maven.org/maven2/" | |
11139 | "org/eclipse/jgit/org.eclipse.jgit/" | |
11140 | version "/org.eclipse.jgit-" | |
11141 | version "-sources.jar")) | |
11142 | (sha256 | |
11143 | (base32 | |
11144 | "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm")))) | |
11145 | (build-system ant-build-system) | |
11146 | (arguments | |
11147 | (substitute-keyword-arguments (package-arguments java-jgit) | |
11148 | ;; Build for default JDK. | |
11149 | ((#:jdk _) icedtea-7) | |
11150 | ((#:phases phases) | |
11151 | `(modify-phases ,phases | |
11152 | (add-after 'unpack 'use-latest-javaewah-API | |
11153 | (lambda _ | |
11154 | (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java" | |
11155 | (("wordinbits") "WORD_IN_BITS")) | |
11156 | #t)))))) | |
11157 | (inputs | |
11158 | `(("java-javaewah" ,java-javaewah) | |
11159 | ("java-jsch" ,java-jsch) | |
11160 | ("java-slf4j-api" ,java-slf4j-api))))) | |
717b6ba6 CZ |
11161 | |
11162 | (define-public abcl | |
11163 | (package | |
11164 | (name "abcl") | |
11165 | (version "1.5.0") | |
11166 | (source | |
11167 | (origin | |
11168 | (method url-fetch) | |
11169 | (uri (string-append "https://abcl.org/releases/" | |
11170 | version "/abcl-src-" version ".tar.gz")) | |
11171 | (sha256 | |
11172 | (base32 | |
11173 | "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj")) | |
11174 | (patches | |
11175 | (search-patches | |
11176 | "abcl-fix-build-xml.patch")))) | |
11177 | (build-system ant-build-system) | |
11178 | (native-inputs | |
11179 | `(("java-junit" ,java-junit))) | |
11180 | (arguments | |
11181 | `(#:build-target "abcl.jar" | |
11182 | #:test-target "abcl.test" | |
11183 | #:phases | |
11184 | (modify-phases %standard-phases | |
11185 | (replace 'install | |
11186 | (lambda* (#:key outputs #:allow-other-keys) | |
11187 | (let ((share (string-append (assoc-ref outputs "out") | |
11188 | "/share/java/")) | |
11189 | (bin (string-append (assoc-ref outputs "out") | |
11190 | "/bin/"))) | |
11191 | (mkdir-p share) | |
11192 | (install-file "dist/abcl.jar" share) | |
11193 | (install-file "dist/abcl-contrib.jar" share) | |
11194 | (mkdir-p bin) | |
11195 | (with-output-to-file (string-append bin "abcl") | |
11196 | (lambda _ | |
11197 | (let ((classpath (string-append | |
11198 | share "abcl.jar" | |
11199 | ":" | |
11200 | share "abcl-contrib.jar"))) | |
11201 | (display (string-append | |
11202 | "#!" (which "sh") "\n" | |
11203 | "if [[ -z $CLASSPATH ]]; then\n" | |
11204 | " cp=\"" classpath "\"\n" | |
11205 | "else\n" | |
11206 | " cp=\"" classpath ":$CLASSPATH\"\n" | |
11207 | "fi\n" | |
11208 | "exec " (which "java") | |
11209 | " -cp $cp org.armedbear.lisp.Main $@\n"))))) | |
11210 | (chmod (string-append bin "abcl") #o755) | |
11211 | #t)))))) | |
11212 | (home-page "https://abcl.org/") | |
11213 | (synopsis "Common Lisp Implementation on the JVM") | |
11214 | (description | |
11215 | "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common | |
11216 | Lisp language featuring both an interpreter and a compiler, running in the | |
11217 | JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine | |
11218 | in any Java application. Additionally, it can be used to implement (parts of) | |
11219 | the application using Java to Lisp integration APIs.") | |
11220 | (license (list license:gpl2+ | |
11221 | ;; named-readtables is released under 3 clause BSD | |
11222 | license:bsd-3 | |
11223 | ;; jfli is released under CPL 1.0 | |
11224 | license:cpl1.0)))) |