score:1

Accepted answer

a run configuration is possible via pax runner. it lets you choose osgi platform implementation, specify profiles (pre-packaged sets of bundles for some role, e.g. web, log, ds, etc.) and has good provisioning support, for instance it can load bundles from maven repository. as a result, you can have a run configuration like

--platform=felix
--log=info
--profiles=scalamodules,ds,config,log
mvn:com.my/bundle/1.0.1-snapshot@update
# other bundles

in case your application is very large or you have different applications, there a way to create own profiles as well.

score:0

i'm quite new to osgi but,

wouldn't it be possible to use obr-service in such a way that you would have one obr repository file which needs the bundles and let the obr-service figure out the dependencies and populate your osgihost for you?

score:0

this area i think has very poor support at the moment. osgi doesn't really define anything about deployment or packaging so its up to other frameworks (e.g. eclipse) to come up with their own way of doing it.

if you are building an rcp (eclipse base) application, then the eclipse systems do all this stuff, right down to creating exes etc. however builds are mainly done on the eclipse workspace, headless builds are trickier. the tycho project is trying to make this more sensible by joining the maven and eclipse build cycles, however it is still focussed on rcp applications rather than generic osgi.

if you not doing rcp, which is my situation as well, then you probably have to roll your own solution, as i haven't found any general solution. here's an outline of what we do:

we define one pom project that lists all the bundles that are contained in your application. all this project does is list the references - lets call it the 'bundle-list' project.

then, we use pax provision to run the project in development mode. this is achieved by making the 'bundle-list' pom the parent of the provisioning pom of the pax project (usually in the 'provision' folder). then, when you start pax, it uses the list of bundles from that project to start osgi. the bundle references in the 'bundle-list' project have to be marked as 'provided' scope for this to work.

then, to create a distribution, we have another project. this project also has the 'bundle-list' project as its parent. this project uses various plugins to create a distribution, including downloading the bundle jars. the distribution includes scripts that start up osgi, but these are hand written, there's no pax systems here.

this works well for us to keep the list of bundles in one place, but there's still a lot of hand written scripts, and there are issues sharing configuration between the two systems - e.g. config files, bundle start levels etc.

score:1

well...

it all deopends on what do you mean by "managing" the application.

for dev time launching, building and debugging - eclipse ide should fit the bill just perfectly.

maven... i can't speak for it, as i've never used it myself.

we have a pretty large eclipse based application (several, actually) and on the dev side of things we are not using anything special besides the eclipse and it's integrated scm.

in the cc build server, we also use headless eclipse to do the building and packaging.

now the setup of the workspace has gone a bit out of hand of late with all the dependencies and intermediate build steps, so we are investigating buckminster for managing the materialization of target platform and workspace resources.

if that works out, we'll probably move to building with bucky as well - it sure looks promising.

(i do not have any experience with pax, but at a glance, it looks promising as well...)


Related Query

More Query from same tag