Skip to main content

SwingX and OSGi

11 replies [Last post]
kschaefe
Offline
Joined: 2006-06-08
Points: 0

Issue 952 concerns itself with making SwingX available as an OSGi module or modules. Now that we have made the move to Maven, I understand that there is a Maven plugin that will help create OSGi bundles.

Is anyone interested in helping us to do this?

Karl

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
francisdb
Offline
Joined: 2006-06-16
Points: 0

You don't need the bundle packaging if you don't want to, we use the plugin like this:

org.apache.felix
maven-bundle-plugin
2.0.1


bundle-manifest

process-classes
manifest



org.apache.empire*
*
<_nouses>true




kschaefe
Offline
Joined: 2006-06-08
Points: 0

Lucio,

I see the packaging type is bundle. Does that mean if I want to use standard jar packaging for painters, I will need a second POM to do the bundling?

Karl

lukion
Offline
Joined: 2006-03-06
Points: 0

An OSGi bundle is a standard jar. It only has additional options in the manifest. The packaging is only there to raise the maven-bundle-plugin. However I guess you could use maven profiles if you really need to have different build.

Lucio

greglev
Offline
Joined: 2010-08-20
Points: 0

Can someone do one example (for example Panel with a Label)?. I am beginner.
Thanks.

kschaefe
Offline
Joined: 2006-06-08
Points: 0

Huh? Is this related to the OSGi topic? If so, how?

Karl

greglev
Offline
Joined: 2010-08-20
Points: 0

yes, I have problem with 2 diferents versions of swingx, a example with osgi and swingx would be helpful. where? a file ".rar" with your example in (for example) rapidshare.
Thanks in advance

kschaefe
Offline
Joined: 2006-06-08
Points: 0

We don't have an OSGi version yet. That's the point of this thread; we're trying to figure out how to do it correctly.

Karl

lukion
Offline
Joined: 2006-03-06
Points: 0

Hi Karl,

This is (more or less, anyway a starting point) everything you need to osgify swingX in your pom.xml. I wasn't interested to have SwingWorker in my jar, but you can safely remove the option.

You could also consider to add the version of the maven-bundle-plugin.

Sorry for the indenting...

org.apache.felix
maven-bundle-plugin


${project.organization.name}
http://swingx.dev.java.net/
org.jdesktop.*
!org.jdesktop.swingworker,*


... other maven plugins

Lucio

kschaefe
Offline
Joined: 2006-06-08
Points: 0

Lucio,

Is that all we need? Seems pretty easy.

Not sure what the swing-worker part is about, as it is not required or included in the swingx builds.

Karl

lukion
Offline
Joined: 2006-03-06
Points: 0

Karl,

this is the pom I tested to build swingx-painter as an OSGi bundle. Check the manifest after the build.

Hope this helps...

Lucio

----------

4.0.0

org.swinglabs
swingx-project
1.6.3-SNAPSHOT
../pom.xml

org.swinglabs
swingx-painters
1.6.3-SNAPSHOT

bundle SwingX Painter Support

org.apache.felix
maven-bundle-plugin
2.0.0
true


${project.organization.name}
http://swingx.dev.java.net/
org.jdesktop.*


lukion
Offline
Joined: 2006-03-06
Points: 0

Sorry Karl,

replace the property "project.organization.name" in

${project.organization.name}

However, the Bundle-Vendor is not mandatory.

Lucio