- Documentation (2.5.0)
- Release Notes
- Tutorials
- Reference
- Introduction
- Settings Files
- Ivy Files
- Ant Tasks
- artifactproperty
- artifactreport
- buildlist
- buildnumber
- buildobr
- cachefileset
- cachepath
- checkdepsupdate
- cleancache
- configure
- convertmanifest
- convertpom
- deliver
- dependencytree
- findrevision
- fixdeps
- info
- install
- listmodules
- makepom
- post resolve tasks
- publish
- report
- repreport
- resolve
- resources
- retrieve
- settings
- var
- Using standalone
- OSGi
- Developer doc
Building a standard OSGi bundle
Note
|
Note that this feature is considered as experimental. |
TODO - WORK IN PROGRESS
This page describes how to build an OSGi™ bundle with Apache Ivy™. In this use case, we just basically want to compute a classpath to compile, optionally one for testing too, and then publish our bundle in a OSGi aware repository.
In order to produce OSGi metadata of sufficient quality and to avoid maintaining them manually, the bnd tool will be used. The approach taken is then an "Ivy file first" approach. The dependencies will be specified in the ivy.xml
file, the MANIFEST.MF
being generated from the computed classpath.
Quick setup
In few steps, we will setup a build to compile and publish an OSGi bundle.
-
download this ivy.xml, this ivysettings.xml, this build.xml, this bnd file, and put them into your project folder
-
in the
ivysettings.properties
, specify the location of the plugins folder of your Eclipse target -
(optional) by default the
build.xml
is expecting the sources to be in thesrc
folder. You may want to edit it if it is not the case -
(optional) if Ivy is not in Ant’s classpath, download the Ivy jar and edit the
build.xml
accordingly (see the comments at the beginning of the file)
To build the project, run:
ant build