[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
100/110: gnu: Add java-surefire-api.
From: |
guix-commits |
Subject: |
100/110: gnu: Add java-surefire-api. |
Date: |
Thu, 16 Jul 2020 22:23:39 -0400 (EDT) |
roptat pushed a commit to branch master
in repository guix.
commit ac8179a05ca76bbbf620d201f4e7428a92746f96
Author: Julien Lepiller <julien@lepiller.eu>
AuthorDate: Sat Jun 27 23:19:32 2020 +0200
gnu: Add java-surefire-api.
* gnu/packages/maven.scm (java-surefire-api): New variable.
---
gnu/packages/maven.scm | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index 1aa4eec..f2668cd 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -3185,3 +3185,69 @@ internal to the SureFire Logger API. It is designed to
have no dependency.")
(install-pom-file "pom.xml")))))
(propagated-inputs
`(("maven-parent-pom" ,maven-parent-pom-33)))))
+
+(define-public java-surefire-api
+ (package
+ (inherit java-surefire-logger-api)
+ (name "java-surefire-api")
+ (arguments
+ `(#:tests? #f
+ #:jar-name "java-surefire-api.jar"
+ #:source-dir "surefire-api/src/main/java"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (mkdir-p "build/classes")
+ (copy-recursively "surefire-api/src/main/resources"
"build/classes")
+ #t))
+ (add-before 'build 'prepare-shade
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir-p "build/classes")
+ (with-directory-excursion "build/classes"
+ (for-each
+ (lambda (input)
+ (for-each
+ (lambda (jar-file)
+ (invoke "jar" "xf" jar-file)
+ (delete-file-recursively "META-INF"))
+ (find-files (assoc-ref inputs input) ".*.jar$")))
+ '("maven-shared-utils" "java-commons-codec")))
+ #t))
+ (add-after 'build 'shade
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((jarjar
+ (car (find-files (assoc-ref inputs "java-jarjar")
".*.jar$")))
+ (injar "java-surefire-api.jar")
+ (outjar "java-surefire-api-shaded.jar"))
+ (with-directory-excursion "build/jar"
+ (with-output-to-file "rules"
+ (lambda _
+ (format #t (string-append
+ "rule "
+ "org.apache.maven.shared.utils.** "
+ "org.apache.maven.surefire.shade.api."
+ "org.apache.maven.shared.utils.@1~%"))
+ (format #t (string-append
+ "rule "
+ "org.apache.commons.codec.** "
+ "org.apache.maven.surefire.shade.api."
+ "org.apache.commons.codec.@1~%"))))
+ (invoke "java" "-jar" jarjar "process" "rules" injar outjar)
+ (delete-file injar)
+ (rename-file outjar injar)))
+ #t))
+ (replace 'install
+ (install-from-pom "surefire-api/pom.xml")))))
+ (propagated-inputs
+ `(("java-surefire-logger-api" ,java-surefire-logger-api)
+ ("java-commons-codec" ,java-commons-codec)
+ ("java-surefire-parent-pom" ,java-surefire-parent-pom)
+ ("maven-shared-utils" ,maven-shared-utils-3.1)))
+ (inputs
+ `(("java-jsr305" ,java-jsr305)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-jarjar" ,java-jarjar)))
+ (synopsis "Maven SureFire API")
+ (description "This package contains the API to use Maven SureFire.")))
- 80/110: gnu: Add maven-file-management., (continued)
- 80/110: gnu: Add maven-file-management., guix-commits, 2020/07/16
- 81/110: gnu: Add maven-archiver., guix-commits, 2020/07/16
- 83/110: gnu: Add maven-common-artifact-filters., guix-commits, 2020/07/16
- 84/110: gnu: Add maven-enforcer-api., guix-commits, 2020/07/16
- 89/110: gnu: Add maven-install-plugin., guix-commits, 2020/07/16
- 95/110: gnu: Add java-plexus-compiler-manager., guix-commits, 2020/07/16
- 96/110: gnu: Add maven-shared-incremental., guix-commits, 2020/07/16
- 87/110: gnu: Add maven-artifact-transfer., guix-commits, 2020/07/16
- 91/110: gnu: Add maven-resources-plugin., guix-commits, 2020/07/16
- 94/110: gnu: add java-plexus-java., guix-commits, 2020/07/16
- 100/110: gnu: Add java-surefire-api.,
guix-commits <=
- 109/110: gnu: Add maven-jar-plugin., guix-commits, 2020/07/16
- 63/110: gnu: Add java-eclipse-aether-api., guix-commits, 2020/07/16
- 68/110: gnu: maven-3.0-artifact: New variable., guix-commits, 2020/07/16
- 82/110: gnu: Add maven-dependency-tree., guix-commits, 2020/07/16
- 99/110: gnu: Add maven-shared-utils-3.1., guix-commits, 2020/07/16
- 110/110: guix: Add maven-build-system., guix-commits, 2020/07/16
- 93/110: gnu: java-plexus-component-metadata: Move to java.scm., guix-commits, 2020/07/16
- 97/110: gnu: Add maven-compiler-plugin., guix-commits, 2020/07/16
- 108/110: gnu: Add maven-surefire-plugin., guix-commits, 2020/07/16
- 88/110: gnu: maven-plugin-annotations: Install from pom file., guix-commits, 2020/07/16