unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: 31604@debbugs.gnu.org
Subject: [bug#31604] [PATCH 3/8] gnu: Add java-eclipse-sisu-plexus.
Date: Sat, 26 May 2018 14:45:45 +0200	[thread overview]
Message-ID: <20180526124550.5136-3-julien@lepiller.eu> (raw)
In-Reply-To: <20180526124550.5136-1-julien@lepiller.eu>

* gnu/packages/java.scm (java-eclipse-sisu-plexus): New variable.
---
 gnu/packages/java.scm | 82 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 66d6981fc..4aef4befa 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -9873,3 +9873,85 @@ support, but removes the need to write explicit bindings in Guice modules.
 Integration with other containers via the Eclipse Extension Registry and the
 OSGi Service Registry is a goal of this project.")
     (license license:epl1.0)))
+
+(define-public java-eclipse-sisu-plexus
+  (package
+    (name "java-eclipse-sisu-plexus")
+    (version "0.3.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/eclipse/sisu.plexus/"
+                                  "archive/releases/" version ".tar.gz"))
+              (sha256
+               (base32
+                "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (for-each delete-file (find-files "." ".*.jar"))
+                  (rename-file "org.eclipse.sisu.plexus.tests/src"
+                               "org.eclipse.sisu.plexus.tests/java")
+                  #t))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "eclipse-sisu-plexus.jar"
+       #:source-dir "org.eclipse.sisu.plexus/src"
+       #:test-dir "org.eclipse.sisu.plexus.tests"
+       #:test-exclude
+       (list
+         ;; This test fails probably because we can't generate the necessary
+         ;; meta-inf files.
+         "**/PlexusLoggingTest.*"
+         ;; FIXME: This test fails because of some injection error
+         "**/PlexusRequirementTest.*")
+       #:jdk ,icedtea-8
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'copy-resources
+           (lambda _
+             (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
+                           "build/classes/META-INF/plexus")
+             #t))
+         (add-before 'check 'build-test-jar
+           (lambda _
+             (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
+               (mkdir "build")
+               (with-directory-excursion "java"
+                 (apply invoke "javac" "-cp"
+                        (string-append (getenv "CLASSPATH")
+                                       ":../../../../../build/classes")
+                        (find-files "." ".*.java"))
+                 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
+                           (find-files "." ".*.jar")))
+               (mkdir-p "build/META-INF/plexus")
+               (copy-file "resources/META-INF/plexus/components.xml"
+                          "build/META-INF/plexus/components.xml")
+               (with-directory-excursion "build"
+                 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
+             (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
+               (copy-recursively "META-INF" "../build/test-classes/META-INF")
+               (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
+                 (("resources/component-jar")
+                  "org.eclipse.sisu.plexus.tests/resources/component-jar")))
+             #t)))))
+    (inputs
+     `(("java-plexus-classworlds" ,java-plexus-classworlds)
+       ("java-plexus-util" ,java-plexus-utils)
+       ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+       ("java-osgi-framework" ,java-osgi-framework)
+       ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
+       ("java-guice" ,java-guice)
+       ("java-javax-inject" ,java-javax-inject)
+       ("java-slf4j-api" ,java-slf4j-api)
+       ("java-junit" ,java-junit)))
+    (native-inputs
+     `(("java-guava" ,java-guava)
+       ("java-aopalliance" ,java-aopalliance)
+       ("java-cglib" ,java-cglib)
+       ("java-asm" ,java-asm)))
+    (home-page "https://www.eclipse.org/sisu/")
+    (synopsis "Plexus support for the sisu container")
+    (description "Sisu is a modular JSR330-based container that supports
+classpath scanning, auto-binding, and dynamic auto-wiring.  This package
+adds Plexus support to the Sisu-Inject container.")
+    (license license:epl1.0)))
-- 
2.17.0

  parent reply	other threads:[~2018-05-26 12:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-26 12:43 [bug#31604] [PATCH] Some java packages Julien Lepiller
2018-05-26 12:45 ` [bug#31604] [PATCH 1/8] gnu: Add java-jsr250 Julien Lepiller
2018-05-26 12:45   ` [bug#31604] [PATCH 2/8] gnu: Add java-eclipse-sisu-inject Julien Lepiller
2018-05-26 12:45   ` Julien Lepiller [this message]
2018-05-26 12:45   ` [bug#31604] [PATCH 4/8] gnu: Add java-commons-jxpath Julien Lepiller
2018-05-26 12:45   ` [bug#31604] [PATCH 5/8] gnu: Add java-commons-compiler Julien Lepiller
2018-05-26 12:45   ` [bug#31604] [PATCH 6/8] gnu: Add java-janino Julien Lepiller
2018-05-26 12:45   ` [bug#31604] [PATCH 7/8] gnu: Add java-logback-core Julien Lepiller
2018-05-26 12:45   ` [bug#31604] [PATCH 8/8] gnu: Add java-logback-classic Julien Lepiller
2018-05-27  8:14 ` [bug#31604] [PATCH] Some java packages Roel Janssen
2018-05-27 17:07 ` bug#31604: " Julien Lepiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180526124550.5136-3-julien@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=31604@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).