I'm trying to use the osgi plugin for a very simple jar file. I can't get it
to create either Import-Package or Export-Package.
The jar file is just one class: a Groovy BundleActivator implementation that
prints out "Hello World".
I'm expecting the Import-Package in the MANIFEST.MF to contain the OSGi
imports (for the BundleActivator) and the Groovy imports (for the Groovy API
on the compiled class).
I'm also expected the Export-Package in the MANIFEST.MF to contain the
export for my package (org.gradle;version="1.0") and the Groovy exports
(groovy.lang;version="1.6.0", etc).
Neither the import or exports are being set.
It's not clear from the User Guide or samples how either of these is
supposed to work. The User Guide says putting a bundle on the classpath
means it will be included in the Import-Package but this does not seem to be
true.
How do I indicate that my package should be in Export-Package?
How do I get the imports and exports generated correctly?
Here is my build.gradle for reference:
usePlugin 'groovy'
usePlugin 'osgi'
version = '1.0'
group = 'gradle_tooling'
repositories {
mavenCentral()
flatDir dirs: [
'..\\..\\..\\..\\osgi\\lib' // equinox jar, too lazy to get from
maven
]
}
dependencies {
groovy group: 'org.codehaus.groovy', name: 'groovy-all', version:
'1.6.0'
compile( ':osgi:3.4.0' )
runtime( ':osgi:3.4.0', 'org.codehaus.groovy:groovy-all:1.6.0' )
}
configure(jar.osgi) {
version = '1.0'
name = 'Example Gradle Activator'
instruction 'Bundle-Activator', 'org.gradle.GradleActivator'
}
-----
--
Hamlet D'Arcy
--
View this message in context:
http://www.nabble.com/osgi-plugin-not-generating-Import-Package-and-Export-Package-tp24910576p24910576.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email