X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/a212006048b14dc8614010a16db5bc6585dbf699..29534ff7f30e434e9d4177f8fcbec40a154d72e5:/gnu/packages/java.scm diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index cfe67d5688..4db1a3b199 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2016, 2017 Roel Janssen ;;; Copyright © 2017, 2019 Carlo Zancanaro -;;; Copyright © 2017, 2018, 2019 Julien Lepiller +;;; Copyright © 2017-2020 Julien Lepiller ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2016, 2017, 2018 Alex Vong ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice @@ -66,6 +66,7 @@ #:use-module (gnu packages libffi) #:use-module (gnu packages linux) ;alsa #:use-module (gnu packages maths) + #:use-module (gnu packages maven-parent-pom) #:use-module (gnu packages nss) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages web) @@ -164,6 +165,64 @@ defined in The Java Language Specification into the bytecoded instruction set and binary format defined in The Java Virtual Machine Specification.") (license license:ibmpl1.0))) +(define-public drip + ;; Last release is from 2014, with a few important commits afterwards. + (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08")) + (package + (name "drip") + (version (git-version "0.2.4" "1" commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ninjudd/drip") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2")))) + (build-system gnu-build-system) + (native-inputs + `(("jdk" ,icedtea "jdk"))) + (arguments + `(#:tests? #f ; No tests. + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'install 'fix-wrapper + (lambda* (#:key inputs #:allow-other-keys) + (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps"))) + (substitute* "bin/drip" + (("jps") jps) + (("brew update && brew upgrade drip") "guix pull && guix install drip") + ;; No need to make: + (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "") + ;; No need to include source: + (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]") + "true")) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (share (string-append out "/share/drip"))) + (mkdir-p bin) + (for-each + (lambda (file) + (install-file (string-append "bin/" file) bin)) + '("drip" "drip_daemon" "drip_proxy")) + (install-file "drip.jar" share) + (substitute* (string-append bin "/drip") + (("drip_dir=\\$bin_dir/..") + (string-append "drip_dir=" share))) + #t)))))) + (home-page "https://github.com/ninjudd/drip") + (synopsis "Faster Java Virtual Machine launching") + (description "Drip is a launcher for the Java Virtual Machine that +provides much faster startup times than the @command{java} command. The @command{drip} +script is intended to be a drop-in replacement for the @command{java} command, +only faster.") + (license license:epl1.0)))) + ;; This is the last version of GNU Classpath that can be built without ECJ. (define classpath-bootstrap (package @@ -2596,7 +2655,7 @@ OpenJFX distribution."))) (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/javacc/javacc.git") + (url "https://github.com/javacc/javacc") (commit "release_41"))) (file-name (string-append "javacc-" version "-checkout")) (sha256 @@ -2637,6 +2696,35 @@ as tree building (via a tool called JJTree included with JavaCC), actions, debugging, etc.") (license license:bsd-3))) +;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar +;; in the bootstrap/ directory. +(define-public javacc-3 + (package + (inherit javacc-4) + (version "3.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/javacc/javacc.git") + (commit "release_32"))) + (file-name (string-append "javacc-" version "-checkout")) + (sha256 + (base32 + "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3")))) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'set-java-version + (lambda _ + (for-each + (lambda (file) + (substitute* file + (("debug=") "source=\"1.4\" debug="))) + (find-files "." "build.xml")) + #t)) + (replace 'install (install-jars "bin/lib"))))))) + (define-public javacc (package (inherit javacc-4) @@ -2645,7 +2733,7 @@ debugging, etc.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/javacc/javacc.git") + (url "https://github.com/javacc/javacc") (commit version))) (file-name (git-file-name "javacc" version)) (sha256 @@ -3144,11 +3232,10 @@ libraries from the SIS division at ETH Zurich like jHDF5.") (string-append (assoc-ref inputs "java-testng") "/share/java/java-testng.jar")) (("\\$\\{lib\\}/junit4/junit.jar") - (string-append (assoc-ref inputs "java-junit") - "/share/java/junit.jar")) + (car (find-files (assoc-ref inputs "java-junit") "jar$"))) (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar") - (string-append (assoc-ref inputs "java-hamcrest-core") - "/share/java/hamcrest-core.jar"))) + (car (find-files (assoc-ref inputs "java-hamcrest-core") + "jar$")))) ;; Remove dependency on ch.rinn.restrictions (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/" (substitute* '("BitSetConversionUtils.java" @@ -3271,7 +3358,7 @@ API and version 2.1 of the Java ServerPages API.") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/javaee/servlet-spec.git") + (url "https://github.com/javaee/servlet-spec") (commit version))) (file-name (git-file-name name version)) (sha256 @@ -3486,10 +3573,10 @@ documentation tools.") (snippet '(begin ;; Delete bundled thirds-party jar archives. - ;; TODO: unbundle maven-plugin-api. - (delete-file "lib/asm-4.0.jar") - (delete-file "lib/asm-commons-4.0.jar") - (delete-file "lib/junit-4.8.1.jar") + (delete-file-recursively "lib") + (delete-file "src/test/enumtest.jar") + ;; the CLASSPATH needs this directory, create an empty one + (mkdir-p "lib") #t)))) (build-system ant-build-system) (arguments @@ -3504,11 +3591,11 @@ documentation tools.") (("") (string-append "")) + "/lib/m2\" includes=\"**/*.jar\"/>")) (("") "") (("lib/asm-commons-4.0.jar") - (string-append (assoc-ref inputs "java-asm-bootstrap") - "/share/java/asm-6.0.jar")) + (car (find-files (assoc-ref inputs "java-asm-bootstrap") + "asm-6.0.jar"))) (("") (string-append "" @@ -3518,6 +3605,13 @@ documentation tools.") ""))) #t)) + (add-before 'build 'remove-maven-dependency + (lambda _ + ;; We do not need to build jarjar as a maven plugin just yet, so + ;; remove this file. Maven requires jarjar (but not that plugin), + ;; so removing it improves the bootstrap. + (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java") + #t)) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((target (string-append (assoc-ref outputs "out") @@ -3560,6 +3654,7 @@ an Ant task that extends the built-in @code{jar} task.") (arguments `(#:tests? #f ; Tests require junit #:modules ((guix build ant-build-system) + (guix build java-utils) (guix build utils) (srfi srfi-1)) #:make-flags (list (string-append "-Dversion=" ,version)) @@ -3613,28 +3708,18 @@ private Method[] allMethods = getSortedMethods();"))) (lambda _ (mkdir-p "lib/integration") #t)) + (add-before 'build 'create-pom + (lambda _ + (substitute* "pom/hamcrest-core.pom" + (("@VERSION@") ,version)) + #t)) (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((target (string-append (assoc-ref outputs "out") - "/share/java/")) - (version-suffix ,(string-append "-" version ".jar")) - (install-without-version-suffix - (lambda (jar) - (copy-file jar - (string-append target - (basename jar version-suffix) - ".jar"))))) - (mkdir-p target) - (for-each - install-without-version-suffix - (find-files "build" - (lambda (name _) - (and (string-suffix? ".jar" name) - (not (string-suffix? "-sources.jar" name))))))) - #t))))) + (install-from-pom "pom/hamcrest-core.pom"))))) (native-inputs `(("java-qdox-1.12" ,java-qdox-1.12) ("java-jarjar" ,java-jarjar))) + (propagated-inputs + `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom))) (home-page "http://hamcrest.org/") (synopsis "Library of matchers for building test expressions") (description @@ -3644,6 +3729,45 @@ declaratively, to be used in other frameworks. Typical scenarios include testing frameworks, mocking libraries and UI validation rules.") (license license:bsd-2))) +(define java-hamcrest-parent-pom + (package + (inherit java-hamcrest-core) + (name "java-hamcrest-parent-pom") + (propagated-inputs '()) + (native-inputs '()) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (substitute* "pom/hamcrest-parent.pom" + (("@VERSION@") ,(package-version java-hamcrest-core))) + #t)) + (replace 'install + (install-pom-file "pom/hamcrest-parent.pom"))))))) + +(define-public java-hamcrest-library + (package + (inherit java-hamcrest-core) + (name "java-hamcrest-library") + (arguments + (substitute-keyword-arguments (package-arguments java-hamcrest-core) + ((#:build-target _) "library") + ((#:phases phases) + `(modify-phases ,phases + (replace 'create-pom + (lambda _ + (substitute* "pom/hamcrest-library.pom" + (("@VERSION@") ,(package-version java-hamcrest-core))) + #t)) + (replace 'install + (install-from-pom "pom/hamcrest-library.pom")))))) + (propagated-inputs + `(("java-hamcrest-core" ,java-hamcrest-core) + ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom))))) + (define-public java-junit (package (name "java-junit") @@ -3665,10 +3789,23 @@ testing frameworks, mocking libraries and UI validation rules.") #t)))) (build-system ant-build-system) (arguments - `(#:tests? #f ; no tests - #:jar-name "junit.jar")) - (inputs + `(#:jar-name "junit.jar" + #:source-dir "src/main/java" + #:test-dir "src/test" + #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java" + "**/RuleChainTest.java" "**/TestWatchmanTest.java") + #:phases + (modify-phases %standard-phases + (add-before 'check 'copy-test-resources + (lambda _ + (copy-recursively "src/test/resources" "build/test-classes") + #t)) + (replace 'install + (install-from-pom "pom.xml"))))) + (propagated-inputs `(("java-hamcrest-core" ,java-hamcrest-core))) + (native-inputs + `(("java-hamcrest-library" ,java-hamcrest-library))) (home-page "https://junit.org/junit4/") (synopsis "Test framework for Java") (description @@ -3677,10 +3814,42 @@ JUnit provides assertions for testing expected results, test fixtures for sharing common test data, and test runners for running tests.") (license license:epl1.0))) +(define-public java-junitparams + (package + (name "java-junitparams") + (version "1.1.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Pragmatists/JUnitParams") + (commit (string-append "JUnitParams-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "junitparams.jar" + #:source-dir "src/main/java" + #:test-dir "src/test" + #:test-exclude (list "**/SuperclassTest.java"))) + (inputs + `(("java-junit" ,java-junit))) + (native-inputs + `(("java-junit" ,java-junit) + ("java-hamcrest-core" ,java-hamcrest-core) + ("java-assertj" ,java-assertj))) + (home-page "https://github.com/Pragmatists/JUnitParams") + (synopsis "Parameterised test support for JUnit") + (description "The JUnitParams project adds a new runner to JUnit and +provides much easier and readable parametrised tests for JUnit.") + (license license:asl2.0))) + (define-public java-plexus-utils (package (name "java-plexus-utils") - (version "3.2.0") + ;; sisu-build-api needs this version, later versions don't work + (version "3.2.1") (source (origin (method git-fetch) (uri (git-reference @@ -3689,7 +3858,7 @@ sharing common test data, and test runners for running tests.") (file-name (git-file-name name version)) (sha256 (base32 - "1mlx7xrq7lgqjqcpg7y4hi1ghavf28vvk3har82037dqx61n0f15")))) + "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b")))) (build-system ant-build-system) ;; FIXME: The default build.xml does not include a target to install ;; javadoc files. @@ -3719,11 +3888,21 @@ cli/shell/BourneShell.java" ;; FIXME: The command line tests fail, maybe because they use ;; absolute paths. - (delete-file "cli/CommandlineTest.java")) - #t))))) + (delete-file "cli/CommandlineTest.java") + + ;; These tests require openjdk jmh, which is not packaged yet + (for-each delete-file (find-files "." "PerfTest.java$"))) + #t)) + (add-before 'build 'copy-resources + (lambda _ + (copy-recursively "src/main/resources" "build/classes") + #t)) + (replace 'install (install-from-pom "pom.xml"))))) (native-inputs `(("java-hamcrest-core" ,java-hamcrest-core) ("java-junit" ,java-junit))) + (propagated-inputs + `(("plexus-parent-pom" ,plexus-parent-pom-5.1))) (home-page "https://codehaus-plexus.github.io/plexus-utils/") (synopsis "Common utilities for the Plexus framework") (description "This package provides various Java utility classes for the @@ -3731,10 +3910,24 @@ Plexus framework to ease working with strings, files, command lines, XML and more.") (license license:asl2.0))) +(define-public java-plexus-utils-3.3.0 + (package + (inherit java-plexus-utils) + (version "3.3.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/codehaus-plexus/plexus-utils") + (commit (string-append "plexus-utils-" version)))) + (file-name (git-file-name "java-plexus-utils" version)) + (sha256 + (base32 + "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g")))))) + (define-public java-plexus-interpolation (package (name "java-plexus-interpolation") - (version "1.23") + (version "1.26") (source (origin (method git-fetch) (uri (git-reference @@ -3743,11 +3936,16 @@ more.") (file-name (git-file-name name version)) (sha256 (base32 - "005hxxg1adv71a96lz4vp65bk3v1pi76j4c45z29xzizclib16vl")))) + "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh")))) (build-system ant-build-system) (arguments `(#:jar-name "plexus-interpolation.jar" - #:source-dir "src/main")) + #:source-dir "src/main" + #:phases + (modify-phases %standard-phases + (replace 'install (install-from-pom "pom.xml"))))) + (propagated-inputs + `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1))) (native-inputs `(("java-junit" ,java-junit) ("java-hamcrest-core" ,java-hamcrest-core))) @@ -3765,7 +3963,7 @@ these two libraries to vary independently of one another.") (define-public java-plexus-classworlds (package (name "java-plexus-classworlds") - (version "2.5.2") + (version "2.6.0") (source (origin (method git-fetch) (uri (git-reference @@ -3774,12 +3972,17 @@ these two libraries to vary independently of one another.") (file-name (git-file-name name version)) (sha256 (base32 - "1iv8x55fbni2hg4l7pdpbwfq75xmvq1f25g6nxma8rcdpihsh13r")))) + "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s")))) (build-system ant-build-system) (arguments `(#:jar-name "plexus-classworlds.jar" #:source-dir "src/main" - #:tests? #f));; FIXME: we need to generate some resources as in pom.xml + #:tests? #f;; FIXME: we need to generate some resources as in pom.xml + #:phases + (modify-phases %standard-phases + (replace 'install (install-from-pom "pom.xml"))))) + (propagated-inputs + `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1))) (native-inputs `(("java-junit" ,java-junit))) (home-page "https://codehaus-plexus.github.io/plexus-classworlds/") @@ -3807,22 +4010,31 @@ components.") `(#:jar-name "container-default.jar" #:source-dir "plexus-container-default/src/main/java" #:test-dir "plexus-container-default/src/test" - #:jdk ,icedtea-8 #:tests? #f; requires plexus-archiver, which depends on this package #:phases (modify-phases %standard-phases + (add-before 'build 'fix-google-collections + (lambda _ + ;; Google collections are now replaced with guava + (substitute* "plexus-container-default/pom.xml" + (("google-collections") "guava") + (("com.google.collections") "com.google.guava")) + #t)) (add-before 'build 'copy-resources (lambda _ (copy-recursively "plexus-container-default/src/main/resources/" "build/classes") - #t))))) - (inputs - `(("worldclass" ,java-plexus-classworlds) - ("xbean" ,java-geronimo-xbean-reflect) - ("utils" ,java-plexus-utils) - ("junit" ,java-junit) - ("guava" ,java-guava))) + #t)) + (replace 'install + (install-from-pom "plexus-container-default/pom.xml"))))) + (propagated-inputs + `(("java-plexus-worldclass" ,java-plexus-classworlds) + ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) + ("java-plexus-utils" ,java-plexus-utils) + ("java-junit" ,java-junit) + ("java-guava" ,java-guava) + ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom))) (home-page "https://github.com/codehaus-plexus/plexus-containers") (synopsis "Inversion-of-control container") (description "Plexus-default-container is Plexus' inversion-of-control @@ -3830,10 +4042,25 @@ components.") implementation.") (license license:asl2.0))) +(define java-plexus-containers-parent-pom + (package + (inherit java-plexus-container-default-bootstrap) + (name "java-plexus-containers-parent-pom") + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (install-pom-file "pom.xml"))))) + (propagated-inputs + `(("plexus-parent-pom" ,plexus-parent-pom-4.0))))) + (define-public java-plexus-io (package (name "java-plexus-io") - (version "3.0.0") + (version "3.2.0") (source (origin (method git-fetch) (uri (git-reference @@ -3842,25 +4069,28 @@ implementation.") (file-name (git-file-name name version)) (sha256 (base32 - "1h4q9l2j9sfbscvxpnyy2hazi0r83h3am86y4r959wrl1b24xxwd")))) + "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr")))) (build-system ant-build-system) (arguments `(#:jar-name "plexus-io.jar" #:source-dir "src/main/java" #:test-dir "src/test" - #:jdk ,icedtea-8 #:phases (modify-phases %standard-phases (add-before 'build 'copy-resources (lambda _ - (mkdir-p "build/classes/META-INF/plexus") - (copy-file "src/main/resources/META-INF/plexus/components.xml" - "build/classes/META-INF/plexus/components.xml") - #t))))) + (mkdir-p "build/classes") + (copy-recursively "src/main/resources" "build/classes") + (mkdir-p "build/test-classes") + (copy-recursively "src/test/resources" "build/test-classes") + #t)) + (replace 'install (install-from-pom "pom.xml"))))) + (propagated-inputs + `(("java-plexus-utils" ,java-plexus-utils-3.3.0) + ("java-commons-io" ,java-commons-io) + ("plexus-parent-pom" ,plexus-parent-pom-5.1))) (inputs - `(("utils" ,java-plexus-utils) - ("commons-io" ,java-commons-io) - ("java-jsr305" ,java-jsr305))) + `(("java-jsr305" ,java-jsr305))) (native-inputs `(("junit" ,java-junit) ("hamcrest" ,java-hamcrest-core) @@ -3878,19 +4108,18 @@ reusing it in maven.") (define-public java-plexus-archiver (package (name "java-plexus-archiver") - (version "4.1.0") + (version "4.2.2") (source (origin (method url-fetch) (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver" "/archive/plexus-archiver-" version ".tar.gz")) (sha256 (base32 - "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg")))) + "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys")))) (build-system ant-build-system) (arguments `(#:jar-name "plexus-archiver.jar" #:source-dir "src/main/java" - #:jdk ,icedtea-8 #:test-dir "src/test" #:test-exclude (list "**/Abstract*.java" "**/Base*.java") #:phases @@ -3908,19 +4137,22 @@ reusing it in maven.") #t)) (add-before 'build 'copy-resources (lambda _ - (mkdir-p "build/classes/META-INF/plexus") - (copy-file "src/main/resources/META-INF/plexus/components.xml" - "build/classes/META-INF/plexus/components.xml") - #t))))) + (mkdir-p "build/classes") + (copy-recursively "src/main/resources" "build/classes") + (mkdir-p "build/test-classes") + (copy-recursively "src/test/resources" "build/test-classes") + #t)) + (replace 'install (install-from-pom "pom.xml"))))) + (propagated-inputs + `(("java-plexus-utils" ,java-plexus-utils-3.3.0) + ("java-plexus-io" ,java-plexus-io) + ("java-iq80-snappy" ,java-iq80-snappy) + ("java-commons-compress" ,java-commons-compress) + ("plexus-parent-pom" ,plexus-parent-pom-6.1))) (inputs - `(("utils" ,java-plexus-utils) - ("commons-io" ,java-commons-io) - ("snappy" ,java-iq80-snappy) - ("io" ,java-plexus-io) - ("compress" ,java-commons-compress) - ("container-default" ,java-plexus-container-default-bootstrap) - ("snappy" ,java-snappy) - ("java-jsr305" ,java-jsr305))) + `(("java-jsr305" ,java-jsr305) + ("java-plexus-container-default" + ,java-plexus-container-default-bootstrap))) (native-inputs `(("java-hamcrest-core" ,java-hamcrest-core) ("junit" ,java-junit) @@ -3949,9 +4181,15 @@ archives (jar).") ;; Failures "**/ComponentRealmCompositionTest.java" "**/PlexusContainerTest.java") - #:jdk ,icedtea-8 #:phases (modify-phases %standard-phases + (add-before 'build 'fix-google-collections + (lambda _ + ;; Google collections are now replaced with guava + (substitute* "plexus-container-default/pom.xml" + (("google-collections") "guava") + (("com.google.collections") "com.google.guava")) + #t)) (add-before 'build 'copy-resources (lambda _ (copy-recursively @@ -3966,7 +4204,9 @@ archives (jar).") dir "/plexus/component/composition/" "ComponentRealmCompositionTest.java") (("src/test") "plexus-container-default/src/test")) - #t)))))) + #t))) + (replace 'install + (install-from-pom "plexus-container-default/pom.xml"))))) (inputs `(("worldclass" ,java-plexus-classworlds) ("xbean" ,java-geronimo-xbean-reflect) @@ -3984,7 +4224,13 @@ archives (jar).") (arguments `(#:jar-name "plexus-component-annotations.jar" #:source-dir "plexus-component-annotations/src/main/java" - #:tests? #f)); no tests + #:tests? #f; no tests + #:phases + (modify-phases %standard-phases + (replace 'install + (install-from-pom "plexus-component-annotations/pom.xml"))))) + (propagated-inputs + `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom))) (inputs '()) (native-inputs '()) (synopsis "Plexus descriptors generator") @@ -4008,7 +4254,6 @@ from source tags and class annotations."))) (arguments `(#:jar-name "plexus-cipher.jar" #:source-dir "src/main/java" - #:jdk ,icedtea-8 #:tests? #f; FIXME: requires sisu-inject-bean #:phases (modify-phases %standard-phases @@ -4019,10 +4264,21 @@ from source tags and class annotations."))) (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" (lambda _ (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n"))) - #t))))) + #t)) + (add-before 'install 'fix-test-dependency + (lambda _ + ;; sisu-inject-bean is only used for tests, but its scope is "provided". + (substitute* "pom.xml" + (("provided") "test")) + #t)) + (replace 'install (install-from-pom "pom.xml"))))) (inputs `(("java-cdi-api" ,java-cdi-api) ("java-javax-inject" ,java-javax-inject))) + (propagated-inputs + `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15))) + (native-inputs + `(("java-junit" ,java-junit))) (home-page "https://github.com/sonatype/plexus-cipher") (synopsis "Encryption/decryption Component") (description "Plexus-cipher contains a component to deal with encryption @@ -4098,7 +4354,6 @@ Compiler component."))) (arguments `(#:jar-name "plexus-sec-dispatcher.jar" #:source-dir "src/main/java" - #:jdk ,icedtea-8 #:phases (modify-phases %standard-phases (add-before 'build 'generate-models @@ -4146,9 +4401,12 @@ Compiler component."))) (add-before 'check 'fix-paths (lambda _ (copy-recursively "src/test/resources" "target") - #t))))) - (inputs - `(("java-plexus-cipher" ,java-plexus-cipher))) + #t)) + (replace 'install (install-from-pom "pom.xml"))))) + (propagated-inputs + `(("java-plexus-utils" ,java-plexus-utils) + ("java-plexus-cipher" ,java-plexus-cipher) + ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12))) (native-inputs `(("java-modello-core" ,java-modello-core) ;; for modello: @@ -4296,7 +4554,7 @@ project and determining what files need to be rebuilt.") "modello/core/io/ModelReaderTest.java") (("src/test") "modello-core/src/test"))) #t))))) - (inputs + (propagated-inputs `(("java-plexus-utils" ,java-plexus-utils) ("java-plexus-container-default" ,java-plexus-container-default) ("java-sisu-build-api" ,java-sisu-build-api))) @@ -4345,8 +4603,7 @@ XSD and documentation.") "build/classes") #t))))) (inputs - `(("java-modello-core" ,java-modello-core) - ,@(package-inputs java-modello-core))) + `(("java-modello-core" ,java-modello-core))) (synopsis "Modello Java Plugin") (description "Modello Java Plugin generates Java objects for the model."))) @@ -4375,10 +4632,9 @@ XSD and documentation.") "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java" (("src/test") "modello-plugins/modello-plugin-xml/src/test"))) #t))))) - (inputs + (propagated-inputs `(("java-modello-core" ,java-modello-core) - ("java-modello-plugins-java" ,java-modello-plugins-java) - ,@(package-inputs java-modello-core))) + ("java-modello-plugins-java" ,java-modello-plugins-java))) (synopsis "Modello XML Plugin") (description "Modello XML Plugin contains shared code for every plugins working on XML representation of the model."))) @@ -4421,11 +4677,10 @@ every feature for every plugin."))) (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources" "build/classes") #t))))) - (inputs + (propagated-inputs `(("java-modello-core" ,java-modello-core) ("java-modello-plugins-java" ,java-modello-plugins-java) - ("java-modello-plugins-xml" ,java-modello-plugins-xml) - ,@(package-inputs java-modello-core))) + ("java-modello-plugins-xml" ,java-modello-plugins-xml))) (native-inputs `(("java-xmlunit" ,java-xmlunit) ("java-modello-test" ,java-modello-test) @@ -4446,9 +4701,6 @@ on the XPP3 API (XML Pull Parser)."))) (base32 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00")))) (build-system ant-build-system) - (propagated-inputs - `(("java-aqute-bndlib" ,java-aqute-bndlib) - ("java-aqute-libg" ,java-aqute-libg))) (arguments `(#:build-target "compile" ;; The tests require an old version of Janino, which no longer compiles @@ -4465,6 +4717,12 @@ on the XPP3 API (XML Pull Parser)."))) "-Dbiz.aQute.bnd.path=dummy-path") #:phases (modify-phases %standard-phases + (add-before 'build 'remove-bnd-dependency + (lambda _ + ;; This file is the only one to require bnd, and is not needed + ;; because we don't build a bundle. + (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java") + #t)) (add-before 'install 'build-jars (lambda* (#:key make-flags #:allow-other-keys) ;; We cannot use the "jar" target because it depends on a couple @@ -4473,10 +4731,19 @@ on the XPP3 API (XML Pull Parser)."))) (invoke "jar" "-cf" (string-append "dist/asm-" ,version ".jar") "-C" "output/build/tmp" "."))) + (add-before 'install 'fix-pom + (lambda _ + (substitute* (find-files "archive" "\\.pom$") + (("@product.artifact@") ,version)) + #t)) + (add-before 'install 'install-parent + (install-pom-file "archive/asm-parent.pom")) (replace 'install - (install-jars "dist"))))) + (install-from-pom "archive/asm.pom"))))) (native-inputs `(("java-junit" ,java-junit))) + (propagated-inputs + `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3))) (home-page "https://asm.ow2.io/") (synopsis "Very small and fast Java bytecode manipulation framework") (description "ASM is an all purpose Java bytecode manipulation and @@ -4486,6 +4753,32 @@ transformations and analysis algorithms allow easily assembling custom complex transformations and code analysis tools.") (license license:bsd-3))) +(define java-org-ow2-parent-pom-1.3 + (package + (name "java-org-ow2-parent-pom") + (version "1.3") + (source (origin + (method url-fetch) + (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom") + (sha256 + (base32 + "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'unpack) + (delete 'build) + (delete 'configure) + (replace 'install + (install-pom-file (assoc-ref %build-inputs "source")))))) + (home-page "https://ow2.org") + (synopsis "Ow2.org parent pom") + (description "This package contains the parent pom for projects from ow2.org, +including java-asm.") + (license license:lgpl2.1+))) + (define java-asm-bootstrap (package (inherit java-asm) @@ -4493,13 +4786,7 @@ complex transformations and code analysis tools.") (arguments (substitute-keyword-arguments (package-arguments java-asm) ((#:tests? _) #f))) - (native-inputs `()) - (propagated-inputs - `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap) - ("java-aqute-libg" ,java-aqute-libg-bootstrap) - ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib) - (delete `("java-aqute-libg" ,java-aqute-libg) - (package-inputs java-asm))))))) + (native-inputs `()))) (define-public java-cglib (package @@ -4509,7 +4796,7 @@ complex transformations and code analysis tools.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/cglib/cglib.git") + (url "https://github.com/cglib/cglib") (commit (string-append "RELEASE_" (string-map (lambda (c) (if (char=? c #\.) #\_ c)) @@ -4760,8 +5047,29 @@ The jMock library (find-files (assoc-ref inputs "java-easymock") "\\.jar$"))) ";")) (("build/hamcrest-core-\\$\\{version\\}\\.jar") - (string-append (assoc-ref inputs "java-hamcrest-core") - "/share/java/hamcrest-core.jar"))) + (car (find-files (assoc-ref inputs "java-hamcrest-core") + "jar$")))) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((target (string-append (assoc-ref outputs "out") + "/share/java/")) + (version-suffix + ,(string-append + "-" (package-version java-hamcrest-core) ".jar")) + (install-without-version-suffix + (lambda (jar) + (copy-file jar + (string-append target + (basename jar version-suffix) + ".jar"))))) + (mkdir-p target) + (for-each + install-without-version-suffix + (find-files "build" + (lambda (name _) + (and (string-suffix? ".jar" name) + (not (string-suffix? "-sources.jar" name))))))) #t))))))) (inputs `(("java-junit" ,java-junit) @@ -4821,9 +5129,10 @@ overly clever.") #:make-flags (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) (junit (assoc-ref %build-inputs "java-junit"))) - (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") - (string-append "-Dhamcrest.jar=" hamcrest - "/share/java/hamcrest-core.jar"))) + (list (string-append "-Djunit.jar=" + (car (find-files junit "jar$"))) + (string-append "-Dhamcrest.jar=" + (car (find-files hamcrest ".*.jar$"))))) #:phases (modify-phases %standard-phases ;; We want to build the jar in the build phase and run the tests @@ -4910,9 +5219,10 @@ targeting the JVM.") (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) (junit (assoc-ref %build-inputs "java-junit")) (easymock (assoc-ref %build-inputs "java-easymock"))) - (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") - (string-append "-Dhamcrest.jar=" hamcrest - "/share/java/hamcrest-core.jar") + (list (string-append "-Djunit.jar=" + (car (find-files junit "jar$"))) + (string-append "-Dhamcrest.jar=" + (car (find-files hamcrest "jar$"))) (string-append "-Deasymock.jar=" easymock "/share/java/easymock.jar"))) #:phases @@ -5047,16 +5357,18 @@ setter and getter method.") `(#:test-target "test" #:make-flags (list (string-append "-Djunit.jar=" - (assoc-ref %build-inputs "java-junit") - "/share/java/junit.jar")) + (car (find-files (assoc-ref %build-inputs "java-junit") + "jar$")))) #:phases (modify-phases %standard-phases (add-after 'build 'build-javadoc ant-build-javadoc) - (replace 'install (install-jars "target")) + (replace 'install (install-from-pom "pom.xml")) (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) (native-inputs `(("java-junit" ,java-junit) ("java-hamcrest-core" ,java-hamcrest-core))) + (propagated-inputs + `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39))) (home-page "https://commons.apache.org/io/") (synopsis "Common useful IO related classes") (description "Commons-IO contains utility classes, stream implementations, @@ -5080,8 +5392,8 @@ file filters and endian classes.") `(#:test-target "test" #:make-flags (list (string-append "-Dmaven.junit.jar=" - (assoc-ref %build-inputs "java-junit") - "/share/java/junit.jar")) + (car (find-files (assoc-ref %build-inputs "java-junit") + "jar$")))) #:phases (modify-phases %standard-phases (add-before 'build 'delete-network-tests @@ -5116,8 +5428,8 @@ file filters and endian classes.") `(#:test-target "test" #:make-flags (list (string-append "-Dmaven.junit.jar=" - (assoc-ref %build-inputs "java-junit") - "/share/java/junit.jar") + (car (find-files (assoc-ref %build-inputs "java-junit") + "jar$"))) "-Dmaven.compiler.source=1.7" "-Dmaven.compiler.target=1.7") #:phases @@ -5201,42 +5513,24 @@ included: (define-public java-commons-lang3 (package (name "java-commons-lang3") - (version "3.4") + (version "3.9") (source (origin (method url-fetch) (uri (string-append "mirror://apache/commons/lang/source/" "commons-lang3-" version "-src.tar.gz")) (sha256 - (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg")))) + (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6")))) (build-system ant-build-system) - (outputs '("out" "doc")) (arguments - `(#:test-target "test" - #:make-flags - (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all")) - (junit (assoc-ref %build-inputs "java-junit")) - (easymock (assoc-ref %build-inputs "java-easymock")) - (io (assoc-ref %build-inputs "java-commons-io"))) - (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") - (string-append "-Dhamcrest.jar=" hamcrest - "/share/java/hamcrest-all.jar") - (string-append "-Dcommons-io.jar=" io - "/share/java/commons-io-" - ,(package-version java-commons-io) - "-SNAPSHOT.jar") - (string-append "-Deasymock.jar=" easymock - "/share/java/easymock.jar"))) + `(#:jar-name "commons-lang3.jar" + #:source-dir "src/main/java" + #:tests? #f; require junit5 #:phases (modify-phases %standard-phases - (add-after 'build 'build-javadoc ant-build-javadoc) - (replace 'install (install-jars "target")) - (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) - (native-inputs - `(("java-junit" ,java-junit) - ("java-commons-io" ,java-commons-io) - ("java-hamcrest-all" ,java-hamcrest-all) - ("java-easymock" ,java-easymock))) + (replace 'install (install-from-pom "pom.xml"))))) + (propagated-inputs + `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48))) (home-page "https://commons.apache.org/lang/") (synopsis "Extension of the java.lang package") (description "The Commons Lang components contains a set of Java classes @@ -5479,15 +5773,36 @@ bottlenecks move away from the database in an effectively cached system.") (arguments `(#:tests? #f ; no tests included #:jdk ,icedtea-8 - #:jar-name "jsr250.jar")) - (home-page "https://jcp.org/en/jsr/detail?id=250") - (synopsis "Security-related annotations") - (description "This package provides annotations for security. It provides -packages in the @code{javax.annotation} and @code{javax.annotation.security} -namespaces.") - ;; either cddl or gpl2 only, with classpath exception - (license (list license:cddl1.0 - license:gpl2)))) + #:jar-name "jsr250.jar" + #:modules ((guix build ant-build-system) + (guix build utils) + (guix build maven pom) + (guix build java-utils) + (sxml simple)) + #:phases + (modify-phases %standard-phases + (add-before 'install 'create-pom + (lambda _ + (with-output-to-file "pom.xml" + (lambda _ + (sxml->xml + `((project + (modelVersion "4.0.0") + (name "jsr250") + (groupId "javax.annotation") + (artifactId "jsr250-api") + (version ,,version)))))) + #t)) + (replace 'install + (install-from-pom "pom.xml"))))) + (home-page "https://jcp.org/en/jsr/detail?id=250") + (synopsis "Security-related annotations") + (description "This package provides annotations for security. It provides +packages in the @code{javax.annotation} and @code{javax.annotation.security} +namespaces.") + ;; either cddl or gpl2 only, with classpath exception + (license (list license:cddl1.0 + license:gpl2)))) (define-public java-jsr305 (package @@ -5505,7 +5820,28 @@ namespaces.") (build-system ant-build-system) (arguments `(#:tests? #f ; no tests included - #:jar-name "jsr305.jar")) + #:jar-name "jsr305.jar" + #:modules ((guix build ant-build-system) + (guix build java-utils) + (guix build maven pom) + (guix build utils) + (sxml simple)) + #:phases + (modify-phases %standard-phases + (add-before 'install 'create-pom + (lambda _ + (with-output-to-file "pom.xml" + (lambda _ + (sxml->xml + `((project + (modelVersion "4.0.0") + (name "jsr305") + (groupId "com.google.code.findbugs") + (artifactId "jsr305") + (version ,,version)))))) + #t)) + (replace 'install + (install-from-pom "pom.xml"))))) (home-page "http://findbugs.sourceforge.net/") (synopsis "Annotations for the static analyzer called findbugs") (description "This package provides annotations for the findbugs package. @@ -5518,22 +5854,23 @@ It provides packages in the @code{javax.annotations} namespace.") ;; This is the last release of Guava that can be built with Java 7. (version "20.0") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/google/guava/" - "releases/download/v" version - "/guava-" version "-sources.jar")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/guava/") + (commit (string-append "v" version)))) (sha256 (base32 - "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr")))) + "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp")))) (build-system ant-build-system) (arguments `(#:tests? #f ; no tests included #:jar-name "guava.jar" + #:source-dir "guava/src" #:phases (modify-phases %standard-phases (add-after 'unpack 'trim-sources (lambda _ - (with-directory-excursion "src/com/google/common" + (with-directory-excursion "guava/src/com/google/common" ;; Remove annotations to avoid extra dependencies: ;; * "j2objc" annotations are used when converting Java to ;; Objective C; @@ -5552,9 +5889,12 @@ It provides packages in the @code{javax.annotations} namespace.") (("@ForOverride") "") (("@J2ObjCIncompatible") "") (("@IgnoreJRERequirement") ""))) - #t))))) + #t)) + (replace 'install (install-from-pom "guava/pom.xml"))))) (inputs `(("java-jsr305" ,java-jsr305))) + (propagated-inputs + `(("java-guava-parent-pom" ,java-guava-parent-pom))) (home-page "https://github.com/google/guava") (synopsis "Google core libraries for Java") (description "Guava is a set of core libraries that includes new @@ -5564,6 +5904,21 @@ concurrency, I/O, hashing, primitives, reflection, string processing, and much more!") (license license:asl2.0))) +(define java-guava-parent-pom + (package + (inherit java-guava) + (name "java-guava-parent-pom") + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (install-pom-file "pom.xml"))))) + (propagated-inputs + `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7))))) + ;; The java-commons-logging package provides adapters to many different ;; logging frameworks. To avoid an excessive dependency graph we try to build ;; it with only a minimal set of adapters. @@ -5752,7 +6107,7 @@ an Apache AB clone based on HttpCore."))) (define-public java-httpcomponents-httpclient (package (name "java-httpcomponents-httpclient") - (version "4.5.3") + (version "4.5.12") (source (origin (method url-fetch) (uri (string-append "mirror://apache/httpcomponents/httpclient/" @@ -5760,7 +6115,7 @@ an Apache AB clone based on HttpCore."))) version "-src.tar.gz")) (sha256 (base32 - "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1")))) + "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb")))) (build-system ant-build-system) (arguments `(#:jar-name "httpcomponents-httpclient.jar" @@ -5887,12 +6242,14 @@ programs.") ;; package at this point. ;; https://github.com/powermock/powermock (delete-file "archivers/sevenz/SevenZNativeHeapTest.java")) - #t))))) - (inputs + #t)) + (replace 'install (install-from-pom "pom.xml"))))) + (propagated-inputs + `(("java-xz" ,java-xz) + ("apache-commons-parent-pom" ,apache-commons-parent-pom-41))) + (native-inputs `(("java-junit" ,java-junit) - ("java-hamcrest-core" ,java-hamcrest-core) - ("java-mockito" ,java-mockito-1) - ("java-xz" ,java-xz))) + ("java-mockito" ,java-mockito-1))) (home-page "https://commons.apache.org/proper/commons-compress/") (synopsis "Java library for working with compressed files") (description "The Apache Commons Compress library defines an API for @@ -6746,7 +7103,11 @@ logging framework for Java."))) (build-system ant-build-system) ;; TODO: javadoc (arguments - `(#:jar-name "commons-cli.jar")) + `(#:jar-name "commons-cli.jar" + #:phases + (modify-phases %standard-phases + (replace 'install + (install-from-pom "pom.xml"))))) (native-inputs `(("java-junit" ,java-junit) ("java-hamcrest-core" ,java-hamcrest-core))) @@ -6772,34 +7133,38 @@ This is a part of the Apache Commons Project.") (define-public java-commons-codec (package (name "java-commons-codec") - (version "1.10") + (version "1.14") (source (origin (method url-fetch) (uri (string-append "mirror://apache/commons/codec/source/" "commons-codec-" version "-src.tar.gz")) (sha256 (base32 - "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65")))) + "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9")))) (build-system ant-build-system) - (outputs '("out" "doc")) (arguments - `(#:test-target "test" - #:make-flags - (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) - (junit (assoc-ref %build-inputs "java-junit"))) - (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") - (string-append "-Dhamcrest.jar=" hamcrest - "/share/java/hamcrest-core.jar") - ;; Do not append version to jar. - "-Dfinal.name=commons-codec")) + `(#:jar-name "java-commons-codec.jar" + #:source-dir "src/main/java" + #:test-dir "src/test" + #:test-exclude (list "**/*AbstractTest.java") #:phases (modify-phases %standard-phases - (add-after 'build 'build-javadoc ant-build-javadoc) - (replace 'install (install-jars "dist")) - (add-after 'install 'install-doc (install-javadoc "dist/docs/api"))))) + (add-before 'build 'copy-resources + (lambda _ + (copy-recursively "src/main/resources" + "build/classes") + #t)) + (add-before 'check 'copy-test-resources + (lambda _ + (copy-recursively "src/test/resources" + "build/test-classes") + #t)) + (replace 'install (install-from-pom "pom.xml"))))) (native-inputs - `(("java-junit" ,java-junit) - ("java-hamcrest-core" ,java-hamcrest-core))) + `(("java-commons-lang3" ,java-commons-lang3) + ("java-junit" ,java-junit))) + (propagated-inputs + `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50))) (home-page "https://commons.apache.org/codec/") (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs") (description "The codec package contains simple encoder and decoders for @@ -6915,8 +7280,12 @@ more efficient storage-wise than an uncompressed bitmap (as implemented in the (string-append "" ""))) - #t))))) - (inputs + #t)) + (replace 'install + (install-from-pom "slf4j-api/pom.xml"))))) + (propagated-inputs + `(("java-slf4j-parent" ,java-slf4j-parent))) + (native-inputs `(("java-junit" ,java-junit) ("java-hamcrest-core" ,java-hamcrest-core))) (home-page "https://www.slf4j.org/") @@ -6928,14 +7297,20 @@ allowing the end user to plug in the desired logging framework at deployment time.") (license license:expat))) -(define java-slf4j-api-bootstrap +(define java-slf4j-parent (package (inherit java-slf4j-api) - (name "java-slf4j-api-bootstrap") - (inputs `()) + (name "java-slf4j-parent") + (native-inputs `()) + (propagated-inputs '()) (arguments - (substitute-keyword-arguments (package-arguments java-slf4j-api) - ((#:tests? _ #f) #f))))) + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'build) + (delete 'configure) + (replace 'install + (install-pom-file "pom.xml"))))))) (define-public java-slf4j-simple (package @@ -6958,11 +7333,14 @@ time.") ;; ... and build test helper classes here: (apply invoke `("javac" "-d" "." - ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))) - (inputs + ,@(find-files "slf4j-api/src/test" ".*\\.java"))))) + (replace 'install + (install-from-pom "slf4j-simple/pom.xml"))))) + (propagated-inputs + `(("java-slf4j-api" ,java-slf4j-api))) + (native-inputs `(("java-junit" ,java-junit) - ("java-hamcrest-core" ,java-hamcrest-core) - ("java-slf4j-api" ,java-slf4j-api))) + ("java-hamcrest-core" ,java-hamcrest-core))) (home-page "https://www.slf4j.org/") (synopsis "Simple implementation of simple logging facade for Java") (description "SLF4J binding for the Simple implementation, which outputs @@ -7359,8 +7737,7 @@ import org.antlr.grammar.v2.ANTLRTreePrinter;")) `(("junit" ,java-junit))) (propagated-inputs `(("java-stringtemplate" ,java-stringtemplate-3) - ("antlr" ,antlr2) - ("antlr3" ,antlr3-3.1))))) + ("antlr" ,antlr2))))) (define-public antlr3-3.1 (package @@ -8221,20 +8598,6 @@ it manages project dependencies, gives diffs jars, and much more.") `(("hamcrest" ,java-hamcrest-core) ("java-junit" ,java-junit))))) -(define java-aqute-libg-bootstrap - (package - (inherit java-aqute-libg) - (name "java-aqute-libg-bootstrap") - (arguments - ;; Disable tests, at this stage of bootstrap we have no test frameworks. - (substitute-keyword-arguments (package-arguments java-aqute-libg) - ((#:tests? _ #f) #f))) - (inputs - `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap) - ,@(delete `("slf4j" ,java-slf4j-api) - (package-inputs java-aqute-libg)))) - (native-inputs '()))) - (define-public java-aqute-bndlib (package (inherit java-aqute-bnd-annotation) @@ -8258,17 +8621,6 @@ it manages project dependencies, gives diffs jars, and much more.") ("promise" ,java-osgi-util-promise) ("osgi" ,java-osgi-core))))) -(define java-aqute-bndlib-bootstrap - (package - (inherit java-aqute-bndlib) - (name "java-aqute-bndlib-bootstrap") - (inputs - `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap) - ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap) - ,@(delete `("slf4j" ,java-slf4j-api) - (delete `("java-aqute-libg" ,java-aqute-libg) - (package-inputs java-aqute-bndlib))))))) - (define-public java-ops4j-pax-tinybundles (package (name "java-ops4j-pax-tinybundles") @@ -8896,7 +9248,7 @@ the subsequent value resolution at any given level.") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/nhatminhle/cofoja.git") + (url "https://github.com/nhatminhle/cofoja") (commit (string-append "v" version)))) (file-name (string-append "java-cofoja-" version "-checkout")) (sha256 @@ -8967,7 +9319,28 @@ this is not a static analysis tool.)") `(#:jar-name "java-aopalliance.jar" #:jdk ,icedtea-8 #:tests? #f; no tests - #:source-dir "aopalliance/src/main")) + #:source-dir "aopalliance/src/main" + #:modules ((guix build ant-build-system) + (guix build utils) + (guix build maven pom) + (guix build java-utils) + (sxml simple)) + #:phases + (modify-phases %standard-phases + (add-before 'install 'create-pom + (lambda _ + (with-output-to-file "pom.xml" + (lambda _ + (sxml->xml + `((project + (modelVersion "4.0.0") + (name "aopalliance") + (groupId "aopalliance") + (artifactId "aopalliance") + (version "1.0")))))) + #t)) + (replace 'install + (install-from-pom "pom.xml"))))) (home-page "http://aopalliance.sourceforge.net") (synopsis "Aspect-Oriented Programming") (description "The AOP Alliance project is a joint project between several @@ -8978,20 +9351,25 @@ software engineering people who are interested in Aspect-Oriented Programming (define-public java-javax-inject (package (name "java-javax-inject") - (version "tck-1") + (version "1") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/javax-inject/javax-inject/" - "archive/javax.inject-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/javax-inject/javax-inject") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0")))) + "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x")))) (build-system ant-build-system) (arguments `(#:jar-name "java-javax-inject.jar" - #:jdk ,icedtea-8 - #:tests? #f)); no tests - (home-page "http://github.com/javax-inject/javax-inject") + #:tests? #f; no tests + #:phases + (modify-phases %standard-phases + (replace 'install + (install-from-pom "pom.xml"))))) + (home-page "https://github.com/javax-inject/javax-inject") (synopsis "JSR-330: Dependency Injection for Java") (description "This package specifies a means for obtaining objects in such a way as to maximize reusability, testability and maintainability compared to @@ -9011,32 +9389,42 @@ the dependency is said to be unsatisfied, and the application is broken.") (name "java-guice") (version "4.1") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/google/guice/archive/" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/guice") + (commit version))) + (file-name (git-file-name name version)) (modules '((guix build utils))) (snippet `(begin - (for-each delete-file (find-files "." ".*.jar")))) + (for-each delete-file (find-files "." ".*.jar")) #t)) (sha256 (base32 - "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp")))) + "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq")))) (build-system ant-build-system) (arguments `(#:jar-name "java-guice.jar" #:jdk ,icedtea-8 #:tests? #f; FIXME: tests are not in a java sub directory - #:source-dir "core/src")) - (inputs - `(("guava" ,java-guava) + #:source-dir "core/src" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'make-files-writable + (lambda _ + (for-each make-file-writable (find-files ".")) + #t)) + (replace 'install + (install-from-pom "core/pom.xml"))))) + (propagated-inputs + `(("java-aopalliance" ,java-aopalliance) + ("java-asm" ,java-asm) ("java-cglib" ,java-cglib) - ("java-aopalliance" ,java-aopalliance) + ("java-guava" ,java-guava) ("java-javax-inject" ,java-javax-inject) - ("java-asm" ,java-asm))) + ("java-guice-parent-pom" ,java-guice-parent-pom))) (home-page "https://github.com/google/guice") (synopsis "Lightweight dependency injection framework") - (description "Guice is a lightweight dependency injection framework fo + (description "Guice is a lightweight dependency injection framework for Java 6 and above.") (license license:asl2.0))) @@ -9048,24 +9436,76 @@ Java 6 and above.") `(#:jar-name "guice-servlet.jar" #:source-dir "extensions/servlet/src/" #:jdk ,icedtea-8 - #:tests? #f)); FIXME: not in a java subdir + #:tests? #f ; FIXME: not in a java subdir + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'make-files-writable + (lambda _ + (for-each make-file-writable (find-files ".")) + #t))))) (inputs `(("guice" ,java-guice) ("servlet" ,java-classpathx-servletapi) ,@(package-inputs java-guice))))) +(define java-guice-parent-pom + (package + (inherit java-guice) + (name "java-guice-parent-pom") + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (add-after 'install 'install-extensions + (install-pom-file "extensions/pom.xml")) + (replace 'install + (install-pom-file "pom.xml"))))) + (propagated-inputs + `(("java-google-parent-pom" ,java-google-parent-pom-5))))) + +(define java-google-parent-pom-5 + (package + (name "java-google-parent-pom") + (version "5") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/google-maven-parents") + (commit (string-append "google-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (install-pom-file "pom.xml"))))) + (home-page "https://github.com/google/google-maven-parents") + (synopsis "Google parent pom") + (description "This package contains the Maven parent POM for other Google +Java projects.") + (license license:asl2.0))) + (define-public java-assertj (package (name "java-assertj") (version "3.8.0") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/joel-costigliola/" - "assertj-core/archive/" - "assertj-core-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/joel-costigliola/assertj-core") + (commit (string-append "assertj-core-" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz")))) + "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1")))) (build-system ant-build-system) (arguments `(#:jar-name "java-assertj.jar" @@ -9090,14 +9530,22 @@ readability and make maintenance of tests easier.") (name "java-jboss-javassist") (version "3.21.0") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/jboss-javassist/javassist/" - "archive/rel_" - (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) - "_ga.tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/jboss-javassist/javassist") + (commit + (string-append "rel_" + (string-map + (lambda (x) (if (eq? x #\.) #\_ x)) version) + "_ga")))) + (file-name (git-file-name name version)) (sha256 (base32 - "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf")))) + "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file "javassist.jar"))))) (build-system ant-build-system) (arguments `(#:jar-name "java-jboss-javassist.jar" @@ -9106,9 +9554,9 @@ readability and make maintenance of tests easier.") #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3 #:phases (modify-phases %standard-phases - (add-before 'configure 'remove-binary + (add-after 'unpack 'make-files-writable (lambda _ - (delete-file "javassist.jar") + (for-each make-file-writable (find-files ".")) #t))))) (native-inputs `(("junit" ,java-junit))) @@ -9125,13 +9573,14 @@ file when the JVM loads it.") (name "java-jcommander") (version "1.71") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/cbeust/jcommander/archive/" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/cbeust/jcommander") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx")))) + "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57")))) (build-system ant-build-system) (arguments `(#:jar-name "java-jcommander.jar" @@ -9150,25 +9599,41 @@ annotations.") (name "java-bsh") (version "2.0b6") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/beanshell/beanshell/archive/" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/beanshell/beanshell") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv")))) + "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete bundled third-party jar archives. + (for-each delete-file (find-files "." ".*.jar$")) + (for-each (lambda (file) (chmod file #o644)) + (find-files "." ".")) + #t)))) (build-system ant-build-system) (arguments `(#:build-target "jarall" #:test-target "junit-tests-all" #:phases (modify-phases %standard-phases + (add-before 'install 'fix-pom + (lambda _ + (substitute* "pom.xml" + (("org.apache-extras.beanshell") "org.beanshell")) + #t)) (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((share (string-append (assoc-ref outputs "out") "/share/java"))) - (mkdir-p share) - (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar")) - #t)))))) + (install-from-pom "pom.xml"))))) + (inputs + `(("java-classpathx-servletapi" ,java-classpathx-servletapi) + ("java-commons-bsf" ,java-commons-bsf))) + (native-inputs + `(("java-junit" ,java-junit) + ("javacc" ,javacc-3))) (home-page "http://beanshell.org/") (synopsis "Lightweight Scripting for Java") (description "BeanShell is a small, free, embeddable Java source @@ -9274,7 +9739,7 @@ those in Perl and JavaScript.") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/cbeust/testng.git") + (url "https://github.com/cbeust/testng") (commit version))) (file-name (string-append name "-" version "-checkout")) (sha256 @@ -9352,7 +9817,7 @@ to use.") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/neilalexander/jnacl.git") + (url "https://github.com/neilalexander/jnacl") (commit commit))) (file-name (git-file-name name version)) (sha256 @@ -9935,7 +10400,7 @@ protocol-independent framework to build mail and messaging applications.") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/zeromq/jeromq.git") + (url "https://github.com/zeromq/jeromq") (commit (string-append "v" version)))) (file-name (string-append name "-" version "-checkout")) (sha256 @@ -10084,13 +10549,16 @@ outputting XML data from Java code.") ;; org.apache.xbean.asm6 is actually repackaged java-asm (substitute* (string-append dir "XbeanAsmParameterNameLoader.java") (("org.apache.xbean.asm5") "org.objectweb.asm")) - #t)))))) + #t))) + (replace 'install (install-from-pom "xbean-reflect/pom.xml"))))) (inputs `(("asm" ,java-asm) ("log4j" ,java-log4j-api) ("log4j-1.2" ,java-log4j-1.2-api) ("log4j-core" ,java-log4j-core) ("logging" ,java-commons-logging-minimal))) + (propagated-inputs + `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom))) (native-inputs `(("junit" ,java-junit))) (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/") @@ -10099,6 +10567,65 @@ outputting XML data from Java code.") and graphs of objects for dependency injection frameworks") (license license:asl2.0))) +(define java-geronimo-genesis-2.1 + (package + (name "java-geronimo-genesis") + (version "2.1") + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "https://svn.apache.org/repos/asf/" + "geronimo/genesis/tags/genesis-" + version)) + (revision 1807396))) + (file-name (string-append name "-" version "-source")) + (sha256 + (base32 + "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (install-pom-file "pom.xml")) + (add-after 'install 'install-enforcer-rules + (install-pom-file "genesis-enforcer-rules/pom.xml")) + (add-after 'install 'install-flava + (install-pom-file "genesis-default-flava/pom.xml")) + (add-after 'install 'install-packaging + (install-pom-file "genesis-packaging/pom.xml")) + (add-after 'install-flava 'install-flava-java4 + (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml")) + (add-after 'install-flava 'install-flava-java5 + (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml")) + (add-after 'install-flava 'install-flava-java6 + (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml"))))) + (propagated-inputs + `(("apache-parent-pom" ,apache-parent-pom-13))) + (home-page "https://geronimo.apache.org") + (synopsis "Collection of maven POM files for the Geronimo project") + (description "Apache Geronimo is a server runtime. This package contains +only pom files used by other components in the Geronimo project.") + (license license:asl2.0))) + +(define java-geronimo-parent-pom + (package + (inherit java-geronimo-xbean-reflect) + (name "java-geronimo-parent-pom") + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (install-pom-file "pom.xml"))))) + (propagated-inputs + `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1))))) + (define-public java-geronimo-xbean-bundleutils (package (inherit java-geronimo-xbean-reflect) @@ -10137,7 +10664,7 @@ public Bundle getBundle()")) ("java-osgi-framework" ,java-osgi-framework) ("java-eclipse-osgi" ,java-eclipse-osgi) ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin))))) - + (define-public java-geronimo-xbean-asm-util (package (inherit java-geronimo-xbean-reflect) @@ -10149,7 +10676,7 @@ public Bundle getBundle()")) (inputs `(("java-asm" ,java-asm))) (native-inputs '()))) - + (define-public java-geronimo-xbean-finder (package (inherit java-geronimo-xbean-reflect) @@ -10349,7 +10876,31 @@ sequences to format your console output which works on every platform.") (build-system ant-build-system) (arguments `(#:jar-name "java-jboss-el-api_spec.jar" - #:jdk ,icedtea-8)) + #:modules ((guix build ant-build-system) + (guix build utils) + (guix build maven pom) + (guix build java-utils) + (sxml simple)) + #:phases + (modify-phases %standard-phases + ;; the origin of javax.el:javax.el-api is unknown, so we use this package + ;; instead, which implements the same thing. We override the pom file + ;; to "rename" the package so it can be found by maven. + (add-before 'install 'override-pom + (lambda _ + (delete-file "pom.xml") + (with-output-to-file "pom.xml" + (lambda _ + (sxml->xml + `(project + (modelVersion "4.0.0") + (name "el-api") + (groupId "javax.el") + (artifactId "javax.el-api") + (version "3.0"))))) + #t)) + (replace 'install + (install-from-pom "pom.xml"))))) (inputs `(("java-junit" ,java-junit))) (home-page "https://github.com/jboss/jboss-el-api_spec") @@ -10378,7 +10929,33 @@ JavaServer Pages (JSP).") `(#:jar-name "java-jboss-interceptors-api_spec.jar" #:jdk ,icedtea-8 #:source-dir "." - #:tests? #f)); no tests + #:tests? #f; no tests + #:modules ((guix build ant-build-system) + (guix build utils) + (guix build maven pom) + (guix build java-utils) + (sxml simple)) + #:phases + (modify-phases %standard-phases + ;; the origin of javax.interceptor:javax.interceptor-api is unknown, + ;; so we use this package instead, which implements the same thing. + ;; We override the pom file to "rename" the package so it can be found + ;; by maven. + (add-before 'install 'override-pom + (lambda _ + (delete-file "pom.xml") + (with-output-to-file "pom.xml" + (lambda _ + (sxml->xml + `(project + (modelVersion "4.0.0") + (name "interceptor-api") + (groupId "javax.interceptor") + (artifactId "javax.interceptor-api") + (version "3.0"))))) + #t)) + (replace 'install + (install-from-pom "pom.xml"))))) (home-page "https://github.com/jboss/jboss-interceptors-api_spec") (synopsis "Interceptors 1.2 API classes from JSR 318") (description "Java-jboss-interceptors-api-spec implements the Interceptors @@ -10405,11 +10982,16 @@ specific events.") #:jar-name "java-cdi-api.jar" #:test-dir "api/src/test" #:jdk ,icedtea-8 - #:tests? #f)); Tests fail because we don't have a CDI provider yet - (inputs + #:tests? #f; Tests fail because we don't have a CDI provider yet + #:phases + (modify-phases %standard-phases + (replace 'install + (install-from-pom "api/pom.xml"))))) + (propagated-inputs `(("java-javax-inject" ,java-javax-inject) ("java-jboss-el-api-spec" ,java-jboss-el-api-spec) - ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec))) + ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec) + ("java-weld-parent-pom" ,java-weld-parent-pom))) (native-inputs `(("java-testng" ,java-testng) ("java-hamcrest-core" ,java-hamcrest-core))) @@ -10722,13 +11304,13 @@ features that bring it on par with the Z shell line editor.") ,(origin (method git-fetch) (uri (git-reference - (url "https://github.com/xmlunit/test-resources.git") + (url "https://github.com/xmlunit/test-resources") (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec"))) (file-name "java-xmlunit-test-resources") (sha256 (base32 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr")))))) - (home-page "http://www.xmlunit.org/") + (home-page "https://www.xmlunit.org/") (synopsis "XML output testing") (description "XMLUnit provides you with the tools to verify the XML you emit is the one you want to create. It provides helpers to validate against @@ -10987,11 +11569,10 @@ from ORO, Inc.") ;; so don't fail if we can't find a native library for another architecture. (("zipfileset") "zipfileset erroronmissingarchive=\"false\"")) ;; Copy test dependencies - (copy-file (string-append (assoc-ref inputs "java-junit") - "/share/java/junit.jar") + (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$")) "lib/junit.jar") - (copy-file (string-append (assoc-ref inputs "java-hamcrest-core") - "/share/java/hamcrest-core.jar") + (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core") + "jar$")) "lib/hamcrest-core.jar") ;; FIXME: once reflections.jar is built, copy it to lib/test. #t)) @@ -11040,11 +11621,11 @@ Java method invocation.") (string-append (assoc-ref inputs "java-native-access") "/share/java/jna.jar")) (("../../lib/hamcrest-core-.*.jar") - (string-append (assoc-ref inputs "java-hamcrest-core") - "/share/java/hamcrest-core.jar")) + (car (find-files (assoc-ref inputs "java-hamcrest-core") + "jar$"))) (("../../lib/junit.jar") - (string-append (assoc-ref inputs "java-junit") - "/share/java/junit.jar"))) + (car (find-files (assoc-ref inputs "java-junit") + "jar$")))) #t)) (replace 'install (install-jars "dist"))))) @@ -11281,25 +11862,30 @@ and reporting) project dependencies. It is characterized by the following: (define-public java-eclipse-sisu-inject (package (name "java-eclipse-sisu-inject") - (version "0.3.3") + (version "0.3.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/eclipse/sisu.inject/") - (commit "releases/0.3.3"))) + (commit (string-append "releases/" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7")))) + "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6")))) (build-system ant-build-system) (arguments `(#:jar-name "eclipse-sisu-inject.jar" #:source-dir "org.eclipse.sisu.inject/src" - #:jdk ,icedtea-8 - #:tests? #f)); no tests - (inputs + #:tests? #f; no tests + #:phases + (modify-phases %standard-phases + (replace 'install + (install-from-pom "org.eclipse.sisu.inject/pom.xml"))))) + (propagated-inputs `(("java-guice" ,java-guice) - ("java-guice-servlet" ,java-guice-servlet) + ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom))) + (inputs + `(("java-guice-servlet" ,java-guice-servlet) ("java-javax-inject" ,java-javax-inject) ("java-javaee-servletapi" ,java-javaee-servletapi) ("java-junit" ,java-junit) @@ -11320,6 +11906,20 @@ Integration with other containers via the Eclipse Extension Registry and the OSGi Service Registry is a goal of this project.") (license license:epl1.0))) +(define java-sisu-inject-parent-pom + (package + (inherit java-eclipse-sisu-inject) + (name "java-sisu-inject-parent-pom") + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (install-pom-file "pom.xml"))))) + (propagated-inputs '()))) + (define-public java-eclipse-sisu-plexus (package (name "java-eclipse-sisu-plexus") @@ -11327,7 +11927,7 @@ OSGi Service Registry is a goal of this project.") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/eclipse/sisu.plexus.git") + (url "https://github.com/eclipse/sisu.plexus") (commit (string-append "releases/" version)))) (file-name (git-file-name name version)) (sha256 @@ -11381,22 +11981,27 @@ OSGi Service Registry is a goal of this project.") (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java" (("resources/component-jar") "org.eclipse.sisu.plexus.tests/resources/component-jar"))) - #t))))) - (inputs + #t)) + (replace 'install + (install-from-pom "org.eclipse.sisu.plexus/pom.xml"))))) + (propagated-inputs `(("java-plexus-classworlds" ,java-plexus-classworlds) - ("java-plexus-util" ,java-plexus-utils) + ("java-plexus-utils" ,java-plexus-utils) ("java-plexus-component-annotations" ,java-plexus-component-annotations) - ("java-osgi-framework" ,java-osgi-framework) + ("java-cdi-api" ,java-cdi-api) ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) - ("java-guice" ,java-guice) - ("java-javax-inject" ,java-javax-inject) + ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom))) + (inputs + `(("java-osgi-framework" ,java-osgi-framework) ("java-slf4j-api" ,java-slf4j-api) - ("java-junit" ,java-junit))) - (native-inputs - `(("java-guava" ,java-guava) + ("java-javax-inject" ,java-javax-inject) + ("java-guice" ,java-guice) + ("java-guava" ,java-guava) ("java-aopalliance" ,java-aopalliance) - ("java-cglib" ,java-cglib) - ("java-asm" ,java-asm))) + ("java-asm" ,java-asm) + ("java-cglib" ,java-cglib))) + (native-inputs + `(("java-junit" ,java-junit))) (home-page "https://www.eclipse.org/sisu/") (synopsis "Plexus support for the sisu container") (description "Sisu is a modular JSR330-based container that supports @@ -11404,6 +12009,21 @@ classpath scanning, auto-binding, and dynamic auto-wiring. This package adds Plexus support to the Sisu-Inject container.") (license license:epl1.0))) +(define java-sisu-plexus-parent-pom + (package + (inherit java-eclipse-sisu-plexus) + (name "java-sisu-plexus-parent-pom") + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (install-pom-file "pom.xml"))))) + (propagated-inputs + `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9))))) + (define-public java-commons-compiler (package (name "java-commons-compiler") @@ -11922,6 +12542,7 @@ Isolation and Durability) properties.") (uri (git-reference (url "https://github.com/remkop/picocli") (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c")))) @@ -11937,3 +12558,28 @@ Isolation and Durability) properties.") for the JVM. It supports colors, autocompletion, subcommands, and more. Written in Java, usable from Groovy, Kotlin, Scala, etc.") (license license:asl2.0))) + +(define-public java-jetbrains-annotations + (package + (name "java-jetbrains-annotations") + (version "19.0.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JetBrains/java-annotations") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "jetbrains-annotations.jar" + #:source-dir "common/src/main/java:java8/src/main/java" + #:tests? #f)); no tests + (home-page "https://github.com/JetBrains/java-annotations") + (synopsis "Annotations for Java and other JVM languages") + (description "This package contains a set of Java annotations which can be +used in JVM-based languages. They serve as an additional documentation and +can be interpreted by IDEs and static analysis tools to improve code analysis.") + (license license:expat)))