summary refs log tree commit diff
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2020-06-27 19:22:15 +0200
committerJulien Lepiller <julien@lepiller.eu>2020-07-17 04:18:31 +0200
commitea806229c7f66bdb389e52e81dddfba72be31abe (patch)
treec69f7bade153790c0f2582d024c160c050277cbb
parente244157bee5d1eee9a51a65ad07a23c772a7e817 (diff)
downloadguix-ea806229c7f66bdb389e52e81dddfba72be31abe.tar.gz
gnu: Add maven-artifact-transfer.
* gnu/packages/maven.scm (maven-artifact-transfer): New variable.
-rw-r--r--gnu/packages/maven.scm56
1 files changed, 56 insertions, 0 deletions
diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index 560c94ebcd..9940558ead 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -2761,3 +2761,59 @@ Maven project dependencies.")
        ("maven-enforcer-rules" ,maven-enforcer-rules)
        ("maven-plugin-annotations" ,maven-plugin-annotations)
        ("maven-enforcer-parent-pom" ,maven-enforcer-parent-pom)))))
+
+(define-public maven-artifact-transfer
+  (package
+    (name "maven-artifact-transfer")
+    (version "0.12.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://apache/maven/shared/"
+                                  "maven-artifact-transfer-" version
+                                  "-source-release.zip"))
+              (sha256
+               (base32
+                "0mkdjr3wnvaxqaq68sy7h4mqlq3xgwwp5s2anj5vbxfy4bsc1ivj"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:tests? #f; require mockito 2
+       #:jar-name "maven-artifact-transfer.jar"
+       #:source-dir "src/main/java"
+       #: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" "src/main/java"
+                     "--output" "build/classes/META-INF/plexus/components.xml"
+                     "--classes" "build/classes"
+                     "--descriptors" "build/classes/META-INF")
+             #t))
+         (add-after 'generate-metadata 'rebuild
+           (lambda _
+             (invoke "ant" "jar")
+             #t))
+         (replace 'install
+           (install-from-pom "pom.xml")))))
+    (propagated-inputs
+     `(("java-commons-codec" ,java-commons-codec)
+       ("maven-artifact" ,maven-3.0-artifact)
+       ("maven-core" ,maven-3.0-core)
+       ("maven-common-artifact-filters" ,maven-common-artifact-filters)
+       ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+       ("java-plexus-utils" ,java-plexus-utils)
+       ("java-slf4j-api" ,java-slf4j-api)
+       ("java-plexus-classworlds" ,java-plexus-classworlds)
+       ("java-sonatype-aether-api" ,java-sonatype-aether-api)
+       ("java-eclipse-aether-api" ,java-eclipse-aether-api)
+       ("java-eclipse-aether-util" ,java-eclipse-aether-util)
+       ("java-eclipse-aether-impl" ,java-eclipse-aether-impl)))
+    (native-inputs
+     `(("unzip" ,unzip)
+       ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
+    (home-page "https://maven.apache.org/shared/maven-artifact-transfer")
+    (synopsis "API to install, deploy and resolve artifacts in Maven")
+    (description "This package contains an API to install, deploy and resolve
+artifacts in Maven 3.")
+    (license license:asl2.0)))