felix plugin

A gradle plugin for Felix

License

License

Categories

Categories

Gradle Build Tools
GroupId

GroupId

com.harshil.gradle
ArtifactId

ArtifactId

felix-plugin
Last Version

Last Version

1.3.6-BETA
Release Date

Release Date

Type

Type

jar
Description

Description

felix plugin
A gradle plugin for Felix

Download felix-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/com.harshil.gradle/felix-plugin/ -->
<dependency>
    <groupId>com.harshil.gradle</groupId>
    <artifactId>felix-plugin</artifactId>
    <version>1.3.6-BETA</version>
</dependency>
// https://jarcasting.com/artifacts/com.harshil.gradle/felix-plugin/
implementation 'com.harshil.gradle:felix-plugin:1.3.6-BETA'
// https://jarcasting.com/artifacts/com.harshil.gradle/felix-plugin/
implementation ("com.harshil.gradle:felix-plugin:1.3.6-BETA")
'com.harshil.gradle:felix-plugin:jar:1.3.6-BETA'
<dependency org="com.harshil.gradle" name="felix-plugin" rev="1.3.6-BETA">
  <artifact name="felix-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.harshil.gradle', module='felix-plugin', version='1.3.6-BETA')
)
libraryDependencies += "com.harshil.gradle" % "felix-plugin" % "1.3.6-BETA"
[com.harshil.gradle/felix-plugin "1.3.6-BETA"]

Dependencies

compile (1)

Group / Artifact Type Version
biz.aQute.bnd : biz.aQute.bndlib jar 3.1.0

Project Modules

There are no modules declared in this project.

Gradle Felix Plugin

Build Status

This is the Felix Plugin for the Gradle build system. This Plugin enables the creation of a apache felix framework installation to ready run a osgi bundle application.

LICENSE

Releases after v1.3.6-BETA, distributed under the GNU General Public License v3.0 (GPLv3).
Releases before v1.3.6-BETA, distributed UN-LICENSED.

Features

Features of the Felix Plugin:

  • Downloads all required apache felix framework bundles
  • Configure, assemble and execute/run felix framework with all bundles
  • Compiling and including of custom bundles into the felix framework
  • Auto Wrap default OSGi bundle configuration for non-bundles mentioned with felix configuration
  • Easy and Flexible development
  • Auto creation of Bundle for all Sub Projects which includes all compile time dependencies[DISCONTINUED]

Usage

Include in project

Just star the project and follow the procedure

To apply the plugin you have to add the plugin dependency in your project build file:

buildscript {
    repositories {
       mavenCentral()
    }
    dependencies {
        classpath group: 'com.harshil.gradle', name: 'felix-plugin', version: '1.3.1'
    }
}

    apply plugin 'com.harshild.felix-run'

Tasks

  • buildBundles: builds the apache felix framework
  • runFelix: runs the felix framework

The felix framework will be created in the following directory:

build/felixMain

Configuration files in ./config in each subprojects will be copied to following directory:

build/felixMain/config

Dependency configuration

This plugin defines a new dependency configuration "felix". Artifacts defined with this dependency configuration will be resolved and added with all transitive dependencies as bundle to the felix bundle directory.

In addition to this, it also uses BndWrapper to automatically Wrap OSGI to make a non-bundle dependency mentioned in felix configuration OSGI deploy-able.

dependencies {
  felix 'org.apache.felix:org.apache.felix.scr:1.6.0'
  felix 'org.apache.felix:org.apache.felix.log:1.0.1'
}
NOTE Compile dependencies will be automatically resolved and added to runtime as felix dependency

Other configurations

To specify felix framework configurations use felix extension

felix {

}

Properties####

Property DefaultValue
resolveVersion true

Felix Configuration Properties####

Property Alias Property Default Value
log felix.log.level 1
httpPort org.osgi.service.http.port 8080
deployActions felix.auto.deploy.action install,start,update
repositoryUrl obr.repository.url http://felix.apache.org/obr/releases.xml

For any other configuration user can use

properties.testProperty = '123'

which will add testProperty in Felix configuration file

Exclude Projects

If your multi-project structure has some projects that are not supposed to be deployed as bundle you may exclude them

felix{
    excludeProjects 'project1', 'project2'
}

Most Updated Versions

STABLE RELEASE

Latest Version -- 1.3.1

BETA RELEASE

This version is available to all but is not stable. It usually contains newest features, which are tested working but may/may not give desired results always.

Latest Version -- 1.3.6-BETA

You may log issues found in BETA release.

How to Use

To use simply update your gradle build script with above mentioned version.

######WORKING EXAMPLE : https://github.com/harshild/gradle-felix-example######

Credits

The basic idea https://github.com/thomasvolk/gradle-felix-launcher-plugin

Contribution

  • Log issues, new features and enhancements
  • For code changes, send a pull request to development branch

HELP NEEDED IN AREAS

  • Unit Tests

Versions

Version
1.3.6-BETA
1.3.5-BETA
1.3.4-BETA
1.3.3-BETA
1.3.2-BETA
1.3.1
1.3.0
1.2.0
1.1.1
1.1.0