Hello All,

I try to create a valid OSGi bundle with Gradle. My build.gradle looks
like this:

usePlugin 'java'
usePlugin 'osgi'

repositories {
    mavenCentral()
        mavenRepo urls: 'http://download.java.net/maven/2/'
}

dependencies {
        compile 'org.uncommons:reportng:1.0'
        compile 'org.osgi:org.osgi.core:4.2.0'
        compile 'org.testng:testng:5.10:jd...@jar'
}

configure(jar.osgi) {
        version = '1.0'
        name = 'reportng-osgi'
        instruction 'Bundle-SymbolicName', 'reportng-osgi'
        instruction 'Bundle-Name', 'reportng-osgi'
        instruction 'Private-Package',
'pl.kaczanowscy.tomek.osgi.*,org.apache.velocity.*,org.testng.*,org.uncommons.reportng,javax.xml.parsers,org.osgi.framework'
        instruction 'Bundle-Activator',
'pl.kaczanowscy.tomek.osgi.activator.TestActivator'
}

after

gradle jar

I got a jar in build/libs directory but it is "empty", or more
precisely it does not include any of classes of packages listed in
Private-Package section, only "my" classes (pl.kaczanowscy.tomek.*).

I tried to do same with Maven (using same OSGi instructions in order
to check if they are ok) and got a bundle with all required classes
inside.

Any clue what I am doing wrong ? Unfortunately I can't figure it out
by reading userguide
(http://gradle.org/latest/docs/userguide/userguide_single.html#osgi_plugin).

I use the latests Gradle SNAPSHOT (I even updated bnd to 0.357 in
subprojects/gradle-plugins/plugins.gradle but it didn't help)

--
Tomek

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to