;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
-;;; Copyright © 2017, 2018, 2019 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2017-2020 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gawk)
#:use-module (gnu packages gettext)
- #:use-module (gnu packages gcc)
#:use-module (gnu packages gl)
#:use-module (gnu packages ghostscript) ;lcms
#:use-module (gnu packages gnome)
#: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)
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
("libffi" ,libffi)
("zip" ,zip)
("zlib" ,zlib)))
- ;; When built with a recent GCC and glibc the configure step of icedtea-6
- ;; fails with an invalid instruction error.
- (native-inputs
- `(("gcc" ,gcc-5)
- ("libc" ,glibc-2.28)))
(home-page "http://jamvm.sourceforge.net/")
(synopsis "Small Java Virtual Machine")
(description "JamVM is a Java Virtual Machine conforming to the JVM
(version "1.8.4")
(source (origin
(method url-fetch)
- (uri (string-append "http://archive.apache.org/dist/"
+ (uri (string-append "mirror://apache/"
"ant/source/apache-ant-"
version "-src.tar.bz2"))
(sha256
(sha256
(base32
"1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
+ (patches
+ (search-patches "jamvm-2.0.0-disable-branch-patching.patch"))
(snippet
'(begin
;; Remove precompiled software.
(modules '((guix build utils)))
(snippet
`(begin
- (for-each delete-file (find-files "." ".*.bin$"))
- (for-each delete-file (find-files "." ".*.exe$"))
- (for-each delete-file (find-files "." ".*.jar$"))
+ (for-each delete-file
+ (find-files "." ".*.(bin|exe|jar)$"))
#t))))
(build-system gnu-build-system)
(outputs '("out" "jdk" "doc"))
(arguments
`(#:tests? #f; require jtreg
+ #:make-flags '("all")
#:imported-modules
((guix build syscalls)
,@%gnu-build-system-modules)
"--with-libjpeg=system"
(string-append "--prefix=" (assoc-ref outputs "out")))
#t))
- (replace 'build
+ (add-before 'build 'write-source-revision-file
(lambda _
(with-output-to-file ".src-rev"
(lambda _
(display ,version)))
- (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
- (invoke "make" "all")
#t))
+ (replace 'build
+ (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
+ (apply invoke "make"
+ `(,@(if parallel-build?
+ (list (string-append "JOBS="
+ (number->string (parallel-job-count))))
+ '())
+ ,@make-flags))))
;; Some of the libraries in the lib/ folder link to libjvm.so.
;; But that shared object is located in the server/ folder, so it
;; cannot be found. This phase creates a symbolic link in the
(native-inputs
`(("icedtea-8" ,icedtea-8)
("icedtea-8:jdk" ,icedtea-8 "jdk")
- ;; XXX: The build system is not particularly parallel safe and
- ;; fails with newer versions of GNU Make.
+ ;; XXX: The build system fails with newer versions of GNU Make.
("make@4.2" ,gnu-make-4.2)
("unzip" ,unzip)
("which" ,which)
(modules '((guix build utils)))
(snippet
`(begin
- (for-each delete-file (find-files "." ".*.bin$"))
- (for-each delete-file (find-files "." ".*.exe$"))
- (for-each delete-file (find-files "." ".*.jar$"))
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
#t))))
(arguments
(substitute-keyword-arguments (package-arguments openjdk9)
(modules '((guix build utils)))
(snippet
`(begin
- (for-each delete-file (find-files "." ".*.bin$"))
- (for-each delete-file (find-files "." ".*.exe$"))
- (for-each delete-file (find-files "." ".*.jar$"))
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
#t))))
(build-system gnu-build-system)
(outputs '("out" "jdk" "doc"))
,@%gnu-build-system-modules)
#:tests? #f; requires jtreg
;; TODO package jtreg
- ;; disable parallel builds, as the openjdk build system does not like -j
- #:parallel-build? #f
- #:parallel-tests? #f
- ;; reenable parallel builds and tests by adding the flags manually
- #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
#:configure-flags
`("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
"--disable-warnings-as-errors"
(assoc-ref %build-inputs "freetype") "/include")
,(string-append "--with-freetype-lib="
(assoc-ref %build-inputs "freetype") "/lib"))
- ;; TODO
#:phases
(modify-phases %standard-phases
(add-after 'patch-source-shebangs 'fix-java-shebangs
(substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
(("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
#t))
- (replace 'build
+ (add-before 'build 'write-source-revision-file
(lambda _
(with-output-to-file ".src-rev"
(lambda _
(display ,version)))
- (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
- (invoke "make" "all")
#t))
+ (replace 'build
+ (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
+ (apply invoke "make" "all"
+ `(,@(if parallel-build?
+ (list (string-append "JOBS="
+ (number->string (parallel-job-count))))
+ '())
+ ,@make-flags))))
;; jdk 11 does not build jre by default any more
;; building it anyways
;; for further information see:
;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
(add-after 'build 'build-jre
- (lambda _
- (invoke "make" "legacy-jre-image")
- #t))
+ (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
+ (apply invoke "make" "legacy-jre-image"
+ `(,@(if parallel-build?
+ (list (string-append "JOBS="
+ (number->string (parallel-job-count))))
+ '())
+ ,@make-flags))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(modules '((guix build utils)))
(snippet
`(begin
- (for-each delete-file (find-files "." ".*.bin$"))
- (for-each delete-file (find-files "." ".*.exe$"))
- (for-each delete-file (find-files "." ".*.jar$"))
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
#t))))
(inputs
`(("alsa-lib" ,alsa-lib)
("zip" ,zip)))
(home-page "https://openjdk.java.net/projects/jdk/12")))
+(define-public openjdk13
+ (package
+ (inherit openjdk12)
+ (name "openjdk")
+ (version "13.0")
+ (source (origin
+ (method url-fetch)
+ (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
+ (file-name (string-append name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
+ #t))))
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("cups" ,cups)
+ ("fontconfig" ,fontconfig)
+ ("freetype" ,freetype)
+ ("giflib" ,giflib)
+ ("lcms" ,lcms)
+ ("libjpeg" ,libjpeg-turbo)
+ ("libpng" ,libpng)
+ ("libx11" ,libx11)
+ ("libxext" ,libxext)
+ ("libxrandr" ,libxrandr)
+ ("libxrender" ,libxrender)
+ ("libxt" ,libxt)
+ ("libxtst" ,libxtst)))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("openjdk12:jdk" ,openjdk12 "jdk")
+ ("make@4.2" ,gnu-make-4.2)
+ ("pkg-config" ,pkg-config)
+ ("unzip" ,unzip)
+ ("which" ,which)
+ ("zip" ,zip)))
+ (home-page "https://openjdk.java.net/projects/jdk/13")))
+
+(define-public openjdk14
+ (package
+ (inherit openjdk13)
+ (name "openjdk")
+ (version "14.0")
+ (source (origin
+ (method url-fetch)
+ (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
+ (file-name (string-append name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
+ ;; The m4 macro uses 'help' to search for builtins, which is
+ ;; not available in bash-minimal
+ (substitute* "make/autoconf/basics.m4"
+ (("if help") "if command -v"))
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
+ #t))))
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("cups" ,cups)
+ ("fontconfig" ,fontconfig)
+ ("freetype" ,freetype)
+ ("giflib" ,giflib)
+ ("lcms" ,lcms)
+ ("libjpeg" ,libjpeg-turbo)
+ ("libpng" ,libpng)
+ ("libx11" ,libx11)
+ ("libxext" ,libxext)
+ ("libxrandr" ,libxrandr)
+ ("libxrender" ,libxrender)
+ ("libxt" ,libxt)
+ ("libxtst" ,libxtst)))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("make@4.2" ,gnu-make-4.2)
+ ("openjdk13:jdk" ,openjdk13 "jdk")
+ ("pkg-config" ,pkg-config)
+ ("unzip" ,unzip)
+ ("which" ,which)
+ ("zip" ,zip)))
+ (home-page "https://openjdk.java.net/projects/jdk/14")))
+
(define-public icedtea icedtea-8)
\f
(source (origin
(method hg-fetch)
(uri (hg-reference
- (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
- (changeset (string-append
- (string-join (string-split version #\.) "u")
- "-ga"))))
+ (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
+ (changeset (string-append
+ (string-join (string-split version #\.) "u")
+ "-ga"))))
(file-name (string-append name "-" version "-checkout"))
(modules '((guix build utils)))
(snippet
#t))
(sha256
(base32
- "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
+ "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
+ (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "java-openjfx.jar"
(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
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)
(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
(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"
(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
license:mpl2.0
license:lgpl2.1+))))
-(define-public java-xz
- (package
- (name "java-xz")
- (version "1.6")
- (source (origin
- (method url-fetch)
- (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
- (sha256
- (base32
- "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
- (build-system ant-build-system)
- (arguments
- `(#:tests? #f ; There are no tests to run.
- #:jar-name ,(string-append "xz-" version ".jar")
- #:phases
- (modify-phases %standard-phases
- ;; The unpack phase enters the "maven" directory by accident.
- (add-after 'unpack 'chdir
- (lambda _ (chdir "..") #t)))))
- (native-inputs
- `(("unzip" ,unzip)))
- (home-page "https://tukaani.org/xz/java.html")
- (synopsis "Implementation of XZ data compression in pure Java")
- (description "This library aims to be a complete implementation of XZ data
-compression in pure Java. Single-threaded streamed compression and
-decompression and random access decompression have been fully implemented.")
- (license license:public-domain)))
-
;; java-hamcrest-core uses qdox version 1.12. We package this version instead
;; of the latest release.
(define-public java-qdox-1.12
(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
(("<path id=\"path.build\">")
(string-append "<path id=\"path.build\"><fileset dir=\""
(assoc-ref inputs "java-asm-bootstrap")
- "/share/java\" includes=\"**/*.jar\"/>"))
+ "/lib/m2\" includes=\"**/*.jar\"/>"))
(("<zipfileset src=\"lib/asm-4.0.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")))
(("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
(string-append "<include name=\"org/objectweb/asm/"
"commons/Remap*.class\"/>"
"<include name=\"org/objectweb/asm/"
"commons/SignatureRemapper.class\"/>")))
#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")
(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))
(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
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")
#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
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
(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.
;; 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
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
(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)))
(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
(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/")
`(#: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
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
(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)
(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
#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)
("classworld" ,java-plexus-classworlds)
("xbean" ,java-geronimo-xbean-reflect)
- ("xz" ,java-tukaani-xz)
+ ("xz" ,java-xz)
("guava" ,java-guava)))
(home-page "https://github.com/codehaus-plexus/plexus-archiver")
(synopsis "Archiver component of the Plexus project")
;; 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
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)
(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")
(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
(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
(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
(add-before 'check 'fix-paths
(lambda _
(copy-recursively "src/test/resources" "target")
- #t)))))
- (inputs
- `(("java-plexus-cipher" ,java-plexus-cipher)))
- (native-inputs
- `(("java-modello-core" ,java-modello-core)
+ #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:
("java-plexus-container-default" ,java-plexus-container-default)
("java-plexus-classworlds" ,java-plexus-classworlds)
"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)))
"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.")))
"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.")))
(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)
(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
"-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
(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
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)
(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
(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))
(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)
#: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
(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
`(#: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,
`(#: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
`(#: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
(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
(arguments
`(#:tests? #f ; no tests included
#:jdk ,icedtea-8
- #:jar-name "jsr250.jar"))
+ #: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
(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.
;; 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;
(("@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
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.
(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/"
version "-src.tar.gz"))
(sha256
(base32
- "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
+ "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "httpcomponents-httpclient.jar"
;; 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
(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)))
(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
(string-append "<include name=\"**/*Test.java\" />"
"<exclude name=\"**/MultithreadedInitializationTest"
".java\" />")))
- #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/")
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
;; ... 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
`(("junit" ,java-junit)))
(propagated-inputs
`(("java-stringtemplate" ,java-stringtemplate-3)
- ("antlr" ,antlr2)
- ("antlr3" ,antlr3-3.1)))))
+ ("antlr" ,antlr2)))))
(define-public antlr3-3.1
(package
`(("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)
("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")
(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
`(#: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
(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
(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)))
`(#: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"
(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"
#: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)))
(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"
(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
(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
(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
(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
;; 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/")
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)
("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)
(inputs
`(("java-asm" ,java-asm)))
(native-inputs '())))
-
+
(define-public java-geronimo-xbean-finder
(package
(inherit java-geronimo-xbean-reflect)
(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")
`(#: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
#: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)))
(define-public java-xerces
(package
(name "java-xerces")
- (version "2.11.0")
+ (version "2.12.1")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://apache/xerces/j/source/"
"Xerces-J-src." version ".tar.gz"))
(sha256
- (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
+ (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
(patches (search-patches
"java-xerces-xjavac_taskdef.patch"
"java-xerces-build_dont_unzip.patch"
,(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
(version "3.1")
(source (origin
(method url-fetch)
- (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
+ (uri (string-append "mirror://apache/httpcomponents/"
"commons-httpclient/source/commons-httpclient-"
version "-src.tar.gz"))
(sha256
(version "2.0.8")
(source (origin
(method url-fetch)
- (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
+ (uri (string-append "mirror://apache/jakarta/oro/"
"jakarta-oro-" version ".tar.gz"))
(sha256
(base32
;; 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))
(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")))))
(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)
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")
(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
(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
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")
Isolation and Durability) properties.")
;; either gpl2 only with classpath exception or cddl.
(license (list license:gpl2 license:cddl1.0))))
+
+(define-public java-picocli
+ (package
+ (name "java-picocli")
+ (version "4.3.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/remkop/picocli")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "picocli.jar"
+ #:source-dir "src/main/java"
+ ;; Tests require missing dependencies (junitparams, system-rules)
+ #:tests? #f))
+ (home-page "https://picocli.info")
+ (synopsis "REPL for the JVM")
+ (description "Picocli is a framework for building command line applications
+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)))