From 3fda539bb407779ad0169213ad845d68dc8c5efd Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 18 Nov 2017 15:01:23 +0100 Subject: [PATCH] gnu: Add java-geronimo-xbean-bundleutils. * gnu/packages/java.scm (java-geronimo-xbean-bundleutils): New variable. --- gnu/packages/java.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 20d32bdf1f..a667a40afd 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -7762,6 +7762,45 @@ outputting XML data from Java code.") and graphs of objects for dependency injection frameworks") (license license:asl2.0))) +(define-public java-geronimo-xbean-bundleutils + (package + (inherit java-geronimo-xbean-reflect) + (name "java-geronimo-xbean-bundleutils") + (arguments + `(#:jar-name "geronimo-xbean-bundleutils.jar" + #:source-dir "xbean-bundleutils/src/main/java" + #:test-dir "xbean-bundleutils/src/test" + #:phases + (modify-phases %standard-phases + (add-before 'build 'fix-java + (lambda _ + ;; We use a more recent version of osgi, so this file requires + ;; more interface method implementations. + (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java" + (("import org.osgi.framework.ServiceRegistration;") + "import org.osgi.framework.ServiceRegistration; +import org.osgi.framework.ServiceFactory; +import java.util.Collection; +import org.osgi.framework.ServiceObjects;") + (("public Bundle getBundle\\(\\)") + "@Override +public ServiceObjects getServiceObjects(ServiceReference reference) { + throw new UnsupportedOperationException(); +} +@Override +public ServiceRegistration registerService(Class clazz, + ServiceFactory factory, Dictionary properties) { + throw new UnsupportedOperationException(); +} +public Bundle getBundle()")) + #t))))) + (inputs + `(("java-slf4j" ,java-slf4j-api) + ("java-asm" ,java-asm) + ("java-osgi-framework" ,java-osgi-framework) + ("java-eclipse-osgi" ,java-eclipse-osgi) + ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin))))) + (define-public java-gson (package (name "java-gson")