[jboss-osgi-commits] JBoss-OSGI SVN: r97539 - in projects/jboss-osgi/projects/spi/trunk: src/main/java/org/jboss/osgi/spi/capability and 1 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Tue Dec 8 09:14:03 EST 2009
Author: thomas.diesler at jboss.com
Date: 2009-12-08 09:14:03 -0500 (Tue, 08 Dec 2009)
New Revision: 97539
Added:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/EventAdminCapability.java
Modified:
projects/jboss-osgi/projects/spi/trunk/pom.xml
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java
Log:
Add EventAdminCapability
Modified: projects/jboss-osgi/projects/spi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/pom.xml 2009-12-08 14:13:08 UTC (rev 97538)
+++ projects/jboss-osgi/projects/spi/trunk/pom.xml 2009-12-08 14:14:03 UTC (rev 97539)
@@ -20,7 +20,7 @@
<artifactId>jboss-osgi-spi</artifactId>
<packaging>jar</packaging>
- <version>1.0.4-SNAPSHOT</version>
+ <version>1.0.3-SNAPSHOT</version>
<!-- Parent -->
<parent>
Added: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/EventAdminCapability.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/EventAdminCapability.java (rev 0)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/EventAdminCapability.java 2009-12-08 14:14:03 UTC (rev 97539)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.capability;
+
+//$Id$
+
+import org.osgi.service.event.EventAdmin;
+
+/**
+ * Adds the OSGi compedium EventAdmin capability.
+ *
+ * It is ignored if the {@link EventAdmin} is already registered.
+ *
+ * Installed bundles: org.apache.felix.eventadmin.jar
+ *
+ * [TODO] Add to SPI
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Dec-2009
+ */
+public class EventAdminCapability extends Capability
+{
+ public EventAdminCapability()
+ {
+ super(EventAdmin.class.getName());
+
+ addDependency(new LogServiceCapability());
+
+ addBundle("bundles/org.apache.felix.eventadmin.jar");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/EventAdminCapability.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java 2009-12-08 14:13:08 UTC (rev 97538)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java 2009-12-08 14:14:03 UTC (rev 97539)
@@ -211,7 +211,7 @@
if (url == null)
{
String prefix = System.getProperty("test.archive.directory", "target/test-libs");
- if (new File(prefix).exists())
+ if (location.startsWith(prefix) == false && new File(prefix).exists())
return getRealLocation(prefix + File.separator + location);
}
More information about the jboss-osgi-commits
mailing list