Hi,

Looks like you need one of these:


bnd-tools:

http://bndtools.org/

If you use Maven, just use the maven bundle plugin, and write your own Felix 
bootstrapper (the the example in the Felix docs - this is the hard way): 

http://wiki.osgi.org/wiki/Maven_Bundle_Plugin


osgi-run:

https://github.com/renatoathaydes/osgi-run

If you just want to avoid Maven and Eclipse (like me) and you like Gradle, try 
this gradle plugin I wrote.

It will create an OSGi environment for you with as little as this in a 
"build.gradle" file:

##################
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath "com.athaydes.gradle.osgi:osgi-run-core:1.1"
    }
}

repositories { mavenCentral() } // you can use mavenLocal(), jcenter() etc... 
see gradle docs

apply plugin: 'osgi-run'

dependencies { // some examples of bundles to deploy with their (bundle) 
dependencies
    osgiRuntime 'org.osgi:org.osgi.core:4.3.1'
    osgiRuntime 'org.apache.pdfbox:pdfbox:1.8.6'
    osgiRuntime 'commons-logging:commons-logging:1.2'

}
##################

Now, to create an environment (you need gradle installed):

gradle createOsgiRuntime

Then, to run:

cd build/osgi
run.bat            # or ./run.sh or ./run.command

Remove everything with:

gradle clean

By default, it will use Felix to run everything and will install the gogo 
bundles so you can type "lb" for example to see the installed bundles, but you 
can easily configure it to use Equinox or something else, or to not install 
transitive bundle dependencies, or not install gogo etc... See the README page.


Renato

> Date: Thu, 11 Dec 2014 12:38:27 -0500
> Subject: Bundle dependency management
> From: ben...@basistech.com
> To: users@felix.apache.org
> 
> So, here I am, setting up an application that embeds Felix. I need it
> to contain a certain collection of bundles -- and then some
> dependencies of those bundles.
> 
> Plain-old-maven can't help very much with managing those dependencies,
> since it can only deal with one version per Group/Artifact, and I
> expect to have cases where we need more than one major version of some
> things (e.g. Guava).
> 
> is there a commonly-used solution to all of this? I'm contemplating
> writing a Maven plugin, but I would like to avoid recreating the
> wheel.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>  
                                          

Reply via email to