From e27c43d94e23daf6b114b03688a51c924890a286 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 23 Jun 2018 12:16:55 +0200 Subject: gnu: maven-core: Fill properties. * gnu/packages/maven.scm (maven-core-bootstrap)[arguments]: Add a fill-properties phase. --- gnu/packages/maven.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index 3b24fd7e80..f63fcee6b2 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -1080,6 +1080,18 @@ generally generated from plugin sources using maven-plugin-plugin."))) (mkdir-p "build/classes/") (copy-recursively "src/main/resources" "build/classes") #t)) + (add-after 'copy-resources 'fill-properties + (lambda _ + ;; This file controls the output of some mvn subcommands, such as + ;; mvn -version. + (substitute* "build/classes/org/apache/maven/messages/build.properties" + (("\\$\\{buildNumber\\}") "guix_build") + (("\\$\\{timestamp\\}") "0") + (("\\$\\{project.version\\}") ,(package-version maven-artifact)) + (("\\$\\{distributionId\\}") "apache-maven") + (("\\$\\{distributionShortName\\}") "Maven") + (("\\$\\{distributionName\\}") "Apache Maven")) + #t)) (add-before 'build 'generate-sisu-named (lambda _ (mkdir-p "build/classes/META-INF/sisu") -- cgit v1.2.3