1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages groovy)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix utils)
24 #:use-module (guix build-system ant)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages java)
27 #:use-module (gnu packages xml))
29 (define java-groovy-bootstrap
31 (name "java-groovy-bootstrap")
35 (uri (string-append "https://github.com/apache/groovy/archive/GROOVY_"
36 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
38 (file-name (string-append name "-" version ".tar.gz"))
41 "19f3yd2z6jmz1xhwi5kkg1wmgbqkfs7qvd3rzb43xr3nffz8cisv"))
44 "groovy-add-exceptionutilsgenerator.patch"))))
45 (build-system ant-build-system)
47 `(#:jar-name "groovy.jar"
48 #:source-dir "src/main:subprojects/groovy-test/src/main/java"
52 #:main-class "groovy.ui.GroovyMain"
54 (modify-phases %standard-phases
55 (add-before 'build 'fix-java8
56 ;; Fix "Reference to plus is ambiguous"
58 (substitute* "src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java"
60 "(List<T>)toList(left)"))
62 (add-before 'build 'generate-parsers
64 (with-directory-excursion "src/main/org/codehaus/groovy/antlr/java"
65 (invoke "antlr" "java.g"))
66 (with-directory-excursion "src/main/org/codehaus/groovy/antlr"
68 (with-directory-excursion "parser"
69 (invoke "antlr" "../groovy.g")))
71 (add-before 'build 'generate-exception-utils
73 (invoke "javac" "-cp" (getenv "CLASSPATH")
74 "config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java")
75 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
77 "org.codehaus.groovy.ExceptionUtilsGenerator"
78 "build/classes/org/codehaus/groovy/runtime/ExceptionUtils.class")
81 `(("java-junit" ,java-junit)
82 ("java-hamcrest-core" ,java-hamcrest-core)
84 ("java-jmock-1" ,java-jmock-1)
85 ("java-xmlunit-legacy" ,java-xmlunit-legacy)))
87 `(("java-commons-cli" ,java-commons-cli)
88 ("java-asm" ,java-asm)
89 ("java-classpathx-servletapi" ,java-classpathx-servletapi)
90 ("java-xstream" ,java-xstream)
91 ("java-jansi" ,java-jansi)
92 ("java-jline-2" ,java-jline-2)))
93 (home-page "http://groovy-lang.org/")
94 (synopsis "Groovy's java bootstrap")
95 (description "This package contains the java bootstrap that is used to build
97 (license license:asl2.0)))
99 (define groovy-bootstrap
101 (inherit java-groovy-bootstrap)
102 (name "groovy-bootstrap")
104 `(#:jar-name "groovy.jar"
106 ;Requires groovy-xml and logback-classic which are circular dependencies
109 (modify-phases %standard-phases
110 (add-before 'build 'fix-java8
111 ;; Fix "Reference to plus is ambiguous"
113 (substitute* "src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java"
114 (("toList\\(left\\)")
115 "(List<T>)toList(left)"))
117 (add-before 'build 'generate-parser
119 (with-directory-excursion "src/main/org/codehaus/groovy/antlr/java"
120 (invoke "antlr" "java.g"))
121 (with-directory-excursion "src/main/org/codehaus/groovy/antlr"
123 (with-directory-excursion "parser"
124 (invoke "antlr" "../groovy.g")))
126 (add-before 'build 'generate-exception-utils
128 (invoke "javac" "-cp" (getenv "CLASSPATH")
129 "config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java")
130 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
132 "org.codehaus.groovy.ExceptionUtilsGenerator"
133 "target/classes/org/codehaus/groovy/runtime/ExceptionUtils.class")
135 (add-before 'build 'generate-dgminfo
137 (mkdir-p "target/classes/org/codehaus/groovy/runtime")
138 (mkdir-p "target/classes/META-INF")
139 (invoke "javac" "-cp" (getenv "CLASSPATH")
140 "src/main/org/codehaus/groovy/tools/DgmConverter.java")
141 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
143 "org.codehaus.groovy.tools.DgmConverter")
145 (add-before 'build 'copy-resources
147 (with-directory-excursion "src/main"
148 (for-each (lambda (file)
149 (mkdir-p (string-append "../../target/classes/"
152 (string-append "../../target/classes/"
154 (find-files "." ".*.(txt|properties|xml|html)")))
158 (mkdir-p "build/jar")
159 (apply invoke "java" "-cp" (getenv "CLASSPATH")
160 "org.codehaus.groovy.tools.FileSystemCompiler"
161 "-d" "target/classes"
162 "-j"; joint compilation
163 (find-files "src/main"
164 ".*\\.(groovy|java)$"))
165 (invoke "jar" "-cf" "build/jar/groovy.jar"
166 "-C" "target/classes" ".")
169 `(("java-apache-ivy" ,java-apache-ivy)
170 ,@(package-inputs java-groovy-bootstrap)))
172 `(("java-groovy-bootstrap" ,java-groovy-bootstrap)
173 ,@(package-native-inputs java-groovy-bootstrap)))
174 (synopsis "Groovy compiler")
175 (description "This package contains the first version of the Groovy compiler.
176 Although already usable, it doesn't contain the groovy library yet. This package
177 is used to build the groovy submodules written in groovy.")))
179 (define groovy-tests-bootstrap
181 (inherit groovy-bootstrap)
182 (name "groovy-tests-bootstrap")
184 `(#:jar-name "groovy-tests-bootstrap.jar"
186 #:tests? #f; no tests
188 (modify-phases %standard-phases
191 (mkdir-p "build/classes")
192 (mkdir-p "build/jar")
193 (apply invoke "java" "-cp" (getenv "CLASSPATH")
194 "org.codehaus.groovy.tools.FileSystemCompiler"
196 "-j"; joint compilation
198 (find-files "src/test" "TestSupport.java")
199 (find-files "src/test" "HeadlessTestSupport.java")
200 (find-files "src/test" "XmlAssert.java")))
201 (invoke "jar" "-cf" "build/jar/groovy-tests-bootstrap.jar"
202 "-C" "build/classes" ".")
205 `(("groovy-test" ,groovy-test)
206 ,@(package-inputs groovy-bootstrap)))
208 `(("groovy-bootstrap" ,groovy-bootstrap)
209 ,@(package-native-inputs java-groovy-bootstrap)))
210 (synopsis "Groovy test classes")
211 (description "This package contains three classes required for testing
212 other groovy submodules.")))
216 (inherit groovy-bootstrap)
219 `(#:jar-name "groovy-test.jar"
221 #:test-dir "subprojects/groovy-test/src/test"
223 (modify-phases %standard-phases
226 (mkdir-p "build/classes")
227 (mkdir-p "build/jar")
228 (apply invoke "java" "-cp" (getenv "CLASSPATH")
229 "org.codehaus.groovy.tools.FileSystemCompiler"
230 "-d" "build/classes" "-j"; joint compilation
231 (find-files "subprojects/groovy-test/src/main"
232 ".*\\.(groovy|java)$"))
233 (invoke "jar" "-cf" "build/jar/groovy-test.jar"
234 "-C" "build/classes" ".")
238 (mkdir-p "build/test-classes")
239 (substitute* "build.xml"
240 (("depends=\"compile-tests\"") "depends=\"\"")
241 (("}/java") "}/groovy"))
242 (apply invoke "java" "-cp"
243 (string-append (getenv "CLASSPATH") ":build/classes")
244 "org.codehaus.groovy.tools.FileSystemCompiler"
245 "-d" "build/test-classes" "-j"
246 (append (find-files "subprojects/groovy-test/src/test"
247 ".*\\.(groovy|java)$")))
248 (invoke "ant" "check")
251 `(("groovy-bootstrap" ,groovy-bootstrap)
252 ,@(package-native-inputs java-groovy-bootstrap)))
253 (synopsis "Groovy test submodule")
254 (description "This package contains the test submodules used to test
255 other groovy submodules.")))
259 (inherit groovy-bootstrap)
262 `(#:jar-name "groovy-xml.jar"
264 #:test-dir "src/test"
266 (modify-phases %standard-phases
267 (add-before 'configure 'chdir
269 (chdir "subprojects/groovy-xml")
273 (mkdir-p "build/classes")
274 (mkdir-p "build/jar")
275 (apply invoke "java" "-cp" (getenv "CLASSPATH")
276 "org.codehaus.groovy.tools.FileSystemCompiler"
277 "-d" "build/classes" "-j"; joint compilation
278 (find-files "src/main" ".*\\.(groovy|java)$"))
279 (invoke "jar" "-cf" "build/jar/groovy-xml.jar"
280 "-C" "build/classes" ".")
284 (mkdir-p "build/test-classes")
285 (substitute* "build.xml"
286 (("depends=\"compile-tests\"") "depends=\"\"")
287 (("}/java") "}/groovy"))
288 (apply invoke "java" "-cp"
289 (string-append (getenv "CLASSPATH") ":build/classes")
290 "org.codehaus.groovy.tools.FileSystemCompiler"
291 "-d" "build/test-classes" "-j"
292 (append (find-files "src/test" ".*\\.(groovy|java)$")))
293 (invoke "ant" "check")
296 `(("groovy-bootstrap" ,groovy-bootstrap)
297 ("groovy-test" ,groovy-test)
298 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
299 ,@(package-native-inputs java-groovy-bootstrap)))
300 (synopsis "Groovy XML")
301 (description "This package contains XML-related utilities for groovy.")))
303 (define groovy-templates
305 (inherit groovy-bootstrap)
306 (name "groovy-templates")
308 `(#:jar-name "groovy-templates.jar"
310 #:test-dir "subprojects/groovy-templates/src/test"
311 #:tests? #f;Requires spock-framework which is a circular dependency
313 (modify-phases %standard-phases
316 (mkdir-p "build/classes")
317 (mkdir-p "build/jar")
318 (apply invoke "java" "-cp" (getenv "CLASSPATH")
319 "org.codehaus.groovy.tools.FileSystemCompiler"
320 "-d" "build/classes" "-j"; joint compilation
321 (find-files "subprojects/groovy-templates/src/main"
322 ".*\\.(groovy|java)$"))
323 (invoke "jar" "-cf" "build/jar/groovy-templates.jar"
324 "-C" "build/classes" ".")
327 `(("groovy-xml" ,groovy-xml)
328 ,@(package-inputs groovy-bootstrap)))
330 `(("groovy-bootstrap" ,groovy-bootstrap)
331 ("groovy-test" ,groovy-test)
332 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
333 ,@(package-native-inputs java-groovy-bootstrap)))
334 (synopsis "Groovy template engine")
335 (description "This package contains a template framework which is
336 well-suited to applications where the text to be generated follows the form of
337 a static template.")))
339 (define groovy-groovydoc
341 (inherit groovy-bootstrap)
342 (name "groovy-groovydoc")
344 `(#:jar-name "groovy-groovydoc.jar"
346 #:test-dir "subprojects/groovy-groovydoc/src/test"
347 #:tests? #f; Requires groovy-ant which is a circular dependency
349 (modify-phases %standard-phases
350 (add-before 'build 'copy-resources
352 (copy-recursively "subprojects/groovy-groovydoc/src/main/resources"
357 (mkdir-p "build/classes")
358 (mkdir-p "build/jar")
359 (apply invoke "java" "-cp" (getenv "CLASSPATH")
360 "org.codehaus.groovy.tools.FileSystemCompiler"
362 "-j"; joint compilation
363 (find-files "subprojects/groovy-groovydoc/src/main"
364 ".*\\.(groovy|java)$"))
365 (invoke "jar" "-cf" "build/jar/groovy-groovydoc.jar"
366 "-C" "build/classes" ".")
369 `(("groovy-templates" ,groovy-templates)
370 ,@(package-inputs groovy-bootstrap)))
372 `(("groovy-bootstrap" ,groovy-bootstrap)
373 ("groovy-test" ,groovy-test)
374 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
375 ,@(package-native-inputs java-groovy-bootstrap)))
376 (synopsis "Groovy documentation generation")
377 (description "This package contains the groovy documentation generator,
378 similar to javadoc.")))
382 (inherit groovy-bootstrap)
385 `(#:jar-name "groovy-ant.jar"
387 #:test-dir "src/test"
388 ;; FIXME: Excluding all tests because they fail
391 "**/GroovycTest.java")
393 (modify-phases %standard-phases
394 (add-before 'configure 'chdir
396 (chdir "subprojects/groovy-ant")
398 (add-before 'build 'copy-resources
400 (copy-recursively "src/main/resources" "build/classes")
404 (mkdir-p "build/classes")
405 (mkdir-p "build/jar")
406 (apply invoke "java" "-cp" (getenv "CLASSPATH")
407 "org.codehaus.groovy.tools.FileSystemCompiler"
408 "-d" "build/classes" "-j"; joint compilation
409 (find-files "src/main" ".*\\.(groovy|java)$"))
410 (invoke "jar" "-cf" "build/jar/groovy-ant.jar"
411 "-C" "build/classes" ".")
415 (mkdir-p "build/test-classes")
416 (substitute* "build.xml"
417 (("depends=\"compile-tests\"") "depends=\"\"")
418 (("}/java") "}/groovy"))
419 (apply invoke "java" "-cp"
420 (string-append (getenv "CLASSPATH") ":build/classes")
421 "org.codehaus.groovy.tools.FileSystemCompiler"
422 "-d" "build/test-classes" "-j"
423 (find-files "src/test" ".*\\.(groovy|java)$"))
424 (invoke "ant" "check")
427 `(("groovy-groovydoc" ,groovy-groovydoc)
428 ,@(package-inputs groovy-bootstrap)))
430 `(("groovy-bootstrap" ,groovy-bootstrap)
431 ("groovy-xml" ,groovy-xml)
432 ("groovy-test" ,groovy-test)
433 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
434 ,@(package-native-inputs java-groovy-bootstrap)))
435 (synopsis "Groovy ant tasks")
436 (description "This package contains groovy-related ant tasks definitions.")))
440 (inherit groovy-bootstrap)
443 `(#:jar-name "groovy-bsf.jar"
445 #:test-dir "src/test"
447 ;; exception from Groovy: org.codehaus.groovy.runtime.InvokerInvocationException:
448 ;; groovy.lang.MissingMethodException: No signature of method:
449 ;; java.util.ArrayList.each() is applicable for argument types:
450 ;; (groovy.script.MapFromList$_doit_closure1) values:
451 ;; [groovy.script.MapFromList$_doit_closure1@17e554d5]
454 (modify-phases %standard-phases
455 (add-before 'configure 'chdir
457 (chdir "subprojects/groovy-bsf")
461 (mkdir-p "build/classes")
462 (mkdir-p "build/jar")
463 (apply invoke "java" "-cp" (getenv "CLASSPATH")
464 "org.codehaus.groovy.tools.FileSystemCompiler"
465 "-d" "build/classes" "-j"; joint compilation
466 (find-files "src/main" ".*\\.(groovy|java)$"))
467 (invoke "jar" "-cf" "build/jar/groovy-bsf.jar"
468 "-C" "build/classes" ".")
472 (mkdir-p "build/test-classes")
473 (substitute* "build.xml"
474 (("depends=\"compile-tests\"") "depends=\"\""))
475 (apply invoke "java" "-cp"
476 (string-append (getenv "CLASSPATH") ":build/classes")
477 "org.codehaus.groovy.tools.FileSystemCompiler"
478 "-d" "build/test-classes" "-j"
479 (find-files "src/test" ".*\\.(groovy|java)$"))
480 (invoke "ant" "check")
483 `(("java-commons-bsf" ,java-commons-bsf)
484 ,@(package-inputs groovy-bootstrap)))
486 `(("groovy-bootstrap" ,groovy-bootstrap)
487 ("groovy-test" ,groovy-test)
488 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
489 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
490 ,@(package-native-inputs java-groovy-bootstrap)))
491 (synopsis "Groovy BSF engine")
492 (description "This package defines the BSF engine for using Groovy inside
493 any @dfn{Bean Scripting Framework} (BSF) application.")))
497 (inherit groovy-bootstrap)
498 (name "groovy-swing")
500 `(#:jar-name "groovy-swing.jar"
502 ;; FIXME: tests are not run
503 #:test-dir "src/test"
505 (modify-phases %standard-phases
506 (add-before 'configure 'chdir
508 (chdir "subprojects/groovy-swing")
512 (mkdir-p "build/classes")
513 (mkdir-p "build/jar")
514 (apply invoke "java" "-cp" (getenv "CLASSPATH")
515 "org.codehaus.groovy.tools.FileSystemCompiler"
516 "-d" "build/classes" "-j"; joint compilation
517 (find-files "src/main" ".*\\.(groovy|java)$"))
518 (invoke "jar" "-cf" "build/jar/groovy-swing.jar"
519 "-C" "build/classes" ".")
523 (mkdir-p "build/test-classes")
524 (substitute* "src/test/groovy/groovy/util/GroovySwingTestCase.groovy"
525 (("HeadlessTestSupport.headless") "isHeadless()"))
526 (substitute* "build.xml"
527 (("depends=\"compile-tests\"") "depends=\"\"")
528 (("}/java") "}/groovy"))
529 (apply invoke "java" "-cp"
530 (string-append (getenv "CLASSPATH") ":build/classes")
531 "org.codehaus.groovy.tools.FileSystemCompiler"
532 "-d" "build/test-classes" "-j"
533 (find-files "src/test" ".*\\.(groovy|java)$"))
534 (invoke "ant" "check")
537 `(("groovy-bootstrap" ,groovy-bootstrap)
538 ("groovy-test" ,groovy-test)
539 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
540 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
541 ,@(package-native-inputs java-groovy-bootstrap)))
542 (synopsis "Groovy graphical library")
543 (description "This package contains the groovy bindings to Java Swing, a
544 library used to build graphical interfaces.")))
546 (define groovy-console
548 (inherit groovy-bootstrap)
549 (name "groovy-console")
551 `(#:jar-name "groovy-console.jar"
553 ;; FIXME: tests are not run
554 #:test-dir "src/test"
556 (modify-phases %standard-phases
557 (add-before 'configure 'chdir
559 (chdir "subprojects/groovy-console")
561 (add-before 'build 'copy-resources
563 (copy-recursively "src/main/resources" "build/classes")
567 (mkdir-p "build/classes")
568 (mkdir-p "build/jar")
569 (apply invoke "java" "-cp" (getenv "CLASSPATH")
570 "org.codehaus.groovy.tools.FileSystemCompiler"
571 "-d" "build/classes" "-j"; joint compilation
572 (find-files "src/main" ".*\\.(groovy|java)$"))
573 (invoke "jar" "-cf" "build/jar/groovy-console.jar"
574 "-C" "build/classes" ".")
578 (mkdir-p "build/test-classes")
579 (substitute* "build.xml"
580 (("depends=\"compile-tests\"") "depends=\"\"")
581 (("}/java") "}/groovy"))
583 "../groovy-swing/src/test/groovy/groovy/util/GroovySwingTestCase.groovy"
584 (("HeadlessTestSupport.headless") "isHeadless()"))
585 (apply invoke "java" "-cp"
586 (string-append (getenv "CLASSPATH") ":build/classes")
587 "org.codehaus.groovy.tools.FileSystemCompiler"
588 "-d" "build/test-classes" "-j"
590 (find-files "../groovy-swing/src/test" ".*\\.(groovy|java)$")
591 (find-files "src/test" ".*\\.(groovy|java)$")))
592 (invoke "ant" "check")
595 `(("groovy-swing" ,groovy-swing)
596 ("groovy-templates" ,groovy-templates)
597 ,@(package-inputs groovy-bootstrap)))
599 `(("groovy-bootstrap" ,groovy-bootstrap)
600 ("groovy-test" ,groovy-test)
601 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
602 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
603 ,@(package-native-inputs java-groovy-bootstrap)))
604 (synopsis "Groovy graphical interface")
605 (description "This package contains a graphical interface to run groovy.")))
607 (define groovy-docgenerator
609 (inherit groovy-bootstrap)
610 (name "groovy-docgenerator")
612 `(#:jar-name "groovy-docgenerator.jar"
614 #:tests? #f; No tests
616 (modify-phases %standard-phases
617 (add-before 'configure 'chdir
619 (chdir "subprojects/groovy-docgenerator")
621 (add-before 'build 'copy-resources
623 (copy-recursively "src/main/resources" "build/classes")
627 (mkdir-p "build/classes")
628 (mkdir-p "build/jar")
629 (apply invoke "java" "-cp" (getenv "CLASSPATH")
630 "org.codehaus.groovy.tools.FileSystemCompiler"
631 "-d" "build/classes" "-j"; joint compilation
632 (find-files "src/main" ".*\\.(groovy|java)$"))
633 (invoke "jar" "-cf" "build/jar/groovy-docgenerator.jar"
634 "-C" "build/classes" ".")
637 `(("groovy-templates" ,groovy-templates)
638 ("groovy-swing" ,groovy-swing)
639 ("java-qdox-1.12" ,java-qdox-1.12)
640 ,@(package-inputs groovy-bootstrap)))
642 `(("groovy-bootstrap" ,groovy-bootstrap)
643 ("groovy-test" ,groovy-test)
644 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
645 ,@(package-native-inputs java-groovy-bootstrap)))
646 (synopsis "Groovy documentation generation")
647 (description "This package contains a command line tool to generate
648 documentation for groovy applications.")))
650 (define groovy-groovysh
652 (inherit groovy-bootstrap)
653 (name "groovy-groovysh")
655 `(#:jar-name "groovy-groovysh.jar"
656 #:test-dir "src/test"
659 (modify-phases %standard-phases
660 (add-before 'configure 'chdir
662 (chdir "subprojects/groovy-groovysh")
664 (add-before 'build 'copy-resources
666 (copy-recursively "src/main/resources" "build/classes")
670 (mkdir-p "build/classes")
671 (mkdir-p "build/jar")
672 (apply invoke "java" "-cp" (getenv "CLASSPATH")
673 "org.codehaus.groovy.tools.FileSystemCompiler"
674 "-d" "build/classes" "-j"; joint compilation
675 (find-files "src/main" ".*\\.(groovy|java)$"))
676 (invoke "jar" "-cf" "build/jar/groovy-groovysh.jar"
677 "-C" "build/classes" ".")
681 (mkdir-p "build/test-classes")
682 (substitute* "build.xml"
683 (("depends=\"compile-tests\"") "depends=\"\"")
684 (("}/java") "}/groovy"))
685 (apply invoke "java" "-cp"
686 (string-append (getenv "CLASSPATH") ":build/classes")
687 "org.codehaus.groovy.tools.FileSystemCompiler"
688 "-d" "build/test-classes" "-j"
689 (append (find-files "src/test" ".*\\.(groovy|java)$")))
690 (invoke "ant" "check")
693 `(("groovy-xml" ,groovy-xml)
694 ("groovy-console" ,groovy-console)
695 ,@(package-inputs groovy-bootstrap)))
697 `(("groovy-bootstrap" ,groovy-bootstrap)
698 ("groovy-test" ,groovy-test)
699 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
700 ,@(package-native-inputs java-groovy-bootstrap)))
701 (synopsis "Groovy REPL")
702 (description "This package contains the Groovy REPL.")))
706 (inherit groovy-bootstrap)
709 `(#:jar-name "groovy-jmx.jar"
710 #:test-dir "src/test"
713 (modify-phases %standard-phases
714 (add-before 'configure 'chdir
716 (chdir "subprojects/groovy-jmx")
720 (mkdir-p "build/classes")
721 (mkdir-p "build/jar")
722 (apply invoke "java" "-cp" (getenv "CLASSPATH")
723 "org.codehaus.groovy.tools.FileSystemCompiler"
724 "-d" "build/classes" "-j"; joint compilation
725 (find-files "src/main" ".*\\.(groovy|java)$"))
726 (invoke "jar" "-cf" "build/jar/groovy-jmx.jar"
727 "-C" "build/classes" ".")
731 (mkdir-p "build/test-classes")
732 (substitute* "build.xml"
733 (("depends=\"compile-tests\"") "depends=\"\"")
734 (("}/java") "}/groovy"))
735 (apply invoke "java" "-cp"
736 (string-append (getenv "CLASSPATH") ":build/classes")
737 "org.codehaus.groovy.tools.FileSystemCompiler"
738 "-d" "build/test-classes" "-j"
739 (append (find-files "src/test" ".*\\.(groovy|java)$")))
740 (invoke "ant" "check")
743 `(("groovy-bootstrap" ,groovy-bootstrap)
744 ("groovy-test" ,groovy-test)
745 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
746 ,@(package-native-inputs java-groovy-bootstrap)))
747 (synopsis "Groovy JMX extension")
748 (description "This package contains the JMX extension of Groovy, for
749 management and monitoring of JVM-based solutions.")))
753 (inherit groovy-bootstrap)
756 `(#:jar-name "groovy-json.jar"
757 #:test-dir "src/test"
760 (modify-phases %standard-phases
761 (add-before 'configure 'chdir
763 (chdir "subprojects/groovy-json")
767 (mkdir-p "build/classes")
768 (mkdir-p "build/jar")
769 (apply invoke "java" "-cp" (getenv "CLASSPATH")
770 "org.codehaus.groovy.tools.FileSystemCompiler"
771 "-d" "build/classes" "-j"; joint compilation
772 (find-files "src/main" ".*\\.(groovy|java)$"))
773 (invoke "jar" "-cf" "build/jar/groovy-json.jar"
774 "-C" "build/classes" ".")
778 (mkdir-p "build/test-classes")
779 (substitute* "build.xml"
780 (("depends=\"compile-tests\"") "depends=\"\"")
781 (("}/java") "}/groovy"))
782 (apply invoke "java" "-cp"
783 (string-append (getenv "CLASSPATH") ":build/classes")
784 "org.codehaus.groovy.tools.FileSystemCompiler"
785 "-d" "build/test-classes" "-j"
786 (append (find-files "src/test" ".*\\.(groovy|java)$")))
787 (invoke "ant" "check")
790 `(("groovy-bootstrap" ,groovy-bootstrap)
791 ("groovy-test" ,groovy-test)
792 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
793 ,@(package-native-inputs java-groovy-bootstrap)))
794 (synopsis "Groovy JSON")
795 (description "This package contains JSON-related utilities for groovy.")))
797 (define groovy-jsr223
799 (inherit groovy-bootstrap)
800 (name "groovy-jsr223")
802 `(#:jar-name "groovy-jsr223.jar"
803 #:test-dir "src/test"
806 (modify-phases %standard-phases
807 (add-before 'configure 'chdir
809 (chdir "subprojects/groovy-jsr223")
811 (add-before 'build 'copy-resources
813 (copy-recursively "src/main/resources" "build/classes")
817 (mkdir-p "build/classes")
818 (mkdir-p "build/jar")
819 (apply invoke "java" "-cp" (getenv "CLASSPATH")
820 "org.codehaus.groovy.tools.FileSystemCompiler"
821 "-d" "build/classes" "-j"; joint compilation
822 (find-files "src/main" ".*\\.(groovy|java)$"))
823 (invoke "jar" "-cf" "build/jar/groovy-jsr223.jar"
824 "-C" "build/classes" ".")
828 (mkdir-p "build/test-classes")
829 (substitute* "build.xml"
830 (("depends=\"compile-tests\"") "depends=\"\"")
831 (("}/java") "}/groovy"))
832 (apply invoke "java" "-cp"
833 (string-append (getenv "CLASSPATH") ":build/classes")
834 "org.codehaus.groovy.tools.FileSystemCompiler"
835 "-d" "build/test-classes" "-j"
836 (append (find-files "src/test" ".*\\.(groovy|java)$")))
837 (invoke "ant" "check")
840 `(("groovy-bootstrap" ,groovy-bootstrap)
841 ("groovy-test" ,groovy-test)
842 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
843 ,@(package-native-inputs java-groovy-bootstrap)))
844 (synopsis "Groovy's own JSR223 implementation")
845 (description "This package contains Groovy's own JSR223 implementation. This
846 module is used for interaction between Groovy and Java code.")))
850 (inherit groovy-bootstrap)
853 `(#:jar-name "groovy-nio.jar"
854 #:test-dir "src/test"
856 #:tests? #f; Requires spock-framework
858 (modify-phases %standard-phases
859 (add-before 'configure 'chdir
861 (chdir "subprojects/groovy-nio")
865 (mkdir-p "build/classes")
866 (mkdir-p "build/jar")
867 (apply invoke "java" "-cp" (getenv "CLASSPATH")
868 "org.codehaus.groovy.tools.FileSystemCompiler"
869 "-d" "build/classes" "-j"; joint compilation
870 (find-files "src/main" ".*\\.(groovy|java)$"))
871 (invoke "jar" "-cf" "build/jar/groovy-nio.jar"
872 "-C" "build/classes" ".")
875 `(("groovy-bootstrap" ,groovy-bootstrap)
876 ("groovy-test" ,groovy-test)
877 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
878 ,@(package-native-inputs java-groovy-bootstrap)))
879 (synopsis "Groovy input-output library")
880 (description "This package implements an input/output library that extends
881 the functionality of the common library of Java.")))
883 (define groovy-servlet
885 (inherit groovy-bootstrap)
886 (name "groovy-servlet")
888 `(#:jar-name "groovy-servlet.jar"
889 #:test-dir "src/test"
892 (modify-phases %standard-phases
893 (add-before 'configure 'chdir
895 (chdir "subprojects/groovy-servlet")
899 (mkdir-p "build/classes")
900 (mkdir-p "build/jar")
901 (apply invoke "java" "-cp" (getenv "CLASSPATH")
902 "org.codehaus.groovy.tools.FileSystemCompiler"
904 "-j"; joint compilation
905 (find-files "src/main" ".*\\.(groovy|java)$"))
906 (invoke "jar" "-cf" "build/jar/groovy-servlet.jar"
907 "-C" "build/classes" ".")
911 (mkdir-p "build/test-classes")
912 (substitute* "build.xml"
913 (("depends=\"compile-tests\"") "depends=\"\"")
914 (("}/java") "}/groovy"))
915 (apply invoke "java" "-cp"
916 (string-append (getenv "CLASSPATH") ":build/classes")
917 "org.codehaus.groovy.tools.FileSystemCompiler"
918 "-d" "build/test-classes"
920 (append (find-files "src/test" ".*\\.(groovy|java)$")))
921 (invoke "ant" "check")
924 `(("groovy-templates" ,groovy-templates)
925 ("groovy-xml" ,groovy-xml)
926 ,@(package-inputs groovy-bootstrap)))
928 `(("groovy-bootstrap" ,groovy-bootstrap)
929 ("groovy-json" ,groovy-json)
930 ("groovy-test" ,groovy-test)
931 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
932 ,@(package-native-inputs java-groovy-bootstrap)))
933 (synopsis "Groovy's servlet implementation")
934 (description "This package contains a library to create groovlets, Groovy's
935 version of Java servlets.")))
939 (inherit groovy-bootstrap)
942 `(#:jar-name "groovy-sql.jar"
943 #:test-dir "src/test"
944 #:tests? #f;TODO: Requires hsqldb
947 (modify-phases %standard-phases
948 (add-before 'configure 'chdir
950 (chdir "subprojects/groovy-sql")
954 (mkdir-p "build/classes")
955 (mkdir-p "build/jar")
956 (apply invoke "java" "-cp" (getenv "CLASSPATH")
957 "org.codehaus.groovy.tools.FileSystemCompiler"
958 "-d" "build/classes" "-j"; joint compilation
959 (find-files "src/main"
960 ".*\\.(groovy|java)$"))
961 (invoke "jar" "-cf" "build/jar/groovy-sql.jar"
962 "-C" "build/classes" ".")
965 `(("groovy-bootstrap" ,groovy-bootstrap)
966 ("groovy-test" ,groovy-test)
967 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
968 ,@(package-native-inputs java-groovy-bootstrap)))
969 (synopsis "Groovy SQL library")
970 (description "This package contains a facade over Java's normal JDBC APIs
971 providing greatly simplified resource management and result set handling.")))
973 (define groovy-testng
975 (inherit groovy-bootstrap)
976 (name "groovy-testng")
978 `(#:jar-name "groovy-testng.jar"
979 #:tests? #f; No tests
982 (modify-phases %standard-phases
983 (add-before 'configure 'chdir
985 (chdir "subprojects/groovy-testng")
987 (add-before 'build 'copy-resources
989 (copy-recursively "src/main/resources" "build/classes")
993 (mkdir-p "build/classes")
994 (mkdir-p "build/jar")
995 (apply invoke "java" "-cp" (getenv "CLASSPATH")
996 "org.codehaus.groovy.tools.FileSystemCompiler"
998 "-j"; joint compilation
999 (find-files "src/main" ".*\\.(groovy|java)$"))
1000 (invoke "jar" "-cf" "build/jar/groovy-testng.jar"
1001 "-C" "build/classes" ".")
1004 `(("groovy-bootstrap" ,groovy-bootstrap)
1005 ("groovy-test" ,groovy-test)
1006 ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
1007 ,@(package-native-inputs java-groovy-bootstrap)))
1008 (synopsis "Groovy testing framework")
1009 (description "This package contains integration code for running TestNG
1010 tests in Groovy.")))