mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
guix: maven: Simplify finding version and group information.
* guix/build/maven/pom.scm (pom-version, pom-groupid): Do not use inputs and local packages information anymore. Adapt file to new arguments. * guix/build/maven-build-system.scm: Adapt to new arguments. * guix/build/java-utils.scm: Adapt to new arguments.
This commit is contained in:
parent
4c98db94b0
commit
573b43c116
3 changed files with 24 additions and 26 deletions
|
@ -2,7 +2,7 @@
|
|||
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
|
||||
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
|
||||
;;; Copyright © 2020, 2021 Julien Lepiller <julien@lepiller.eu>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -69,9 +69,9 @@ fetched."
|
|||
(let* ((out (assoc-ref outputs "out"))
|
||||
(java-inputs (append (map cdr inputs) (map cdr outputs)))
|
||||
(pom-content (get-pom pom-file))
|
||||
(version (pom-version pom-content java-inputs))
|
||||
(version (pom-version pom-content))
|
||||
(artifact (pom-artifactid pom-content))
|
||||
(group (group->dir (pom-groupid pom-content java-inputs)))
|
||||
(group (group->dir (pom-groupid pom-content)))
|
||||
(repository (string-append out "/lib/m2/" group "/" artifact "/"
|
||||
version "/"))
|
||||
(pom-name (string-append repository artifact "-" version ".pom")))
|
||||
|
@ -87,8 +87,8 @@ to ensure that maven can find dependencies."
|
|||
(manifest (string-append dir "/META-INF/MANIFEST.MF"))
|
||||
(pom (get-pom pom-file))
|
||||
(artifact (pom-artifactid pom))
|
||||
(group (pom-groupid pom inputs))
|
||||
(version (pom-version pom inputs))
|
||||
(group (pom-groupid pom))
|
||||
(version (pom-version pom))
|
||||
(pom-dir (string-append "META-INF/maven/" group "/" artifact)))
|
||||
(mkdir-p (string-append dir "/" pom-dir))
|
||||
(copy-file pom-file (string-append dir "/" pom-dir "/pom.xml"))
|
||||
|
@ -113,9 +113,9 @@ the phase fails."
|
|||
(let* ((out (assoc-ref outputs "out"))
|
||||
(java-inputs (append (map cdr inputs) (map cdr outputs)))
|
||||
(pom-content (get-pom pom-file))
|
||||
(version (pom-version pom-content java-inputs))
|
||||
(version (pom-version pom-content))
|
||||
(artifact (pom-artifactid pom-content))
|
||||
(group (group->dir (pom-groupid pom-content java-inputs)))
|
||||
(group (group->dir (pom-groupid pom-content)))
|
||||
(repository (string-append out "/lib/m2/" group "/" artifact "/"
|
||||
version "/"))
|
||||
;; We try to find the file that was built. If it was built from our
|
||||
|
@ -180,9 +180,9 @@ recognize the package as a plugin, and find the entry points in the plugin."
|
|||
(name (pom-name pom-content))
|
||||
(description (pom-description pom-content))
|
||||
(dependencies (pom-dependencies pom-content))
|
||||
(version (pom-version pom-content java-inputs))
|
||||
(version (pom-version pom-content))
|
||||
(artifact (pom-artifactid pom-content))
|
||||
(groupid (pom-groupid pom-content java-inputs))
|
||||
(groupid (pom-groupid pom-content))
|
||||
(mojos
|
||||
`(mojos
|
||||
,@(with-directory-excursion directory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue