google-code-export / jqwicket

Automatically exported from code.google.com/p/jqwicket
1 stars 0 forks source link

Add OSGi metainf #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

I'm going to use jqwicket in a new Wicket application that is running in a OSGi 
platform. 

OSGi needs that the META-INF explicitly declares the packages dependencies. 
I've been able to deploy jqwicket in a OSGi platform only adding this plugin to 
the main pom.xml:

<plugin>
     <groupId>org.apache.felix</groupId>
     <artifactId>maven-bundle-plugin</artifactId>
     <version>2.3.5</version>
     <extensions>true</extensions>
</plugin>

And changing the packaging to:
<packaging>bundle</packaging>

This changes won't affect non-OSGi users (I've been testing the jqwicket-demo 
examples) and it will do the life easier for the future OSGi users. 

There is only one problem, that the Yuicompressor it's not an OSGi valid jar so 
if some OSGi user wants to use the yuicompressor with jqwicket will need to 
Osgify it before provisioning the platform.

I hope this help improve this fantastic project.

Original issue reported on code.google.com by jo...@jordeu.net on 13 Oct 2011 at 12:59

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r534.

Original comment by m...@javaforge.net on 28 Dec 2011 at 10:25

GoogleCodeExporter commented 9 years ago
thanks for the advice. done. will be available in 0.8

Original comment by m...@javaforge.net on 28 Dec 2011 at 10:37

GoogleCodeExporter commented 9 years ago
Great!

 Sorry I forgot to comment that we also needed to mark the yuicompressor dependency as optional to be able to run jqwicket in a OSGi platform without import yuicompressor bundle. 

 Read this to understand the meaning of optional in Maven.
http://maven.apache.org/guides/introduction/introduction-to-optional-and-exclude
s-dependencies.html

 To make yuicompressor optional you only need to add the tag

 <optional>true</optional>

 inside the yuicompressor dependency.

 This has a little implication for non-OSGi projects, with this change all the projects that want to use the yuicompressor will need to explicitly declare the yuicompressor dependency inside their pom.

 I think that it's better to mark this dependency as optional, because jqwicket works smoothly without yuicompressor.

 Thanks.

Original comment by jo...@jordeu.net on 28 Dec 2011 at 11:11