[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
95/110: gnu: Add java-plexus-compiler-manager.
From: |
guix-commits |
Subject: |
95/110: gnu: Add java-plexus-compiler-manager. |
Date: |
Thu, 16 Jul 2020 22:23:38 -0400 (EDT) |
roptat pushed a commit to branch master
in repository guix.
commit 90a1d04cc12e58af8c4b933490dd3587771f0e0e
Author: Julien Lepiller <julien@lepiller.eu>
AuthorDate: Sat Jun 27 20:46:19 2020 +0200
gnu: Add java-plexus-compiler-manager.
* gnu/packages/java.scm (java-plexus-compiler-manager): New variable.
(java-plexus-compiler-api, java-plexus-compiler-javac): Install from pom
file.
(java-plexus-compiler-javac): Install plexus components file.
---
gnu/packages/java.scm | 128 +++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 121 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 2eceff1..bc65096 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -4442,10 +4442,14 @@ language, for the plexus project.")
(arguments
`(#:jar-name "plexus-compiler-api.jar"
#:source-dir "plexus-compiler-api/src/main/java"
- #:jdk ,icedtea-8
- #:test-dir "plexus-compiler-api/src/test"))
- (inputs
+ #:test-dir "plexus-compiler-api/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "plexus-compiler-api/pom.xml")))))
+ (propagated-inputs
`(("java-plexus-container-default" ,java-plexus-container-default)
+ ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
("java-plexus-util" ,java-plexus-utils)))
(native-inputs
`(("java-junit" ,java-junit)))
@@ -4456,6 +4460,91 @@ compilers.")
(license (list license:asl2.0
license:expat))))
+(define java-plexus-compiler-pom
+ (package
+ (inherit java-plexus-compiler-api)
+ (name "java-plexus-compiler-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml"))
+ (add-after 'install 'install-compilers
+ (install-pom-file "plexus-compilers/pom.xml")))))
+ (propagated-inputs
+ `(("plexus-components-parent-pom-4.0"
,plexus-components-parent-pom-4.0)))))
+
+(define plexus-components-parent-pom-4.0
+ (package
+ (name "plexus-components-parent-pom")
+ (version "4.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
"https://github.com/codehaus-plexus/plexus-components")
+ (commit (string-append "plexus-components-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
+ (home-page "https://codehaus-plexus.github.io/plexus-components")
+ (synopsis "Plexus parent pom")
+ (description "This package contains the Plexus components parent POM.")
+ (license license:asl2.0)))
+
+(define-public java-plexus-compiler-manager
+ (package
+ (inherit java-plexus-compiler-api)
+ (name "java-plexus-compiler-manager")
+ (arguments
+ `(#:jar-name "compiler-compiler-manager.java"
+ #:source-dir "plexus-compiler-manager/src/main/java"
+ #:test-dir "plexus-compiler-manager/src/test"
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'generate-metadata
+ (lambda _
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
":build/classes")
+ "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
+ "--source" "plexus-compiler-manager/src/main/java"
+ "--output" "build/classes/META-INF/plexus/components.xml"
+ "--classes" "build/classes"
+ "--descriptors" "build/classes/META-INF")
+ (invoke "ant" "jar")
+ #t))
+ (add-after 'generate-metadata 'rebuild
+ (lambda _
+ (invoke "ant" "jar")
+ #t))
+ (replace 'install
+ (install-from-pom "plexus-compiler-manager/pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
+ ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
+ ("java-plexus-container-default" ,java-plexus-container-default)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
+ (synopsis "Compiler management for Plexus Compiler component")
+ (description "Plexus Compiler is a Plexus component to use different
+compilers through a uniform API. This component chooses the compiler
+implementation to use in a project.")))
+
(define-public java-plexus-compiler-javac
(package
(inherit java-plexus-compiler-api)
@@ -4465,13 +4554,38 @@ compilers.")
#:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
#:jdk ,icedtea-8
#:tests? #f; depends on compiler-test -> maven-core -> ... -> this
package.
- #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
- (inputs
+ #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
+ #:modules ((guix build ant-build-system)
+ (guix build utils)
+ (guix build java-utils)
+ (sxml simple))
+ #:phases
+ (modify-phases %standard-phases
+ ;; We cannot use java-plexus-component-metadata to generate the
metadata
+ ;; because it ultimately depends on this package.
+ ;; Create it manually instead
+ (add-before 'build 'create-metadata
+ (lambda _
+ (let* ((dir "build/classes/META-INF/plexus")
+ (file (string-append dir "/components.xml")))
+ (mkdir-p dir)
+ (with-output-to-file file
+ (lambda _
+ (sxml->xml
+ `(component-set
+ (components
+ (component
+ (role "org.codehaus.plexus.compiler.Compiler")
+ (role-hint "javac")
+ (implementation
"org.codehaus.plexus.compiler.javac.JavacCompiler")
+ (isolated-realm "false"))))))))
+ #t))
+ (replace 'install
+ (install-from-pom
"plexus-compilers/plexus-compiler-javac/pom.xml")))))
+ (propagated-inputs
`(("java-plexus-compiler-api" ,java-plexus-compiler-api)
("java-plexus-utils" ,java-plexus-utils)
("java-plexus-container-default" ,java-plexus-container-default)))
- (native-inputs
- `(("java-junit" ,java-junit)))
(synopsis "Javac Compiler support for Plexus Compiler component")
(description "This package contains the Javac Compiler support for Plexus
Compiler component.")))
- 65/110: gnu: Add java-eclipse-aether-test-util., (continued)
- 65/110: gnu: Add java-eclipse-aether-test-util., guix-commits, 2020/07/16
- 70/110: gnu: Add maven-3.0-settings., guix-commits, 2020/07/16
- 73/110: gnu: Add maven-3.0-plugin-api., guix-commits, 2020/07/16
- 74/110: gnu: Add maven-3.0-repository-metadata., guix-commits, 2020/07/16
- 77/110: gnu: Add maven-3.0-compat., guix-commits, 2020/07/16
- 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 <=
- 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, 2020/07/16
- 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