summaryrefslogtreecommitdiff
path: root/gnu/packages/maven.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2021-06-01 00:44:14 +0200
committerJulien Lepiller <julien@lepiller.eu>2021-06-22 13:09:41 +0200
commit4c98db94b0271aa5371ff00cf98c0ebc70ab1a8d (patch)
treeeff6c5d752d5e34f69a80a2ff90733d9af53cca8 /gnu/packages/maven.scm
parenta40207bd6f27d5cfb880974b196606631efa9b4e (diff)
guix: java-utils: Factorize pom.xml generation.
* guix/build/java-utils.scm (generate-pom.xml): New procedure. * gnu/packages/maven.scm (java-surefire-junit4): Use it. * gnu/packages/java.scm (java-qdox, java-jsr250, java-jsr305) (java-aopalliance, java-jboss-el-api-spec) (java-jboss-interceptors-api-spec): Use it. (java-qdox-M9): Ensure the generated pom file has the correct version.
Diffstat (limited to 'gnu/packages/maven.scm')
-rw-r--r--gnu/packages/maven.scm28
1 files changed, 11 insertions, 17 deletions
diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index c637e5c7ae..8f63ee9be2 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -3424,23 +3424,17 @@ starting from JUnit 4.")))
#:phases
(modify-phases %standard-phases
(add-before 'install 'regenerate-own-pom
- (lambda _
- ;; Surefire struggles resolving artifacts because of this pom
- ;; file, resulting in a NullPointerException when collecting
- ;; Artifacts (and a "Failure detected." message from
- ;; DefaultArtifactResolver). Replace the pom file with a much
- ;; simpler one. Everything is shaded anyway (as used to be the
- ;; case in 2.22), so there will not be missing dependencies.
- (with-output-to-file "surefire-providers/surefire-junit4/pom.xml"
- (lambda _
- (sxml->xml
- `((project
- (modelVersion "4.0.0")
- (name "Surefire JUnit4")
- (groupId "org.apache.maven.surefire")
- (artifactId "surefire-junit4")
- (version ,,(package-version java-surefire-common-java5)))))))
- #t))
+ ;; Surefire struggles resolving artifacts because of this pom
+ ;; file, resulting in a NullPointerException when collecting
+ ;; Artifacts (and a "Failure detected." message from
+ ;; DefaultArtifactResolver). Replace the pom file with a much
+ ;; simpler one. Everything is shaded anyway (as used to be the
+ ;; case in 2.22), so there will not be missing dependencies.
+ (generate-pom.xml
+ "surefire-providers/surefire-junit4/pom.xml"
+ "org.apache.maven.surefire" "surefire-junit4"
+ ,(package-version java-surefire-common-java5)
+ #:name "Surefire JUnit4"))
(add-before 'build 'copy-resources
(lambda _
(mkdir-p "build/classes")