Skip to content

Instantly share code, notes, and snippets.

@evandor
evandor / pom.xml
Last active December 26, 2015 01:38
minimal pom file for converting jar into OSGi bundle
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.twentyeleven.osgiexamples</groupId>
<artifactId>org.antlr.stringtemplate-osgi</artifactId>
<packaging>bundle</packaging>
<name>OSGi stringtemplate classes</name>
<version>4.0.2</version>
@evandor
evandor / osgi.bnd
Last active December 26, 2015 01:38
Import-Package: !org.antlr.stringtemplate, \
javax.swing.*;resolution:=optional,\
*
Export-Package: *
@evandor
evandor / gist:7244790
Created October 31, 2013 05:42
felix gogo inspect command
g! inspect cap service 54
skysail.server [54] provides:
-----------------------------
service; de.twenty11.skysail.server.config.ServerConfiguration with properties:
component.id = 1
component.name = de.twenty11.skysail.server.config.ServerConfiguration
service.id = 42
Used by:
skysail.server.security.shiro [56]
skysail.server [54]
@evandor
evandor / gist:7244832
Created October 31, 2013 05:49
inspect req service 54
skysail.server [54] requires:
-----------------------------
service; org.osgi.service.log.LogService provided by:
org.apache.felix.log [40]
service; org.osgi.service.cm.ManagedService, de.twenty11.skysail.common.config.ConfigurationProvider provided by:
skysail.config.configadmin [2]
service; org.osgi.service.cm.ConfigurationAdmin provided by:
org.apache.felix.configadmin [25]
service; de.twenty11.skysail.server.config.ServerConfiguration provided by:
skysail.server [54]
@evandor
evandor / gist:7244862
Created October 31, 2013 05:53
inspect cap osgi.wiring.package 54
skysail.server [54] provides:
-----------------------------
osgi.wiring.package; de.twenty11.skysail.server.restlet 0.0.0 required by:
skysail.server.um [55]
skysail.server.ext.notes [57]
skysail.server.static [58]
osgi.wiring.package; de.twenty11.skysail.server.presentation.stringtemplate 0.0.0 [UNUSED]
osgi.wiring.package; de.twenty11.skysail.server.utils 0.0.0 [UNUSED]
osgi.wiring.package; de.twenty11.skysail.server.domain 0.0.0 [UNUSED]
osgi.wiring.package; de.twenty11.skysail.server.events 0.0.0 [UNUSED]
@evandor
evandor / gist:7497157
Created November 16, 2013 07:36
maven-bundle-plugin
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<_include>-osgi.bnd</_include>
</instructions>
</configuration>
</plugin>
@evandor
evandor / gist:7497186
Created November 16, 2013 07:39
example bnd file
Import-Package: com.thoughtworks.xstream.annotations,\
org.codehaus.jackson.annotate,\
org.codehaus.jackson.map.annotate,\
org.apache.commons.lang,\
*
Export-Package: de.twenty11.skysail.common;version="0.2.1",\
de.twenty11.skysail.common.commands;version="0.0.1",\
de.twenty11.skysail.common.config;version="0.0.1",\
de.twenty11.skysail.common.forms;version="0.2.0",\
de.twenty11.skysail.common.graphs;version="0.2.0",\
@evandor
evandor / examples.osgi.flyway.contacts.bnd
Created November 30, 2013 05:46
examples.osgi.flyway.contacts.bnd file
-sub: *.bnd
-buildpath: javax.persistence;version=2.0,\
org.apache.commons.dbcp;version=1.4,\
com.googlecode.flyway.core;version=2.2,\
biz.aQute.bnd.annotation;version=1.52
-runbundles: org.apache.felix.gogo.command;version=0.12.0,\
org.apache.felix.gogo.runtime;version=0.10.0,\
org.apache.felix.gogo.shell;version=0.10.0,\
org.apache.felix.scr;version=1.6.2,\
javax.persistence;version=2.0.3,\
@evandor
evandor / contacts.core
Last active December 29, 2015 19:09
contacts.core
Service-Component: *
Include-Resource: resources
Meta-Persistence: META-INF/persistence.xml
Import-Package: org.apache.derby.jdbc,\
org.eclipse.persistence.internal.jpa.rs.metadata.model,\
org.osgi.framework,\
*
Export-Package: examples.osgi.flyway.contacts.db,\
dbmig.contacts.derby,\
examples.osgi.flyway.contacts.domain,\
@evandor
evandor / db.bnd
Last active December 29, 2015 19:09
db.bnd
Include-Resource: dbmig=resources/dbmig
Fragment-Host: com.googlecode.flyway.core
Bundle-Version: 0.1.0.${tstamp}
Import-Package: org.osgi.framework,\
*