LucidJ Admin Daemon exposes administrative functionality using the /tmp
filesystem, in similar way as Java using /tmp/hsperfdata_{user.name}
.
The examples were built to illustrate both functionality and implementation. They are IDE-agnostic, showing all the steps to build an OSGi application from zero without need of a particular combination of IDE and plugin or any wizzard tool.
We achieve this using Ant. Today, you can also use Maven to build any OSGi project, however Maven is magical in it’s own way, because there are many predefined (and sane) defaults. You may choose Maven for your own projects. On the other side, Ant allows you to follow the logic of building an OSGi jar file, with all required steps very visible. We strongly suggest you to take a time to look into build.xml
and configure.xml
to get a good idea of whats going on, and how things are being done. It may look intimidating at first, but hopefully will also be instructive.
Specially, you will get known to Bnd
(http://bndtools.org/), which is the reference tool to build all OSGi-related stuff you can imagine. There’s also the iPojo processor, which manipulates the code after compilation and demonstrates the post-processing of OSGi jar bundles.
TODO: Add instructions for building.
To build all subprojects at once, just type ant
on project root.
By default, Ant will download and cache all needed tools, then invoke the build-all
target. The output of all builds will be located in dist/
directory beneath every subproject. Karaf stage, will be built by default, so all bundles will be deployed into Karaf. If you change the stage to Felix (changing the stage target to Felix all bundles will
For details on building the code, see ant -p
.
These are the available targets:
-
ant build-all
: builds all available subprojects; -
ant clean
: removes thebuild
anddist
directories; -
ant zero
: same asclean
, but also removes thecache
directory with all downloaded tools; -
ant configure
: rebuild the library and tools cache.
If you need further information, please refer to the following resources:
-
OSGi in Practice: Free, Creative Commons-licensed book on OSGi by Neil Bartlett.
-
Tutorial Archive from OSGi Alliance: Lots of great articles and resources.
-
BND Tools: The standard OSGi tool to build artifacts.
-
OSGi Specifications: All OSGi specifications available from OSGi Alliance.
-
OSGi Release 5 Javadoc: Browse online the javadocs for OSGi R5 APIs.
This work is licensed under a Apache License, Version 2.0.