summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2020-06-27 19:25:27 +0200
committerJulien Lepiller <julien@lepiller.eu>2020-07-17 04:18:49 +0200
commitebe6e6f5d273277c59cbdea145c839d17aec6fe4 (patch)
tree2356148ab39b7218f9bc3f37c50f53c1be8d253d /gnu/packages
parentf738576086fbe474477c06fd6be8ac73f3148336 (diff)
downloadguix-ebe6e6f5d273277c59cbdea145c839d17aec6fe4.tar.gz
gnu: Add maven-install-plugin.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/maven.scm60
1 files changed, 60 insertions, 0 deletions
diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index 126e077208..de74cbc8dd 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -2836,3 +2836,63 @@ Maven project dependencies.")
     (description "This package contains an API to install, deploy and resolve
 artifacts in Maven 3.")
     (license license:asl2.0)))
+
+(define-public maven-install-plugin
+  (package
+    (name "maven-install-plugin")
+    (version "3.0.0-M1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://apache/maven/plugins/"
+                                  "maven-install-plugin-" version
+                                  "-source-release.zip"))
+              (sha256
+               (base32
+                "1l9iydxririrair0i5sk2iypn9wspzbb666lc0ddg20yyr8w39dm"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:tests? #f; require maven-plugin-testing-harness
+       #:jar-name "maven-install-plugin.jar"
+       #:source-dir "src/main/java"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-pom
+           (lambda _
+             (substitute* "pom.xml"
+               (("maven-project") "maven-core")
+               (("maven-artifact-manager") "maven-artifact")
+               (("2.0.6") "3.0"))
+             #t))
+         (add-before 'build 'generate-plugin.xml
+           (generate-plugin.xml "pom.xml"
+             "install"
+             "src/main/java/org/apache/maven/plugins/install"
+             (list
+               (list "AbstractInstallMojo.java" "InstallFileMojo.java")
+               (list "AbstractInstallMojo.java" "InstallMojo.java"))))
+         (replace 'install
+           (install-from-pom "pom.xml")))))
+    (propagated-inputs
+     `(("maven-artifact" ,maven-artifact)
+       ("maven-plugin-api" ,maven-plugin-api)
+       ("maven-compat" ,maven-compat)
+       ("maven-artifact-transfer" ,maven-artifact-transfer)
+       ("maven-plugins-pom-23" ,maven-plugins-pom-23)
+       ("java-plexus-digest" ,java-plexus-digest)))
+    (inputs
+     `(("maven-plugin-annotations" ,maven-plugin-annotations)
+       ("java-slf4j-api" ,java-slf4j-api)))
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (home-page "https://maven.apache.org/plugin/maven-install-plugin")
+    (synopsis "Maven's install plugin")
+    (description "The Install Plugin is used during the install phase to add
+artifact(s) to the local repository.  The Install Plugin uses the information
+in the POM (groupId, artifactId, version) to determine the proper location for
+the artifact within the local repository.
+
+The local repository is the local cache where all artifacts needed for the
+build are stored.  By default, it is located within the user's home directory
+(@file{~/.m2/repository}) but the location can be configured in
+@file{~/.m2/settings.xml} using the @code{<localRepository>} element.")
+    (license license:asl2.0)))