Skip to content

Commit

Permalink
add extra guidelines in markdown
Browse files Browse the repository at this point in the history
add support for annotation-ds and the osgi compendium annotations for SCR services
  • Loading branch information
Jan Volckaert committed Feb 13, 2014
1 parent 324a317 commit 7de0b86
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,52 @@ gradle-scr-plugin
=================

Generates the OSGI-INF/serviceComponent.xml based on the Apache scr annotations


How To
======
To use this plugin add a buildscript dependency of the gradle-scr-plugin to your build.grade script
e.g.: buildscript {
dependencies {
classpath 'be.jlrhome.gradle.scr:scrPlugin:0.0.+'
}
}

Once the buildscript is added, apply the scr plugin:
e.g.: apply plugin: 'scr'


Troubleshouting
================
* If the gradle-scr-plugin throws an exception like: Could not create an instance of type be.jlrhome.gradle.scr.ScrPluginExtension_Decorated.
Then make sure you also apply the java plugin : apply plugin: 'java'


Simple Example
==============
buildscript {
dependencies {
classpath 'be.jlrhome.gradle.scr:scrPlugin:0.0.+'
}
}

apply plugin: 'java'
apply plugin: 'osgi'
apply plugin: 'scr'
apply plugin: 'groovy'
apply plugin: 'maven'

sourceCompatibility = 1.6
targetCompatibility = 1.6

version = '0.0.1-SNAPSHOT'
group = 'be.jlrhome.gradle.scr'
description = 'Gradle scr example'

dependencies {
compile 'org.osgi:org.osgi.compendium:5.0.0'
// or
compile 'org.osgi:org.osgi.compendium:4.3.+'
// or
compile 'org.apache.felix:org.apache.felix.scr.annotations:1.9.+'
}
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ dependencies {

dependencies {
compile 'org.apache.felix:org.apache.felix.scr.generator:1.8.+'
compile 'org.apache.felix:org.apache.felix.scr.ds-annotations:1.2.+'
compile 'org.osgi:org.osgi.compendium:5.0.0'
compile 'org.codehaus.plexus:plexus-utils:3.0.15'
testCompile 'junit:junit:4.+'
}
Expand Down

0 comments on commit 7de0b86

Please sign in to comment.