gnu: Add datafly.
[jackhill/guix/guix.git] / gnu / packages / java.scm
index 912f7d8..3590ea9 100644 (file)
@@ -66,6 +66,7 @@
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages linux) ;alsa
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages maven)
   #:use-module (gnu packages maven-parent-pom)
   #:use-module (gnu packages nss)
   #:use-module (gnu packages onc-rpc)
@@ -2932,9 +2933,11 @@ Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
                                  ,(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\\}")
@@ -3225,9 +3228,11 @@ libraries from the SIS division at ETH Zurich like jHDF5.")
                                  ,(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"))
@@ -3548,7 +3553,28 @@ documentation tools.")
     (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
@@ -3557,6 +3583,23 @@ class/interface/method definitions from source files complete with JavaDoc
 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")
@@ -3591,11 +3634,11 @@ documentation tools.")
                (("<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\"/>"
@@ -3757,6 +3800,13 @@ testing frameworks, mocking libraries and UI validation rules.")
       ((#: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"
@@ -4181,9 +4231,15 @@ archives (jar).")
                             ;; Failures
                             "**/ComponentRealmCompositionTest.java"
                             "**/PlexusContainerTest.java")
-       #:jdk ,icedtea-8
        #:phases
        (modify-phases %standard-phases
+         (add-before 'build 'fix-google-collections
+           (lambda _
+             ;; Google collections are now replaced with guava
+             (substitute* "plexus-container-default/pom.xml"
+               (("google-collections") "guava")
+               (("com.google.collections") "com.google.guava"))
+             #t))
          (add-before 'build 'copy-resources
            (lambda _
              (copy-recursively
@@ -4198,7 +4254,9 @@ archives (jar).")
                    dir "/plexus/component/composition/"
                    "ComponentRealmCompositionTest.java")
                  (("src/test") "plexus-container-default/src/test"))
-               #t))))))
+               #t)))
+         (replace 'install
+           (install-from-pom "plexus-container-default/pom.xml")))))
     (inputs
      `(("worldclass" ,java-plexus-classworlds)
        ("xbean" ,java-geronimo-xbean-reflect)
@@ -4216,13 +4274,64 @@ archives (jar).")
     (arguments
      `(#:jar-name "plexus-component-annotations.jar"
        #:source-dir "plexus-component-annotations/src/main/java"
-       #:tests? #f)); no tests
+       #:tests? #f; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (install-from-pom "plexus-component-annotations/pom.xml")))))
+    (propagated-inputs
+     `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
     (inputs '())
     (native-inputs '())
     (synopsis "Plexus descriptors generator")
     (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")
@@ -4240,7 +4349,6 @@ from source tags and class annotations.")))
     (arguments
      `(#:jar-name "plexus-cipher.jar"
        #:source-dir "src/main/java"
-       #:jdk ,icedtea-8
        #:tests? #f; FIXME: requires sisu-inject-bean
        #:phases
        (modify-phases %standard-phases
@@ -4251,16 +4359,83 @@ from source tags and class annotations.")))
              (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
                (lambda _
                  (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
-             #t)))))
+             #t))
+         (add-before 'install 'fix-test-dependency
+           (lambda _
+             ;; sisu-inject-bean is only used for tests, but its scope is "provided".
+             (substitute* "pom.xml"
+               (("provided") "test"))
+             #t))
+         (replace 'install (install-from-pom "pom.xml")))))
     (inputs
      `(("java-cdi-api" ,java-cdi-api)
        ("java-javax-inject" ,java-javax-inject)))
+    (propagated-inputs
+     `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
+    (native-inputs
+     `(("java-junit" ,java-junit)))
     (home-page "https://github.com/sonatype/plexus-cipher")
     (synopsis "Encryption/decryption Component")
     (description "Plexus-cipher contains a component to deal with encryption
 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")
@@ -4278,10 +4453,14 @@ and decryption.")
     (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)))
@@ -4292,6 +4471,91 @@ compilers.")
     (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)
@@ -4301,17 +4565,105 @@ compilers.")
        #: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")
@@ -4330,7 +4682,6 @@ Compiler component.")))
     (arguments
      `(#:jar-name "plexus-sec-dispatcher.jar"
        #:source-dir "src/main/java"
-       #:jdk ,icedtea-8
        #:phases
        (modify-phases %standard-phases
          (add-before 'build 'generate-models
@@ -4378,9 +4729,12 @@ Compiler component.")))
          (add-before 'check 'fix-paths
            (lambda _
              (copy-recursively "src/test/resources" "target")
-             #t)))))
-    (inputs
-     `(("java-plexus-cipher" ,java-plexus-cipher)))
+             #t))
+         (replace 'install (install-from-pom "pom.xml")))))
+    (propagated-inputs
+     `(("java-plexus-utils" ,java-plexus-utils)
+       ("java-plexus-cipher" ,java-plexus-cipher)
+       ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
     (native-inputs
      `(("java-modello-core" ,java-modello-core)
        ;; for modello:
@@ -4482,7 +4836,9 @@ which behaves as if all files were just created.</description>\n
     </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)))
@@ -4528,7 +4884,7 @@ project and determining what files need to be rebuilt.")
                               "modello/core/io/ModelReaderTest.java")
                  (("src/test") "modello-core/src/test")))
              #t)))))
-    (inputs
+    (propagated-inputs
      `(("java-plexus-utils" ,java-plexus-utils)
        ("java-plexus-container-default" ,java-plexus-container-default)
        ("java-sisu-build-api" ,java-sisu-build-api)))
@@ -4577,8 +4933,7 @@ XSD and documentation.")
                                "build/classes")
              #t)))))
     (inputs
-     `(("java-modello-core" ,java-modello-core)
-       ,@(package-inputs java-modello-core)))
+     `(("java-modello-core" ,java-modello-core)))
     (synopsis "Modello Java Plugin")
     (description "Modello Java Plugin generates Java objects for the model.")))
 
@@ -4607,10 +4962,9 @@ XSD and documentation.")
                  "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
                  (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
              #t)))))
-    (inputs
+    (propagated-inputs
      `(("java-modello-core" ,java-modello-core)
-       ("java-modello-plugins-java" ,java-modello-plugins-java)
-       ,@(package-inputs java-modello-core)))
+       ("java-modello-plugins-java" ,java-modello-plugins-java)))
     (synopsis "Modello XML Plugin")
     (description "Modello XML Plugin contains shared code for every plugins
 working on XML representation of the model.")))
@@ -4653,11 +5007,10 @@ every feature for every plugin.")))
              (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
                                "build/classes")
              #t)))))
-    (inputs
+    (propagated-inputs
      `(("java-modello-core" ,java-modello-core)
        ("java-modello-plugins-java" ,java-modello-plugins-java)
-       ("java-modello-plugins-xml" ,java-modello-plugins-xml)
-       ,@(package-inputs java-modello-core)))
+       ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
     (native-inputs
      `(("java-xmlunit" ,java-xmlunit)
        ("java-modello-test" ,java-modello-test)
@@ -4708,10 +5061,19 @@ on the XPP3 API (XML Pull Parser).")))
              (invoke "jar"
                      "-cf" (string-append "dist/asm-" ,version ".jar")
                      "-C" "output/build/tmp" ".")))
+         (add-before 'install 'fix-pom
+           (lambda _
+             (substitute* (find-files "archive" "\\.pom$")
+               (("@product.artifact@") ,version))
+             #t))
+         (add-before 'install 'install-parent
+           (install-pom-file "archive/asm-parent.pom"))
          (replace 'install
-           (install-jars "dist")))))
+           (install-from-pom "archive/asm.pom")))))
     (native-inputs
      `(("java-junit" ,java-junit)))
+    (propagated-inputs
+     `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
     (home-page "https://asm.ow2.io/")
     (synopsis "Very small and fast Java bytecode manipulation framework")
     (description "ASM is an all purpose Java bytecode manipulation and
@@ -4721,6 +5083,32 @@ transformations and analysis algorithms allow easily assembling custom
 complex transformations and code analysis tools.")
     (license license:bsd-3)))
 
+(define java-org-ow2-parent-pom-1.3
+  (package
+    (name "java-org-ow2-parent-pom")
+    (version "1.3")
+    (source (origin
+              (method url-fetch)
+              (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
+              (sha256
+               (base32
+                "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'unpack)
+         (delete 'build)
+         (delete 'configure)
+         (replace 'install
+           (install-pom-file (assoc-ref %build-inputs "source"))))))
+    (home-page "https://ow2.org")
+    (synopsis "Ow2.org parent pom")
+    (description "This package contains the parent pom for projects from ow2.org,
+including java-asm.")
+    (license license:lgpl2.1+)))
+
 (define java-asm-bootstrap
   (package
     (inherit java-asm)
@@ -5715,7 +6103,28 @@ bottlenecks move away from the database in an effectively cached system.")
     (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
@@ -5779,6 +6188,7 @@ It provides packages in the @code{javax.annotations} namespace.")
               (uri (git-reference
                      (url "https://github.com/google/guava/")
                      (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
                 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
@@ -7024,7 +7434,11 @@ logging framework for Java.")))
     (build-system ant-build-system)
     ;; TODO: javadoc
     (arguments
-     `(#:jar-name "commons-cli.jar"))
+     `(#:jar-name "commons-cli.jar"
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (install-from-pom "pom.xml")))))
     (native-inputs
      `(("java-junit" ,java-junit)
        ("java-hamcrest-core" ,java-hamcrest-core)))
@@ -7197,8 +7611,12 @@ more efficient storage-wise than an uncompressed bitmap (as implemented in the
                 (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/")
@@ -7210,6 +7628,21 @@ allowing the end user to plug in the desired logging framework at deployment
 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")
@@ -7231,11 +7664,14 @@ time.")
              ;; ... and build test helper classes here:
              (apply invoke
                     `("javac" "-d" "."
-                      ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
-    (inputs
+                      ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
+         (replace 'install
+           (install-from-pom "slf4j-simple/pom.xml")))))
+    (propagated-inputs
+     `(("java-slf4j-api" ,java-slf4j-api)))
+    (native-inputs
      `(("java-junit" ,java-junit)
-       ("java-hamcrest-core" ,java-hamcrest-core)
-       ("java-slf4j-api" ,java-slf4j-api)))
+       ("java-hamcrest-core" ,java-hamcrest-core)))
     (home-page "https://www.slf4j.org/")
     (synopsis "Simple implementation of simple logging facade for Java")
     (description "SLF4J binding for the Simple implementation, which outputs
@@ -9514,6 +9950,7 @@ annotations.")
     (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
@@ -9522,11 +9959,7 @@ annotations.")
                (("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)))
@@ -10659,7 +11092,11 @@ including pre-existing objects that you do not have source-code of.")
                (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)
@@ -10718,8 +11155,16 @@ that is part of the SWT Tools project.")
            (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")
@@ -10748,8 +11193,25 @@ console output.")
        (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)
@@ -10775,7 +11237,31 @@ sequences to format your console output which works on every platform.")
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-jboss-el-api_spec.jar"
-       #:jdk ,icedtea-8))
+       #:modules ((guix build ant-build-system)
+                  (guix build utils)
+                  (guix build maven pom)
+                  (guix build java-utils)
+                  (sxml simple))
+       #:phases
+       (modify-phases %standard-phases
+         ;; the origin of javax.el:javax.el-api is unknown, so we use this package
+         ;; instead, which implements the same thing.  We override the pom file
+         ;; to "rename" the package so it can be found by maven.
+         (add-before 'install 'override-pom
+           (lambda _
+             (delete-file "pom.xml")
+             (with-output-to-file "pom.xml"
+               (lambda _
+                 (sxml->xml
+                   `(project
+                      (modelVersion "4.0.0")
+                      (name "el-api")
+                      (groupId "javax.el")
+                      (artifactId "javax.el-api")
+                      (version "3.0")))))
+             #t))
+         (replace 'install
+           (install-from-pom "pom.xml")))))
     (inputs
      `(("java-junit" ,java-junit)))
     (home-page "https://github.com/jboss/jboss-el-api_spec")
@@ -10804,7 +11290,33 @@ JavaServer Pages (JSP).")
      `(#:jar-name "java-jboss-interceptors-api_spec.jar"
        #:jdk ,icedtea-8
        #:source-dir "."
-       #:tests? #f)); no tests
+       #:tests? #f; no tests
+       #:modules ((guix build ant-build-system)
+                  (guix build utils)
+                  (guix build maven pom)
+                  (guix build java-utils)
+                  (sxml simple))
+       #:phases
+       (modify-phases %standard-phases
+         ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
+         ;; so we use this package instead, which implements the same thing.
+         ;; We override the pom file to "rename" the package so it can be found
+         ;; by maven.
+         (add-before 'install 'override-pom
+           (lambda _
+             (delete-file "pom.xml")
+             (with-output-to-file "pom.xml"
+               (lambda _
+                 (sxml->xml
+                   `(project
+                      (modelVersion "4.0.0")
+                      (name "interceptor-api")
+                      (groupId "javax.interceptor")
+                      (artifactId "javax.interceptor-api")
+                      (version "3.0")))))
+             #t))
+         (replace 'install
+           (install-from-pom "pom.xml")))))
     (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
     (synopsis "Interceptors 1.2 API classes from JSR 318")
     (description "Java-jboss-interceptors-api-spec implements the Interceptors
@@ -10831,11 +11343,16 @@ specific events.")
        #:jar-name "java-cdi-api.jar"
        #:test-dir "api/src/test"
        #:jdk ,icedtea-8
-       #:tests? #f)); Tests fail because we don't have a CDI provider yet
-    (inputs
+       #:tests? #f; Tests fail because we don't have a CDI provider yet
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (install-from-pom "api/pom.xml")))))
+    (propagated-inputs
      `(("java-javax-inject" ,java-javax-inject)
        ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
-       ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
+       ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
+       ("java-weld-parent-pom" ,java-weld-parent-pom)))
     (native-inputs
      `(("java-testng" ,java-testng)
        ("java-hamcrest-core" ,java-hamcrest-core)))
@@ -11363,6 +11880,7 @@ inside a Zip archive.")
     (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
@@ -11825,22 +12343,27 @@ OSGi Service Registry is a goal of this project.")
                (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
                  (("resources/component-jar")
                   "org.eclipse.sisu.plexus.tests/resources/component-jar")))
-             #t)))))
-    (inputs
+             #t))
+         (replace 'install
+           (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
+    (propagated-inputs
      `(("java-plexus-classworlds" ,java-plexus-classworlds)
-       ("java-plexus-util" ,java-plexus-utils)
+       ("java-plexus-utils" ,java-plexus-utils)
        ("java-plexus-component-annotations" ,java-plexus-component-annotations)
-       ("java-osgi-framework" ,java-osgi-framework)
+       ("java-cdi-api" ,java-cdi-api)
        ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
-       ("java-guice" ,java-guice)
-       ("java-javax-inject" ,java-javax-inject)
+       ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
+    (inputs
+     `(("java-osgi-framework" ,java-osgi-framework)
        ("java-slf4j-api" ,java-slf4j-api)
-       ("java-junit" ,java-junit)))
-    (native-inputs
-     `(("java-guava" ,java-guava)
+       ("java-javax-inject" ,java-javax-inject)
+       ("java-guice" ,java-guice)
+       ("java-guava" ,java-guava)
        ("java-aopalliance" ,java-aopalliance)
-       ("java-cglib" ,java-cglib)
-       ("java-asm" ,java-asm)))
+       ("java-asm" ,java-asm)
+       ("java-cglib" ,java-cglib)))
+    (native-inputs
+     `(("java-junit" ,java-junit)))
     (home-page "https://www.eclipse.org/sisu/")
     (synopsis "Plexus support for the sisu container")
     (description "Sisu is a modular JSR330-based container that supports
@@ -11848,6 +12371,21 @@ classpath scanning, auto-binding, and dynamic auto-wiring.  This package
 adds Plexus support to the Sisu-Inject container.")
     (license license:epl1.0)))
 
+(define java-sisu-plexus-parent-pom
+  (package
+    (inherit java-eclipse-sisu-plexus)
+    (name "java-sisu-plexus-parent-pom")
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (delete 'build)
+         (replace 'install
+           (install-pom-file "pom.xml")))))
+    (propagated-inputs
+     `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
+
 (define-public java-commons-compiler
   (package
     (name "java-commons-compiler")