Commit | Line | Data |
---|---|---|
0760e3a1 | 1 | ;;; GNU Guix --- Functional package management for GNU |
799c3c86 | 2 | ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net> |
559239af | 3 | ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> |
ea9e58ef CZ |
4 | ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org> |
5 | ;;; Copyright © 2017 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> |
f4548394 | 9 | ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> |
d0e9ded7 GB |
10 | ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com> |
11 | ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com> | |
0760e3a1 RW |
12 | ;;; |
13 | ;;; This file is part of GNU Guix. | |
14 | ;;; | |
15 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
16 | ;;; under the terms of the GNU General Public License as published by | |
17 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
18 | ;;; your option) any later version. | |
19 | ;;; | |
20 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
21 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
22 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
23 | ;;; GNU General Public License for more details. | |
24 | ;;; | |
25 | ;;; You should have received a copy of the GNU General Public License | |
26 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
27 | ||
28 | (define-module (gnu packages java) | |
29 | #:use-module ((guix licenses) #:prefix license:) | |
30 | #:use-module (guix packages) | |
31 | #:use-module (guix download) | |
62c9bfaa | 32 | #:use-module (guix hg-download) |
72885a4c | 33 | #:use-module (guix git-download) |
78745d33 | 34 | #:use-module (guix svn-download) |
f6789047 | 35 | #:use-module (guix utils) |
068e476f | 36 | #:use-module (guix build-system ant) |
0760e3a1 | 37 | #:use-module (guix build-system gnu) |
6a5829d9 | 38 | #:use-module (guix build-system trivial) |
0760e3a1 RW |
39 | #:use-module (gnu packages) |
40 | #:use-module (gnu packages attr) | |
41 | #:use-module (gnu packages autotools) | |
42 | #:use-module (gnu packages base) | |
43 | #:use-module (gnu packages bash) | |
f21403e2 | 44 | #:use-module (gnu packages certs) |
0760e3a1 RW |
45 | #:use-module (gnu packages cpio) |
46 | #:use-module (gnu packages cups) | |
47 | #:use-module (gnu packages compression) | |
48 | #:use-module (gnu packages fontutils) | |
49 | #:use-module (gnu packages gawk) | |
72885a4c | 50 | #:use-module (gnu packages gettext) |
0760e3a1 | 51 | #:use-module (gnu packages gcc) |
8581c813 | 52 | #:use-module (gnu packages gl) |
0760e3a1 RW |
53 | #:use-module (gnu packages gnuzilla) ;nss |
54 | #:use-module (gnu packages ghostscript) ;lcms | |
55 | #:use-module (gnu packages gnome) | |
3a69f5f2 | 56 | #:use-module (gnu packages groovy) |
0760e3a1 | 57 | #:use-module (gnu packages gtk) |
6a5829d9 | 58 | #:use-module (gnu packages guile) |
afb5858d | 59 | #:use-module (gnu packages icu4c) |
0760e3a1 | 60 | #:use-module (gnu packages image) |
c4fd86f9 | 61 | #:use-module (gnu packages libffi) |
0760e3a1 | 62 | #:use-module (gnu packages linux) ;alsa |
2f0d0418 | 63 | #:use-module (gnu packages maths) |
bcb078a4 | 64 | #:use-module (gnu packages onc-rpc) |
5766984b | 65 | #:use-module (gnu packages web) |
0760e3a1 | 66 | #:use-module (gnu packages wget) |
0760e3a1 RW |
67 | #:use-module (gnu packages pkg-config) |
68 | #:use-module (gnu packages perl) | |
c4fd86f9 | 69 | #:use-module (gnu packages popt) |
89e34644 | 70 | #:use-module (gnu packages kerberos) |
0760e3a1 RW |
71 | #:use-module (gnu packages xml) |
72 | #:use-module (gnu packages xorg) | |
f6789047 | 73 | #:use-module (gnu packages texinfo) |
2d15f601 RW |
74 | #:use-module ((srfi srfi-1) #:select (fold alist-delete)) |
75 | #:use-module (srfi srfi-11) | |
76 | #:use-module (ice-9 match)) | |
0760e3a1 | 77 | |
e1ae3587 RW |
78 | \f |
79 | ;;; | |
80 | ;;; Java bootstrap toolchain. | |
81 | ;;; | |
82 | ||
83 | ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We | |
269fb7d3 RW |
84 | ;; use it to build a simple version of GNU Classpath, the Java standard |
85 | ;; library. We chose version 0.93 because it is the last version that can be | |
86 | ;; built with Jikes. With Jikes and this version of GNU Classpath we can | |
87 | ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is | |
88 | ;; the last version of JamVM that works with a version of GNU classpath that | |
89 | ;; does not require ECJ. These three packages make up the bootstrap JDK. | |
90 | ||
91 | ;; This is sufficient to build an older version of Ant, which is needed to | |
92 | ;; build an older version of ECJ, an incremental Java compiler, both of which | |
93 | ;; are written in Java. | |
e1ae3587 | 94 | ;; |
269fb7d3 RW |
95 | ;; ECJ is needed to build the latest release (0.99) and the development |
96 | ;; version of GNU Classpath. The development version of GNU Classpath has | |
97 | ;; much more support for Java 1.6 than the latest release, but we need to | |
98 | ;; build 0.99 first to get a working version of javah. ECJ, the development | |
99 | ;; version of GNU Classpath, and the latest version of JamVM make up the | |
100 | ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x | |
101 | ;; build framework. We then build the more recent JDKs Icedtea 2.x and | |
102 | ;; Icedtea 3.x. | |
e1ae3587 RW |
103 | |
104 | (define jikes | |
105 | (package | |
106 | (name "jikes") | |
107 | (version "1.22") | |
108 | (source (origin | |
109 | (method url-fetch) | |
110 | (uri (string-append "mirror://sourceforge/jikes/Jikes/" | |
111 | version "/jikes-" version ".tar.bz2")) | |
112 | (sha256 | |
113 | (base32 | |
114 | "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c")))) | |
115 | (build-system gnu-build-system) | |
116 | (home-page "http://jikes.sourceforge.net/") | |
117 | (synopsis "Compiler for the Java language") | |
118 | (description "Jikes is a compiler that translates Java source files as | |
119 | defined in The Java Language Specification into the bytecoded instruction set | |
120 | and binary format defined in The Java Virtual Machine Specification.") | |
121 | (license license:ibmpl1.0))) | |
122 | ||
45f762ee RW |
123 | ;; This is the last version of GNU Classpath that can be built without ECJ. |
124 | (define classpath-bootstrap | |
2551fee8 | 125 | (package |
45f762ee RW |
126 | (name "classpath") |
127 | (version "0.93") | |
2551fee8 RW |
128 | (source (origin |
129 | (method url-fetch) | |
45f762ee RW |
130 | (uri (string-append "mirror://gnu/classpath/classpath-" |
131 | version ".tar.gz")) | |
2551fee8 RW |
132 | (sha256 |
133 | (base32 | |
bab9793f EF |
134 | "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz")) |
135 | (patches (search-patches "classpath-aarch64-support.patch")))) | |
2551fee8 RW |
136 | (build-system gnu-build-system) |
137 | (arguments | |
138 | `(#:configure-flags | |
45f762ee RW |
139 | (list (string-append "JAVAC=" |
140 | (assoc-ref %build-inputs "jikes") | |
141 | "/bin/jikes") | |
2551fee8 RW |
142 | "--disable-Werror" |
143 | "--disable-gmp" | |
144 | "--disable-gtk-peer" | |
45f762ee | 145 | "--disable-gconf-peer" |
2551fee8 RW |
146 | "--disable-plugin" |
147 | "--disable-dssi" | |
148 | "--disable-alsa" | |
45f762ee RW |
149 | "--disable-gjdoc") |
150 | #:phases | |
151 | (modify-phases %standard-phases | |
152 | (add-after 'install 'install-data | |
153 | (lambda _ (zero? (system* "make" "install-data"))))))) | |
2551fee8 RW |
154 | (native-inputs |
155 | `(("jikes" ,jikes) | |
156 | ("fastjar" ,fastjar) | |
45f762ee | 157 | ("libltdl" ,libltdl) |
2551fee8 | 158 | ("pkg-config" ,pkg-config))) |
45f762ee RW |
159 | (home-page "https://www.gnu.org/software/classpath/") |
160 | (synopsis "Essential libraries for Java") | |
161 | (description "GNU Classpath is a project to create core class libraries | |
162 | for use with runtimes, compilers and tools for the Java programming | |
163 | language.") | |
164 | ;; GPLv2 or later, with special linking exception. | |
165 | (license license:gpl2+))) | |
57f6c50d | 166 | |
063629aa RW |
167 | ;; This is the last version of JamVM that works with a version of GNU |
168 | ;; classpath that does not require ECJ. | |
169 | (define jamvm-1-bootstrap | |
57f6c50d | 170 | (package |
063629aa RW |
171 | (name "jamvm") |
172 | (version "1.5.1") | |
57f6c50d RW |
173 | (source (origin |
174 | (method url-fetch) | |
063629aa RW |
175 | (uri (string-append "mirror://sourceforge/jamvm/jamvm/" |
176 | "JamVM%20" version "/jamvm-" | |
177 | version ".tar.gz")) | |
57f6c50d RW |
178 | (sha256 |
179 | (base32 | |
063629aa | 180 | "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36")))) |
57f6c50d RW |
181 | (build-system gnu-build-system) |
182 | (arguments | |
c4fd86f9 | 183 | `(#:configure-flags |
063629aa RW |
184 | (list (string-append "--with-classpath-install-dir=" |
185 | (assoc-ref %build-inputs "classpath"))))) | |
57f6c50d | 186 | (inputs |
063629aa | 187 | `(("classpath" ,classpath-bootstrap) |
57f6c50d | 188 | ("jikes" ,jikes) |
063629aa RW |
189 | ("zlib" ,zlib))) |
190 | (home-page "http://jamvm.sourceforge.net/") | |
191 | (synopsis "Small Java Virtual Machine") | |
192 | (description "JamVM is a Java Virtual Machine conforming to the JVM | |
193 | specification edition 2 (blue book). It is extremely small. However, unlike | |
194 | other small VMs it supports the full spec, including object finalisation and | |
195 | JNI.") | |
196 | (license license:gpl2+))) | |
2551fee8 | 197 | |
5783bd77 RW |
198 | (define ant-bootstrap |
199 | (package | |
200 | (name "ant-bootstrap") | |
201 | ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which | |
202 | ;; are not supported. The 1.8.x series is the last to use only features | |
ff4d9fdf RW |
203 | ;; supported by Jikes. |
204 | (version "1.8.4") | |
5783bd77 RW |
205 | (source (origin |
206 | (method url-fetch) | |
207 | (uri (string-append "http://archive.apache.org/dist/" | |
208 | "ant/source/apache-ant-" | |
209 | version "-src.tar.bz2")) | |
210 | (sha256 | |
211 | (base32 | |
ff4d9fdf | 212 | "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx")))) |
5783bd77 RW |
213 | (build-system gnu-build-system) |
214 | (arguments | |
215 | `(#:tests? #f ; no "check" target | |
216 | #:phases | |
217 | (modify-phases %standard-phases | |
d4fd4c3a | 218 | (delete 'bootstrap) |
5783bd77 RW |
219 | (delete 'configure) |
220 | (replace 'build | |
221 | (lambda* (#:key inputs #:allow-other-keys) | |
aa432388 | 222 | (setenv "JAVA_HOME" (assoc-ref inputs "jamvm")) |
5783bd77 | 223 | (setenv "JAVACMD" |
aa432388 RW |
224 | (string-append (assoc-ref inputs "jamvm") |
225 | "/bin/jamvm")) | |
5783bd77 | 226 | (setenv "JAVAC" |
aa432388 RW |
227 | (string-append (assoc-ref inputs "jikes") |
228 | "/bin/jikes")) | |
229 | (setenv "CLASSPATH" | |
230 | (string-append (assoc-ref inputs "jamvm") | |
231 | "/lib/rt.jar")) | |
5783bd77 | 232 | |
d4fd4c3a RW |
233 | ;; Ant complains if this file doesn't exist. |
234 | (setenv "HOME" "/tmp") | |
235 | (with-output-to-file "/tmp/.ant.properties" | |
236 | (lambda _ (display ""))) | |
5783bd77 RW |
237 | |
238 | ;; Use jikes instead of javac for <javac ...> tags in build.xml | |
239 | (setenv "ANT_OPTS" "-Dbuild.compiler=jikes") | |
240 | ||
241 | ;; jikes produces lots of warnings, but they are not very | |
242 | ;; interesting, so we silence them. | |
243 | (setenv "$BOOTJAVAC_OPTS" "-nowarn") | |
244 | ||
d4fd4c3a RW |
245 | ;; Without these JamVM options the build may freeze. |
246 | (substitute* "bootstrap.sh" | |
247 | (("^\"\\$\\{JAVACMD\\}\" " m) | |
248 | (string-append m "-Xnocompact -Xnoinlining "))) | |
249 | ||
5783bd77 RW |
250 | ;; Disable tests because we are bootstrapping and thus don't have |
251 | ;; any of the dependencies required to build and run the tests. | |
252 | (substitute* "build.xml" | |
253 | (("depends=\"jars,test-jar\"") "depends=\"jars\"")) | |
254 | (zero? (system* "bash" "bootstrap.sh" | |
255 | (string-append "-Ddist.dir=" | |
256 | (assoc-ref %outputs "out")))))) | |
257 | (delete 'install)))) | |
258 | (native-inputs | |
259 | `(("jikes" ,jikes) | |
aa432388 | 260 | ("jamvm" ,jamvm-1-bootstrap))) |
5783bd77 RW |
261 | (home-page "http://ant.apache.org") |
262 | (synopsis "Build tool for Java") | |
263 | (description | |
264 | "Ant is a platform-independent build tool for Java. It is similar to | |
265 | make but is implemented using the Java language, requires the Java platform, | |
266 | and is best suited to building Java projects. Ant uses XML to describe the | |
267 | build process and its dependencies, whereas Make uses Makefile format.") | |
268 | (license license:asl2.0))) | |
269 | ||
5461721f RW |
270 | ;; Version 3.2.2 is the last version without a dependency on a full-fledged |
271 | ;; compiler for Java 1.5. | |
272 | (define ecj-bootstrap | |
273 | (package | |
274 | (name "ecj-bootstrap") | |
275 | (version "3.2.2") | |
276 | (source (origin | |
277 | (method url-fetch) | |
278 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
279 | "downloads/drops/R-" version | |
280 | "-200702121330/ecjsrc.zip")) | |
281 | (sha256 | |
282 | (base32 | |
283 | "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307")))) | |
284 | ;; It would be so much easier if we could use the ant-build-system, but we | |
285 | ;; cannot as we don't have ant at this point. We use ecj for | |
286 | ;; bootstrapping the JDK. | |
287 | (build-system gnu-build-system) | |
288 | (arguments | |
289 | `(#:modules ((guix build gnu-build-system) | |
290 | (guix build utils) | |
291 | (srfi srfi-1)) | |
292 | #:tests? #f ; there are no tests | |
293 | #:phases | |
294 | (modify-phases %standard-phases | |
295 | (replace 'configure | |
296 | (lambda* (#:key inputs #:allow-other-keys) | |
297 | (setenv "CLASSPATH" | |
298 | (string-join | |
6c775dc6 RW |
299 | (cons (string-append (assoc-ref inputs "jamvm") |
300 | "/lib/rt.jar") | |
301 | (find-files (string-append | |
302 | (assoc-ref inputs "ant-bootstrap") | |
303 | "/lib") | |
304 | "\\.jar$")) | |
5461721f RW |
305 | ":")) |
306 | #t)) | |
307 | (replace 'build | |
308 | (lambda* (#:key inputs #:allow-other-keys) | |
309 | ;; The unpack phase enters the "org" directory by mistake. | |
310 | (chdir "..") | |
311 | ||
312 | ;; Create a simple manifest to make ecj executable. | |
313 | (with-output-to-file "manifest" | |
314 | (lambda _ | |
315 | (display "Manifest-Version: 1.0 | |
316 | Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"))) | |
317 | ||
318 | ;; Compile it all! | |
6c775dc6 | 319 | (and (zero? (apply system* "jikes" |
5461721f RW |
320 | (find-files "." "\\.java$"))) |
321 | (zero? (system* "fastjar" "cvfm" | |
322 | "ecj-bootstrap.jar" "manifest" "."))))) | |
323 | (replace 'install | |
324 | (lambda* (#:key outputs #:allow-other-keys) | |
325 | (let ((share (string-append (assoc-ref outputs "out") | |
326 | "/share/java/"))) | |
327 | (mkdir-p share) | |
328 | (install-file "ecj-bootstrap.jar" share) | |
329 | #t)))))) | |
330 | (native-inputs | |
331 | `(("ant-bootstrap" ,ant-bootstrap) | |
332 | ("unzip" ,unzip) | |
6c775dc6 RW |
333 | ("jikes" ,jikes) |
334 | ("jamvm" ,jamvm-1-bootstrap) | |
5461721f RW |
335 | ("fastjar" ,fastjar))) |
336 | (home-page "https://eclipse.org") | |
337 | (synopsis "Eclipse Java development tools core batch compiler") | |
338 | (description "This package provides the Eclipse Java core batch compiler | |
339 | for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a | |
340 | requirement for all GNU Classpath releases after version 0.93.") | |
341 | (license license:epl1.0))) | |
342 | ||
6a5829d9 RW |
343 | (define ecj-javac-wrapper |
344 | (package (inherit ecj-bootstrap) | |
345 | (name "ecj-javac-wrapper") | |
346 | (source #f) | |
347 | (build-system trivial-build-system) | |
348 | (arguments | |
349 | `(#:modules ((guix build utils)) | |
350 | #:builder | |
c4f06c11 | 351 | (begin |
6a5829d9 RW |
352 | (use-modules (guix build utils)) |
353 | (let* ((bin (string-append (assoc-ref %outputs "out") "/bin")) | |
354 | (target (string-append bin "/javac")) | |
355 | (guile (string-append (assoc-ref %build-inputs "guile") | |
356 | "/bin/guile")) | |
357 | (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap") | |
358 | "/share/java/ecj-bootstrap.jar")) | |
c4f06c11 RW |
359 | (java (string-append (assoc-ref %build-inputs "jamvm") |
360 | "/bin/jamvm")) | |
361 | (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath") | |
362 | "/share/classpath"))) | |
51602aac RW |
363 | (string-append jvmlib "/glibj.zip:" |
364 | jvmlib "/tools.zip")))) | |
6a5829d9 RW |
365 | (mkdir-p bin) |
366 | (with-output-to-file target | |
367 | (lambda _ | |
368 | (format #t "#!~a --no-auto-compile\n!#\n" guile) | |
369 | (write | |
370 | `(begin (use-modules (ice-9 match) | |
371 | (ice-9 receive) | |
372 | (ice-9 hash-table) | |
373 | (srfi srfi-1) | |
374 | (srfi srfi-26)) | |
375 | (define defaults | |
376 | '(("-bootclasspath" ,bootcp) | |
377 | ("-source" "1.5") | |
378 | ("-target" "1.5") | |
379 | ("-cp" "."))) | |
380 | (define (main args) | |
381 | (let ((classpath (getenv "CLASSPATH"))) | |
382 | (setenv "CLASSPATH" | |
c4f06c11 RW |
383 | (string-join (list ,ecj |
384 | ,(string-append (assoc-ref %build-inputs "jamvm") | |
385 | "/lib/rt.jar") | |
386 | (or classpath "")) | |
387 | ":"))) | |
6a5829d9 RW |
388 | (receive (vm-args other-args) |
389 | ;; Separate VM arguments from arguments to ECJ. | |
390 | (partition (cut string-prefix? "-J" <>) | |
391 | (fold (lambda (default acc) | |
392 | (if (member (first default) acc) | |
393 | acc (append default acc))) | |
394 | args defaults)) | |
395 | (apply system* ,java | |
396 | (append | |
ae0a5a7e | 397 | (list "-Xnocompact" "-Xnoinlining") |
6a5829d9 RW |
398 | ;; Remove "-J" prefix |
399 | (map (cut string-drop <> 2) vm-args) | |
400 | '("org.eclipse.jdt.internal.compiler.batch.Main") | |
401 | (cons "-nowarn" other-args))))) | |
402 | ;; Entry point | |
403 | (let ((args (cdr (command-line)))) | |
404 | (if (null? args) | |
405 | (format (current-error-port) "javac: no arguments given!\n") | |
406 | (main args))))))) | |
407 | (chmod target #o755) | |
408 | #t)))) | |
409 | (native-inputs | |
410 | `(("guile" ,guile-2.2) | |
411 | ("ecj-bootstrap" ,ecj-bootstrap) | |
c4f06c11 RW |
412 | ("jamvm" ,jamvm-1-bootstrap) |
413 | ("classpath" ,classpath-bootstrap))) | |
6a5829d9 RW |
414 | (description "This package provides a wrapper around the @dfn{Eclipse |
415 | compiler for Java} (ecj) with a command line interface that is compatible with | |
416 | the standard javac executable."))) | |
417 | ||
8778da03 RW |
418 | ;; The classpath-bootstrap was built without a virtual machine, so it does not |
419 | ;; provide a wrapper for javah. We cannot build the development version of | |
420 | ;; Classpath without javah. | |
421 | (define classpath-0.99 | |
422 | (package (inherit classpath-bootstrap) | |
d3551e86 RW |
423 | (version "0.99") |
424 | (source (origin | |
425 | (method url-fetch) | |
426 | (uri (string-append "mirror://gnu/classpath/classpath-" | |
427 | version ".tar.gz")) | |
428 | (sha256 | |
429 | (base32 | |
bab9793f EF |
430 | "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr")) |
431 | (patches (search-patches "classpath-aarch64-support.patch")))) | |
d3551e86 RW |
432 | (arguments |
433 | `(#:configure-flags | |
434 | (list (string-append "--with-ecj-jar=" | |
435 | (assoc-ref %build-inputs "ecj-bootstrap") | |
436 | "/share/java/ecj-bootstrap.jar") | |
437 | (string-append "JAVAC=" | |
438 | (assoc-ref %build-inputs "ecj-javac-wrapper") | |
439 | "/bin/javac") | |
440 | (string-append "JAVA=" | |
8778da03 RW |
441 | (assoc-ref %build-inputs "jamvm") |
442 | "/bin/jamvm") | |
d3551e86 RW |
443 | "GCJ_JAVAC_TRUE=no" |
444 | "ac_cv_prog_java_works=yes" ; trust me | |
445 | "--disable-Werror" | |
446 | "--disable-gmp" | |
447 | "--disable-gtk-peer" | |
448 | "--disable-gconf-peer" | |
449 | "--disable-plugin" | |
450 | "--disable-dssi" | |
451 | "--disable-alsa" | |
452 | "--disable-gjdoc") | |
453 | #:phases | |
454 | (modify-phases %standard-phases | |
455 | (add-after 'install 'install-data | |
456 | (lambda _ (zero? (system* "make" "install-data"))))))) | |
457 | (native-inputs | |
458 | `(("ecj-bootstrap" ,ecj-bootstrap) | |
459 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) | |
460 | ("fastjar" ,fastjar) | |
8778da03 RW |
461 | ("jamvm" ,jamvm-1-bootstrap) |
462 | ("classpath" ,classpath-bootstrap) | |
d3551e86 | 463 | ("libltdl" ,libltdl) |
8778da03 | 464 | ("pkg-config" ,pkg-config))))) |
d3551e86 | 465 | |
c98d7a66 RW |
466 | ;; We need this because classpath-bootstrap does not provide all of the tools |
467 | ;; we need to build classpath-devel. | |
04d7cae2 | 468 | (define classpath-jamvm-wrappers |
c98d7a66 | 469 | (package (inherit classpath-0.99) |
04d7cae2 RW |
470 | (name "classpath-jamvm-wrappers") |
471 | (source #f) | |
472 | (build-system trivial-build-system) | |
473 | (arguments | |
474 | `(#:modules ((guix build utils)) | |
475 | #:builder | |
476 | (begin | |
477 | (use-modules (guix build utils)) | |
478 | (let* ((bash (assoc-ref %build-inputs "bash")) | |
479 | (jamvm (assoc-ref %build-inputs "jamvm")) | |
480 | (classpath (assoc-ref %build-inputs "classpath")) | |
481 | (bin (string-append (assoc-ref %outputs "out") | |
482 | "/bin/"))) | |
483 | (mkdir-p bin) | |
484 | (for-each (lambda (tool) | |
485 | (with-output-to-file (string-append bin tool) | |
486 | (lambda _ | |
487 | (format #t "#!~a/bin/sh | |
40e3a197 | 488 | ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \ |
04d7cae2 RW |
489 | gnu.classpath.tools.~a.~a $@" |
490 | bash jamvm classpath tool | |
491 | (if (string=? "native2ascii" tool) | |
492 | "Native2ASCII" "Main")))) | |
493 | (chmod (string-append bin tool) #o755)) | |
494 | (list "javah" | |
495 | "rmic" | |
496 | "rmid" | |
497 | "orbd" | |
498 | "rmiregistry" | |
499 | "native2ascii")) | |
500 | #t)))) | |
501 | (native-inputs | |
502 | `(("bash" ,bash) | |
c98d7a66 RW |
503 | ("jamvm" ,jamvm-1-bootstrap) |
504 | ("classpath" ,classpath-0.99))) | |
04d7cae2 RW |
505 | (inputs '()) |
506 | (synopsis "Executables from GNU Classpath") | |
507 | (description "This package provides wrappers around the tools provided by | |
508 | the GNU Classpath library. They are executed by the JamVM virtual | |
509 | machine."))) | |
510 | ||
72885a4c RW |
511 | ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since |
512 | ;; then Classpath has gained much more support for Java 1.6. | |
513 | (define-public classpath-devel | |
514 | (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103") | |
515 | (revision "1")) | |
8778da03 | 516 | (package (inherit classpath-bootstrap) |
72885a4c RW |
517 | (version (string-append "0.99-" revision "." (string-take commit 9))) |
518 | (source (origin | |
519 | (method git-fetch) | |
520 | (uri (git-reference | |
5f13bf09 | 521 | (url "https://git.savannah.gnu.org/git/classpath.git") |
72885a4c | 522 | (commit commit))) |
51988e3a | 523 | (file-name (string-append "classpath-" version "-checkout")) |
72885a4c RW |
524 | (sha256 |
525 | (base32 | |
526 | "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4")))) | |
527 | (arguments | |
93c103ab RW |
528 | `(#:make-flags |
529 | ;; Ensure that the initial heap size is smaller than the maximum | |
530 | ;; size. By default only Xmx is set, which can lead to invalid | |
531 | ;; memory settings on some machines with a lot of memory. | |
532 | '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M") | |
533 | #:configure-flags | |
72885a4c RW |
534 | (list (string-append "--with-ecj-jar=" |
535 | (assoc-ref %build-inputs "ecj-bootstrap") | |
536 | "/share/java/ecj-bootstrap.jar") | |
93c103ab | 537 | (string-append "--with-javac=" |
72885a4c RW |
538 | (assoc-ref %build-inputs "ecj-javac-wrapper") |
539 | "/bin/javac") | |
540 | (string-append "JAVA=" | |
541 | (assoc-ref %build-inputs "jamvm") | |
542 | "/bin/jamvm") | |
543 | "GCJ_JAVAC_TRUE=no" | |
544 | "ac_cv_prog_java_works=yes" ; trust me | |
545 | "--disable-Werror" | |
546 | "--disable-gmp" | |
547 | "--disable-gtk-peer" | |
548 | "--disable-gconf-peer" | |
549 | "--disable-plugin" | |
550 | "--disable-dssi" | |
551 | "--disable-alsa" | |
552 | "--disable-gjdoc") | |
553 | #:phases | |
554 | (modify-phases %standard-phases | |
2a69f48e RW |
555 | ;; XXX The bootstrap phase executes autogen.sh, which fails after |
556 | ;; complaining about the lack of gettext. | |
557 | (replace 'bootstrap | |
558 | (lambda _ (invoke "autoreconf" "-vif"))) | |
72885a4c RW |
559 | (add-after 'unpack 'remove-unsupported-annotations |
560 | (lambda _ | |
561 | (substitute* (find-files "java" "\\.java$") | |
562 | (("@Override") "")) | |
563 | #t)) | |
564 | (add-after 'install 'install-data | |
565 | (lambda _ (zero? (system* "make" "install-data"))))))) | |
566 | (native-inputs | |
567 | `(("autoconf" ,autoconf) | |
568 | ("automake" ,automake) | |
569 | ("libtool" ,libtool) | |
570 | ("gettext" ,gettext-minimal) | |
571 | ("texinfo" ,texinfo) | |
572 | ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah | |
573 | ("ecj-bootstrap" ,ecj-bootstrap) | |
b5a0d427 | 574 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
72885a4c | 575 | ("fastjar" ,fastjar) |
58d2b135 | 576 | ("jamvm" ,jamvm-1-bootstrap) |
72885a4c RW |
577 | ("libltdl" ,libltdl) |
578 | ("pkg-config" ,pkg-config)))))) | |
579 | ||
58d2b135 RW |
580 | (define jamvm |
581 | (package (inherit jamvm-1-bootstrap) | |
582 | (version "2.0.0") | |
583 | (source (origin | |
584 | (method url-fetch) | |
585 | (uri (string-append "mirror://sourceforge/jamvm/jamvm/" | |
586 | "JamVM%20" version "/jamvm-" | |
587 | version ".tar.gz")) | |
588 | (sha256 | |
589 | (base32 | |
590 | "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn")))) | |
591 | (build-system gnu-build-system) | |
592 | (arguments | |
593 | `(#:configure-flags | |
594 | (list (string-append "--with-classpath-install-dir=" | |
595 | (assoc-ref %build-inputs "classpath"))))) | |
8c6091e3 RW |
596 | (inputs |
597 | `(("classpath" ,classpath-devel) | |
b5a0d427 | 598 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
8c6091e3 RW |
599 | ("zlib" ,zlib))))) |
600 | ||
b5a0d427 RW |
601 | (define ecj-javac-wrapper-final |
602 | (package (inherit ecj-javac-wrapper) | |
1bf56c72 RW |
603 | (native-inputs |
604 | `(("guile" ,guile-2.2) | |
605 | ("ecj-bootstrap" ,ecj-bootstrap) | |
606 | ("jamvm" ,jamvm) | |
607 | ("classpath" ,classpath-devel))))) | |
608 | ||
98419316 | 609 | ;; The bootstrap JDK consisting of jamvm, classpath-devel, |
b5a0d427 RW |
610 | ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's |
611 | ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x, | |
612 | ;; which uses Java 6 only. | |
98419316 RW |
613 | (define-public icedtea-6 |
614 | (package | |
615 | (name "icedtea") | |
616 | (version "1.13.13") | |
617 | (source (origin | |
618 | (method url-fetch) | |
619 | (uri (string-append | |
620 | "http://icedtea.wildebeest.org/download/source/icedtea6-" | |
621 | version ".tar.xz")) | |
622 | (sha256 | |
623 | (base32 | |
624 | "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg")) | |
625 | (modules '((guix build utils))) | |
626 | (snippet | |
6cbee49d MW |
627 | '(begin |
628 | (substitute* "Makefile.in" | |
629 | ;; do not leak information about the build host | |
630 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") | |
631 | "DISTRIBUTION_ID=\"\\\"guix\\\"\"")) | |
632 | #t)))) | |
98419316 RW |
633 | (build-system gnu-build-system) |
634 | (outputs '("out" ; Java Runtime Environment | |
635 | "jdk" ; Java Development Kit | |
636 | "doc")) ; all documentation | |
637 | (arguments | |
638 | `(;; There are many failing tests and many are known to fail upstream. | |
639 | #:tests? #f | |
640 | ||
641 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build | |
642 | ;; gremlin) doesn't support it yet, so skip this phase. | |
643 | #:validate-runpath? #f | |
644 | ||
645 | #:modules ((guix build utils) | |
646 | (guix build gnu-build-system) | |
647 | (srfi srfi-19)) | |
648 | ||
649 | #:configure-flags | |
650 | `("--enable-bootstrap" | |
651 | "--enable-nss" | |
652 | "--without-rhino" | |
653 | "--with-parallel-jobs" | |
654 | "--disable-downloading" | |
655 | "--disable-tests" | |
656 | ,(string-append "--with-ecj=" | |
657 | (assoc-ref %build-inputs "ecj") | |
658 | "/share/java/ecj-bootstrap.jar") | |
659 | ,(string-append "--with-jar=" | |
660 | (assoc-ref %build-inputs "fastjar") | |
661 | "/bin/fastjar") | |
662 | ,(string-append "--with-jdk-home=" | |
663 | (assoc-ref %build-inputs "classpath")) | |
664 | ,(string-append "--with-java=" | |
665 | (assoc-ref %build-inputs "jamvm") | |
666 | "/bin/jamvm")) | |
667 | #:phases | |
668 | (modify-phases %standard-phases | |
669 | (replace 'unpack | |
670 | (lambda* (#:key source inputs #:allow-other-keys) | |
671 | (and (zero? (system* "tar" "xvf" source)) | |
672 | (begin | |
673 | (chdir (string-append "icedtea6-" ,version)) | |
674 | (mkdir "openjdk") | |
675 | (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk") | |
676 | ;; The convenient OpenJDK source bundle is no longer | |
677 | ;; available for download, so we have to take the sources | |
678 | ;; from the Mercurial repositories and change the Makefile | |
679 | ;; to avoid tests for the OpenJDK zip archive. | |
680 | (with-directory-excursion "openjdk" | |
681 | (for-each (lambda (part) | |
682 | (mkdir part) | |
683 | (copy-recursively | |
684 | (assoc-ref inputs | |
685 | (string-append part "-src")) | |
686 | part)) | |
1cdff8cd | 687 | '("jdk" "corba" |
98419316 | 688 | "langtools" "jaxp" "jaxws"))) |
1cdff8cd GB |
689 | (with-directory-excursion "openjdk" |
690 | (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src")) | |
691 | (rename-file "hg-checkout" "hotspot")) | |
98419316 RW |
692 | (substitute* "Makefile.in" |
693 | (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;") | |
694 | "echo \"trust me\";") | |
695 | ;; The contents of the bootstrap directory must be | |
696 | ;; writeable but when copying from the store they are | |
697 | ;; not. | |
698 | (("mkdir -p lib/rt" line) | |
699 | (string-append line "; chmod -R u+w $(BOOT_DIR)"))) | |
700 | (zero? (system* "chmod" "-R" "u+w" "openjdk")) | |
701 | #t)))) | |
702 | (add-after 'unpack 'use-classpath | |
703 | (lambda* (#:key inputs #:allow-other-keys) | |
b5a0d427 RW |
704 | (let ((jvmlib (assoc-ref inputs "classpath")) |
705 | (jamvm (assoc-ref inputs "jamvm"))) | |
98419316 RW |
706 | ;; Classpath does not provide rt.jar. |
707 | (substitute* "Makefile.in" | |
708 | (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") | |
709 | (string-append jvmlib "/share/classpath/glibj.zip"))) | |
710 | ;; Make sure we can find all classes. | |
711 | (setenv "CLASSPATH" | |
712 | (string-append jvmlib "/share/classpath/glibj.zip:" | |
b5a0d427 RW |
713 | jvmlib "/share/classpath/tools.zip:" |
714 | jamvm "/lib/rt.jar")) | |
98419316 RW |
715 | (setenv "JAVACFLAGS" |
716 | (string-append "-cp " | |
717 | jvmlib "/share/classpath/glibj.zip:" | |
718 | jvmlib "/share/classpath/tools.zip"))) | |
719 | #t)) | |
720 | (add-after 'unpack 'patch-patches | |
721 | (lambda _ | |
722 | ;; shebang in patches so that they apply cleanly | |
723 | (substitute* '("patches/jtreg-jrunscript.patch" | |
724 | "patches/hotspot/hs23/drop_unlicensed_test.patch") | |
725 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
726 | #t)) | |
727 | (add-after 'unpack 'patch-paths | |
728 | (lambda* (#:key inputs #:allow-other-keys) | |
729 | ;; buildtree.make generates shell scripts, so we need to replace | |
730 | ;; the generated shebang | |
731 | (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make") | |
732 | (("/bin/sh") (which "bash"))) | |
733 | ||
734 | (let ((corebin (string-append | |
735 | (assoc-ref inputs "coreutils") "/bin/")) | |
736 | (binbin (string-append | |
737 | (assoc-ref inputs "binutils") "/bin/")) | |
738 | (grepbin (string-append | |
739 | (assoc-ref inputs "grep") "/bin/"))) | |
740 | (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk" | |
741 | "openjdk/corba/make/common/shared/Defs-linux.gmk") | |
742 | (("UNIXCOMMAND_PATH = /bin/") | |
743 | (string-append "UNIXCOMMAND_PATH = " corebin)) | |
744 | (("USRBIN_PATH = /usr/bin/") | |
745 | (string-append "USRBIN_PATH = " corebin)) | |
746 | (("DEVTOOLS_PATH *= */usr/bin/") | |
747 | (string-append "DEVTOOLS_PATH = " corebin)) | |
748 | (("COMPILER_PATH *= */usr/bin/") | |
749 | (string-append "COMPILER_PATH = " | |
750 | (assoc-ref inputs "gcc") "/bin/")) | |
751 | (("DEF_OBJCOPY *=.*objcopy") | |
752 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) | |
753 | ||
754 | ;; fix path to alsa header | |
755 | (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk" | |
756 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
757 | (string-append "ALSA_INCLUDE=" | |
758 | (assoc-ref inputs "alsa-lib") | |
759 | "/include/alsa/version.h"))) | |
760 | ||
761 | ;; fix hard-coded utility paths | |
762 | (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk" | |
763 | "openjdk/corba/make/common/shared/Defs-utils.gmk") | |
764 | (("ECHO *=.*echo") | |
765 | (string-append "ECHO = " (which "echo"))) | |
766 | (("^GREP *=.*grep") | |
767 | (string-append "GREP = " (which "grep"))) | |
768 | (("EGREP *=.*egrep") | |
769 | (string-append "EGREP = " (which "egrep"))) | |
770 | (("CPIO *=.*cpio") | |
771 | (string-append "CPIO = " (which "cpio"))) | |
772 | (("READELF *=.*readelf") | |
773 | (string-append "READELF = " (which "readelf"))) | |
774 | (("^ *AR *=.*ar") | |
775 | (string-append "AR = " (which "ar"))) | |
776 | (("^ *TAR *=.*tar") | |
777 | (string-append "TAR = " (which "tar"))) | |
778 | (("AS *=.*as") | |
779 | (string-append "AS = " (which "as"))) | |
780 | (("LD *=.*ld") | |
781 | (string-append "LD = " (which "ld"))) | |
782 | (("STRIP *=.*strip") | |
783 | (string-append "STRIP = " (which "strip"))) | |
784 | (("NM *=.*nm") | |
785 | (string-append "NM = " (which "nm"))) | |
786 | (("^SH *=.*sh") | |
787 | (string-append "SH = " (which "bash"))) | |
788 | (("^FIND *=.*find") | |
789 | (string-append "FIND = " (which "find"))) | |
790 | (("LDD *=.*ldd") | |
791 | (string-append "LDD = " (which "ldd"))) | |
792 | (("NAWK *=.*(n|g)awk") | |
793 | (string-append "NAWK = " (which "gawk"))) | |
794 | (("XARGS *=.*xargs") | |
795 | (string-append "XARGS = " (which "xargs"))) | |
796 | (("UNZIP *=.*unzip") | |
797 | (string-append "UNZIP = " (which "unzip"))) | |
798 | (("ZIPEXE *=.*zip") | |
799 | (string-append "ZIPEXE = " (which "zip"))) | |
800 | (("SED *=.*sed") | |
801 | (string-append "SED = " (which "sed")))) | |
802 | ||
803 | ;; Some of these timestamps cause problems as they are more than | |
804 | ;; 10 years ago, failing the build process. | |
805 | (substitute* | |
806 | "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties" | |
807 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") | |
808 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") | |
809 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") | |
810 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")) | |
811 | #t))) | |
812 | (add-before 'configure 'set-additional-paths | |
813 | (lambda* (#:key inputs #:allow-other-keys) | |
814 | (setenv "CPATH" | |
815 | (string-append (assoc-ref inputs "libxrender") | |
816 | "/include/X11/extensions" ":" | |
817 | (assoc-ref inputs "libxtst") | |
818 | "/include/X11/extensions" ":" | |
819 | (assoc-ref inputs "libxinerama") | |
820 | "/include/X11/extensions" ":" | |
821 | (or (getenv "CPATH") ""))) | |
822 | (setenv "ALT_CUPS_HEADERS_PATH" | |
823 | (string-append (assoc-ref inputs "cups") | |
824 | "/include")) | |
825 | (setenv "ALT_FREETYPE_HEADERS_PATH" | |
826 | (string-append (assoc-ref inputs "freetype") | |
827 | "/include")) | |
828 | (setenv "ALT_FREETYPE_LIB_PATH" | |
829 | (string-append (assoc-ref inputs "freetype") | |
830 | "/lib")) | |
831 | #t)) | |
832 | (replace 'install | |
833 | (lambda* (#:key outputs #:allow-other-keys) | |
834 | (let ((doc (string-append (assoc-ref outputs "doc") | |
835 | "/share/doc/icedtea")) | |
836 | (jre (assoc-ref outputs "out")) | |
837 | (jdk (assoc-ref outputs "jdk"))) | |
838 | (copy-recursively "openjdk.build/docs" doc) | |
839 | (copy-recursively "openjdk.build/j2re-image" jre) | |
840 | (copy-recursively "openjdk.build/j2sdk-image" jdk)) | |
841 | #t))))) | |
842 | (native-inputs | |
843 | `(("ant" ,ant-bootstrap) | |
844 | ("alsa-lib" ,alsa-lib) | |
845 | ("attr" ,attr) | |
846 | ("classpath" ,classpath-devel) | |
847 | ("coreutils" ,coreutils) | |
848 | ("cpio" ,cpio) | |
849 | ("cups" ,cups) | |
850 | ("ecj" ,ecj-bootstrap) | |
b5a0d427 | 851 | ("ecj-javac" ,ecj-javac-wrapper-final) |
98419316 RW |
852 | ("fastjar" ,fastjar) |
853 | ("fontconfig" ,fontconfig) | |
854 | ("freetype" ,freetype) | |
bcb078a4 | 855 | ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7 |
98419316 RW |
856 | ("gtk" ,gtk+-2) |
857 | ("gawk" ,gawk) | |
858 | ("giflib" ,giflib) | |
859 | ("grep" ,grep) | |
860 | ("jamvm" ,jamvm) | |
861 | ("lcms" ,lcms) | |
862 | ("libjpeg" ,libjpeg) | |
bcb078a4 | 863 | ("libnsl" ,libnsl) |
98419316 RW |
864 | ("libpng" ,libpng) |
865 | ("libtool" ,libtool) | |
866 | ("libx11" ,libx11) | |
867 | ("libxcomposite" ,libxcomposite) | |
868 | ("libxi" ,libxi) | |
869 | ("libxinerama" ,libxinerama) | |
870 | ("libxrender" ,libxrender) | |
871 | ("libxslt" ,libxslt) ;for xsltproc | |
872 | ("libxt" ,libxt) | |
873 | ("libxtst" ,libxtst) | |
874 | ("mit-krb5" ,mit-krb5) | |
875 | ("nss" ,nss) | |
876 | ("nss-certs" ,nss-certs) | |
877 | ("perl" ,perl) | |
878 | ("pkg-config" ,pkg-config) | |
879 | ("procps" ,procps) ;for "free", even though I'm not sure we should use it | |
880 | ("unzip" ,unzip) | |
881 | ("wget" ,wget) | |
882 | ("which" ,which) | |
883 | ("zip" ,zip) | |
884 | ("zlib" ,zlib) | |
885 | ("openjdk-src" | |
886 | ,(origin | |
887 | (method hg-fetch) | |
888 | (uri (hg-reference | |
889 | (url "http://hg.openjdk.java.net/jdk6/jdk6/") | |
890 | (changeset "jdk6-b41"))) | |
891 | (sha256 | |
892 | (base32 | |
893 | "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv")))) | |
894 | ("jdk-src" | |
895 | ,(origin | |
896 | (method hg-fetch) | |
897 | (uri (hg-reference | |
898 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/") | |
899 | (changeset "jdk6-b41"))) | |
900 | (sha256 | |
901 | (base32 | |
902 | "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9")))) | |
903 | ("hotspot-src" | |
904 | ,(origin | |
905 | (method hg-fetch) | |
906 | (uri (hg-reference | |
907 | (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/") | |
908 | (changeset "jdk6-b41"))) | |
909 | (sha256 | |
910 | (base32 | |
1cdff8cd GB |
911 | "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd")) |
912 | (patches | |
913 | (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch")))) | |
98419316 RW |
914 | ("corba-src" |
915 | ,(origin | |
916 | (method hg-fetch) | |
917 | (uri (hg-reference | |
918 | (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/") | |
919 | (changeset "jdk6-b41"))) | |
920 | (sha256 | |
921 | (base32 | |
922 | "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q")))) | |
923 | ("langtools-src" | |
924 | ,(origin | |
925 | (method hg-fetch) | |
926 | (uri (hg-reference | |
927 | (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/") | |
928 | (changeset "jdk6-b41"))) | |
929 | (sha256 | |
930 | (base32 | |
931 | "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d")))) | |
932 | ("jaxp-src" | |
933 | ,(origin | |
934 | (method hg-fetch) | |
935 | (uri (hg-reference | |
936 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/") | |
937 | (changeset "jdk6-b41"))) | |
938 | (sha256 | |
939 | (base32 | |
940 | "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm")))) | |
941 | ("jaxws-src" | |
942 | ,(origin | |
943 | (method hg-fetch) | |
944 | (uri (hg-reference | |
945 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/") | |
946 | (changeset "jdk6-b41"))) | |
947 | (sha256 | |
948 | (base32 | |
949 | "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0")))))) | |
950 | (home-page "http://icedtea.classpath.org") | |
951 | (synopsis "Java development kit") | |
952 | (description | |
953 | "This package provides the OpenJDK built with the IcedTea build harness. | |
954 | This version of the OpenJDK is no longer maintained and is only used for | |
955 | bootstrapping purposes.") | |
956 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the | |
957 | ;; same license as both GNU Classpath and OpenJDK. | |
958 | (license license:gpl2+))) | |
959 | ||
a243e12a | 960 | (define-public icedtea-7 |
7f6485e7 | 961 | (let* ((version "2.6.13") |
f6789047 RW |
962 | (drop (lambda (name hash) |
963 | (origin | |
964 | (method url-fetch) | |
965 | (uri (string-append | |
d30ce4a7 | 966 | "http://icedtea.classpath.org/download/drops" |
f6789047 RW |
967 | "/icedtea7/" version "/" name ".tar.bz2")) |
968 | (sha256 (base32 hash)))))) | |
71053e14 RW |
969 | (package |
970 | (name "icedtea") | |
f6789047 RW |
971 | (version version) |
972 | (source (origin | |
973 | (method url-fetch) | |
974 | (uri (string-append | |
975 | "http://icedtea.wildebeest.org/download/source/icedtea-" | |
976 | version ".tar.xz")) | |
977 | (sha256 | |
978 | (base32 | |
7f6485e7 | 979 | "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh")) |
f6789047 RW |
980 | (modules '((guix build utils))) |
981 | (snippet | |
6cbee49d MW |
982 | '(begin |
983 | (substitute* "Makefile.in" | |
984 | ;; do not leak information about the build host | |
985 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") | |
986 | "DISTRIBUTION_ID=\"\\\"guix\\\"\"")) | |
987 | #t)))) | |
71053e14 RW |
988 | (build-system gnu-build-system) |
989 | (outputs '("out" ; Java Runtime Environment | |
990 | "jdk" ; Java Development Kit | |
991 | "doc")) ; all documentation | |
f6789047 RW |
992 | (arguments |
993 | `(;; There are many test failures. Some are known to | |
994 | ;; fail upstream, others relate to not having an X | |
995 | ;; server running at test time, yet others are a | |
996 | ;; complete mystery to me. | |
997 | ||
998 | ;; hotspot: passed: 241; failed: 45; error: 2 | |
999 | ;; langtools: passed: 1,934; failed: 26 | |
1000 | ;; jdk: unknown | |
1001 | #:tests? #f | |
71053e14 RW |
1002 | |
1003 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build | |
1004 | ;; gremlin) doesn't support it yet, so skip this phase. | |
1005 | #:validate-runpath? #f | |
1006 | ||
f6789047 RW |
1007 | ;; Apparently, the C locale is needed for some of the tests. |
1008 | #:locale "C" | |
71053e14 RW |
1009 | |
1010 | #:modules ((guix build utils) | |
1011 | (guix build gnu-build-system) | |
1012 | (ice-9 match) | |
1013 | (ice-9 popen) | |
71053e14 RW |
1014 | (srfi srfi-19) |
1015 | (srfi srfi-26)) | |
1016 | ||
1017 | #:configure-flags | |
e2098e2d RW |
1018 | ;; TODO: package pcsc and sctp, and add to inputs |
1019 | `("--disable-system-pcsc" | |
1020 | "--disable-system-sctp" | |
1021 | "--enable-bootstrap" | |
1022 | "--enable-nss" | |
1023 | "--without-rhino" | |
1024 | "--disable-downloading" | |
1025 | "--disable-tests" ;they are run in the check phase instead | |
1026 | "--with-openjdk-src-dir=./openjdk.src" | |
1027 | ,(string-append "--with-jdk-home=" | |
1028 | (assoc-ref %build-inputs "jdk"))) | |
71053e14 RW |
1029 | |
1030 | #:phases | |
1031 | (modify-phases %standard-phases | |
1032 | (replace 'unpack | |
1033 | (lambda* (#:key source inputs #:allow-other-keys) | |
1034 | (let ((target (string-append "icedtea-" ,version)) | |
1035 | (unpack (lambda* (name #:optional dir) | |
1036 | (let ((dir (or dir | |
1037 | (string-drop-right name 5)))) | |
1038 | (mkdir dir) | |
1039 | (zero? (system* "tar" "xvf" | |
1040 | (assoc-ref inputs name) | |
1041 | "-C" dir | |
1042 | "--strip-components=1")))))) | |
1043 | (mkdir target) | |
1044 | (and | |
1045 | (zero? (system* "tar" "xvf" source | |
1046 | "-C" target "--strip-components=1")) | |
1047 | (chdir target) | |
1048 | (unpack "openjdk-src" "openjdk.src") | |
1049 | (with-directory-excursion "openjdk.src" | |
1050 | (for-each unpack | |
1051 | (filter (cut string-suffix? "-drop" <>) | |
1052 | (map (match-lambda | |
1053 | ((name . _) name)) | |
1054 | inputs)))) | |
1055 | #t)))) | |
1056 | (add-after 'unpack 'fix-x11-extension-include-path | |
1057 | (lambda* (#:key inputs #:allow-other-keys) | |
1058 | (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk" | |
1059 | (((string-append "\\$\\(firstword \\$\\(wildcard " | |
1060 | "\\$\\(OPENWIN_HOME\\)" | |
1061 | "/include/X11/extensions\\).*$")) | |
1062 | (string-append (assoc-ref inputs "libxrender") | |
1063 | "/include/X11/extensions" | |
1064 | " -I" (assoc-ref inputs "libxtst") | |
1065 | "/include/X11/extensions" | |
1066 | " -I" (assoc-ref inputs "libxinerama") | |
1067 | "/include/X11/extensions")) | |
1068 | (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") "")) | |
1069 | #t)) | |
1070 | (add-after 'unpack 'patch-paths | |
1071 | (lambda _ | |
1072 | ;; buildtree.make generates shell scripts, so we need to replace | |
1073 | ;; the generated shebang | |
1074 | (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make") | |
1075 | (("/bin/sh") (which "bash"))) | |
1076 | ||
1077 | (let ((corebin (string-append | |
1078 | (assoc-ref %build-inputs "coreutils") "/bin/")) | |
1079 | (binbin (string-append | |
1080 | (assoc-ref %build-inputs "binutils") "/bin/")) | |
1081 | (grepbin (string-append | |
1082 | (assoc-ref %build-inputs "grep") "/bin/"))) | |
1083 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk" | |
1084 | "openjdk.src/corba/make/common/shared/Defs-linux.gmk") | |
1085 | (("UNIXCOMMAND_PATH = /bin/") | |
1086 | (string-append "UNIXCOMMAND_PATH = " corebin)) | |
1087 | (("USRBIN_PATH = /usr/bin/") | |
1088 | (string-append "USRBIN_PATH = " corebin)) | |
1089 | (("DEVTOOLS_PATH *= */usr/bin/") | |
1090 | (string-append "DEVTOOLS_PATH = " corebin)) | |
1091 | (("COMPILER_PATH *= */usr/bin/") | |
1092 | (string-append "COMPILER_PATH = " | |
1093 | (assoc-ref %build-inputs "gcc") "/bin/")) | |
1094 | (("DEF_OBJCOPY *=.*objcopy") | |
1095 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) | |
1096 | ||
1097 | ;; fix path to alsa header | |
1098 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" | |
1099 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
1100 | (string-append "ALSA_INCLUDE=" | |
1101 | (assoc-ref %build-inputs "alsa-lib") | |
1102 | "/include/alsa/version.h"))) | |
1103 | ||
1104 | ;; fix hard-coded utility paths | |
1105 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk" | |
1106 | "openjdk.src/corba/make/common/shared/Defs-utils.gmk") | |
1107 | (("ECHO *=.*echo") | |
1108 | (string-append "ECHO = " (which "echo"))) | |
1109 | (("^GREP *=.*grep") | |
1110 | (string-append "GREP = " (which "grep"))) | |
1111 | (("EGREP *=.*egrep") | |
1112 | (string-append "EGREP = " (which "egrep"))) | |
1113 | (("CPIO *=.*cpio") | |
1114 | (string-append "CPIO = " (which "cpio"))) | |
1115 | (("READELF *=.*readelf") | |
1116 | (string-append "READELF = " (which "readelf"))) | |
1117 | (("^ *AR *=.*ar") | |
1118 | (string-append "AR = " (which "ar"))) | |
1119 | (("^ *TAR *=.*tar") | |
1120 | (string-append "TAR = " (which "tar"))) | |
1121 | (("AS *=.*as") | |
1122 | (string-append "AS = " (which "as"))) | |
1123 | (("LD *=.*ld") | |
1124 | (string-append "LD = " (which "ld"))) | |
1125 | (("STRIP *=.*strip") | |
1126 | (string-append "STRIP = " (which "strip"))) | |
1127 | (("NM *=.*nm") | |
1128 | (string-append "NM = " (which "nm"))) | |
1129 | (("^SH *=.*sh") | |
1130 | (string-append "SH = " (which "bash"))) | |
1131 | (("^FIND *=.*find") | |
1132 | (string-append "FIND = " (which "find"))) | |
1133 | (("LDD *=.*ldd") | |
1134 | (string-append "LDD = " (which "ldd"))) | |
1135 | (("NAWK *=.*(n|g)awk") | |
1136 | (string-append "NAWK = " (which "gawk"))) | |
1137 | (("XARGS *=.*xargs") | |
1138 | (string-append "XARGS = " (which "xargs"))) | |
1139 | (("UNZIP *=.*unzip") | |
1140 | (string-append "UNZIP = " (which "unzip"))) | |
1141 | (("ZIPEXE *=.*zip") | |
1142 | (string-append "ZIPEXE = " (which "zip"))) | |
1143 | (("SED *=.*sed") | |
1144 | (string-append "SED = " (which "sed")))) | |
1145 | ||
1146 | ;; Some of these timestamps cause problems as they are more than | |
1147 | ;; 10 years ago, failing the build process. | |
1148 | (substitute* | |
1149 | "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties" | |
1150 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") | |
1151 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") | |
1152 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") | |
1153 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))) | |
1154 | #t)) | |
1155 | (add-before 'configure 'set-additional-paths | |
1156 | (lambda* (#:key inputs #:allow-other-keys) | |
e2098e2d RW |
1157 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" |
1158 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
1159 | (string-append "ALSA_INCLUDE=" | |
1160 | (assoc-ref inputs "alsa-lib") | |
1161 | "/include/alsa/version.h"))) | |
1162 | (setenv "CC" "gcc") | |
1163 | (setenv "CPATH" | |
1164 | (string-append (assoc-ref inputs "libxcomposite") | |
1165 | "/include/X11/extensions" ":" | |
1166 | (assoc-ref inputs "libxrender") | |
1167 | "/include/X11/extensions" ":" | |
1168 | (assoc-ref inputs "libxtst") | |
1169 | "/include/X11/extensions" ":" | |
1170 | (assoc-ref inputs "libxinerama") | |
1171 | "/include/X11/extensions" ":" | |
1172 | (or (getenv "CPATH") ""))) | |
1173 | (setenv "ALT_OBJCOPY" (which "objcopy")) | |
1174 | (setenv "ALT_CUPS_HEADERS_PATH" | |
1175 | (string-append (assoc-ref inputs "cups") | |
1176 | "/include")) | |
1177 | (setenv "ALT_FREETYPE_HEADERS_PATH" | |
1178 | (string-append (assoc-ref inputs "freetype") | |
1179 | "/include")) | |
1180 | (setenv "ALT_FREETYPE_LIB_PATH" | |
1181 | (string-append (assoc-ref inputs "freetype") | |
1182 | "/lib")) | |
71053e14 RW |
1183 | #t)) |
1184 | (add-before 'check 'fix-test-framework | |
1185 | (lambda _ | |
1186 | ;; Fix PATH in test environment | |
1187 | (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java" | |
1188 | (("PATH=/bin:/usr/bin") | |
1189 | (string-append "PATH=" (getenv "PATH")))) | |
1190 | (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java" | |
1191 | (("/usr/bin/env") (which "env"))) | |
1192 | (substitute* "openjdk.src/hotspot/test/test_env.sh" | |
1193 | (("/bin/rm") (which "rm")) | |
1194 | (("/bin/cp") (which "cp")) | |
1195 | (("/bin/mv") (which "mv"))) | |
1196 | #t)) | |
1197 | (add-before 'check 'fix-hotspot-tests | |
1198 | (lambda _ | |
1199 | (with-directory-excursion "openjdk.src/hotspot/test/" | |
1200 | (substitute* "jprt.config" | |
1201 | (("PATH=\"\\$\\{path4sdk\\}\"") | |
1202 | (string-append "PATH=" (getenv "PATH"))) | |
1203 | (("make=/usr/bin/make") | |
1204 | (string-append "make=" (which "make")))) | |
1205 | (substitute* '("runtime/6626217/Test6626217.sh" | |
1206 | "runtime/7110720/Test7110720.sh") | |
1207 | (("/bin/rm") (which "rm")) | |
1208 | (("/bin/cp") (which "cp")) | |
1209 | (("/bin/mv") (which "mv")))) | |
1210 | #t)) | |
1211 | (add-before 'check 'fix-jdk-tests | |
1212 | (lambda _ | |
1213 | (with-directory-excursion "openjdk.src/jdk/test/" | |
1214 | (substitute* "com/sun/jdi/JdbReadTwiceTest.sh" | |
1215 | (("/bin/pwd") (which "pwd"))) | |
1216 | (substitute* "com/sun/jdi/ShellScaffold.sh" | |
1217 | (("/bin/kill") (which "kill"))) | |
1218 | (substitute* "start-Xvfb.sh" | |
1219 | ;;(("/usr/bin/X11/Xvfb") (which "Xvfb")) | |
1220 | (("/usr/bin/nohup") (which "nohup"))) | |
1221 | (substitute* "javax/security/auth/Subject/doAs/Test.sh" | |
1222 | (("/bin/rm") (which "rm"))) | |
1223 | (substitute* "tools/launcher/MultipleJRE.sh" | |
1224 | (("echo \"#!/bin/sh\"") | |
1225 | (string-append "echo \"#!" (which "rm") "\"")) | |
1226 | (("/usr/bin/zip") (which "zip"))) | |
1227 | (substitute* "com/sun/jdi/OnThrowTest.java" | |
1228 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
1229 | (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java" | |
1230 | (("/usr/bin/uptime") (which "uptime"))) | |
1231 | (substitute* "java/lang/ProcessBuilder/Basic.java" | |
1232 | (("/usr/bin/env") (which "env")) | |
1233 | (("/bin/false") (which "false")) | |
1234 | (("/bin/true") (which "true")) | |
1235 | (("/bin/cp") (which "cp")) | |
1236 | (("/bin/sh") (which "sh"))) | |
1237 | (substitute* "java/lang/ProcessBuilder/FeelingLucky.java" | |
1238 | (("/bin/sh") (which "sh"))) | |
1239 | (substitute* "java/lang/ProcessBuilder/Zombies.java" | |
1240 | (("/usr/bin/perl") (which "perl")) | |
1241 | (("/bin/ps") (which "ps")) | |
1242 | (("/bin/true") (which "true"))) | |
1243 | (substitute* "java/lang/Runtime/exec/ConcurrentRead.java" | |
1244 | (("/usr/bin/tee") (which "tee"))) | |
1245 | (substitute* "java/lang/Runtime/exec/ExecWithDir.java" | |
1246 | (("/bin/true") (which "true"))) | |
1247 | (substitute* "java/lang/Runtime/exec/ExecWithInput.java" | |
1248 | (("/bin/cat") (which "cat"))) | |
1249 | (substitute* "java/lang/Runtime/exec/ExitValue.java" | |
1250 | (("/bin/sh") (which "sh")) | |
1251 | (("/bin/true") (which "true")) | |
1252 | (("/bin/kill") (which "kill"))) | |
1253 | (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java" | |
1254 | (("/usr/bin/echo") (which "echo"))) | |
1255 | (substitute* "java/lang/Runtime/exec/LotsOfOutput.java" | |
1256 | (("/usr/bin/cat") (which "cat"))) | |
1257 | (substitute* "java/lang/Runtime/exec/SleepyCat.java" | |
1258 | (("/bin/cat") (which "cat")) | |
1259 | (("/bin/sleep") (which "sleep")) | |
1260 | (("/bin/sh") (which "sh"))) | |
1261 | (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java" | |
1262 | (("/bin/cat") (which "cat"))) | |
1263 | (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java" | |
1264 | (("/bin/chmod") (which "chmod"))) | |
1265 | (substitute* "java/util/zip/ZipFile/Assortment.java" | |
1266 | (("/bin/sh") (which "sh")))) | |
1267 | #t)) | |
1268 | (replace 'check | |
1269 | (lambda _ | |
1270 | ;; The "make check-*" targets always return zero, so we need to | |
1271 | ;; check for errors in the associated log files to determine | |
1272 | ;; whether any tests have failed. | |
1273 | (use-modules (ice-9 rdelim)) | |
1274 | (let* ((error-pattern (make-regexp "^(Error|FAILED):.*")) | |
1275 | (checker (lambda (port) | |
1276 | (let loop () | |
1277 | (let ((line (read-line port))) | |
1278 | (cond | |
1279 | ((eof-object? line) #t) | |
1280 | ((regexp-exec error-pattern line) #f) | |
1281 | (else (loop))))))) | |
1282 | (run-test (lambda (test) | |
1283 | (system* "make" test) | |
1284 | (call-with-input-file | |
1285 | (string-append "test/" test ".log") | |
1286 | checker)))) | |
1287 | (or #t ; skip tests | |
1288 | (and (run-test "check-hotspot") | |
1289 | (run-test "check-langtools") | |
1290 | (run-test "check-jdk")))))) | |
1291 | (replace 'install | |
1292 | (lambda* (#:key outputs #:allow-other-keys) | |
1293 | (let ((doc (string-append (assoc-ref outputs "doc") | |
1294 | "/share/doc/icedtea")) | |
1295 | (jre (assoc-ref outputs "out")) | |
1296 | (jdk (assoc-ref outputs "jdk"))) | |
1297 | (copy-recursively "openjdk.build/docs" doc) | |
1298 | (copy-recursively "openjdk.build/j2re-image" jre) | |
1299 | (copy-recursively "openjdk.build/j2sdk-image" jdk)) | |
1300 | #t)) | |
491dc2fb RJ |
1301 | ;; Some of the libraries in the lib/amd64 folder link to libjvm.so. |
1302 | ;; But that shared object is located in the server/ folder, so it | |
1303 | ;; cannot be found. This phase creates a symbolic link in the | |
1304 | ;; lib/amd64 folder so that the other libraries can find it. | |
1305 | ;; | |
1306 | ;; See: | |
1307 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html | |
1308 | ;; | |
1309 | ;; FIXME: Find the bug in the build system, so that this symlink is | |
1310 | ;; not needed. | |
1311 | (add-after 'install 'install-libjvm | |
1312 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1313 | (let* ((lib-path (string-append (assoc-ref outputs "out") | |
1314 | "/lib/amd64"))) | |
1315 | (symlink (string-append lib-path "/server/libjvm.so") | |
1316 | (string-append lib-path "/libjvm.so"))) | |
1317 | #t)) | |
71053e14 RW |
1318 | ;; By default IcedTea only generates an empty keystore. In order to |
1319 | ;; be able to use certificates in Java programs we need to generate a | |
1320 | ;; keystore from a set of certificates. For convenience we use the | |
1321 | ;; certificates from the nss-certs package. | |
1322 | (add-after 'install 'install-keystore | |
1323 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1324 | (let* ((keystore "cacerts") | |
1325 | (certs-dir (string-append (assoc-ref inputs "nss-certs") | |
1326 | "/etc/ssl/certs")) | |
1327 | (keytool (string-append (assoc-ref outputs "jdk") | |
1328 | "/bin/keytool"))) | |
1329 | (define (extract-cert file target) | |
1330 | (call-with-input-file file | |
1331 | (lambda (in) | |
1332 | (call-with-output-file target | |
1333 | (lambda (out) | |
1334 | (let loop ((line (read-line in 'concat)) | |
1335 | (copying? #f)) | |
1336 | (cond | |
1337 | ((eof-object? line) #t) | |
1338 | ((string-prefix? "-----BEGIN" line) | |
1339 | (display line out) | |
1340 | (loop (read-line in 'concat) #t)) | |
1341 | ((string-prefix? "-----END" line) | |
1342 | (display line out) | |
1343 | #t) | |
1344 | (else | |
1345 | (when copying? (display line out)) | |
1346 | (loop (read-line in 'concat) copying?))))))))) | |
1347 | (define (import-cert cert) | |
1348 | (format #t "Importing certificate ~a\n" (basename cert)) | |
1349 | (let ((temp "tmpcert")) | |
1350 | (extract-cert cert temp) | |
1351 | (let ((port (open-pipe* OPEN_WRITE keytool | |
1352 | "-import" | |
1353 | "-alias" (basename cert) | |
1354 | "-keystore" keystore | |
1355 | "-storepass" "changeit" | |
1356 | "-file" temp))) | |
1357 | (display "yes\n" port) | |
1358 | (when (not (zero? (status:exit-val (close-pipe port)))) | |
1359 | (format #t "failed to import ~a\n" cert))) | |
1360 | (delete-file temp))) | |
1361 | ||
1362 | ;; This is necessary because the certificate directory contains | |
1363 | ;; files with non-ASCII characters in their names. | |
1364 | (setlocale LC_ALL "en_US.utf8") | |
1365 | (setenv "LC_ALL" "en_US.utf8") | |
1366 | ||
1367 | (for-each import-cert (find-files certs-dir "\\.pem$")) | |
1368 | (mkdir-p (string-append (assoc-ref outputs "out") | |
1369 | "/lib/security")) | |
1370 | (mkdir-p (string-append (assoc-ref outputs "jdk") | |
1371 | "/jre/lib/security")) | |
1372 | ||
1373 | ;; The cacerts files we are going to overwrite are chmod'ed as | |
1374 | ;; read-only (444) in icedtea-8 (which derives from this | |
1375 | ;; package). We have to change this so we can overwrite them. | |
1376 | (chmod (string-append (assoc-ref outputs "out") | |
1377 | "/lib/security/" keystore) #o644) | |
1378 | (chmod (string-append (assoc-ref outputs "jdk") | |
1379 | "/jre/lib/security/" keystore) #o644) | |
1380 | ||
1381 | (install-file keystore | |
1382 | (string-append (assoc-ref outputs "out") | |
1383 | "/lib/security")) | |
1384 | (install-file keystore | |
1385 | (string-append (assoc-ref outputs "jdk") | |
1386 | "/jre/lib/security")) | |
1387 | #t)))))) | |
f6789047 | 1388 | (native-inputs |
d9148890 | 1389 | `(("openjdk-src" |
f6789047 | 1390 | ,(drop "openjdk" |
7f6485e7 | 1391 | "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l")) |
f6789047 RW |
1392 | ("corba-drop" |
1393 | ,(drop "corba" | |
7f6485e7 | 1394 | "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz")) |
f6789047 RW |
1395 | ("jaxp-drop" |
1396 | ,(drop "jaxp" | |
7f6485e7 | 1397 | "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl")) |
f6789047 RW |
1398 | ("jaxws-drop" |
1399 | ,(drop "jaxws" | |
7f6485e7 | 1400 | "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk")) |
f6789047 RW |
1401 | ("jdk-drop" |
1402 | ,(drop "jdk" | |
7f6485e7 | 1403 | "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd")) |
f6789047 RW |
1404 | ("langtools-drop" |
1405 | ,(drop "langtools" | |
7f6485e7 | 1406 | "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj")) |
f6789047 RW |
1407 | ("hotspot-drop" |
1408 | ,(drop "hotspot" | |
7f6485e7 | 1409 | "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws")) |
e2098e2d | 1410 | ("ant" ,ant-bootstrap) |
71053e14 | 1411 | ("attr" ,attr) |
71053e14 RW |
1412 | ("coreutils" ,coreutils) |
1413 | ("diffutils" ,diffutils) ;for tests | |
1414 | ("gawk" ,gawk) | |
1415 | ("grep" ,grep) | |
1416 | ("libtool" ,libtool) | |
1417 | ("pkg-config" ,pkg-config) | |
1418 | ("wget" ,wget) | |
1419 | ("which" ,which) | |
1420 | ("cpio" ,cpio) | |
1421 | ("zip" ,zip) | |
1422 | ("unzip" ,unzip) | |
1423 | ("fastjar" ,fastjar) | |
1424 | ("libxslt" ,libxslt) ;for xsltproc | |
1425 | ("nss-certs" ,nss-certs) | |
1426 | ("perl" ,perl) | |
1427 | ("procps" ,procps) ;for "free", even though I'm not sure we should use it | |
e2098e2d | 1428 | ("jdk" ,icedtea-6 "jdk"))) |
b711df02 | 1429 | (inputs |
71053e14 RW |
1430 | `(("alsa-lib" ,alsa-lib) |
1431 | ("cups" ,cups) | |
1432 | ("libx11" ,libx11) | |
1433 | ("libxcomposite" ,libxcomposite) | |
1434 | ("libxt" ,libxt) | |
1435 | ("libxtst" ,libxtst) | |
1436 | ("libxi" ,libxi) | |
1437 | ("libxinerama" ,libxinerama) | |
1438 | ("libxrender" ,libxrender) | |
1439 | ("libjpeg" ,libjpeg) | |
1440 | ("libpng" ,libpng) | |
1441 | ("mit-krb5" ,mit-krb5) | |
1442 | ("nss" ,nss) | |
1443 | ("giflib" ,giflib) | |
1444 | ("fontconfig" ,fontconfig) | |
1445 | ("freetype" ,freetype) | |
1446 | ("lcms" ,lcms) | |
1447 | ("zlib" ,zlib) | |
1448 | ("gtk" ,gtk+-2))) | |
1449 | (home-page "http://icedtea.classpath.org") | |
1450 | (synopsis "Java development kit") | |
1451 | (description | |
1452 | "This package provides the Java development kit OpenJDK built with the | |
1453 | IcedTea build harness.") | |
1454 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the | |
1455 | ;; same license as both GNU Classpath and OpenJDK. | |
1456 | (license license:gpl2+)))) | |
d2540f80 | 1457 | |
349a3147 | 1458 | (define-public icedtea-8 |
1d97d8ff | 1459 | (let* ((version "3.7.0") |
349a3147 RW |
1460 | (drop (lambda (name hash) |
1461 | (origin | |
1462 | (method url-fetch) | |
1463 | (uri (string-append | |
db531f73 | 1464 | "http://icedtea.classpath.org/download/drops" |
349a3147 RW |
1465 | "/icedtea8/" version "/" name ".tar.xz")) |
1466 | (sha256 (base32 hash)))))) | |
1467 | (package (inherit icedtea-7) | |
1d97d8ff | 1468 | (version "3.7.0") |
349a3147 RW |
1469 | (source (origin |
1470 | (method url-fetch) | |
1471 | (uri (string-append | |
1472 | "http://icedtea.wildebeest.org/download/source/icedtea-" | |
1473 | version ".tar.xz")) | |
1474 | (sha256 | |
1475 | (base32 | |
1d97d8ff | 1476 | "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w")) |
349a3147 RW |
1477 | (modules '((guix build utils))) |
1478 | (snippet | |
0c729ef4 | 1479 | '(begin |
f2785bd6 RW |
1480 | (substitute* '("configure" |
1481 | "acinclude.m4") | |
0c729ef4 RW |
1482 | ;; Do not embed build time |
1483 | (("(DIST_ID=\"Custom build).*$" _ prefix) | |
1484 | (string-append prefix "\"\n")) | |
1485 | ;; Do not leak information about the build host | |
1486 | (("DIST_NAME=\"\\$build_os\"") | |
1487 | "DIST_NAME=\"guix\"")) | |
1488 | #t)))) | |
349a3147 | 1489 | (arguments |
f2785bd6 RW |
1490 | `(#:imported-modules |
1491 | ((guix build ant-build-system) | |
1492 | (guix build syscalls) | |
1493 | ,@%gnu-build-system-modules) | |
1494 | ,@(substitute-keyword-arguments (package-arguments icedtea-7) | |
1495 | ((#:modules modules) | |
1496 | `((guix build utils) | |
1497 | (guix build gnu-build-system) | |
1498 | ((guix build ant-build-system) #:prefix ant:) | |
1499 | (ice-9 match) | |
1500 | (ice-9 popen) | |
1501 | (srfi srfi-19) | |
1502 | (srfi srfi-26))) | |
1503 | ((#:configure-flags flags) | |
1504 | `(let ((jdk (assoc-ref %build-inputs "jdk"))) | |
1505 | `( ;;"--disable-bootstrap" | |
1506 | "--enable-bootstrap" | |
1507 | "--enable-nss" | |
1508 | "--disable-downloading" | |
1509 | "--disable-system-pcsc" | |
1510 | "--disable-system-sctp" | |
1511 | "--disable-tests" ;they are run in the check phase instead | |
1512 | "--with-openjdk-src-dir=./openjdk.src" | |
1513 | ,(string-append "--with-jdk-home=" jdk)))) | |
1514 | ((#:phases phases) | |
1515 | `(modify-phases ,phases | |
1516 | (delete 'fix-x11-extension-include-path) | |
1517 | (delete 'patch-paths) | |
1518 | (delete 'set-additional-paths) | |
1519 | (delete 'patch-patches) | |
1520 | ;; Prevent the keytool from recording the current time when | |
1521 | ;; adding certificates at build time. | |
1522 | (add-after 'unpack 'patch-keystore | |
1523 | (lambda _ | |
1524 | (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java" | |
1525 | (("date = new Date\\(\\);") | |
1526 | "\ | |
1527 | date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\ | |
1528 | new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\ | |
1529 | new Date();")) | |
1530 | #t)) | |
1531 | (add-after 'unpack 'patch-jni-libs | |
1532 | ;; Hardcode dynamically loaded libraries. | |
1533 | (lambda _ | |
1534 | (let* ((library-path (search-path-as-string->list | |
1535 | (getenv "LIBRARY_PATH"))) | |
1536 | (find-library (lambda (name) | |
1537 | (search-path | |
1538 | library-path | |
1539 | (string-append "lib" name ".so"))))) | |
1540 | (for-each | |
1541 | (lambda (file) | |
1542 | (catch 'decoding-error | |
1543 | (lambda () | |
1544 | (substitute* file | |
1545 | (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" | |
1546 | _ name version) | |
1547 | (format #f "\"~a\"" (find-library name))) | |
1548 | (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) | |
1549 | (format #f "\"~a\"" (find-library name))))) | |
1550 | (lambda _ | |
1551 | ;; Those are safe to skip. | |
1552 | (format (current-error-port) | |
1553 | "warning: failed to substitute: ~a~%" | |
1554 | file)))) | |
1555 | (find-files "openjdk.src/jdk/src/solaris/native" | |
1556 | "\\.c|\\.h")) | |
1557 | #t))) | |
1558 | (replace 'install | |
1559 | (lambda* (#:key outputs #:allow-other-keys) | |
1560 | (let ((doc (string-append (assoc-ref outputs "doc") | |
1561 | "/share/doc/icedtea")) | |
1562 | (jre (assoc-ref outputs "out")) | |
1563 | (jdk (assoc-ref outputs "jdk"))) | |
1564 | (copy-recursively "openjdk.build/docs" doc) | |
1565 | (copy-recursively "openjdk.build/images/j2re-image" jre) | |
1566 | (copy-recursively "openjdk.build/images/j2sdk-image" jdk) | |
1567 | ;; Install the nss.cfg file to JRE to enable SSL/TLS | |
1568 | ;; support via NSS. | |
1569 | (copy-file (string-append jdk "/jre/lib/security/nss.cfg") | |
1570 | (string-append jre "/lib/security/nss.cfg")) | |
1571 | #t))) | |
1572 | (add-after 'install 'strip-jar-timestamps | |
1573 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))))) | |
349a3147 RW |
1574 | (native-inputs |
1575 | `(("jdk" ,icedtea-7 "jdk") | |
1576 | ("openjdk-src" | |
1577 | ,(drop "openjdk" | |
1d97d8ff | 1578 | "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p")) |
12eecbf0 LF |
1579 | ("aarch32-drop" |
1580 | ,(drop "aarch32" | |
1d97d8ff | 1581 | "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg")) |
349a3147 RW |
1582 | ("corba-drop" |
1583 | ,(drop "corba" | |
1d97d8ff | 1584 | "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah")) |
349a3147 RW |
1585 | ("jaxp-drop" |
1586 | ,(drop "jaxp" | |
1d97d8ff | 1587 | "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i")) |
349a3147 RW |
1588 | ("jaxws-drop" |
1589 | ,(drop "jaxws" | |
1d97d8ff | 1590 | "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf")) |
349a3147 RW |
1591 | ("jdk-drop" |
1592 | ,(drop "jdk" | |
1d97d8ff | 1593 | "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl")) |
349a3147 RW |
1594 | ("langtools-drop" |
1595 | ,(drop "langtools" | |
1d97d8ff | 1596 | "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw")) |
349a3147 RW |
1597 | ("hotspot-drop" |
1598 | ,(drop "hotspot" | |
1d97d8ff | 1599 | "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm")) |
349a3147 RW |
1600 | ("nashorn-drop" |
1601 | ,(drop "nashorn" | |
1d97d8ff | 1602 | "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa")) |
fd34d4f4 LF |
1603 | ("shenandoah-drop" |
1604 | ,(drop "shenandoah" | |
1d97d8ff | 1605 | "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy")) |
349a3147 | 1606 | ,@(fold alist-delete (package-native-inputs icedtea-7) |
e2098e2d | 1607 | '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop" |
349a3147 RW |
1608 | "jdk-drop" "langtools-drop" "hotspot-drop"))))))) |
1609 | ||
a243e12a | 1610 | (define-public icedtea icedtea-7) |
068e476f | 1611 | |
5490480c | 1612 | \f |
8bbd0408 RW |
1613 | (define-public ant/java8 |
1614 | (package (inherit ant-bootstrap) | |
1615 | (name "ant") | |
1616 | (version "1.10.1") | |
1617 | (source (origin | |
1618 | (method url-fetch) | |
1619 | (uri (string-append "mirror://apache/ant/source/apache-ant-" | |
1620 | version "-src.tar.gz")) | |
1621 | (sha256 | |
1622 | (base32 | |
1623 | "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8")) | |
1624 | (modules '((guix build utils))) | |
1625 | (snippet | |
1626 | '(begin | |
1627 | (for-each delete-file | |
1628 | (find-files "lib/optional" "\\.jar$")) | |
1629 | #t)))) | |
1630 | (arguments | |
1631 | (substitute-keyword-arguments (package-arguments ant-bootstrap) | |
1632 | ((#:phases phases) | |
1633 | `(modify-phases ,phases | |
1634 | (add-after 'unpack 'remove-scripts | |
1635 | ;; Remove bat / cmd scripts for DOS as well as the antRun and runant | |
1636 | ;; wrappers. | |
1637 | (lambda _ | |
1638 | (for-each delete-file | |
1639 | (find-files "src/script" | |
1640 | "(.*\\.(bat|cmd)|runant.*|antRun.*)")) | |
1641 | #t)) | |
1642 | (replace 'build | |
1643 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1644 | (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) | |
1645 | ||
1646 | ;; Disable tests to avoid dependency on hamcrest-core, which needs | |
1647 | ;; Ant to build. This is necessary in addition to disabling the | |
1648 | ;; "check" phase, because the dependency on "test-jar" would always | |
1649 | ;; result in the tests to be run. | |
1650 | (substitute* "build.xml" | |
1651 | (("depends=\"jars,test-jar\"") "depends=\"jars\"")) | |
1652 | (zero? (system* "bash" "bootstrap.sh" | |
1653 | (string-append "-Ddist.dir=" | |
1654 | (assoc-ref outputs "out")))))))))) | |
1655 | (native-inputs | |
1656 | `(("jdk" ,icedtea-8 "jdk"))))) | |
1657 | ||
e441fc56 RW |
1658 | ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series |
1659 | ;; requires Java 8. | |
1660 | (define-public ant | |
1661 | (package (inherit ant/java8) | |
1662 | (version "1.9.9") | |
1663 | (source (origin | |
1664 | (method url-fetch) | |
1665 | (uri (string-append "mirror://apache/ant/source/apache-ant-" | |
1666 | version "-src.tar.gz")) | |
1667 | (sha256 | |
1668 | (base32 | |
1669 | "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n")))) | |
1670 | (native-inputs | |
1671 | `(("jdk" ,icedtea-7 "jdk"))))) | |
1672 | ||
9ce7ac99 RW |
1673 | (define-public ant-apache-bcel |
1674 | (package | |
1675 | (inherit ant/java8) | |
1676 | (name "ant-apache-bcel") | |
1677 | (arguments | |
1678 | (substitute-keyword-arguments (package-arguments ant/java8) | |
1679 | ((#:phases phases) | |
1680 | `(modify-phases ,phases | |
1681 | (add-after 'unpack 'link-bcel | |
1682 | (lambda* (#:key inputs #:allow-other-keys) | |
1683 | (for-each (lambda (file) | |
1684 | (symlink file | |
1685 | (string-append "lib/optional/" | |
1686 | (basename file)))) | |
1687 | (find-files (assoc-ref inputs "java-commons-bcel") | |
1688 | "\\.jar$")) | |
1689 | #t)) | |
1690 | (add-after 'build 'install | |
1691 | (lambda* (#:key outputs #:allow-other-keys) | |
1692 | (let* ((out (assoc-ref outputs "out")) | |
1693 | (share (string-append out "/share/java")) | |
1694 | (bin (string-append out "/bin")) | |
1695 | (lib (string-append out "/lib"))) | |
1696 | (mkdir-p share) | |
1697 | (install-file (string-append lib "/ant-apache-bcel.jar") share) | |
1698 | (delete-file-recursively bin) | |
1699 | (delete-file-recursively lib) | |
1700 | #t))))))) | |
1701 | (inputs | |
1702 | `(("java-commons-bcel" ,java-commons-bcel) | |
1703 | ,@(package-inputs ant/java8))))) | |
1704 | ||
fa6c4213 RW |
1705 | (define-public ant-junit |
1706 | (package | |
1707 | (inherit ant/java8) | |
1708 | (name "ant-junit") | |
1709 | (arguments | |
1710 | (substitute-keyword-arguments (package-arguments ant/java8) | |
1711 | ((#:phases phases) | |
1712 | `(modify-phases ,phases | |
1713 | (add-after 'unpack 'link-junit | |
1714 | (lambda* (#:key inputs #:allow-other-keys) | |
1715 | (for-each (lambda (file) | |
1716 | (symlink file | |
1717 | (string-append "lib/optional/" | |
1718 | (basename file)))) | |
1719 | (find-files (assoc-ref inputs "java-junit") | |
1720 | "\\.jar$")) | |
1721 | #t)) | |
1722 | (add-after 'build 'install | |
1723 | (lambda* (#:key outputs #:allow-other-keys) | |
1724 | (let* ((out (assoc-ref outputs "out")) | |
1725 | (share (string-append out "/share/java")) | |
1726 | (bin (string-append out "/bin")) | |
1727 | (lib (string-append out "/lib"))) | |
1728 | (mkdir-p share) | |
1729 | (install-file (string-append lib "/ant-junit.jar") share) | |
1730 | (delete-file-recursively bin) | |
1731 | (delete-file-recursively lib) | |
1732 | #t))))))) | |
1733 | (inputs | |
1734 | `(("java-junit" ,java-junit) | |
1735 | ,@(package-inputs ant/java8))))) | |
1736 | ||
fc6e2727 RW |
1737 | (define-public clojure |
1738 | (let* ((remove-archives '(begin | |
1739 | (for-each delete-file | |
1740 | (find-files "." ".*\\.(jar|zip)")) | |
1741 | #t)) | |
1742 | (submodule (lambda (prefix version hash) | |
1743 | (origin | |
1744 | (method url-fetch) | |
1745 | (uri (string-append "https://github.com/clojure/" | |
1746 | prefix version ".tar.gz")) | |
1747 | (sha256 (base32 hash)) | |
1748 | (modules '((guix build utils))) | |
1749 | (snippet remove-archives))))) | |
1750 | (package | |
1751 | (name "clojure") | |
1d47ea86 | 1752 | (version "1.9.0") |
fc6e2727 RW |
1753 | (source |
1754 | (origin | |
1755 | (method url-fetch) | |
1756 | (uri | |
1d47ea86 AV |
1757 | (string-append "https://github.com/clojure/clojure/archive/clojure-" |
1758 | version ".tar.gz")) | |
fc6e2727 | 1759 | (sha256 |
1d47ea86 | 1760 | (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha")) |
fc6e2727 RW |
1761 | (modules '((guix build utils))) |
1762 | (snippet remove-archives))) | |
1763 | (build-system ant-build-system) | |
1764 | (arguments | |
1765 | `(#:modules ((guix build ant-build-system) | |
1766 | (guix build utils) | |
1767 | (ice-9 ftw) | |
1768 | (ice-9 regex) | |
1769 | (srfi srfi-1) | |
1770 | (srfi srfi-26)) | |
1771 | #:test-target "test" | |
1772 | #:phases | |
1773 | (modify-phases %standard-phases | |
1774 | (add-after 'unpack 'unpack-submodule-sources | |
1775 | (lambda* (#:key inputs #:allow-other-keys) | |
1776 | (for-each | |
1777 | (lambda (name) | |
1778 | (mkdir-p name) | |
1779 | (with-directory-excursion name | |
1780 | (or (zero? (system* "tar" | |
1781 | ;; Use xz for repacked tarball. | |
1782 | "--xz" | |
1783 | "--extract" | |
1784 | "--verbose" | |
1785 | "--file" (assoc-ref inputs name) | |
1786 | "--strip-components=1")) | |
1787 | (error "failed to unpack tarball" name))) | |
1788 | (copy-recursively (string-append name "/src/main/clojure/") | |
1789 | "src/clj/")) | |
1d47ea86 AV |
1790 | '("core-specs-alpha-src" |
1791 | "data-generators-src" | |
1792 | "spec-alpha-src" | |
fc6e2727 RW |
1793 | "test-check-src" |
1794 | "test-generative-src" | |
1d47ea86 | 1795 | "tools-namespace-src")) |
fc6e2727 RW |
1796 | #t)) |
1797 | ;; The javadoc target is not built by default. | |
1798 | (add-after 'build 'build-doc | |
1799 | (lambda _ | |
1800 | (zero? (system* "ant" "javadoc")))) | |
1801 | ;; Needed since no install target is provided. | |
1802 | (replace 'install | |
1803 | (lambda* (#:key outputs #:allow-other-keys) | |
1804 | (let ((java-dir (string-append (assoc-ref outputs "out") | |
1805 | "/share/java/"))) | |
1806 | ;; Install versioned to avoid collisions. | |
1807 | (install-file (string-append "clojure-" ,version ".jar") | |
1808 | java-dir) | |
1809 | #t))) | |
1810 | ;; Needed since no install-doc target is provided. | |
1811 | (add-after 'install 'install-doc | |
1812 | (lambda* (#:key outputs #:allow-other-keys) | |
1813 | (let ((doc-dir (string-append (assoc-ref outputs "out") | |
1814 | "/share/doc/clojure-" | |
1815 | ,version "/"))) | |
1816 | (copy-recursively "doc/clojure" doc-dir) | |
1817 | (copy-recursively "target/javadoc/" | |
1818 | (string-append doc-dir "javadoc/")) | |
1819 | (for-each (cut install-file <> doc-dir) | |
1820 | (filter (cut string-match | |
1821 | ".*\\.(html|markdown|md|txt)" | |
1822 | <>) | |
1823 | (scandir "./"))) | |
1824 | #t)))))) | |
1825 | ;; The native-inputs below are needed to run the tests. | |
1826 | (native-inputs | |
1d47ea86 AV |
1827 | `(("core-specs-alpha-src" |
1828 | ,(submodule "core.specs.alpha/archive/core.specs.alpha-" | |
1829 | "0.1.24" | |
1830 | "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv")) | |
1831 | ("data-generators-src" | |
fc6e2727 RW |
1832 | ,(submodule "data.generators/archive/data.generators-" |
1833 | "0.1.2" | |
1834 | "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1")) | |
1d47ea86 AV |
1835 | ("spec-alpha-src" |
1836 | ,(submodule "spec.alpha/archive/spec.alpha-" | |
1837 | "0.1.143" | |
1838 | "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz")) | |
fc6e2727 RW |
1839 | ("test-check-src" |
1840 | ,(submodule "test.check/archive/test.check-" | |
1841 | "0.9.0" | |
1842 | "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md")) | |
1843 | ("test-generative-src" | |
1844 | ,(submodule "test.generative/archive/test.generative-" | |
1845 | "0.5.2" | |
1846 | "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8")) | |
1847 | ("tools-namespace-src" | |
1848 | ,(submodule "tools.namespace/archive/tools.namespace-" | |
1849 | "0.2.11" | |
1d47ea86 | 1850 | "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0")))) |
fc6e2727 RW |
1851 | (home-page "https://clojure.org/") |
1852 | (synopsis "Lisp dialect running on the JVM") | |
1853 | (description "Clojure is a dynamic, general-purpose programming language, | |
1854 | combining the approachability and interactive development of a scripting | |
1855 | language with an efficient and robust infrastructure for multithreaded | |
1856 | programming. Clojure is a compiled language, yet remains completely dynamic | |
1857 | – every feature supported by Clojure is supported at runtime. Clojure | |
1858 | provides easy access to the Java frameworks, with optional type hints and type | |
1859 | inference, to ensure that calls to Java can avoid reflection. | |
1860 | ||
1861 | Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy | |
1862 | and a powerful macro system. Clojure is predominantly a functional programming | |
1863 | language, and features a rich set of immutable, persistent data structures. | |
1864 | When mutable state is needed, Clojure offers a software transactional memory | |
1865 | system and reactive Agent system that ensure clean, correct, multithreaded | |
1866 | designs.") | |
1867 | ;; Clojure is licensed under EPL1.0 | |
1868 | ;; ASM bytecode manipulation library is licensed under BSD-3 | |
1869 | ;; Guava Murmur3 hash implementation is licensed under APL2.0 | |
1870 | ;; src/clj/repl.clj is licensed under CPL1.0 | |
1871 | ;; | |
1872 | ;; See readme.html or readme.txt for details. | |
1873 | (license (list license:epl1.0 | |
1874 | license:bsd-3 | |
1875 | license:asl2.0 | |
1876 | license:cpl1.0))))) | |
1877 | ||
fc8d100b RW |
1878 | (define-public javacc |
1879 | (package | |
1880 | (name "javacc") | |
1881 | (version "7.0.3") | |
1882 | (source (origin | |
1883 | (method url-fetch) | |
1884 | (uri (string-append "https://github.com/javacc/javacc/" | |
1885 | "archive/" version ".tar.gz")) | |
1886 | (file-name (string-append "javacc-" version ".tar.gz")) | |
1887 | (sha256 | |
1888 | (base32 | |
1889 | "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf")))) | |
1890 | (build-system ant-build-system) | |
1891 | (arguments | |
1892 | `(#:test-target "test" | |
1893 | #:phases | |
1894 | (modify-phases %standard-phases | |
1895 | (add-after 'unpack 'delete-bundled-libs | |
1896 | (lambda _ | |
1897 | (delete-file-recursively "lib") #t)) | |
1898 | (replace 'install (install-jars "target"))))) | |
1899 | (home-page "https://javacc.org/") | |
1900 | (synopsis "Java parser generator") | |
1901 | (description "Java Compiler Compiler (JavaCC) is the most popular parser | |
1902 | generator for use with Java applications. A parser generator is a tool that | |
1903 | reads a grammar specification and converts it to a Java program that can | |
1904 | recognize matches to the grammar. In addition to the parser generator itself, | |
1905 | JavaCC provides other standard capabilities related to parser generation such | |
1906 | as tree building (via a tool called JJTree included with JavaCC), actions, | |
1907 | debugging, etc.") | |
1908 | (license license:bsd-3))) | |
1909 | ||
6688c41e RW |
1910 | (define-public javacc-4 |
1911 | (package (inherit javacc) | |
1912 | (version "4.1") | |
1913 | (source (origin | |
1914 | (method git-fetch) | |
1915 | (uri (git-reference | |
1916 | (url "https://github.com/javacc/javacc.git") | |
1917 | (commit "release_41"))) | |
1918 | (file-name (string-append "javacc-" version "-checkout")) | |
1919 | (sha256 | |
1920 | (base32 | |
1921 | "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0")))) | |
1922 | ;; Tests fail with | |
1923 | ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60: | |
1924 | ;; JAVACODE failed | |
1925 | (arguments | |
1926 | `(#:tests? #f | |
1927 | #:phases | |
1928 | (modify-phases %standard-phases | |
1929 | (add-after 'unpack 'delete-bundled-libs | |
1930 | (lambda _ | |
1931 | (delete-file-recursively "lib") #t)) | |
1932 | (replace 'install (install-jars "bin/lib"))))))) | |
1933 | ||
c1cb8576 RW |
1934 | ;; This is the last 3.x release of ECJ |
1935 | (define-public java-ecj-3 | |
1936 | (package | |
1937 | (name "java-ecj") | |
1938 | (version "3.8.2") | |
1939 | (source (origin | |
1940 | (method url-fetch) | |
1941 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
1942 | "downloads/drops/R-" version | |
1943 | "-201301310800/ecjsrc-" version ".jar")) | |
1944 | (sha256 | |
1945 | (base32 | |
1946 | "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04")))) | |
1947 | (build-system ant-build-system) | |
1948 | (arguments | |
1949 | `(#:tests? #f ; none included | |
1950 | #:jdk ,icedtea-7 ; doesn't build with JDK8+ | |
1951 | #:make-flags (list "-f" "src/build.xml") | |
1952 | #:build-target "build" | |
1953 | #:phases | |
1954 | (modify-phases %standard-phases | |
1955 | (add-after 'unpack 'fix-manifest | |
1956 | (lambda _ | |
1957 | ;; Record the main class to make ecj executable. | |
1958 | (with-atomic-file-replacement "src/META-INF/MANIFEST.MF" | |
1959 | (lambda (in out) | |
1960 | (display "Manifest-Version: 1.0 | |
1961 | Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" | |
1962 | out))))) | |
1963 | (replace 'install (install-jars "."))))) | |
1964 | (home-page "https://eclipse.org") | |
1965 | (synopsis "Eclipse Java development tools core batch compiler") | |
1966 | (description "This package provides the Eclipse Java core batch compiler.") | |
1967 | (license license:epl1.0))) | |
1968 | ||
f201b18e RW |
1969 | ;; This is needed for java-cisd-args4j |
1970 | (define-public java-ecj-3.5 | |
1971 | (package (inherit java-ecj-3) | |
1972 | (version "3.5.1") | |
1973 | (source (origin | |
1974 | (method url-fetch/zipbomb) | |
1975 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
1976 | "downloads/drops/R-" version | |
1977 | "-200909170800/ecjsrc-" version ".zip")) | |
1978 | (sha256 | |
1979 | (base32 | |
1980 | "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7")))) | |
1981 | (build-system ant-build-system) | |
1982 | (arguments | |
1983 | `(#:tests? #f ; none included | |
1984 | #:jdk ,icedtea-7 ; doesn't build with JDK8+ | |
1985 | #:build-target "build" | |
1986 | #:phases | |
1987 | (modify-phases %standard-phases | |
1988 | (add-after 'unpack 'fix-manifest | |
1989 | (lambda _ | |
1990 | ;; Record the main class to make ecj executable. | |
1991 | (with-atomic-file-replacement "META-INF/MANIFEST.MF" | |
1992 | (lambda (in out) | |
1993 | (dump-port in out) | |
1994 | (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" | |
1995 | out))))) | |
1996 | (replace 'install (install-jars "."))))) | |
1997 | (native-inputs | |
1998 | `(("unzip" ,unzip))))) | |
1999 | ||
30d55473 RW |
2000 | (define-public java-cisd-base |
2001 | (let ((revision 38938) | |
2002 | (base-version "14.12.0")) | |
2003 | (package | |
2004 | (name "java-cisd-base") | |
2005 | (version (string-append base-version "-" (number->string revision))) | |
2006 | (source (origin | |
2007 | (method svn-fetch) | |
2008 | (uri (svn-reference | |
2009 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2010 | "base/tags/release/" | |
2011 | (version-major+minor base-version) | |
2012 | ".x/" base-version "/base/")) | |
2013 | (revision revision))) | |
2014 | (file-name (string-append "java-cisd-base-" version "-checkout")) | |
2015 | (sha256 | |
2016 | (base32 | |
2017 | "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy")) | |
2018 | (modules '((guix build utils))) | |
2019 | (snippet | |
2020 | '(begin | |
2021 | ;; Delete included gradle jar | |
2022 | (delete-file-recursively "gradle/wrapper") | |
2023 | ;; Delete pre-built native libraries | |
2024 | (delete-file-recursively "libs") | |
2025 | #t)))) | |
2026 | (build-system ant-build-system) | |
2027 | (arguments | |
2028 | `(#:make-flags '("-file" "build/build.xml") | |
2029 | #:test-target "jar-test" | |
2030 | #:jdk ,icedtea-8 | |
2031 | #:phases | |
2032 | (modify-phases %standard-phases | |
2033 | (add-after 'unpack 'unpack-build-resources | |
2034 | (lambda* (#:key inputs #:allow-other-keys) | |
2035 | (copy-recursively (assoc-ref inputs "build-resources") | |
2036 | "../build_resources") | |
2037 | #t)) | |
2038 | (add-after 'unpack-build-resources 'fix-dependencies | |
2039 | (lambda* (#:key inputs #:allow-other-keys) | |
2040 | (substitute* "build/build.xml" | |
2041 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") | |
2042 | (string-append (assoc-ref inputs "java-testng") | |
2043 | "/share/java/java-testng.jar")) | |
2044 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") | |
2045 | (string-append (assoc-ref inputs "java-commons-lang") | |
2046 | "/share/java/commons-lang-" | |
2047 | ,(package-version java-commons-lang) ".jar")) | |
2048 | (("\\$\\{lib\\}/commons-io/commons-io.jar") | |
2049 | (string-append (assoc-ref inputs "java-commons-io") | |
2050 | "/share/java/commons-io-" | |
2051 | ,(package-version java-commons-io) | |
2052 | "-SNAPSHOT.jar")) | |
2053 | ;; Remove dependency on svn | |
2054 | (("<build-info.*") "") | |
2055 | (("\\$\\{revision.number\\}") | |
2056 | ,(number->string revision)) | |
2057 | (("\\$\\{version.number\\}") ,base-version)) | |
2058 | ;; Remove dependency on classycle | |
2059 | (substitute* "../build_resources/ant/build-common.xml" | |
2060 | (("<taskdef name=\"dependency-checker.*") "") | |
2061 | (("classname=\"classycle.*") "") | |
2062 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) | |
2063 | #t)) | |
2064 | ;; A few tests fail because of the lack of a proper /etc/groups and | |
2065 | ;; /etc/passwd file in the build container. | |
2066 | (add-after 'unpack 'disable-broken-tests | |
2067 | (lambda _ | |
2068 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java" | |
2069 | (("Unix.isOperational\\(\\)") "false")) | |
2070 | #t)) | |
2071 | ;; These decorators are almost useless and pull in an unpackaged | |
2072 | ;; dependency. | |
2073 | (add-after 'unpack 'remove-useless-decorators | |
2074 | (lambda _ | |
2075 | (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java" | |
2076 | (("@Private") "") | |
2077 | (("import ch.rinn.restrictions.Private;") "")) | |
2078 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java" | |
2079 | (("@Friend.*") "") | |
2080 | (("import ch.rinn.restrictions.Friend;") "")) | |
2081 | #t)) | |
2082 | (add-before 'configure 'build-native-code | |
2083 | (lambda* (#:key inputs #:allow-other-keys) | |
2084 | (let ((jdk (assoc-ref inputs "jdk")) | |
2085 | (dir ,(match (%current-system) | |
2086 | ("i686-linux" | |
2087 | "i386-Linux") | |
2088 | ((or "armhf-linux" "aarch64-linux") | |
2089 | "arm-Linux") | |
2090 | ((or "x86_64-linux") | |
2091 | "amd64-Linux") | |
2092 | (_ "unknown-Linux")))) | |
2093 | (with-directory-excursion "source/c" | |
2094 | (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c" | |
2095 | (string-append "-I" jdk "/include") | |
2096 | (string-append "-I" jdk "/include/linux") | |
2097 | "-o" "libunix.so") | |
2098 | (invoke "gcc" "-shared" "-O3" "-fPIC" | |
2099 | "-DMACHINE_BYTE_ORDER=1" | |
2100 | "copyCommon.c" | |
2101 | "copyByteChar.c" | |
2102 | "copyByteDouble.c" | |
2103 | "copyByteFloat.c" | |
2104 | "copyByteInt.c" | |
2105 | "copyByteLong.c" | |
2106 | "copyByteShort.c" | |
2107 | (string-append "-I" jdk "/include") | |
2108 | (string-append "-I" jdk "/include/linux") | |
2109 | "-o" "libnativedata.so")) | |
2110 | (install-file "source/c/libunix.so" | |
2111 | (string-append "libs/native/unix/" dir)) | |
2112 | (install-file "source/c/libnativedata.so" | |
2113 | (string-append "libs/native/nativedata/" dir)) | |
2114 | #t))) | |
2115 | ;; In the "check" phase we only build the test executable. | |
2116 | (add-after 'check 'run-tests | |
2117 | (lambda _ | |
2118 | (invoke "java" "-jar" "targets/dist/sis-base-test.jar") | |
2119 | (delete-file "targets/dist/sis-base-test.jar") | |
2120 | #t)) | |
2121 | (replace 'install (install-jars "targets/dist"))))) | |
2122 | (native-inputs | |
2123 | `(("jdk" ,icedtea-8) | |
2124 | ("java-commons-lang" ,java-commons-lang) | |
2125 | ("java-commons-io" ,java-commons-io) | |
2126 | ("java-testng" ,java-testng) | |
2127 | ("build-resources" | |
2128 | ,(origin | |
2129 | (method svn-fetch) | |
2130 | (uri (svn-reference | |
2131 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2132 | "base/tags/release/" | |
2133 | (version-major+minor base-version) | |
2134 | ".x/" base-version | |
2135 | "/build_resources/")) | |
2136 | (revision revision))) | |
2137 | (sha256 | |
2138 | (base32 | |
2139 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) | |
2140 | (home-page "http://svnsis.ethz.ch") | |
2141 | (synopsis "Utility classes for libraries from ETH Zurich") | |
2142 | (description "This library supplies some utility classes needed for | |
2143 | libraries from the SIS division at ETH Zurich like jHDF5.") | |
2144 | ;; The C sources are under a non-copyleft license, which looks like a | |
2145 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. | |
2146 | (license (list license:asl2.0 | |
2147 | (license:non-copyleft "file://source/c/COPYING")))))) | |
2148 | ||
04ddca26 RW |
2149 | (define-public java-cisd-args4j |
2150 | (let ((revision 39162) | |
2151 | (base-version "9.11.2")) | |
2152 | (package | |
2153 | (name "java-cisd-args4j") | |
2154 | (version (string-append base-version "-" (number->string revision))) | |
2155 | (source (origin | |
2156 | (method svn-fetch) | |
2157 | (uri (svn-reference | |
2158 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2159 | "args4j/tags/release/" | |
2160 | (version-major+minor base-version) | |
2161 | ".x/" base-version "/args4j/")) | |
2162 | (revision revision))) | |
2163 | (file-name (string-append "java-cisd-args4j-" version "-checkout")) | |
2164 | (sha256 | |
2165 | (base32 | |
2166 | "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2")))) | |
2167 | (build-system ant-build-system) | |
2168 | (arguments | |
2169 | `(#:make-flags '("-file" "build/build.xml") | |
2170 | #:tests? #f ; there are no tests | |
2171 | ;; There are weird build failures with JDK8, such as: "The type | |
2172 | ;; java.io.ObjectInputStream cannot be resolved. It is indirectly | |
2173 | ;; referenced from required .class files" | |
2174 | #:jdk ,icedtea-7 | |
2175 | #:modules ((guix build ant-build-system) | |
2176 | (guix build utils) | |
2177 | (guix build java-utils) | |
2178 | (sxml simple) | |
2179 | (sxml transform) | |
2180 | (sxml xpath)) | |
2181 | #:phases | |
2182 | (modify-phases %standard-phases | |
2183 | (add-after 'unpack 'unpack-build-resources | |
2184 | (lambda* (#:key inputs #:allow-other-keys) | |
2185 | (mkdir-p "../build_resources") | |
2186 | (invoke "tar" "xf" (assoc-ref inputs "build-resources") | |
2187 | "-C" "../build_resources" | |
2188 | "--strip-components=1") | |
2189 | (mkdir-p "../build_resources/lib") | |
2190 | #t)) | |
2191 | (add-after 'unpack-build-resources 'fix-dependencies | |
2192 | (lambda* (#:key inputs #:allow-other-keys) | |
2193 | ;; FIXME: There should be a more convenient abstraction for | |
2194 | ;; editing XML files. | |
2195 | (with-directory-excursion "../build_resources/ant/" | |
2196 | (chmod "build-common.xml" #o664) | |
2197 | (call-with-output-file "build-common.xml.new" | |
2198 | (lambda (port) | |
2199 | (sxml->xml | |
2200 | (pre-post-order | |
2201 | (with-input-from-file "build-common.xml" | |
2202 | (lambda _ (xml->sxml #:trim-whitespace? #t))) | |
2203 | `(;; Remove dependency on classycle and custom ant tasks | |
2204 | (taskdef . ,(lambda (tag . kids) | |
2205 | (let ((name ((sxpath '(name *text*)) kids))) | |
2206 | (if (or (member "build-info" name) | |
2207 | (member "dependency-checker" name) | |
2208 | (member "build-java-subprojects" name) | |
2209 | (member "project-classpath" name)) | |
2210 | '() ; skip | |
2211 | `(,tag ,@kids))))) | |
2212 | (typedef . ,(lambda (tag . kids) | |
2213 | (let ((name ((sxpath '(name *text*)) kids))) | |
2214 | (if (member "recursive-jar" name) | |
2215 | '() ; skip | |
2216 | `(,tag ,@kids))))) | |
2217 | (build-java-subprojects . ,(lambda _ '())) | |
2218 | ;; Ignore everything else | |
2219 | (*default* . ,(lambda (tag . kids) `(,tag ,@kids))) | |
2220 | (*text* . ,(lambda (_ txt) txt)))) | |
2221 | port))) | |
2222 | (rename-file "build-common.xml.new" "build-common.xml")) | |
2223 | (substitute* "build/build.xml" | |
2224 | (("\\$\\{lib\\}/cisd-base/cisd-base.jar") | |
2225 | (string-append (assoc-ref inputs "java-cisd-base") | |
2226 | "/share/java/sis-base.jar")) | |
2227 | ;; Remove dependency on svn | |
2228 | (("<build-info.*") "") | |
2229 | (("\\$\\{revision.number\\}") | |
2230 | ,(number->string revision)) | |
2231 | (("\\$\\{version.number\\}") ,base-version) | |
2232 | ;; Don't use custom ant tasks. | |
2233 | (("recursive-jar") "jar") | |
2234 | (("<project-classpath.*") "")) | |
2235 | #t)) | |
2236 | (replace 'install (install-jars "targets/dist"))))) | |
2237 | (inputs | |
2238 | `(("java-cisd-base" ,java-cisd-base))) | |
2239 | (native-inputs | |
2240 | `(("ecj" ,java-ecj-3.5) | |
2241 | ("build-resources" | |
2242 | ,(origin | |
2243 | (method svn-fetch) | |
2244 | (uri (svn-reference | |
2245 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2246 | "args4j/tags/release/" | |
2247 | (version-major+minor base-version) | |
2248 | ".x/" base-version | |
2249 | "/build_resources/")) | |
2250 | (revision revision))) | |
2251 | (sha256 | |
2252 | (base32 | |
2253 | "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf")) | |
2254 | (modules '((guix build utils))) | |
2255 | ;; Delete bundled pre-built jars. | |
2256 | (snippet | |
2257 | '(begin (delete-file-recursively "lib/") #t)))))) | |
2258 | (home-page "http://svnsis.ethz.ch") | |
2259 | (synopsis "Command line parser library") | |
2260 | (description "This package provides a parser for command line arguments.") | |
2261 | (license license:asl2.0)))) | |
2262 | ||
2f0d0418 RW |
2263 | (define-public java-cisd-jhdf5 |
2264 | (let ((revision 39162) | |
2265 | (base-version "14.12.6")) | |
2266 | (package | |
2267 | (name "java-cisd-jhdf5") | |
2268 | (version (string-append base-version "-" (number->string revision))) | |
2269 | (source (origin | |
2270 | (method svn-fetch) | |
2271 | (uri (svn-reference | |
2272 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2273 | "jhdf5/tags/release/" | |
2274 | (version-major+minor base-version) | |
2275 | ".x/" base-version "/jhdf5/")) | |
2276 | (revision revision))) | |
2277 | (file-name (string-append "java-cisd-jhdf5-" version "-checkout")) | |
2278 | (sha256 | |
2279 | (base32 | |
2280 | "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0")) | |
2281 | (modules '((guix build utils))) | |
2282 | (snippet | |
2283 | '(begin | |
2284 | ;; Delete included gradle jar | |
2285 | (delete-file-recursively "gradle/wrapper") | |
2286 | ;; Delete pre-built native libraries | |
2287 | (delete-file-recursively "libs") | |
2288 | #t)))) | |
2289 | (build-system ant-build-system) | |
2290 | (arguments | |
2291 | `(#:make-flags '("-file" "build/build.xml") | |
2292 | #:build-target "jar-all" | |
2293 | #:test-target "jar-test" | |
2294 | #:jdk ,icedtea-8 | |
2295 | #:phases | |
2296 | (modify-phases %standard-phases | |
1ed386fc RW |
2297 | ;; FIXME: this build phase fails. |
2298 | (delete 'generate-jar-indices) | |
2f0d0418 RW |
2299 | ;; Don't erase results from the build phase when building tests. |
2300 | (add-after 'unpack 'separate-test-target-from-clean | |
2301 | (lambda _ | |
2302 | (substitute* "build/build.xml" | |
2303 | (("\"jar-test\" depends=\"clean, ") | |
2304 | "\"jar-test\" depends=\"")) | |
2305 | #t)) | |
2306 | (add-after 'unpack 'unpack-build-resources | |
2307 | (lambda* (#:key inputs #:allow-other-keys) | |
2308 | (copy-recursively (assoc-ref inputs "build-resources") | |
2309 | "../build_resources") | |
2310 | (delete-file-recursively "../build_resources/lib/") | |
2311 | (mkdir-p "../build_resources/lib") | |
2312 | ;; Remove dependency on classycle | |
2313 | (substitute* "../build_resources/ant/build-common.xml" | |
2314 | (("<taskdef name=\"dependency-checker.*") "") | |
2315 | (("classname=\"classycle.*") "") | |
2316 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) | |
2317 | ;; Remove dependency on svn | |
2318 | (substitute* "build/build.xml" | |
2319 | (("<build-info.*") "") | |
2320 | (("\\$\\{revision.number\\}") | |
2321 | ,(number->string revision)) | |
2322 | (("\\$\\{version.number\\}") ,base-version)) | |
2323 | #t)) | |
2324 | (add-after 'unpack-build-resources 'fix-dependencies | |
2325 | (lambda* (#:key inputs #:allow-other-keys) | |
2326 | (substitute* "../build_resources/ant/build-common.xml" | |
2327 | (("../libraries/testng/testng-jdk15.jar") | |
2328 | (string-append (assoc-ref inputs "java-testng") | |
2329 | "/share/java/java-testng.jar"))) | |
2330 | (substitute* "build/build.xml" | |
2331 | (("\\$\\{lib\\}/sis-base/sis-base.jar") | |
2332 | (string-append (assoc-ref inputs "java-cisd-base") | |
2333 | "/share/java/sis-base.jar")) | |
2334 | (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar") | |
2335 | (string-append (assoc-ref inputs "java-cisd-args4j") | |
2336 | "/share/java/cisd-args4j.jar")) | |
2337 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") | |
2338 | (string-append (assoc-ref inputs "java-commons-lang") | |
2339 | "/share/java/commons-lang-" | |
2340 | ,(package-version java-commons-lang) ".jar")) | |
2341 | (("\\$\\{lib\\}/commons-io/commons-io.jar") | |
2342 | (string-append (assoc-ref inputs "java-commons-io") | |
2343 | "/share/java/commons-io-" | |
2344 | ,(package-version java-commons-io) | |
2345 | "-SNAPSHOT.jar")) | |
2346 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") | |
2347 | (string-append (assoc-ref inputs "java-testng") | |
2348 | "/share/java/java-testng.jar")) | |
2349 | (("\\$\\{lib\\}/junit4/junit.jar") | |
2350 | (string-append (assoc-ref inputs "java-junit") | |
2351 | "/share/java/junit.jar")) | |
2352 | (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar") | |
2353 | (string-append (assoc-ref inputs "java-hamcrest-core") | |
2354 | "/share/java/hamcrest-core.jar"))) | |
2355 | ;; Remove dependency on ch.rinn.restrictions | |
2356 | (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/" | |
2357 | (substitute* '("BitSetConversionUtils.java" | |
2358 | "HDF5Utils.java") | |
2359 | (("import ch.rinn.restrictions.Private;") "") | |
2360 | (("@Private") ""))) | |
2361 | (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/" | |
2362 | (substitute* '("BitSetConversionTest.java" | |
2363 | "h5ar/HDF5ArchiverTest.java") | |
2364 | (("import ch.rinn.restrictions.Friend;") "") | |
2365 | (("@Friend.*") "")) | |
2366 | ;; Remove leftovers from removing @Friend | |
2367 | (substitute* "h5ar/HDF5ArchiverTest.java" | |
2368 | (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)") | |
2369 | ""))) | |
2370 | #t)) | |
2371 | (add-before 'configure 'build-native-library | |
2372 | (lambda* (#:key inputs #:allow-other-keys) | |
2373 | (let ((jdk (assoc-ref inputs "jdk")) | |
2374 | (hdf5 (assoc-ref inputs "hdf5")) | |
2375 | (dir ,(match (%current-system) | |
2376 | ("i686-linux" | |
2377 | "i386-Linux") | |
2378 | ((or "armhf-linux" "aarch64-linux") | |
2379 | "arm-Linux") | |
2380 | ((or "x86_64-linux") | |
2381 | "amd64-Linux") | |
2382 | (_ "unknown-Linux")))) | |
2383 | (with-directory-excursion "source/c" | |
2384 | (apply invoke `("gcc" "-shared" "-O3" | |
2385 | "-fPIC" | |
2386 | "-Wl,--exclude-libs,ALL" | |
2387 | ,@(find-files "jhdf5" "\\.c$") | |
2388 | ,@(find-files "hdf-java" "\\.c$") | |
2389 | ,(string-append "-I" hdf5 "/include") | |
2390 | ,(string-append "-I" jdk "/include") | |
2391 | ,(string-append "-I" jdk "/include/linux") | |
2392 | ,(string-append hdf5 "/lib/libhdf5.a") | |
2393 | "-o" "libjhdf5.so" "-lz"))) | |
2394 | (install-file "source/c/libjhdf5.so" | |
2395 | (string-append "libs/native/jhdf5/" dir)) | |
2396 | #t))) | |
2397 | ;; In the "check" phase we only build the test executable. | |
2398 | (add-after 'check 'run-tests | |
2399 | (lambda _ | |
2400 | (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar") | |
2401 | (delete-file "targets/dist/sis-jhdf5-test.jar") | |
2402 | #t)) | |
2403 | (replace 'install | |
2404 | (install-jars "targets/dist"))))) | |
2405 | (inputs | |
2406 | `(("java-cisd-base" ,java-cisd-base) | |
2407 | ("java-cisd-args4j" ,java-cisd-args4j) | |
2408 | ("java-commons-lang" ,java-commons-lang) | |
2409 | ("java-commons-io" ,java-commons-io) | |
2410 | ("hdf5" ,hdf5) | |
2411 | ("zlib" ,zlib))) | |
2412 | (native-inputs | |
2413 | `(("jdk" ,icedtea-8) | |
2414 | ("java-testng" ,java-testng) | |
2415 | ("java-junit" ,java-junit) | |
2416 | ("java-jmock" ,java-jmock) | |
2417 | ("java-hamcrest-core" ,java-hamcrest-core) | |
2418 | ("build-resources" | |
2419 | ,(origin | |
2420 | (method svn-fetch) | |
2421 | (uri (svn-reference | |
2422 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2423 | "jhdf5/tags/release/" | |
2424 | (version-major+minor base-version) | |
2425 | ".x/" base-version | |
2426 | "/build_resources/")) | |
2427 | (revision revision))) | |
2428 | (sha256 | |
2429 | (base32 | |
2430 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) | |
2431 | (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/") | |
2432 | (synopsis "Java binding for HDF5") | |
2433 | (description "JHDF5 is a high-level API in Java for reading and writing | |
2434 | HDF5 files, building on the libraries provided by the HDF Group.") | |
2435 | ;; The C sources are under a non-copyleft license, which looks like a | |
2436 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. | |
2437 | (license (list license:asl2.0 | |
2438 | (license:non-copyleft "file://source/c/COPYING")))))) | |
2439 | ||
218d093b RW |
2440 | (define-public java-classpathx-servletapi |
2441 | (package | |
2442 | (name "java-classpathx-servletapi") | |
ae307724 | 2443 | (version "3.0.1") |
218d093b RW |
2444 | (source (origin |
2445 | (method url-fetch) | |
2446 | (uri (string-append "mirror://gnu/classpathx/servletapi/" | |
2447 | "servletapi-" version ".tar.gz")) | |
2448 | (sha256 | |
2449 | (base32 | |
ae307724 | 2450 | "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x")))) |
218d093b RW |
2451 | (build-system ant-build-system) |
2452 | (arguments | |
2453 | `(#:tests? #f ; there is no test target | |
2454 | #:build-target "compile" | |
218d093b | 2455 | #:make-flags |
ae307724 | 2456 | (list "-Dbuild.compiler=javac1.8" |
218d093b RW |
2457 | (string-append "-Ddist=" (assoc-ref %outputs "out"))) |
2458 | #:phases | |
2459 | (modify-phases %standard-phases | |
2460 | (replace 'install | |
2461 | (lambda* (#:key make-flags #:allow-other-keys) | |
2462 | (zero? (apply system* `("ant" "dist" ,@make-flags)))))))) | |
2463 | (home-page "https://www.gnu.org/software/classpathx/") | |
2464 | (synopsis "Java servlet API implementation") | |
2465 | (description "This is the GNU servlet API distribution, part of the | |
2466 | ClasspathX project. It provides implementations of version 3.0 of the servlet | |
2467 | API and version 2.1 of the Java ServerPages API.") | |
2468 | (license license:gpl3+))) | |
2469 | ||
5490480c RW |
2470 | (define-public java-swt |
2471 | (package | |
2472 | (name "java-swt") | |
8710d4dd | 2473 | (version "4.7.1a") |
5490480c RW |
2474 | (source |
2475 | ;; The types of many variables and procedures differ in the sources | |
2476 | ;; dependent on whether the target architecture is a 32-bit system or a | |
2477 | ;; 64-bit system. Instead of patching the sources on demand in a build | |
2478 | ;; phase we download either the 32-bit archive (which mostly uses "int" | |
2479 | ;; types) or the 64-bit archive (which mostly uses "long" types). | |
8710d4dd RW |
2480 | (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9") |
2481 | (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q") | |
5490480c RW |
2482 | (file32 "x86") |
2483 | (file64 "x86_64")) | |
2484 | (let-values (((hash file) | |
2485 | (match (or (%current-target-system) (%current-system)) | |
2486 | ("x86_64-linux" (values hash64 file64)) | |
2487 | (_ (values hash32 file32))))) | |
2488 | (origin | |
2489 | (method url-fetch) | |
2490 | (uri (string-append | |
8710d4dd RW |
2491 | "http://download.eclipse.org/eclipse/downloads/drops4/" |
2492 | "R-" version "-201710090410/swt-" version | |
2493 | "-gtk-linux-" file ".zip")) | |
5490480c RW |
2494 | (sha256 (base32 hash)))))) |
2495 | (build-system ant-build-system) | |
2496 | (arguments | |
2497 | `(#:jar-name "swt.jar" | |
8710d4dd | 2498 | #:jdk ,icedtea-8 |
5490480c RW |
2499 | #:tests? #f ; no "check" target |
2500 | #:phases | |
2501 | (modify-phases %standard-phases | |
2502 | (replace 'unpack | |
2503 | (lambda* (#:key source #:allow-other-keys) | |
2504 | (and (mkdir "swt") | |
2505 | (zero? (system* "unzip" source "-d" "swt")) | |
2506 | (chdir "swt") | |
2507 | (mkdir "src") | |
2508 | (zero? (system* "unzip" "src.zip" "-d" "src"))))) | |
2509 | ;; The classpath contains invalid icecat jars. Since we don't need | |
2510 | ;; anything other than the JDK on the classpath, we can simply unset | |
2511 | ;; it. | |
2512 | (add-after 'configure 'unset-classpath | |
2513 | (lambda _ (unsetenv "CLASSPATH") #t)) | |
2514 | (add-before 'build 'build-native | |
2515 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2516 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) | |
2517 | ;; Build shared libraries. Users of SWT have to set the system | |
2518 | ;; property swt.library.path to the "lib" directory of this | |
2519 | ;; package output. | |
2520 | (mkdir-p lib) | |
2521 | (setenv "OUTPUT_DIR" lib) | |
2522 | (with-directory-excursion "src" | |
2523 | (zero? (system* "bash" "build.sh")))))) | |
2524 | (add-after 'install 'install-native | |
2525 | (lambda* (#:key outputs #:allow-other-keys) | |
2526 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) | |
2527 | (for-each (lambda (file) | |
2528 | (install-file file lib)) | |
2529 | (find-files "." "\\.so$")) | |
2530 | #t)))))) | |
2531 | (inputs | |
8710d4dd | 2532 | `(("gtk" ,gtk+-2) |
5490480c RW |
2533 | ("libxtst" ,libxtst) |
2534 | ("libxt" ,libxt) | |
2535 | ("mesa" ,mesa) | |
2536 | ("glu" ,glu))) | |
2537 | (native-inputs | |
2538 | `(("pkg-config" ,pkg-config) | |
2539 | ("unzip" ,unzip))) | |
2540 | (home-page "https://www.eclipse.org/swt/") | |
2541 | (synopsis "Widget toolkit for Java") | |
2542 | (description | |
2543 | "SWT is a widget toolkit for Java designed to provide efficient, portable | |
2544 | access to the user-interface facilities of the operating systems on which it | |
2545 | is implemented.") | |
2546 | ;; SWT code is licensed under EPL1.0 | |
2547 | ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1 | |
2548 | ;; Cairo bindings contain code under MPL1.1 | |
2549 | ;; XULRunner 1.9 bindings contain code under MPL2.0 | |
2550 | (license (list | |
2551 | license:epl1.0 | |
2552 | license:mpl1.1 | |
2553 | license:mpl2.0 | |
2554 | license:lgpl2.1+)))) | |
2555 | ||
068e476f RJ |
2556 | (define-public java-xz |
2557 | (package | |
2558 | (name "java-xz") | |
92966847 | 2559 | (version "1.6") |
068e476f RJ |
2560 | (source (origin |
2561 | (method url-fetch) | |
2562 | (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip")) | |
2563 | (sha256 | |
2564 | (base32 | |
92966847 | 2565 | "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x")))) |
068e476f RJ |
2566 | (build-system ant-build-system) |
2567 | (arguments | |
2568 | `(#:tests? #f ; There are no tests to run. | |
2569 | #:jar-name ,(string-append "xz-" version ".jar") | |
2570 | #:phases | |
2571 | (modify-phases %standard-phases | |
2572 | ;; The unpack phase enters the "maven" directory by accident. | |
2573 | (add-after 'unpack 'chdir | |
2574 | (lambda _ (chdir "..") #t))))) | |
2575 | (native-inputs | |
2576 | `(("unzip" ,unzip))) | |
d6ddc5ab | 2577 | (home-page "https://tukaani.org/xz/java.html") |
068e476f RJ |
2578 | (synopsis "Implementation of XZ data compression in pure Java") |
2579 | (description "This library aims to be a complete implementation of XZ data | |
2580 | compression in pure Java. Single-threaded streamed compression and | |
2581 | decompression and random access decompression have been fully implemented.") | |
2582 | (license license:public-domain))) | |
04100c3b RW |
2583 | |
2584 | ;; java-hamcrest-core uses qdox version 1.12. We package this version instead | |
2585 | ;; of the latest release. | |
2586 | (define-public java-qdox-1.12 | |
2587 | (package | |
2588 | (name "java-qdox") | |
2589 | (version "1.12.1") | |
2590 | (source (origin | |
2591 | (method url-fetch) | |
2592 | (uri (string-append "http://central.maven.org/maven2/" | |
2593 | "com/thoughtworks/qdox/qdox/" version | |
2594 | "/qdox-" version "-sources.jar")) | |
2595 | (sha256 | |
2596 | (base32 | |
2597 | "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl")))) | |
2598 | (build-system ant-build-system) | |
2599 | (arguments | |
2600 | `(;; Tests require junit | |
2601 | #:tests? #f | |
2602 | #:jar-name "qdox.jar" | |
2603 | #:phases | |
2604 | (modify-phases %standard-phases | |
2605 | (replace 'unpack | |
2606 | (lambda* (#:key source #:allow-other-keys) | |
2607 | (mkdir "src") | |
2608 | (with-directory-excursion "src" | |
2609 | (zero? (system* "jar" "-xf" source))))) | |
2610 | ;; At this point we don't have junit, so we must remove the API | |
2611 | ;; tests. | |
2612 | (add-after 'unpack 'delete-tests | |
2613 | (lambda _ | |
2614 | (delete-file-recursively "src/com/thoughtworks/qdox/junit") | |
2615 | #t))))) | |
2616 | (home-page "http://qdox.codehaus.org/") | |
2617 | (synopsis "Parse definitions from Java source files") | |
2618 | (description | |
2619 | "QDox is a high speed, small footprint parser for extracting | |
2620 | class/interface/method definitions from source files complete with JavaDoc | |
b13cf17f | 2621 | @code{@@tags}. It is designed to be used by active code generators or |
04100c3b RW |
2622 | documentation tools.") |
2623 | (license license:asl2.0))) | |
e7e28510 RW |
2624 | |
2625 | (define-public java-jarjar | |
2626 | (package | |
2627 | (name "java-jarjar") | |
2628 | (version "1.4") | |
2629 | (source (origin | |
2630 | (method url-fetch) | |
2631 | (uri (string-append | |
2632 | "https://storage.googleapis.com/google-code-archive-downloads/v2/" | |
2633 | "code.google.com/jarjar/jarjar-src-" version ".zip")) | |
2634 | (sha256 | |
2635 | (base32 | |
88aa75e9 GB |
2636 | "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl")) |
2637 | (modules '((guix build utils))) | |
2638 | (snippet | |
2639 | '(begin | |
2640 | ;; Delete bundled thirds-party jar archives. | |
2641 | ;; TODO: unbundle maven-plugin-api. | |
2642 | (delete-file "lib/asm-4.0.jar") | |
2643 | (delete-file "lib/asm-commons-4.0.jar") | |
2644 | (delete-file "lib/junit-4.8.1.jar") | |
2645 | #t)))) | |
e7e28510 RW |
2646 | (build-system ant-build-system) |
2647 | (arguments | |
2648 | `(;; Tests require junit, which ultimately depends on this package. | |
2649 | #:tests? #f | |
2650 | #:build-target "jar" | |
2651 | #:phases | |
2652 | (modify-phases %standard-phases | |
88aa75e9 GB |
2653 | (add-before 'build 'do-not-use-bundled-asm |
2654 | (lambda* (#:key inputs #:allow-other-keys) | |
2655 | (substitute* "build.xml" | |
2656 | (("<path id=\"path.build\">") | |
2657 | (string-append "<path id=\"path.build\"><fileset dir=\"" | |
2658 | (assoc-ref inputs "java-asm-bootstrap") | |
2659 | "/share/java\" includes=\"**/*.jar\"/>")) | |
2660 | (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "") | |
2661 | (("lib/asm-commons-4.0.jar") | |
2662 | (string-append (assoc-ref inputs "java-asm-bootstrap") | |
2663 | "/share/java/asm-6.0.jar")) | |
2664 | (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>") | |
2665 | (string-append "<include name=\"org/objectweb/asm/" | |
2666 | "commons/Remap*.class\"/>" | |
2667 | "<include name=\"org/objectweb/asm/*.class\"/>" | |
2668 | "<include name=\"org/objectweb/asm/" | |
2669 | "signature/*.class\"/>" | |
2670 | "<include name=\"org/objectweb/asm/" | |
2671 | "commons/SignatureRemapper.class\"/>"))) | |
2672 | #t)) | |
e7e28510 RW |
2673 | (replace 'install |
2674 | (lambda* (#:key outputs #:allow-other-keys) | |
2675 | (let ((target (string-append (assoc-ref outputs "out") | |
2676 | "/share/java"))) | |
2677 | (install-file (string-append "dist/jarjar-" ,version ".jar") | |
2678 | target)) | |
2679 | #t))))) | |
88aa75e9 GB |
2680 | (inputs |
2681 | `(("java-asm-bootstrap" ,java-asm-bootstrap))) | |
e7e28510 RW |
2682 | (native-inputs |
2683 | `(("unzip" ,unzip))) | |
2684 | (home-page "https://code.google.com/archive/p/jarjar/") | |
2685 | (synopsis "Repackage Java libraries") | |
2686 | (description | |
2687 | "Jar Jar Links is a utility that makes it easy to repackage Java | |
2688 | libraries and embed them into your own distribution. Jar Jar Links includes | |
2689 | an Ant task that extends the built-in @code{jar} task.") | |
2690 | (license license:asl2.0))) | |
87c31a21 RW |
2691 | |
2692 | (define-public java-hamcrest-core | |
2693 | (package | |
2694 | (name "java-hamcrest-core") | |
2695 | (version "1.3") | |
2696 | (source (origin | |
2697 | (method url-fetch) | |
00672896 HG |
2698 | (uri (string-append "https://github.com/hamcrest/JavaHamcrest/" |
2699 | "archive/hamcrest-java-" version ".tar.gz")) | |
87c31a21 RW |
2700 | (sha256 |
2701 | (base32 | |
00672896 | 2702 | "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva")) |
87c31a21 RW |
2703 | (modules '((guix build utils))) |
2704 | (snippet | |
2705 | '(begin | |
00672896 HG |
2706 | ;; Delete bundled thirds-party jar archives. |
2707 | (delete-file-recursively "lib") | |
87c31a21 RW |
2708 | #t)))) |
2709 | (build-system ant-build-system) | |
2710 | (arguments | |
2711 | `(#:tests? #f ; Tests require junit | |
a8d3cb62 RW |
2712 | #:modules ((guix build ant-build-system) |
2713 | (guix build utils) | |
2714 | (srfi srfi-1)) | |
87c31a21 | 2715 | #:make-flags (list (string-append "-Dversion=" ,version)) |
fae0b4ca | 2716 | #:test-target "unit-test" |
87c31a21 RW |
2717 | #:build-target "core" |
2718 | #:phases | |
2719 | (modify-phases %standard-phases | |
2720 | ;; Disable unit tests, because they require junit, which requires | |
2721 | ;; hamcrest-core. We also give a fixed value to the "Built-Date" | |
2722 | ;; attribute from the manifest for reproducibility. | |
2723 | (add-before 'configure 'patch-build.xml | |
2724 | (lambda _ | |
2725 | (substitute* "build.xml" | |
2726 | (("unit-test, ") "") | |
2727 | (("\\$\\{build.timestamp\\}") "guix")) | |
2728 | #t)) | |
2729 | ;; Java's "getMethods()" returns methods in an unpredictable order. | |
2730 | ;; To make the output of the generated code deterministic we must | |
2731 | ;; sort the array of methods. | |
2732 | (add-after 'unpack 'make-method-order-deterministic | |
2733 | (lambda _ | |
2734 | (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java" | |
2735 | (("import java\\.util\\.Iterator;" line) | |
2736 | (string-append line "\n" | |
2737 | "import java.util.Arrays; import java.util.Comparator;")) | |
2738 | (("allMethods = cls\\.getMethods\\(\\);" line) | |
2739 | (string-append "_" line | |
2740 | " | |
2741 | private Method[] getSortedMethods() { | |
2742 | Arrays.sort(_allMethods, new Comparator<Method>() { | |
2743 | @Override | |
2744 | public int compare(Method a, Method b) { | |
2745 | return a.toString().compareTo(b.toString()); | |
2746 | } | |
2747 | }); | |
2748 | return _allMethods; | |
2749 | } | |
2750 | ||
2751 | private Method[] allMethods = getSortedMethods();"))))) | |
2752 | (add-before 'build 'do-not-use-bundled-qdox | |
2753 | (lambda* (#:key inputs #:allow-other-keys) | |
2754 | (substitute* "build.xml" | |
2755 | (("lib/generator/qdox-1.12.jar") | |
2756 | (string-append (assoc-ref inputs "java-qdox-1.12") | |
2757 | "/share/java/qdox.jar"))) | |
2758 | #t)) | |
fab959d3 HG |
2759 | ;; build.xml searches for .jar files in this directoy, which |
2760 | ;; we remove from the source archive. | |
2761 | (add-before 'build 'create-dummy-directories | |
2762 | (lambda _ | |
2763 | (mkdir-p "lib/integration") | |
2764 | #t)) | |
87c31a21 RW |
2765 | (replace 'install |
2766 | (lambda* (#:key outputs #:allow-other-keys) | |
a8d3cb62 RW |
2767 | (let* ((target (string-append (assoc-ref outputs "out") |
2768 | "/share/java/")) | |
2769 | (version-suffix ,(string-append "-" version ".jar")) | |
2770 | (install-without-version-suffix | |
2771 | (lambda (jar) | |
2772 | (copy-file jar | |
2773 | (string-append target | |
2774 | (basename jar version-suffix) | |
2775 | ".jar"))))) | |
2776 | (mkdir-p target) | |
2777 | (for-each | |
2778 | install-without-version-suffix | |
2779 | (find-files "build" | |
2780 | (lambda (name _) | |
2781 | (and (string-suffix? ".jar" name) | |
2782 | (not (string-suffix? "-sources.jar" name))))))) | |
2783 | #t))))) | |
87c31a21 RW |
2784 | (native-inputs |
2785 | `(("java-qdox-1.12" ,java-qdox-1.12) | |
2786 | ("java-jarjar" ,java-jarjar))) | |
2787 | (home-page "http://hamcrest.org/") | |
2788 | (synopsis "Library of matchers for building test expressions") | |
2789 | (description | |
2790 | "This package provides a library of matcher objects (also known as | |
2791 | constraints or predicates) allowing @code{match} rules to be defined | |
2792 | declaratively, to be used in other frameworks. Typical scenarios include | |
2793 | testing frameworks, mocking libraries and UI validation rules.") | |
2794 | (license license:bsd-2))) | |
d0184f44 RW |
2795 | |
2796 | (define-public java-junit | |
2797 | (package | |
2798 | (name "java-junit") | |
2799 | (version "4.12") | |
2800 | (source (origin | |
2801 | (method url-fetch) | |
2802 | (uri (string-append "https://github.com/junit-team/junit/" | |
2803 | "archive/r" version ".tar.gz")) | |
2804 | (file-name (string-append name "-" version ".tar.gz")) | |
2805 | (sha256 | |
2806 | (base32 | |
2807 | "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws")) | |
2808 | (modules '((guix build utils))) | |
2809 | (snippet | |
2810 | '(begin | |
2811 | ;; Delete bundled jar archives. | |
2812 | (delete-file-recursively "lib") | |
2813 | #t)))) | |
2814 | (build-system ant-build-system) | |
2815 | (arguments | |
2816 | `(#:tests? #f ; no tests | |
2817 | #:jar-name "junit.jar")) | |
2818 | (inputs | |
2819 | `(("java-hamcrest-core" ,java-hamcrest-core))) | |
2820 | (home-page "http://junit.org/") | |
2821 | (synopsis "Test framework for Java") | |
2822 | (description | |
2823 | "JUnit is a simple framework to write repeatable tests for Java projects. | |
2824 | JUnit provides assertions for testing expected results, test fixtures for | |
2825 | sharing common test data, and test runners for running tests.") | |
2826 | (license license:epl1.0))) | |
9fb20d01 RW |
2827 | |
2828 | (define-public java-plexus-utils | |
2829 | (package | |
2830 | (name "java-plexus-utils") | |
2831 | (version "3.0.24") | |
2832 | (source (origin | |
2833 | (method url-fetch) | |
2834 | (uri (string-append "https://github.com/codehaus-plexus/" | |
2835 | "plexus-utils/archive/plexus-utils-" | |
2836 | version ".tar.gz")) | |
2837 | (sha256 | |
2838 | (base32 | |
2839 | "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js")))) | |
2840 | (build-system ant-build-system) | |
2841 | ;; FIXME: The default build.xml does not include a target to install | |
2842 | ;; javadoc files. | |
2843 | (arguments | |
2844 | `(#:jar-name "plexus-utils.jar" | |
2845 | #:source-dir "src/main" | |
2846 | #:phases | |
2847 | (modify-phases %standard-phases | |
2848 | (add-after 'unpack 'fix-reference-to-/bin-and-/usr | |
2849 | (lambda _ | |
2850 | (substitute* "src/main/java/org/codehaus/plexus/util/\ | |
2851 | cli/shell/BourneShell.java" | |
2852 | (("/bin/sh") (which "sh")) | |
2853 | (("/usr/") (getcwd))) | |
2854 | #t)) | |
2855 | (add-after 'unpack 'fix-or-disable-broken-tests | |
2856 | (lambda _ | |
2857 | (with-directory-excursion "src/test/java/org/codehaus/plexus/util" | |
2858 | (substitute* '("cli/CommandlineTest.java" | |
2859 | "cli/shell/BourneShellTest.java") | |
2860 | (("/bin/sh") (which "sh")) | |
2861 | (("/bin/echo") (which "echo"))) | |
2862 | ||
2863 | ;; This test depends on MavenProjectStub, but we don't have | |
2864 | ;; a package for Maven. | |
2865 | (delete-file "introspection/ReflectionValueExtractorTest.java") | |
2866 | ||
2867 | ;; FIXME: The command line tests fail, maybe because they use | |
2868 | ;; absolute paths. | |
2869 | (delete-file "cli/CommandlineTest.java")) | |
2870 | #t))))) | |
2871 | (native-inputs | |
2872 | `(("java-junit" ,java-junit))) | |
2873 | (home-page "http://codehaus-plexus.github.io/plexus-utils/") | |
2874 | (synopsis "Common utilities for the Plexus framework") | |
2875 | (description "This package provides various Java utility classes for the | |
2876 | Plexus framework to ease working with strings, files, command lines, XML and | |
2877 | more.") | |
2878 | (license license:asl2.0))) | |
1e555562 HG |
2879 | |
2880 | (define-public java-plexus-interpolation | |
2881 | (package | |
2882 | (name "java-plexus-interpolation") | |
2883 | (version "1.23") | |
2884 | (source (origin | |
2885 | (method url-fetch) | |
2886 | (uri (string-append "https://github.com/codehaus-plexus/" | |
2887 | "plexus-interpolation/archive/" | |
2888 | "plexus-interpolation-" version ".tar.gz")) | |
2889 | (sha256 | |
2890 | (base32 | |
fd75eb6c | 2891 | "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn")))) |
1e555562 HG |
2892 | (build-system ant-build-system) |
2893 | (arguments | |
2894 | `(#:jar-name "plexus-interpolation.jar" | |
2895 | #:source-dir "src/main")) | |
2896 | (native-inputs | |
2897 | `(("java-junit" ,java-junit) | |
2898 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
2899 | (home-page "http://codehaus-plexus.github.io/plexus-interpolation/") | |
2900 | (synopsis "Java components for interpolating ${} strings and the like") | |
2901 | (description "Plexus interpolator is a modular, flexible interpolation | |
2902 | framework for the expression language style commonly seen in Maven, Plexus, | |
2903 | and other related projects. | |
2904 | ||
2905 | It has its foundation in the @code{org.codehaus.plexus.utils.interpolation} | |
2906 | package within @code{plexus-utils}, but has been separated in order to allow | |
2907 | these two libraries to vary independently of one another.") | |
2908 | (license license:asl2.0))) | |
8f8ed9aa | 2909 | |
bb27eb0d JL |
2910 | (define-public java-plexus-classworlds |
2911 | (package | |
2912 | (name "java-plexus-classworlds") | |
2913 | (version "2.5.2") | |
2914 | (source (origin | |
2915 | (method url-fetch) | |
2916 | (uri (string-append "https://github.com/codehaus-plexus/" | |
2917 | "plexus-classworlds/archive/plexus-classworlds-" | |
2918 | version ".tar.gz")) | |
2919 | (sha256 | |
2920 | (base32 | |
2921 | "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g")))) | |
2922 | (build-system ant-build-system) | |
2923 | (arguments | |
2924 | `(#:jar-name "plexus-classworlds.jar" | |
2925 | #:source-dir "src/main" | |
2926 | #:tests? #f));; FIXME: we need to generate some resources as in pom.xml | |
2927 | (native-inputs | |
2928 | `(("java-junit" ,java-junit))) | |
2929 | (home-page "http://codehaus-plexus.github.io/plexus-classworlds/") | |
2930 | (synopsis "Java class loader framework") | |
f4548394 TGR |
2931 | (description "Plexus classworlds replaces the native @code{ClassLoader} |
2932 | mechanism of Java. It is especially useful for dynamic loading of application | |
bb27eb0d JL |
2933 | components.") |
2934 | (license license:asl2.0))) | |
2935 | ||
a7ad92ad | 2936 | (define java-plexus-container-default-bootstrap |
0726d4ea JL |
2937 | (package |
2938 | (name "java-plexus-container-default-bootstrap") | |
2939 | (version "1.7.1") | |
2940 | (source (origin | |
2941 | (method url-fetch) | |
2942 | (uri (string-append "https://github.com/codehaus-plexus/plexus-containers" | |
2943 | "/archive/plexus-containers-" version ".tar.gz")) | |
2944 | (sha256 | |
2945 | (base32 | |
2946 | "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc")))) | |
2947 | (build-system ant-build-system) | |
2948 | (arguments | |
2949 | `(#:jar-name "container-default.jar" | |
2950 | #:source-dir "plexus-container-default/src/main/java" | |
2951 | #:test-dir "plexus-container-default/src/test" | |
2952 | #:jdk ,icedtea-8 | |
2953 | #:tests? #f; requires plexus-archiver, which depends on this package | |
2954 | #:phases | |
2955 | (modify-phases %standard-phases | |
2956 | (add-before 'build 'copy-resources | |
2957 | (lambda _ | |
2958 | (copy-recursively | |
2959 | "plexus-container-default/src/main/resources/" | |
2960 | "build/classes") | |
2961 | #t))))) | |
2962 | (inputs | |
2963 | `(("worldclass" ,java-plexus-classworlds) | |
2964 | ("xbean" ,java-geronimo-xbean-reflect) | |
2965 | ("utils" ,java-plexus-utils) | |
2966 | ("junit" ,java-junit) | |
2967 | ("guava" ,java-guava))) | |
2968 | (home-page "https://github.com/codehaus-plexus/plexus-containers") | |
f4548394 | 2969 | (synopsis "Inversion-of-control container") |
0726d4ea | 2970 | (description "Plexus-default-container is Plexus' inversion-of-control |
f4548394 | 2971 | (@dfn{IoC}) container. It is composed of its public API and its default |
0726d4ea JL |
2972 | implementation.") |
2973 | (license license:asl2.0))) | |
2974 | ||
0858b9dc JL |
2975 | (define-public java-plexus-io |
2976 | (package | |
2977 | (name "java-plexus-io") | |
2978 | (version "3.0.0") | |
2979 | (source (origin | |
2980 | (method url-fetch) | |
2981 | (uri (string-append "https://github.com/codehaus-plexus/plexus-io" | |
2982 | "/archive/plexus-io-" version ".tar.gz")) | |
2983 | (sha256 | |
2984 | (base32 | |
2985 | "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw")))) | |
2986 | (build-system ant-build-system) | |
2987 | (arguments | |
2988 | `(#:jar-name "plexus-io.jar" | |
2989 | #:source-dir "src/main/java" | |
2990 | #:test-dir "src/test" | |
2991 | #:jdk ,icedtea-8 | |
2992 | #:phases | |
2993 | (modify-phases %standard-phases | |
2994 | (add-before 'build 'copy-resources | |
2995 | (lambda _ | |
2996 | (mkdir-p "build/classes/META-INF/plexus") | |
2997 | (copy-file "src/main/resources/META-INF/plexus/components.xml" | |
2998 | "build/classes/META-INF/plexus/components.xml") | |
2999 | #t))))) | |
3000 | (inputs | |
3001 | `(("utils" ,java-plexus-utils) | |
3002 | ("commons-io" ,java-commons-io) | |
3003 | ("java-jsr305" ,java-jsr305))) | |
3004 | (native-inputs | |
3005 | `(("junit" ,java-junit) | |
3006 | ("hamcrest" ,java-hamcrest-core) | |
3007 | ("guava" ,java-guava) | |
3008 | ("classworlds" ,java-plexus-classworlds) | |
3009 | ("xbean" ,java-geronimo-xbean-reflect) | |
3010 | ("container-default" ,java-plexus-container-default-bootstrap))) | |
3011 | (home-page "https://github.com/codehaus-plexus/plexus-io") | |
3012 | (synopsis "I/O plexus components") | |
3013 | (description "Plexus IO is a set of plexus components, which are designed | |
3014 | for use in I/O operations. This implementation using plexus components allows | |
3015 | reusing it in maven.") | |
3016 | (license license:asl2.0))) | |
3017 | ||
b51df3ca JL |
3018 | (define-public java-plexus-archiver |
3019 | (package | |
3020 | (name "java-plexus-archiver") | |
3021 | (version "3.5") | |
3022 | (source (origin | |
3023 | (method url-fetch) | |
3024 | (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver" | |
3025 | "/archive/plexus-archiver-" version ".tar.gz")) | |
3026 | (sha256 | |
3027 | (base32 | |
3028 | "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv")))) | |
3029 | (build-system ant-build-system) | |
3030 | (arguments | |
3031 | `(#:jar-name "plexus-archiver.jar" | |
3032 | #:source-dir "src/main/java" | |
3033 | #:jdk ,icedtea-8 | |
3034 | #:test-dir "src/test" | |
3035 | #:test-exclude (list "**/Abstract*.java" "**/Base*.java") | |
3036 | #:phases | |
3037 | (modify-phases %standard-phases | |
3038 | (add-before 'check 'remove-failing | |
3039 | (lambda _ | |
3040 | ;; Requires an older version of plexus container | |
3041 | (delete-file | |
3042 | "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java"))) | |
3043 | (add-before 'build 'copy-resources | |
3044 | (lambda _ | |
3045 | (mkdir-p "build/classes/META-INF/plexus") | |
3046 | (copy-file "src/main/resources/META-INF/plexus/components.xml" | |
3047 | "build/classes/META-INF/plexus/components.xml") | |
3048 | #t))))) | |
3049 | (inputs | |
3050 | `(("utils" ,java-plexus-utils) | |
3051 | ("commons-io" ,java-commons-io) | |
3052 | ("snappy" ,java-iq80-snappy) | |
3053 | ("io" ,java-plexus-io) | |
3054 | ("compress" ,java-commons-compress) | |
3055 | ("container-default" ,java-plexus-container-default-bootstrap) | |
3056 | ("snappy" ,java-snappy) | |
3057 | ("java-jsr305" ,java-jsr305))) | |
3058 | (native-inputs | |
3059 | `(("junit" ,java-junit) | |
3060 | ("classworld" ,java-plexus-classworlds) | |
3061 | ("xbean" ,java-geronimo-xbean-reflect) | |
3062 | ("xz" ,java-tukaani-xz) | |
3063 | ("guava" ,java-guava))) | |
3064 | (home-page "https://github.com/codehaus-plexus/plexus-archiver") | |
3065 | (synopsis "Archiver component of the Plexus project") | |
3066 | (description "Plexus-archiver contains a component to deal with project | |
3067 | archives (jar).") | |
3068 | (license license:asl2.0))) | |
3069 | ||
a0837294 JL |
3070 | (define-public java-plexus-container-default |
3071 | (package | |
3072 | (inherit java-plexus-container-default-bootstrap) | |
3073 | (name "java-plexus-container-default") | |
3074 | (arguments | |
3075 | `(#:jar-name "container-default.jar" | |
3076 | #:source-dir "plexus-container-default/src/main/java" | |
3077 | #:test-dir "plexus-container-default/src/test" | |
3078 | #:test-exclude (list ;"**/*Test.java" | |
3079 | "**/Abstract*.java" | |
3080 | ;; Requires plexus-hierarchy | |
3081 | "**/PlexusHierarchyTest.java" | |
3082 | ;; Failures | |
3083 | "**/ComponentRealmCompositionTest.java" | |
3084 | "**/PlexusContainerTest.java") | |
3085 | #:jdk ,icedtea-8 | |
3086 | #:phases | |
3087 | (modify-phases %standard-phases | |
3088 | (add-before 'build 'copy-resources | |
3089 | (lambda _ | |
3090 | (copy-recursively | |
3091 | "plexus-container-default/src/main/resources/" | |
3092 | "build/classes") | |
3093 | #t)) | |
3094 | (add-before 'check 'fix-paths | |
3095 | (lambda _ | |
3096 | (let ((dir "plexus-container-default/src/test/java/org/codehaus")) | |
3097 | (substitute* | |
3098 | (string-append | |
3099 | dir "/plexus/component/composition/" | |
3100 | "ComponentRealmCompositionTest.java") | |
3101 | (("src/test") "plexus-container-default/src/test")) | |
3102 | #t)))))) | |
3103 | (inputs | |
3104 | `(("worldclass" ,java-plexus-classworlds) | |
3105 | ("xbean" ,java-geronimo-xbean-reflect) | |
3106 | ("utils" ,java-plexus-utils) | |
3107 | ("junit" ,java-junit) | |
3108 | ("guava" ,java-guava))) | |
3109 | (native-inputs | |
3110 | `(("archiver" ,java-plexus-archiver) | |
3111 | ("hamcrest" ,java-hamcrest-core))))) | |
3112 | ||
3214afab JL |
3113 | (define-public java-plexus-component-annotations |
3114 | (package | |
3115 | (inherit java-plexus-container-default) | |
3116 | (name "java-plexus-component-annotations") | |
3117 | (arguments | |
3118 | `(#:jar-name "plexus-component-annotations.jar" | |
3119 | #:source-dir "plexus-component-annotations/src/main/java" | |
3120 | #:tests? #f)); no tests | |
3121 | (inputs '()) | |
3122 | (native-inputs '()) | |
3123 | (synopsis "Plexus descriptors generator") | |
3124 | (description "This package is a Maven plugin to generate Plexus descriptors | |
3125 | from source tags and class annotations."))) | |
3126 | ||
4f77ba17 JL |
3127 | (define-public java-plexus-cipher |
3128 | (package | |
3129 | (name "java-plexus-cipher") | |
3130 | (version "1.7") | |
3131 | (source (origin | |
3132 | (method url-fetch) | |
3133 | (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher" | |
3134 | "/archive/plexus-cipher-" version ".tar.gz")) | |
3135 | (sha256 | |
3136 | (base32 | |
3137 | "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3")))) | |
3138 | (build-system ant-build-system) | |
3139 | (arguments | |
3140 | `(#:jar-name "plexus-cipher.jar" | |
3141 | #:source-dir "src/main/java" | |
3142 | #:jdk ,icedtea-8 | |
3143 | #:tests? #f; FIXME: requires sisu-inject-bean | |
3144 | #:phases | |
3145 | (modify-phases %standard-phases | |
3146 | (add-before 'build 'copy-resources | |
3147 | (lambda _ | |
3148 | (copy-recursively "src/main/resources" "build/classes") | |
3149 | (mkdir-p "build/classes/META-INF/sisu") | |
3150 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
3151 | (lambda _ | |
3152 | (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n"))) | |
3153 | #t))))) | |
3154 | (inputs | |
3155 | `(("java-cdi-api" ,java-cdi-api) | |
3156 | ("java-javax-inject" ,java-javax-inject))) | |
3157 | (home-page "https://github.com/sonatype/plexus-cipher") | |
3158 | (synopsis "Encryption/decryption Component") | |
3159 | (description "Plexus-cipher contains a component to deal with encryption | |
3160 | and decryption.") | |
3161 | (license license:asl2.0))) | |
3162 | ||
239126d4 JL |
3163 | (define-public java-plexus-compiler-api |
3164 | (package | |
3165 | (name "java-plexus-compiler-api") | |
3166 | (version "2.8.2") | |
3167 | (source (origin | |
3168 | (method url-fetch) | |
3169 | (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler" | |
3170 | "/archive/plexus-compiler-" version ".tar.gz")) | |
3171 | (sha256 | |
3172 | (base32 | |
3173 | "0g3x26pymcdnfnwv2a1i57pd5s26f5zqfi1rdy98z1bn01klx25k")))) | |
3174 | (build-system ant-build-system) | |
3175 | (arguments | |
3176 | `(#:jar-name "plexus-compiler-api.jar" | |
3177 | #:source-dir "plexus-compiler-api/src/main/java" | |
3178 | #:jdk ,icedtea-8 | |
3179 | #:test-dir "plexus-compiler-api/src/test")) | |
3180 | (inputs | |
3181 | `(("java-plexus-container-default" ,java-plexus-container-default) | |
3182 | ("java-plexus-util" ,java-plexus-utils))) | |
3183 | (native-inputs | |
3184 | `(("java-junit" ,java-junit))) | |
3185 | (home-page "https://github.com/codehaus-plexus/plexus-compiler") | |
3186 | (synopsis "Plexus Compilers component's API to manipulate compilers") | |
3187 | (description "This package contains the API used by components to manipulate | |
3188 | compilers.") | |
3189 | (license (list license:asl2.0 | |
3190 | license:expat)))) | |
3191 | ||
f8a519fa JL |
3192 | (define-public java-plexus-compiler-javac |
3193 | (package | |
3194 | (inherit java-plexus-compiler-api) | |
3195 | (name "java-plexus-compiler-javac") | |
3196 | (arguments | |
3197 | `(#:jar-name "plexus-compiler-javac.jar" | |
3198 | #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java" | |
3199 | #:jdk ,icedtea-8 | |
3200 | #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package. | |
3201 | #:test-dir "plexus-compilers/plexus-compiler-javac/src/test")) | |
3202 | (inputs | |
3203 | `(("java-plexus-compiler-api" ,java-plexus-compiler-api) | |
3204 | ("java-plexus-utils" ,java-plexus-utils) | |
3205 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
3206 | (native-inputs | |
3207 | `(("java-junit" ,java-junit))) | |
3208 | (synopsis "Javac Compiler support for Plexus Compiler component") | |
3209 | (description "This package contains the Javac Compiler support for Plexus | |
3210 | Compiler component."))) | |
3211 | ||
0aa85081 JL |
3212 | (define-public java-plexus-sec-dispatcher |
3213 | (package | |
3214 | (name "java-plexus-sec-dispatcher") | |
3215 | (version "1.4") ;; Newest release listed at the Maven Central Repository. | |
3216 | (source (origin | |
3217 | ;; This project doesn't tag releases or publish tarballs, so we take | |
3218 | ;; the "prepare release plexus-sec-dispatcher-1.4" git commit. | |
3219 | (method url-fetch) | |
3220 | (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/" | |
3221 | "archive/7db8f88048.tar.gz")) | |
3222 | (sha256 | |
3223 | (base32 | |
3224 | "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp")) | |
3225 | (file-name (string-append name "-" version ".tar.gz")))) | |
3226 | (arguments | |
3227 | `(#:jar-name "plexus-sec-dispatcher.jar" | |
3228 | #:source-dir "src/main/java" | |
3229 | #:jdk ,icedtea-8 | |
3230 | #:phases | |
3231 | (modify-phases %standard-phases | |
3232 | (add-before 'build 'generate-models | |
3233 | (lambda* (#:key inputs #:allow-other-keys) | |
3234 | (define (modello-single-mode file version mode) | |
3235 | (zero? (system* "java" | |
3236 | "org.codehaus.modello.ModelloCli" | |
3237 | file mode "src/main/java" version | |
3238 | "false" "true"))) | |
3239 | (let ((file "src/main/mdo/settings-security.mdo")) | |
3240 | (and | |
3241 | (modello-single-mode file "1.0.0" "java") | |
3242 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
3243 | (modello-single-mode file "1.0.0" "xpp3-writer"))))) | |
3244 | (add-before 'build 'generate-components.xml | |
3245 | (lambda _ | |
3246 | (mkdir-p "build/classes/META-INF/plexus") | |
3247 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
3248 | (lambda _ | |
3249 | (display | |
3250 | "<component-set>\n | |
3251 | <components>\n | |
3252 | <component>\n | |
3253 | <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n | |
3254 | <role-hint>default</role-hint>\n | |
3255 | <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n | |
3256 | <description></description>\n | |
3257 | <requirements>\n | |
3258 | <requirement>\n | |
3259 | <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n | |
3260 | <field-name>_cipher</field-name>\n | |
3261 | </requirement>\n | |
3262 | <requirement>\n | |
3263 | <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n | |
3264 | <field-name>_decryptors</field-name>\n | |
3265 | </requirement>\n | |
3266 | </requirements>\n | |
3267 | <configuration>\n | |
3268 | <_configuration-file>~/.settings-security.xml</_configuration-file>\n | |
3269 | </configuration>\n | |
3270 | </component>\n | |
3271 | </components>\n | |
3272 | </component-set>\n"))))) | |
3273 | (add-before 'check 'fix-paths | |
3274 | (lambda _ | |
3275 | (copy-recursively "src/test/resources" "target")))))) | |
3276 | (inputs | |
3277 | `(("java-plexus-cipher" ,java-plexus-cipher))) | |
3278 | (native-inputs | |
3279 | `(("java-modello-core" ,java-modello-core) | |
3280 | ;; for modello: | |
3281 | ("java-plexus-container-default" ,java-plexus-container-default) | |
3282 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
3283 | ("java-plexus-utils" ,java-plexus-utils) | |
3284 | ("java-guava" ,java-guava) | |
3285 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
3286 | ("java-sisu-build-api" ,java-sisu-build-api) | |
3287 | ;; modello plugins: | |
3288 | ("java-modellop-plugins-java" ,java-modello-plugins-java) | |
3289 | ("java-modellop-plugins-xml" ,java-modello-plugins-xml) | |
3290 | ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3) | |
3291 | ;; for tests | |
3292 | ("java-junit" ,java-junit))) | |
3293 | (build-system ant-build-system) | |
3294 | (home-page "https://github.com/sonatype/plexus-sec-dispatcher") | |
3295 | (synopsis "Plexus Security Dispatcher Component") | |
3296 | (description "This package is the Plexus Security Dispatcher Component. | |
3297 | This component decrypts a string passed to it.") | |
3298 | (license license:asl2.0))) | |
3299 | ||
7d65489f JL |
3300 | (define-public java-plexus-cli |
3301 | (package | |
3302 | (name "java-plexus-cli") | |
3303 | (version "1.7") | |
3304 | (source (origin | |
3305 | (method git-fetch) | |
3306 | (uri (git-reference | |
3307 | (url "https://github.com/sonatype/plexus-cli") | |
3308 | (commit "a776afa6bca84e5107bedb69440329cdb24ed645"))) | |
3309 | (file-name (string-append name "-" version)) | |
3310 | (sha256 | |
3311 | (base32 | |
3312 | "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx")))) | |
3313 | (build-system ant-build-system) | |
3314 | (arguments | |
3315 | `(#:jar-name "plexus-cli.jar" | |
3316 | #:source-dir "src/main/java" | |
3317 | #:jdk ,icedtea-8 | |
3318 | #:test-dir "src/test")) | |
3319 | (inputs | |
3320 | `(("java-commons-cli" ,java-commons-cli) | |
3321 | ("java-plexus-container-default" ,java-plexus-container-default) | |
3322 | ("java-plexus-classworlds" ,java-plexus-classworlds))) | |
3323 | (native-inputs | |
3324 | `(("java-plexus-utils" ,java-plexus-utils) | |
3325 | ("java-junit" ,java-junit) | |
3326 | ("java-guava" ,java-guava))) | |
3327 | (home-page "https://codehaus-plexus.github.io/plexus-cli") | |
3328 | (synopsis "CLI building library for plexus") | |
3329 | (description "This package is a library to help creating CLI around | |
3330 | Plexus components.") | |
3331 | (license license:asl2.0))) | |
3332 | ||
8f524749 JL |
3333 | (define-public java-sisu-build-api |
3334 | (package | |
3335 | (name "java-sisu-build-api") | |
3336 | (version "0.0.7") | |
3337 | (source (origin | |
3338 | (method url-fetch) | |
3339 | (uri (string-append "https://github.com/sonatype/sisu-build-api/" | |
3340 | "archive/plexus-build-api-" version ".tar.gz")) | |
3341 | (sha256 | |
3342 | (base32 | |
3343 | "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2")))) | |
3344 | (build-system ant-build-system) | |
3345 | (arguments | |
3346 | `(#:jar-name "sisu-build-api.jar" | |
3347 | #:source-dir "src/main/java" | |
3348 | #:jdk ,icedtea-8 | |
3349 | #:tests? #f; FIXME: how to run the tests? | |
3350 | #:phases | |
3351 | (modify-phases %standard-phases | |
3352 | (add-before 'build 'copy-resources | |
3353 | (lambda _ | |
3354 | (copy-recursively "src/main/resources" "build/classes") | |
3355 | (substitute* (find-files "build/classes") | |
3356 | (("\\$\\{project.version\\}") ,version)) | |
3357 | #t)) | |
3358 | (add-before 'build 'generate-plexus-compontent | |
3359 | (lambda _ | |
3360 | (mkdir-p "build/classes/META-INF/plexus") | |
3361 | ;; This file is required for plexus to inject this package. | |
3362 | ;; FIXME: how is it generated? | |
3363 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
3364 | (lambda _ | |
3365 | (display | |
3366 | "<component-set>\n | |
3367 | <components>\n | |
3368 | <component>\n | |
3369 | <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n | |
3370 | <role-hint>default</role-hint>\n | |
3371 | <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n | |
3372 | <description>Filesystem based non-incremental build context implementation\n | |
3373 | which behaves as if all files were just created.</description>\n | |
3374 | </component>\n | |
3375 | </components>\n | |
3376 | </component-set>\n"))) | |
3377 | #t))))) | |
3378 | (inputs | |
3379 | `(("java-plexus-utils" ,java-plexus-utils) | |
3380 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
3381 | (home-page "https://github.com/sonatype/sisu-build-api/") | |
3382 | (synopsis "Base build API for maven") | |
3383 | (description "This package contains the base build API for maven and | |
3384 | a default implementation of it. This API is about scanning files in a | |
3385 | project and determining what files need to be rebuilt.") | |
3386 | (license license:asl2.0))) | |
3387 | ||
b26c8b61 JL |
3388 | (define-public java-modello-core |
3389 | (package | |
3390 | (name "java-modello-core") | |
3391 | (version "1.9.1") | |
3392 | (source (origin | |
3393 | (method url-fetch) | |
3394 | (uri (string-append "https://github.com/codehaus-plexus/modello" | |
3395 | "/archive/modello-" version ".tar.gz")) | |
3396 | (sha256 | |
3397 | (base32 | |
3398 | "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh")))) | |
3399 | (build-system ant-build-system) | |
3400 | (arguments | |
3401 | `(#:jar-name "modello-core.jar" | |
3402 | #:source-dir "modello-core/src/main/java" | |
3403 | #:test-dir "modello-core/src/test" | |
3404 | #:main-class "org.codehaus.modello.ModelloCli" | |
3405 | #:jdk ,icedtea-8 | |
3406 | #:phases | |
3407 | (modify-phases %standard-phases | |
3408 | (add-before 'build 'copy-resources | |
3409 | (lambda _ | |
3410 | (mkdir-p "build/classes/META-INF/plexus") | |
3411 | (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml" | |
3412 | "build/classes/META-INF/plexus/components.xml") | |
3413 | #t)) | |
3414 | (add-before 'check 'fix-tests | |
3415 | (lambda _ | |
3416 | (with-directory-excursion "modello-core/src/test/java/org/codehaus" | |
3417 | (substitute* '("modello/core/DefaultModelloCoreTest.java" | |
3418 | "modello/core/io/ModelReaderTest.java") | |
3419 | (("src/test") "modello-core/src/test"))) | |
3420 | #t))))) | |
3421 | (inputs | |
3422 | `(("java-plexus-utils" ,java-plexus-utils) | |
3423 | ("java-plexus-container-default" ,java-plexus-container-default) | |
3424 | ("java-sisu-build-api" ,java-sisu-build-api))) | |
3425 | (native-inputs | |
3426 | `(("java-junit" ,java-junit) | |
3427 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
3428 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
3429 | ("java-guava" ,java-guava))) | |
3430 | (home-page "http://codehaus-plexus.github.io/modello/") | |
3431 | (synopsis "Framework for code generation from a simple model") | |
3432 | (description "Modello is a framework for code generation from a simple model. | |
3433 | ||
3434 | Modello generates code from a simple model format: based on a plugin | |
3435 | architecture, various types of code and descriptors can be generated from the | |
3436 | single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers, | |
3437 | XSD and documentation.") | |
3438 | (license (list | |
3439 | license:expat | |
3440 | ;; Although this package uses only files licensed under expat, | |
3441 | ;; other parts of the source are licensed under different | |
3442 | ;; licenses. We include them to be inherited by other packages. | |
3443 | license:asl2.0 | |
3444 | ;; Some files in modello-plugin-java are licensed under a | |
3445 | ;; 5-clause BSD license. | |
3446 | (license:non-copyleft | |
3447 | (string-append "file:///modello-plugins/modello-plugin-java/" | |
3448 | "src/main/java/org/codehaus/modello/plugin/" | |
3449 | "java/javasource/JNaming.java")))))) | |
3450 | ||
fc620bef JL |
3451 | (define-public java-modello-plugins-java |
3452 | (package | |
3453 | (inherit java-modello-core) | |
3454 | (name "java-modello-plugins-java") | |
3455 | (arguments | |
3456 | `(#:jar-name "modello-plugins-java.jar" | |
3457 | #:source-dir "modello-plugins/modello-plugin-java/src/main/java" | |
3458 | #:test-dir "modello-plugins/modello-plugin-java/src/test" | |
3459 | #:jdk ,icedtea-8 | |
3460 | #:tests? #f; requires maven-model, which depends on this package | |
3461 | #:phases | |
3462 | (modify-phases %standard-phases | |
3463 | (add-before 'build 'copy-resources | |
3464 | (lambda _ | |
3465 | (mkdir-p "build/classes") | |
3466 | (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources" | |
3467 | "build/classes") | |
3468 | #t))))) | |
3469 | (inputs | |
3470 | `(("java-modello-core" ,java-modello-core) | |
3471 | ,@(package-inputs java-modello-core))) | |
3472 | (synopsis "Modello Java Plugin") | |
3473 | (description "Modello Java Plugin generates Java objects for the model."))) | |
3474 | ||
a0ce95ba JL |
3475 | (define-public java-modello-plugins-xml |
3476 | (package | |
3477 | (inherit java-modello-core) | |
3478 | (name "java-modello-plugins-xml") | |
3479 | (arguments | |
3480 | `(#:jar-name "modello-plugins-xml.jar" | |
3481 | #:source-dir "modello-plugins/modello-plugin-xml/src/main/java" | |
3482 | #:test-dir "modello-plugins/modello-plugin-xml/src/test" | |
3483 | #:jdk ,icedtea-8 | |
3484 | #:phases | |
3485 | (modify-phases %standard-phases | |
3486 | (add-before 'build 'copy-resources | |
3487 | (lambda _ | |
3488 | (mkdir-p "build/classes") | |
3489 | (copy-recursively | |
3490 | "modello-plugins/modello-plugin-xml/src/main/resources" | |
3491 | "build/classes") | |
3492 | #t)) | |
3493 | (add-before 'check 'fix-paths | |
3494 | (lambda _ | |
3495 | (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test" | |
3496 | (substitute* | |
3497 | "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java" | |
3498 | (("src/test") "modello-plugins/modello-plugin-xml/src/test")))))))) | |
3499 | (inputs | |
3500 | `(("java-modello-core" ,java-modello-core) | |
3501 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
3502 | ,@(package-inputs java-modello-core))) | |
3503 | (synopsis "Modello XML Plugin") | |
3504 | (description "Modello XML Plugin contains shared code for every plugins | |
3505 | working on XML representation of the model."))) | |
3506 | ||
e4708560 JL |
3507 | (define-public java-modello-test |
3508 | (package | |
3509 | (inherit java-modello-core) | |
3510 | (name "java-modello-test") | |
3511 | (arguments | |
3512 | `(#:jar-name "modello-test.jar" | |
3513 | #:source-dir "modello-test/src/main/java" | |
3514 | #:tests? #f; no tests | |
3515 | #:jdk ,icedtea-8)) | |
3516 | (inputs | |
3517 | `(("java-plexus-utils" ,java-plexus-utils) | |
3518 | ("java-plexus-compiler-api" ,java-plexus-compiler-api) | |
3519 | ("java-plexus-compiler-javac" ,java-plexus-compiler-javac) | |
3520 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
3521 | (synopsis "Modello test package") | |
3522 | (description "The modello test package contains the basis to create | |
3523 | Modello generator unit-tests, including sample models and xml files to test | |
3524 | every feature for every plugin."))) | |
3525 | ||
36607d3b JL |
3526 | (define-public java-modello-plugins-xpp3 |
3527 | (package | |
3528 | (inherit java-modello-core) | |
3529 | (name "java-modello-plugins-xpp3") | |
3530 | (arguments | |
3531 | `(#:jar-name "modello-plugins-xpp3.jar" | |
3532 | #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java" | |
3533 | #:test-dir "modello-plugins/modello-plugin-xpp3/src/test" | |
3534 | ;; One of the test dependencies is maven-model which depends on this package. | |
3535 | #:tests? #f | |
3536 | #:jdk ,icedtea-8 | |
3537 | #:phases | |
3538 | (modify-phases %standard-phases | |
3539 | (add-before 'build 'copy-resources | |
3540 | (lambda _ | |
3541 | (mkdir-p "build/classes") | |
3542 | (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources" | |
3543 | "build/classes") | |
3544 | #t))))) | |
3545 | (inputs | |
3546 | `(("java-modello-core" ,java-modello-core) | |
3547 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
3548 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) | |
3549 | ,@(package-inputs java-modello-core))) | |
3550 | (native-inputs | |
3551 | `(("java-xmlunit" ,java-xmlunit) | |
3552 | ("java-modello-test" ,java-modello-test) | |
3553 | ,@(package-native-inputs java-modello-core))) | |
3554 | (synopsis "Modello XPP3 Plugin") | |
3555 | (description "The modello XPP3 plugin generates XML readers and writers based | |
3556 | on the XPP3 API (XML Pull Parser)."))) | |
3557 | ||
8f8ed9aa RW |
3558 | (define-public java-asm |
3559 | (package | |
3560 | (name "java-asm") | |
d0e9ded7 | 3561 | (version "6.0") |
8f8ed9aa RW |
3562 | (source (origin |
3563 | (method url-fetch) | |
3564 | (uri (string-append "http://download.forge.ow2.org/asm/" | |
3565 | "asm-" version ".tar.gz")) | |
3566 | (sha256 | |
3567 | (base32 | |
d0e9ded7 | 3568 | "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00")))) |
8f8ed9aa | 3569 | (build-system ant-build-system) |
d0e9ded7 GB |
3570 | (propagated-inputs |
3571 | `(("java-aqute-bndlib" ,java-aqute-bndlib))) | |
8f8ed9aa RW |
3572 | (arguments |
3573 | `(#:build-target "compile" | |
3574 | ;; The tests require an old version of Janino, which no longer compiles | |
3575 | ;; with the JDK7. | |
3576 | #:tests? #f | |
d0e9ded7 GB |
3577 | #:make-flags |
3578 | (list | |
3579 | ;; We don't need these extra ant tasks, but the build system asks us to | |
3580 | ;; provide a path anyway. | |
3581 | "-Dobjectweb.ant.tasks.path=dummy-path" | |
3582 | ;; The java-aqute.bndlib JAR file will be put onto the classpath and | |
3583 | ;; used during the build automatically by ant-build-system, but | |
3584 | ;; java-asm's build.xml fails unless we provide something here. | |
3585 | "-Dbiz.aQute.bnd.path=dummy-path") | |
8f8ed9aa RW |
3586 | #:phases |
3587 | (modify-phases %standard-phases | |
3588 | (add-before 'install 'build-jars | |
3589 | (lambda* (#:key make-flags #:allow-other-keys) | |
3590 | ;; We cannot use the "jar" target because it depends on a couple | |
3591 | ;; of unpackaged, complicated tools. | |
3592 | (mkdir "dist") | |
3593 | (zero? (system* "jar" | |
3594 | "-cf" (string-append "dist/asm-" ,version ".jar") | |
3595 | "-C" "output/build/tmp" ".")))) | |
3596 | (replace 'install | |
3597 | (install-jars "dist"))))) | |
3598 | (native-inputs | |
3599 | `(("java-junit" ,java-junit))) | |
3600 | (home-page "http://asm.ow2.org/") | |
3601 | (synopsis "Very small and fast Java bytecode manipulation framework") | |
3602 | (description "ASM is an all purpose Java bytecode manipulation and | |
3603 | analysis framework. It can be used to modify existing classes or dynamically | |
3604 | generate classes, directly in binary form. The provided common | |
3605 | transformations and analysis algorithms allow to easily assemble custom | |
3606 | complex transformations and code analysis tools.") | |
3607 | (license license:bsd-3))) | |
607fe24a | 3608 | |
bfb4004d GB |
3609 | (define java-asm-bootstrap |
3610 | (package | |
3611 | (inherit java-asm) | |
3612 | (name "java-asm-bootstrap") | |
3613 | (arguments | |
3614 | (substitute-keyword-arguments (package-arguments java-asm) | |
3615 | ((#:tests? _) #f))) | |
3616 | (native-inputs `()) | |
3617 | (propagated-inputs | |
3618 | `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap) | |
3619 | ("java-aqute-libg" ,java-aqute-libg-bootstrap) | |
3620 | ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib) | |
de99ba7e | 3621 | (delete `("java-aqute-libg" ,java-aqute-libg) |
bfb4004d GB |
3622 | (package-inputs java-asm))))))) |
3623 | ||
607fe24a RW |
3624 | (define-public java-cglib |
3625 | (package | |
3626 | (name "java-cglib") | |
3627 | (version "3.2.4") | |
3628 | (source (origin | |
3629 | (method url-fetch) | |
3630 | (uri (string-append | |
3631 | "https://github.com/cglib/cglib/archive/RELEASE_" | |
3632 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version) | |
3633 | ".tar.gz")) | |
3634 | (file-name (string-append "cglib-" version ".tar.gz")) | |
3635 | (sha256 | |
3636 | (base32 | |
3637 | "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q")))) | |
3638 | (build-system ant-build-system) | |
3639 | (arguments | |
3640 | `(;; FIXME: tests fail because junit runs | |
3641 | ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem | |
3642 | ;; to describe a test at all. | |
3643 | #:tests? #f | |
3644 | #:jar-name "cglib.jar" | |
3645 | #:phases | |
3646 | (modify-phases %standard-phases | |
3647 | (add-after 'unpack 'chdir | |
3648 | (lambda _ (chdir "cglib") #t))))) | |
3649 | (inputs | |
3650 | `(("java-asm" ,java-asm) | |
3651 | ("java-junit" ,java-junit))) | |
3652 | (home-page "https://github.com/cglib/cglib/") | |
3653 | (synopsis "Java byte code generation library") | |
3654 | (description "The byte code generation library CGLIB is a high level API | |
3655 | to generate and transform Java byte code.") | |
3656 | (license license:asl2.0))) | |
33e34bfe RW |
3657 | |
3658 | (define-public java-objenesis | |
3659 | (package | |
3660 | (name "java-objenesis") | |
3661 | (version "2.5.1") | |
3662 | (source (origin | |
3663 | (method url-fetch) | |
3664 | (uri (string-append "https://github.com/easymock/objenesis/" | |
3665 | "archive/" version ".tar.gz")) | |
3666 | (file-name (string-append "objenesis-" version ".tar.gz")) | |
3667 | (sha256 | |
3668 | (base32 | |
3669 | "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6")))) | |
3670 | (build-system ant-build-system) | |
3671 | (arguments | |
3672 | `(#:jar-name "objenesis.jar" | |
3673 | #:source-dir "main/src/" | |
3674 | #:test-dir "main/src/test/")) | |
3675 | (native-inputs | |
3676 | `(("java-junit" ,java-junit) | |
3677 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
3678 | (home-page "http://objenesis.org/") | |
3679 | (synopsis "Bypass the constructor when creating an object") | |
3680 | (description "Objenesis is a small Java library that serves one purpose: | |
3681 | to instantiate a new object of a particular class. It is common to see | |
3682 | restrictions in libraries stating that classes must require a default | |
3683 | constructor. Objenesis aims to overcome these restrictions by bypassing the | |
3684 | constructor on object instantiation.") | |
3685 | (license license:asl2.0))) | |
ae589876 RW |
3686 | |
3687 | (define-public java-easymock | |
3688 | (package | |
3689 | (name "java-easymock") | |
3690 | (version "3.4") | |
3691 | (source (origin | |
3692 | (method url-fetch) | |
3693 | (uri (string-append "https://github.com/easymock/easymock/" | |
3694 | "archive/easymock-" version ".tar.gz")) | |
3695 | (sha256 | |
3696 | (base32 | |
3697 | "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi")))) | |
3698 | (build-system ant-build-system) | |
3699 | (arguments | |
3700 | `(#:jar-name "easymock.jar" | |
3701 | #:source-dir "core/src/main" | |
3702 | #:test-dir "core/src/test" | |
3703 | #:phases | |
3704 | (modify-phases %standard-phases | |
3705 | ;; FIXME: Android support requires the following packages to be | |
3706 | ;; available: com.google.dexmaker.stock.ProxyBuilder | |
3707 | (add-after 'unpack 'delete-android-support | |
3708 | (lambda _ | |
3709 | (with-directory-excursion "core/src/main/java/org/easymock/internal" | |
3710 | (substitute* "MocksControl.java" | |
3711 | (("AndroidSupport.isAndroid\\(\\)") "false") | |
3712 | (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") "")) | |
3713 | (delete-file "AndroidClassProxyFactory.java")) | |
3714 | #t)) | |
3715 | (add-after 'unpack 'delete-broken-tests | |
3716 | (lambda _ | |
3717 | (with-directory-excursion "core/src/test/java/org/easymock" | |
3718 | ;; This test depends on dexmaker. | |
3719 | (delete-file "tests2/ClassExtensionHelperTest.java") | |
3720 | ||
3721 | ;; This is not a test. | |
3722 | (delete-file "tests/BaseEasyMockRunnerTest.java") | |
3723 | ||
3724 | ;; This test should be executed with a different runner... | |
3725 | (delete-file "tests2/EasyMockAnnotationsTest.java") | |
3726 | ;; ...but deleting it means that we also have to delete these | |
3727 | ;; dependent files. | |
3728 | (delete-file "tests2/EasyMockRunnerTest.java") | |
3729 | (delete-file "tests2/EasyMockRuleTest.java") | |
3730 | ||
3731 | ;; This test fails because the file "easymock.properties" does | |
3732 | ;; not exist. | |
3733 | (delete-file "tests2/EasyMockPropertiesTest.java")) | |
3734 | #t))))) | |
3735 | (inputs | |
3736 | `(("java-asm" ,java-asm) | |
3737 | ("java-cglib" ,java-cglib) | |
3738 | ("java-objenesis" ,java-objenesis))) | |
3739 | (native-inputs | |
3740 | `(("java-junit" ,java-junit) | |
3741 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
3742 | (home-page "http://easymock.org") | |
3743 | (synopsis "Java library providing mock objects for unit tests") | |
3744 | (description "EasyMock is a Java library that provides an easy way to use | |
3745 | mock objects in unit testing.") | |
3746 | (license license:asl2.0))) | |
7aa37023 | 3747 | |
f12ad6c7 RW |
3748 | (define-public java-jmock-1 |
3749 | (package | |
3750 | (name "java-jmock") | |
3751 | (version "1.2.0") | |
3752 | (source (origin | |
3753 | (method url-fetch) | |
3754 | (uri (string-append "https://github.com/jmock-developers/" | |
3755 | "jmock-library/archive/" version ".tar.gz")) | |
3756 | (file-name (string-append "jmock-" version ".tar.gz")) | |
3757 | (sha256 | |
3758 | (base32 | |
3759 | "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0")))) | |
3760 | (build-system ant-build-system) | |
3761 | (arguments | |
3762 | `(#:build-target "jars" | |
3763 | #:test-target "run.tests" | |
3764 | #:phases | |
3765 | (modify-phases %standard-phases | |
3766 | (replace 'install (install-jars "build"))))) | |
3767 | (home-page "http://www.jmock.org") | |
3768 | (synopsis "Mock object library for test-driven development") | |
3769 | (description "JMock is a library that supports test-driven development of | |
3770 | Java code with mock objects. Mock objects help you design and test the | |
3771 | interactions between the objects in your programs. | |
3772 | ||
3773 | The jMock library | |
3774 | ||
3775 | @itemize | |
3776 | @item makes it quick and easy to define mock objects | |
3777 | @item lets you precisely specify the interactions between | |
3778 | your objects, reducing the brittleness of your tests | |
3779 | @item plugs into your favourite test framework | |
3780 | @item is easy to extend. | |
3781 | @end itemize\n") | |
3782 | (license license:bsd-3))) | |
3783 | ||
045124ae JL |
3784 | (define-public java-jmock |
3785 | (package | |
3786 | (inherit java-jmock-1) | |
3787 | (name "java-jmock") | |
3788 | (version "2.8.2") | |
3789 | (source (origin | |
3790 | (method url-fetch) | |
3791 | (uri (string-append "https://github.com/jmock-developers/" | |
3792 | "jmock-library/archive/" version ".tar.gz")) | |
3793 | (file-name (string-append name "-" version ".tar.gz")) | |
3794 | (sha256 | |
3795 | (base32 | |
3796 | "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0")))) | |
3797 | (inputs | |
3798 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
3799 | ("java-asm" ,java-asm) | |
3800 | ("java-bsh" ,java-bsh) | |
3801 | ("java-junit" ,java-junit))) | |
3802 | (native-inputs | |
3803 | `(("cglib" ,java-cglib))) | |
3804 | (arguments | |
3805 | `(#:jar-name "java-jmock.jar" | |
3806 | #:source-dir "jmock/src/main/java" | |
3807 | #:test-dir "jmock/src/test")))) | |
3808 | ||
25436c6d JL |
3809 | (define-public java-jmock-junit4 |
3810 | (package | |
3811 | (inherit java-jmock) | |
3812 | (name "java-jmock-junit4") | |
3813 | (arguments | |
3814 | `(#:jar-name "java-jmock-junit4.jar" | |
3815 | #:source-dir "jmock-junit4/src/main/java" | |
3816 | #:test-dir "jmock-junit4/src/test")) | |
3817 | (inputs | |
3818 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
3819 | ("java-asm" ,java-asm) | |
3820 | ("java-bsh" ,java-bsh) | |
3821 | ("java-jmock" ,java-jmock) | |
3822 | ("java-jumit" ,java-junit))))) | |
3823 | ||
e84b899d JL |
3824 | (define-public java-jmock-legacy |
3825 | (package | |
3826 | (inherit java-jmock) | |
3827 | (name "java-jmock-legacy") | |
3828 | (arguments | |
3829 | `(#:jar-name "java-jmock-legacy.jar" | |
3830 | #:source-dir "jmock-legacy/src/main/java" | |
3831 | #:test-dir "jmock-legacy/src/test" | |
3832 | #:phases | |
3833 | (modify-phases %standard-phases | |
3834 | (add-before 'check 'copy-tests | |
3835 | (lambda _ | |
3836 | ;; This file is a dependancy of some tests | |
3837 | (let ((file "org/jmock/test/acceptance/PackageProtectedType.java")) | |
3838 | (copy-file (string-append "jmock/src/test/java/" file) | |
3839 | (string-append "jmock-legacy/src/test/java/" file)) | |
3840 | #t)))))) | |
3841 | (inputs | |
3842 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
3843 | ("java-objenesis" ,java-objenesis) | |
3844 | ("java-cglib" ,java-cglib) | |
3845 | ("java-jmock" ,java-jmock) | |
3846 | ("java-asm" ,java-asm) | |
3847 | ("java-bsh" ,java-bsh) | |
3848 | ("java-junit" ,java-junit))) | |
3849 | (native-inputs | |
3850 | `(("java-jmock-junit4" ,java-jmock-junit4))))) | |
3851 | ||
439c59da RW |
3852 | (define-public java-hamcrest-all |
3853 | (package (inherit java-hamcrest-core) | |
3854 | (name "java-hamcrest-all") | |
3855 | (arguments | |
bfc007e1 RW |
3856 | `(#:jdk ,icedtea-8 |
3857 | ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core) | |
3858 | ((#:build-target _) "bigjar") | |
3859 | ((#:phases phases) | |
3860 | `(modify-phases ,phases | |
3861 | ;; Some build targets override the classpath, so we need to patch | |
3862 | ;; the build.xml to ensure that required dependencies are on the | |
3863 | ;; classpath. | |
3864 | (add-after 'unpack 'patch-classpath-for-integration | |
3865 | (lambda* (#:key inputs #:allow-other-keys) | |
3866 | (substitute* "build.xml" | |
3867 | ((" build/hamcrest-library-\\$\\{version\\}.jar" line) | |
3868 | (string-join | |
3869 | (cons line | |
3870 | (append | |
3871 | (find-files (assoc-ref inputs "java-junit") "\\.jar$") | |
3872 | (find-files (assoc-ref inputs "java-jmock") "\\.jar$") | |
3873 | (find-files (assoc-ref inputs "java-easymock") "\\.jar$"))) | |
3874 | ";"))) | |
3875 | #t))))))) | |
439c59da RW |
3876 | (inputs |
3877 | `(("java-junit" ,java-junit) | |
3878 | ("java-jmock" ,java-jmock-1) | |
3879 | ("java-easymock" ,java-easymock) | |
439c59da RW |
3880 | ,@(package-inputs java-hamcrest-core))))) |
3881 | ||
7aa37023 RW |
3882 | (define-public java-jopt-simple |
3883 | (package | |
3884 | (name "java-jopt-simple") | |
3885 | (version "5.0.3") | |
3886 | (source (origin | |
3887 | (method url-fetch) | |
3888 | (uri (string-append "http://repo1.maven.org/maven2/" | |
3889 | "net/sf/jopt-simple/jopt-simple/" | |
3890 | version "/jopt-simple-" | |
3891 | version "-sources.jar")) | |
3892 | (sha256 | |
3893 | (base32 | |
3894 | "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa")))) | |
3895 | (build-system ant-build-system) | |
3896 | (arguments | |
3897 | `(#:tests? #f ; there are no tests | |
3898 | #:jar-name "jopt-simple.jar")) | |
3899 | (home-page "https://pholser.github.io/jopt-simple/") | |
3900 | (synopsis "Java library for parsing command line options") | |
3901 | (description "JOpt Simple is a Java library for parsing command line | |
3902 | options, such as those you might pass to an invocation of @code{javac}. In | |
3903 | the interest of striving for simplicity, as closely as possible JOpt Simple | |
3904 | attempts to honor the command line option syntaxes of POSIX @code{getopt} and | |
3905 | GNU @code{getopt_long}. It also aims to make option parser configuration and | |
3906 | retrieval of options and their arguments simple and expressive, without being | |
3907 | overly clever.") | |
3908 | (license license:expat))) | |
840969e8 RW |
3909 | |
3910 | (define-public java-commons-math3 | |
3911 | (package | |
3912 | (name "java-commons-math3") | |
3913 | (version "3.6.1") | |
3914 | (source (origin | |
3915 | (method url-fetch) | |
3916 | (uri (string-append "mirror://apache/commons/math/source/" | |
3917 | "commons-math3-" version "-src.tar.gz")) | |
3918 | (sha256 | |
3919 | (base32 | |
3920 | "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6")))) | |
3921 | (build-system ant-build-system) | |
3922 | (arguments | |
3923 | `(#:build-target "jar" | |
3924 | #:test-target "test" | |
3925 | #:make-flags | |
3926 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
3927 | (junit (assoc-ref %build-inputs "java-junit"))) | |
3928 | (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") | |
3929 | (string-append "-Dhamcrest.jar=" hamcrest | |
3930 | "/share/java/hamcrest-core.jar"))) | |
3931 | #:phases | |
3932 | (modify-phases %standard-phases | |
3933 | ;; We want to build the jar in the build phase and run the tests | |
3934 | ;; later in a separate phase. | |
3935 | (add-after 'unpack 'untangle-targets | |
3936 | (lambda _ | |
3937 | (substitute* "build.xml" | |
3938 | (("name=\"jar\" depends=\"test\"") | |
3939 | "name=\"jar\" depends=\"compile\"")) | |
3940 | #t)) | |
3941 | ;; There is no install target. | |
3942 | (replace 'install | |
3943 | (install-jars "target"))))) | |
3944 | (native-inputs | |
3945 | `(("java-junit" ,java-junit) | |
3946 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
3947 | (home-page "http://commons.apache.org/math/") | |
3948 | (synopsis "Apache Commons mathematics library") | |
3949 | (description "Commons Math is a library of lightweight, self-contained | |
3950 | mathematics and statistics components addressing the most common problems not | |
3951 | available in the Java programming language or Commons Lang.") | |
3952 | (license license:asl2.0))) | |
62c9bfaa RW |
3953 | |
3954 | (define-public java-jmh | |
3955 | (package | |
3956 | (name "java-jmh") | |
3957 | (version "1.17.5") | |
3958 | (source (origin | |
3959 | (method hg-fetch) | |
3960 | (uri (hg-reference | |
3961 | (url "http://hg.openjdk.java.net/code-tools/jmh/") | |
3962 | (changeset version))) | |
3963 | (file-name (string-append name "-" version "-checkout")) | |
3964 | (sha256 | |
3965 | (base32 | |
3966 | "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084")))) | |
3967 | (build-system ant-build-system) | |
3968 | (arguments | |
3969 | `(#:jar-name "jmh-core.jar" | |
3970 | #:source-dir "jmh-core/src/main" | |
3971 | #:test-dir "jmh-core/src/test" | |
3972 | #:phases | |
3973 | (modify-phases %standard-phases | |
3974 | ;; This seems to be a bug in the JDK. It may not be necessary in | |
3975 | ;; future versions of the JDK. | |
3976 | (add-after 'unpack 'fix-bug | |
3977 | (lambda _ | |
3978 | (with-directory-excursion | |
3979 | "jmh-core/src/main/java/org/openjdk/jmh/runner/options" | |
3980 | (substitute* '("IntegerValueConverter.java" | |
3981 | "ThreadsValueConverter.java") | |
3982 | (("public Class<Integer> valueType") | |
3983 | "public Class<? extends Integer> valueType"))) | |
3984 | #t))))) | |
3985 | (inputs | |
3986 | `(("java-jopt-simple" ,java-jopt-simple) | |
3987 | ("java-commons-math3" ,java-commons-math3))) | |
3988 | (native-inputs | |
3989 | `(("java-junit" ,java-junit) | |
3990 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
3991 | (home-page "http://openjdk.java.net/projects/code-tools/jmh/") | |
3992 | (synopsis "Benchmark harness for the JVM") | |
3993 | (description "JMH is a Java harness for building, running, and analysing | |
3994 | nano/micro/milli/macro benchmarks written in Java and other languages | |
f4548394 | 3995 | targeting the JVM.") |
62c9bfaa RW |
3996 | ;; GPLv2 only |
3997 | (license license:gpl2))) | |
56ebb4e9 RW |
3998 | |
3999 | (define-public java-commons-collections4 | |
4000 | (package | |
4001 | (name "java-commons-collections4") | |
4002 | (version "4.1") | |
4003 | (source (origin | |
4004 | (method url-fetch) | |
4005 | (uri (string-append "mirror://apache/commons/collections/source/" | |
4006 | "commons-collections4-" version "-src.tar.gz")) | |
4007 | (sha256 | |
4008 | (base32 | |
4009 | "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl")))) | |
4010 | (build-system ant-build-system) | |
4011 | (arguments | |
4012 | `(#:test-target "test" | |
4013 | #:make-flags | |
4014 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
4015 | (junit (assoc-ref %build-inputs "java-junit")) | |
4016 | (easymock (assoc-ref %build-inputs "java-easymock"))) | |
4017 | (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") | |
4018 | (string-append "-Dhamcrest.jar=" hamcrest | |
4019 | "/share/java/hamcrest-core.jar") | |
4020 | (string-append "-Deasymock.jar=" easymock | |
4021 | "/share/java/easymock.jar"))) | |
4022 | #:phases | |
4023 | (modify-phases %standard-phases | |
4024 | (replace 'install | |
4025 | (install-jars "target"))))) | |
4026 | (native-inputs | |
4027 | `(("java-junit" ,java-junit) | |
4028 | ("java-hamcrest-core" ,java-hamcrest-core) | |
4029 | ("java-easymock" ,java-easymock))) | |
4030 | (home-page "http://commons.apache.org/collections/") | |
4031 | (synopsis "Collections framework") | |
4032 | (description "The Java Collections Framework is the recognised standard | |
4033 | for collection handling in Java. Commons-Collections seek to build upon the | |
4034 | JDK classes by providing new interfaces, implementations and utilities. There | |
4035 | are many features, including: | |
4036 | ||
4037 | @itemize | |
4038 | @item @code{Bag} interface for collections that have a number of copies of | |
4039 | each object | |
4040 | @item @code{BidiMap} interface for maps that can be looked up from value to | |
4041 | key as well and key to value | |
4042 | @item @code{MapIterator} interface to provide simple and quick iteration over | |
4043 | maps | |
4044 | @item Transforming decorators that alter each object as it is added to the | |
4045 | collection | |
4046 | @item Composite collections that make multiple collections look like one | |
4047 | @item Ordered maps and sets that retain the order elements are added in, | |
4048 | including an LRU based map | |
4049 | @item Reference map that allows keys and/or values to be garbage collected | |
4050 | under close control | |
4051 | @item Many comparator implementations | |
4052 | @item Many iterator implementations | |
4053 | @item Adapter classes from array and enumerations to collections | |
4054 | @item Utilities to test or create typical set-theory properties of collections | |
4055 | such as union, intersection, and closure. | |
4056 | @end itemize\n") | |
4057 | (license license:asl2.0))) | |
6af63e65 | 4058 | |
229a9864 JL |
4059 | (define-public java-commons-collections |
4060 | (package | |
4061 | (inherit java-commons-collections4) | |
4062 | (name "java-commons-collections") | |
4063 | (version "3.2.2") | |
4064 | (source (origin | |
4065 | (method url-fetch) | |
4066 | (uri (string-append "mirror://apache/commons/collections/source/" | |
4067 | "commons-collections-" version "-src.tar.gz")) | |
4068 | (sha256 | |
4069 | (base32 | |
7c7323e4 GB |
4070 | "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387")) |
4071 | (patches | |
4072 | (search-patches "java-commons-collections-fix-java8.patch")))) | |
229a9864 JL |
4073 | (arguments |
4074 | (substitute-keyword-arguments (package-arguments java-commons-collections4) | |
4075 | ((#:phases phases) | |
4076 | `(modify-phases ,phases | |
4077 | ;; The manifest is required by the build procedure | |
4078 | (add-before 'build 'add-manifest | |
4079 | (lambda _ | |
4080 | (mkdir-p "build/conf") | |
4081 | (call-with-output-file "build/conf/MANIFEST.MF" | |
4082 | (lambda (file) | |
4083 | (format file "Manifest-Version: 1.0\n"))))) | |
4084 | (replace 'install | |
4085 | (install-jars "build")))))))) | |
4086 | ||
5aa2f3f4 JL |
4087 | (define java-commons-collections-test-classes |
4088 | (package | |
4089 | (inherit java-commons-collections) | |
4090 | (arguments | |
4091 | `(#:jar-name "commons-collections-test-classes.jar" | |
4092 | #:source-dir "src/test" | |
4093 | #:tests? #f)) | |
4094 | (inputs | |
4095 | `(("collection" ,java-commons-collections))))) | |
4096 | ||
4097 | (define-public java-commons-beanutils | |
4098 | (package | |
4099 | (name "java-commons-beanutils") | |
4100 | (version "1.9.3") | |
4101 | (source (origin | |
4102 | (method url-fetch) | |
4103 | (uri (string-append "mirror://apache/commons/beanutils/source/" | |
4104 | "commons-beanutils-" version "-src.tar.gz")) | |
4105 | (sha256 | |
4106 | (base32 | |
4107 | "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk")))) | |
4108 | (build-system ant-build-system) | |
4109 | (arguments | |
4110 | `(#:test-target "test" | |
4111 | #:tests? #f | |
4112 | #:phases | |
4113 | (modify-phases %standard-phases | |
4114 | (replace 'install | |
4115 | (lambda* (#:key outputs #:allow-other-keys) | |
4116 | (rename-file (string-append "dist/commons-beanutils-" ,version | |
4117 | "-SNAPSHOT.jar") | |
4118 | "commons-beanutils.jar") | |
4119 | (install-file "commons-beanutils.jar" | |
4120 | (string-append (assoc-ref outputs "out") "/share/java/")) | |
4121 | #t))))) | |
4122 | (inputs | |
4123 | `(("logging" ,java-commons-logging-minimal) | |
4124 | ("collections" ,java-commons-collections))) | |
4125 | (native-inputs | |
4126 | `(("junit" ,java-junit) | |
4127 | ("collections-test" ,java-commons-collections-test-classes))) | |
4128 | (home-page "http://commons.apache.org/beanutils/") | |
4129 | (synopsis "Dynamically set or get properties in Java") | |
4130 | (description "BeanUtils provides a simplified interface to reflection and | |
4131 | introspection to set or get dynamically determined properties through their | |
4132 | setter and getter method.") | |
4133 | (license license:asl2.0))) | |
4134 | ||
6af63e65 HG |
4135 | (define-public java-commons-io |
4136 | (package | |
4137 | (name "java-commons-io") | |
4138 | (version "2.5") | |
4139 | (source | |
4140 | (origin | |
4141 | (method url-fetch) | |
4142 | (uri (string-append "mirror://apache/commons/io/source/" | |
4143 | "commons-io-" version "-src.tar.gz")) | |
4144 | (sha256 | |
4145 | (base32 | |
4146 | "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3")))) | |
4147 | (build-system ant-build-system) | |
4148 | (outputs '("out" "doc")) | |
4149 | (arguments | |
4150 | `(#:test-target "test" | |
4151 | #:make-flags | |
4152 | (list (string-append "-Djunit.jar=" | |
4153 | (assoc-ref %build-inputs "java-junit") | |
4154 | "/share/java/junit.jar")) | |
4155 | #:phases | |
4156 | (modify-phases %standard-phases | |
4157 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
4158 | (replace 'install (install-jars "target")) | |
4159 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) | |
4160 | (native-inputs | |
4161 | `(("java-junit" ,java-junit) | |
4162 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4163 | (home-page "http://commons.apache.org/io/") | |
4164 | (synopsis "Common useful IO related classes") | |
4165 | (description "Commons-IO contains utility classes, stream implementations, | |
4166 | file filters and endian classes.") | |
4167 | (license license:asl2.0))) | |
d631b5f3 HG |
4168 | |
4169 | (define-public java-commons-lang | |
4170 | (package | |
4171 | (name "java-commons-lang") | |
4172 | (version "2.6") | |
4173 | (source | |
4174 | (origin | |
4175 | (method url-fetch) | |
4176 | (uri (string-append "mirror://apache/commons/lang/source/" | |
4177 | "commons-lang-" version "-src.tar.gz")) | |
4178 | (sha256 | |
4179 | (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5")))) | |
4180 | (build-system ant-build-system) | |
4181 | (outputs '("out" "doc")) | |
4182 | (arguments | |
4183 | `(#:test-target "test" | |
e5a96113 | 4184 | #:test-exclude (list "**/Abstract*.java" "**/Random*.java") |
d631b5f3 HG |
4185 | #:phases |
4186 | (modify-phases %standard-phases | |
4187 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
4188 | (add-before 'check 'disable-failing-test | |
4189 | (lambda _ | |
4190 | ;; Disable a failing test | |
4191 | (substitute* "src/test/java/org/apache/commons/lang/\ | |
4192 | time/FastDateFormatTest.java" | |
4193 | (("public void testFormat\\(\\)") | |
4194 | "public void disabled_testFormat()")) | |
4195 | #t)) | |
4196 | (replace 'install (install-jars "target")) | |
4197 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) | |
4198 | (native-inputs | |
4199 | `(("java-junit" ,java-junit))) | |
4200 | (home-page "http://commons.apache.org/lang/") | |
4201 | (synopsis "Extension of the java.lang package") | |
4202 | (description "The Commons Lang components contains a set of Java classes | |
4203 | that provide helper methods for standard Java classes, especially those found | |
4204 | in the @code{java.lang} package in the Sun JDK. The following classes are | |
4205 | included: | |
4206 | ||
4207 | @itemize | |
4208 | @item StringUtils - Helper for @code{java.lang.String}. | |
4209 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets | |
4210 | of characters such as @code{[a-z]} and @code{[abcdez]}. | |
4211 | @item RandomStringUtils - Helper for creating randomised strings. | |
4212 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. | |
4213 | @item NumberRange - A range of numbers with an upper and lower bound. | |
4214 | @item ObjectUtils - Helper for @code{java.lang.Object}. | |
4215 | @item SerializationUtils - Helper for serializing objects. | |
4216 | @item SystemUtils - Utility class defining the Java system properties. | |
4217 | @item NestedException package - A sub-package for the creation of nested | |
4218 | exceptions. | |
4219 | @item Enum package - A sub-package for the creation of enumerated types. | |
4220 | @item Builder package - A sub-package for the creation of @code{equals}, | |
4221 | @code{hashCode}, @code{compareTo} and @code{toString} methods. | |
4222 | @end itemize\n") | |
4223 | (license license:asl2.0))) | |
82e18864 HG |
4224 | |
4225 | (define-public java-commons-lang3 | |
4226 | (package | |
4227 | (name "java-commons-lang3") | |
4228 | (version "3.4") | |
4229 | (source | |
4230 | (origin | |
4231 | (method url-fetch) | |
4232 | (uri (string-append "mirror://apache/commons/lang/source/" | |
4233 | "commons-lang3-" version "-src.tar.gz")) | |
4234 | (sha256 | |
4235 | (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg")))) | |
4236 | (build-system ant-build-system) | |
4237 | (outputs '("out" "doc")) | |
4238 | (arguments | |
4239 | `(#:test-target "test" | |
4240 | #:make-flags | |
4241 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all")) | |
4242 | (junit (assoc-ref %build-inputs "java-junit")) | |
4243 | (easymock (assoc-ref %build-inputs "java-easymock")) | |
4244 | (io (assoc-ref %build-inputs "java-commons-io"))) | |
4245 | (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") | |
4246 | (string-append "-Dhamcrest.jar=" hamcrest | |
4247 | "/share/java/hamcrest-all.jar") | |
4248 | (string-append "-Dcommons-io.jar=" io | |
4249 | "/share/java/commons-io-" | |
4250 | ,(package-version java-commons-io) | |
4251 | "-SNAPSHOT.jar") | |
4252 | (string-append "-Deasymock.jar=" easymock | |
4253 | "/share/java/easymock.jar"))) | |
4254 | #:phases | |
4255 | (modify-phases %standard-phases | |
4256 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
4257 | (replace 'install (install-jars "target")) | |
4258 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) | |
4259 | (native-inputs | |
4260 | `(("java-junit" ,java-junit) | |
4261 | ("java-commons-io" ,java-commons-io) | |
4262 | ("java-hamcrest-all" ,java-hamcrest-all) | |
4263 | ("java-easymock" ,java-easymock))) | |
4264 | (home-page "http://commons.apache.org/lang/") | |
4265 | (synopsis "Extension of the java.lang package") | |
4266 | (description "The Commons Lang components contains a set of Java classes | |
4267 | that provide helper methods for standard Java classes, especially those found | |
4268 | in the @code{java.lang} package. The following classes are included: | |
4269 | ||
4270 | @itemize | |
4271 | @item StringUtils - Helper for @code{java.lang.String}. | |
4272 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of | |
4273 | characters such as @code{[a-z]} and @code{[abcdez]}. | |
4274 | @item RandomStringUtils - Helper for creating randomised strings. | |
4275 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. | |
4276 | @item NumberRange - A range of numbers with an upper and lower bound. | |
4277 | @item ObjectUtils - Helper for @code{java.lang.Object}. | |
4278 | @item SerializationUtils - Helper for serializing objects. | |
4279 | @item SystemUtils - Utility class defining the Java system properties. | |
4280 | @item NestedException package - A sub-package for the creation of nested | |
4281 | exceptions. | |
4282 | @item Enum package - A sub-package for the creation of enumerated types. | |
4283 | @item Builder package - A sub-package for the creation of @code{equals}, | |
4284 | @code{hashCode}, @code{compareTo} and @code{toString} methods. | |
4285 | @end itemize\n") | |
4286 | (license license:asl2.0))) | |
1c188f4e | 4287 | |
afb13a10 JL |
4288 | (define-public java-commons-bsf |
4289 | (package | |
4290 | (name "java-commons-bsf") | |
4291 | (version "2.4.0") | |
4292 | (source (origin | |
4293 | (method url-fetch) | |
4294 | (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-" | |
4295 | version ".tar.gz")) | |
4296 | (sha256 | |
4297 | (base32 | |
4298 | "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas")) | |
4299 | (modules '((guix build utils))) | |
4300 | (snippet | |
4301 | '(begin | |
4302 | (for-each delete-file | |
4303 | (find-files "." "\\.jar$")) | |
4304 | #t)))) | |
4305 | (build-system ant-build-system) | |
4306 | (arguments | |
4307 | `(#:build-target "jar" | |
4308 | #:tests? #f; No test file | |
4309 | #:modules ((guix build ant-build-system) | |
4310 | (guix build utils) | |
4311 | (guix build java-utils) | |
4312 | (sxml simple)) | |
4313 | #:phases | |
4314 | (modify-phases %standard-phases | |
4315 | (add-before 'build 'create-properties | |
4316 | (lambda _ | |
4317 | ;; This file is missing from the distribution | |
4318 | (call-with-output-file "build-properties.xml" | |
4319 | (lambda (port) | |
4320 | (sxml->xml | |
4321 | `(project (@ (basedir ".") (name "build-properties") (default "")) | |
4322 | (property (@ (name "project.name") (value "bsf"))) | |
4323 | (property (@ (name "source.level") (value "1.5"))) | |
4324 | (property (@ (name "build.lib") (value "build/jar"))) | |
4325 | (property (@ (name "src.dir") (value "src"))) | |
4326 | (property (@ (name "tests.dir") (value "src/org/apache/bsf/test"))) | |
4327 | (property (@ (name "build.tests") (value "build/test-classes"))) | |
4328 | (property (@ (name "build.dest") (value "build/classes")))) | |
4329 | port))))) | |
4330 | (replace 'install (install-jars "build"))))) | |
4331 | (native-inputs | |
4332 | `(("java-junit" ,java-junit))) | |
4333 | (inputs | |
4334 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal))) | |
4335 | (home-page "https://commons.apache.org/proper/commons-bsf") | |
4336 | (synopsis "Bean Scripting Framework") | |
4337 | (description "The Bean Scripting Framework (BSF) is a set of Java classes | |
4338 | which provides scripting language support within Java applications, and access | |
4339 | to Java objects and methods from scripting languages. BSF allows one to write | |
4340 | JSPs in languages other than Java while providing access to the Java class | |
4341 | library. In addition, BSF permits any Java application to be implemented in | |
4342 | part (or dynamically extended) by a language that is embedded within it. This | |
4343 | is achieved by providing an API that permits calling scripting language engines | |
4344 | from within Java, as well as an object registry that exposes Java objects to | |
4345 | these scripting language engines.") | |
4346 | (license license:asl2.0))) | |
4347 | ||
66006fe5 JL |
4348 | (define-public java-commons-jxpath |
4349 | (package | |
4350 | (name "java-commons-jxpath") | |
4351 | (version "1.3") | |
4352 | (source (origin | |
4353 | (method url-fetch) | |
4354 | (uri (string-append "mirror://apache/commons/jxpath/source/" | |
4355 | "commons-jxpath-" version "-src.tar.gz")) | |
4356 | (sha256 | |
4357 | (base32 | |
4358 | "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs")))) | |
4359 | (build-system ant-build-system) | |
4360 | (arguments | |
4361 | `(#:jar-name "commons-jxpath.jar" | |
4362 | ;; tests require more dependencies, including mockrunner which depends on old software | |
4363 | #:tests? #f | |
4364 | #:source-dir "src/java")) | |
4365 | (inputs | |
4366 | `(("java-tomcat" ,java-tomcat) | |
4367 | ("java-jdom" ,java-jdom) | |
4368 | ("java-commons-beanutils" ,java-commons-beanutils))) | |
4369 | (native-inputs | |
4370 | `(("java-junit" ,java-junit))) | |
4371 | (home-page "http://commons.apache.org/jxpath/") | |
4372 | (synopsis "Simple interpreter of an expression language called XPath.") | |
4373 | (description "The org.apache.commons.jxpath package defines a simple | |
4374 | interpreter of an expression language called XPath. JXPath applies XPath | |
4375 | expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet | |
4376 | contexts, DOM etc, including mixtures thereof.") | |
4377 | (license license:asl2.0))) | |
4378 | ||
a1a5ef20 JL |
4379 | (define-public java-jsr250 |
4380 | (package | |
4381 | (name "java-jsr250") | |
4382 | (version "1.3") | |
4383 | (source (origin | |
4384 | (method url-fetch) | |
4385 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4386 | "javax/annotation/javax.annotation-api/" | |
4387 | version "/javax.annotation-api-" | |
4388 | version "-sources.jar")) | |
4389 | (sha256 | |
4390 | (base32 | |
4391 | "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz")))) | |
4392 | (build-system ant-build-system) | |
4393 | (arguments | |
4394 | `(#:tests? #f ; no tests included | |
4395 | #:jdk ,icedtea-8 | |
4396 | #:jar-name "jsr250.jar")) | |
4397 | (home-page "https://jcp.org/en/jsr/detail?id=250") | |
4398 | (synopsis "Security-related annotations") | |
4399 | (description "This package provides annotations for security. It provides | |
4400 | packages in the @code{javax.annotation} and @code{javax.annotation.security} | |
4401 | namespaces.") | |
4402 | ;; either cddl or gpl2 only, with classpath exception | |
4403 | (license (list license:cddl1.0 | |
4404 | license:gpl2)))) | |
4405 | ||
0d4a0d60 RW |
4406 | (define-public java-jsr305 |
4407 | (package | |
4408 | (name "java-jsr305") | |
4409 | (version "3.0.1") | |
4410 | (source (origin | |
4411 | (method url-fetch) | |
4412 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4413 | "com/google/code/findbugs/" | |
4414 | "jsr305/" version "/jsr305-" | |
4415 | version "-sources.jar")) | |
4416 | (sha256 | |
4417 | (base32 | |
4418 | "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n")))) | |
4419 | (build-system ant-build-system) | |
4420 | (arguments | |
4421 | `(#:tests? #f ; no tests included | |
4422 | #:jar-name "jsr305.jar")) | |
4423 | (home-page "http://findbugs.sourceforge.net/") | |
4424 | (synopsis "Annotations for the static analyzer called findbugs") | |
4425 | (description "This package provides annotations for the findbugs package. | |
4426 | It provides packages in the @code{javax.annotations} namespace.") | |
4427 | (license license:asl2.0))) | |
4428 | ||
4f3e47ea RW |
4429 | (define-public java-guava |
4430 | (package | |
4431 | (name "java-guava") | |
4432 | ;; This is the last release of Guava that can be built with Java 7. | |
4433 | (version "20.0") | |
4434 | (source (origin | |
4435 | (method url-fetch) | |
4436 | (uri (string-append "https://github.com/google/guava/" | |
4437 | "releases/download/v" version | |
4438 | "/guava-" version "-sources.jar")) | |
4439 | (sha256 | |
4440 | (base32 | |
4441 | "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr")))) | |
4442 | (build-system ant-build-system) | |
4443 | (arguments | |
4444 | `(#:tests? #f ; no tests included | |
4445 | #:jar-name "guava.jar" | |
4446 | #:phases | |
4447 | (modify-phases %standard-phases | |
4448 | (add-after 'unpack 'trim-sources | |
4449 | (lambda _ | |
4450 | (with-directory-excursion "src/com/google/common" | |
4451 | ;; Remove annotations to avoid extra dependencies: | |
4452 | ;; * "j2objc" annotations are used when converting Java to | |
4453 | ;; Objective C; | |
4454 | ;; * "errorprone" annotations catch common Java mistakes at | |
4455 | ;; compile time; | |
4456 | ;; * "IgnoreJRERequirement" is used for Android. | |
4457 | (substitute* (find-files "." "\\.java$") | |
4458 | (("import com.google.j2objc.*") "") | |
4459 | (("import com.google.errorprone.annotation.*") "") | |
4460 | (("import org.codehaus.mojo.animal_sniffer.*") "") | |
4461 | (("@CanIgnoreReturnValue") "") | |
4462 | (("@LazyInit") "") | |
4463 | (("@WeakOuter") "") | |
4464 | (("@RetainedWith") "") | |
4465 | (("@Weak") "") | |
4466 | (("@ForOverride") "") | |
4467 | (("@J2ObjCIncompatible") "") | |
4468 | (("@IgnoreJRERequirement") ""))) | |
4469 | #t))))) | |
4470 | (inputs | |
4471 | `(("java-jsr305" ,java-jsr305))) | |
4472 | (home-page "https://github.com/google/guava") | |
4473 | (synopsis "Google core libraries for Java") | |
4474 | (description "Guava is a set of core libraries that includes new | |
4475 | collection types (such as multimap and multiset), immutable collections, a | |
4476 | graph library, functional types, an in-memory cache, and APIs/utilities for | |
4477 | concurrency, I/O, hashing, primitives, reflection, string processing, and much | |
4478 | more!") | |
4479 | (license license:asl2.0))) | |
4480 | ||
af8f8281 RW |
4481 | ;; The java-commons-logging package provides adapters to many different |
4482 | ;; logging frameworks. To avoid an excessive dependency graph we try to build | |
4483 | ;; it with only a minimal set of adapters. | |
4484 | (define-public java-commons-logging-minimal | |
4485 | (package | |
4486 | (name "java-commons-logging-minimal") | |
4487 | (version "1.2") | |
4488 | (source (origin | |
4489 | (method url-fetch) | |
4490 | (uri (string-append "mirror://apache/commons/logging/source/" | |
4491 | "commons-logging-" version "-src.tar.gz")) | |
4492 | (sha256 | |
4493 | (base32 | |
4494 | "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9")))) | |
4495 | (build-system ant-build-system) | |
4496 | (arguments | |
4497 | `(#:tests? #f ; avoid dependency on logging frameworks | |
4498 | #:jar-name "commons-logging-minimal.jar" | |
4499 | #:phases | |
4500 | (modify-phases %standard-phases | |
4501 | (add-after 'unpack 'delete-adapters-and-tests | |
4502 | (lambda _ | |
4503 | ;; Delete all adapters except for NoOpLog, SimpleLog, and | |
4504 | ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl | |
4505 | ;; is used by applications; SimpleLog is the only actually usable | |
4506 | ;; implementation that does not depend on another logging | |
4507 | ;; framework. | |
4508 | (for-each | |
4509 | (lambda (file) | |
4510 | (delete-file (string-append | |
4511 | "src/main/java/org/apache/commons/logging/impl/" file))) | |
4512 | (list "Jdk13LumberjackLogger.java" | |
4513 | "WeakHashtable.java" | |
4514 | "Log4JLogger.java" | |
4515 | "ServletContextCleaner.java" | |
4516 | "Jdk14Logger.java" | |
4517 | "AvalonLogger.java" | |
4518 | "LogKitLogger.java")) | |
4519 | (delete-file-recursively "src/test") | |
4520 | #t))))) | |
4521 | (home-page "http://commons.apache.org/logging/") | |
4522 | (synopsis "Common API for logging implementations") | |
4523 | (description "The Logging package is a thin bridge between different | |
4524 | logging implementations. A library that uses the commons-logging API can be | |
4525 | used with any logging implementation at runtime.") | |
4526 | (license license:asl2.0))) | |
4527 | ||
90e65abe RW |
4528 | ;; This is the last release of the 1.x series. |
4529 | (define-public java-mockito-1 | |
4530 | (package | |
4531 | (name "java-mockito") | |
4532 | (version "1.10.19") | |
4533 | (source (origin | |
4534 | (method url-fetch) | |
4535 | (uri (string-append "http://repo1.maven.org/maven2/" | |
4536 | "org/mockito/mockito-core/" version | |
4537 | "/mockito-core-" version "-sources.jar")) | |
4538 | (sha256 | |
4539 | (base32 | |
4540 | "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc")))) | |
4541 | (build-system ant-build-system) | |
4542 | (arguments | |
4543 | `(#:jar-name "mockito.jar" | |
4544 | #:tests? #f ; no tests included | |
4545 | ;; FIXME: patch-and-repack does not support jars, so we have to apply | |
4546 | ;; patches in build phases. | |
4547 | #:phases | |
4548 | (modify-phases %standard-phases | |
4549 | ;; Mockito was developed against a different version of hamcrest, | |
4550 | ;; which does not require matcher implementations to provide an | |
4551 | ;; implementation of the "describeMismatch" method. We add this | |
4552 | ;; simple definition to pass the build with our version of hamcrest. | |
4553 | (add-after 'unpack 'fix-hamcrest-build-error | |
4554 | (lambda _ | |
4555 | (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java" | |
4556 | (("public Matcher getActualMatcher\\(\\) .*" line) | |
4557 | (string-append " | |
4558 | public void describeMismatch(Object item, Description description) { | |
4559 | actualMatcher.describeMismatch(item, description); | |
4560 | }" | |
4561 | line))) | |
4562 | #t)) | |
4563 | ;; Mockito bundles cglib. We have a cglib package, so let's use | |
4564 | ;; that instead. | |
4565 | (add-after 'unpack 'use-system-libraries | |
4566 | (lambda _ | |
4567 | (with-directory-excursion "src/org/mockito/internal/creation/cglib" | |
4568 | (substitute* '("CGLIBHacker.java" | |
4569 | "CglibMockMaker.java" | |
4570 | "ClassImposterizer.java" | |
4571 | "DelegatingMockitoMethodProxy.java" | |
4572 | "MethodInterceptorFilter.java" | |
4573 | "MockitoNamingPolicy.java" | |
4574 | "SerializableMockitoMethodProxy.java" | |
4575 | "SerializableNoOp.java") | |
4576 | (("import org.mockito.cglib") "import net.sf.cglib"))) | |
4577 | #t))))) | |
4578 | (inputs | |
4579 | `(("java-junit" ,java-junit) | |
4580 | ("java-objenesis" ,java-objenesis) | |
4581 | ("java-cglib" ,java-cglib) | |
4582 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4583 | (home-page "http://mockito.org") | |
4584 | (synopsis "Mockito is a mock library for Java") | |
4585 | (description "Mockito is a mocking library for Java which lets you write | |
4586 | tests with a clean and simple API. It generates mocks using reflection, and | |
4587 | it records all mock invocations, including methods arguments.") | |
4588 | (license license:asl2.0))) | |
4589 | ||
4f4d2e47 RW |
4590 | (define-public java-httpcomponents-httpcore |
4591 | (package | |
4592 | (name "java-httpcomponents-httpcore") | |
4593 | (version "4.4.6") | |
4594 | (source (origin | |
4595 | (method url-fetch) | |
4596 | (uri (string-append "mirror://apache//httpcomponents/httpcore/" | |
4597 | "source/httpcomponents-core-" | |
4598 | version "-src.tar.gz")) | |
4599 | (sha256 | |
4600 | (base32 | |
4601 | "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy")))) | |
4602 | (build-system ant-build-system) | |
4603 | (arguments | |
4604 | `(#:jar-name "httpcomponents-httpcore.jar" | |
4605 | #:phases | |
4606 | (modify-phases %standard-phases | |
4607 | (add-after 'unpack 'chdir | |
4608 | (lambda _ (chdir "httpcore") #t))))) | |
4609 | (inputs | |
4610 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
4611 | ("java-commons-lang3" ,java-commons-lang3))) | |
4612 | (native-inputs | |
4613 | `(("java-junit" ,java-junit) | |
4614 | ("java-mockito" ,java-mockito-1))) | |
4615 | (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html") | |
4616 | (synopsis "Low level HTTP transport components") | |
4617 | (description "HttpCore is a set of low level HTTP transport components | |
4618 | that can be used to build custom client and server side HTTP services with a | |
4619 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based | |
4620 | on the classic Java I/O and non-blocking, event driven I/O model based on Java | |
4621 | NIO. | |
4622 | ||
4623 | This package provides the blocking I/O model library.") | |
4624 | (license license:asl2.0))) | |
4625 | ||
3a068b43 RW |
4626 | (define-public java-httpcomponents-httpcore-nio |
4627 | (package (inherit java-httpcomponents-httpcore) | |
4628 | (name "java-httpcomponents-httpcore-nio") | |
4629 | (arguments | |
4630 | `(#:jar-name "httpcomponents-httpcore-nio.jar" | |
4631 | #:phases | |
4632 | (modify-phases %standard-phases | |
4633 | (add-after 'unpack 'chdir | |
4634 | (lambda _ (chdir "httpcore-nio") #t))))) | |
4635 | (inputs | |
4636 | `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
4637 | ("java-hamcrest-core" ,java-hamcrest-core) | |
4638 | ,@(package-inputs java-httpcomponents-httpcore))) | |
4639 | (description "HttpCore is a set of low level HTTP transport components | |
4640 | that can be used to build custom client and server side HTTP services with a | |
4641 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based | |
4642 | on the classic Java I/O and non-blocking, event driven I/O model based on Java | |
4643 | NIO. | |
4644 | ||
4645 | This package provides the non-blocking I/O model library based on Java | |
4646 | NIO."))) | |
4647 | ||
e1dd78f6 RW |
4648 | (define-public java-httpcomponents-httpcore-ab |
4649 | (package (inherit java-httpcomponents-httpcore) | |
4650 | (name "java-httpcomponents-httpcore-ab") | |
4651 | (arguments | |
4652 | `(#:jar-name "httpcomponents-httpcore-ab.jar" | |
4653 | #:phases | |
4654 | (modify-phases %standard-phases | |
4655 | (add-after 'unpack 'chdir | |
4656 | (lambda _ (chdir "httpcore-ab") #t))))) | |
4657 | (inputs | |
4658 | `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
4659 | ("java-commons-cli" ,java-commons-cli) | |
4660 | ("java-hamcrest-core" ,java-hamcrest-core) | |
4661 | ,@(package-inputs java-httpcomponents-httpcore))) | |
4662 | (synopsis "Apache HttpCore benchmarking tool") | |
4663 | (description "This package provides the HttpCore benchmarking tool. It is | |
4664 | an Apache AB clone based on HttpCore."))) | |
4665 | ||
14a671d8 RW |
4666 | (define-public java-httpcomponents-httpclient |
4667 | (package | |
4668 | (name "java-httpcomponents-httpclient") | |
4669 | (version "4.5.3") | |
4670 | (source (origin | |
4671 | (method url-fetch) | |
4672 | (uri (string-append "mirror://apache/httpcomponents/httpclient/" | |
4673 | "source/httpcomponents-client-" | |
4674 | version "-src.tar.gz")) | |
4675 | (sha256 | |
4676 | (base32 | |
4677 | "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1")))) | |
4678 | (build-system ant-build-system) | |
4679 | (arguments | |
4680 | `(#:jar-name "httpcomponents-httpclient.jar" | |
4681 | #:phases | |
4682 | (modify-phases %standard-phases | |
4683 | (add-after 'unpack 'chdir | |
4684 | (lambda _ (chdir "httpclient") #t))))) | |
4685 | (inputs | |
4686 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
4687 | ("java-commons-codec" ,java-commons-codec) | |
4688 | ("java-hamcrest-core" ,java-hamcrest-core) | |
4689 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
4690 | ("java-mockito" ,java-mockito-1) | |
4691 | ("java-junit" ,java-junit))) | |
4692 | (home-page "https://hc.apache.org/httpcomponents-client-ga/") | |
4693 | (synopsis "HTTP client library for Java") | |
4694 | (description "Although the @code{java.net} package provides basic | |
4695 | functionality for accessing resources via HTTP, it doesn't provide the full | |
4696 | flexibility or functionality needed by many applications. @code{HttpClient} | |
4697 | seeks to fill this void by providing an efficient, up-to-date, and | |
4698 | feature-rich package implementing the client side of the most recent HTTP | |
4699 | standards and recommendations.") | |
4700 | (license license:asl2.0))) | |
4701 | ||
cbce5de2 RW |
4702 | (define-public java-httpcomponents-httpmime |
4703 | (package (inherit java-httpcomponents-httpclient) | |
4704 | (name "java-httpcomponents-httpmime") | |
4705 | (arguments | |
4706 | `(#:jar-name "httpcomponents-httpmime.jar" | |
4707 | #:phases | |
4708 | (modify-phases %standard-phases | |
4709 | (add-after 'unpack 'chdir | |
4710 | (lambda _ (chdir "httpmime") #t))))) | |
4711 | (inputs | |
4712 | `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) | |
4713 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
4714 | ("java-junit" ,java-junit) | |
4715 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
4716 | ||
4b34c21f RW |
4717 | (define-public java-commons-net |
4718 | (package | |
4719 | (name "java-commons-net") | |
4720 | (version "3.6") | |
4721 | (source (origin | |
4722 | (method url-fetch) | |
4723 | (uri (string-append "mirror://apache/commons/net/source/" | |
4724 | "commons-net-" version "-src.tar.gz")) | |
4725 | (sha256 | |
4726 | (base32 | |
4727 | "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr")))) | |
4728 | (build-system ant-build-system) | |
4729 | (arguments | |
4730 | `(;; FIXME: MainTest.java tries to read "examples.properties" (which | |
4731 | ;; should be "resources/examples/examples.properties"), but gets "null" | |
4732 | ;; instead. | |
4733 | #:tests? #f | |
4734 | #:jar-name "commons-net.jar")) | |
4735 | (native-inputs | |
4736 | `(("java-junit" ,java-junit) | |
4737 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4738 | (home-page "http://commons.apache.org/net/") | |
4739 | (synopsis "Client library for many basic Internet protocols") | |
4740 | (description "The Apache Commons Net library implements the client side of | |
4741 | many basic Internet protocols. The purpose of the library is to provide | |
4742 | fundamental protocol access, not higher-level abstractions.") | |
4743 | (license license:asl2.0))) | |
4744 | ||
808cb58f RW |
4745 | (define-public java-jsch |
4746 | (package | |
4747 | (name "java-jsch") | |
4748 | (version "0.1.54") | |
4749 | (source (origin | |
4750 | (method url-fetch) | |
4751 | (uri (string-append "mirror://sourceforge/jsch/jsch/" | |
4752 | version "/jsch-" version ".zip")) | |
4753 | (sha256 | |
4754 | (base32 | |
4755 | "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb")))) | |
4756 | (build-system ant-build-system) | |
4757 | (arguments | |
4758 | `(#:build-target "dist" | |
4759 | #:tests? #f ; no tests included | |
4760 | #:phases | |
4761 | (modify-phases %standard-phases | |
4762 | (replace 'install (install-jars "dist"))))) | |
4763 | (native-inputs | |
4764 | `(("unzip" ,unzip))) | |
4765 | (home-page "http://www.jcraft.com/jsch/") | |
4766 | (synopsis "Pure Java implementation of SSH2") | |
4767 | (description "JSch is a pure Java implementation of SSH2. JSch allows you | |
4768 | to connect to an SSH server and use port forwarding, X11 forwarding, file | |
4769 | transfer, etc., and you can integrate its functionality into your own Java | |
4770 | programs.") | |
4771 | (license license:bsd-3))) | |
4772 | ||
a6244698 RW |
4773 | (define-public java-commons-compress |
4774 | (package | |
4775 | (name "java-commons-compress") | |
4776 | (version "1.13") | |
4777 | (source (origin | |
4778 | (method url-fetch) | |
4779 | (uri (string-append "mirror://apache/commons/compress/source/" | |
4780 | "commons-compress-" version "-src.tar.gz")) | |
4781 | (sha256 | |
4782 | (base32 | |
4783 | "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8")))) | |
4784 | (build-system ant-build-system) | |
4785 | (arguments | |
4786 | `(#:jar-name "commons-compress.jar" | |
4787 | #:phases | |
4788 | (modify-phases %standard-phases | |
4789 | (add-after 'unpack 'delete-bad-tests | |
4790 | (lambda _ | |
4791 | (with-directory-excursion "src/test/java/org/apache/commons/compress/" | |
4792 | ;; FIXME: These tests really should not fail. Maybe they are | |
4793 | ;; indicative of problems with our Java packaging work. | |
4794 | ||
4795 | ;; This test fails with a null pointer exception. | |
4796 | (delete-file "archivers/sevenz/SevenZOutputFileTest.java") | |
4797 | ;; This test fails to open test resources. | |
4798 | (delete-file "archivers/zip/ExplodeSupportTest.java") | |
4799 | ||
4800 | ;; FIXME: This test adds a dependency on powermock, which is hard to | |
4801 | ;; package at this point. | |
4802 | ;; https://github.com/powermock/powermock | |
4803 | (delete-file "archivers/sevenz/SevenZNativeHeapTest.java")) | |
4804 | #t))))) | |
4805 | (inputs | |
4806 | `(("java-junit" ,java-junit) | |
4807 | ("java-hamcrest-core" ,java-hamcrest-core) | |
4808 | ("java-mockito" ,java-mockito-1) | |
4809 | ("java-xz" ,java-xz))) | |
4810 | (home-page "https://commons.apache.org/proper/commons-compress/") | |
4811 | (synopsis "Java library for working with compressed files") | |
4812 | (description "The Apache Commons Compress library defines an API for | |
4813 | working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ, | |
4814 | Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.") | |
4815 | (license license:asl2.0))) | |
4816 | ||
51263ff5 JL |
4817 | (define-public java-commons-csv |
4818 | (package | |
4819 | (name "java-commons-csv") | |
4820 | (version "1.4") | |
4821 | (source (origin | |
4822 | (method url-fetch) | |
4823 | (uri (string-append "mirror://apache/commons/csv/source/" | |
4824 | "commons-csv-" version "-src.tar.gz")) | |
4825 | (sha256 | |
4826 | (base32 | |
4827 | "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij")))) | |
4828 | (build-system ant-build-system) | |
4829 | (arguments | |
4830 | `(#:jar-name "commons-csv.jar" | |
4831 | #:source-dir "src/main/java" | |
4832 | #:tests? #f)); FIXME: requires java-h2 | |
4833 | (inputs | |
4834 | `(("java-hamcrest-core" ,java-hamcrest-core) | |
4835 | ("java-commons-io" ,java-commons-io) | |
4836 | ("java-commons-lang3" ,java-commons-lang3) | |
4837 | ("junit" ,java-junit))) | |
4838 | (home-page "https://commons.apache.org/proper/commons-csv/") | |
4839 | (synopsis "Read and write CSV documents") | |
4840 | (description "Commons CSV reads and writes files in variations of the Comma | |
4841 | Separated Value (CSV) format. The most common CSV formats are predefined in the | |
4842 | CSVFormat class: | |
4843 | ||
4844 | @itemize | |
4845 | @item Microsoft Excel | |
4846 | @item Informix UNLOAD | |
4847 | @item Informix UNLOAD CSV | |
4848 | @item MySQL | |
4849 | @item RFC 4180 | |
4850 | @item TDF | |
4851 | @end itemize | |
4852 | ||
4853 | Custom formats can be created using a fluent style API.") | |
4854 | (license license:asl2.0))) | |
4855 | ||
6ee6d0b5 RW |
4856 | (define-public java-osgi-annotation |
4857 | (package | |
4858 | (name "java-osgi-annotation") | |
4859 | (version "6.0.0") | |
4860 | (source (origin | |
4861 | (method url-fetch) | |
4862 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4863 | "org/osgi/org.osgi.annotation/" version "/" | |
4864 | "org.osgi.annotation-" version "-sources.jar")) | |
4865 | (sha256 | |
4866 | (base32 | |
4867 | "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w")))) | |
4868 | (build-system ant-build-system) | |
4869 | (arguments | |
4870 | `(#:tests? #f ; no tests | |
4871 | #:jar-name "osgi-annotation.jar")) | |
c353d014 | 4872 | (home-page "https://www.osgi.org") |
6ee6d0b5 RW |
4873 | (synopsis "Annotation module of OSGi framework") |
4874 | (description | |
4875 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
4876 | and service platform for the Java programming language. This package contains | |
4877 | the OSGi annotation module, providing additional services to help dynamic | |
4878 | components.") | |
4879 | (license license:asl2.0))) | |
4880 | ||
37e2e5d4 RW |
4881 | (define-public java-osgi-core |
4882 | (package | |
4883 | (name "java-osgi-core") | |
4884 | (version "6.0.0") | |
4885 | (source (origin | |
4886 | (method url-fetch) | |
4887 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4888 | "org/osgi/org.osgi.core/" version "/" | |
4889 | "org.osgi.core-" version "-sources.jar")) | |
4890 | (sha256 | |
4891 | (base32 | |
4892 | "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv")))) | |
4893 | (build-system ant-build-system) | |
4894 | (arguments | |
4895 | `(#:tests? #f ; no tests | |
4896 | #:jar-name "osgi-core.jar")) | |
4897 | (inputs | |
4898 | `(("java-osgi-annotation" ,java-osgi-annotation))) | |
c353d014 | 4899 | (home-page "https://www.osgi.org") |
37e2e5d4 RW |
4900 | (synopsis "Core module of OSGi framework") |
4901 | (description | |
4902 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
4903 | and service platform for the Java programming language. This package contains | |
4904 | the OSGi Core module.") | |
4905 | (license license:asl2.0))) | |
4906 | ||
8af92c8f RW |
4907 | (define-public java-osgi-service-event |
4908 | (package | |
4909 | (name "java-osgi-service-event") | |
4910 | (version "1.3.1") | |
4911 | (source (origin | |
4912 | (method url-fetch) | |
4913 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4914 | "org/osgi/org.osgi.service.event/" | |
4915 | version "/org.osgi.service.event-" | |
4916 | version "-sources.jar")) | |
4917 | (sha256 | |
4918 | (base32 | |
4919 | "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm")))) | |
4920 | (build-system ant-build-system) | |
4921 | (arguments | |
4922 | `(#:tests? #f ; no tests | |
4923 | #:jar-name "osgi-service-event.jar")) | |
4924 | (inputs | |
4925 | `(("java-osgi-annotation" ,java-osgi-annotation) | |
4926 | ("java-osgi-core" ,java-osgi-core))) | |
c353d014 | 4927 | (home-page "https://www.osgi.org") |
8af92c8f RW |
4928 | (synopsis "OSGi service event module") |
4929 | (description | |
4930 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
4931 | and service platform for the Java programming language. This package contains | |
4932 | the OSGi @code{org.osgi.service.event} module.") | |
4933 | (license license:asl2.0))) | |
4934 | ||
674e93a0 RW |
4935 | (define-public java-eclipse-osgi |
4936 | (package | |
4937 | (name "java-eclipse-osgi") | |
4938 | (version "3.11.3") | |
4939 | (source (origin | |
4940 | (method url-fetch) | |
4941 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4942 | "org/eclipse/platform/org.eclipse.osgi/" | |
4943 | version "/org.eclipse.osgi-" | |
4944 | version "-sources.jar")) | |
4945 | (sha256 | |
4946 | (base32 | |
4947 | "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b")))) | |
4948 | (build-system ant-build-system) | |
4949 | (arguments | |
4950 | `(#:tests? #f ; no tests included | |
4951 | #:jar-name "eclipse-equinox-osgi.jar")) | |
4952 | (inputs | |
4953 | `(("java-osgi-annotation" ,java-osgi-annotation))) | |
4954 | (home-page "http://www.eclipse.org/equinox/") | |
4955 | (synopsis "Eclipse Equinox OSGi framework") | |
4956 | (description "This package provides an implementation of the OSGi Core | |
4957 | specification.") | |
4958 | (license license:epl1.0))) | |
4959 | ||
81b55b1e RW |
4960 | (define-public java-eclipse-equinox-common |
4961 | (package | |
4962 | (name "java-eclipse-equinox-common") | |
4963 | (version "3.8.0") | |
4964 | (source (origin | |
4965 | (method url-fetch) | |
4966 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4967 | "org/eclipse/platform/org.eclipse.equinox.common/" | |
4968 | version "/org.eclipse.equinox.common-" | |
4969 | version "-sources.jar")) | |
4970 | (sha256 | |
4971 | (base32 | |
4972 | "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc")))) | |
4973 | (build-system ant-build-system) | |
4974 | (arguments | |
4975 | `(#:tests? #f ; no tests included | |
4976 | #:jar-name "eclipse-equinox-common.jar")) | |
4977 | (inputs | |
4978 | `(("java-eclipse-osgi" ,java-eclipse-osgi))) | |
4979 | (home-page "http://www.eclipse.org/equinox/") | |
4980 | (synopsis "Common Eclipse runtime") | |
4981 | (description "This package provides the common Eclipse runtime.") | |
4982 | (license license:epl1.0))) | |
4983 | ||
90368ad9 RW |
4984 | (define-public java-eclipse-core-jobs |
4985 | (package | |
4986 | (name "java-eclipse-core-jobs") | |
4987 | (version "3.8.0") | |
4988 | (source (origin | |
4989 | (method url-fetch) | |
4990 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4991 | "org/eclipse/platform/org.eclipse.core.jobs/" | |
4992 | version "/org.eclipse.core.jobs-" | |
4993 | version "-sources.jar")) | |
4994 | (sha256 | |
4995 | (base32 | |
4996 | "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b")))) | |
4997 | (build-system ant-build-system) | |
4998 | (arguments | |
4999 | `(#:tests? #f ; no tests included | |
5000 | #:jar-name "eclipse-core-jobs.jar")) | |
5001 | (inputs | |
5002 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5003 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5004 | (home-page "http://www.eclipse.org/equinox/") | |
5005 | (synopsis "Eclipse jobs mechanism") | |
5006 | (description "This package provides the Eclipse jobs mechanism.") | |
5007 | (license license:epl1.0))) | |
5008 | ||
fbaf09eb RW |
5009 | (define-public java-eclipse-equinox-registry |
5010 | (package | |
5011 | (name "java-eclipse-equinox-registry") | |
5012 | (version "3.6.100") | |
5013 | (source (origin | |
5014 | (method url-fetch) | |
5015 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5016 | "org/eclipse/platform/org.eclipse.equinox.registry/" | |
5017 | version "/org.eclipse.equinox.registry-" | |
5018 | version "-sources.jar")) | |
5019 | (sha256 | |
5020 | (base32 | |
5021 | "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k")))) | |
5022 | (build-system ant-build-system) | |
5023 | (arguments | |
5024 | `(#:tests? #f ; no tests included | |
5025 | #:jar-name "eclipse-equinox-registry.jar")) | |
5026 | (inputs | |
5027 | `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
5028 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5029 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5030 | (home-page "http://www.eclipse.org/equinox/") | |
5031 | (synopsis "Eclipse extension registry support") | |
5032 | (description "This package provides support for the Eclipse extension | |
5033 | registry.") | |
5034 | (license license:epl1.0))) | |
5035 | ||
65214c87 RW |
5036 | (define-public java-eclipse-equinox-app |
5037 | (package | |
5038 | (name "java-eclipse-equinox-app") | |
5039 | (version "1.3.400") | |
5040 | (source (origin | |
5041 | (method url-fetch) | |
5042 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5043 | "org/eclipse/platform/org.eclipse.equinox.app/" | |
5044 | version "/org.eclipse.equinox.app-" | |
5045 | version "-sources.jar")) | |
5046 | (sha256 | |
5047 | (base32 | |
5048 | "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab")))) | |
5049 | (build-system ant-build-system) | |
5050 | (arguments | |
5051 | `(#:tests? #f ; no tests included | |
5052 | #:jar-name "eclipse-equinox-app.jar")) | |
5053 | (inputs | |
5054 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5055 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5056 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
5057 | ("java-osgi-service-event" ,java-osgi-service-event))) | |
5058 | (home-page "http://www.eclipse.org/equinox/") | |
5059 | (synopsis "Equinox application container") | |
5060 | (description "This package provides the Equinox application container for | |
5061 | Eclipse.") | |
5062 | (license license:epl1.0))) | |
5063 | ||
3f970214 RW |
5064 | (define-public java-eclipse-equinox-preferences |
5065 | (package | |
5066 | (name "java-eclipse-equinox-preferences") | |
5067 | (version "3.6.1") | |
5068 | (source (origin | |
5069 | (method url-fetch) | |
5070 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5071 | "org/eclipse/platform/org.eclipse.equinox.preferences/" | |
5072 | version "/org.eclipse.equinox.preferences-" | |
5073 | version "-sources.jar")) | |
5074 | (sha256 | |
5075 | (base32 | |
5076 | "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2")))) | |
5077 | (build-system ant-build-system) | |
5078 | (arguments | |
5079 | `(#:tests? #f ; no tests included | |
5080 | #:jar-name "eclipse-equinox-preferences.jar")) | |
5081 | (inputs | |
5082 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5083 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5084 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5085 | (home-page "http://www.eclipse.org/equinox/") | |
5086 | (synopsis "Eclipse preferences mechanism") | |
5087 | (description "This package provides the Eclipse preferences mechanism with | |
5088 | the module @code{org.eclipse.equinox.preferences}.") | |
5089 | (license license:epl1.0))) | |
5090 | ||
4ad3d4f3 RW |
5091 | (define-public java-eclipse-core-contenttype |
5092 | (package | |
5093 | (name "java-eclipse-core-contenttype") | |
5094 | (version "3.5.100") | |
5095 | (source (origin | |
5096 | (method url-fetch) | |
5097 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5098 | "org/eclipse/platform/org.eclipse.core.contenttype/" | |
5099 | version "/org.eclipse.core.contenttype-" | |
5100 | version "-sources.jar")) | |
5101 | (sha256 | |
5102 | (base32 | |
5103 | "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi")))) | |
5104 | (build-system ant-build-system) | |
5105 | (arguments | |
5106 | `(#:tests? #f ; no tests included | |
5107 | #:jar-name "eclipse-core-contenttype.jar")) | |
5108 | (inputs | |
5109 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5110 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5111 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5112 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5113 | (home-page "http://www.eclipse.org/") | |
5114 | (synopsis "Eclipse content mechanism") | |
5115 | (description "This package provides the Eclipse content mechanism in the | |
5116 | @code{org.eclipse.core.contenttype} module.") | |
5117 | (license license:epl1.0))) | |
5118 | ||
6a7f7e49 RW |
5119 | (define-public java-eclipse-core-runtime |
5120 | (package | |
5121 | (name "java-eclipse-core-runtime") | |
5122 | (version "3.12.0") | |
5123 | (source (origin | |
5124 | (method url-fetch) | |
5125 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5126 | "org/eclipse/platform/org.eclipse.core.runtime/" | |
5127 | version "/org.eclipse.core.runtime-" | |
5128 | version "-sources.jar")) | |
5129 | (sha256 | |
5130 | (base32 | |
5131 | "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya")))) | |
5132 | (build-system ant-build-system) | |
5133 | (arguments | |
5134 | `(#:tests? #f ; no tests included | |
5135 | #:jar-name "eclipse-core-runtime.jar")) | |
5136 | (inputs | |
5137 | `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5138 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
5139 | ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
5140 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5141 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5142 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5143 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5144 | (home-page "https://www.eclipse.org/") | |
5145 | (synopsis "Eclipse core runtime") | |
5146 | (description "This package provides the Eclipse core runtime with the | |
5147 | module @code{org.eclipse.core.runtime}.") | |
5148 | (license license:epl1.0))) | |
5149 | ||
b3806a15 RW |
5150 | (define-public java-eclipse-core-filesystem |
5151 | (package | |
5152 | (name "java-eclipse-core-filesystem") | |
5153 | (version "1.6.1") | |
5154 | (source (origin | |
5155 | (method url-fetch) | |
5156 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5157 | "org/eclipse/platform/org.eclipse.core.filesystem/" | |
5158 | version "/org.eclipse.core.filesystem-" | |
5159 | version "-sources.jar")) | |
5160 | (sha256 | |
5161 | (base32 | |
5162 | "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj")))) | |
5163 | (build-system ant-build-system) | |
5164 | (arguments | |
5165 | `(#:tests? #f ; no tests included | |
5166 | #:jar-name "eclipse-core-filesystem.jar")) | |
5167 | (inputs | |
5168 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5169 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5170 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5171 | (home-page "https://www.eclipse.org/") | |
5172 | (synopsis "Eclipse core file system") | |
5173 | (description "This package provides the Eclipse core file system with the | |
5174 | module @code{org.eclipse.core.filesystem}.") | |
5175 | (license license:epl1.0))) | |
5176 | ||
e96060de RW |
5177 | (define-public java-eclipse-core-expressions |
5178 | (package | |
5179 | (name "java-eclipse-core-expressions") | |
5180 | (version "3.5.100") | |
5181 | (source (origin | |
5182 | (method url-fetch) | |
5183 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5184 | "org/eclipse/platform/org.eclipse.core.expressions/" | |
5185 | version "/org.eclipse.core.expressions-" | |
5186 | version "-sources.jar")) | |
5187 | (sha256 | |
5188 | (base32 | |
5189 | "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f")))) | |
5190 | (build-system ant-build-system) | |
5191 | (arguments | |
5192 | `(#:tests? #f ; no tests included | |
5193 | #:jar-name "eclipse-core-expressions.jar")) | |
5194 | (inputs | |
5195 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5196 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5197 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5198 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5199 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5200 | (home-page "https://www.eclipse.org/") | |
5201 | (synopsis "Eclipse core expression language") | |
5202 | (description "This package provides the Eclipse core expression language | |
5203 | with the @code{org.eclipse.core.expressions} module.") | |
5204 | (license license:epl1.0))) | |
5205 | ||
e8d0f7c8 RW |
5206 | (define-public java-eclipse-core-variables |
5207 | (package | |
5208 | (name "java-eclipse-core-variables") | |
5209 | (version "3.3.0") | |
5210 | (source (origin | |
5211 | (method url-fetch) | |
5212 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5213 | "org/eclipse/platform/org.eclipse.core.variables/" | |
5214 | version "/org.eclipse.core.variables-" | |
5215 | version "-sources.jar")) | |
5216 | (sha256 | |
5217 | (base32 | |
5218 | "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy")))) | |
5219 | (build-system ant-build-system) | |
5220 | (arguments | |
5221 | `(#:tests? #f ; no tests included | |
5222 | #:jar-name "eclipse-core-variables.jar")) | |
5223 | (inputs | |
5224 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5225 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5226 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5227 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5228 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5229 | (home-page "https://www.eclipse.org/platform") | |
5230 | (synopsis "Eclipse core variables") | |
5231 | (description "This package provides the Eclipse core variables module | |
5232 | @code{org.eclipse.core.variables}.") | |
5233 | (license license:epl1.0))) | |
5234 | ||
7c3d479e RW |
5235 | (define-public java-eclipse-ant-core |
5236 | (package | |
5237 | (name "java-eclipse-ant-core") | |
5238 | (version "3.4.100") | |
5239 | (source (origin | |
5240 | (method url-fetch) | |
5241 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5242 | "org/eclipse/platform/org.eclipse.ant.core/" | |
5243 | version "/org.eclipse.ant.core-" | |
5244 | version "-sources.jar")) | |
5245 | (sha256 | |
5246 | (base32 | |
5247 | "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7")))) | |
5248 | (build-system ant-build-system) | |
5249 | (arguments | |
5250 | `(#:tests? #f ; no tests included | |
5251 | #:jar-name "eclipse-ant-core.jar")) | |
5252 | (inputs | |
5253 | `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
5254 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5255 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5256 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5257 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5258 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5259 | ("java-eclipse-core-variables" ,java-eclipse-core-variables) | |
5260 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5261 | (home-page "https://www.eclipse.org/platform") | |
5262 | (synopsis "Ant build tool core libraries") | |
5263 | (description "This package provides the ant build tool core libraries with | |
5264 | the module @code{org.eclipse.ant.core}.") | |
5265 | (license license:epl1.0))) | |
5266 | ||
6636f638 RW |
5267 | (define-public java-eclipse-core-resources |
5268 | (package | |
5269 | (name "java-eclipse-core-resources") | |
5270 | (version "3.11.1") | |
5271 | (source (origin | |
5272 | (method url-fetch) | |
5273 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5274 | "org/eclipse/platform/org.eclipse.core.resources/" | |
5275 | version "/org.eclipse.core.resources-" | |
5276 | version "-sources.jar")) | |
5277 | (sha256 | |
5278 | (base32 | |
5279 | "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l")))) | |
5280 | (build-system ant-build-system) | |
5281 | (arguments | |
5282 | `(#:tests? #f ; no tests included | |
5283 | #:jar-name "eclipse-core-resources.jar")) | |
5284 | (inputs | |
5285 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5286 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5287 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5288 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5289 | ("java-eclipse-core-expressions" ,java-eclipse-core-expressions) | |
5290 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
5291 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
5292 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5293 | ("java-eclipse-ant-core" ,java-eclipse-ant-core) | |
5294 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5295 | (home-page "https://www.eclipse.org/") | |
5296 | (synopsis "Eclipse core resource management") | |
5297 | (description "This package provides the Eclipse core resource management | |
5298 | module @code{org.eclipse.core.resources}.") | |
5299 | (license license:epl1.0))) | |
5300 | ||
afb5858d RW |
5301 | (define-public java-eclipse-compare-core |
5302 | (package | |
5303 | (name "java-eclipse-compare-core") | |
5304 | (version "3.6.0") | |
5305 | (source (origin | |
5306 | (method url-fetch) | |
5307 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5308 | "org/eclipse/platform/org.eclipse.compare.core/" | |
5309 | version "/org.eclipse.compare.core-" | |
5310 | version "-sources.jar")) | |
5311 | (sha256 | |
5312 | (base32 | |
5313 | "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg")))) | |
5314 | (build-system ant-build-system) | |
5315 | (arguments | |
5316 | `(#:tests? #f ; no tests included | |
5317 | #:jar-name "eclipse-compare-core.jar")) | |
5318 | (inputs | |
5319 | `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5320 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5321 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
5322 | ("java-icu4j" ,java-icu4j))) | |
5323 | (home-page "https://www.eclipse.org/") | |
5324 | (synopsis "Eclipse core compare support") | |
5325 | (description "This package provides the Eclipse core compare support | |
5326 | module @code{org.eclipse.compare.core}.") | |
5327 | (license license:epl1.0))) | |
5328 | ||
1bb191fc RW |
5329 | (define-public java-eclipse-team-core |
5330 | (package | |
5331 | (name "java-eclipse-team-core") | |
5332 | (version "3.8.0") | |
5333 | (source (origin | |
5334 | (method url-fetch) | |
5335 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5336 | "org/eclipse/platform/org.eclipse.team.core/" | |
5337 | version "/org.eclipse.team.core-" | |
5338 | version "-sources.jar")) | |
5339 | (sha256 | |
5340 | (base32 | |
5341 | "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7")))) | |
5342 | (build-system ant-build-system) | |
5343 | (arguments | |
5344 | `(#:tests? #f ; no tests included | |
5345 | #:jar-name "eclipse-team-core.jar")) | |
5346 | (inputs | |
5347 | `(("java-eclipse-compare-core" ,java-eclipse-compare-core) | |
5348 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5349 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
5350 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
5351 | ("java-eclipse-core-resources" ,java-eclipse-core-resources) | |
5352 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5353 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5354 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5355 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5356 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5357 | (home-page "https://www.eclipse.org/platform") | |
5358 | (synopsis "Eclipse team support core") | |
5359 | (description "This package provides the Eclipse team support core module | |
5360 | @code{org.eclipse.team.core}.") | |
5361 | (license license:epl1.0))) | |
5362 | ||
31342529 RW |
5363 | (define-public java-eclipse-core-commands |
5364 | (package | |
5365 | (name "java-eclipse-core-commands") | |
5366 | (version "3.8.1") | |
5367 | (source (origin | |
5368 | (method url-fetch) | |
5369 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5370 | "org/eclipse/platform/org.eclipse.core.commands/" | |
5371 | version "/org.eclipse.core.commands-" | |
5372 | version "-sources.jar")) | |
5373 | (sha256 | |
5374 | (base32 | |
5375 | "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9")))) | |
5376 | (build-system ant-build-system) | |
5377 | (arguments | |
5378 | `(#:tests? #f ; no tests included | |
5379 | #:jar-name "eclipse-core-commands.jar")) | |
5380 | (inputs | |
5381 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common))) | |
5382 | (home-page "https://www.eclipse.org/platform") | |
5383 | (synopsis "Eclipse core commands") | |
5384 | (description "This package provides Eclipse core commands in the module | |
5385 | @code{org.eclipse.core.commands}.") | |
5386 | (license license:epl1.0))) | |
5387 | ||
bf96acf7 RW |
5388 | (define-public java-eclipse-text |
5389 | (package | |
5390 | (name "java-eclipse-text") | |
5391 | (version "3.6.0") | |
5392 | (source (origin | |
5393 | (method url-fetch) | |
5394 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5395 | "org/eclipse/platform/org.eclipse.text/" | |
5396 | version "/org.eclipse.text-" | |
5397 | version "-sources.jar")) | |
5398 | (sha256 | |
5399 | (base32 | |
5400 | "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1")))) | |
5401 | (build-system ant-build-system) | |
5402 | (arguments | |
5403 | `(#:tests? #f ; no tests included | |
5404 | #:jar-name "eclipse-text.jar" | |
5405 | #:phases | |
5406 | (modify-phases %standard-phases | |
5407 | ;; When creating a new category we must make sure that the new list | |
5408 | ;; matches List<Position>. By default it seems to be too generic | |
5409 | ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>. | |
5410 | ;; Without this we get this error: | |
5411 | ;; | |
5412 | ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376: | |
5413 | ;; error: method put in interface Map<K,V> cannot be applied to given types; | |
5414 | ;; [javac] fPositions.put(category, new ArrayList<>()); | |
5415 | ;; [javac] ^ | |
5416 | ;; [javac] required: String,List<Position> | |
5417 | ;; [javac] found: String,ArrayList<Object> | |
5418 | ;; [javac] reason: actual argument ArrayList<Object> cannot be converted | |
5419 | ;; to List<Position> by method invocation conversion | |
5420 | ;; [javac] where K,V are type-variables: | |
5421 | ;; [javac] K extends Object declared in interface Map | |
5422 | ;; [javac] V extends Object declared in interface Map | |
5423 | ;; | |
5424 | ;; I don't know if this is a good fix. I suspect it is not, but it | |
5425 | ;; seems to work. | |
5426 | (add-after 'unpack 'fix-compilation-error | |
5427 | (lambda _ | |
5428 | (substitute* "src/org/eclipse/jface/text/AbstractDocument.java" | |
5429 | (("Positions.put\\(category, new ArrayList<>\\(\\)\\);") | |
5430 | "Positions.put(category, new ArrayList<Position>());")) | |
5431 | #t))))) | |
5432 | (inputs | |
5433 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5434 | ("java-eclipse-core-commands" ,java-eclipse-core-commands) | |
5435 | ("java-icu4j" ,java-icu4j))) | |
5436 | (home-page "http://www.eclipse.org/platform") | |
5437 | (synopsis "Eclipse text library") | |
5438 | (description "Platform Text is part of the Platform UI project and | |
5439 | provides the basic building blocks for text and text editors within Eclipse | |
5440 | and contributes the Eclipse default text editor.") | |
5441 | (license license:epl1.0))) | |
5442 | ||
c24d11b7 RW |
5443 | (define-public java-eclipse-jdt-core |
5444 | (package | |
5445 | (name "java-eclipse-jdt-core") | |
5446 | (version "3.12.3") | |
5447 | (source (origin | |
5448 | (method url-fetch) | |
5449 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5450 | "org/eclipse/jdt/org.eclipse.jdt.core/" | |
5451 | version "/org.eclipse.jdt.core-" | |
5452 | version "-sources.jar")) | |
5453 | (sha256 | |
5454 | (base32 | |
5455 | "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j")))) | |
5456 | (build-system ant-build-system) | |
5457 | (arguments | |
5458 | `(#:tests? #f ; no tests included | |
5459 | #:jar-name "eclipse-jdt-core.jar")) | |
5460 | (inputs | |
5461 | `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5462 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
5463 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
5464 | ("java-eclipse-core-resources" ,java-eclipse-core-resources) | |
5465 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5466 | ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
5467 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5468 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5469 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5470 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
5471 | ("java-eclipse-text" ,java-eclipse-text))) | |
5472 | (home-page "https://www.eclipse.org/jdt") | |
5473 | (synopsis "Java development tools core libraries") | |
5474 | (description "This package provides the core libraries of the Eclipse Java | |
5475 | development tools.") | |
5476 | (license license:epl1.0))) | |
5477 | ||
a5cdcf6c RW |
5478 | (define-public java-javax-mail |
5479 | (package | |
5480 | (name "java-javax-mail") | |
5481 | (version "1.5.6") | |
5482 | (source (origin | |
5483 | (method url-fetch) | |
5484 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5485 | "com/sun/mail/javax.mail/" | |
5486 | version "/javax.mail-" | |
5487 | version "-sources.jar")) | |
5488 | (sha256 | |
5489 | (base32 | |
5490 | "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9")))) | |
5491 | (build-system ant-build-system) | |
5492 | (arguments | |
5493 | `(#:tests? #f ; no tests | |
5494 | #:jar-name "javax-mail.jar")) | |
5495 | (home-page "https://javamail.java.net") | |
5496 | (synopsis "Reference implementation of the JavaMail API") | |
5497 | (description | |
5498 | "This package provides versions of the JavaMail API implementation, IMAP, | |
5499 | SMTP, and POP3 service providers, some examples, and documentation for the | |
5500 | JavaMail API.") | |
5501 | ;; GPLv2 only with "classpath exception". | |
5502 | (license license:gpl2))) | |
5503 | ||
0e660c4d RW |
5504 | (define-public java-log4j-api |
5505 | (package | |
5506 | (name "java-log4j-api") | |
5507 | (version "2.4.1") | |
5508 | (source (origin | |
5509 | (method url-fetch) | |
5510 | (uri (string-append "mirror://apache/logging/log4j/" version | |
5511 | "/apache-log4j-" version "-src.tar.gz")) | |
5512 | (sha256 | |
5513 | (base32 | |
5514 | "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd")))) | |
5515 | (build-system ant-build-system) | |
5516 | (arguments | |
5517 | `(#:tests? #f ; tests require unpackaged software | |
5518 | #:jar-name "log4j-api.jar" | |
5519 | #:make-flags | |
5520 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") | |
5521 | "/share/java")) | |
5522 | #:phases | |
5523 | (modify-phases %standard-phases | |
5524 | (add-after 'unpack 'enter-dir | |
5525 | (lambda _ (chdir "log4j-api") #t)) | |
5526 | ;; FIXME: The tests require additional software that has not been | |
5527 | ;; packaged yet, such as | |
5528 | ;; * org.apache.maven | |
5529 | ;; * org.apache.felix | |
5530 | (add-after 'enter-dir 'delete-tests | |
5531 | (lambda _ (delete-file-recursively "src/test") #t))))) | |
5532 | (inputs | |
5533 | `(("java-osgi-core" ,java-osgi-core) | |
5534 | ("java-hamcrest-core" ,java-hamcrest-core) | |
5535 | ("java-junit" ,java-junit))) | |
5536 | (home-page "http://logging.apache.org/log4j/2.x/") | |
5537 | (synopsis "API module of the Log4j logging framework for Java") | |
5538 | (description | |
5539 | "This package provides the API module of the Log4j logging framework for | |
5540 | Java.") | |
5541 | (license license:asl2.0))) | |
5542 | ||
dfef4231 JL |
5543 | (define-public java-log4j-core |
5544 | (package | |
5545 | (inherit java-log4j-api) | |
5546 | (name "java-log4j-core") | |
5547 | (inputs | |
5548 | `(("java-osgi-core" ,java-osgi-core) | |
5549 | ("java-hamcrest-core" ,java-hamcrest-core) | |
5550 | ("java-log4j-api" ,java-log4j-api) | |
5551 | ("java-mail" ,java-mail) | |
5552 | ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec) | |
5553 | ("java-lmax-disruptor" ,java-lmax-disruptor) | |
5554 | ("java-kafka" ,java-kafka-clients) | |
5555 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) | |
5556 | ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
5557 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
5558 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) | |
5559 | ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml) | |
5560 | ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml) | |
5561 | ("java-commons-compress" ,java-commons-compress) | |
5562 | ("java-commons-csv" ,java-commons-csv) | |
5563 | ("java-jeromq" ,java-jeromq) | |
5564 | ("java-junit" ,java-junit))) | |
5565 | (native-inputs | |
5566 | `(("hamcrest" ,java-hamcrest-all) | |
5567 | ("java-commons-io" ,java-commons-io) | |
5568 | ("java-commons-lang3" ,java-commons-lang3) | |
5569 | ("slf4j" ,java-slf4j-api))) | |
5570 | (arguments | |
5571 | `(#:tests? #f ; tests require more dependencies | |
5572 | #:test-dir "src/test" | |
5573 | #:source-dir "src/main/java" | |
5574 | #:jar-name "log4j-core.jar" | |
5575 | #:jdk ,icedtea-8 | |
5576 | #:make-flags | |
5577 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") | |
5578 | "/share/java")) | |
5579 | #:phases | |
5580 | (modify-phases %standard-phases | |
5581 | (add-after 'unpack 'enter-dir | |
5582 | (lambda _ (chdir "log4j-core") #t))))) | |
5583 | (synopsis "Core component of the Log4j framework") | |
5584 | (description "This package provides the core component of the Log4j | |
5585 | logging framework for Java."))) | |
5586 | ||
2caf873e JL |
5587 | (define-public java-log4j-1.2-api |
5588 | (package | |
5589 | (inherit java-log4j-api) | |
5590 | (name "java-log4j-1.2-api") | |
5591 | (arguments | |
5592 | `(#:jar-name "java-log4j-1.2-api.jar" | |
5593 | #:source-dir "log4j-1.2-api/src/main/java" | |
5594 | #:jdk ,icedtea-8 | |
5595 | ;; Tests require maven-model (and other maven subprojects), which is a | |
5596 | ;; cyclic dependency. | |
5597 | #:tests? #f)) | |
5598 | (inputs | |
5599 | `(("log4j-api" ,java-log4j-api) | |
5600 | ("log4j-core" ,java-log4j-core) | |
5601 | ("osgi-core" ,java-osgi-core) | |
5602 | ("eclipse-osgi" ,java-eclipse-osgi) | |
5603 | ("java-lmax-disruptor" ,java-lmax-disruptor))))) | |
5604 | ||
1c188f4e HG |
5605 | (define-public java-commons-cli |
5606 | (package | |
5607 | (name "java-commons-cli") | |
37602dd8 | 5608 | (version "1.4") |
1c188f4e HG |
5609 | (source (origin |
5610 | (method url-fetch) | |
5611 | (uri (string-append "mirror://apache/commons/cli/source/" | |
5612 | "commons-cli-" version "-src.tar.gz")) | |
5613 | (sha256 | |
5614 | (base32 | |
37602dd8 | 5615 | "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1")))) |
1c188f4e HG |
5616 | (build-system ant-build-system) |
5617 | ;; TODO: javadoc | |
5618 | (arguments | |
5619 | `(#:jar-name "commons-cli.jar")) | |
5620 | (native-inputs | |
5621 | `(("java-junit" ,java-junit) | |
5622 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
5623 | (home-page "http://commons.apache.org/cli/") | |
5624 | (synopsis "Command line arguments and options parsing library") | |
5625 | (description "The Apache Commons CLI library provides an API for parsing | |
5626 | command line options passed to programs. It is also able to print help | |
5627 | messages detailing the options available for a command line tool. | |
5628 | ||
5629 | Commons CLI supports different types of options: | |
5630 | ||
5631 | @itemize | |
5632 | @item POSIX like options (ie. tar -zxvf foo.tar.gz) | |
5633 | @item GNU like long options (ie. du --human-readable --max-depth=1) | |
5634 | @item Java like properties (ie. java -Djava.awt.headless=true Foo) | |
5635 | @item Short options with value attached (ie. gcc -O2 foo.c) | |
5636 | @item long options with single hyphen (ie. ant -projecthelp) | |
5637 | @end itemize | |
5638 | ||
5639 | This is a part of the Apache Commons Project.") | |
5640 | (license license:asl2.0))) | |
0a8519bc HG |
5641 | |
5642 | (define-public java-commons-codec | |
5643 | (package | |
5644 | (name "java-commons-codec") | |
5645 | (version "1.10") | |
5646 | (source (origin | |
5647 | (method url-fetch) | |
5648 | (uri (string-append "mirror://apache/commons/codec/source/" | |
5649 | "commons-codec-" version "-src.tar.gz")) | |
5650 | (sha256 | |
5651 | (base32 | |
5652 | "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65")))) | |
5653 | (build-system ant-build-system) | |
5654 | (outputs '("out" "doc")) | |
5655 | (arguments | |
5656 | `(#:test-target "test" | |
5657 | #:make-flags | |
5658 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
5659 | (junit (assoc-ref %build-inputs "java-junit"))) | |
5660 | (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") | |
5661 | (string-append "-Dhamcrest.jar=" hamcrest | |
5662 | "/share/java/hamcrest-core.jar") | |
5663 | ;; Do not append version to jar. | |
5664 | "-Dfinal.name=commons-codec")) | |
5665 | #:phases | |
5666 | (modify-phases %standard-phases | |
5667 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
5668 | (replace 'install (install-jars "dist")) | |
5669 | (add-after 'install 'install-doc (install-javadoc "dist/docs/api"))))) | |
5670 | (native-inputs | |
5671 | `(("java-junit" ,java-junit) | |
5672 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
5673 | (home-page "http://commons.apache.org/codec/") | |
5674 | (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs") | |
5675 | (description "The codec package contains simple encoder and decoders for | |
5676 | various formats such as Base64 and Hexadecimal. In addition to these widely | |
5677 | used encoders and decoders, the codec package also maintains a collection of | |
5678 | phonetic encoding utilities. | |
5679 | ||
5680 | This is a part of the Apache Commons Project.") | |
5681 | (license license:asl2.0))) | |
7d91c1b9 HG |
5682 | |
5683 | (define-public java-commons-daemon | |
5684 | (package | |
5685 | (name "java-commons-daemon") | |
5686 | (version "1.0.15") | |
5687 | (source (origin | |
5688 | (method url-fetch) | |
5689 | (uri (string-append "mirror://apache/commons/daemon/source/" | |
5690 | "commons-daemon-" version "-src.tar.gz")) | |
5691 | (sha256 | |
5692 | (base32 | |
5693 | "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi")))) | |
5694 | (build-system ant-build-system) | |
5695 | (arguments | |
5696 | `(#:test-target "test" | |
5697 | #:phases | |
5698 | (modify-phases %standard-phases | |
5699 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
5700 | (replace 'install (install-jars "dist")) | |
5701 | (add-after 'install 'install-doc (install-javadoc "dist/docs/api"))))) | |
5702 | (native-inputs | |
5703 | `(("java-junit" ,java-junit))) | |
5704 | (home-page "http://commons.apache.org/daemon/") | |
5705 | (synopsis "Library to launch Java applications as daemons") | |
5706 | (description "The Daemon package from Apache Commons can be used to | |
5707 | implement Java applications which can be launched as daemons. For example the | |
5708 | program will be notified about a shutdown so that it can perform cleanup tasks | |
5709 | before its process of execution is destroyed by the operation system. | |
5710 | ||
5711 | This package contains the Java library. You will also need the actual binary | |
5712 | for your architecture which is provided by the jsvc package. | |
5713 | ||
5714 | This is a part of the Apache Commons Project.") | |
5715 | (license license:asl2.0))) | |
9f68e74a | 5716 | |
eb270ecf RW |
5717 | (define-public java-javaewah |
5718 | (package | |
5719 | (name "java-javaewah") | |
5720 | (version "1.1.6") | |
5721 | (source (origin | |
5722 | (method url-fetch) | |
5723 | (uri (string-append "https://github.com/lemire/javaewah/" | |
5724 | "archive/JavaEWAH-" version ".tar.gz")) | |
5725 | (sha256 | |
5726 | (base32 | |
5727 | "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b")))) | |
5728 | (build-system ant-build-system) | |
5729 | (arguments `(#:jar-name "javaewah.jar")) | |
5730 | (inputs | |
5731 | `(("java-junit" ,java-junit) | |
5732 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
5733 | (home-page "https://github.com/lemire/javaewah") | |
5734 | (synopsis "Compressed alternative to the Java @code{BitSet} class") | |
5735 | (description "This is a word-aligned compressed variant of the Java | |
5736 | @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like | |
5737 | compression scheme. It can be used to implement bitmap indexes. | |
5738 | ||
5739 | The goal of word-aligned compression is not to achieve the best compression, | |
5740 | but rather to improve query processing time. Hence, JavaEWAH tries to save CPU | |
5741 | cycles, maybe at the expense of storage. However, the EWAH scheme is always | |
5742 | more efficient storage-wise than an uncompressed bitmap (as implemented in the | |
5743 | @code{BitSet} class by Sun).") | |
5744 | ;; GPL2.0 derivates are explicitly allowed. | |
5745 | (license license:asl2.0))) | |
5746 | ||
f8e4d022 RW |
5747 | (define-public java-slf4j-api |
5748 | (package | |
5749 | (name "java-slf4j-api") | |
5750 | (version "1.7.25") | |
5751 | (source (origin | |
5752 | (method url-fetch) | |
5753 | (uri (string-append "https://www.slf4j.org/dist/slf4j-" | |
5754 | version ".tar.gz")) | |
5755 | (sha256 | |
5756 | (base32 | |
5757 | "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb")) | |
5758 | (modules '((guix build utils))) | |
5759 | ;; Delete bundled jars. | |
5760 | (snippet | |
5761 | '(begin | |
5762 | (for-each delete-file (find-files "." "\\.jar$")) | |
5763 | #t)))) | |
5764 | (build-system ant-build-system) | |
5765 | (arguments | |
dcf7a8a6 | 5766 | `(#:jar-name "slf4j-api.jar" |
f8e4d022 | 5767 | #:source-dir "slf4j-api/src/main" |
dcf7a8a6 JL |
5768 | #:test-dir "slf4j-api/src/test" |
5769 | #:phases | |
5770 | (modify-phases %standard-phases | |
5771 | (add-after 'build 'regenerate-jar | |
5772 | (lambda _ | |
5773 | ;; pom.xml ignores these files in the jar creation process. If we don't, | |
5774 | ;; we get the error "This code should have never made it into slf4j-api.jar" | |
5775 | (delete-file-recursively "build/classes/org/slf4j/impl") | |
5776 | (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C" | |
5777 | "build/classes" ".")))) | |
5778 | (add-before 'check 'dont-test-abstract-classes | |
5779 | (lambda _ | |
5780 | ;; abstract classes are not meant to be run with junit | |
5781 | (substitute* "build.xml" | |
5782 | (("<include name=\"\\*\\*/\\*Test.java\" />") | |
5783 | (string-append "<include name=\"**/*Test.java\" />" | |
5784 | "<exclude name=\"**/MultithreadedInitializationTest" | |
5785 | ".java\" />")))))))) | |
f8e4d022 RW |
5786 | (inputs |
5787 | `(("java-junit" ,java-junit) | |
5788 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
5789 | (home-page "https://www.slf4j.org/") | |
5790 | (synopsis "Simple logging facade for Java") | |
5791 | (description "The Simple Logging Facade for Java (SLF4J) serves as a | |
5792 | simple facade or abstraction for various logging | |
5793 | frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j}) | |
5794 | allowing the end user to plug in the desired logging framework at deployment | |
5795 | time.") | |
5796 | (license license:expat))) | |
5797 | ||
6d047cc4 GB |
5798 | (define java-slf4j-api-bootstrap |
5799 | (package | |
5800 | (inherit java-slf4j-api) | |
5801 | (name "java-slf4j-api-bootstrap") | |
5802 | (inputs `()) | |
5803 | (arguments | |
5804 | (substitute-keyword-arguments (package-arguments java-slf4j-api) | |
5805 | ((#:tests? _ #f) #f))))) | |
5806 | ||
88f256a1 TD |
5807 | (define-public java-slf4j-simple |
5808 | (package | |
5809 | (name "java-slf4j-simple") | |
5810 | (version "1.7.25") | |
5811 | (source (package-source java-slf4j-api)) | |
5812 | (build-system ant-build-system) | |
5813 | (arguments | |
5814 | `(#:jar-name "slf4j-simple.jar" | |
5815 | #:source-dir "slf4j-simple/src/main" | |
5816 | #:test-dir "slf4j-simple/src/test" | |
5817 | #:phases | |
5818 | (modify-phases %standard-phases | |
5819 | ;; The tests need some test classes from slf4j-api | |
5820 | (add-before 'check 'build-slf4j-api-test-helpers | |
5821 | (lambda _ | |
5822 | ;; Add current dir to CLASSPATH ... | |
5823 | (setenv "CLASSPATH" | |
5824 | (string-append (getcwd) ":" (getenv "CLASSPATH"))) | |
5825 | ;; ... and build test helper classes here: | |
5826 | (zero? | |
5827 | (apply system* | |
5828 | `("javac" "-d" "." | |
5829 | ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))) | |
5830 | (inputs | |
5831 | `(("java-junit" ,java-junit) | |
5832 | ("java-hamcrest-core" ,java-hamcrest-core) | |
5833 | ("java-slf4j-api" ,java-slf4j-api))) | |
5834 | (home-page "https://www.slf4j.org/") | |
5835 | (synopsis "Simple implementation of simple logging facade for Java") | |
5836 | (description "SLF4J binding for the Simple implementation, which outputs | |
5837 | all events to System.err. Only messages of level INFO and higher are | |
5838 | printed.") | |
5839 | (license license:expat))) | |
5840 | ||
9f68e74a JL |
5841 | (define-public antlr2 |
5842 | (package | |
5843 | (name "antlr2") | |
5844 | (version "2.7.7") | |
5845 | (source (origin | |
5846 | (method url-fetch) | |
5847 | (uri (string-append "http://www.antlr2.org/download/antlr-" | |
5848 | version ".tar.gz")) | |
5849 | (sha256 | |
5850 | (base32 | |
5851 | "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5")) | |
5852 | (modules '((guix build utils))) | |
5853 | (snippet | |
5854 | '(begin | |
5855 | (delete-file "antlr.jar") | |
5856 | (substitute* "lib/cpp/antlr/CharScanner.hpp" | |
5857 | (("#include <map>") | |
5858 | (string-append | |
6d225e89 RW |
5859 | "#include <map>\n" |
5860 | "#define EOF (-1)\n" | |
5861 | "#include <strings.h>"))) | |
9f68e74a | 5862 | (substitute* "configure" |
6d225e89 RW |
5863 | (("/bin/sh") "sh")) |
5864 | #t)))) | |
9f68e74a JL |
5865 | (build-system gnu-build-system) |
5866 | (arguments | |
6d225e89 | 5867 | `(#:tests? #f ; no test target |
3ad90395 RW |
5868 | #:imported-modules ((guix build ant-build-system) |
5869 | (guix build syscalls) | |
5870 | ,@%gnu-build-system-modules) | |
5871 | #:modules (((guix build ant-build-system) #:prefix ant:) | |
5872 | (guix build gnu-build-system) | |
5873 | (guix build utils)) | |
9f68e74a JL |
5874 | #:phases |
5875 | (modify-phases %standard-phases | |
5876 | (add-after 'install 'strip-jar-timestamps | |
3ad90395 | 5877 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps)) |
9f68e74a JL |
5878 | (add-after 'configure 'fix-bin-ls |
5879 | (lambda _ | |
3ad90395 RW |
5880 | (substitute* (find-files "." "Makefile") |
5881 | (("/bin/ls") "ls")) | |
5882 | #t))))) | |
9f68e74a JL |
5883 | (native-inputs |
5884 | `(("which" ,which) | |
5885 | ("zip" ,zip) | |
5886 | ("java" ,icedtea "jdk"))) | |
5887 | (inputs | |
5888 | `(("java" ,icedtea))) | |
5889 | (home-page "http://www.antlr2.org") | |
5890 | (synopsis "Framework for constructing recognizers, compilers, and translators") | |
5891 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) | |
5892 | is a language tool that provides a framework for constructing recognizers, | |
5893 | compilers, and translators from grammatical descriptions containing Java, C#, | |
5894 | C++, or Python actions. ANTLR provides excellent support for tree construction, | |
5895 | tree walking, and translation.") | |
5896 | (license license:public-domain))) | |
a0f15eff | 5897 | |
e44112e1 | 5898 | (define-public java-stringtemplate-3 |
a0f15eff | 5899 | (package |
e44112e1 | 5900 | (name "java-stringtemplate") |
a0f15eff JL |
5901 | (version "3.2.1") |
5902 | (source (origin | |
5903 | (method url-fetch) | |
5904 | (uri (string-append "https://github.com/antlr/website-st4/raw/" | |
5905 | "gh-pages/download/stringtemplate-" | |
5906 | version ".tar.gz")) | |
5907 | (sha256 | |
5908 | (base32 | |
5909 | "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is")))) | |
5910 | (build-system ant-build-system) | |
5911 | (arguments | |
129d926d | 5912 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
2fcda6d2 | 5913 | #:test-dir "test" |
b101b4e8 RW |
5914 | #:modules ((guix build ant-build-system) |
5915 | (guix build utils) | |
5916 | (srfi srfi-1)) | |
a0f15eff JL |
5917 | #:phases |
5918 | (modify-phases %standard-phases | |
2fcda6d2 RW |
5919 | (add-before 'check 'fix-tests |
5920 | (lambda _ | |
5921 | (substitute* "build.xml" | |
5922 | (("\\$\\{test.home\\}/java") | |
5923 | "${test.home}/org")) | |
5924 | #t)) | |
a0f15eff JL |
5925 | (add-before 'build 'generate-grammar |
5926 | (lambda _ | |
b101b4e8 RW |
5927 | (with-directory-excursion "src/org/antlr/stringtemplate/language/" |
5928 | (every (lambda (file) | |
5929 | (format #t "~a\n" file) | |
5930 | (zero? (system* "antlr" file))) | |
5931 | '("template.g" "angle.bracket.template.g" "action.g" | |
5932 | "eval.g" "group.g" "interface.g")))))))) | |
a0f15eff | 5933 | (native-inputs |
2fcda6d2 RW |
5934 | `(("antlr" ,antlr2) |
5935 | ("java-junit" ,java-junit))) | |
a0f15eff JL |
5936 | (home-page "http://www.stringtemplate.org") |
5937 | (synopsis "Template engine to generate formatted text output") | |
5938 | (description "StringTemplate is a java template engine (with ports for C#, | |
5939 | Objective-C, JavaScript, Scala) for generating source code, web pages, emails, | |
5940 | or any other formatted text output. StringTemplate is particularly good at | |
5941 | code generators, multiple site skins, and internationalization / localization. | |
5942 | StringTemplate also powers ANTLR.") | |
5943 | (license license:bsd-3))) | |
4ad8aed7 JL |
5944 | |
5945 | ;; antlr3 is partially written using antlr3 grammar files. It also depends on | |
5946 | ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar | |
5947 | ;; files and uses antlr3 at runtime. The latest version requires a recent version | |
5948 | ;; of antlr3 at runtime. | |
5949 | ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3. | |
5950 | ;; This version of ST4 is sufficient for the latest antlr3. | |
5951 | ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build | |
5952 | ;; the latest ST4 with it. Then we build our final antlr3 that will be linked | |
5953 | ;; against the latest ST4. | |
5954 | ;; antlr3.3 still depends on antlr3 to generate some files, so we use an | |
5955 | ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses | |
5956 | ;; only grammar files with the antlr2 syntax. | |
5957 | ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3. | |
5958 | ||
64b7efc0 | 5959 | (define-public java-stringtemplate |
407df789 | 5960 | (package (inherit java-stringtemplate-3) |
64b7efc0 | 5961 | (name "java-stringtemplate") |
4ad8aed7 JL |
5962 | (version "4.0.8") |
5963 | (source (origin | |
5964 | (method url-fetch) | |
5965 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/" | |
5966 | version ".tar.gz")) | |
5967 | (file-name (string-append name "-" version ".tar.gz")) | |
5968 | (sha256 | |
5969 | (base32 | |
5970 | "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087")))) | |
5971 | (build-system ant-build-system) | |
5972 | (arguments | |
6db77c7c RW |
5973 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
5974 | #:tests? #f ; FIXME: tests fail for unknown reasons | |
5975 | #:test-dir "test" | |
f4aa4cfe RW |
5976 | #:modules ((guix build ant-build-system) |
5977 | (guix build utils) | |
5978 | (srfi srfi-1)) | |
4ad8aed7 JL |
5979 | #:phases |
5980 | (modify-phases %standard-phases | |
6db77c7c RW |
5981 | (add-before 'check 'fix-test-target |
5982 | (lambda _ | |
5983 | (substitute* "build.xml" | |
5984 | (("\\$\\{test.home\\}/java") "${test.home}/") | |
5985 | (("\\*Test.java") "Test*.java")) | |
5986 | #t)) | |
4ad8aed7 | 5987 | (add-before 'build 'generate-grammar |
f4aa4cfe RW |
5988 | (lambda _ |
5989 | (with-directory-excursion "src/org/stringtemplate/v4/compiler/" | |
5990 | (every (lambda (file) | |
5991 | (format #t "~a\n" file) | |
5992 | (zero? (system* "antlr3" file))) | |
5993 | '("STParser.g" "Group.g" "CodeGenerator.g")))))))) | |
4ad8aed7 JL |
5994 | (inputs |
5995 | `(("antlr3" ,antlr3-bootstrap) | |
5996 | ("antlr2" ,antlr2) | |
6db77c7c RW |
5997 | ("java-stringtemplate" ,java-stringtemplate-3) |
5998 | ("java-junit" ,java-junit))))) | |
4ad8aed7 | 5999 | |
1345eeb0 | 6000 | (define java-stringtemplate-4.0.6 |
64b7efc0 | 6001 | (package (inherit java-stringtemplate) |
1345eeb0 | 6002 | (name "java-stringtemplate") |
4ad8aed7 JL |
6003 | (version "4.0.6") |
6004 | (source (origin | |
6005 | (method url-fetch) | |
6006 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-" | |
6007 | version ".tar.gz")) | |
6008 | (file-name (string-append name "-" version ".tar.gz")) | |
6009 | (sha256 | |
6010 | (base32 | |
6011 | "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp")))) | |
6012 | (inputs | |
6013 | `(("antlr3" ,antlr3-3.3) | |
6014 | ("antlr2" ,antlr2) | |
e44112e1 | 6015 | ("java-stringtemplate" ,java-stringtemplate-3))))) |
4ad8aed7 JL |
6016 | |
6017 | (define-public antlr3 | |
6018 | (package | |
6019 | (name "antlr3") | |
6020 | (version "3.5.2") | |
6021 | (source (origin | |
6022 | (method url-fetch) | |
6023 | (uri (string-append "https://github.com/antlr/antlr3/archive/" | |
6024 | version ".tar.gz")) | |
6025 | (file-name (string-append name "-" version ".tar.gz")) | |
6026 | (sha256 | |
6027 | (base32 | |
fd75eb6c | 6028 | "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6")))) |
4ad8aed7 JL |
6029 | (build-system ant-build-system) |
6030 | (arguments | |
6031 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
6032 | #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3" | |
6033 | #:tests? #f | |
6034 | #:phases | |
6035 | (modify-phases %standard-phases | |
6036 | (add-after 'install 'bin-install | |
6037 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
6038 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) | |
6039 | (bin (string-append (assoc-ref outputs "out") "/bin"))) | |
6040 | (mkdir-p bin) | |
6041 | (with-output-to-file (string-append bin "/antlr3") | |
6042 | (lambda _ | |
6043 | (display | |
6044 | (string-append "#!" (which "sh") "\n" | |
6045 | "java -cp " jar "/" ,name "-" ,version ".jar:" | |
6046 | (string-concatenate | |
6047 | (find-files (assoc-ref inputs "stringtemplate") | |
6048 | ".*\\.jar")) | |
6049 | ":" | |
6050 | (string-concatenate | |
6051 | (find-files (assoc-ref inputs "stringtemplate4") | |
6052 | ".*\\.jar")) | |
6053 | ":" | |
6054 | (string-concatenate | |
6055 | (find-files (string-append | |
6056 | (assoc-ref inputs "antlr") | |
6057 | "/lib") | |
6058 | ".*\\.jar")) | |
6059 | " org.antlr.Tool $*")))) | |
6060 | (chmod (string-append bin "/antlr3") #o755)))) | |
6061 | (add-before 'build 'generate-grammar | |
6062 | (lambda _ | |
6063 | (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/") | |
6064 | (for-each (lambda (file) | |
6065 | (display file) | |
6066 | (newline) | |
6067 | (system* "antlr3" file)) | |
6068 | '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g" | |
6069 | "AssignTokenTypesWalker.g" | |
6070 | "ActionTranslator.g" "TreeToNFAConverter.g" | |
6071 | "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g" | |
6072 | "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g")) | |
6073 | (substitute* "ANTLRParser.java" | |
6074 | (("public Object getTree") "public GrammarAST getTree")) | |
6075 | (substitute* "ANTLRv3Parser.java" | |
6076 | (("public Object getTree") "public CommonTree getTree")) | |
6077 | (chdir "../../../../../java") | |
6078 | (system* "antlr" "-o" "org/antlr/tool" | |
6079 | "org/antlr/tool/serialize.g") | |
6080 | (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java" | |
6081 | (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*; | |
6082 | import org.antlr.grammar.v3.ANTLRTreePrinter;")) | |
6083 | (substitute* "org/antlr/tool/ErrorManager.java" | |
6084 | (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") "")) | |
6085 | (chdir "../../../.."))) | |
6086 | (add-before 'build 'fix-build-xml | |
6087 | (lambda _ | |
6088 | (substitute* "build.xml" | |
6089 | (("<exec") "<copy todir=\"${classes.dir}\"> | |
6090 | <fileset dir=\"tool/src/main/resources\"> | |
6091 | <include name=\"**/*.stg\"/> | |
6092 | <include name=\"**/*.st\"/> | |
6093 | <include name=\"**/*.sti\"/> | |
6094 | <include name=\"**/STLexer.tokens\"/> | |
6095 | </fileset> | |
6096 | </copy><exec"))))))) | |
6097 | (native-inputs | |
6098 | `(("antlr" ,antlr2) | |
6099 | ("antlr3" ,antlr3-bootstrap))) | |
6100 | (inputs | |
6101 | `(("junit" ,java-junit) | |
e44112e1 | 6102 | ("stringtemplate" ,java-stringtemplate-3) |
64b7efc0 | 6103 | ("stringtemplate4" ,java-stringtemplate))) |
4ad8aed7 | 6104 | (propagated-inputs |
e44112e1 | 6105 | `(("stringtemplate" ,java-stringtemplate-3) |
4ad8aed7 | 6106 | ("antlr" ,antlr2) |
1345eeb0 | 6107 | ("stringtemplate4" ,java-stringtemplate-4.0.6))) |
4ad8aed7 JL |
6108 | (home-page "http://www.antlr3.org") |
6109 | (synopsis "Framework for constructing recognizers, compilers, and translators") | |
6110 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) | |
6111 | is a language tool that provides a framework for constructing recognizers, | |
6112 | compilers, and translators from grammatical descriptions containing Java, C#, | |
6113 | C++, or Python actions. ANTLR provides excellent support for tree construction, | |
6114 | tree walking, and translation.") | |
6115 | (license license:bsd-3))) | |
6116 | ||
6117 | (define antlr3-bootstrap | |
6118 | (package | |
6119 | (inherit antlr3) | |
6120 | (name "antlr3-bootstrap") | |
6121 | (native-inputs | |
6122 | `(("antlr" ,antlr2) | |
6123 | ("antlr3" ,antlr3-3.3))) | |
6124 | (inputs | |
6125 | `(("junit" ,java-junit))))) | |
6126 | ||
6127 | (define antlr3-3.3 | |
6128 | (package | |
6129 | (inherit antlr3) | |
6130 | (name "antlr3") | |
6131 | (version "3.3") | |
6132 | (source (origin | |
6133 | (method url-fetch) | |
6134 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" | |
6135 | "gh-pages/download/antlr-" | |
6136 | version ".tar.gz")) | |
6137 | (sha256 | |
6138 | (base32 | |
48c86220 GB |
6139 | "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m")) |
6140 | (patches | |
6141 | (search-patches "antlr3-3_3-fix-java8-compilation.patch")))) | |
4ad8aed7 JL |
6142 | (arguments |
6143 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
a9540107 RW |
6144 | #:source-dir (string-join '("tool/src/main/java" |
6145 | "runtime/Java/src/main/java" | |
6146 | "tool/src/main/antlr2" | |
6147 | "tool/src/main/antlr3") | |
6148 | ":") | |
6149 | #:tests? #f ; FIXME: tests seem to require maven plugin | |
6150 | #:modules ((guix build ant-build-system) | |
6151 | (guix build utils) | |
6152 | (srfi srfi-1)) | |
4ad8aed7 JL |
6153 | #:phases |
6154 | (modify-phases %standard-phases | |
6155 | (add-after 'install 'bin-install | |
6156 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
a9540107 RW |
6157 | (let* ((out (assoc-ref outputs "out")) |
6158 | (jar (string-append out "/share/java")) | |
6159 | (bin (string-append out "/bin"))) | |
4ad8aed7 JL |
6160 | (mkdir-p bin) |
6161 | (with-output-to-file (string-append bin "/antlr3") | |
6162 | (lambda _ | |
6163 | (display | |
a9540107 RW |
6164 | (string-append |
6165 | "#!" (which "sh") "\n" | |
6166 | "java -cp " jar "/antlr3-3.3.jar:" | |
6167 | (string-join | |
6168 | (append (find-files (assoc-ref inputs "java-stringtemplate") | |
6169 | ".*\\.jar$") | |
6170 | (find-files (string-append (assoc-ref inputs "antlr") | |
6171 | "/lib") | |
6172 | ".*\\.jar$")) | |
6173 | ":") | |
6174 | " org.antlr.Tool $*")))) | |
6175 | (chmod (string-append bin "/antlr3") #o755) | |
6176 | #t))) | |
4ad8aed7 JL |
6177 | (add-before 'build 'generate-grammar |
6178 | (lambda _ | |
4ad8aed7 JL |
6179 | (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java" |
6180 | (("import org.antlr.grammar.v2.\\*;") | |
6181 | "import org.antlr.grammar.v2.*;\n | |
6182 | import org.antlr.grammar.v2.TreeToNFAConverter;\n | |
6183 | import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n | |
a9540107 RW |
6184 | import org.antlr.grammar.v2.ANTLRTreePrinter;")) |
6185 | (and | |
6186 | (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/" | |
6187 | (every (lambda (file) | |
6188 | (format #t "~a\n" file) | |
6189 | (zero? (system* "antlr" file))) | |
6190 | '("antlr.g" "antlr.print.g" "assign.types.g" | |
6191 | "buildnfa.g" "codegen.g" "define.g"))) | |
6192 | (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/" | |
6193 | (every (lambda (file) | |
6194 | (format #t "~a\n" file) | |
6195 | (zero? (system* "antlr3" file))) | |
6196 | '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g" | |
6197 | "ANTLRv3Tree.g")))))) | |
4ad8aed7 JL |
6198 | (add-before 'build 'fix-build-xml |
6199 | (lambda _ | |
6200 | (substitute* "build.xml" | |
6201 | (("<exec") "<copy todir=\"${classes.dir}\"> | |
6202 | <fileset dir=\"tool/src/main/resources\"> | |
6203 | <include name=\"**/*.stg\"/> | |
6204 | <include name=\"**/*.st\"/> | |
6205 | <include name=\"**/*.sti\"/> | |
6206 | <include name=\"**/STLexer.tokens\"/> | |
6207 | </fileset> | |
a9540107 RW |
6208 | </copy><exec")) |
6209 | #t))))) | |
4ad8aed7 JL |
6210 | (native-inputs |
6211 | `(("antlr" ,antlr2) | |
6212 | ("antlr3" ,antlr3-3.1))) | |
6213 | (inputs | |
6214 | `(("junit" ,java-junit))) | |
6215 | (propagated-inputs | |
e44112e1 | 6216 | `(("java-stringtemplate" ,java-stringtemplate-3) |
4ad8aed7 JL |
6217 | ("antlr" ,antlr2) |
6218 | ("antlr3" ,antlr3-3.1))))) | |
6219 | ||
6220 | (define antlr3-3.1 | |
6221 | (package | |
6222 | (inherit antlr3) | |
4ad8aed7 JL |
6223 | (version "3.1") |
6224 | (source (origin | |
6225 | (method url-fetch) | |
6226 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" | |
6227 | "gh-pages/download/antlr-" | |
6228 | version ".tar.gz")) | |
6229 | (sha256 | |
6230 | (base32 | |
4c763b4d GB |
6231 | "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z")) |
6232 | (patches | |
6233 | (search-patches "antlr3-3_1-fix-java8-compilation.patch")))) | |
4ad8aed7 | 6234 | (arguments |
ec32bc98 | 6235 | `(#:jar-name (string-append "antlr3-" ,version ".jar") |
4ad8aed7 JL |
6236 | #:source-dir "src:runtime/Java/src" |
6237 | #:tests? #f | |
6238 | #:phases | |
6239 | (modify-phases %standard-phases | |
6240 | (add-after 'install 'bin-install | |
6241 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
6242 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) | |
6243 | (bin (string-append (assoc-ref outputs "out") "/bin"))) | |
6244 | (mkdir-p bin) | |
6245 | (with-output-to-file (string-append bin "/antlr3") | |
6246 | (lambda _ | |
6247 | (display | |
6248 | (string-append "#!" (which "sh") "\n" | |
57e37764 | 6249 | "java -cp " jar "/antlr3-3.1.jar:" |
4ad8aed7 JL |
6250 | (string-concatenate |
6251 | (find-files (assoc-ref inputs "stringtemplate") | |
6252 | ".*\\.jar")) | |
6253 | ":" | |
6254 | (string-concatenate | |
6255 | (find-files (string-append | |
6256 | (assoc-ref inputs "antlr") | |
6257 | "/lib") | |
6258 | ".*\\.jar")) | |
6259 | " org.antlr.Tool $*")))) | |
6260 | (chmod (string-append bin "/antlr3") #o755)))) | |
6261 | (add-before 'build 'generate-grammar | |
6262 | (lambda _ | |
6263 | (let ((dir "src/org/antlr/tool/")) | |
6264 | (for-each (lambda (file) | |
6265 | (display file) | |
6266 | (newline) | |
13f38d31 | 6267 | (invoke "antlr" "-o" dir (string-append dir file))) |
4ad8aed7 JL |
6268 | '("antlr.g" "antlr.print.g" "assign.types.g" |
6269 | "buildnfa.g" "define.g"))) | |
6270 | (format #t "codegen.g\n") | |
13f38d31 RW |
6271 | (invoke "antlr" "-o" "src/org/antlr/codegen" |
6272 | "src/org/antlr/codegen/codegen.g") | |
6273 | #t)) | |
4ad8aed7 JL |
6274 | (add-before 'build 'fix-build-xml |
6275 | (lambda _ | |
6276 | (substitute* "build.xml" | |
6277 | (("<exec") "<copy todir=\"${classes.dir}\"> | |
6278 | <fileset dir=\"src\"> | |
6279 | <include name=\"**/*.stg\"/> | |
6280 | <include name=\"**/*.st\"/> | |
6281 | <include name=\"**/*.sti\"/> | |
6282 | <include name=\"**/STLexer.tokens\"/> | |
6283 | </fileset> | |
6284 | </copy><exec"))))))) | |
6285 | (native-inputs | |
6286 | `(("antlr" ,antlr2))) | |
6287 | (inputs | |
6288 | `(("junit" ,java-junit))) | |
6289 | (propagated-inputs | |
e44112e1 | 6290 | `(("stringtemplate" ,java-stringtemplate-3))))) |
d44bcd7a | 6291 | |
742242a5 GB |
6292 | (define-public java-commons-cli-1.2 |
6293 | ;; This is a bootstrap dependency for Maven2. | |
6294 | (package | |
6295 | (inherit java-commons-cli) | |
6296 | (version "1.2") | |
6297 | (source (origin | |
6298 | (method url-fetch) | |
6299 | (uri (string-append "mirror://apache/commons/cli/source/" | |
6300 | "commons-cli-" version "-src.tar.gz")) | |
6301 | (sha256 | |
6302 | (base32 | |
6303 | "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm")))) | |
6304 | (arguments | |
6305 | `(#:jar-name "commons-cli.jar" | |
6306 | #:phases | |
6307 | (modify-phases %standard-phases | |
6308 | (add-before 'check 'fix-build-xml | |
6309 | (lambda* (#:key inputs #:allow-other-keys) | |
6310 | (substitute* "build.xml" | |
6311 | (("dir=\"\\$\\{test.home\\}/java\"") | |
6312 | "dir=\"${test.home}\"")) | |
6313 | #t))))) | |
6314 | (native-inputs | |
6315 | `(("java-junit" ,java-junit))))) | |
30deadee JL |
6316 | |
6317 | (define-public java-microemulator-cldc | |
6318 | (package | |
6319 | (name "java-microemulator-cldc") | |
6320 | (version "2.0.4") | |
6321 | (source (origin | |
6322 | (method url-fetch) | |
6323 | (uri (string-append "https://github.com/barteo/microemu/archive/" | |
6324 | "microemulator_" | |
6325 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) | |
6326 | version) | |
6327 | ".tar.gz")) | |
6328 | (file-name (string-append name "-" version ".tar.gz")) | |
6329 | (sha256 | |
6330 | (base32 | |
6331 | "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll")))) | |
6332 | (build-system ant-build-system) | |
6333 | (arguments | |
6334 | `(#:jar-name "microemulator-cldc.jar" | |
6335 | #:source-dir "microemu-cldc/src/main/java" | |
6336 | #:tests? #f)); Requires even older software | |
6337 | (home-page "https://github.com/barteo/microemu") | |
6338 | (synopsis "J2ME CLDC emulator") | |
6339 | (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP | |
6340 | Emulator. It allows to demonstrate MIDlet based applications in web browser | |
6341 | applet and can be run as a standalone java application.") | |
6342 | (license (list license:asl2.0 | |
6343 | ;; or altenatively: | |
6344 | license:lgpl2.1+)))) | |
8e2f3e5e JL |
6345 | |
6346 | (define-public java-datanucleus-javax-persistence | |
6347 | (package | |
6348 | (name "java-datanucleus-javax-persistence") | |
6349 | (version "2.2.0") | |
6350 | (source (origin | |
6351 | (method url-fetch) | |
6352 | (uri (string-append "https://github.com/datanucleus/" | |
6353 | "javax.persistence/archive/javax.persistence-" | |
6354 | version "-release.tar.gz")) | |
6355 | (sha256 | |
6356 | (base32 | |
6357 | "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx")))) | |
6358 | (build-system ant-build-system) | |
6359 | (arguments | |
6360 | `(#:jar-name "java-datanucleus-javax-persistence.jar" | |
6361 | #:jdk ,icedtea-8 | |
6362 | #:source-dir "src/main/java" | |
6363 | #:tests? #f)); no tests | |
6364 | (home-page "https://github.com/datanucleus/javax.persistence") | |
6365 | (synopsis "JPA API") | |
6366 | (description "This package contains a clean definition of JPA API intended | |
6367 | for use with DataNucleus JPA since the JCP haven't provided an official JPA API | |
6368 | jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification | |
6369 | used to generate this API.") | |
6370 | (license (list license:edl1.0 license:epl1.0)))) | |
3240ddbf JL |
6371 | |
6372 | (define-public java-osgi-cmpn | |
6373 | (package | |
6374 | (name "java-osgi-cmpn") | |
6375 | (version "6.0.0") | |
6376 | (source (origin | |
6377 | (method url-fetch) | |
6378 | (uri (string-append "http://central.maven.org/maven2/" | |
6379 | "org/osgi/osgi.cmpn/" version "/osgi.cmpn-" | |
6380 | version "-sources.jar")) | |
6381 | (sha256 | |
6382 | (base32 | |
6383 | "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys")))) | |
6384 | (build-system ant-build-system) | |
6385 | (arguments | |
6386 | `(#:jar-name "osgi-cmpn.jar" | |
6387 | #:tests? #f)); no tests | |
6388 | (inputs | |
6389 | `(("annotation" ,java-osgi-annotation) | |
6390 | ("core" ,java-osgi-core) | |
6391 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) | |
6392 | ("microemulator" ,java-microemulator-cldc) | |
6393 | ("servlet" ,java-classpathx-servletapi))) | |
c353d014 | 6394 | (home-page "https://www.osgi.org") |
3240ddbf JL |
6395 | (synopsis "Compendium specification module of OSGi framework") |
6396 | (description | |
6397 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6398 | and service platform for the Java programming language. This package contains | |
6399 | the compendium specification module, providing interfaces and classes for use | |
6400 | in compiling bundles.") | |
6401 | (license license:asl2.0))) | |
747c7574 JL |
6402 | |
6403 | (define-public java-osgi-service-component-annotations | |
6404 | (package | |
6405 | (name "java-osgi-service-component-annotations") | |
6406 | (version "1.3.0") | |
6407 | (source (origin | |
6408 | (method url-fetch) | |
6409 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6410 | "org.osgi.service.component.annotations/" | |
6411 | version "/org.osgi.service.component.annotations-" | |
6412 | version "-sources.jar")) | |
6413 | (sha256 | |
6414 | (base32 | |
6415 | "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0")))) | |
6416 | (build-system ant-build-system) | |
6417 | (arguments | |
6418 | `(#:jar-name "osgi-service-component-annotations.jar" | |
6419 | #:tests? #f)); no tests | |
6420 | (inputs | |
6421 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 6422 | (home-page "https://www.osgi.org") |
747c7574 JL |
6423 | (synopsis "Support annotations for osgi-service-component") |
6424 | (description | |
6425 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6426 | and service platform for the Java programming language. This package contains | |
6427 | the support annotations for osgi-service-component.") | |
6428 | (license license:asl2.0))) | |
999b5fb4 JL |
6429 | |
6430 | (define-public java-osgi-dto | |
6431 | (package | |
6432 | (name "java-osgi-dto") | |
6433 | (version "1.0.0") | |
6434 | (source (origin | |
6435 | (method url-fetch) | |
6436 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6437 | "org.osgi.dto/" version "/org.osgi.dto-" | |
6438 | version "-sources.jar")) | |
6439 | (sha256 | |
6440 | (base32 | |
6441 | "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr")))) | |
6442 | (build-system ant-build-system) | |
6443 | (arguments | |
6444 | `(#:jar-name "osgi-dto.jar" | |
6445 | #:tests? #f)); no tests | |
6446 | (inputs | |
6447 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 6448 | (home-page "https://www.osgi.org") |
999b5fb4 JL |
6449 | (synopsis "Data Transfer Objects") |
6450 | (description | |
6451 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6452 | and service platform for the Java programming language. This package contains | |
6453 | the Data Transfer Objects. It is easily serializable having only public fields | |
6454 | of primitive types and their wrapper classes, Strings, and DTOs. List, Set, | |
6455 | Map and array aggregates may also be used. The aggregates must only hold | |
6456 | objects of the listed types or aggregates.") | |
6457 | (license license:asl2.0))) | |
c304ce6a JL |
6458 | |
6459 | (define-public java-osgi-resource | |
6460 | (package | |
6461 | (name "java-osgi-resource") | |
6462 | (version "1.0.0") | |
6463 | (source (origin | |
6464 | (method url-fetch) | |
6465 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6466 | "org.osgi.resource/" | |
6467 | version "/org.osgi.resource-" | |
6468 | version "-sources.jar")) | |
6469 | (sha256 | |
6470 | (base32 | |
6471 | "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d")))) | |
6472 | (build-system ant-build-system) | |
6473 | (arguments | |
6474 | `(#:jar-name "osgi-resource.jar" | |
6475 | #:tests? #f)); no tests | |
6476 | (inputs | |
6477 | `(("annotation" ,java-osgi-annotation) | |
6478 | ("dto" ,java-osgi-dto))) | |
c353d014 | 6479 | (home-page "https://www.osgi.org") |
c304ce6a JL |
6480 | (synopsis "OSGI Resource") |
6481 | (description | |
6482 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6483 | and service platform for the Java programming language. This package contains | |
6484 | the definition of common types in osgi packages.") | |
6485 | (license license:asl2.0))) | |
c2b14516 JL |
6486 | |
6487 | (define-public java-osgi-namespace-contract | |
6488 | (package | |
6489 | (name "java-osgi-namespace-contract") | |
6490 | (version "1.0.0") | |
6491 | (source (origin | |
6492 | (method url-fetch) | |
6493 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6494 | "org.osgi.namespace.contract/" | |
6495 | version "/org.osgi.namespace.contract-" | |
6496 | version "-sources.jar")) | |
6497 | (sha256 | |
6498 | (base32 | |
6499 | "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36")))) | |
6500 | (build-system ant-build-system) | |
6501 | (inputs | |
6502 | `(("resource" ,java-osgi-resource) | |
6503 | ("annotation" ,java-osgi-annotation))) | |
6504 | (arguments | |
6505 | `(#:jar-name "osgi-namespace-contract.jar" | |
6506 | #:tests? #f)); no tests | |
c353d014 | 6507 | (home-page "https://www.osgi.org") |
c2b14516 JL |
6508 | (synopsis "Contract Capability and Requirement Namespace") |
6509 | (description | |
6510 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6511 | and service platform for the Java programming language. This package contains | |
6512 | the names for the attributes and directives for a namespace with contracts.") | |
6513 | (license license:asl2.0))) | |
f809c963 JL |
6514 | |
6515 | (define-public java-osgi-namespace-extender | |
6516 | (package | |
6517 | (name "java-osgi-namespace-extender") | |
6518 | (version "1.0.1") | |
6519 | (source (origin | |
6520 | (method url-fetch) | |
6521 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6522 | "org.osgi.namespace.extender/" | |
6523 | version "/org.osgi.namespace.extender-" | |
6524 | version "-sources.jar")) | |
6525 | (sha256 | |
6526 | (base32 | |
6527 | "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz")))) | |
6528 | (build-system ant-build-system) | |
6529 | (inputs | |
6530 | `(("resource" ,java-osgi-resource) | |
6531 | ("annotation" ,java-osgi-annotation))) | |
6532 | (arguments | |
6533 | `(#:jar-name "osgi-namespace-extendent.jar" | |
6534 | #:tests? #f)); no tests | |
c353d014 | 6535 | (home-page "https://www.osgi.org") |
f809c963 JL |
6536 | (synopsis "Extender Capability and Requirement Namespace") |
6537 | (description | |
6538 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6539 | and service platform for the Java programming language. This package contains | |
b784962d JL |
6540 | the names for the attributes and directives for an extender namespace.") |
6541 | (license license:asl2.0))) | |
6542 | ||
6543 | (define-public java-osgi-namespace-service | |
6544 | (package | |
6545 | (name "java-osgi-namespace-service") | |
6546 | (version "1.0.0") | |
6547 | (source (origin | |
6548 | (method url-fetch) | |
6549 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6550 | "org.osgi.namespace.service/" | |
6551 | version "/org.osgi.namespace.service-" | |
6552 | version "-sources.jar")) | |
6553 | (sha256 | |
6554 | (base32 | |
6555 | "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8")))) | |
6556 | (build-system ant-build-system) | |
6557 | (inputs | |
6558 | `(("resource" ,java-osgi-resource) | |
6559 | ("annotation" ,java-osgi-annotation))) | |
6560 | (arguments | |
6561 | `(#:jar-name "osgi-namespace-service.jar" | |
6562 | #:tests? #f)); no tests | |
c353d014 | 6563 | (home-page "https://www.osgi.org") |
b784962d JL |
6564 | (synopsis "Service Capability and Requirement Namespace") |
6565 | (description | |
6566 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6567 | and service platform for the Java programming language. This package contains | |
6568 | the names for the attributes and directives for a service namespace.") | |
f809c963 | 6569 | (license license:asl2.0))) |
0f0c5218 JL |
6570 | |
6571 | (define-public java-osgi-util-function | |
6572 | (package | |
6573 | (name "java-osgi-util-function") | |
6574 | (version "1.0.0") | |
6575 | (source (origin | |
6576 | (method url-fetch) | |
6577 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6578 | "org.osgi.util.function/" | |
6579 | version "/org.osgi.util.function-" | |
6580 | version "-sources.jar")) | |
6581 | (sha256 | |
6582 | (base32 | |
6583 | "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x")))) | |
6584 | (build-system ant-build-system) | |
6585 | (arguments | |
6586 | `(#:jar-name "osgi-util-function.jar" | |
6587 | #:tests? #f)); no tests | |
6588 | (inputs | |
6589 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 6590 | (home-page "https://www.osgi.org") |
0f0c5218 JL |
6591 | (synopsis "OSGI Util Function") |
6592 | (description | |
6593 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6594 | and service platform for the Java programming language. This package contains | |
6595 | an interface for a function that accepts a single argument and produces a result.") | |
6596 | (license license:asl2.0))) | |
27103135 JL |
6597 | |
6598 | (define-public java-osgi-util-promise | |
6599 | (package | |
6600 | (name "java-osgi-util-promise") | |
6601 | (version "1.0.0") | |
6602 | (source (origin | |
6603 | (method url-fetch) | |
6604 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6605 | "org.osgi.util.promise/" | |
6606 | version "/org.osgi.util.promise-" | |
6607 | version "-sources.jar")) | |
6608 | (sha256 | |
6609 | (base32 | |
6610 | "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c")))) | |
6611 | (build-system ant-build-system) | |
6612 | (arguments | |
6613 | `(#:jar-name "osgi-util-promise.jar" | |
6614 | #:tests? #f)); no tests | |
6615 | (inputs | |
6616 | `(("annotation" ,java-osgi-annotation) | |
6617 | ("function" ,java-osgi-util-function))) | |
c353d014 | 6618 | (home-page "https://www.osgi.org") |
27103135 JL |
6619 | (synopsis "Promise of a value") |
6620 | (description | |
6621 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6622 | and service platform for the Java programming language. This package contains | |
6623 | an interface and utilitary classes for promises. A Promise represents a future | |
6624 | value. It handles the interactions for asynchronous processing.") | |
6625 | (license license:asl2.0))) | |
2b1fdb2b JL |
6626 | |
6627 | (define-public java-osgi-service-metatype-annotations | |
6628 | (package | |
6629 | (name "java-osgi-service-metatype-annotations") | |
6630 | (version "1.3.0") | |
6631 | (source (origin | |
6632 | (method url-fetch) | |
6633 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6634 | "org.osgi.service.metatype.annotations/" | |
6635 | version "/org.osgi.service.metatype.annotations-" | |
6636 | version "-sources.jar")) | |
6637 | (sha256 | |
6638 | (base32 | |
6639 | "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6")))) | |
6640 | (build-system ant-build-system) | |
6641 | (arguments | |
6642 | `(#:jar-name "osgi-service-metatype-annotations.jar" | |
6643 | #:tests? #f)); no tests | |
6644 | (inputs | |
6645 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 6646 | (home-page "https://www.osgi.org") |
2b1fdb2b JL |
6647 | (synopsis "Support annotations for metatype") |
6648 | (description | |
6649 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6650 | and service platform for the Java programming language. This package contains | |
6651 | the support annotations for metatype.") | |
6652 | (license license:asl2.0))) | |
a13acfbe JL |
6653 | |
6654 | (define-public java-osgi-service-repository | |
6655 | (package | |
6656 | (name "java-osgi-service-repository") | |
6657 | (version "1.1.0") | |
6658 | (source (origin | |
6659 | (method url-fetch) | |
6660 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6661 | "org.osgi.service.repository/" | |
6662 | version "/org.osgi.service.repository-" | |
6663 | version "-sources.jar")) | |
6664 | (sha256 | |
6665 | (base32 | |
6666 | "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n")))) | |
6667 | (build-system ant-build-system) | |
6668 | (arguments | |
6669 | `(#:jar-name "osgi-service-repository.jar" | |
6670 | #:tests? #f)); no tests | |
6671 | (inputs | |
6672 | `(("annotation" ,java-osgi-annotation) | |
6673 | ("promise" ,java-osgi-util-promise) | |
6674 | ("resource" ,java-osgi-resource))) | |
c353d014 | 6675 | (home-page "https://www.osgi.org") |
a13acfbe JL |
6676 | (synopsis "OSGI service repository") |
6677 | (description | |
6678 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6679 | and service platform for the Java programming language. This package contains | |
6680 | a repository service that contains resources.") | |
6681 | (license license:asl2.0))) | |
dfd91541 JL |
6682 | |
6683 | (define-public java-osgi-framework | |
6684 | (package | |
6685 | (name "java-osgi-framework") | |
6686 | (version "1.8.0") | |
6687 | (source (origin | |
6688 | (method url-fetch) | |
6689 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6690 | "org.osgi.framework/" version "/org.osgi.framework-" | |
6691 | version "-sources.jar")) | |
6692 | (sha256 | |
6693 | (base32 | |
6694 | "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s")))) | |
6695 | (build-system ant-build-system) | |
6696 | (arguments | |
6697 | `(#:jar-name "osgi-framework.jar" | |
6698 | #:tests? #f)); no tests | |
6699 | (inputs | |
6700 | `(("annotation" ,java-osgi-annotation) | |
6701 | ("resource" ,java-osgi-resource) | |
6702 | ("dto" ,java-osgi-dto))) | |
c353d014 | 6703 | (home-page "https://www.osgi.org") |
dfd91541 JL |
6704 | (synopsis "OSGi framework") |
6705 | (description | |
6706 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6707 | and service platform for the Java programming language.") | |
6708 | (license license:asl2.0))) | |
98c9f16c JL |
6709 | |
6710 | (define-public java-osgi-service-log | |
6711 | (package | |
6712 | (name "java-osgi-service-log") | |
6713 | (version "1.3.0") | |
6714 | (source (origin | |
6715 | (method url-fetch) | |
6716 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6717 | "org.osgi.service.log/" | |
6718 | version "/org.osgi.service.log-" | |
6719 | version "-sources.jar")) | |
6720 | (sha256 | |
6721 | (base32 | |
6722 | "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0")))) | |
6723 | (build-system ant-build-system) | |
6724 | (arguments | |
6725 | `(#:jar-name "osgi-service-log.jar" | |
6726 | #:tests? #f)); no tests | |
6727 | (inputs | |
6728 | `(("java-osgi-framework" ,java-osgi-framework))) | |
c353d014 | 6729 | (home-page "https://www.osgi.org") |
98c9f16c JL |
6730 | (synopsis "Provides methods for bundles to write messages to the log") |
6731 | (description | |
6732 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6733 | and service platform for the Java programming language. This package contains | |
6734 | the log service.") | |
6735 | (license license:asl2.0))) | |
dd76d44b JL |
6736 | |
6737 | (define-public java-osgi-service-jdbc | |
6738 | (package | |
6739 | (name "java-osgi-service-jdbc") | |
6740 | (version "1.0.0") | |
6741 | (source (origin | |
6742 | (method url-fetch) | |
6743 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6744 | "org.osgi.service.jdbc/" | |
6745 | version "/org.osgi.service.jdbc-" | |
6746 | version "-sources.jar")) | |
6747 | (sha256 | |
6748 | (base32 | |
6749 | "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz")))) | |
6750 | (build-system ant-build-system) | |
6751 | (arguments | |
6752 | `(#:jar-name "osgi-service-jdbc.jar" | |
6753 | #:tests? #f)); no tests | |
c353d014 | 6754 | (home-page "https://www.osgi.org") |
dd76d44b JL |
6755 | (synopsis "Factory for JDBC connection factories") |
6756 | (description | |
6757 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6758 | and service platform for the Java programming language. This package contains | |
6759 | a factory for JDBC connection factories. There are 3 preferred connection | |
6760 | factories for getting JDBC connections: | |
6761 | ||
6762 | @itemize | |
6763 | @item @code{javax.sql.DataSource}; | |
6764 | @item @code{javax.sql.ConnectionPoolDataSource}; | |
6765 | @item @code{javax.sql.XADataSource}. | |
6766 | @end itemize") | |
6767 | (license license:asl2.0))) | |
291d3f22 JL |
6768 | |
6769 | (define-public java-osgi-service-resolver | |
6770 | (package | |
6771 | (name "java-osgi-service-resolver") | |
6772 | (version "1.0.1") | |
6773 | (source (origin | |
6774 | (method url-fetch) | |
6775 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6776 | "org.osgi.service.resolver/" | |
6777 | version "/org.osgi.service.resolver-" | |
6778 | version "-sources.jar")) | |
6779 | (sha256 | |
6780 | (base32 | |
6781 | "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd")))) | |
6782 | (build-system ant-build-system) | |
6783 | (arguments | |
6784 | `(#:jar-name "osgi-service-resolver.jar" | |
6785 | #:tests? #f)); no tests | |
6786 | (inputs | |
6787 | `(("annotation" ,java-osgi-annotation) | |
6788 | ("resource" ,java-osgi-resource))) | |
c353d014 | 6789 | (home-page "https://www.osgi.org") |
291d3f22 JL |
6790 | (synopsis "OSGI Resolver service") |
6791 | (description | |
6792 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6793 | and service platform for the Java programming language. This package contains | |
6794 | a resolver service that resolves the specified resources in the context supplied | |
6795 | by the caller.") | |
6796 | (license license:asl2.0))) | |
1884bb81 JL |
6797 | |
6798 | (define-public java-osgi-util-tracker | |
6799 | (package | |
6800 | (name "java-osgi-util-tracker") | |
6801 | (version "1.5.1") | |
6802 | (source (origin | |
6803 | (method url-fetch) | |
6804 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6805 | "org.osgi.util.tracker/" | |
6806 | version "/org.osgi.util.tracker-" | |
6807 | version "-sources.jar")) | |
6808 | (sha256 | |
6809 | (base32 | |
6810 | "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz")))) | |
6811 | (build-system ant-build-system) | |
6812 | (arguments | |
6813 | `(#:jar-name "osgi-util-tracker.jar" | |
6814 | #:tests? #f)); no tests | |
6815 | (inputs | |
6816 | `(("framework" ,java-osgi-framework) | |
6817 | ("annotation" ,java-osgi-annotation))) | |
c353d014 | 6818 | (home-page "https://www.osgi.org") |
1884bb81 JL |
6819 | (synopsis "Bundle tracking") |
6820 | (description | |
6821 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6822 | and service platform for the Java programming language. This package contains | |
6823 | bundle tracking utility classes.") | |
6824 | (license license:asl2.0))) | |
fb9c48b8 JL |
6825 | |
6826 | (define-public java-osgi-service-cm | |
6827 | (package | |
6828 | (name "java-osgi-service-cm") | |
6829 | (version "1.5.0") | |
6830 | (source (origin | |
6831 | (method url-fetch) | |
6832 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6833 | "org.osgi.service.cm/" | |
6834 | version "/org.osgi.service.cm-" | |
6835 | version "-sources.jar")) | |
6836 | (sha256 | |
6837 | (base32 | |
6838 | "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6")))) | |
6839 | (build-system ant-build-system) | |
6840 | (arguments | |
6841 | `(#:jar-name "osgi-service-cm.jar" | |
6842 | #:tests? #f)); no tests | |
6843 | (inputs | |
6844 | `(("framework" ,java-osgi-framework) | |
6845 | ("annotation" ,java-osgi-annotation))) | |
c353d014 | 6846 | (home-page "https://www.osgi.org") |
fb9c48b8 JL |
6847 | (synopsis "OSGI Configuration Management") |
6848 | (description | |
6849 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6850 | and service platform for the Java programming language. This package contains | |
6851 | utility classes for the configuration of services.") | |
6852 | (license license:asl2.0))) | |
500aac75 JL |
6853 | |
6854 | (define-public java-osgi-service-packageadmin | |
6855 | (package | |
6856 | (name "java-osgi-service-packageadmin") | |
6857 | (version "1.2.0") | |
6858 | (source (origin | |
6859 | (method url-fetch) | |
6860 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6861 | "org.osgi.service.packageadmin/" | |
6862 | version "/org.osgi.service.packageadmin-" | |
6863 | version "-sources.jar")) | |
6864 | (sha256 | |
6865 | (base32 | |
6866 | "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52")))) | |
6867 | (build-system ant-build-system) | |
6868 | (arguments | |
6869 | `(#:jar-name "osgi-service-packageadmin.jar" | |
6870 | #:tests? #f)); no tests | |
6871 | (inputs | |
6872 | `(("framework" ,java-osgi-framework))) | |
c353d014 | 6873 | (home-page "https://www.osgi.org") |
500aac75 JL |
6874 | (synopsis "OSGI Package Administration") |
6875 | (description | |
6876 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6877 | and service platform for the Java programming language. This package contains | |
6878 | the packageadmin service.") | |
6879 | (license license:asl2.0))) | |
77a4f1ae JL |
6880 | |
6881 | (define-public java-ops4j-base-lang | |
6882 | (package | |
6883 | (name "java-ops4j-base-lang") | |
6884 | (version "1.5.0") | |
6885 | (source (origin | |
6886 | (method url-fetch) | |
6887 | (uri (string-append "https://github.com/ops4j/org.ops4j.base/" | |
6888 | "archive/base-" version ".tar.gz")) | |
6889 | (sha256 | |
6890 | (base32 | |
6891 | "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw")))) | |
6892 | (build-system ant-build-system) | |
6893 | (arguments | |
6894 | `(#:jar-name "java-ops4j-base-lang.jar" | |
6895 | #:source-dir "ops4j-base-lang/src/main/java" | |
6896 | #:tests? #f; no tests | |
6897 | #:phases | |
6898 | (modify-phases %standard-phases | |
6899 | (add-before 'build 'add-test-file | |
6900 | (lambda _ | |
6901 | ;; That file is required by a test in ops4j-pax-exam-core-spi | |
6902 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang") | |
6903 | (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties" | |
6904 | (lambda _ | |
6905 | (display | |
6906 | (string-append | |
6907 | "version=" ,version "\n" | |
6908 | "groupId=org.ops4j.base" | |
6909 | "artifactId=ops4j-base-lang\n"))))))))) | |
6910 | (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview") | |
6911 | (synopsis "Utility classes and extensions to be used in OPS4J projects") | |
6912 | (description "OPS4J stands for Open Participation Software for Java. This | |
6913 | package contains utilities and extensions related to @code{java.lang}.") | |
6914 | (license license:asl2.0))) | |
b2353495 JL |
6915 | |
6916 | (define-public java-ops4j-base-monitors | |
6917 | (package | |
6918 | (inherit java-ops4j-base-lang) | |
6919 | (name "java-ops4j-base-monitors") | |
6920 | (arguments | |
6921 | `(#:jar-name "java-ops4j-base-monitors.jar" | |
6922 | #:source-dir "ops4j-base-monitors/src/main/java" | |
6923 | #:tests? #f)); no tests | |
6924 | (inputs | |
6925 | `(("lang" ,java-ops4j-base-lang))) | |
6926 | (description "OPS4J stands for Open Participation Software for Java. This | |
6927 | package contains utilities and extensions related to monitoring."))) | |
322d349a JL |
6928 | |
6929 | (define-public java-ops4j-base-io | |
6930 | (package | |
6931 | (inherit java-ops4j-base-lang) | |
6932 | (name "java-ops4j-base-io") | |
6933 | (arguments | |
6934 | `(#:jar-name "java-ops4j-base-io.jar" | |
6935 | #:source-dir "ops4j-base-io/src/main/java" | |
6936 | #:test-dir "ops4j-base-io/src/test" | |
6937 | #:test-exclude | |
6938 | (list "**/ListerTest.java"))) | |
6939 | (inputs | |
6940 | `(("lang" ,java-ops4j-base-monitors) | |
6941 | ("lang" ,java-ops4j-base-lang))) | |
6942 | (native-inputs | |
6943 | `(("junit" ,java-junit) | |
6944 | ("hamcrest" ,java-hamcrest-core))) | |
6945 | (description "OPS4J stands for Open Participation Software for Java. This | |
6946 | package contains utilities and extensions related to handling streams and files."))) | |
559919c1 JL |
6947 | |
6948 | (define-public java-ops4j-base-util | |
6949 | (package | |
6950 | (inherit java-ops4j-base-lang) | |
6951 | (name "java-ops4j-base-util") | |
6952 | (arguments | |
6953 | `(#:jar-name "java-ops4j-base-util.jar" | |
6954 | #:source-dir "ops4j-base-util/src/main/java" | |
6955 | #:test-dir "ops4j-base-util/src/test")) | |
6956 | (inputs | |
6957 | `(("lang" ,java-ops4j-base-lang))) | |
6958 | (native-inputs | |
6959 | `(("junit" ,java-junit))) | |
6960 | (description "OPS4J stands for Open Participation Software for Java. This | |
6961 | package contains utilities and extensions related to environment, i18n and | |
6962 | mime types."))) | |
60dcec7a JL |
6963 | |
6964 | (define-public java-ops4j-base-util-property | |
6965 | (package | |
6966 | (inherit java-ops4j-base-lang) | |
6967 | (name "java-ops4j-base-util-property") | |
6968 | (arguments | |
6969 | `(#:jar-name "java-ops4j-base-util-property.jar" | |
6970 | #:source-dir "ops4j-base-util-property/src/main/java" | |
6971 | #:tests? #f)); no tests | |
6972 | (inputs | |
6973 | `(("lang" ,java-ops4j-base-lang) | |
6974 | ("util" ,java-ops4j-base-util))) | |
6975 | (description "OPS4J stands for Open Participation Software for Java. This | |
6976 | package contains utilities and extensions related to resolving properties from | |
6977 | different sources."))) | |
0edf8cf0 JL |
6978 | |
6979 | (define-public java-ops4j-base-store | |
6980 | (package | |
6981 | (inherit java-ops4j-base-lang) | |
6982 | (name "java-ops4j-base-store") | |
6983 | (arguments | |
6984 | `(#:jar-name "java-ops4j-base-store.jar" | |
6985 | #:source-dir "ops4j-base-store/src/main/java" | |
6986 | #:tests? #f)); no tests | |
6987 | (inputs | |
6988 | `(("lang" ,java-ops4j-base-lang) | |
6989 | ("slf4j" ,java-slf4j-api) | |
6990 | ("io" ,java-ops4j-base-io))) | |
6991 | (description "OPS4J stands for Open Participation Software for Java. This | |
6992 | package contains utilities for storing and retrieving data from an | |
6993 | @code{InputStream}."))) | |
214fcd8a JL |
6994 | |
6995 | (define-public java-ops4j-base-spi | |
6996 | (package | |
6997 | (inherit java-ops4j-base-lang) | |
6998 | (name "java-ops4j-base-spi") | |
6999 | (arguments | |
7000 | `(#:jar-name "java-ops4j-base-spi.jar" | |
7001 | #:source-dir "ops4j-base-spi/src/main/java" | |
7002 | #:test-dir "ops4j-base-spi/src/test")) | |
7003 | (native-inputs | |
7004 | `(("junit" ,java-junit) | |
7005 | ("hamcrest" ,java-hamcrest-core))) | |
7006 | (description "OPS4J stands for Open Participation Software for Java. This | |
7007 | package contains utilities for obtaining services via the Java SE 6 | |
7008 | @code{ServiceLoader}."))) | |
e1edf42e JL |
7009 | |
7010 | (define-public java-aqute-bnd-annotation | |
7011 | (package | |
7012 | (name "java-aqute-bnd-annotation") | |
2cac8891 | 7013 | (version "3.5.0") |
e1edf42e JL |
7014 | (source (origin |
7015 | (method url-fetch) | |
7016 | (uri (string-append "https://github.com/bndtools/bnd/archive/" | |
7017 | version ".REL.tar.gz")) | |
7018 | (file-name (string-append name "-" version ".tar.gz")) | |
7019 | (sha256 | |
7020 | (base32 | |
2cac8891 | 7021 | "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl")))) |
e1edf42e JL |
7022 | (build-system ant-build-system) |
7023 | (arguments | |
7024 | `(#:jar-name "java-aqute-bnd-annotation.jar" | |
7025 | #:source-dir "biz.aQute.bnd.annotation/src" | |
7026 | #:tests? #f)); empty test dir | |
7027 | (home-page "http://bnd.bndtools.org/") | |
7028 | (synopsis "Tools for OSGi") | |
7029 | (description "Bnd is a swiss army knife for OSGi, it creates manifest | |
7030 | headers based on analyzing the class code, it verifies the project settings, | |
7031 | it manages project dependencies, gives diffs jars, and much more.") | |
7032 | (license license:asl2.0))) | |
60ba2978 JL |
7033 | |
7034 | (define-public java-aqute-libg | |
7035 | (package | |
7036 | (inherit java-aqute-bnd-annotation) | |
7037 | (name "java-aqute-libg") | |
7038 | (arguments | |
7039 | `(#:jar-name "java-aqute-libg.jar" | |
78754995 GB |
7040 | ;; The build fails when source/target more recent than 1.7. This |
7041 | ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327 | |
7042 | ;; | |
7043 | ;; It is closed as won't fix. There is no way to change the source | |
7044 | ;; so that it works on 1.8, and still works on 1.6, the upstream | |
7045 | ;; target. It work fine on 1.7, so we use 1.7. | |
7046 | #:make-flags (list "-Dant.build.javac.source=1.7" | |
7047 | "-Dant.build.javac.target=1.7") | |
2ab089b7 GB |
7048 | #:phases |
7049 | (modify-phases %standard-phases | |
7050 | (add-before 'configure 'chdir | |
7051 | ;; Change to aQute.libg directory, so that the relative | |
7052 | ;; paths in the tests aren't broken. | |
7053 | (lambda _ | |
7054 | (chdir "aQute.libg") | |
7055 | #t)) | |
7056 | (add-before 'check 'create-test-directory | |
7057 | ;; Copy the test directory to test/java, since that's where | |
7058 | ;; ant-build-system's default project in build.xml expects to find | |
7059 | ;; the test classes. Leave a copy in the original place to not | |
7060 | ;; break paths in tests. | |
7061 | (lambda _ | |
7062 | (mkdir "src/test") | |
7063 | (copy-recursively "test" "src/test/java") | |
7064 | #t))))) | |
60ba2978 JL |
7065 | (inputs |
7066 | `(("slf4j" ,java-slf4j-api) | |
7067 | ("osgi-annot" ,java-osgi-annotation) | |
7068 | ("java-osgi-cmpn" ,java-osgi-cmpn) | |
2ab089b7 GB |
7069 | ("osgi" ,java-osgi-core))) |
7070 | (native-inputs | |
7071 | `(("hamcrest" ,java-hamcrest-core) | |
7072 | ("java-junit" ,java-junit))))) | |
5f26a131 | 7073 | |
288a5959 GB |
7074 | (define java-aqute-libg-bootstrap |
7075 | (package | |
7076 | (inherit java-aqute-libg) | |
7077 | (name "java-aqute-libg-bootstrap") | |
aca7dcdd GB |
7078 | (arguments |
7079 | ;; Disable tests, at this stage of bootstrap we have no test frameworks. | |
3785ccd2 GB |
7080 | (substitute-keyword-arguments (package-arguments java-aqute-libg) |
7081 | ((#:tests? _ #f) #f))) | |
288a5959 GB |
7082 | (inputs |
7083 | `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap) | |
7084 | ,@(delete `("slf4j" ,java-slf4j-api) | |
aca7dcdd GB |
7085 | (package-inputs java-aqute-libg)))) |
7086 | (native-inputs '()))) | |
288a5959 | 7087 | |
5f26a131 JL |
7088 | (define-public java-aqute-bndlib |
7089 | (package | |
7090 | (inherit java-aqute-bnd-annotation) | |
7091 | (name "java-aqute-bndlib") | |
7092 | (arguments | |
7093 | `(#:jar-name "java-bndlib.jar" | |
7094 | #:source-dir "biz.aQute.bndlib/src" | |
7095 | #:tests? #f)); no tests | |
7096 | (inputs | |
7097 | `(("slf4j" ,java-slf4j-api) | |
7098 | ("osgi-annot" ,java-osgi-annotation) | |
7099 | ("java-aqute-libg" ,java-aqute-libg) | |
7100 | ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation) | |
7101 | ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations) | |
7102 | ("java-osgi-service-repository" ,java-osgi-service-repository) | |
7103 | ("java-osgi-service-log" ,java-osgi-service-log) | |
7104 | ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations) | |
7105 | ("java-osgi-namespace-contract" ,java-osgi-namespace-contract) | |
7106 | ("java-osgi-namespace-extender" ,java-osgi-namespace-extender) | |
7107 | ("java-osgi-namespace-service" ,java-osgi-namespace-service) | |
7108 | ("promise" ,java-osgi-util-promise) | |
7109 | ("osgi" ,java-osgi-core))))) | |
25aef81d | 7110 | |
869803aa GB |
7111 | (define java-aqute-bndlib-bootstrap |
7112 | (package | |
7113 | (inherit java-aqute-bndlib) | |
7114 | (name "java-aqute-bndlib-bootstrap") | |
7115 | (inputs | |
7116 | `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap) | |
7117 | ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap) | |
7118 | ,@(delete `("slf4j" ,java-slf4j-api) | |
7119 | (delete `("java-aqute-libg" ,java-aqute-libg) | |
7120 | (package-inputs java-aqute-bndlib))))))) | |
7121 | ||
25aef81d JL |
7122 | (define-public java-ops4j-pax-tinybundles |
7123 | (package | |
7124 | (name "java-ops4j-pax-tinybundles") | |
7125 | (version "2.1.1") | |
7126 | (source (origin | |
7127 | (method url-fetch) | |
7128 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/" | |
7129 | "archive/tinybundles-" version ".tar.gz")) | |
7130 | (sha256 | |
7131 | (base32 | |
7132 | "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871")))) | |
7133 | (arguments | |
7134 | `(#:jar-name "java-ops4j-pax-tinybundles.jar" | |
7135 | #:source-dir "src/main/java" | |
7136 | #:test-exclude | |
7137 | ;; Abstract base classes for other tests | |
7138 | (list "**/BndTest.java" "**/CoreTest.java") | |
7139 | #:phases | |
7140 | (modify-phases %standard-phases | |
7141 | (add-before 'check 'fix-version | |
7142 | (lambda _ | |
7143 | ;; This test has a reference to an old version of bndlib we are not | |
7144 | ;; packaging. It uses the version referenced in pom.xml. We replace | |
7145 | ;; it with our own version. | |
7146 | (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java" | |
0f277802 GB |
7147 | (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*") |
7148 | ,(package-version java-aqute-bndlib)))))))) | |
25aef81d JL |
7149 | (inputs |
7150 | `(("lang" ,java-ops4j-base-lang) | |
7151 | ("io" ,java-ops4j-base-io) | |
7152 | ("store" ,java-ops4j-base-store) | |
7153 | ("slf4j" ,java-slf4j-api) | |
7154 | ("libg" ,java-aqute-libg) | |
7155 | ("bndlib" ,java-aqute-bndlib))) | |
7156 | (native-inputs | |
7157 | `(("junit" ,java-junit) | |
7158 | ("hamcrest" ,java-hamcrest-core) | |
7159 | ("log4j" ,java-log4j-api) | |
7160 | ("bndannotation" ,java-aqute-bnd-annotation) | |
7161 | ("framework" ,java-osgi-framework))) | |
7162 | (build-system ant-build-system) | |
7163 | (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles") | |
7164 | (synopsis "Java APIs to create OSGi related artifacts") | |
7165 | (description "Tinybundles is all about creating OSGi related artifacts like | |
7166 | Bundles, Fragments and Deployment Packages with Java Api. It is very convinient | |
7167 | to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the | |
7168 | other hand, this library can be a foundation of real end user tools that need | |
7169 | to create those artifacts.") | |
7170 | (license license:asl2.0))) | |
e179add0 JL |
7171 | |
7172 | (define-public java-ops4j-pax-exam-core | |
7173 | (package | |
7174 | (name "java-ops4j-pax-exam-core") | |
7175 | (version "4.11.0") | |
7176 | (source (origin | |
7177 | (method url-fetch) | |
7178 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/" | |
7179 | "archive/exam-reactor-" version ".tar.gz")) | |
7180 | (sha256 | |
7181 | (base32 | |
7182 | "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g")))) | |
7183 | (arguments | |
7184 | `(#:jar-name "java-ops4j-pax-exam-core.jar" | |
7185 | #:source-dir "core/pax-exam/src/main/java" | |
7186 | #:test-dir "core/pax-exam/src/test")) | |
7187 | (inputs | |
7188 | `(("slf4j" ,java-slf4j-api) | |
7189 | ("lang" ,java-ops4j-base-lang) | |
7190 | ("io" ,java-ops4j-base-io) | |
7191 | ("util-property" ,java-ops4j-base-util-property) | |
7192 | ("util-store" ,java-ops4j-base-store) | |
7193 | ("java-osgi-core" ,java-osgi-core))) | |
7194 | (native-inputs | |
7195 | `(("junit" ,java-junit) | |
7196 | ("hamcrest" ,java-hamcrest-core))) | |
7197 | (build-system ant-build-system) | |
7198 | (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview") | |
7199 | (synopsis "In-Container Testing for OSGi, Java EE and CDI") | |
7200 | (description "Pax Exam creates OSGi bundles for testing purposes. It lets | |
7201 | the user take control of the OSGi framework, the test framework (e.g. JUnit) and | |
7202 | the system under test at the same time.") | |
7203 | (license license:asl2.0))) | |
7a7c2b75 JL |
7204 | |
7205 | (define-public java-ops4j-pax-exam-core-spi | |
7206 | (package | |
7207 | (inherit java-ops4j-pax-exam-core) | |
7208 | (name "java-ops4j-pax-exam-core-spi") | |
7209 | (arguments | |
7210 | `(#:jar-name "java-ops4j-pax-exam-spi.jar" | |
7211 | #:source-dir "src/main/java" | |
7212 | #:test-exclude | |
7213 | (list | |
7214 | ;; Abstract base class, not a test | |
7215 | "**/BaseStagedReactorTest.java" | |
7216 | ;; Depends on org.mortbay.jetty.testwars:test-war-dump | |
7217 | "**/WarBuilderTest.java") | |
7218 | #:phases | |
7219 | (modify-phases %standard-phases | |
7220 | (add-before 'configure 'chdir | |
7221 | (lambda _ | |
7222 | ;; Tests assume we are in this directory | |
7223 | (chdir "core/pax-exam-spi"))) | |
7224 | (add-before 'check 'fix-tests | |
7225 | (lambda _ | |
7226 | ;; One test checks that this file is present. | |
7227 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi") | |
7228 | (with-output-to-file | |
7229 | "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties" | |
7230 | (lambda _ | |
7231 | (display | |
7232 | (string-append "artifactId = pax-exam-spi\n" | |
7233 | "version = " ,(package-version java-ops4j-pax-exam-core-spi))))) | |
7234 | ;; Maven puts compilation results in the target directory, while we | |
7235 | ;; put them in the build directory. | |
7236 | (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java" | |
7237 | "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java" | |
7238 | "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java") | |
7239 | (("target") "build")) | |
7240 | ;; One test is expected to fail, but it doesn't throw the expected exception | |
7241 | (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java" | |
7242 | (("AssertionError") "IllegalArgumentException"))))))) | |
7243 | (inputs | |
7244 | `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core) | |
7245 | ("lang" ,java-ops4j-base-lang) | |
7246 | ("monitors" ,java-ops4j-base-monitors) | |
7247 | ("store" ,java-ops4j-base-store) | |
7248 | ("io" ,java-ops4j-base-io) | |
7249 | ("spi" ,java-ops4j-base-spi) | |
7250 | ("osgi" ,java-osgi-core) | |
7251 | ("slf4j" ,java-slf4j-api) | |
7252 | ("tinybundles" ,java-ops4j-pax-tinybundles))) | |
7253 | (native-inputs | |
7254 | `(("mockito" ,java-mockito-1) | |
7255 | ("junit" ,java-junit) | |
7256 | ("hamcrest" ,java-hamcrest-core) | |
7257 | ("cglib" ,java-cglib) | |
7258 | ("objenesis" ,java-objenesis) | |
7259 | ("asm" ,java-asm))))) | |
4496d77f JL |
7260 | |
7261 | (define-public java-ops4j-pax-exam-core-junit | |
7262 | (package | |
7263 | (inherit java-ops4j-pax-exam-core) | |
7264 | (name "java-ops4j-pax-exam-core-junit") | |
7265 | (arguments | |
7266 | `(#:jar-name "ops4j-pax-exam-core-junit.jar" | |
7267 | #:source-dir "drivers/pax-exam-junit4/src/main/java" | |
7268 | #:tests? #f)); no tests | |
7269 | (inputs | |
7270 | `(("junit" ,java-junit) | |
7271 | ("slf4j" ,java-slf4j-api) | |
7272 | ("core" ,java-ops4j-pax-exam-core) | |
7273 | ("spi" ,java-ops4j-pax-exam-core-spi))) | |
7274 | (native-inputs '()))) | |
cb05f60d JL |
7275 | |
7276 | (define-public java-fasterxml-jackson-annotations | |
7277 | (package | |
7278 | (name "java-fasterxml-jackson-annotations") | |
93dceea4 | 7279 | (version "2.9.4") |
cb05f60d JL |
7280 | (source (origin |
7281 | (method url-fetch) | |
7282 | (uri (string-append "https://github.com/FasterXML/" | |
7283 | "jackson-annotations/archive/" | |
7284 | "jackson-annotations-" version ".tar.gz")) | |
7285 | (sha256 | |
7286 | (base32 | |
93dceea4 | 7287 | "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4")))) |
cb05f60d JL |
7288 | (build-system ant-build-system) |
7289 | (arguments | |
7290 | `(#:jar-name "jackson-annotations.jar" | |
7291 | #:source-dir "src/main/java" | |
7292 | #:test-dir "src/test")) | |
7293 | (native-inputs | |
7294 | `(("junit" ,java-junit))) | |
7295 | (home-page "https://github.com/FasterXML/jackson-annotations") | |
7296 | (synopsis "General purpose annotations for the Jackson Data Processor") | |
7297 | (description "This package contains general purpose annotations for the | |
7298 | Jackson Data Processor, used on value and handler types. The only annotations | |
7299 | not included are ones that require dependency to the Databind package.") | |
7300 | (license license:asl2.0))) | |
0b5481df JL |
7301 | |
7302 | (define-public java-fasterxml-jackson-core | |
7303 | (package | |
7304 | (name "java-fasterxml-jackson-core") | |
38a0fc38 | 7305 | (version "2.9.4") |
0b5481df JL |
7306 | (source (origin |
7307 | (method url-fetch) | |
7308 | (uri (string-append "https://github.com/FasterXML/" | |
7309 | "jackson-core/archive/" | |
7310 | "jackson-core-" version ".tar.gz")) | |
7311 | (sha256 | |
7312 | (base32 | |
38a0fc38 | 7313 | "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd")))) |
0b5481df JL |
7314 | (build-system ant-build-system) |
7315 | (arguments | |
7316 | `(#:jar-name "jackson-core.jar" | |
7317 | #:source-dir "src/main/java" | |
7318 | #:test-dir "src/test" | |
7319 | #:test-exclude | |
7320 | (list | |
7321 | ;; Expected failure. pom.xml excludes these | |
7322 | "**/failing/**" | |
7323 | ;; Base classes that have no constructor for junit | |
7324 | "**/BaseTest.java" | |
7325 | "**/ConcurrencyReadTest.java" | |
7326 | "**/ManualCharAccessTest.java" | |
7327 | "**/ManualCharAccessTest.java" | |
7328 | "**/TrailingCommasTest.java" | |
7329 | "**/AsyncMissingValuesInObjectTest.java" | |
7330 | "**/AsyncMissingValuesInArrayTest.java") | |
7331 | #:phases | |
7332 | (modify-phases %standard-phases | |
7333 | (add-before 'configure 'generate-PackageVersion.java | |
7334 | (lambda _ | |
7335 | (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java") | |
7336 | (in (string-append out ".in"))) | |
7337 | (copy-file in out) | |
7338 | (substitute* out | |
7339 | (("@package@") "com.fasterxml.jackson.core.json") | |
7340 | (("@projectversion@") ,version) | |
7341 | (("@projectgroupid@") "com.fasterxml.jackson.core") | |
7342 | (("@projectartifactid@") "jackson-core"))))) | |
7343 | (add-before 'build 'copy-resources | |
7344 | (lambda _ | |
7345 | (copy-recursively "src/main/resources" | |
7346 | "build/classes"))) | |
7347 | (add-before 'check 'copy-test-resources | |
7348 | (lambda _ | |
7349 | (copy-recursively "src/test/resources" | |
7350 | "build/test-classes")))))) | |
7351 | (native-inputs | |
7352 | `(("junit" ,java-junit) | |
7353 | ("hamcrest" ,java-hamcrest-core))) | |
7354 | (home-page "https://github.com/FasterXML/jackson-core") | |
7355 | (synopsis "") | |
7356 | (description "") | |
7357 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
f234c7a0 JL |
7358 | |
7359 | (define-public java-fasterxml-jackson-databind | |
7360 | (package | |
7361 | (name "java-fasterxml-jackson-databind") | |
3c1edff5 | 7362 | (version "2.9.4") |
f234c7a0 JL |
7363 | (source (origin |
7364 | (method url-fetch) | |
7365 | (uri (string-append "https://github.com/FasterXML/" | |
7366 | "jackson-databind/archive/" | |
7367 | "jackson-databind-" version ".tar.gz")) | |
7368 | (sha256 | |
7369 | (base32 | |
3c1edff5 | 7370 | "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08")))) |
f234c7a0 JL |
7371 | (build-system ant-build-system) |
7372 | (arguments | |
7373 | `(#:jar-name "jackson-databind.jar" | |
7374 | #:source-dir "src/main/java" | |
7375 | #:tests? #f; requires javax.measures for which I can't find a free implementation | |
7376 | #:phases | |
7377 | (modify-phases %standard-phases | |
7378 | (add-before 'configure 'generate-PackageVersion.java | |
7379 | (lambda _ | |
7380 | (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java") | |
7381 | (in (string-append out ".in"))) | |
7382 | (copy-file in out) | |
7383 | (substitute* out | |
7384 | (("@package@") "com.fasterxml.jackson.databind.cfg") | |
7385 | (("@projectversion@") ,version) | |
7386 | (("@projectgroupid@") "com.fasterxml.jackson.databind") | |
7387 | (("@projectartifactid@") "jackson-databind"))))) | |
7388 | (add-before 'build 'copy-resources | |
7389 | (lambda _ | |
7390 | (copy-recursively "src/main/resources" "build/classes")))))) | |
7391 | (inputs | |
7392 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
7393 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core))) | |
7394 | (home-page "https://github.com/FasterXML/jackson-databind") | |
7395 | (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor") | |
7396 | (description "This package contains the general-purpose data-binding | |
7397 | functionality and tree-model for Jackson Data Processor. It builds on core | |
7398 | streaming parser/generator package, and uses Jackson Annotations for | |
7399 | configuration.") | |
7400 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
d57d8b89 JL |
7401 | |
7402 | (define-public java-fasterxml-jackson-modules-base-jaxb | |
7403 | (package | |
7404 | (name "java-fasterxml-jackson-modules-base-jaxb") | |
07207211 | 7405 | (version "2.9.4") |
d57d8b89 JL |
7406 | (source (origin |
7407 | (method url-fetch) | |
7408 | (uri (string-append "https://github.com/FasterXML/" | |
7409 | "jackson-modules-base/archive/" | |
7410 | "jackson-modules-base-" version ".tar.gz")) | |
7411 | (sha256 | |
7412 | (base32 | |
07207211 | 7413 | "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5")))) |
d57d8b89 JL |
7414 | (build-system ant-build-system) |
7415 | (arguments | |
7416 | `(#:jar-name "jackson-modules-base-jaxb.jar" | |
7417 | #:source-dir "jaxb/src/main/java" | |
7418 | #:test-dir "jaxb/src/test" | |
7419 | #:test-exclude | |
7420 | ;; Base class for tests | |
7421 | (list "**/BaseJaxbTest.java") | |
7422 | #:phases | |
7423 | (modify-phases %standard-phases | |
7424 | (add-before 'configure 'generate-PackageVersion.java | |
7425 | (lambda _ | |
7426 | (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/" | |
7427 | "jackson/module/jaxb/PackageVersion.java")) | |
7428 | (in (string-append out ".in"))) | |
7429 | (copy-file in out) | |
7430 | (substitute* out | |
7431 | (("@package@") "com.fasterxml.jackson.module.jaxb") | |
7432 | (("@projectversion@") ,version) | |
7433 | (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb") | |
7434 | (("@projectartifactid@") "jackson-module-jaxb"))))) | |
7435 | (add-before 'build 'copy-resources | |
7436 | (lambda _ | |
7437 | (copy-recursively "jaxb/src/main/resources" "build/classes")))))) | |
7438 | (inputs | |
7439 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
7440 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
7441 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind))) | |
7442 | (native-inputs | |
7443 | `(("java-junit" ,java-junit))) | |
7444 | (home-page "https://github.com/FasterXML/jackson-modules-base") | |
7445 | (synopsis "Jaxb annotations jackson module") | |
7446 | (description "This package is the jaxb annotations module for jackson.") | |
7447 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
0f296d37 JL |
7448 | |
7449 | (define-public java-snakeyaml | |
7450 | (package | |
7451 | (name "java-snakeyaml") | |
7452 | (version "1.18") | |
7453 | (source (origin | |
7454 | (method url-fetch) | |
7455 | (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v" | |
7456 | version ".tar.gz")) | |
307856cd | 7457 | (file-name (string-append name "-" version ".tar.gz")) |
0f296d37 JL |
7458 | (sha256 |
7459 | (base32 | |
7460 | "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg")))) | |
7461 | (build-system ant-build-system) | |
7462 | (arguments | |
7463 | `(#:jar-name "java-snakeyaml.jar" | |
7464 | #:source-dir "src/main/java" | |
7465 | ;; Tests require velocity, a cyclic dependency, and | |
7466 | ;; java-spring-framework-context which is not packaged. | |
7467 | #:tests? #f)) | |
7468 | (home-page "https://bitbucket.org/asomov/snakeyaml") | |
7469 | (synopsis "YAML processor") | |
7470 | (description "SnakeYAML is a YAML processor for the Java Virtual Machine.") | |
7471 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
087c8fd2 JL |
7472 | |
7473 | (define-public java-fasterxml-jackson-dataformat-yaml | |
7474 | (package | |
7475 | (name "java-fasterxml-jackson-dataformat-yaml") | |
1f2be88f | 7476 | (version "2.9.4") |
087c8fd2 JL |
7477 | (source (origin |
7478 | (method url-fetch) | |
7479 | (uri (string-append "https://github.com/FasterXML/" | |
7480 | "jackson-dataformats-text/archive/" | |
7481 | "jackson-dataformats-text-" version ".tar.gz")) | |
7482 | (sha256 | |
7483 | (base32 | |
1f2be88f | 7484 | "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7")))) |
087c8fd2 JL |
7485 | (build-system ant-build-system) |
7486 | (arguments | |
7487 | `(#:jar-name "jackson-dataformat-yaml.jar" | |
7488 | #:source-dir "yaml/src/main/java" | |
7489 | #:test-dir "yaml/src/test" | |
7490 | #:test-exclude (list "**/failing/**.java") | |
7491 | #:phases | |
7492 | (modify-phases %standard-phases | |
7493 | (add-before 'configure 'generate-PackageVersion.java | |
7494 | (lambda _ | |
7495 | (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java") | |
7496 | (in (string-append out ".in"))) | |
7497 | (copy-file in out) | |
7498 | (substitute* out | |
7499 | (("@package@") "com.fasterxml.jackson.dataformat.yaml") | |
7500 | (("@projectversion@") ,version) | |
7501 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml") | |
7502 | (("@projectartifactid@") "jackson-dataformat-yaml")))))))) | |
7503 | (inputs | |
7504 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
7505 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
7506 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) | |
7507 | ("java-snakeyaml" ,java-snakeyaml))) | |
7508 | (native-inputs | |
7509 | `(("junit" ,java-junit) | |
7510 | ("hamcrest" ,java-hamcrest-core) | |
7511 | ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi) | |
7512 | ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit) | |
7513 | ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core))) | |
7514 | (home-page "https://github.com/FasterXML/jackson-dataformats-text") | |
7515 | (synopsis "Yaml backend for Jackson") | |
7516 | (description "Dataformat backends are used to support format alternatives | |
7517 | to JSON, supported by default. This is done by sub-classing Jackson core | |
7518 | abstractions.") | |
7519 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
6fd07b98 JL |
7520 | |
7521 | (define-public java-stax2-api | |
7522 | (package | |
7523 | (name "java-stax2-api") | |
7524 | (version "4.0.0") | |
7525 | (source (origin | |
7526 | (method url-fetch) | |
7527 | (uri (string-append "https://github.com/FasterXML/stax2-api/archive/" | |
7528 | "stax2-api-" version ".tar.gz")) | |
7529 | (sha256 | |
7530 | (base32 | |
7531 | "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq")))) | |
7532 | (build-system ant-build-system) | |
7533 | (arguments | |
7534 | `(#:jar-name "java-stax2-api.jar" | |
7535 | #:source-dir "src/main/java" | |
7536 | #:tests? #f)); no tests | |
7537 | (home-page "https://github.com/FasterXML/stax2-api") | |
7538 | (synopsis "Stax2 API") | |
7539 | (description "Stax2 API is an extension to basic Stax 1.0 API that adds | |
7540 | significant new functionalities, such as full-featured bi-direction validation | |
7541 | interface and high-performance Typed Access API.") | |
7542 | (license license:bsd-2))) | |
40f193f3 JL |
7543 | |
7544 | (define-public java-woodstox-core | |
7545 | (package | |
7546 | (name "java-woodstox-core") | |
7547 | (version "5.0.3") | |
7548 | (source (origin | |
7549 | (method url-fetch) | |
7550 | (uri (string-append "https://github.com/FasterXML/woodstox/archive/" | |
7551 | "woodstox-core-" version ".tar.gz")) | |
7552 | (sha256 | |
7553 | (base32 | |
7554 | "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4")))) | |
7555 | (build-system ant-build-system) | |
7556 | (arguments | |
7557 | `(#:jar-name "woodstox.jar" | |
7558 | #:test-exclude | |
7559 | (list "**/Base*.java" "failing/**") | |
7560 | #:phases | |
7561 | (modify-phases %standard-phases | |
7562 | (add-before 'build 'remove-msv-dep | |
7563 | (lambda _ | |
7564 | ;; we don't need osgi, and it depends on msv | |
7565 | (delete-file-recursively "src/main/java/com/ctc/wstx/osgi") | |
7566 | ;; msv's latest release is from 2011 and we don't need it | |
7567 | (delete-file-recursively "src/main/java/com/ctc/wstx/msv") | |
7568 | (delete-file-recursively "src/test/java/wstxtest/osgi") | |
7569 | (delete-file-recursively "src/test/java/wstxtest/msv"))) | |
7570 | (add-before 'build 'copy-resources | |
7571 | (lambda _ | |
7572 | (copy-recursively "src/main/resources" "build/classes")))))) | |
7573 | (inputs | |
7574 | `(("stax2" ,java-stax2-api))) | |
7575 | (native-inputs | |
7576 | `(("junit" ,java-junit))) | |
7577 | (home-page "https://github.com/FasterXML/woodstox") | |
7578 | (synopsis "Stax XML API implementation") | |
7579 | (description "Woodstox is a stax XML API implementation.") | |
7580 | (license license:asl2.0))) | |
262a4d33 JL |
7581 | |
7582 | (define-public java-fasterxml-jackson-dataformat-xml | |
7583 | (package | |
7584 | (name "java-fasterxml-jackson-dataformat-xml") | |
f3bbe029 | 7585 | (version "2.9.4") |
262a4d33 JL |
7586 | (source (origin |
7587 | (method url-fetch) | |
7588 | (uri (string-append "https://github.com/FasterXML/" | |
7589 | "jackson-dataformat-xml/archive/" | |
7590 | "jackson-dataformat-xml-" version ".tar.gz")) | |
7591 | (sha256 | |
7592 | (base32 | |
f3bbe029 | 7593 | "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq")))) |
262a4d33 JL |
7594 | (build-system ant-build-system) |
7595 | (arguments | |
7596 | `(#:jar-name "jackson-dataformat-xml.jar" | |
7597 | #:source-dir "src/main/java" | |
7598 | #:test-exclude | |
7599 | (list "**/failing/**") | |
7600 | #:phases | |
7601 | (modify-phases %standard-phases | |
7602 | (add-before 'configure 'generate-PackageVersion.java | |
7603 | (lambda _ | |
7604 | (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java") | |
7605 | (in (string-append out ".in"))) | |
7606 | (copy-file in out) | |
7607 | (newline) | |
7608 | (substitute* out | |
7609 | (("@package@") "com.fasterxml.jackson.dataformat.xml") | |
7610 | (("@projectversion@") ,version) | |
7611 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml") | |
7612 | (("@projectartifactid@") "jackson-dataformat-xml"))))) | |
7613 | (add-before 'build 'copy-resources | |
7614 | (lambda _ | |
7615 | (copy-recursively "src/main/resources" "build/classes")))))) | |
7616 | (inputs | |
7617 | `(("jackson-annotations" ,java-fasterxml-jackson-annotations) | |
7618 | ("jackson-core" ,java-fasterxml-jackson-core) | |
7619 | ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb) | |
7620 | ("jackson-databind" ,java-fasterxml-jackson-databind) | |
7621 | ("stax2-api" ,java-stax2-api) | |
7622 | ("woodstox" ,java-woodstox-core))) | |
7623 | (native-inputs | |
7624 | `(("junit" ,java-junit) | |
7625 | ("hamcrest" ,java-hamcrest-core))) | |
7626 | (home-page "https://github.com/FasterXML/jackson-dataformat-xml") | |
7627 | (synopsis "Read and write XML") | |
7628 | (description "This package contains Jackson extension component for reading | |
7629 | and writing XML encoded data. | |
7630 | ||
7631 | Further, the goal is to emulate how JAXB data-binding works with \"Code-first\" | |
7632 | approach (that is, no support is added for \"Schema-first\" approach). Support | |
7633 | for JAXB annotations is provided by JAXB annotation module; this module | |
7634 | provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator}, | |
7635 | @code{JsonFactory}) as well as small number of higher level overrides needed to | |
7636 | make data-binding work.") | |
7637 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
90a127c7 JL |
7638 | |
7639 | (define-public java-hdrhistogram | |
7640 | (package | |
7641 | (name "java-hdrhistogram") | |
7642 | (version "2.1.9") | |
7643 | (source (origin | |
7644 | (method url-fetch) | |
7645 | (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/" | |
7646 | "archive/HdrHistogram-" version ".tar.gz")) | |
7647 | (sha256 | |
7648 | (base32 | |
7649 | "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv")))) | |
7650 | (build-system ant-build-system) | |
7651 | (arguments | |
7652 | `(#:jar-name "java-hdrhistogram.jar" | |
7653 | #:source-dir "src/main/java" | |
7654 | #:phases | |
7655 | (modify-phases %standard-phases | |
7656 | (add-before 'configure 'set-version | |
7657 | (lambda _ | |
7658 | (let* ((version-java "src/main/java/org/HdrHistogram/Version.java") | |
7659 | (template (string-append version-java ".template"))) | |
7660 | (copy-file template version-java) | |
7661 | (substitute* version-java | |
7662 | (("\\$VERSION\\$") ,version) | |
7663 | (("\\$BUILD_TIME\\$") "0")) | |
7664 | #t)))))) | |
7665 | (native-inputs | |
7666 | `(("junit" ,java-junit) | |
7667 | ("hamcrest" ,java-hamcrest-core))) | |
7668 | (home-page "https://hdrhistogram.github.io/HdrHistogram") | |
7669 | (synopsis "High dynamic range histogram") | |
7670 | (description "Hdrhistogram allows to create histograms that support | |
7671 | recording and analyzing sampled data value counts across a configurable integer | |
7672 | value range with configurable value precision within the range. Value precision | |
7673 | is expressed as the number of significant digits in the value recording, and | |
7674 | provides control over value quantization behavior across the value range and | |
7675 | the subsequent value resolution at any given level.") | |
7676 | (license license:public-domain))) | |
5d104a27 | 7677 | |
c5ff11dc RW |
7678 | (define-public java-cofoja |
7679 | (package | |
7680 | (name "java-cofoja") | |
7681 | (version "1.3") | |
7682 | (source (origin | |
7683 | (method git-fetch) | |
7684 | (uri (git-reference | |
7685 | (url "https://github.com/nhatminhle/cofoja.git") | |
7686 | (commit (string-append "v" version)))) | |
7687 | (file-name (string-append "java-cofoja-" version "-checkout")) | |
7688 | (sha256 | |
7689 | (base32 | |
7690 | "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w")))) | |
7691 | (build-system ant-build-system) | |
7692 | (arguments | |
7693 | `(#:build-target "dist" | |
7694 | #:test-target "test" | |
7695 | #:jdk ,icedtea-8 | |
7696 | #:make-flags | |
7697 | (list "-Ddist.dir=dist") | |
7698 | #:modules ((guix build ant-build-system) | |
7699 | (guix build java-utils) | |
7700 | (guix build utils) | |
7701 | (srfi srfi-1) | |
7702 | (ice-9 match)) | |
7703 | #:phases | |
7704 | (modify-phases %standard-phases | |
7705 | ;; The bulid system ignores the class path the ant-build-system sets | |
7706 | ;; up and instead expects to find all dependencies in the "lib" | |
7707 | ;; directory. | |
7708 | (add-after 'unpack 'create-libdir | |
7709 | (lambda* (#:key inputs #:allow-other-keys) | |
7710 | (mkdir-p "lib") | |
7711 | (for-each | |
7712 | (lambda (file) | |
7713 | (let ((target (string-append "lib/" (basename file)))) | |
7714 | (unless (file-exists? target) | |
7715 | (symlink file target)))) | |
7716 | (append-map (match-lambda | |
7717 | ((label . dir) | |
7718 | (find-files dir "\\.jar$"))) | |
7719 | inputs)) | |
7720 | #t)) | |
7721 | (replace 'install (install-jars "dist"))))) | |
7722 | (inputs | |
7723 | `(("java-asm" ,java-asm))) | |
7724 | (native-inputs | |
7725 | `(("java-junit" ,java-junit))) | |
7726 | (home-page "https://github.com/nhatminhle/cofoja") | |
7727 | (synopsis "Contracts for Java") | |
7728 | (description "Contracts for Java, or Cofoja for short, is a contract | |
7729 | programming framework and test tool for Java, which uses annotation processing | |
7730 | and bytecode instrumentation to provide run-time checking. (In particular, | |
7731 | this is not a static analysis tool.)") | |
7732 | (license license:lgpl3+))) | |
7733 | ||
5d104a27 JL |
7734 | (define-public java-aopalliance |
7735 | (package | |
7736 | (name "java-aopalliance") | |
7737 | (version "1.0") | |
7738 | (source (origin | |
7739 | (method git-fetch) | |
7740 | ;; Note: this git repository is not official, but contains the | |
7741 | ;; source code that is in the CVS repository. Downloading the | |
7742 | ;; tarball from sourceforge is undeterministic, and the cvs download | |
7743 | ;; fails. | |
7744 | (uri (git-reference | |
7745 | (url "https://github.com/hoverruan/aopalliance") | |
7746 | (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0"))) | |
7747 | (file-name (string-append name "-" version)) | |
7748 | (sha256 | |
7749 | (base32 | |
7750 | "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr")))) | |
7751 | (build-system ant-build-system) | |
7752 | (arguments | |
7753 | `(#:jar-name "java-aopalliance.jar" | |
7754 | #:jdk ,icedtea-8 | |
7755 | #:tests? #f; no tests | |
7756 | #:source-dir "aopalliance/src/main")) | |
7757 | (home-page "http://aopalliance.sourceforge.net") | |
7758 | (synopsis "Aspect-Oriented Programming") | |
7759 | (description "The AOP Alliance project is a joint project between several | |
7760 | software engineering people who are interested in Aspect-Oriented Programming | |
7761 | (AOP) and Java.") | |
7762 | (license license:public-domain))) | |
454536e0 JL |
7763 | |
7764 | (define-public java-javax-inject | |
7765 | (package | |
7766 | (name "java-javax-inject") | |
7767 | (version "tck-1") | |
7768 | (source (origin | |
7769 | (method url-fetch) | |
7770 | (uri (string-append "https://github.com/javax-inject/javax-inject/" | |
7771 | "archive/javax.inject-" version ".tar.gz")) | |
7772 | (sha256 | |
7773 | (base32 | |
7774 | "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0")))) | |
7775 | (build-system ant-build-system) | |
7776 | (arguments | |
7777 | `(#:jar-name "java-javax-inject.jar" | |
7778 | #:jdk ,icedtea-8 | |
7779 | #:tests? #f)); no tests | |
7780 | (home-page "http://github.com/javax-inject/javax-inject") | |
7781 | (synopsis "JSR-330: Dependency Injection for Java") | |
7782 | (description "This package specifies a means for obtaining objects in such | |
7783 | a way as to maximize reusability, testability and maintainability compared to | |
7784 | traditional approaches such as constructors, factories, and service locators | |
7785 | (e.g., JNDI). This process, known as dependency injection, is beneficial to | |
7786 | most nontrivial applications. | |
7787 | ||
7788 | Many types depend on other types. For example, a @var{Stopwatch} might depend | |
7789 | on a @var{TimeSource}. The types on which a type depends are known as its | |
7790 | dependencies. The process of finding an instance of a dependency to use at run | |
7791 | time is known as resolving the dependency. If no such instance can be found, | |
7792 | the dependency is said to be unsatisfied, and the application is broken.") | |
7793 | (license license:asl2.0))) | |
5766984b JL |
7794 | |
7795 | (define-public java-guice | |
7796 | (package | |
7797 | (name "java-guice") | |
7798 | (version "4.1") | |
7799 | (source (origin | |
7800 | (method url-fetch) | |
7801 | (uri (string-append "https://github.com/google/guice/archive/" | |
7802 | version ".tar.gz")) | |
7803 | (file-name (string-append name "-" version ".tar.gz")) | |
7804 | (sha256 | |
7805 | (base32 | |
7806 | "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp")))) | |
7807 | (build-system ant-build-system) | |
7808 | (arguments | |
7809 | `(#:jar-name "java-guice.jar" | |
7810 | #:jdk ,icedtea-8 | |
7811 | #:tests? #f; FIXME: tests are not in a java sub directory | |
7812 | #:source-dir "core/src")) | |
7813 | (inputs | |
7814 | `(("guava" ,java-guava) | |
7815 | ("java-cglib" ,java-cglib) | |
7816 | ("java-aopalliance" ,java-aopalliance) | |
7817 | ("java-javax-inject" ,java-javax-inject) | |
7818 | ("java-asm" ,java-asm))) | |
7819 | (home-page "https://github.com/google/guice") | |
7820 | (synopsis "Lightweight dependency injection framework") | |
7821 | (description "Guice is a lightweight dependency injection framework fo | |
7822 | Java 6 and above.") | |
7823 | (license license:asl2.0))) | |
ec4e8ad7 JL |
7824 | |
7825 | (define-public java-guice-servlet | |
7826 | (package | |
7827 | (inherit java-guice) | |
7828 | (name "java-guice-servlet") | |
7829 | (arguments | |
7830 | `(#:jar-name "guice-servlet.jar" | |
7831 | #:source-dir "extensions/servlet/src/" | |
7832 | #:jdk ,icedtea-8 | |
7833 | #:tests? #f)); FIXME: not in a java subdir | |
7834 | (inputs | |
7835 | `(("guice" ,java-guice) | |
7836 | ("servlet" ,java-tomcat) | |
7837 | ,@(package-inputs java-guice))))) | |
b12fe1e5 JL |
7838 | |
7839 | (define-public java-assertj | |
7840 | (package | |
7841 | (name "java-assertj") | |
7842 | (version "3.8.0") | |
7843 | (source (origin | |
7844 | (method url-fetch) | |
7845 | (uri (string-append "https://github.com/joel-costigliola/" | |
7846 | "assertj-core/archive/" | |
7847 | "assertj-core-" version ".tar.gz")) | |
7848 | (sha256 | |
7849 | (base32 | |
7850 | "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz")))) | |
7851 | (build-system ant-build-system) | |
7852 | (arguments | |
7853 | `(#:jar-name "java-assertj.jar" | |
7854 | #:jdk ,icedtea-8 | |
7855 | #:source-dir "src/main/java" | |
7856 | #:tests? #f)); depends on tng-junit which depends on assertj | |
7857 | (inputs | |
7858 | `(("cglib" ,java-cglib) | |
7859 | ("junit" ,java-junit) | |
7860 | ("hamcrest" ,java-hamcrest-core))) | |
7861 | (native-inputs | |
7862 | `(("mockito" ,java-mockito-1))) | |
7863 | (home-page "https://joel-costigliola.github.io/assertj/index.html") | |
7864 | (synopsis "Fluent assertions for java") | |
7865 | (description "AssertJ core is a Java library that provides a fluent | |
7866 | interface for writing assertions. Its main goal is to improve test code | |
7867 | readability and make maintenance of tests easier.") | |
7868 | (license license:asl2.0))) | |
6768e0a7 JL |
7869 | |
7870 | (define-public java-jboss-javassist | |
7871 | (package | |
7872 | (name "java-jboss-javassist") | |
7873 | (version "3.21.0") | |
7874 | (source (origin | |
7875 | (method url-fetch) | |
7876 | (uri (string-append "https://github.com/jboss-javassist/javassist/" | |
7877 | "archive/rel_" | |
7878 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) | |
7879 | "_ga.tar.gz")) | |
7880 | (sha256 | |
7881 | (base32 | |
7882 | "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf")))) | |
7883 | (build-system ant-build-system) | |
7884 | (arguments | |
7885 | `(#:jar-name "java-jboss-javassist.jar" | |
7886 | #:jdk ,icedtea-8 | |
7887 | #:source-dir "src/main" | |
7888 | #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3 | |
7889 | #:phases | |
7890 | (modify-phases %standard-phases | |
7891 | (add-before 'configure 'remove-binary | |
7892 | (lambda _ | |
7893 | (delete-file "javassist.jar") | |
7894 | #t))))) | |
7895 | (native-inputs | |
7896 | `(("junit" ,java-junit))) | |
7897 | (home-page "https://github.com/jboss-javassist/javassist") | |
7898 | (synopsis "Java bytecode engineering toolkit") | |
7899 | (description "Javassist (JAVA programming ASSISTant) makes Java bytecode | |
7900 | manipulation simple. It is a class library for editing bytecodes in Java; it | |
7901 | enables Java programs to define a new class at runtime and to modify a class | |
7902 | file when the JVM loads it.") | |
7903 | (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl. | |
a6dd06d0 JL |
7904 | |
7905 | (define-public java-jcommander | |
7906 | (package | |
7907 | (name "java-jcommander") | |
7908 | (version "1.71") | |
7909 | (source (origin | |
7910 | (method url-fetch) | |
7911 | (uri (string-append "https://github.com/cbeust/jcommander/archive/" | |
7912 | version ".tar.gz")) | |
7913 | (file-name (string-append name "-" version ".tar.gz")) | |
7914 | (sha256 | |
7915 | (base32 | |
7916 | "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx")))) | |
7917 | (build-system ant-build-system) | |
7918 | (arguments | |
7919 | `(#:jar-name "java-jcommander.jar" | |
7920 | #:jdk ,icedtea-8 | |
7921 | #:tests? #f; requires testng which depends on jcommander | |
7922 | #:source-dir "src/main/java")) | |
7923 | (home-page "http://jcommander.org") | |
7924 | (synopsis "Command line parameters parser") | |
7925 | (description "JCommander is a very small Java framework that makes it | |
7926 | trivial to parse command line parameters. Parameters are declared with | |
7927 | annotations.") | |
7928 | (license license:asl2.0))) | |
11bc385b JL |
7929 | |
7930 | (define-public java-bsh | |
7931 | (package | |
7932 | (name "java-bsh") | |
7933 | (version "2.0b6") | |
7934 | (source (origin | |
7935 | (method url-fetch) | |
7936 | (uri (string-append "https://github.com/beanshell/beanshell/archive/" | |
7937 | version ".tar.gz")) | |
7938 | (file-name (string-append name "-" version ".tar.gz")) | |
7939 | (sha256 | |
7940 | (base32 | |
7941 | "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv")))) | |
7942 | (build-system ant-build-system) | |
7943 | (arguments | |
7944 | `(#:build-target "jarall" | |
7945 | #:test-target "junit-tests-all" | |
7946 | #:phases | |
7947 | (modify-phases %standard-phases | |
7948 | (replace 'install | |
7949 | (lambda* (#:key outputs #:allow-other-keys) | |
7950 | (let ((share (string-append (assoc-ref outputs "out") "/share/java"))) | |
7951 | (mkdir-p share) | |
7952 | (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar")) | |
7953 | #t)))))) | |
7954 | (home-page "http://beanshell.org/") | |
7955 | (synopsis "Lightweight Scripting for Java") | |
7956 | (description "BeanShell is a small, free, embeddable Java source | |
7957 | interpreter with object scripting language features, written in Java. | |
7958 | BeanShell dynamically executes standard Java syntax and extends it with common | |
7959 | scripting conveniences such as loose types, commands, and method closures like | |
7960 | those in Perl and JavaScript.") | |
7961 | (license license:asl2.0))) | |
7a343e97 JL |
7962 | |
7963 | (define-public java-fest-util | |
7964 | (package | |
7965 | (name "java-fest-util") | |
7966 | (version "1.2.5") | |
7967 | (source (origin | |
7968 | (method url-fetch) | |
7969 | (uri (string-append "https://github.com/alexruiz/fest-util/" | |
7970 | "archive/fest-util-" version ".tar.gz")) | |
7971 | (sha256 | |
7972 | (base32 | |
7973 | "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8")))) | |
7974 | (build-system ant-build-system) | |
7975 | (arguments | |
7976 | `(#:jar-name "java-fest-util.jar" | |
7977 | #:source-dir "src/main/java")) | |
7978 | (native-inputs | |
7979 | `(("junit" ,java-junit) | |
7980 | ("hamcrest" ,java-hamcrest-core))) | |
7981 | (home-page "https://github.com/alexruiz/fest-util") | |
7982 | (synopsis "FEST common utilities") | |
7983 | (description "Common utilities used in all FEST module.") | |
7984 | (license license:asl2.0))) | |
3c6c8358 JL |
7985 | |
7986 | (define-public java-fest-test | |
7987 | (package | |
7988 | (name "java-fest-test") | |
7989 | (version "2.1.0") | |
7990 | (source (origin | |
7991 | (method url-fetch) | |
7992 | (uri (string-append "https://github.com/alexruiz/fest-test/" | |
7993 | "archive/fest-test-" version ".tar.gz")) | |
7994 | (sha256 | |
7995 | (base32 | |
7996 | "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g")))) | |
7997 | (build-system ant-build-system) | |
7998 | (arguments | |
7999 | `(#:jar-name "java-fest-test.jar" | |
8000 | #:source-dir "src/main/java" | |
8001 | #:tests? #f)); no tests | |
8002 | (inputs | |
8003 | `(("junit" ,java-junit))) | |
8004 | (home-page "https://github.com/alexruiz/fest-test") | |
8005 | (synopsis "Common FEST testing infrastructure") | |
8006 | (description "Fest-test contains the common FEST testing infrastructure.") | |
8007 | (license license:asl2.0))) | |
ca98e448 JL |
8008 | |
8009 | (define-public java-fest-assert | |
8010 | (package | |
8011 | (name "java-fest-assert") | |
8012 | (version "2.0M10") | |
8013 | (source (origin | |
8014 | (method url-fetch) | |
8015 | (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/" | |
8016 | "archive/fest-assert-core-" version ".tar.gz")) | |
8017 | (sha256 | |
8018 | (base32 | |
8019 | "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw")))) | |
8020 | (build-system ant-build-system) | |
8021 | (arguments | |
8022 | `(#:jar-name "java-fest-assert.jar" | |
8023 | #:source-dir "src/main/java" | |
8024 | #:test-exclude | |
8025 | (list | |
8026 | "**/Abstract*.java" | |
8027 | "**/*BaseTest.java" | |
8028 | ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses | |
8029 | "**/MessageFormatter_format_Test.java" | |
8030 | "**/internal/*/*_assert*_Test.java"))) | |
8031 | (inputs | |
8032 | `(("java-fest-util" ,java-fest-util))) | |
8033 | (native-inputs | |
8034 | `(("java-junit" ,java-junit) | |
8035 | ("java-fest-test" ,java-fest-test) | |
8036 | ("java-hamcrest-core" ,java-hamcrest-core) | |
8037 | ("java-mockito" ,java-mockito-1) | |
8038 | ("java-cglib" ,java-cglib) | |
8039 | ("java-objenesis" ,java-objenesis) | |
8040 | ("java-asm" ,java-asm))) | |
8041 | (home-page "https://github.com/alexruiz/fest-assert-2.x") | |
8042 | (synopsis "FEST fluent assertions") | |
8043 | (description "FEST-Assert provides a fluent interface for assertions.") | |
8044 | (license license:asl2.0))) | |
0442d897 JL |
8045 | |
8046 | (define-public java-testng | |
8047 | (package | |
8048 | (name "java-testng") | |
3422e10e | 8049 | (version "6.14.3") |
0442d897 | 8050 | (source (origin |
36b39d16 RW |
8051 | (method git-fetch) |
8052 | (uri (git-reference | |
8053 | (url "https://github.com/cbeust/testng.git") | |
8054 | (commit version))) | |
8055 | (file-name (string-append name "-" version "-checkout")) | |
0442d897 JL |
8056 | (sha256 |
8057 | (base32 | |
3422e10e | 8058 | "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv")))) |
0442d897 JL |
8059 | (build-system ant-build-system) |
8060 | (arguments | |
8061 | `(#:jdk ,icedtea-8; java.util.function | |
8062 | #:jar-name "java-testng.jar" | |
8063 | #:source-dir "src/main/java" | |
8064 | #:phases | |
8065 | (modify-phases %standard-phases | |
36b39d16 RW |
8066 | ;; FIXME: I don't know why these tests fail |
8067 | (add-after 'unpack 'delete-failing-tests | |
8068 | (lambda _ | |
8069 | (substitute* "src/test/resources/testng.xml" | |
8070 | (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "") | |
8071 | (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "")) | |
8072 | #t)) | |
8073 | ;; We don't have groovy | |
8074 | (add-after 'unpack 'delete-groovy-tests | |
8075 | (lambda _ | |
8076 | (delete-file-recursively "src/test/java/test/dependent/issue1648/") | |
8077 | (substitute* "src/test/resources/testng.xml" | |
8078 | (("<class name=\"test.dependent.issue1648.TestRunner\"/>") "")) | |
8079 | #t)) | |
0442d897 JL |
8080 | (add-before 'build 'copy-resources |
8081 | (lambda _ | |
8082 | (copy-recursively "src/main/resources" "build/classes") | |
8083 | #t)) | |
8084 | (add-before 'check 'copy-test-resources | |
8085 | (lambda _ | |
8086 | (copy-recursively "src/test/resources" "build/test-classes") | |
8087 | #t)) | |
8088 | (replace 'check | |
8089 | (lambda _ | |
8090 | (system* "ant" "compile-tests") | |
8091 | ;; we don't have groovy | |
8092 | (substitute* "src/test/resources/testng.xml" | |
8093 | (("<class name=\"test.groovy.GroovyTest\" />") "")) | |
8094 | (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") | |
8095 | ":build/classes" | |
8096 | ":build/test-classes") | |
8097 | "-Dtest.resources.dir=src/test/resources" | |
8098 | "org.testng.TestNG" "src/test/resources/testng.xml"))))))) | |
8099 | (propagated-inputs | |
8100 | `(("junit" ,java-junit) | |
8101 | ("java-jsr305" ,java-jsr305) | |
8102 | ("java-bsh" ,java-bsh) | |
8103 | ("java-jcommander" ,java-jcommander) | |
8104 | ("java-guice" ,java-guice) | |
8105 | ("snakeyaml" ,java-snakeyaml))) | |
8106 | (native-inputs | |
8107 | `(("guava" ,java-guava) | |
8108 | ("java-javax-inject" ,java-javax-inject) | |
8109 | ("java-hamcrest" ,java-hamcrest-all) | |
8110 | ("java-assertj" ,java-assertj) | |
36b39d16 | 8111 | ("java-mockito" ,java-mockito-1) |
0442d897 JL |
8112 | ("cglib" ,java-cglib) |
8113 | ("asm" ,java-asm) | |
8114 | ("aopalliance" ,java-aopalliance))) | |
8115 | (home-page "http://testng.org") | |
8116 | (synopsis "Testing framework") | |
8117 | (description "TestNG is a testing framework inspired from JUnit and NUnit | |
8118 | but introducing some new functionalities that make it more powerful and easier | |
8119 | to use.") | |
8120 | (license license:asl2.0))) | |
1717a7de JL |
8121 | |
8122 | (define-public java-jnacl | |
3e87923a RW |
8123 | (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9") |
8124 | (revision "2")) | |
8125 | (package | |
8126 | (name "java-jnacl") | |
8127 | (version (string-append "0.1.0-" revision "." (string-take commit 7))) | |
8128 | (source (origin | |
8129 | (method git-fetch) | |
8130 | (uri (git-reference | |
8131 | (url "https://github.com/neilalexander/jnacl.git") | |
8132 | (commit commit))) | |
6c34ad73 | 8133 | (file-name (git-file-name name version)) |
3e87923a RW |
8134 | (sha256 |
8135 | (base32 | |
8136 | "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb")))) | |
8137 | (build-system ant-build-system) | |
8138 | (arguments | |
8c7d32e0 | 8139 | `(#:jar-name "jnacl.jar" |
3e87923a RW |
8140 | #:source-dir "src/main/java" |
8141 | #:jdk ,icedtea-8 | |
8142 | #:phases | |
8143 | (modify-phases %standard-phases | |
8144 | (add-before 'build 'fix-tests | |
8145 | (lambda _ | |
8146 | (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java" | |
8147 | "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java") | |
8148 | (("assertions.Assertions") "assertions.api.Assertions")) | |
8149 | #t)) | |
8150 | (replace 'check | |
8151 | (lambda _ | |
8152 | (invoke "ant" "compile-tests") | |
8153 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
8154 | ":build/classes" | |
8155 | ":build/test-classes") | |
8156 | "org.testng.TestNG" "-testclass" | |
8157 | "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class") | |
8158 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
8159 | ":build/classes" | |
8160 | ":build/test-classes") | |
8161 | "org.testng.TestNG" "-testclass" | |
8162 | "build/test-classes/com/neilalexander/jnacl/NaClTest.class") | |
8163 | #t))))) | |
8164 | (native-inputs | |
8165 | `(("java-testng" ,java-testng) | |
8166 | ("java-fest-util" ,java-fest-util) | |
8167 | ("java-fest-assert" ,java-fest-assert))) | |
8168 | (home-page "https://github.com/neilalexander/jnacl") | |
8169 | (synopsis "Java implementation of NaCl") | |
8170 | (description "Pure Java implementation of the NaCl: Networking and | |
1717a7de | 8171 | Cryptography library.") |
3e87923a | 8172 | (license license:bsd-2)))) |
eaf3cb7a JL |
8173 | |
8174 | (define-public java-mvel2 | |
8175 | (package | |
8176 | (name "java-mvel2") | |
8177 | (version "2.3.1") | |
8178 | (source (origin | |
8179 | (method url-fetch) | |
8180 | (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-" | |
8181 | version ".Final.tar.gz")) | |
8182 | (sha256 | |
8183 | (base32 | |
8184 | "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z")))) | |
8185 | (build-system ant-build-system) | |
8186 | (arguments | |
8187 | `(#:jar-name "mvel2.jar" | |
8188 | #:source-dir "src/main/java" | |
8189 | #:test-exclude | |
8190 | (list "**/Abstract*.java" | |
8191 | ;; Base class with no tests | |
8192 | "**/MVELThreadTest.java") | |
8193 | #:phases | |
8194 | (modify-phases %standard-phases | |
8195 | (add-after 'install 'install-bin | |
8196 | (lambda* (#:key outputs #:allow-other-keys) | |
8197 | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) | |
8198 | (mkdir-p bin) | |
8199 | (with-output-to-file (string-append bin "/mvel2") | |
8200 | (lambda _ | |
8201 | (display | |
8202 | (string-append | |
8203 | "#!" (which "bash") "\n" | |
8204 | "if [ \"$#\" -ne \"2\" ]; then\n" | |
8205 | "echo 'Usage: mvel2 <script> <out.dir>'\n" | |
8206 | "exit\n" | |
8207 | "fi\n" | |
8208 | "java -Dout.dir=$2 -cp " (getenv "CLASSPATH") | |
8209 | ":" (assoc-ref outputs "out") "/share/java/mvel2.jar" | |
8210 | " org.mvel2.sh.Main $1")))) | |
8211 | (chmod (string-append bin "/mvel2") #o755)) | |
8212 | #t))))) | |
8213 | (native-inputs | |
8214 | `(("junit" ,java-junit) | |
8215 | ("hamcrest" ,java-hamcrest-core))) | |
8216 | (home-page "https://github.com/mvel/mvel") | |
8217 | (synopsis "MVFLEX Expression Language") | |
8218 | (description "MVEL has largely been inspired by Java syntax, but has some | |
8219 | fundamental differences aimed at making it more efficient as an expression | |
8220 | language, such as operators that directly support collection, array and string | |
8221 | matching, as well as regular expressions. MVEL is used to evaluate expressions | |
8222 | written using Java syntax. | |
8223 | ||
8224 | In addition to the expression language, MVEL serves as a templating language for | |
8225 | configuration and string construction.") | |
8226 | (license license:asl2.0))) | |
d54d7d31 | 8227 | |
9e325e8c RW |
8228 | (define-public java-commons-jexl-2 |
8229 | (package | |
8230 | (name "java-commons-jexl") | |
8231 | (version "2.1.1") | |
8232 | (source (origin | |
8233 | (method url-fetch) | |
8234 | (uri (string-append "mirror://apache/commons/jexl/source/" | |
8235 | "commons-jexl-" version "-src.tar.gz")) | |
8236 | (sha256 | |
8237 | (base32 | |
8238 | "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz")))) | |
8239 | (build-system ant-build-system) | |
8240 | (arguments | |
8241 | `(#:jar-name "commons-jexl-2.jar" | |
8242 | #:jdk ,icedtea-8 | |
8243 | #:source-dir "src/main/java" | |
8244 | #:phases | |
8245 | (modify-phases %standard-phases | |
8246 | (add-before 'check 'disable-broken-tests | |
8247 | (lambda* (#:key inputs #:allow-other-keys) | |
8248 | (with-directory-excursion "src/test/java/org/apache/commons/jexl2/" | |
8249 | (substitute* "ArithmeticTest.java" | |
8250 | (("asserter.assertExpression\\(\"3 / 0\"") "//") | |
8251 | (("asserter.assertExpression\\(\"imanull") "//")) | |
8252 | ;; This test fails with "ambiguous method invocation" | |
8253 | (delete-file "CacheTest.java") | |
8254 | ;; This test doesn't have access to the temp directory | |
8255 | (substitute* "ClassCreatorTest.java" | |
8256 | (("java.io.tmpdir") "user.dir")) | |
8257 | ;; This test fails in trying to detect whether it can run. | |
8258 | (substitute* "ClassCreator.java" | |
8259 | (("boolean canRun =.*") "boolean canRun = false;\n")) | |
8260 | ;; ...and these tests depend on it. | |
8261 | (delete-file "scripting/JexlScriptEngineOptionalTest.java") | |
8262 | (delete-file "scripting/JexlScriptEngineTest.java")) | |
8263 | #t)) | |
8264 | (add-before 'build 'run-javacc | |
8265 | (lambda _ | |
8266 | (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/" | |
080d0b60 RW |
8267 | (invoke "java" "jjtree" "Parser.jjt") |
8268 | (invoke "java" "javacc" "Parser.jj")) | |
8269 | #t))))) | |
9e325e8c RW |
8270 | (inputs |
8271 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal))) | |
8272 | (native-inputs | |
8273 | `(("java-junit" ,java-junit) | |
8274 | ("java-hamcrest-core" ,java-hamcrest-core) | |
8275 | ("javacc" ,javacc-4))) | |
8276 | (home-page "https://commons.apache.org/proper/commons-jexl/") | |
8277 | (synopsis "Java Expression Language ") | |
8278 | (description "JEXL is a library intended to facilitate the implementation | |
8279 | of dynamic and scripting features in applications and frameworks written in | |
8280 | Java. JEXL implements an Expression Language based on some extensions to the | |
8281 | JSTL Expression Language supporting most of the constructs seen in | |
8282 | shell-script or ECMAScript. Its goal is to expose scripting features usable | |
8283 | by technical operatives or consultants working with enterprise platforms.") | |
8284 | (license license:asl2.0))) | |
8285 | ||
d54d7d31 JL |
8286 | (define-public java-lz4 |
8287 | (package | |
8288 | (name "java-lz4") | |
8289 | (version "1.4.0") | |
8290 | (source (origin | |
8291 | (method url-fetch) | |
8292 | (uri (string-append "https://github.com/lz4/lz4-java/archive/" | |
8293 | version ".tar.gz")) | |
8294 | (file-name (string-append name "-" version ".tar.gz")) | |
8295 | (sha256 | |
8296 | (base32 | |
8297 | "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54")))) | |
8298 | (build-system ant-build-system) | |
8299 | (arguments | |
8300 | `(#:jar-name "lz4.jar" | |
8301 | #:jdk ,icedtea-8 | |
8302 | #:source-dir "src/java:src/java-unsafe" | |
8303 | #:tests? #f; FIXME: requires more dependencies | |
8304 | #:phases | |
8305 | (modify-phases %standard-phases | |
8306 | (add-before 'configure 'generate-source | |
8307 | (lambda _ | |
8308 | (with-directory-excursion "src/build/source_templates" | |
1b6bc516 RW |
8309 | (invoke "mvel2" "../gen_sources.mvel" "../../java")) |
8310 | #t))))) | |
d54d7d31 JL |
8311 | (native-inputs |
8312 | `(("mvel" ,java-mvel2))) | |
8313 | (home-page "https://jpountz.github.io/lz4-java") | |
8314 | (synopsis "Compression algorithm") | |
8315 | (description "LZ4 - Java is a Java port of the popular lz4 compression | |
8316 | algorithms and xxHash hashing algorithm.") | |
8317 | (license license:asl2.0))) | |
62315865 | 8318 | |
50d70a72 | 8319 | (define-public java-bouncycastle |
62315865 | 8320 | (package |
50d70a72 JL |
8321 | (name "java-bouncycastle") |
8322 | (version "1.59") | |
62315865 JL |
8323 | (source (origin |
8324 | (method url-fetch) | |
50d70a72 JL |
8325 | (uri (string-append "https://github.com/bcgit/bc-java/archive/r" |
8326 | (substring version 0 1) "rv" | |
8327 | (substring version 2 4) ".tar.gz")) | |
62315865 JL |
8328 | (sha256 |
8329 | (base32 | |
50d70a72 JL |
8330 | "1bwl499whlbq896w18idqw2dkp8v0wp0npv9g71i5fgf8xjh0k3q")) |
8331 | (modules '((guix build utils))) | |
8332 | (snippet | |
8333 | '(begin | |
8334 | (for-each delete-file | |
8335 | (find-files "." "\\.jar$")) | |
8336 | #t)))) | |
62315865 JL |
8337 | (build-system ant-build-system) |
8338 | (arguments | |
50d70a72 | 8339 | `(#:jdk ,icedtea-8 |
0c68f7fd | 8340 | #:tests? #f |
62315865 JL |
8341 | #:phases |
8342 | (modify-phases %standard-phases | |
50d70a72 | 8343 | (replace 'build |
62315865 | 8344 | (lambda _ |
50d70a72 JL |
8345 | (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider") |
8346 | (invoke "ant" "-f" "ant/jdk15+.xml" "build") | |
8347 | #t)) | |
0c68f7fd RW |
8348 | ;; FIXME: the tests freeze. |
8349 | ;; (replace 'check | |
8350 | ;; (lambda _ | |
8351 | ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test"))) | |
50d70a72 JL |
8352 | (replace 'install |
8353 | (install-jars "build/artifacts/jdk1.5/jars"))))) | |
8354 | (inputs | |
8355 | `(("java-javax-mail" ,java-javax-mail))) | |
31208367 JL |
8356 | (native-inputs |
8357 | `(("unzip" ,unzip) | |
50d70a72 JL |
8358 | ("junit" ,java-junit) |
8359 | ("java-native-access" ,java-native-access) | |
8360 | ("java-native-access-platform" ,java-native-access-platform))) | |
31208367 JL |
8361 | (home-page "https://www.bouncycastle.org") |
8362 | (synopsis "Cryptographic library") | |
50d70a72 JL |
8363 | (description "Bouncy Castle is a cryptographic library for the Java |
8364 | programming language.") | |
31208367 | 8365 | (license license:expat))) |
a53d9ac0 JL |
8366 | |
8367 | (define-public java-lmax-disruptor | |
8368 | (package | |
8369 | (name "java-lmax-disruptor") | |
8370 | (version "3.3.7") | |
8371 | (source (origin | |
8372 | (method url-fetch) | |
8373 | (uri (string-append "https://github.com/LMAX-Exchange/disruptor/" | |
8374 | "archive/" version ".tar.gz")) | |
8375 | (file-name (string-append name "-" version ".tar.gz")) | |
8376 | (sha256 | |
8377 | (base32 | |
8378 | "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g")))) | |
8379 | (build-system ant-build-system) | |
8380 | (arguments | |
8381 | `(#:jar-name "java-lmax-disruptor.jar" | |
8382 | #:jdk ,icedtea-8 | |
8383 | #:tests? #f)); tests hang | |
8384 | (inputs | |
8385 | `(("junit" ,java-junit) | |
8386 | ("java-hdrhistogram" ,java-hdrhistogram) | |
8387 | ("java-jmock" ,java-jmock) | |
8388 | ("java-jmock-legacy" ,java-jmock-legacy) | |
8389 | ("java-jmock-junit4" ,java-jmock-junit4) | |
8390 | ("java-hamcrest-all" ,java-hamcrest-all))) | |
8391 | (native-inputs | |
8392 | `(("cglib" ,java-cglib) | |
8393 | ("objenesis" ,java-objenesis) | |
8394 | ("asm" ,java-asm))) | |
8395 | (home-page "https://www.lmax.com/disruptor") | |
8396 | (synopsis "High performance inter-thread communication") | |
8397 | (description "LMAX Disruptor is a software pattern and software component | |
8398 | for high performance inter-thread communication that avoids the need for | |
8399 | message queues or resource locking.") | |
8400 | (license license:asl2.0))) | |
5619556b | 8401 | |
5e3abfc8 RW |
8402 | (define-public java-commons-bcel |
8403 | (package | |
8404 | (name "java-commons-bcel") | |
8405 | (version "6.1") | |
8406 | (source (origin | |
8407 | (method url-fetch) | |
8408 | (uri (string-append "mirror://apache/commons/bcel/source/bcel-" | |
8409 | version "-src.tar.gz")) | |
8410 | (sha256 | |
8411 | (base32 | |
8412 | "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy")))) | |
8413 | (build-system ant-build-system) | |
8414 | (arguments | |
8415 | `(#:jar-name "bcel.jar" | |
8416 | #:jdk ,icedtea-8 | |
8417 | #:source-dir "src/main/java" | |
8418 | #:test-dir "src/test/java" | |
8419 | ;; FIXME: Tests require the unpackaged jna. | |
8420 | #:tests? #f)) | |
8421 | (home-page "https://commons.apache.org/proper/commons-bcel/") | |
8422 | (synopsis "Byte code engineering library") | |
8423 | (description "The Byte Code Engineering Library (Apache Commons BCEL) is | |
8424 | intended to give users a convenient way to analyze, create, and | |
8425 | manipulate (binary) Java class files. Classes are represented by objects | |
8426 | which contain all the symbolic information of the given class: methods, fields | |
8427 | and byte code instructions, in particular. | |
8428 | ||
8429 | Such objects can be read from an existing file, be transformed by a | |
8430 | program (e.g. a class loader at run-time) and written to a file again. An | |
8431 | even more interesting application is the creation of classes from scratch at | |
8432 | run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful | |
8433 | if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format | |
8434 | of Java @code{.class} files.") | |
8435 | (license license:asl2.0))) | |
8436 | ||
5619556b JL |
8437 | (define-public java-xerial-core |
8438 | (package | |
8439 | (name "java-xerial-core") | |
8440 | (version "2.1") | |
8441 | (source (origin | |
8442 | (method url-fetch) | |
8443 | (uri (string-append "https://github.com/xerial/xerial-java/archive/" | |
8444 | version ".tar.gz")) | |
8445 | (file-name (string-append name "-" version ".tar.gz")) | |
8446 | (sha256 | |
8447 | (base32 | |
8448 | "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d")))) | |
8449 | (build-system ant-build-system) | |
8450 | (arguments | |
8451 | `(#:jar-name "xerial-core.jar" | |
8452 | #:source-dir "xerial-core/src/main/java" | |
8453 | #:test-dir "xerial-core/src/test" | |
8454 | #:phases | |
8455 | (modify-phases %standard-phases | |
8456 | (add-before 'build 'copy-resources | |
8457 | (lambda _ | |
8458 | (copy-recursively "xerial-core/src/main/resources" | |
8459 | "build/classes") | |
8460 | #t))))) | |
8461 | (native-inputs | |
8462 | `(("junit" ,java-junit) | |
8463 | ("hamcrest" ,java-hamcrest-core))) | |
8464 | (home-page "https://github.com/xerial/xerial-java") | |
f4548394 | 8465 | (synopsis "Data management libraries for Java") |
5619556b | 8466 | (description "Xerial is a set of data management libraries for the Java |
f4548394 | 8467 | programming language. The ultimate goal of the Xerial project is to manage |
5619556b JL |
8468 | everything as database, including class objects, text format data, data |
8469 | streams, etc.") | |
8470 | (license license:asl2.0))) | |
8d6a4815 JL |
8471 | |
8472 | (define-public java-powermock-reflect | |
8473 | (package | |
8474 | (name "java-powermock-reflect") | |
8475 | (version "1.7.3") | |
8476 | (source (origin | |
8477 | (method url-fetch) | |
8478 | (uri (string-append "https://github.com/powermock/powermock/" | |
8479 | "archive/powermock-" version ".tar.gz")) | |
8480 | (file-name (string-append name "-" version ".tar.gz")) | |
8481 | (sha256 | |
8482 | (base32 | |
8483 | "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy")) | |
8484 | (patches | |
8485 | (search-patches "java-powermock-fix-java-files.patch")))) | |
8486 | (build-system ant-build-system) | |
8487 | (arguments | |
8488 | `(#:jar-name "java-powermock-reflect.jar" | |
8489 | #:jdk ,icedtea-8 | |
8490 | #:source-dir "powermock-reflect/src/main/java" | |
8491 | #:test-dir "powermock-reflect/src/test")) | |
8492 | (inputs | |
8493 | `(("java-objenesis" ,java-objenesis))) | |
8494 | (native-inputs | |
8495 | `(("junit" ,java-junit) | |
8496 | ("cglib" ,java-cglib) | |
8497 | ("asm" ,java-asm) | |
8498 | ("hamcrest" ,java-hamcrest-core) | |
8499 | ("assertj" ,java-assertj))) | |
8500 | (home-page "https://github.com/powermock/powermock") | |
8501 | (synopsis "Mock library extension framework") | |
8502 | (description "PowerMock is a framework that extends other mock libraries | |
8503 | such as EasyMock with more powerful capabilities. PowerMock uses a custom | |
8504 | classloader and bytecode manipulation to enable mocking of static methods, | |
8505 | constructors, final classes and methods, private methods, removal of static | |
8506 | initializers and more. By using a custom classloader no changes need to be | |
8507 | done to the IDE or continuous integration servers which simplifies adoption.") | |
8508 | (license license:asl2.0))) | |
d4a4d5da JL |
8509 | |
8510 | (define-public java-powermock-core | |
8511 | (package | |
8512 | (inherit java-powermock-reflect) | |
8513 | (name "java-powermock-core") | |
8514 | (arguments | |
8515 | `(#:jar-name "java-powermock-core.jar" | |
8516 | #:source-dir "powermock-core/src/main/java" | |
8517 | #:test-dir "powermock-core/src/test" | |
8518 | #:tests? #f; requires powermock-api | |
59e0021c JL |
8519 | #:jdk ,icedtea-8 |
8520 | #:phases | |
8521 | (modify-phases %standard-phases | |
8522 | (add-before 'build 'copy-resources | |
8523 | (lambda _ | |
8524 | (copy-recursively "powermock-core/src/main/resources" | |
8525 | "build/classes")))))) | |
d4a4d5da JL |
8526 | (inputs |
8527 | `(("reflect" ,java-powermock-reflect) | |
8528 | ("javassist" ,java-jboss-javassist))) | |
8529 | (native-inputs | |
8530 | `(("junit" ,java-junit) | |
8531 | ("assertj" ,java-assertj) | |
8532 | ("mockito" ,java-mockito-1))))) | |
2d5d65d7 JL |
8533 | |
8534 | (define-public java-powermock-api-support | |
8535 | (package | |
8536 | (inherit java-powermock-reflect) | |
8537 | (name "java-powermock-api-support") | |
8538 | (build-system ant-build-system) | |
8539 | (arguments | |
8540 | `(#:jar-name "java-powermock-api-support.jar" | |
8541 | #:jdk ,icedtea-8 | |
8542 | #:source-dir "powermock-api/powermock-api-support/src/main/java" | |
8543 | #:tests? #f)); no tests | |
8544 | (inputs | |
8545 | `(("core" ,java-powermock-core) | |
8546 | ("reflect" ,java-powermock-reflect))))) | |
6c21d46c JL |
8547 | |
8548 | (define-public java-powermock-modules-junit4-common | |
8549 | (package | |
8550 | (inherit java-powermock-reflect) | |
8551 | (name "java-powermock-modules-junit4-common") | |
8552 | (build-system ant-build-system) | |
8553 | (arguments | |
8554 | `(#:jar-name "java-powermock-modules-junit4-common.jar" | |
8555 | #:jdk ,icedtea-8 | |
8556 | #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java" | |
8557 | #:test-dir "powermock-modules/powermock-module-junit4-common/src/test")) | |
8558 | (inputs | |
8559 | `(("core" ,java-powermock-core) | |
8560 | ("easymock" ,java-easymock) | |
8561 | ("reflect" ,java-powermock-reflect) | |
8562 | ("hamcrest" ,java-hamcrest-core) | |
8563 | ("cglib" ,java-cglib))))) | |
33db1681 JL |
8564 | |
8565 | (define-public java-powermock-modules-junit4 | |
8566 | (package | |
8567 | (inherit java-powermock-reflect) | |
8568 | (name "java-powermock-modules-junit4") | |
8569 | (build-system ant-build-system) | |
8570 | (arguments | |
8571 | `(#:jar-name "java-powermock-modules-junit4.jar" | |
8572 | #:jdk ,icedtea-8 | |
8573 | #:source-dir "powermock-modules/powermock-module-junit4/src/main/java" | |
1124683d JL |
8574 | #:test-dir "powermock-modules/powermock-module-junit4/src/test" |
8575 | #:phases | |
8576 | (modify-phases %standard-phases | |
8577 | (add-before 'build 'fix-junit-detection | |
8578 | (lambda _ | |
8579 | ;; Our junit version is 4.12-SNAPSHOT | |
8580 | (substitute* (find-files "powermock-modules/powermock-module-junit4" | |
8581 | "PowerMockJUnit4MethodValidator.java") | |
8582 | (("4.12") "4.12-SNAPSHOT"))))))) | |
33db1681 JL |
8583 | (inputs |
8584 | `(("core" ,java-powermock-core) | |
8585 | ("reflect" ,java-powermock-reflect) | |
8586 | ("common" ,java-powermock-modules-junit4-common) | |
8587 | ("cglib" ,java-cglib))) | |
8588 | (native-inputs | |
8589 | `(("easymock" ,java-easymock) | |
8590 | ("hamcrest" ,java-hamcrest-core) | |
8591 | ("objenesis" ,java-objenesis) | |
8592 | ("asm" ,java-asm) | |
8593 | ("junit" ,java-junit))))) | |
4d508975 JL |
8594 | |
8595 | (define-public java-powermock-api-easymock | |
8596 | (package | |
8597 | (inherit java-powermock-reflect) | |
8598 | (name "java-powermock-api-easymock") | |
8599 | (build-system ant-build-system) | |
8600 | (arguments | |
8601 | `(#:jar-name "java-powermock-api-easymock.jar" | |
8602 | #:jdk ,icedtea-8 | |
8603 | #:source-dir "powermock-api/powermock-api-easymock/src/main/java" | |
8604 | #:tests? #f; no tests | |
8605 | #:phases | |
8606 | (modify-phases %standard-phases | |
8607 | (add-before 'build 'fix-file | |
8608 | (lambda _ | |
8609 | ;; FIXME: This looks wrong, but it fixes a build error. | |
8610 | (with-directory-excursion "powermock-api/powermock-api-easymock" | |
8611 | (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java" | |
8612 | (("classLoader instanceof MockClassLoader") "false") | |
8613 | (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";"))) | |
8614 | #t))))) | |
8615 | (inputs | |
8616 | `(("core" ,java-powermock-core) | |
8617 | ("easymock" ,java-easymock) | |
8618 | ("reflect" ,java-powermock-reflect) | |
8619 | ("support" ,java-powermock-api-support) | |
8620 | ("cglib" ,java-cglib))))) | |
5fb3e822 JL |
8621 | |
8622 | (define-public java-jboss-jms-api-spec | |
8623 | (package | |
8624 | (name "java-jboss-jms-api-spec") | |
8625 | (version "2.0") | |
8626 | (source (origin | |
8627 | (method url-fetch) | |
8628 | (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/" | |
8629 | "archive/jboss-jms-api_" version | |
8630 | "_spec-1.0.1.Final.tar.gz")) | |
8631 | (sha256 | |
8632 | (base32 | |
8633 | "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m")))) | |
8634 | (build-system ant-build-system) | |
8635 | (arguments | |
8636 | `(#:jar-name "java-jboss-jms-api_spec.jar" | |
8637 | #:jdk ,icedtea-8 | |
8638 | #:source-dir "." | |
8639 | #:tests? #f)); no tests | |
8640 | (home-page "https://github.com/jboss/jboss-jms-api_spec") | |
8641 | (synopsis "Java Message Service API specification") | |
8642 | (description "Java Message Service (JMS) API is used to send messages | |
8643 | messages between two or more clients. It is a messaging standard that allows | |
8644 | application components to create, send, receive, and read messages.") | |
8645 | ; either gpl2 only with GPL Classpath Exception, or cddl. | |
8646 | (license (list license:gpl2 license:cddl1.0)))) | |
3ff47c66 JL |
8647 | |
8648 | (define-public java-mail | |
8649 | (package | |
8650 | (name "java-mail") | |
8651 | (version "1.6.0") | |
8652 | (source (origin | |
8653 | (method url-fetch) | |
8654 | (uri (string-append "https://github.com/javaee/javamail/archive/" | |
8655 | "JAVAMAIL-1_6_0.tar.gz")) | |
8656 | (sha256 | |
8657 | (base32 | |
8658 | "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92")))) | |
8659 | (build-system ant-build-system) | |
8660 | (arguments | |
8661 | `(#:jar-name "java-mail.jar" | |
8662 | #:jdk ,icedtea-8 | |
8663 | #:source-dir "mail/src/main/java" | |
8664 | #:test-dir "mail/src/test" | |
8665 | #:test-exclude | |
8666 | (list "**/CollectorFormatterTest.java" | |
8667 | "**/CompactFormatterTest.java" | |
8668 | "**/DurationFilterTest.java" | |
8669 | "**/MailHandlerTest.java" | |
8670 | "**/GetLocalAddressTest.java" | |
8671 | ;; FIXME: both end with: | |
8672 | ;; java.lang.ClassNotFoundException: | |
8673 | ;; javax.mail.internet.MimeMultipartParseTest | |
8674 | "**/MimeMultipartParseTest.java" | |
8675 | "**/SearchTermSerializationTest.java") | |
8676 | #:phases | |
8677 | (modify-phases %standard-phases | |
8678 | (add-before 'configure 'move-version.java | |
8679 | (lambda _ | |
8680 | (copy-file "mail/src/main/resources/javax/mail/Version.java" | |
218d1dde RW |
8681 | "mail/src/main/java/javax/mail/Version.java") |
8682 | #t)) | |
3ff47c66 JL |
8683 | (add-before 'build 'copy-resources |
8684 | (lambda _ | |
8685 | (copy-recursively "mail/src/main/resources/META-INF" | |
8686 | "build/classes/META-INF") | |
8687 | #t))))) | |
8688 | (native-inputs | |
8689 | `(("junit" ,java-junit) | |
8690 | ("hamcrest" ,java-hamcrest-core))) | |
8691 | (home-page "https://javaee.github.io/javamail/") | |
8692 | (synopsis "Mail-related functionnalities in Java") | |
8693 | (description "The JavaMail API provides a platform-independent and | |
8694 | protocol-independent framework to build mail and messaging applications.") | |
8695 | ;; General Public License Version 2 only ("GPL") or the Common Development | |
8696 | ;; and Distribution License("CDDL") | |
8697 | (license (list license:cddl1.1 | |
8698 | license:gpl2)))); with classpath exception | |
217b20e4 JL |
8699 | |
8700 | (define-public java-jeromq | |
8701 | (package | |
8702 | (name "java-jeromq") | |
4aa0a1df | 8703 | (version "0.4.3") |
217b20e4 | 8704 | (source (origin |
4aa0a1df RW |
8705 | (method git-fetch) |
8706 | (uri (git-reference | |
8707 | (url "https://github.com/zeromq/jeromq.git") | |
8708 | (commit (string-append "v" version)))) | |
8709 | (file-name (string-append name "-" version "-checkout")) | |
217b20e4 JL |
8710 | (sha256 |
8711 | (base32 | |
594bd3a0 GB |
8712 | "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj")) |
8713 | (patches (search-patches "java-jeromq-fix-tests.patch")))) | |
217b20e4 JL |
8714 | (build-system ant-build-system) |
8715 | (arguments | |
8716 | `(#:jar-name "java-jeromq.jar" | |
8717 | #:source-dir "src/main/java" | |
8718 | #:jdk ,icedtea-8 | |
8719 | #:test-exclude | |
8720 | (list | |
8721 | "**/Abstract*.java" | |
8722 | ;; Requires network | |
8723 | "**/ZBeaconTest.java" | |
8724 | ;; Failures | |
4aa0a1df | 8725 | "**/DealerSpecTest.java" |
217b20e4 | 8726 | "**/CustomDecoderTest.java" |
594bd3a0 GB |
8727 | "**/CustomEncoderTest.java" |
8728 | "**/ConnectRidTest.java" | |
8729 | "**/ReqSpecTest.java" | |
8730 | "**/PushPullSpecTest.java" | |
8731 | "**/PubSubHwmTest.java" | |
8732 | "**/RouterSpecTest.java" | |
8733 | "**/ProxyTest.java"))) | |
217b20e4 JL |
8734 | (inputs |
8735 | `(("java-jnacl" ,java-jnacl))) | |
8736 | (native-inputs | |
8737 | `(("java-hamcrest-core" ,java-hamcrest-core) | |
8738 | ("junit" ,java-junit))) | |
8739 | (home-page "http://zeromq.org/bindings:java") | |
8740 | (synopsis "Java binding for 0MQ") | |
8741 | (description "Jeromq provides the java bindings for 0MQ.") | |
8742 | (license license:mpl2.0))) | |
46c6905a JL |
8743 | |
8744 | (define-public java-kafka-clients | |
8745 | (package | |
8746 | (name "java-kafka-clients") | |
8747 | (version "1.0.0") | |
8748 | (source (origin | |
8749 | (method url-fetch) | |
8750 | (uri (string-append "mirror://apache/kafka/" version "/kafka-" | |
8751 | version "-src.tgz")) | |
8752 | (sha256 | |
8753 | (base32 | |
8754 | "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq")))) | |
8755 | (build-system ant-build-system) | |
8756 | (arguments | |
8757 | `(#:jar-name "java-kafka-clients.jar" | |
8758 | #:jdk ,icedtea-8 | |
8759 | #:source-dir "clients/src/main/java" | |
8760 | #:test-dir "clients/src/test" | |
8761 | #:test-exclude | |
8762 | (list | |
8763 | ;; This file does not contain a class | |
8764 | "**/IntegrationTest.java" | |
8765 | ;; Requires network | |
8766 | "**/ClientUtilsTest.java" | |
8767 | ;; End with errors that seem related to our powermock | |
8768 | "**/KafkaProducerTest.java" | |
8769 | "**/BufferPoolTest.java"))) | |
8770 | (inputs | |
8771 | `(("java-slf4j-api" ,java-slf4j-api) | |
8772 | ("java-lz4" ,java-lz4))) | |
8773 | (native-inputs | |
8774 | `(("junit" ,java-junit) | |
8775 | ("hamcrest" ,java-hamcrest-all) | |
8776 | ("objenesis" ,java-objenesis) | |
8777 | ("asm" ,java-asm) | |
8778 | ("cglib" ,java-cglib) | |
8779 | ("javassist" ,java-jboss-javassist) | |
8780 | ("snappy" ,java-snappy) | |
8781 | ("easymock" ,java-easymock) | |
8782 | ("powermock" ,java-powermock-core) | |
8783 | ("powermock-easymock" ,java-powermock-api-easymock) | |
8784 | ("powermock-junit4-common" ,java-powermock-modules-junit4-common) | |
8785 | ("powermock-junit4" ,java-powermock-modules-junit4) | |
8786 | ("powermock-support" ,java-powermock-api-support) | |
50d70a72 | 8787 | ("java-bouncycastle" ,java-bouncycastle))) |
46c6905a JL |
8788 | (home-page "https://kafka.apache.org") |
8789 | (synopsis "Distributed streaming platform") | |
8790 | (description "Kafka is a distributed streaming platform, which means: | |
8791 | @itemize | |
8792 | @item it can publish and subscribe to streams of records; | |
8793 | @item it can store streams of records in a fault-tolerant way; | |
8794 | @item it can process streams of records as they occur. | |
8795 | @end itemize") | |
8796 | ;; Either cddl or gpl2 only. | |
8797 | (license (list license:cddl1.1; actually cddl1.1 | |
8798 | license:gpl2)))); with classpath exception | |
0b54e190 JL |
8799 | |
8800 | (define-public java-jdom | |
8801 | (package | |
8802 | (name "java-jdom") | |
8803 | (version "1.1.3") | |
8804 | (source (origin | |
8805 | (method url-fetch) | |
8806 | (uri (string-append "http://jdom.org/dist/binary/archive/jdom-" | |
8807 | version ".tar.gz")) | |
8808 | (sha256 | |
8809 | (base32 | |
8810 | "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl")))) | |
8811 | (build-system ant-build-system) | |
8812 | (arguments | |
8813 | `(#:build-target "package" | |
8814 | #:tests? #f; tests are run as part of the build process | |
8815 | #:phases | |
8816 | (modify-phases %standard-phases | |
8817 | (replace 'install | |
8818 | (install-jars "build"))))) | |
8819 | (home-page "http://jdom.org/") | |
8820 | (synopsis "Access, manipulate, and output XML data") | |
8821 | (description "Java-based solution for accessing, manipulating, and | |
8822 | outputting XML data from Java code.") | |
8823 | (license license:bsd-4))) | |
78745d33 JL |
8824 | |
8825 | (define-public java-geronimo-xbean-reflect | |
8826 | (package | |
8827 | (name "java-geronimo-xbean-reflect") | |
8828 | (version "4.5") | |
8829 | (source (origin | |
8830 | (method svn-fetch) | |
8831 | (uri (svn-reference | |
8832 | (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/") | |
8833 | (revision 1807396))) | |
8834 | (file-name (string-append name "-" version)) | |
8835 | (sha256 | |
8836 | (base32 | |
8837 | "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja")))) | |
8838 | (build-system ant-build-system) | |
8839 | (arguments | |
8840 | `(#:jar-name "geronimo-xbean-reflect.jar" | |
8841 | #:source-dir "xbean-reflect/src/main/java" | |
8842 | #:test-dir "xbean-reflect/src/test" | |
8843 | #:jdk ,icedtea-8 | |
8844 | #:test-exclude | |
8845 | (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java" | |
8846 | "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java" | |
8847 | "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java") | |
8848 | #:phases | |
8849 | (modify-phases %standard-phases | |
8850 | (add-before 'build 'fix-source | |
8851 | (lambda _ | |
8852 | (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/")) | |
8853 | ;; org.apache.xbean.asm6 is actually repackaged java-asm | |
8854 | (substitute* (string-append dir "XbeanAsmParameterNameLoader.java") | |
8855 | (("org.apache.xbean.asm5") "org.objectweb.asm")) | |
8856 | #t)))))) | |
8857 | (inputs | |
8858 | `(("asm" ,java-asm) | |
8859 | ("log4j" ,java-log4j-api) | |
8860 | ("log4j-1.2" ,java-log4j-1.2-api) | |
8861 | ("log4j-core" ,java-log4j-core) | |
8862 | ("logging" ,java-commons-logging-minimal))) | |
8863 | (native-inputs | |
8864 | `(("junit" ,java-junit))) | |
8865 | (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/") | |
8866 | (synopsis "Dependency injection helper") | |
8867 | (description "Xbean-reflect provides very flexible ways to create objects | |
8868 | and graphs of objects for dependency injection frameworks") | |
8869 | (license license:asl2.0))) | |
09c44196 | 8870 | |
3fda539b JL |
8871 | (define-public java-geronimo-xbean-bundleutils |
8872 | (package | |
8873 | (inherit java-geronimo-xbean-reflect) | |
8874 | (name "java-geronimo-xbean-bundleutils") | |
8875 | (arguments | |
8876 | `(#:jar-name "geronimo-xbean-bundleutils.jar" | |
8877 | #:source-dir "xbean-bundleutils/src/main/java" | |
8878 | #:test-dir "xbean-bundleutils/src/test" | |
8879 | #:phases | |
8880 | (modify-phases %standard-phases | |
8881 | (add-before 'build 'fix-java | |
8882 | (lambda _ | |
8883 | ;; We use a more recent version of osgi, so this file requires | |
8884 | ;; more interface method implementations. | |
8885 | (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java" | |
8886 | (("import org.osgi.framework.ServiceRegistration;") | |
8887 | "import org.osgi.framework.ServiceRegistration; | |
8888 | import org.osgi.framework.ServiceFactory; | |
8889 | import java.util.Collection; | |
8890 | import org.osgi.framework.ServiceObjects;") | |
8891 | (("public Bundle getBundle\\(\\)") | |
8892 | "@Override | |
8893 | public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) { | |
8894 | throw new UnsupportedOperationException(); | |
8895 | } | |
8896 | @Override | |
8897 | public <S> ServiceRegistration<S> registerService(Class<S> clazz, | |
8898 | ServiceFactory<S> factory, Dictionary<String, ?> properties) { | |
8899 | throw new UnsupportedOperationException(); | |
8900 | } | |
8901 | public Bundle getBundle()")) | |
8902 | #t))))) | |
8903 | (inputs | |
8904 | `(("java-slf4j" ,java-slf4j-api) | |
8905 | ("java-asm" ,java-asm) | |
8906 | ("java-osgi-framework" ,java-osgi-framework) | |
8907 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
8908 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin))))) | |
0cb9ce32 JL |
8909 | |
8910 | (define-public java-geronimo-xbean-asm-util | |
8911 | (package | |
8912 | (inherit java-geronimo-xbean-reflect) | |
8913 | (name "java-geronimo-xbean-asm-util") | |
8914 | (arguments | |
8915 | `(#:jar-name "geronimo-xbean-asm-util.jar" | |
8916 | #:source-dir "xbean-asm-util/src/main/java" | |
8917 | #:tests? #f)); no tests | |
8918 | (inputs | |
8919 | `(("java-asm" ,java-asm))) | |
8920 | (native-inputs '()))) | |
8d510f65 JL |
8921 | |
8922 | (define-public java-geronimo-xbean-finder | |
8923 | (package | |
8924 | (inherit java-geronimo-xbean-reflect) | |
8925 | (name "java-geronimo-xbean-finder") | |
8926 | (arguments | |
8927 | `(#:jar-name "geronimo-xbean-finder.jar" | |
8928 | #:source-dir "xbean-finder/src/main/java" | |
8929 | #:test-dir "xbean-finder/src/test")) | |
8930 | (inputs | |
8931 | `(("java-slf4j-api" ,java-slf4j-api) | |
8932 | ("java-asm" ,java-asm) | |
8933 | ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils) | |
8934 | ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util) | |
8935 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin) | |
8936 | ("java-osgi-framework" ,java-osgi-framework))) | |
8937 | (native-inputs | |
8938 | `(("java-junit" ,java-junit) | |
8939 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
3fda539b | 8940 | |
09c44196 JL |
8941 | (define-public java-gson |
8942 | (package | |
8943 | (name "java-gson") | |
8944 | (version "2.8.2") | |
8945 | (source (origin | |
8946 | (method url-fetch) | |
8947 | (uri (string-append "https://github.com/google/gson/archive/" | |
8948 | "gson-parent-" version ".tar.gz")) | |
8949 | (sha256 | |
8950 | (base32 | |
8951 | "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9")))) | |
8952 | (build-system ant-build-system) | |
8953 | (arguments | |
8954 | `(#:jar-name "gson.jar" | |
8955 | #:source-dir "gson/src/main/java" | |
8956 | #:test-dir "gson/src/test")) | |
8957 | (native-inputs | |
8958 | `(("java-junit" ,java-junit) | |
8959 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
8960 | (home-page "https://github.com/google/gson") | |
8961 | (synopsis "Java serialization/deserialization library from/to JSON") | |
8962 | (description "Gson is a Java library that can be used to convert Java | |
8963 | Objects into their JSON representation. It can also be used to convert a JSON | |
8964 | string to an equivalent Java object. Gson can work with arbitrary Java objects | |
8965 | including pre-existing objects that you do not have source-code of.") | |
8966 | (license license:asl2.0))) | |
335aa20b JL |
8967 | |
8968 | (define-public java-hawtjni | |
8969 | (package | |
8970 | (name "java-hawtjni") | |
8971 | (version "1.15") | |
8972 | (source (origin | |
8973 | (method url-fetch) | |
8974 | (uri (string-append "https://github.com/fusesource/hawtjni/archive/" | |
8975 | "hawtjni-project-" version ".tar.gz")) | |
8976 | (sha256 | |
8977 | (base32 | |
8978 | "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g")))) | |
8979 | (build-system ant-build-system) | |
8980 | (arguments | |
8981 | `(#:jar-name "hawtjni.jar" | |
8982 | #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java" | |
8983 | #:tests? #f; no tests | |
8984 | #:phases | |
8985 | (modify-phases %standard-phases | |
8986 | (add-before 'build 'build-native | |
8987 | (lambda* (#:key inputs #:allow-other-keys) | |
6338ea9a RW |
8988 | (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))) |
8989 | (with-directory-excursion "hawtjni-generator/src/main/resources/" | |
8990 | (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o" | |
8991 | "-fPIC" "-O2" include) | |
8992 | (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o" | |
8993 | "-fPIC" "-O2" include) | |
8994 | (invoke "gcc" "-o" "libhawtjni.so" "-shared" | |
8995 | "hawtjni.o" "hawtjni-callback.o"))) | |
8996 | #t)) | |
335aa20b JL |
8997 | (add-after 'install 'install-native |
8998 | (lambda* (#:key outputs #:allow-other-keys) | |
8999 | (let* ((out (assoc-ref outputs "out")) | |
9000 | (lib (string-append out "/lib")) | |
9001 | (inc (string-append out "/include"))) | |
335aa20b | 9002 | (with-directory-excursion "hawtjni-generator/src/main/resources/" |
6338ea9a RW |
9003 | (install-file "libhawtjni.so" lib) |
9004 | (install-file "hawtjni.h" inc))) | |
335aa20b JL |
9005 | #t))))) |
9006 | (inputs | |
9007 | `(("java-commons-cli" ,java-commons-cli) | |
9008 | ("java-asm" ,java-asm) | |
9009 | ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder))) | |
9010 | (home-page "https://fusesource.github.io/hawtjni/") | |
9011 | (synopsis "JNI code generator") | |
9012 | (description "HawtJNI is a code generator that produces the JNI code needed | |
9013 | to implement Java native methods. It is based on the jnigen code generator | |
9014 | that is part of the SWT Tools project.") | |
9015 | (license license:asl2.0))) | |
d0c62afa JL |
9016 | |
9017 | (define-public java-jansi-native | |
9018 | (package | |
9019 | (name "java-jansi-native") | |
9020 | (version "1.7") | |
9021 | (source (origin | |
9022 | (method url-fetch) | |
9023 | (uri (string-append "https://github.com/fusesource/jansi-native/" | |
9024 | "archive/jansi-native-" version ".tar.gz")) | |
9025 | (sha256 | |
9026 | (base32 | |
9027 | "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf")))) | |
9028 | (build-system ant-build-system) | |
9029 | (arguments | |
9030 | `(#:jar-name "jansi-native.jar" | |
9031 | #:source-dir "src/main/java" | |
9032 | #:tests? #f; no tests | |
9033 | #:phases | |
9034 | (modify-phases %standard-phases | |
9035 | (add-before 'build 'build-native | |
9036 | (lambda* (#:key inputs #:allow-other-keys) | |
9037 | ;; there are more required files for windows in windows/ | |
9038 | (with-directory-excursion "src/main/native-package/src" | |
9039 | (substitute* "jansi_ttyname.c" | |
9040 | (("#include \"jansi_.*") "")) | |
e85c1bf6 RW |
9041 | (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o" |
9042 | (string-append "-I" (assoc-ref inputs "java-hawtjni") | |
9043 | "/include") | |
9044 | (string-append "-I" (assoc-ref inputs "jdk") | |
9045 | "/include/linux") | |
9046 | "-fPIC" "-O2") | |
9047 | (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o") | |
9048 | #t))) | |
d0c62afa JL |
9049 | (add-before 'build 'install-native |
9050 | (lambda _ | |
9051 | (let ((dir (string-append "build/classes/META-INF/native/" | |
9052 | ,(match (%current-system) | |
9053 | ((or "i686-linux" "armhf-linux") | |
9054 | "linux32") | |
9055 | ((or "x86_64-linux" "aarch64-linux") | |
9056 | "linux64"))))) | |
9057 | (install-file "src/main/native-package/src/libjansi.so" dir)) | |
9058 | #t)) | |
9059 | (add-after 'install 'install-native | |
9060 | (lambda* (#:key outputs #:allow-other-keys) | |
d0c62afa JL |
9061 | (install-file "src/main/native-package/src/jansi.h" |
9062 | (string-append (assoc-ref outputs "out") "/include")) | |
9063 | #t))))) | |
9064 | (inputs | |
9065 | `(("java-hawtjni" ,java-hawtjni))) | |
9066 | (home-page "https://fusesource.github.io/jansi/") | |
9067 | (synopsis "Native library for jansi") | |
3d6925ef RW |
9068 | (description "This package provides the native library for jansi, a small |
9069 | Java library that allows you to use ANSI escape sequences to format your | |
9070 | console output.") | |
d0c62afa | 9071 | (license license:asl2.0))) |
a87ea1ad JL |
9072 | |
9073 | (define-public java-jansi | |
9074 | (package | |
9075 | (name "java-jansi") | |
9076 | (version "1.16") | |
9077 | (source (origin | |
9078 | (method url-fetch) | |
9079 | (uri (string-append "https://github.com/fusesource/jansi/archive/" | |
9080 | "jansi-project-" version ".tar.gz")) | |
9081 | (sha256 | |
9082 | (base32 | |
9083 | "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z")))) | |
9084 | (build-system ant-build-system) | |
9085 | (arguments | |
9086 | `(#:jar-name "jansi.jar" | |
9087 | #:source-dir "jansi/src/main/java" | |
9088 | #:test-dir "jansi/src/test" | |
9089 | #:phases | |
9090 | (modify-phases %standard-phases | |
9091 | (add-after 'check 'clear-term | |
9092 | (lambda _ | |
9093 | (zero? (system* "echo" "-e" "\\e[0m"))))))) | |
9094 | (inputs | |
9095 | `(("java-jansi-native" ,java-jansi-native))) | |
9096 | (native-inputs | |
9097 | `(("java-junit" ,java-junit) | |
9098 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
9099 | (home-page "https://fusesource.github.io/jansi/") | |
9100 | (synopsis "Portable ANSI escape sequences") | |
9101 | (description "Jansi is a Java library that allows you to use ANSI escape | |
9102 | sequences to format your console output which works on every platform.") | |
9103 | (license license:asl2.0))) | |
cc061329 JL |
9104 | |
9105 | (define-public java-jboss-el-api-spec | |
9106 | (package | |
9107 | (name "java-jboss-el-api-spec") | |
9108 | (version "3.0") | |
9109 | (source (origin | |
9110 | (method url-fetch) | |
9111 | (uri (string-append "https://github.com/jboss/jboss-el-api_spec/" | |
9112 | "archive/jboss-el-api_" version | |
9113 | "_spec-1.0.7.Final.tar.gz")) | |
9114 | (sha256 | |
9115 | (base32 | |
9116 | "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh")))) | |
9117 | (build-system ant-build-system) | |
9118 | (arguments | |
9119 | `(#:jar-name "java-jboss-el-api_spec.jar" | |
9120 | #:jdk ,icedtea-8)) | |
9121 | (inputs | |
9122 | `(("java-junit" ,java-junit))) | |
9123 | (home-page "https://github.com/jboss/jboss-el-api_spec") | |
9124 | (synopsis "JSR-341 expression language 3.0 API") | |
9125 | (description "This package contains an implementation of the JSR-341 | |
9126 | specification for the expression language 3.0. It implements an expression | |
9127 | language inspired by ECMAScript and XPath. This language is used with | |
9128 | JavaServer Pages (JSP).") | |
9129 | ;; Either GPL2 only or CDDL. | |
9130 | (license (list license:gpl2 license:cddl1.1)))) | |
cc03a786 JL |
9131 | |
9132 | (define-public java-jboss-interceptors-api-spec | |
9133 | (package | |
9134 | (name "java-jboss-interceptors-api-spec") | |
9135 | (version "1.2") | |
9136 | (source (origin | |
9137 | (method url-fetch) | |
9138 | (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/" | |
9139 | "archive/jboss-interceptors-api_" version | |
9140 | "_spec-1.0.0.Final.tar.gz")) | |
9141 | (sha256 | |
9142 | (base32 | |
9143 | "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z")))) | |
9144 | (build-system ant-build-system) | |
9145 | (arguments | |
9146 | `(#:jar-name "java-jboss-interceptors-api_spec.jar" | |
9147 | #:jdk ,icedtea-8 | |
9148 | #:source-dir "." | |
9149 | #:tests? #f)); no tests | |
9150 | (home-page "https://github.com/jboss/jboss-interceptors-api_spec") | |
9151 | (synopsis "Interceptors 1.2 API classes from JSR 318") | |
9152 | (description "Java-jboss-interceptors-api-spec implements the Interceptors | |
9153 | API. Interceptors are used to interpose on business method invocations and | |
9154 | specific events.") | |
9155 | ;; Either GPL2 only or CDDL. | |
9156 | (license (list license:gpl2 license:cddl1.1)))) | |
a10a451c JL |
9157 | |
9158 | (define-public java-cdi-api | |
9159 | (package | |
9160 | (name "java-cdi-api") | |
9161 | (version "2.0") | |
9162 | (source (origin | |
9163 | (method url-fetch) | |
9164 | (uri (string-append "https://github.com/cdi-spec/cdi/archive/" | |
9165 | version ".tar.gz")) | |
9166 | (file-name (string-append name "-" version ".tar.gz")) | |
9167 | (sha256 | |
9168 | (base32 | |
9169 | "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y")))) | |
9170 | (build-system ant-build-system) | |
9171 | (arguments | |
9172 | `(#:source-dir "api/src/main/java" | |
9173 | #:jar-name "java-cdi-api.jar" | |
9174 | #:test-dir "api/src/test" | |
9175 | #:jdk ,icedtea-8 | |
9176 | #:tests? #f)); Tests fail because we don't have a CDI provider yet | |
9177 | (inputs | |
9178 | `(("java-javax-inject" ,java-javax-inject) | |
9179 | ("java-jboss-el-api-spec" ,java-jboss-el-api-spec) | |
9180 | ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec))) | |
9181 | (native-inputs | |
9182 | `(("java-testng" ,java-testng) | |
9183 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
9184 | (home-page "http://cdi-spec.org/") | |
9185 | (synopsis "Contexts and Dependency Injection APIs") | |
9186 | (description "Java-cdi-api contains the required APIs for Contexts and | |
9187 | Dependency Injection (CDI).") | |
9188 | (license license:asl2.0))) | |
d57fd728 JL |
9189 | |
9190 | (define-public java-joda-convert | |
9191 | (package | |
9192 | (name "java-joda-convert") | |
9193 | (version "1.9.2") | |
9194 | (source (origin | |
9195 | (method url-fetch) | |
9196 | (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v" | |
9197 | version ".tar.gz")) | |
9198 | (file-name (string-append name "-" version ".tar.gz")) | |
9199 | (sha256 | |
9200 | (base32 | |
9201 | "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7")))) | |
9202 | (build-system ant-build-system) | |
9203 | (arguments | |
9204 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
9205 | #:source-dir "src/main/java" | |
9206 | #:test-include (list "**/Test*.java") | |
9207 | ;; Contains only interfaces and base classes (no test) | |
9208 | #:test-exclude (list "**/test*/**.java"))) | |
9209 | (inputs | |
9210 | `(("java-guava" ,java-guava))) | |
9211 | (native-inputs | |
9212 | `(("java-junit" ,java-junit) | |
9213 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
9214 | (home-page "http://www.joda.org/joda-convert/") | |
9215 | (synopsis "Conversion between Objects and Strings") | |
9216 | (description "Joda-Convert provides a small set of classes to aid | |
9217 | conversion between Objects and Strings. It is not intended to tackle the | |
9218 | wider problem of Object to Object transformation.") | |
9219 | (license license:asl2.0))) | |
0158ea8a JL |
9220 | |
9221 | (define-public java-joda-time | |
9222 | (package | |
9223 | (name "java-joda-time") | |
9224 | (version "2.9.9") | |
9225 | (source (origin | |
9226 | (method url-fetch) | |
9227 | (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v" | |
9228 | version ".tar.gz")) | |
9229 | (file-name (string-append name "-" version ".tar.gz")) | |
9230 | (sha256 | |
9231 | (base32 | |
9232 | "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1")))) | |
9233 | (build-system ant-build-system) | |
9234 | (arguments | |
9235 | `(#:jar-name "java-joda-time.jar" | |
9236 | #:source-dir "src/main/java" | |
9237 | #:test-include (list "**/Test*.java") | |
9238 | ;; There is no runnable test in these files | |
9239 | #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java") | |
9240 | #:phases | |
9241 | (modify-phases %standard-phases | |
9242 | (add-after 'build 'build-resources | |
9243 | (lambda _ | |
9244 | (mkdir-p "build/classes/org/joda/time/tz/data") | |
9245 | (mkdir-p "build/classes/org/joda/time/format") | |
6d0368eb JL |
9246 | ;; This will produce the following exception: |
9247 | ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap" | |
9248 | ;; which is normal, because it doesn't exist yet. It still generates | |
9249 | ;; the same file as in the binary one can find on maven. | |
9250 | (invoke "java" "-cp" | |
9251 | (string-append "build/classes:" (getenv "CLASSPATH")) | |
9252 | "org.joda.time.tz.ZoneInfoCompiler" | |
9253 | "-src" "src/main/java/org/joda/time/tz/src" | |
9254 | "-dst" "build/classes/org/joda/time/tz/data" | |
9255 | "africa" "antarctica" "asia" "australasia" | |
9256 | "europe" "northamerica" "southamerica" | |
9257 | "pacificnew" "etcetera" "backward" "systemv") | |
0158ea8a JL |
9258 | (for-each (lambda (f) |
9259 | (copy-file f (string-append | |
9260 | "build/classes/org/joda/time/format/" | |
9261 | (basename f)))) | |
9262 | (find-files "src/main/java/org/joda/time/format" ".*.properties")) | |
9263 | #t)) | |
9264 | (add-before 'install 'regenerate-jar | |
9265 | (lambda _ | |
9266 | ;; We need to regenerate the jar file to add generated data. | |
9267 | (delete-file "build/jar/java-joda-time.jar") | |
6d0368eb | 9268 | (invoke "ant" "jar"))) |
0158ea8a JL |
9269 | (add-before 'check 'copy-test-resources |
9270 | (lambda _ | |
9271 | (mkdir-p "build/test-classes/org/joda/time/tz/data") | |
9272 | (copy-file "src/test/resources/tzdata/ZoneInfoMap" | |
9273 | "build/test-classes/org/joda/time/tz/data/ZoneInfoMap") | |
9274 | (copy-recursively "src/test/resources" "build/test-classes") | |
9275 | #t))))) | |
9276 | (inputs | |
9277 | `(("java-joda-convert" ,java-joda-convert))) | |
9278 | (native-inputs | |
9279 | `(("java-junit" ,java-junit) | |
9280 | ("java-hamcrest-core" ,java-hamcrest-core) | |
9281 | ("tzdata" ,tzdata))) | |
9282 | (home-page "http://www.joda.org/joda-time/") | |
9283 | (synopsis "Replacement for the Java date and time classes") | |
9284 | (description "Joda-Time is a replacement for the Java date and time | |
9285 | classes prior to Java SE 8.") | |
9286 | (license license:asl2.0))) | |
6d0368eb JL |
9287 | |
9288 | (define-public java-xerces | |
9289 | (package | |
9290 | (name "java-xerces") | |
9291 | (version "2.11.0") | |
9292 | (source | |
9293 | (origin | |
9294 | (method url-fetch) | |
9295 | (uri (string-append "mirror://apache/xerces/j/source/" | |
9296 | "Xerces-J-src." version ".tar.gz")) | |
9297 | (sha256 | |
9298 | (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm")) | |
9299 | (patches (search-patches | |
9300 | "java-xerces-xjavac_taskdef.patch" | |
9301 | "java-xerces-build_dont_unzip.patch" | |
9302 | "java-xerces-bootclasspath.patch")))) | |
9303 | (build-system ant-build-system) | |
9304 | (arguments | |
9305 | `(#:tests? #f;; Test files are not present | |
9306 | #:test-target "test" | |
9307 | #:jdk ,icedtea-8 | |
9308 | #:phases | |
9309 | (modify-phases %standard-phases | |
9310 | (add-after 'unpack 'create-build.properties | |
9311 | (lambda* (#:key inputs #:allow-other-keys) | |
9312 | (let ((jaxp (assoc-ref inputs "java-jaxp")) | |
9313 | (resolver (assoc-ref inputs "java-apache-xml-commons-resolver"))) | |
9314 | (with-output-to-file "build.properties" | |
9315 | (lambda _ | |
9316 | (format #t | |
9317 | "jar.jaxp = ~a/share/java/jaxp.jar~@ | |
9318 | jar.apis-ext = ~a/share/java/jaxp.jar~@ | |
9319 | jar.resolver = ~a/share/java/xml-resolver.jar~%" | |
9320 | jaxp jaxp resolver))) | |
9321 | ;; Make xerces use our version of jaxp in tests | |
9322 | (substitute* "build.xml" | |
9323 | (("xml-apis.jar") | |
9324 | (string-append jaxp "/share/java/jaxp.jar")) | |
9325 | (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}") | |
9326 | "${jar.apis}"))) | |
9327 | #t)) | |
9328 | (replace 'install (install-jars "build"))))) | |
9329 | (inputs | |
9330 | `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver) | |
9331 | ("java-jaxp" ,java-jaxp))) | |
9332 | (home-page "https://xerces.apache.org/xerces2-j/") | |
9333 | (synopsis "Validating XML parser for Java with DOM level 3 support") | |
9334 | (description "The Xerces2 Java parser is the reference implementation of | |
9335 | XNI, the Xerces Native Interface, and also a fully conforming XML Schema | |
9336 | processor. | |
9337 | ||
9338 | Xerces2-J supports the following standards and APIs: | |
9339 | ||
9340 | @itemize | |
9341 | @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation | |
9342 | @item Namespaces in XML Recommendation | |
9343 | @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and | |
9344 | Range Recommendations | |
9345 | @item Simple API for XML (SAX) 2.0.1 Core and Extension | |
9346 | @item Java APIs for XML Processing (JAXP) 1.2.01 | |
9347 | @item XML Schema 1.0 Structures and Datatypes Recommendations | |
9348 | @item Experimental implementation of the Document Object Model (DOM) Level 3 | |
9349 | Core and Load/Save Working Drafts | |
9350 | @item Provides a partial implementation of the XML Inclusions (XInclude) W3C | |
9351 | Candidate Recommendation | |
9352 | @end itemize | |
9353 | ||
9354 | Xerces is now able to parse documents written according to the XML 1.1 | |
9355 | Candidate Recommendation, except that it does not yet provide an option to | |
9356 | enable normalization checking as described in section 2.13 of this | |
9357 | specification. It also handles namespaces according to the XML Namespaces 1.1 | |
9358 | Candidate Recommendation, and will correctly serialize XML 1.1 documents if | |
9359 | the DOM level 3 load/save API's are in use.") | |
9360 | (license license:asl2.0))) | |
e06bf428 JL |
9361 | |
9362 | (define-public java-jline | |
9363 | (package | |
9364 | (name "java-jline") | |
9365 | (version "1.0") | |
9366 | (source (origin | |
9367 | (method url-fetch) | |
9368 | (uri (string-append "https://github.com/jline/jline1/archive/jline-" | |
9369 | version ".tar.gz")) | |
9370 | (sha256 | |
9371 | (base32 | |
9372 | "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir")))) | |
9373 | (build-system ant-build-system) | |
9374 | (arguments | |
9375 | `(#:jar-name "jline.jar" | |
9376 | #:source-dir "src/main/java" | |
9377 | #:test-dir "src/test" | |
9378 | #:phases | |
9379 | (modify-phases %standard-phases | |
9380 | (add-before 'build 'copy-resources | |
9381 | (lambda _ | |
9382 | (copy-recursively "src/main/resources" "build/classes") | |
9383 | #t))))) | |
9384 | (native-inputs | |
9385 | `(("java-junit" ,java-junit))) | |
9386 | (home-page "https://jline.github.io") | |
9387 | (synopsis "Console input handling library") | |
9388 | (description "JLine is a Java library for handling console input. It is | |
9389 | similar in functionality to BSD editline and GNU readline but with additional | |
9390 | features that bring it on par with the Z shell line editor.") | |
9391 | (license license:bsd-3))) | |
7ac4f054 | 9392 | |
49d74311 JL |
9393 | (define-public java-jline-2 |
9394 | (package | |
9395 | (inherit java-jline) | |
9396 | (version "2.14.5") | |
9397 | (source (origin | |
9398 | (method url-fetch) | |
9399 | (uri (string-append "https://github.com/jline/jline2/archive/jline-" | |
9400 | version ".tar.gz")) | |
9401 | (sha256 | |
9402 | (base32 | |
9403 | "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf")))) | |
9404 | (arguments | |
9405 | `(#:jdk ,icedtea-8 | |
9406 | ,@(package-arguments java-jline))) | |
9407 | (inputs | |
9408 | `(("java-jansi" ,java-jansi) | |
9409 | ("java-jansi-native" ,java-jansi-native))) | |
9410 | (native-inputs | |
9411 | `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4) | |
9412 | ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common) | |
9413 | ("java-powermock-api-easymock" ,java-powermock-api-easymock) | |
9414 | ("java-powermock-api-support" ,java-powermock-api-support) | |
9415 | ("java-powermock-core" ,java-powermock-core) | |
9416 | ("java-powermock-reflect" ,java-powermock-reflect) | |
9417 | ("java-easymock" ,java-easymock) | |
9418 | ("java-jboss-javassist" ,java-jboss-javassist) | |
9419 | ("java-objenesis" ,java-objenesis) | |
9420 | ("java-asm" ,java-asm) | |
9421 | ("java-hamcrest-core" ,java-hamcrest-core) | |
9422 | ("java-cglib" ,java-cglib) | |
9423 | ("java-junit" ,java-junit) | |
9424 | ("java-hawtjni" ,java-hawtjni))))) | |
9425 | ||
7ac4f054 JL |
9426 | (define-public java-xmlunit |
9427 | (package | |
9428 | (name "java-xmlunit") | |
9429 | (version "2.5.1") | |
9430 | (source (origin | |
9431 | (method url-fetch) | |
9432 | (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v" | |
9433 | version ".tar.gz")) | |
9434 | (file-name (string-append name "-" version ".tar.gz")) | |
9435 | (sha256 | |
9436 | (base32 | |
9437 | "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z")))) | |
9438 | (build-system ant-build-system) | |
9439 | (arguments | |
9440 | `(#:jar-name "java-xmlunit.jar" | |
9441 | #:source-dir "xmlunit-core/src/main/java" | |
9442 | #:test-dir "xmlunit-core/src/test" | |
9443 | #:phases | |
9444 | (modify-phases %standard-phases | |
9445 | (add-before 'check 'copy-test-resources | |
9446 | (lambda* (#:key inputs #:allow-other-keys) | |
9447 | (copy-recursively (assoc-ref inputs "resources") "../test-resources") | |
9448 | #t))))) | |
9449 | (native-inputs | |
9450 | `(("java-junit" ,java-junit) | |
9451 | ("java-mockito-1" ,java-mockito-1) | |
9452 | ("java-hamcrest-all" ,java-hamcrest-all) | |
9453 | ("java-objenesis" ,java-objenesis) | |
9454 | ("java-asm" ,java-asm) | |
9455 | ("java-cglib" ,java-cglib) | |
9456 | ("resources" | |
9457 | ,(origin | |
9458 | (method git-fetch) | |
9459 | (uri (git-reference | |
9460 | (url "https://github.com/xmlunit/test-resources.git") | |
9461 | (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec"))) | |
9462 | (file-name "java-xmlunit-test-resources") | |
9463 | (sha256 | |
9464 | (base32 | |
9465 | "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr")))))) | |
9466 | (home-page "http://www.xmlunit.org/") | |
9467 | (synopsis "XML output testing") | |
9468 | (description "XMLUnit provides you with the tools to verify the XML you | |
9469 | emit is the one you want to create. It provides helpers to validate against | |
9470 | an XML Schema, assert the values of XPath queries or compare XML documents | |
9471 | against expected outcomes.") | |
9472 | (license license:asl2.0))) | |
73a1f10a JL |
9473 | |
9474 | (define-public java-xmlunit-legacy | |
9475 | (package | |
9476 | (inherit java-xmlunit) | |
9477 | (name "java-xmlunit-legacy") | |
9478 | (arguments | |
9479 | `(#:jar-name "java-xmlunit-legacy.jar" | |
9480 | #:source-dir "xmlunit-legacy/src/main/java" | |
9481 | #:test-dir "xmlunit-legacy/src/test")) | |
9482 | (inputs | |
9483 | `(("java-xmlunit" ,java-xmlunit) | |
9484 | ("java-junit" ,java-junit))) | |
9485 | (native-inputs | |
9486 | `(("java-mockito-1" ,java-mockito-1))))) | |
93abc975 RW |
9487 | |
9488 | (define-public java-openchart2 | |
9489 | (package | |
9490 | (name "java-openchart2") | |
9491 | (version "1.4.3") | |
9492 | (source (origin | |
9493 | (method url-fetch) | |
9494 | (uri (string-append "http://download.approximatrix.com/openchart2/" | |
9495 | "openchart2-" version ".source.zip")) | |
9496 | (sha256 | |
9497 | (base32 | |
9498 | "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g")))) | |
9499 | (build-system ant-build-system) | |
9500 | (arguments | |
9501 | `(#:test-target "test" | |
9502 | #:phases | |
9503 | (modify-phases %standard-phases | |
9504 | (add-after 'unpack 'fix-junit-errors | |
9505 | (lambda _ | |
9506 | (with-directory-excursion "unittest/src/com/approximatrix/charting/" | |
9507 | (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java" | |
9508 | "coordsystem/ticklocator/NumericYTickLocatorTest.java" | |
9509 | "coordsystem/ticklocator/ObjectXTickLocatorTest.java" | |
9510 | "model/DefaultChartDataModelConstraintsTest.java" | |
9511 | "model/MultiScatterDataModelConstraintsTest.java" | |
9512 | "model/threedimensional/DotPlotDataModelConstraintsTest.java") | |
9513 | (("(assertEquals[^;]+);" before _) | |
9514 | (string-append (string-drop-right before 2) ", 1E-6);")))) | |
9515 | #t)) | |
9516 | (replace 'install (install-jars "."))))) | |
9517 | (native-inputs | |
9518 | `(("unzip" ,unzip) | |
9519 | ("java-junit" ,java-junit) | |
9520 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
9521 | (home-page "http://approximatrix.com/products/openchart2/") | |
9522 | (synopsis "Simple plotting for Java") | |
9523 | (description "Openchart2 provides a simple, yet powerful, interface for | |
9524 | Java programmers to create two-dimensional charts and plots. The library | |
9525 | features an assortment of graph styles, including advanced scatter plots, bar | |
9526 | graphs, and pie charts.") | |
9527 | (license license:lgpl2.1+))) | |
5f5b31c6 JL |
9528 | |
9529 | (define-public java-commons-httpclient | |
9530 | (package | |
9531 | (name "java-commons-httpclient") | |
9532 | (version "3.1") | |
9533 | (source (origin | |
9534 | (method url-fetch) | |
9535 | (uri (string-append "https://archive.apache.org/dist/httpcomponents/" | |
9536 | "commons-httpclient/source/commons-httpclient-" | |
9537 | version "-src.tar.gz")) | |
9538 | (sha256 | |
9539 | (base32 | |
9540 | "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r")))) | |
9541 | (build-system ant-build-system) | |
9542 | (arguments | |
9543 | `(#:build-target "compile" | |
9544 | #:test-target "test" | |
9545 | #:tests? #f; requires junit-textui (junit 3) | |
9546 | #:phases | |
9547 | (modify-phases %standard-phases | |
9548 | (add-before 'build 'fix-accent | |
9549 | (lambda _ | |
9550 | (for-each (lambda (file) | |
9551 | (with-fluids ((%default-port-encoding "ISO-8859-1")) | |
9552 | (substitute* file | |
9553 | (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n")))) | |
9554 | '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java" | |
9555 | "src/examples/TrivialApp.java" "src/examples/ClientApp.java" | |
9556 | "src/test/org/apache/commons/httpclient/TestHttps.java" | |
9557 | "src/test/org/apache/commons/httpclient/TestURIUtil2.java")))) | |
9558 | (replace 'install | |
9559 | (lambda* (#:key outputs #:allow-other-keys) | |
9560 | (invoke "ant" "dist" | |
9561 | (string-append "-Ddist.home=" (assoc-ref outputs "out") | |
9562 | "/share/java")) | |
9563 | #t))))) | |
9564 | (propagated-inputs | |
9565 | `(("java-commons-logging" ,java-commons-logging-minimal) | |
9566 | ("java-commons-codec" ,java-commons-codec))) | |
9567 | (home-page "https://hc.apache.org") | |
9568 | (synopsis "HTTP/1.1 compliant HTTP agent implementation") | |
9569 | (description "This package contains an HTTP/1.1 compliant HTTP agent | |
9570 | implementation. It also provides reusable components for client-side | |
9571 | authentication, HTTP state management, and HTTP connection management.") | |
9572 | (license license:asl2.0))) | |
5fe981dc JL |
9573 | |
9574 | (define-public java-commons-vfs | |
9575 | (package | |
9576 | (name "java-commons-vfs") | |
9577 | (version "2.2") | |
9578 | (source (origin | |
9579 | (method url-fetch) | |
9580 | (uri (string-append "mirror://apache/commons/vfs/source/" | |
9581 | "commons-vfs2-distribution-" version "-src.tar.gz")) | |
9582 | (file-name (string-append name "-" version ".tar.gz")) | |
9583 | (sha256 | |
9584 | (base32 | |
9585 | "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3")) | |
9586 | (modules '((guix build utils))) | |
9587 | (snippet | |
9588 | '(begin | |
9589 | (for-each delete-file | |
9590 | (find-files "." "\\.jar$")) | |
9591 | #t)))) | |
9592 | (build-system ant-build-system) | |
9593 | (arguments | |
9594 | `(#:jar-name "commons-vfs.jar" | |
9595 | #:source-dir "commons-vfs2/src/main/java" | |
9596 | #:test-dir "commons-vfs2/src/test" | |
9597 | ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ... | |
9598 | #:tests? #f | |
9599 | #:phases | |
9600 | (modify-phases %standard-phases | |
9601 | (add-before 'build 'remove-hadoop-and-webdav | |
9602 | ; Remove these files as they are not required and depend on difficult | |
9603 | ; packages. | |
9604 | (lambda _ | |
9605 | (for-each delete-file-recursively | |
9606 | '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav" | |
9607 | "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))))))) | |
9608 | (inputs | |
9609 | `(("java-commons-collections4" ,java-commons-collections4) | |
9610 | ("java-commons-compress" ,java-commons-compress) | |
9611 | ("java-commons-httpclient" ,java-commons-httpclient) | |
9612 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
9613 | ("java-commons-net" ,java-commons-net) | |
9614 | ("java-jsch" ,java-jsch))) | |
9615 | (home-page "http://commons.apache.org/proper/commons-vfs/") | |
9616 | (synopsis "Java filesystem library") | |
9617 | (description "Commons VFS provides a single API for accessing various | |
9618 | different file systems. It presents a uniform view of the files from various | |
9619 | different sources, such as the files on local disk, on an HTTP server, or | |
9620 | inside a Zip archive.") | |
9621 | (license license:asl2.0))) | |
f7b512c0 JL |
9622 | |
9623 | (define-public java-jakarta-oro | |
9624 | (package | |
9625 | (name "java-jakarta-oro") | |
9626 | (version "2.0.8") | |
9627 | (source (origin | |
9628 | (method url-fetch) | |
9629 | (uri (string-append "https://archive.apache.org/dist/jakarta/oro/" | |
9630 | "jakarta-oro-" version ".tar.gz")) | |
9631 | (sha256 | |
9632 | (base32 | |
9633 | "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc")) | |
9634 | (modules '((guix build utils))) | |
9635 | (snippet | |
9636 | `(begin | |
9637 | (delete-file (string-append "jakarta-oro-" ,version ".jar")) | |
9638 | #t)))) | |
9639 | (build-system ant-build-system) | |
9640 | (arguments | |
9641 | `(#:build-target "package" | |
9642 | #:tests? #f; tests are run as part of the build process | |
9643 | #:phases | |
9644 | (modify-phases %standard-phases | |
9645 | (replace 'install | |
9646 | (install-jars ,(string-append "jakarta-oro-" version)))))) | |
9647 | (home-page "https://jakarta.apache.org/oro/") | |
9648 | (synopsis "Text-processing for Java") | |
9649 | (description "The Jakarta-ORO Java classes are a set of text-processing | |
9650 | Java classes that provide Perl5 compatible regular expressions, AWK-like | |
9651 | regular expressions, glob expressions, and utility classes for performing | |
9652 | substitutions, splits, filtering filenames, etc. This library is the successor | |
9653 | of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally | |
9654 | from ORO, Inc.") | |
9655 | (license license:asl1.1))) | |
a970288c JL |
9656 | |
9657 | (define-public java-native-access | |
9658 | (package | |
9659 | (name "java-native-access") | |
9660 | (version "4.5.1") | |
9661 | (source (origin | |
9662 | (method url-fetch) | |
9663 | (uri (string-append "https://github.com/java-native-access/jna/" | |
9664 | "archive/" version ".tar.gz")) | |
9665 | (file-name (string-append name "-" version ".tar.gz")) | |
9666 | (sha256 | |
9667 | (base32 | |
9668 | "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9")) | |
9669 | (modules '((guix build utils))) | |
9670 | (snippet | |
9671 | `(begin | |
9672 | (for-each delete-file (find-files "." ".*.jar")) | |
9673 | (delete-file-recursively "native/libffi") | |
9674 | (delete-file-recursively "dist") | |
9675 | #t)))) | |
9676 | (build-system ant-build-system) | |
9677 | (arguments | |
9678 | `(#:tests? #f; FIXME: tests require reflections.jar | |
9679 | #:test-target "test" | |
9680 | #:make-flags (list "-Ddynlink.native=true") | |
9681 | #:phases | |
9682 | (modify-phases %standard-phases | |
9683 | (add-before 'build 'fix-build.xml | |
9684 | (lambda* (#:key inputs #:allow-other-keys) | |
9685 | (substitute* "build.xml" | |
9686 | ;; Since we removed the bundled ant.jar, give the correct path | |
9687 | (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar")) | |
9688 | ;; We removed generated native libraries. We can only rebuild one | |
9689 | ;; so don't fail if we can't find a native library for another architecture. | |
9690 | (("zipfileset") "zipfileset erroronmissingarchive=\"false\"")) | |
9691 | ;; Copy test dependencies | |
9692 | (copy-file (string-append (assoc-ref inputs "java-junit") | |
9693 | "/share/java/junit.jar") | |
9694 | "lib/junit.jar") | |
9695 | (copy-file (string-append (assoc-ref inputs "java-hamcrest-core") | |
9696 | "/share/java/hamcrest-core.jar") | |
9697 | "lib/hamcrest-core.jar") | |
9698 | ;; FIXME: once reflections.jar is built, copy it to lib/test. | |
9699 | #t)) | |
9700 | (add-before 'build 'build-native | |
9701 | (lambda _ | |
9702 | (invoke "ant" "-Ddynlink.native=true" "native") | |
9703 | #t)) | |
9704 | (replace 'install | |
9705 | (install-jars "build"))))) | |
9706 | (inputs | |
9707 | `(("libffi" ,libffi) | |
9708 | ("libx11" ,libx11) | |
9709 | ("libxt" ,libxt))) | |
9710 | (native-inputs | |
9711 | `(("java-junit" ,java-junit) | |
9712 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
9713 | (home-page "https://github.com/java-native-access/jna") | |
9714 | (synopsis "Access to native shared libraries from Java") | |
9715 | (description "JNA provides Java programs easy access to native shared | |
9716 | libraries without writing anything but Java code - no JNI or native code is | |
9717 | required. JNA allows you to call directly into native functions using natural | |
9718 | Java method invocation.") | |
9719 | ;; Java Native Access project (JNA) is dual-licensed under 2 | |
9720 | ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0. | |
9721 | (license (list | |
9722 | license:asl2.0 | |
9723 | license:lgpl2.1+)))) | |
cfb55cfc JL |
9724 | |
9725 | (define-public java-native-access-platform | |
9726 | (package | |
9727 | (inherit java-native-access) | |
9728 | (name "java-native-access-platform") | |
9729 | (arguments | |
9730 | `(#:test-target "test" | |
9731 | #:tests? #f; require jna-test.jar | |
9732 | #:phases | |
9733 | (modify-phases %standard-phases | |
9734 | (add-before 'build 'chdir | |
9735 | (lambda _ | |
9736 | (chdir "contrib/platform") | |
9737 | #t)) | |
9738 | (add-after 'chdir 'fix-ant | |
9739 | (lambda* (#:key inputs #:allow-other-keys) | |
9740 | (substitute* "nbproject/project.properties" | |
9741 | (("../../build/jna.jar") | |
9742 | (string-append (assoc-ref inputs "java-native-access") | |
9743 | "/share/java/jna.jar")) | |
9744 | (("../../lib/hamcrest-core-.*.jar") | |
9745 | (string-append (assoc-ref inputs "java-hamcrest-core") | |
9746 | "/share/java/hamcrest-core.jar")) | |
9747 | (("../../lib/junit.jar") | |
9748 | (string-append (assoc-ref inputs "java-junit") | |
9749 | "/share/java/junit.jar"))) | |
9750 | #t)) | |
9751 | (replace 'install | |
9752 | (install-jars "dist"))))) | |
9753 | (inputs | |
9754 | `(("java-native-access" ,java-native-access))) | |
9755 | (synopsis "Cross-platform mappings for jna") | |
9756 | (description "java-native-access-platfrom has cross-platform mappings | |
9757 | and mappings for a number of commonly used platform functions, including a | |
9758 | large number of Win32 mappings as well as a set of utility classes that | |
9759 | simplify native access."))) | |
470674a5 JL |
9760 | |
9761 | (define-public java-jsch-agentproxy-core | |
9762 | (package | |
9763 | (name "java-jsch-agentproxy-core") | |
9764 | (version "0.0.8") | |
9765 | (source (origin | |
9766 | (method url-fetch) | |
9767 | (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/" | |
9768 | version ".tar.gz")) | |
9769 | (file-name (string-append name "-" version ".tar.gz")) | |
9770 | (sha256 | |
9771 | (base32 | |
9772 | "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q")))) | |
9773 | (build-system ant-build-system) | |
9774 | (arguments | |
9775 | `(#:jar-name "jsch-agentproxy-core.jar" | |
9776 | #:source-dir "jsch-agent-proxy-core/src/main/java" | |
9777 | #:tests? #f)); no tests | |
9778 | (home-page "https://github.com/ymnk/jsch-agent-proxy") | |
f1d79c97 | 9779 | (synopsis "Core component of the proxy to ssh-agent and Pageant in Java") |
470674a5 JL |
9780 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
9781 | and Pageant included Putty. It will be easily integrated into JSch, and users | |
9782 | will be allowed to use these programs for authentication.") | |
9783 | (license license:bsd-3))) | |
f1d79c97 JL |
9784 | |
9785 | (define-public java-jsch-agentproxy-sshagent | |
9786 | (package | |
9787 | (inherit java-jsch-agentproxy-core) | |
9788 | (name "java-jsch-agentproxy-sshagent") | |
9789 | (arguments | |
9790 | `(#:jar-name "jsch-agentproxy-sshagent.jar" | |
9791 | #:source-dir "jsch-agent-proxy-sshagent/src/main/java" | |
9792 | #:tests? #f)); no tests | |
9793 | (inputs | |
9794 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) | |
9795 | (synopsis "Proxy to ssh-agent") | |
9796 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
9797 | and Pageant included in Putty. This component contains the code for a proxy to | |
9798 | ssh-agent."))) | |
f438e638 JL |
9799 | |
9800 | (define-public java-jsch-agentproxy-usocket-jna | |
9801 | (package | |
9802 | (inherit java-jsch-agentproxy-core) | |
9803 | (name "java-jsch-agentproxy-usocket-jna") | |
9804 | (arguments | |
9805 | `(#:jar-name "jsch-agentproxy-usocket-jna.jar" | |
9806 | #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java" | |
9807 | #:tests? #f)); no tests | |
9808 | (inputs | |
9809 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
9810 | ("java-native-access" ,java-native-access))) | |
9811 | (synopsis "USocketFactory implementation using JNA") | |
9812 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
9813 | and Pageant included in Putty. This component contains an implementation of | |
9814 | USocketFactory using @dfn{JNA} (Java Native Access)."))) | |
475225e3 JL |
9815 | |
9816 | (define-public java-jsch-agentproxy-pageant | |
9817 | (package | |
9818 | (inherit java-jsch-agentproxy-core) | |
9819 | (name "java-jsch-agentproxy-pageant") | |
9820 | (arguments | |
9821 | `(#:jar-name "jsch-agentproxy-pageant.jar" | |
9822 | #:source-dir "jsch-agent-proxy-pageant/src/main/java" | |
9823 | #:tests? #f)); no tests | |
9824 | (inputs | |
9825 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
9826 | ("java-native-access" ,java-native-access) | |
9827 | ("java-native-access-platform" ,java-native-access-platform))) | |
9828 | (synopsis "Proxy to pageant") | |
9829 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
9830 | and Pageant included in Putty. This component contains the code for a proxy to | |
9831 | pageant."))) | |
96d6d9c7 JL |
9832 | |
9833 | (define-public java-jsch-agentproxy-usocket-nc | |
9834 | (package | |
9835 | (inherit java-jsch-agentproxy-core) | |
9836 | (name "java-jsch-agentproxy-usocket-nc") | |
9837 | (arguments | |
9838 | `(#:jar-name "jsch-agentproxy-usocket-nc.jar" | |
9839 | #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java" | |
9840 | #:tests? #f)); no tests | |
9841 | (inputs | |
9842 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) | |
9843 | (synopsis "USocketFactory implementation using netcat") | |
9844 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
9845 | and Pageant included in Putty. This component contains an implementation of | |
9846 | USocketFactory using netcat."))) | |
5a46b17b JL |
9847 | |
9848 | (define-public java-jsch-agentproxy-connector-factory | |
9849 | (package | |
9850 | (inherit java-jsch-agentproxy-core) | |
9851 | (name "java-jsch-agentproxy-connector-factory") | |
9852 | (arguments | |
9853 | `(#:jar-name "jsch-agentproxy-connector-factory.jar" | |
9854 | #:source-dir "jsch-agent-proxy-connector-factory/src/main/java" | |
9855 | #:tests? #f)); no tests | |
9856 | (inputs | |
9857 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
9858 | ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent) | |
9859 | ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna) | |
9860 | ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant) | |
9861 | ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc))) | |
9862 | (synopsis "Connector factory for jsch agent proxy") | |
9863 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
9864 | and Pageant included in Putty. This component contains a connector factory."))) | |
b0fbf596 JL |
9865 | |
9866 | (define-public java-jsch-agentproxy-jsch | |
9867 | (package | |
9868 | (inherit java-jsch-agentproxy-core) | |
9869 | (name "java-jsch-agentproxy-jsch") | |
9870 | (arguments | |
9871 | `(#:jar-name "jsch-agentproxy-jsch.jar" | |
9872 | #:source-dir "jsch-agent-proxy-jsch/src/main/java" | |
9873 | #:tests? #f)); no tests | |
9874 | (inputs | |
9875 | `(("java-jsch" ,java-jsch) | |
9876 | ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) | |
9877 | (synopsis "JSch integration library for agentproxy") | |
9878 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent | |
9879 | and Pageant included in Putty. This component contains a library to use | |
9880 | jsch-agent-proxy with JSch."))) | |
f1f4a4f0 JL |
9881 | |
9882 | (define-public java-apache-ivy | |
9883 | (package | |
9884 | (name "java-apache-ivy") | |
9885 | (version "2.4.0") | |
9886 | (source (origin | |
9887 | (method url-fetch) | |
9888 | (uri (string-append "mirror://apache//ant/ivy/" version | |
9889 | "/apache-ivy-" version "-src.tar.gz")) | |
9890 | (sha256 | |
9891 | (base32 | |
9892 | "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0")) | |
9893 | (patches | |
9894 | (search-patches | |
9895 | "java-apache-ivy-port-to-latest-bouncycastle.patch")))) | |
9896 | (build-system ant-build-system) | |
9897 | (arguments | |
9898 | `(#:jar-name "ivy.jar" | |
9899 | #:tests? #f | |
9900 | #:phases | |
9901 | (modify-phases %standard-phases | |
9902 | (add-before 'build 'remove-example | |
9903 | (lambda _ | |
9904 | (delete-file-recursively "src/example") | |
9905 | #t)) | |
9906 | (add-before 'build 'copy-resources | |
9907 | (lambda _ | |
9908 | (with-directory-excursion "src/java" | |
9909 | (for-each (lambda (file) | |
9910 | (install-file file (string-append "../../build/classes/" (dirname file)))) | |
9911 | (append | |
9912 | (find-files "." ".*.css") | |
9913 | (find-files "." ".*.ent") | |
9914 | (find-files "." ".*.html") | |
9915 | (find-files "." ".*.properties") | |
9916 | (find-files "." ".*.xsd") | |
9917 | (find-files "." ".*.xsl") | |
9918 | (find-files "." ".*.xml")))))) | |
9919 | (add-before 'build 'fix-vfs | |
9920 | (lambda _ | |
9921 | (substitute* | |
9922 | '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java" | |
9923 | "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java") | |
9924 | (("import org.apache.commons.vfs") "import org.apache.commons.vfs2")) | |
9925 | #t)) | |
9926 | (add-before 'install 'copy-manifest | |
9927 | (lambda _ | |
9928 | (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF") | |
9929 | #t)) | |
9930 | (add-before 'install 'repack | |
9931 | (lambda _ | |
9932 | (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar" | |
9933 | "-C" "build/classes" ".") | |
9934 | #t)) | |
9935 | (add-after 'install 'install-bin | |
9936 | (lambda* (#:key outputs #:allow-other-keys) | |
9937 | (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) | |
9938 | (ivy (string-append bin "/ivy")) | |
9939 | (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar"))) | |
9940 | (mkdir-p bin) | |
9941 | (with-output-to-file ivy | |
9942 | (lambda _ | |
9943 | (display (string-append | |
9944 | "#!" (which "sh") "\n" | |
9945 | "if [[ -z $CLASSPATH ]]; then\n" | |
9946 | " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n" | |
9947 | "else\n" | |
9948 | " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n" | |
9949 | "fi\n" | |
9950 | (which "java") " -cp $cp org.apache.ivy.Main $@\n")))) | |
9951 | (chmod ivy #o755) | |
9952 | #t)))))) | |
9953 | (inputs | |
9954 | `(("java-bouncycastle" ,java-bouncycastle) | |
9955 | ("java-commons-cli" ,java-commons-cli) | |
9956 | ("java-commons-collections" ,java-commons-collections) | |
9957 | ("java-commons-httpclient" ,java-commons-httpclient) | |
9958 | ("java-commons-lang" ,java-commons-lang) | |
9959 | ("java-commons-vfs" ,java-commons-vfs) | |
9960 | ("java-jakarta-oro" ,java-jakarta-oro) | |
9961 | ("java-jsch" ,java-jsch) | |
9962 | ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) | |
9963 | ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory) | |
9964 | ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch) | |
9965 | ("java-junit" ,java-junit))) | |
9966 | (home-page "https://ant.apache.org/ivy") | |
9967 | (synopsis "Dependency manager for the Java programming language") | |
9968 | (description "Ivy is a tool for managing (recording, tracking, resolving | |
9969 | and reporting) project dependencies. It is characterized by the following: | |
9970 | ||
9971 | @itemize | |
9972 | @item flexibility and configurability - Ivy is essentially process agnostic | |
9973 | and is not tied to any methodology or structure. Instead it provides the | |
9974 | necessary flexibility and configurability to be adapted to a broad range | |
9975 | of dependency management and build processes. | |
9976 | @item tight integration with Apache Ant - while available as a standalone tool, | |
9977 | Ivy works particularly well with Apache Ant providing a number of | |
9978 | powerful Ant tasks ranging from dependency resolution to dependency | |
9979 | reporting and publication. | |
9980 | @end itemize") | |
9981 | (license license:asl2.0))) | |
1a1810f5 JL |
9982 | |
9983 | (define-public java-eclipse-sisu-inject | |
9984 | (package | |
9985 | (name "java-eclipse-sisu-inject") | |
9986 | (version "0.3.3") | |
9987 | (source (origin | |
9988 | (method url-fetch) | |
9989 | (uri (string-append "https://github.com/eclipse/sisu.inject/" | |
9990 | "archive/releases/" version ".tar.gz")) | |
9991 | (sha256 | |
9992 | (base32 | |
9993 | "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn")))) | |
9994 | (build-system ant-build-system) | |
9995 | (arguments | |
9996 | `(#:jar-name "eclipse-sisu-inject.jar" | |
9997 | #:source-dir "org.eclipse.sisu.inject/src" | |
9998 | #:jdk ,icedtea-8 | |
9999 | #:tests? #f)); no tests | |
10000 | (inputs | |
10001 | `(("java-guice" ,java-guice) | |
10002 | ("java-guice-servlet" ,java-guice-servlet) | |
10003 | ("java-javax-inject" ,java-javax-inject) | |
10004 | ("java-tomcat" ,java-tomcat) | |
10005 | ("java-junit" ,java-junit) | |
10006 | ("java-slf4j-api" ,java-slf4j-api) | |
10007 | ("java-jsr305" ,java-jsr305) | |
10008 | ("java-jsr250" ,java-jsr250) | |
10009 | ("java-cdi-api" ,java-cdi-api) | |
10010 | ("java-osgi-framework" ,java-osgi-framework) | |
10011 | ("java-osgi-util-tracker" ,java-osgi-util-tracker) | |
10012 | ("java-testng" ,java-testng))) | |
10013 | (home-page "https://www.eclipse.org/sisu/") | |
10014 | (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring") | |
10015 | (description "Sisu is a modular JSR330-based container that supports | |
10016 | classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses | |
10017 | Google-Guice to perform dependency injection and provide the core JSR330 | |
10018 | support, but removes the need to write explicit bindings in Guice modules. | |
10019 | Integration with other containers via the Eclipse Extension Registry and the | |
10020 | OSGi Service Registry is a goal of this project.") | |
10021 | (license license:epl1.0))) | |
7049dea1 JL |
10022 | |
10023 | (define-public java-eclipse-sisu-plexus | |
10024 | (package | |
10025 | (name "java-eclipse-sisu-plexus") | |
10026 | (version "0.3.3") | |
10027 | (source (origin | |
10028 | (method url-fetch) | |
10029 | (uri (string-append "https://github.com/eclipse/sisu.plexus/" | |
10030 | "archive/releases/" version ".tar.gz")) | |
10031 | (sha256 | |
10032 | (base32 | |
10033 | "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9")) | |
10034 | (modules '((guix build utils))) | |
10035 | (snippet | |
10036 | '(begin | |
10037 | (for-each delete-file (find-files "." ".*.jar")) | |
10038 | (rename-file "org.eclipse.sisu.plexus.tests/src" | |
10039 | "org.eclipse.sisu.plexus.tests/java") | |
10040 | #t)))) | |
10041 | (build-system ant-build-system) | |
10042 | (arguments | |
10043 | `(#:jar-name "eclipse-sisu-plexus.jar" | |
10044 | #:source-dir "org.eclipse.sisu.plexus/src" | |
10045 | #:test-dir "org.eclipse.sisu.plexus.tests" | |
10046 | #:test-exclude | |
10047 | (list | |
10048 | ;; This test fails probably because we can't generate the necessary | |
10049 | ;; meta-inf files. | |
10050 | "**/PlexusLoggingTest.*" | |
10051 | ;; FIXME: This test fails because of some injection error | |
10052 | "**/PlexusRequirementTest.*") | |
10053 | #:jdk ,icedtea-8 | |
10054 | #:phases | |
10055 | (modify-phases %standard-phases | |
10056 | (add-before 'build 'copy-resources | |
10057 | (lambda _ | |
10058 | (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml" | |
10059 | "build/classes/META-INF/plexus") | |
10060 | #t)) | |
10061 | (add-before 'check 'build-test-jar | |
10062 | (lambda _ | |
10063 | (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/" | |
10064 | (mkdir "build") | |
10065 | (with-directory-excursion "java" | |
10066 | (apply invoke "javac" "-cp" | |
10067 | (string-append (getenv "CLASSPATH") | |
10068 | ":../../../../../build/classes") | |
10069 | (find-files "." ".*.java")) | |
10070 | (for-each (lambda (file) (install-file file (string-append "../build/" file))) | |
10071 | (find-files "." ".*.jar"))) | |
10072 | (mkdir-p "build/META-INF/plexus") | |
10073 | (copy-file "resources/META-INF/plexus/components.xml" | |
10074 | "build/META-INF/plexus/components.xml") | |
10075 | (with-directory-excursion "build" | |
10076 | (invoke "jar" "cf" "../../../component-jar-0.1.jar" "."))) | |
10077 | (with-directory-excursion "org.eclipse.sisu.plexus.tests/" | |
10078 | (copy-recursively "META-INF" "../build/test-classes/META-INF") | |
10079 | (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java" | |
10080 | (("resources/component-jar") | |
10081 | "org.eclipse.sisu.plexus.tests/resources/component-jar"))) | |
10082 | #t))))) | |
10083 | (inputs | |
10084 | `(("java-plexus-classworlds" ,java-plexus-classworlds) | |
10085 | ("java-plexus-util" ,java-plexus-utils) | |
10086 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
10087 | ("java-osgi-framework" ,java-osgi-framework) | |
10088 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
10089 | ("java-guice" ,java-guice) | |
10090 | ("java-javax-inject" ,java-javax-inject) | |
10091 | ("java-slf4j-api" ,java-slf4j-api) | |
10092 | ("java-junit" ,java-junit))) | |
10093 | (native-inputs | |
10094 | `(("java-guava" ,java-guava) | |
10095 | ("java-aopalliance" ,java-aopalliance) | |
10096 | ("java-cglib" ,java-cglib) | |
10097 | ("java-asm" ,java-asm))) | |
10098 | (home-page "https://www.eclipse.org/sisu/") | |
10099 | (synopsis "Plexus support for the sisu container") | |
10100 | (description "Sisu is a modular JSR330-based container that supports | |
10101 | classpath scanning, auto-binding, and dynamic auto-wiring. This package | |
10102 | adds Plexus support to the Sisu-Inject container.") | |
10103 | (license license:epl1.0))) | |
3fa18fe7 JL |
10104 | |
10105 | (define-public java-commons-compiler | |
10106 | (package | |
10107 | (name "java-commons-compiler") | |
10108 | (version "3.0.8") | |
10109 | (source (origin | |
10110 | (method git-fetch) | |
10111 | (uri (git-reference | |
10112 | (url "https://github.com/janino-compiler/janino") | |
10113 | (commit "91aa95686d1e4ca3b16a984a03a38686572331b2"))) | |
10114 | (file-name (string-append name "-" version)) | |
10115 | (sha256 | |
10116 | (base32 | |
10117 | "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r")) | |
10118 | (modules '((guix build utils))) | |
10119 | (snippet | |
10120 | '(begin | |
10121 | (for-each delete-file | |
10122 | (find-files "." "\\.jar$")) | |
10123 | #t)))) | |
10124 | (build-system ant-build-system) | |
10125 | (arguments | |
10126 | `(#:jar-name "commons-compiler.jar" | |
10127 | #:source-dir "commons-compiler/src/main" | |
10128 | #:tests? #f)); no tests | |
10129 | (home-page "https://github.com/janino-compiler/janino") | |
10130 | (synopsis "Java compiler") | |
10131 | (description "Commons-compiler contains an API for janino, including the | |
10132 | @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator} | |
10133 | and @code{ISimpleCompiler} interfaces.") | |
10134 | (license license:bsd-3))) | |
3402e651 JL |
10135 | |
10136 | (define-public java-janino | |
10137 | (package | |
10138 | (inherit java-commons-compiler) | |
10139 | (name "java-janino") | |
10140 | (arguments | |
10141 | `(#:jar-name "janino.jar" | |
10142 | #:source-dir "src/main/java" | |
10143 | #:phases | |
10144 | (modify-phases %standard-phases | |
10145 | (add-before 'configure 'chdir | |
10146 | (lambda _ | |
10147 | (chdir "janino")))))) | |
10148 | (inputs | |
10149 | `(("java-commons-compiler" ,java-commons-compiler))) | |
10150 | (native-inputs | |
10151 | `(("java-junit" ,java-junit) | |
10152 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
10153 | (description "Janino is a Java compiler. Janino can compile a set of | |
10154 | source files to a set of class files like @code{javac}, but also compile a | |
10155 | Java expression, block, class body or source file in memory, load the bytecode | |
10156 | and execute it directly in the same JVM. @code{janino} can also be used for | |
10157 | static code analysis or code manipulation."))) | |
7d8207a4 JL |
10158 | |
10159 | (define-public java-logback-core | |
10160 | (package | |
10161 | (name "java-logback-core") | |
10162 | (version "1.2.3") | |
10163 | (source (origin | |
10164 | (method url-fetch) | |
10165 | (uri (string-append "https://github.com/qos-ch/logback/archive/v_" | |
10166 | version ".tar.gz")) | |
10167 | (sha256 | |
10168 | (base32 | |
10169 | "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi")) | |
10170 | (modules '((guix build utils))) | |
10171 | (snippet | |
10172 | '(delete-file-recursively "logback-access/lib")))) | |
10173 | (build-system ant-build-system) | |
10174 | (arguments | |
10175 | `(#:jar-name "logback.jar" | |
10176 | #:source-dir "src/main/java" | |
10177 | #:test-dir "src/test" | |
10178 | #:test-exclude | |
10179 | ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator | |
10180 | ;; which creates FastClasses | |
10181 | (list "**/AllCoreTest.*" | |
10182 | "**/AutoFlushingObjectWriterTest.*" | |
10183 | "**/PackageTest.*" | |
10184 | "**/ResilientOutputStreamTest.*" | |
10185 | ;; And we still don't want to run abstract classes | |
10186 | "**/Abstract*.*") | |
10187 | #:phases | |
10188 | (modify-phases %standard-phases | |
10189 | (add-before 'configure 'chdir | |
10190 | (lambda _ | |
10191 | (chdir "logback-core") | |
10192 | #t))))) | |
10193 | (inputs | |
10194 | `(("java-javax-mail" ,java-javax-mail) | |
10195 | ("java-tomcat" ,java-tomcat) | |
10196 | ("java-commons-compiler" ,java-commons-compiler) | |
10197 | ("java-janino" ,java-janino))) | |
10198 | (native-inputs | |
10199 | `(("java-junit" ,java-junit) | |
10200 | ("java-hamcrest-core" ,java-hamcrest-core) | |
10201 | ("java-mockito-1" ,java-mockito-1) | |
10202 | ("java-cglib" ,java-cglib) | |
10203 | ("java-asm" ,java-asm) | |
10204 | ("java-objenesis" ,java-objenesis) | |
10205 | ("java-joda-time" ,java-joda-time))) | |
10206 | (home-page "https://logback.qos.ch") | |
10207 | (synopsis "Logging for java") | |
10208 | (description "Logback is intended as a successor to the popular log4j project. | |
10209 | This module lays the groundwork for the other two modules.") | |
10210 | ;; Either epl1.0 or lgpl2.1 | |
10211 | (license (list license:epl1.0 | |
10212 | license:lgpl2.1)))) | |
3a69f5f2 JL |
10213 | |
10214 | (define-public java-logback-classic | |
10215 | (package | |
10216 | (inherit java-logback-core) | |
10217 | (name "java-logback-classic") | |
10218 | (arguments | |
10219 | `(#:jar-name "logback-classic.jar" | |
10220 | #:source-dir "src/main/java" | |
10221 | #:test-dir "src/test" | |
10222 | #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix | |
10223 | #:jdk ,icedtea-8 | |
10224 | #:phases | |
10225 | (modify-phases %standard-phases | |
10226 | (add-before 'configure 'chdir | |
10227 | (lambda _ | |
10228 | (chdir "logback-classic") | |
10229 | #t)) | |
10230 | (replace 'build | |
10231 | (lambda* (#:key inputs #:allow-other-keys) | |
10232 | (mkdir-p "build/classes") | |
10233 | (setenv "CLASSPATH" | |
10234 | (string-join | |
10235 | (apply append (map (lambda (input) | |
10236 | (find-files (assoc-ref inputs input) | |
10237 | ".*.jar")) | |
10238 | '("java-logback-core" "java-slf4j-api" | |
10239 | "java-commons-compiler" "java-tomcat" | |
10240 | "groovy"))) | |
10241 | ":")) | |
10242 | (apply invoke "groovyc" "-d" "build/classes" "-j" | |
10243 | (find-files "src/main/" ".*\\.(groovy|java)$")) | |
10244 | (invoke "ant" "jar") | |
10245 | #t))))) | |
10246 | (inputs | |
10247 | `(("java-logback-core" ,java-logback-core) | |
10248 | ("java-slf4j-api" ,java-slf4j-api) | |
10249 | ,@(package-inputs java-logback-core))) | |
10250 | (native-inputs | |
10251 | `(("groovy" ,groovy))) | |
10252 | (description "Logback is intended as a successor to the popular log4j project. | |
10253 | This module can be assimilated to a significantly improved version of log4j. | |
10254 | Moreover, @code{logback-classic} natively implements the slf4j API so that you | |
10255 | can readily switch back and forth between logback and other logging frameworks | |
10256 | such as log4j or @code{java.util.logging} (JUL)."))) | |
ab621bf1 JL |
10257 | |
10258 | (define-public java-qdox | |
10259 | (package | |
10260 | (name "java-qdox") | |
10261 | ; Newer version exists, but this version is required by java-plexus-component-metadata | |
10262 | (version "2.0-M2") | |
10263 | (source (origin | |
10264 | (method url-fetch) | |
10265 | ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox | |
10266 | ;; Older releases at https://github.com/codehaus/qdox/ | |
10267 | ;; Note: The release at maven is pre-generated. The release at | |
10268 | ;; github requires jflex. | |
10269 | (uri (string-append "http://central.maven.org/maven2/" | |
10270 | "com/thoughtworks/qdox/qdox/" version | |
10271 | "/qdox-" version "-sources.jar")) | |
10272 | (sha256 | |
10273 | (base32 | |
10274 | "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x")))) | |
10275 | (build-system ant-build-system) | |
10276 | (arguments | |
10277 | `(#:jar-name "qdox.jar" | |
10278 | #:tests? #f)); no tests | |
10279 | (home-page "http://qdox.codehaus.org/") | |
10280 | (synopsis "Parse definitions from Java source files") | |
10281 | (description "QDox is a high speed, small footprint parser for extracting | |
10282 | class/interface/method definitions from source files complete with JavaDoc | |
10283 | @code{@@tags}. It is designed to be used by active code generators or | |
10284 | documentation tools.") | |
10285 | (license license:asl2.0))) |