build-system/maven: Make default-maven-plugins a procedure.

This allows compiling the module without the (gnu packages maven) module being
available.

* guix/build-system/maven.scm (%default-maven-plugins): Rename to
default-maven-plugins, and convert to a procedure.
* doc/guix.texi (maven-build-system): Update.
This commit is contained in:
Christopher Baines 2020-07-17 09:43:11 +01:00
parent 55b90c9053
commit 22b3a95f6e
No known key found for this signature in database
GPG Key ID: 5E28A33B0B84F577
2 changed files with 4 additions and 4 deletions

View File

@ -6849,7 +6849,7 @@ corresponding argument, @code{#:jdk} and @code{#:maven}.
The @code{#:maven-plugins} argument is a list of maven plugins used during The @code{#:maven-plugins} argument is a list of maven plugins used during
the build, with the same format as the @code{inputs} fields of the package the build, with the same format as the @code{inputs} fields of the package
declaration. Its default value is @code{%default-maven-plugins} which is declaration. Its default value is @code{(default-maven-plugins)} which is
also exported. also exported.
@end defvr @end defvr

View File

@ -28,7 +28,7 @@
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:export (%maven-build-system-modules #:export (%maven-build-system-modules
default-maven default-maven
%default-maven-plugins default-maven-plugins
%default-exclude %default-exclude
lower lower
maven-build maven-build
@ -96,7 +96,7 @@
(let ((jdk-mod (resolve-interface '(gnu packages java)))) (let ((jdk-mod (resolve-interface '(gnu packages java))))
(module-ref jdk-mod 'icedtea))) (module-ref jdk-mod 'icedtea)))
(define %default-maven-plugins (define (default-maven-plugins)
`(("maven-compiler-plugin" ,(default-maven-compiler-plugin)) `(("maven-compiler-plugin" ,(default-maven-compiler-plugin))
("maven-jar-plugin" ,(default-maven-jar-plugin)) ("maven-jar-plugin" ,(default-maven-jar-plugin))
("maven-resources-plugin" ,(default-maven-resources-plugin)) ("maven-resources-plugin" ,(default-maven-resources-plugin))
@ -112,7 +112,7 @@
#:key source inputs native-inputs outputs system target #:key source inputs native-inputs outputs system target
(maven (default-maven)) (maven (default-maven))
(jdk (default-jdk)) (jdk (default-jdk))
(maven-plugins %default-maven-plugins) (maven-plugins (default-maven-plugins))
(local-packages '()) (local-packages '())
(exclude %default-exclude) (exclude %default-exclude)
#:allow-other-keys #:allow-other-keys