Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.

realityforge/buildr-ipojo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iPojo support for buildr

iPojo is an OSGi component model (felix.apache.org/site/apache-felix-ipojo.html). This extension processes OSGi bundles using iPojo’s pojoizer to generate the required metadata for the iPojo component model.

The extension will process all packages of type :jar and generate the required metadata from annotations and an ipojo metadata file if present. The default location of the metadata file is “src/main/config/ipojo.xml” but this can be changed by assigning the “ipojo.metadata_filename” setting.

A typical project that uses the extension with the default metadata file location.

define 'myProject' do
  ...
  project.ipojoize!
  package :jar
  ...
end

An example of a project that specifies the metadata file location.

define 'myProject' do
  ...
  # Note: no longer require project.pojoize!
  project.ipojo.metadata_filename = _("src/ipojo.xml")
  package :jar
  ...
end

Note: Often projects that are building OSGi bundles will make use of the buildr-bnd extension available at github.com/realityforge/buildr-bnd

An example of a project that makes use of both buildr-ipojo and buildr-bnd extensions to build an OSGi bundle is;

gem 'buildr-bnd'
gem 'buildr-ipojo'

require 'buildr_bnd'
require 'buildr_ipojo'

repositories.remote << Buildr::Bnd.remote_repository
repositories.remote << Buildr::Ipojo.remote_repository

desc 'My bundle project'
define 'myProject' do
  project.version = '0.1.1-SNAPSHOT'
  project.group = 'mygroup'

  compile.with Buildr::Ipojo.annotation_artifact
  project.ipojoize!

  package(:bundle).tap do |bnd|
    bnd['Export-Package'] = "mygroup.*;version=#{version}"
  end
end

Installation

The extension is packaged as a gem named “buildr-ipojo”, consult the ruby gems installation steps but typically it is either

sudo gem install buildr-ipojo

for MRI ruby or

jgem install buildr-ipojo

for jruby.

The user then needs to add the following require into the build file:

require 'buildr_ipojo'

If the local maven repository does not contain the required ipojo jars they can be downloaded but you will need to register the remote repository by adding the following to the build file:

repositories.remote << Buildr::Ipojo.remote_repository

About

A Buildr extension for processing OSGi bundles using IPojo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages