#:use-module (gnu packages libffi)
#:use-module (gnu packages linux) ;alsa
#:use-module (gnu packages maths)
+ #:use-module (gnu packages maven)
#:use-module (gnu packages maven-parent-pom)
#:use-module (gnu packages nss)
#:use-module (gnu packages onc-rpc)
,(package-version java-commons-lang) ".jar"))
(("\\$\\{lib\\}/commons-io/commons-io.jar")
(string-append (assoc-ref inputs "java-commons-io")
- "/share/java/commons-io-"
+ "/lib/m2/commons-io/commons-io/"
,(package-version java-commons-io)
- "-SNAPSHOT.jar"))
+ "/commons-io-"
+ ,(package-version java-commons-io)
+ ".jar"))
;; Remove dependency on svn
(("<build-info.*") "")
(("\\$\\{revision.number\\}")
,(package-version java-commons-lang) ".jar"))
(("\\$\\{lib\\}/commons-io/commons-io.jar")
(string-append (assoc-ref inputs "java-commons-io")
- "/share/java/commons-io-"
+ "/lib/m2/commons-io/commons-io/"
+ ,(package-version java-commons-io)
+ "/commons-io-"
,(package-version java-commons-io)
- "-SNAPSHOT.jar"))
+ ".jar"))
(("\\$\\{lib\\}/testng/testng-jdk15.jar")
(string-append (assoc-ref inputs "java-testng")
"/share/java/java-testng.jar"))
(build-system ant-build-system)
(arguments
`(#:jar-name "qdox.jar"
- #:tests? #f)); no tests
+ #:tests? #f; no tests
+ #:modules
+ ((guix build ant-build-system)
+ (guix build java-utils)
+ (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 "QDox")
+ (groupId "com.thoughtworks.qdox")
+ (artifactId "qdox")
+ (version ,,version))))))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
(home-page "https://github.com/codehaus/qdox")
(synopsis "Parse definitions from Java source files")
(description "QDox is a high speed, small footprint parser for extracting
documentation tools.")
(license license:asl2.0)))
+(define-public java-qdox-2-M9
+ (package
+ (inherit java-qdox)
+ (version "2.0-M9"); required by plexus-java
+ (source (origin
+ (method url-fetch)
+ ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
+ ;; Older releases at https://github.com/codehaus/qdox/
+ ;; Note: The release at maven is pre-generated. The release at
+ ;; github requires jflex.
+ (uri (string-append "https://repo1.maven.org/maven2/"
+ "com/thoughtworks/qdox/qdox/" version
+ "/qdox-" version "-sources.jar"))
+ (sha256
+ (base32
+ "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
+
(define-public java-jarjar
(package
(name "java-jarjar")
(("<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\"/>"
((#:build-target _) "library")
((#:phases phases)
`(modify-phases ,phases
+ (add-after 'unpack 'patch-classpath-for-integration
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "build.xml"
+ (("build/hamcrest-core-\\$\\{version\\}\\.jar")
+ (car (find-files (assoc-ref inputs "java-hamcrest-core")
+ "jar$"))))
+ #t))
(replace 'create-pom
(lambda _
(substitute* "pom/hamcrest-library.pom"
;; 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")
(description "This package is a Maven plugin to generate Plexus descriptors
from source tags and class annotations.")))
+(define-public java-plexus-component-metadata
+ (package
+ (inherit java-plexus-container-default)
+ (name "java-plexus-component-metadata")
+ (arguments
+ `(#:jar-name "plexus-component-metadata.jar"
+ #:source-dir "src/main/java"
+ #:test-dir "src/test"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "plexus-component-metadata")
+ #t))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "src/main/resources"
+ "build/classes/")
+ #t)))))
+ (propagated-inputs
+ `(("java-plexus-container-default" ,java-plexus-container-default)
+ ("java-plexu-component-annotations" ,java-plexus-component-annotations)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("java-plexus-cli" ,java-plexus-cli)
+ ("java-plexus-classworlds" ,java-plexus-classworlds)
+ ("maven-plugin-api" ,maven-plugin-api)
+ ("maven-plugin-annotations" ,maven-plugin-annotations)
+ ("maven-core-bootstrap" ,maven-core-bootstrap)
+ ("maven-model" ,maven-model)
+ ("java-commons-cli" ,java-commons-cli)
+ ("java-qdox" ,java-qdox)
+ ("java-jdom2" ,java-jdom2)
+ ("java-asm" ,java-asm)))
+ (native-inputs
+ `(("java-junit" ,java-junit)
+ ("java-guava" ,java-guava)
+ ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
+ (synopsis "Inversion-of-control container for Maven")
+ (description "The Plexus project provides a full software stack for creating
+and executing software projects. Based on the Plexus container, the
+applications can utilise component-oriented programming to build modular,
+reusable components that can easily be assembled and reused. This package
+provides the Maven plugin generating the component metadata.")))
+
(define-public java-plexus-cipher
(package
(name "java-plexus-cipher")
(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
and decryption.")
(license license:asl2.0)))
+(define-public java-plexus-java
+ (package
+ (name "java-plexus-java")
+ (version "0.9.10")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/codehaus-plexus/plexus-languages")
+ (commit (string-append "plexus-languages-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
+ (for-each delete-file (find-files "." ".*.jar$"))
+ #t))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "plexus-java.java"
+ #:source-dir "plexus-java/src/main/java"
+ #:test-dir "plexus-java/src/test"
+ #:tests? #f; require mockito 2
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'generate-metadata
+ (lambda _
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
+ "--source" "plexus-java/src/main/java"
+ "--output" "build/classes/META-INF/plexus/components.xml"
+ "--classes" "build/classes"
+ "--descriptors" "build/classes/META-INF")
+ (invoke "ant" "jar")
+ #t))
+ (add-before 'install 'install-parent
+ (install-pom-file "pom.xml"))
+ (replace 'install
+ (install-from-pom "plexus-java/pom.xml")))))
+ (propagated-inputs
+ `(("java-asm" ,java-asm)
+ ("java-qdox" ,java-qdox-2-M9)
+ ("java-javax-inject" ,java-javax-inject)
+ ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
+ (inputs
+ `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
+ (native-inputs
+ `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
+ ("java-junit" ,java-junit)))
+ (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
+ (synopsis "Shared language features for Java")
+ (description "This package contains shared language features of the Java
+language, for the plexus project.")
+ (license license:asl2.0)))
+
(define-public java-plexus-compiler-api
(package
(name "java-plexus-compiler-api")
(arguments
`(#:jar-name "plexus-compiler-api.jar"
#:source-dir "plexus-compiler-api/src/main/java"
- #:jdk ,icedtea-8
- #:test-dir "plexus-compiler-api/src/test"))
- (inputs
+ #:test-dir "plexus-compiler-api/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "plexus-compiler-api/pom.xml")))))
+ (propagated-inputs
`(("java-plexus-container-default" ,java-plexus-container-default)
+ ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
("java-plexus-util" ,java-plexus-utils)))
(native-inputs
`(("java-junit" ,java-junit)))
(license (list license:asl2.0
license:expat))))
+(define java-plexus-compiler-pom
+ (package
+ (inherit java-plexus-compiler-api)
+ (name "java-plexus-compiler-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml"))
+ (add-after 'install 'install-compilers
+ (install-pom-file "plexus-compilers/pom.xml")))))
+ (propagated-inputs
+ `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
+
+(define plexus-components-parent-pom-4.0
+ (package
+ (name "plexus-components-parent-pom")
+ (version "4.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/codehaus-plexus/plexus-components")
+ (commit (string-append "plexus-components-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
+ (home-page "https://codehaus-plexus.github.io/plexus-components")
+ (synopsis "Plexus parent pom")
+ (description "This package contains the Plexus components parent POM.")
+ (license license:asl2.0)))
+
+(define-public java-plexus-compiler-manager
+ (package
+ (inherit java-plexus-compiler-api)
+ (name "java-plexus-compiler-manager")
+ (arguments
+ `(#:jar-name "compiler-compiler-manager.java"
+ #:source-dir "plexus-compiler-manager/src/main/java"
+ #:test-dir "plexus-compiler-manager/src/test"
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'generate-metadata
+ (lambda _
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
+ "--source" "plexus-compiler-manager/src/main/java"
+ "--output" "build/classes/META-INF/plexus/components.xml"
+ "--classes" "build/classes"
+ "--descriptors" "build/classes/META-INF")
+ (invoke "ant" "jar")
+ #t))
+ (add-after 'generate-metadata 'rebuild
+ (lambda _
+ (invoke "ant" "jar")
+ #t))
+ (replace 'install
+ (install-from-pom "plexus-compiler-manager/pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
+ ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
+ ("java-plexus-container-default" ,java-plexus-container-default)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
+ (synopsis "Compiler management for Plexus Compiler component")
+ (description "Plexus Compiler is a Plexus component to use different
+compilers through a uniform API. This component chooses the compiler
+implementation to use in a project.")))
+
(define-public java-plexus-compiler-javac
(package
(inherit java-plexus-compiler-api)
#:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
#:jdk ,icedtea-8
#:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
- #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
- (inputs
+ #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
+ #:modules ((guix build ant-build-system)
+ (guix build utils)
+ (guix build java-utils)
+ (sxml simple))
+ #:phases
+ (modify-phases %standard-phases
+ ;; We cannot use java-plexus-component-metadata to generate the metadata
+ ;; because it ultimately depends on this package.
+ ;; Create it manually instead
+ (add-before 'build 'create-metadata
+ (lambda _
+ (let* ((dir "build/classes/META-INF/plexus")
+ (file (string-append dir "/components.xml")))
+ (mkdir-p dir)
+ (with-output-to-file file
+ (lambda _
+ (sxml->xml
+ `(component-set
+ (components
+ (component
+ (role "org.codehaus.plexus.compiler.Compiler")
+ (role-hint "javac")
+ (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
+ (isolated-realm "false"))))))))
+ #t))
+ (replace 'install
+ (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
+ (propagated-inputs
`(("java-plexus-compiler-api" ,java-plexus-compiler-api)
("java-plexus-utils" ,java-plexus-utils)
("java-plexus-container-default" ,java-plexus-container-default)))
- (native-inputs
- `(("java-junit" ,java-junit)))
(synopsis "Javac Compiler support for Plexus Compiler component")
(description "This package contains the Javac Compiler support for Plexus
Compiler component.")))
+(define plexus-components-pom-1.1.20
+ (package
+ (name "plexus-components-pom-1.1.20")
+ (version "1.1.20")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/codehaus-plexus/plexus-components")
+ (commit (string-append "plexus-components-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
+ (build-system ant-build-system)
+ (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-3.1)))
+ (home-page "https://github.com/codehaus-plexus/plexus-components")
+ (synopsis "Maven parent pom for plexus packages")
+ (description "This package contains the parent pom for plexus component
+packages.")
+ (license license:asl2.0)))
+
+(define-public java-plexus-digest
+ (package
+ (name "java-plexus-digest")
+ (version "1.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/codehaus-plexus/plexus-digest")
+ (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "plexus-digest.jar"
+ #:source-dir "src/main/java"
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-utils" ,java-plexus-utils)
+ ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
+ (home-page "https://github.com/codehaus-plexus/plexus-digest")
+ (synopsis "Hash function utilities for Java")
+ (description "This package is a plexus component that contains hash
+function utilities.")
+ (license license:asl2.0)))
+
(define-public java-plexus-sec-dispatcher
(package
(name "java-plexus-sec-dispatcher")
(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)))
+ #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:
</component>\n
</components>\n
</component-set>\n")))
- #t)))))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
(inputs
`(("java-plexus-utils" ,java-plexus-utils)
("java-plexus-container-default" ,java-plexus-container-default)))
"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)
(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
`(#: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
(uri (git-reference
(url "https://github.com/google/guava/")
(commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
"00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
(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)))
(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-parent
+ (package
+ (inherit java-slf4j-api)
+ (name "java-slf4j-parent")
+ (native-inputs `())
+ (propagated-inputs '())
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'build)
+ (delete 'configure)
+ (replace 'install
+ (install-pom-file "pom.xml")))))))
+
(define-public java-slf4j-simple
(package
(name "java-slf4j-simple")
;; ... 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
(arguments
`(#:build-target "jarall"
#:test-target "junit-tests-all"
+ #:make-flags (list "-DDATE" "(no date for reproducibility)")
#:phases
(modify-phases %standard-phases
(add-before 'install 'fix-pom
(("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)))
(with-directory-excursion "hawtjni-generator/src/main/resources/"
(install-file "libhawtjni.so" lib)
(install-file "hawtjni.h" inc)))
- #t)))))
+ #t))
+ (add-before 'install 'install-parent
+ (install-pom-file "pom.xml"))
+ (replace 'install
+ (install-from-pom "hawtjni-runtime/pom.xml")))))
(inputs
`(("java-commons-cli" ,java-commons-cli)
("java-asm" ,java-asm)
(lambda* (#:key outputs #:allow-other-keys)
(install-file "src/main/native-package/src/jansi.h"
(string-append (assoc-ref outputs "out") "/include"))
- #t)))))
- (inputs
+ #t))
+ (add-before 'install 'fix-pom
+ (lambda _
+ ;; pom contains variables to complete name, but we don't support that
+ (substitute* "pom.xml"
+ (("\\$\\{platform\\}") "native"))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
`(("java-hawtjni" ,java-hawtjni)))
(home-page "https://fusesource.github.io/jansi/")
(synopsis "Native library for jansi")
(modify-phases %standard-phases
(add-after 'check 'clear-term
(lambda _
- (invoke "echo" "-e" "\\e[0m"))))))
- (inputs
+ (invoke "echo" "-e" "\\e[0m")))
+ (add-before 'install 'install-parent
+ (install-pom-file "pom.xml"))
+ (add-before 'install 'fix-pom
+ (lambda _
+ ;; pom adds jansi native versions for different platforms, but we
+ ;; only need one, so use native instead
+ (substitute* "jansi/pom.xml"
+ (("windows32") "native")
+ (("windows64") "native")
+ (("osx") "native")
+ (("linux32") "native")
+ (("linux64") "native")
+ (("freebsd32") "native")
+ (("freebsd64") "native"))
+ #t))
+ (replace 'install
+ (install-from-pom "jansi/pom.xml")))))
+ (propagated-inputs
`(("java-jansi-native" ,java-jansi-native)))
(native-inputs
`(("java-junit" ,java-junit)
(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)))
(build-system ant-build-system)
(arguments
`(#:build-target "package"
+ #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
#:tests? #f; tests are run as part of the build process
#:phases
(modify-phases %standard-phases
(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")