[GRADLE-589] A better OSGi sample project is needed Created: 12/Aug/09  Updated: 04/Jan/13  Resolved: 31/Aug/09

Status: Resolved
Project: Gradle
Affects Version/s: 0.7
Fix Version/s: 0.8

Type: Improvement
Reporter: Hamlet D'Arcy Assignee: Adam Murdoch
Resolution: Fixed Votes: 0

Attachments: Text File improved_osgi_example.patch    

 Description   

The existing osgi example doesn't do much. It generates a .tar.gz file which isn't valid on a Windows machine. It does not produce an OSGi bundle or show proper usage.

I created a new sample. It creates a Hello World Activator, implemented in Groovy, and then shows how to correctly generate a Import-Package and Export-Package off of the data.

Patch is attached.

Bundle is valid on at least Eclipse Equinox.

For reference, the MANIFEST.MF produced is:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.6.0_04 (Sun Microsystems Inc.)
Export-Package: org.gradle;uses:="groovy.lang,org.codehaus.groovy.refl
ection,org.codehaus.groovy.runtime,org.osgi.framework,org.codehaus.gr
oovy.runtime.callsite";version="1.0"
Bundle-Version: 1.0
Tool: Bnd-0.0.255
Bnd-LastModified: 1250128067203
Bundle-Name: Example Gradle Activator
Bundle-ManifestVersion: 2
Bundle-Activator: org.gradle.GradleActivator
Import-Package: groovy.lang;version="1.6",org.codehaus.groovy.reflecti
on;version="1.6",org.codehaus.groovy.runtime;version="1.6",org.codeha
us.groovy.runtime.callsite;version="1.6",org.gradle;version="1.0",org
.osgi.framework;version="1.4"
Bundle-SymbolicName: gradle_tooling.osgi



 Comments   
Comment by Adam Murdoch [ 19/Aug/09 ]

This has been applied. Thank you for the patch.

Comment by Hans Dockter [ 31/Aug/09 ]

Reopened to change the FixFor to 0.8 as we skip the 0.7.1 release.

Generated at Wed Jun 30 11:33:47 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.