You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by cmoulliard <cm...@gmail.com> on 2009/02/27 14:33:34 UTC

Suggestion about packaging of osgi applications through features maven archetype (SMX4)

Hi,

I work very hard since a couple of days on SMX4 (kernel, fuse, ... versions)
and I'm terribly frustrated about the difficulty to package a application
(bnd, pax construct, ...) top of an OSGI server when we have by example non
osgi bundles like iText, JasperReport, Hibernate, ... combined with our osgi
bundles.

In a development team, the work and workload is distributed between
different team and developers. In consequence, the packaging of such
application where we don't EAR, WAR tools is a critical factor that the
project manager will put in the 'balance' before to take the decision to use
such technology. Moreover, imagine How you will explain to deployer team of
big companies (with poor or insufficient knowledge in java, maven, ant, ...
except maybe if you ask them to copy a file from a folder to another, ...)
how they will deploy your osgi projects in acceptance and next production
environment

This is why I would like to make the following suggestion to help the debate
about OSGI packaging and distribution.

Obviously, this idea is based on the features (see file :
org.apache.servicemix.features.cfg) available under SMX4.

idea : create a maven archetype with the following goal to :

- Create features file : will create a src folder with an empty feature.xml
file. By adding in the pom.xml file the module names of the osgi projects,
then they will be added to the file as a <feature name="osgi project name">
and the dependencies are added as <bundle ...>

Remark : the existing xml syntax of the features can be extended in order to
generate html pages to document the project (see my comment here : 
http://fusesource.com/forums/message.jspa?messageID=2005#2005
http://fusesource.com/forums/message.jspa?messageID=2005#2005 )

- Update feature file (update features.xml file based on POM.xml
modification),
- Install features file (deploy feature.xml in the maven repository)
- Package osgi bundles defined in the feature file (in an archive like a jar
or a zip)
- Deploy package on SMX4 (update the org.apache.servicemix.features.cfg
config file like we have in Tomcat when we deploy a war of SMX4 and ask the
server the launch the deployment of the features requested
- Undeploy package on SMX
- Update package

Regards,





-----
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: http://www.nabble.com/Suggestion-about-packaging-of-osgi-applications-through-features-maven-archetype-%28SMX4%29-tp22245968p22245968.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Suggestion about packaging of osgi applications through features maven archetype (SMX4)

Posted by cmoulliard <cm...@gmail.com>.
Hi Jean-Baptiste,

The topic of my message was more general and concerned administrator/builder
to help them during project lifecycle when from a user perspective, you have
to deploy a release 1.02 and as a developer/builder, you have to provide to
the different teams the content of the release to be deployed/build from a
code source repository. 

The user is not aware of which osgi bundle/librairies must be packaged and
deployed. But the release manager well. 

What you propose is interesting but from my point of view will only help
developers when they need to deploy a non-osgi jar (who could perhaps
converted into osgi bundles like spring propose in their enterprise
repository for Hibernate) on a server where the other bundles will never use
the lib packaged. I prefer to avoid this approach even if the jars used by
my lib (hibernate) must be converted into osgi bundles.

When you work like that, you open the door to design solutions like we have
done top traditional J2EE servers. This is not the goal of OSGI servers.

Regards,

Charles


jb-58 wrote:
> 
> Hi Charles,
> 
> Packaging the non OSGi bundles using bundle-classpath doesn't feed your
> needs ?
> 
> For example, I have written an OSGi bundle that use Hibernate, I have
> included Hibernate in my OSGi bundle using :
> 
> Bundle-ClassPath: ., hibernate.jar
> 
> Maven (with BND Felix plugin) managed this without problem. You can use
> the Include-Resource notation in the MANIFEST too like this :
> 
> Include-Resource: lib
> 
> In this case, all jar in the lib bundle directory will be included in the
> bundle.
> 
> Like this, the customer deploys only one bundle and all non-bundle
> dependencies are included.
> 
> Maybe, I haven't really understand your requirements.
> 
> Regards
> JB
> 
> On Friday 27 February 2009 - 05:33, cmoulliard wrote:
>> 
>> Hi,
>> 
>> I work very hard since a couple of days on SMX4 (kernel, fuse, ...
>> versions)
>> and I'm terribly frustrated about the difficulty to package a application
>> (bnd, pax construct, ...) top of an OSGI server when we have by example
>> non
>> osgi bundles like iText, JasperReport, Hibernate, ... combined with our
>> osgi
>> bundles.
>> 
>> In a development team, the work and workload is distributed between
>> different team and developers. In consequence, the packaging of such
>> application where we don't EAR, WAR tools is a critical factor that the
>> project manager will put in the 'balance' before to take the decision to
>> use
>> such technology. Moreover, imagine How you will explain to deployer team
>> of
>> big companies (with poor or insufficient knowledge in java, maven, ant,
>> ...
>> except maybe if you ask them to copy a file from a folder to another,
>> ...)
>> how they will deploy your osgi projects in acceptance and next production
>> environment
>> 
>> This is why I would like to make the following suggestion to help the
>> debate
>> about OSGI packaging and distribution.
>> 
>> Obviously, this idea is based on the features (see file :
>> org.apache.servicemix.features.cfg) available under SMX4.
>> 
>> idea : create a maven archetype with the following goal to :
>> 
>> - Create features file : will create a src folder with an empty
>> feature.xml
>> file. By adding in the pom.xml file the module names of the osgi
>> projects,
>> then they will be added to the file as a <feature name="osgi project
>> name">
>> and the dependencies are added as <bundle ...>
>> 
>> Remark : the existing xml syntax of the features can be extended in order
>> to
>> generate html pages to document the project (see my comment here : 
>> http://fusesource.com/forums/message.jspa?messageID=2005#2005
>> http://fusesource.com/forums/message.jspa?messageID=2005#2005 )
>> 
>> - Update feature file (update features.xml file based on POM.xml
>> modification),
>> - Install features file (deploy feature.xml in the maven repository)
>> - Package osgi bundles defined in the feature file (in an archive like a
>> jar
>> or a zip)
>> - Deploy package on SMX4 (update the org.apache.servicemix.features.cfg
>> config file like we have in Tomcat when we deploy a war of SMX4 and ask
>> the
>> server the launch the deployment of the features requested
>> - Undeploy package on SMX
>> - Update package
>> 
>> Regards,
>> 
>> 
>> 
>> 
>> 
>> -----
>> Charles Moulliard
>> SOA Architect
>> 
>> My Blog :  http://cmoulliard.blogspot.com/
>> http://cmoulliard.blogspot.com/  
>> -- 
>> View this message in context:
>> http://www.nabble.com/Suggestion-about-packaging-of-osgi-applications-through-features-maven-archetype-%28SMX4%29-tp22245968p22245968.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> 
> 
> -- 
> Jean-Baptiste Onofré
> ---------------------------------
>  HomePage
> http://www.nanthrax.net
> ---------------------------------
>  Contacts
> jbonofre@apache.org
> jb@nanthrax.net
> ---------------------------------
>  OpenSource
> BuildProcess/AutoDeploy
> http://buildprocess.sourceforge.net
> Apache ServiceMix
> http://servicemix.apache.org
> -----------------------------------
> PGP : 17D4F086
> 
> 


-----
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: http://www.nabble.com/Suggestion-about-packaging-of-osgi-applications-through-features-maven-archetype-%28SMX4%29-tp22245968p22285181.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Suggestion about packaging of osgi applications through features maven archetype (SMX4)

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Charles,

Packaging the non OSGi bundles using bundle-classpath doesn't feed your needs ?

For example, I have written an OSGi bundle that use Hibernate, I have included Hibernate in my OSGi bundle using :

Bundle-ClassPath: ., hibernate.jar

Maven (with BND Felix plugin) managed this without problem. You can use the Include-Resource notation in the MANIFEST too like this :

Include-Resource: lib

In this case, all jar in the lib bundle directory will be included in the bundle.

Like this, the customer deploys only one bundle and all non-bundle dependencies are included.

Maybe, I haven't really understand your requirements.

Regards
JB

On Friday 27 February 2009 - 05:33, cmoulliard wrote:
> 
> Hi,
> 
> I work very hard since a couple of days on SMX4 (kernel, fuse, ... versions)
> and I'm terribly frustrated about the difficulty to package a application
> (bnd, pax construct, ...) top of an OSGI server when we have by example non
> osgi bundles like iText, JasperReport, Hibernate, ... combined with our osgi
> bundles.
> 
> In a development team, the work and workload is distributed between
> different team and developers. In consequence, the packaging of such
> application where we don't EAR, WAR tools is a critical factor that the
> project manager will put in the 'balance' before to take the decision to use
> such technology. Moreover, imagine How you will explain to deployer team of
> big companies (with poor or insufficient knowledge in java, maven, ant, ...
> except maybe if you ask them to copy a file from a folder to another, ...)
> how they will deploy your osgi projects in acceptance and next production
> environment
> 
> This is why I would like to make the following suggestion to help the debate
> about OSGI packaging and distribution.
> 
> Obviously, this idea is based on the features (see file :
> org.apache.servicemix.features.cfg) available under SMX4.
> 
> idea : create a maven archetype with the following goal to :
> 
> - Create features file : will create a src folder with an empty feature.xml
> file. By adding in the pom.xml file the module names of the osgi projects,
> then they will be added to the file as a <feature name="osgi project name">
> and the dependencies are added as <bundle ...>
> 
> Remark : the existing xml syntax of the features can be extended in order to
> generate html pages to document the project (see my comment here : 
> http://fusesource.com/forums/message.jspa?messageID=2005#2005
> http://fusesource.com/forums/message.jspa?messageID=2005#2005 )
> 
> - Update feature file (update features.xml file based on POM.xml
> modification),
> - Install features file (deploy feature.xml in the maven repository)
> - Package osgi bundles defined in the feature file (in an archive like a jar
> or a zip)
> - Deploy package on SMX4 (update the org.apache.servicemix.features.cfg
> config file like we have in Tomcat when we deploy a war of SMX4 and ask the
> server the launch the deployment of the features requested
> - Undeploy package on SMX
> - Update package
> 
> Regards,
> 
> 
> 
> 
> 
> -----
> Charles Moulliard
> SOA Architect
> 
> My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
> -- 
> View this message in context: http://www.nabble.com/Suggestion-about-packaging-of-osgi-applications-through-features-maven-archetype-%28SMX4%29-tp22245968p22245968.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 

-- 
Jean-Baptiste Onofré
---------------------------------
 HomePage
http://www.nanthrax.net
---------------------------------
 Contacts
jbonofre@apache.org
jb@nanthrax.net
---------------------------------
 OpenSource
BuildProcess/AutoDeploy
http://buildprocess.sourceforge.net
Apache ServiceMix
http://servicemix.apache.org
-----------------------------------
PGP : 17D4F086

Re: Suggestion about packaging of osgi applications through features maven archetype (SMX4)

Posted by cmoulliard <cm...@gmail.com>.
jira ticket has been created :
https://issues.apache.org/activemq/browse/SMX4KNL-217


gnodet wrote:
> 
> On Mon, Mar 2, 2009 at 11:01, cmoulliard <cm...@gmail.com> wrote:
>>
>>
>>
>> gnodet wrote:
>>>
>>> 2009/2/27 cmoulliard <cm...@gmail.com>:
>>>>
>>>> Hi,
>>>>
>>>> I work very hard since a couple of days on SMX4 (kernel, fuse, ...
>>>> versions)
>>>> and I'm terribly frustrated about the difficulty to package a
>>>> application
>>>> (bnd, pax construct, ...) top of an OSGI server when we have by example
>>>> non
>>>> osgi bundles like iText, JasperReport, Hibernate, ... combined with our
>>>> osgi
>>>> bundles.
>>>>
>>>> In a development team, the work and workload is distributed between
>>>> different team and developers. In consequence, the packaging of such
>>>> application where we don't EAR, WAR tools is a critical factor that the
>>>> project manager will put in the 'balance' before to take the decision
>>>> to
>>>> use
>>>> such technology. Moreover, imagine How you will explain to deployer
>>>> team
>>>> of
>>>> big companies (with poor or insufficient knowledge in java, maven, ant,
>>>> ...
>>>> except maybe if you ask them to copy a file from a folder to another,
>>>> ...)
>>>> how they will deploy your osgi projects in acceptance and next
>>>> production
>>>> environment
>>>>
>>>> This is why I would like to make the following suggestion to help the
>>>> debate
>>>> about OSGI packaging and distribution.
>>>>
>>>> Obviously, this idea is based on the features (see file :
>>>> org.apache.servicemix.features.cfg) available under SMX4.
>>>>
>>>> idea : create a maven archetype with the following goal to :
>>>>
>>>> - Create features file : will create a src folder with an empty
>>>> feature.xml
>>>> file. By adding in the pom.xml file the module names of the osgi
>>>> projects,
>>>> then they will be added to the file as a <feature name="osgi project
>>>> name">
>>>> and the dependencies are added as <bundle ...>
>>>>
>>>> Remark : the existing xml syntax of the features can be extended in
>>>> order
>>>> to
>>>> generate html pages to document the project (see my comment here :
>>>> http://fusesource.com/forums/message.jspa?messageID=2005#2005
>>>> http://fusesource.com/forums/message.jspa?messageID=2005#2005 )
>>>>
>>>> - Update feature file (update features.xml file based on POM.xml
>>>> modification),
>>>
>>> We already have a maven plugin that does that.
>>>
>>> Question : Does the plugin generates features HTML documentation like I
>>> propose in this message and here :
>>> http://fusesource.com/forums/message.jspa?messageID=2005#2005 ?
> 
> No
> 
>>>
>>>> - Install features file (deploy feature.xml in the maven repository)
>>>
>>> Questions :
>>> - Do you mean : features-maven-plugin located here :
>>> https://svn.apache.org/repos/asf/servicemix/maven-plugins/features-maven-plugin/trunk
>>> ?
> 
> yes
> 
>>> - Is there a wiki page describing the goals / usage of this plugin ?
> 
> no
> 
>>> Yeah, this is just a matter of adding the needed configuration for the
>>> build-helper-maven-plugin
>>>
>>> Question : What is this plugin and the goals/usage provided ?
> 
> http://mojo.codehaus.org/build-helper-maven-plugin/
> That's the one we use to upload the features descriptors in the maven
> repo as part of the build
> 
> In all cases, I did not intend to mean that there was no work to do,
> just that we already do some of it in our own builds.
> But definitely, we should enhance the maven plugin to support
> deployment / undeployment of features, and create a few archetypes:
>   * one for creating a custom smx kernel distribution + a set of
> features (like what we do for our distributions)
>   * one for creating a feature descriptor automatically generated
> using the maven plugin we already have + upload in the maven repo
>   * one for creating a manually written feature descriptor + upload in
> the maven repo
> The two last archetypes should reference our maven plugin so that they
> could be easily installed / uninstalled to a running (or not) smx4
> kernel instance using maven.
> 
> Wanna raise a JIRA for those things ?
> 
>>>> - Package osgi bundles defined in the feature file (in an archive like
>>>> a
>>>> jar
>>>> or a zip)
>>>
>>> I suppose this would be using the maven assembly plugin, right ?
>>>
>>> Yes. Don't reinvent the wheel
>>>
>>>>
>>>
>>>> - Deploy package on SMX4 (update the org.apache.servicemix.features.cfg
>>>> config file like we have in Tomcat when we deploy a war of SMX4 and ask
>>>> the
>>>> server the launch the deployment of the features requested
>>>
>>> I've just added support for auto depoyment of features descriptors in
>>> servicemix kernel,
>>> see https://issues.apache.org/activemq/browse/SMX4KNL-214
>>>
>>>> - Undeploy package on SMX
>>>
>>> Removing the feature descriptor from the deploy folder should do the
>>> trick.
>>> I guess we could also use JMX or SSH to install / uninstall the feature.
>>>
>>>> - Update package
>>>>
>>>> Regards,
>>>
>>> Overall, sounds a really good idea.
>>> I usually tend to copy / paste the pom instead of using maven
>>> archetypes, but I understand this require a bit more knowledge about
>>> how this all works.  Wanna raise a JIRA for that ?
>>>
>>> Personally, I think that this is a good idea/opportunity to create a
>>> ticket (name : packaging and deployment) about the points discussed
>>> here.
>>> SMX4 matures every day but If we want that company uses it,
>>> administration
>>> tools must be provided and documented for developer/builder and
>>> deployment
>>> team.
>>>
>>> Regards,
>>>
>>> Charles
>>>
>>>>
>>>>
>>>>
>>>>
>>>> -----
>>>> Charles Moulliard
>>>> SOA Architect
>>>>
>>>> My Blog :  http://cmoulliard.blogspot.com/
>>>> http://cmoulliard.blogspot.com/
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Suggestion-about-packaging-of-osgi-applications-through-features-maven-archetype-%28SMX4%29-tp22245968p22245968.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>> ------------------------
>>> Open Source SOA
>>> http://fusesource.com
>>>
>>>
>>
>>
>> -----
>> Charles Moulliard
>> SOA Architect
>>
>> My Blog :  http://cmoulliard.blogspot.com/
>> http://cmoulliard.blogspot.com/
>> --
>> View this message in context:
>> http://www.nabble.com/Suggestion-about-packaging-of-osgi-applications-through-features-maven-archetype-%28SMX4%29-tp22245968p22284789.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> 
> 


-----
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: http://www.nabble.com/Suggestion-about-packaging-of-osgi-applications-through-features-maven-archetype-%28SMX4%29-tp22245968p22285747.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Suggestion about packaging of osgi applications through features maven archetype (SMX4)

Posted by Guillaume Nodet <gn...@gmail.com>.
On Mon, Mar 2, 2009 at 11:01, cmoulliard <cm...@gmail.com> wrote:
>
>
>
> gnodet wrote:
>>
>> 2009/2/27 cmoulliard <cm...@gmail.com>:
>>>
>>> Hi,
>>>
>>> I work very hard since a couple of days on SMX4 (kernel, fuse, ...
>>> versions)
>>> and I'm terribly frustrated about the difficulty to package a application
>>> (bnd, pax construct, ...) top of an OSGI server when we have by example
>>> non
>>> osgi bundles like iText, JasperReport, Hibernate, ... combined with our
>>> osgi
>>> bundles.
>>>
>>> In a development team, the work and workload is distributed between
>>> different team and developers. In consequence, the packaging of such
>>> application where we don't EAR, WAR tools is a critical factor that the
>>> project manager will put in the 'balance' before to take the decision to
>>> use
>>> such technology. Moreover, imagine How you will explain to deployer team
>>> of
>>> big companies (with poor or insufficient knowledge in java, maven, ant,
>>> ...
>>> except maybe if you ask them to copy a file from a folder to another,
>>> ...)
>>> how they will deploy your osgi projects in acceptance and next production
>>> environment
>>>
>>> This is why I would like to make the following suggestion to help the
>>> debate
>>> about OSGI packaging and distribution.
>>>
>>> Obviously, this idea is based on the features (see file :
>>> org.apache.servicemix.features.cfg) available under SMX4.
>>>
>>> idea : create a maven archetype with the following goal to :
>>>
>>> - Create features file : will create a src folder with an empty
>>> feature.xml
>>> file. By adding in the pom.xml file the module names of the osgi
>>> projects,
>>> then they will be added to the file as a <feature name="osgi project
>>> name">
>>> and the dependencies are added as <bundle ...>
>>>
>>> Remark : the existing xml syntax of the features can be extended in order
>>> to
>>> generate html pages to document the project (see my comment here :
>>> http://fusesource.com/forums/message.jspa?messageID=2005#2005
>>> http://fusesource.com/forums/message.jspa?messageID=2005#2005 )
>>>
>>> - Update feature file (update features.xml file based on POM.xml
>>> modification),
>>
>> We already have a maven plugin that does that.
>>
>> Question : Does the plugin generates features HTML documentation like I
>> propose in this message and here :
>> http://fusesource.com/forums/message.jspa?messageID=2005#2005 ?

No

>>
>>> - Install features file (deploy feature.xml in the maven repository)
>>
>> Questions :
>> - Do you mean : features-maven-plugin located here :
>> https://svn.apache.org/repos/asf/servicemix/maven-plugins/features-maven-plugin/trunk
>> ?

yes

>> - Is there a wiki page describing the goals / usage of this plugin ?

no

>> Yeah, this is just a matter of adding the needed configuration for the
>> build-helper-maven-plugin
>>
>> Question : What is this plugin and the goals/usage provided ?

http://mojo.codehaus.org/build-helper-maven-plugin/
That's the one we use to upload the features descriptors in the maven
repo as part of the build

In all cases, I did not intend to mean that there was no work to do,
just that we already do some of it in our own builds.
But definitely, we should enhance the maven plugin to support
deployment / undeployment of features, and create a few archetypes:
  * one for creating a custom smx kernel distribution + a set of
features (like what we do for our distributions)
  * one for creating a feature descriptor automatically generated
using the maven plugin we already have + upload in the maven repo
  * one for creating a manually written feature descriptor + upload in
the maven repo
The two last archetypes should reference our maven plugin so that they
could be easily installed / uninstalled to a running (or not) smx4
kernel instance using maven.

Wanna raise a JIRA for those things ?

>>> - Package osgi bundles defined in the feature file (in an archive like a
>>> jar
>>> or a zip)
>>
>> I suppose this would be using the maven assembly plugin, right ?
>>
>> Yes. Don't reinvent the wheel
>>
>>>
>>
>>> - Deploy package on SMX4 (update the org.apache.servicemix.features.cfg
>>> config file like we have in Tomcat when we deploy a war of SMX4 and ask
>>> the
>>> server the launch the deployment of the features requested
>>
>> I've just added support for auto depoyment of features descriptors in
>> servicemix kernel,
>> see https://issues.apache.org/activemq/browse/SMX4KNL-214
>>
>>> - Undeploy package on SMX
>>
>> Removing the feature descriptor from the deploy folder should do the
>> trick.
>> I guess we could also use JMX or SSH to install / uninstall the feature.
>>
>>> - Update package
>>>
>>> Regards,
>>
>> Overall, sounds a really good idea.
>> I usually tend to copy / paste the pom instead of using maven
>> archetypes, but I understand this require a bit more knowledge about
>> how this all works.  Wanna raise a JIRA for that ?
>>
>> Personally, I think that this is a good idea/opportunity to create a
>> ticket (name : packaging and deployment) about the points discussed here.
>> SMX4 matures every day but If we want that company uses it, administration
>> tools must be provided and documented for developer/builder and deployment
>> team.
>>
>> Regards,
>>
>> Charles
>>
>>>
>>>
>>>
>>>
>>> -----
>>> Charles Moulliard
>>> SOA Architect
>>>
>>> My Blog :  http://cmoulliard.blogspot.com/
>>> http://cmoulliard.blogspot.com/
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Suggestion-about-packaging-of-osgi-applications-through-features-maven-archetype-%28SMX4%29-tp22245968p22245968.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> ------------------------
>> Open Source SOA
>> http://fusesource.com
>>
>>
>
>
> -----
> Charles Moulliard
> SOA Architect
>
> My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
> --
> View this message in context: http://www.nabble.com/Suggestion-about-packaging-of-osgi-applications-through-features-maven-archetype-%28SMX4%29-tp22245968p22284789.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Suggestion about packaging of osgi applications through features maven archetype (SMX4)

Posted by cmoulliard <cm...@gmail.com>.


gnodet wrote:
> 
> 2009/2/27 cmoulliard <cm...@gmail.com>:
>>
>> Hi,
>>
>> I work very hard since a couple of days on SMX4 (kernel, fuse, ...
>> versions)
>> and I'm terribly frustrated about the difficulty to package a application
>> (bnd, pax construct, ...) top of an OSGI server when we have by example
>> non
>> osgi bundles like iText, JasperReport, Hibernate, ... combined with our
>> osgi
>> bundles.
>>
>> In a development team, the work and workload is distributed between
>> different team and developers. In consequence, the packaging of such
>> application where we don't EAR, WAR tools is a critical factor that the
>> project manager will put in the 'balance' before to take the decision to
>> use
>> such technology. Moreover, imagine How you will explain to deployer team
>> of
>> big companies (with poor or insufficient knowledge in java, maven, ant,
>> ...
>> except maybe if you ask them to copy a file from a folder to another,
>> ...)
>> how they will deploy your osgi projects in acceptance and next production
>> environment
>>
>> This is why I would like to make the following suggestion to help the
>> debate
>> about OSGI packaging and distribution.
>>
>> Obviously, this idea is based on the features (see file :
>> org.apache.servicemix.features.cfg) available under SMX4.
>>
>> idea : create a maven archetype with the following goal to :
>>
>> - Create features file : will create a src folder with an empty
>> feature.xml
>> file. By adding in the pom.xml file the module names of the osgi
>> projects,
>> then they will be added to the file as a <feature name="osgi project
>> name">
>> and the dependencies are added as <bundle ...>
>>
>> Remark : the existing xml syntax of the features can be extended in order
>> to
>> generate html pages to document the project (see my comment here :
>> http://fusesource.com/forums/message.jspa?messageID=2005#2005
>> http://fusesource.com/forums/message.jspa?messageID=2005#2005 )
>>
>> - Update feature file (update features.xml file based on POM.xml
>> modification),
> 
> We already have a maven plugin that does that.
> 
> Question : Does the plugin generates features HTML documentation like I
> propose in this message and here :
> http://fusesource.com/forums/message.jspa?messageID=2005#2005 ?
> 
>> - Install features file (deploy feature.xml in the maven repository)
> 
> Questions : 
> - Do you mean : features-maven-plugin located here :
> https://svn.apache.org/repos/asf/servicemix/maven-plugins/features-maven-plugin/trunk 
> ?
> - Is there a wiki page describing the goals / usage of this plugin ?
> 
> Yeah, this is just a matter of adding the needed configuration for the
> build-helper-maven-plugin
> 
> Question : What is this plugin and the goals/usage provided ?
> 
>> - Package osgi bundles defined in the feature file (in an archive like a
>> jar
>> or a zip)
> 
> I suppose this would be using the maven assembly plugin, right ?
> 
> Yes. Don't reinvent the wheel
> 
>> 
> 
>> - Deploy package on SMX4 (update the org.apache.servicemix.features.cfg
>> config file like we have in Tomcat when we deploy a war of SMX4 and ask
>> the
>> server the launch the deployment of the features requested
> 
> I've just added support for auto depoyment of features descriptors in
> servicemix kernel,
> see https://issues.apache.org/activemq/browse/SMX4KNL-214
> 
>> - Undeploy package on SMX
> 
> Removing the feature descriptor from the deploy folder should do the
> trick.
> I guess we could also use JMX or SSH to install / uninstall the feature.
> 
>> - Update package
>>
>> Regards,
> 
> Overall, sounds a really good idea.
> I usually tend to copy / paste the pom instead of using maven
> archetypes, but I understand this require a bit more knowledge about
> how this all works.  Wanna raise a JIRA for that ?
> 
> Personally, I think that this is a good idea/opportunity to create a
> ticket (name : packaging and deployment) about the points discussed here.
> SMX4 matures every day but If we want that company uses it, administration
> tools must be provided and documented for developer/builder and deployment
> team.
> 
> Regards,
> 
> Charles
> 
>>
>>
>>
>>
>> -----
>> Charles Moulliard
>> SOA Architect
>>
>> My Blog :  http://cmoulliard.blogspot.com/
>> http://cmoulliard.blogspot.com/
>> --
>> View this message in context:
>> http://www.nabble.com/Suggestion-about-packaging-of-osgi-applications-through-features-maven-archetype-%28SMX4%29-tp22245968p22245968.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> 
> 


-----
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: http://www.nabble.com/Suggestion-about-packaging-of-osgi-applications-through-features-maven-archetype-%28SMX4%29-tp22245968p22284789.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Suggestion about packaging of osgi applications through features maven archetype (SMX4)

Posted by Guillaume Nodet <gn...@gmail.com>.
2009/2/27 cmoulliard <cm...@gmail.com>:
>
> Hi,
>
> I work very hard since a couple of days on SMX4 (kernel, fuse, ... versions)
> and I'm terribly frustrated about the difficulty to package a application
> (bnd, pax construct, ...) top of an OSGI server when we have by example non
> osgi bundles like iText, JasperReport, Hibernate, ... combined with our osgi
> bundles.
>
> In a development team, the work and workload is distributed between
> different team and developers. In consequence, the packaging of such
> application where we don't EAR, WAR tools is a critical factor that the
> project manager will put in the 'balance' before to take the decision to use
> such technology. Moreover, imagine How you will explain to deployer team of
> big companies (with poor or insufficient knowledge in java, maven, ant, ...
> except maybe if you ask them to copy a file from a folder to another, ...)
> how they will deploy your osgi projects in acceptance and next production
> environment
>
> This is why I would like to make the following suggestion to help the debate
> about OSGI packaging and distribution.
>
> Obviously, this idea is based on the features (see file :
> org.apache.servicemix.features.cfg) available under SMX4.
>
> idea : create a maven archetype with the following goal to :
>
> - Create features file : will create a src folder with an empty feature.xml
> file. By adding in the pom.xml file the module names of the osgi projects,
> then they will be added to the file as a <feature name="osgi project name">
> and the dependencies are added as <bundle ...>
>
> Remark : the existing xml syntax of the features can be extended in order to
> generate html pages to document the project (see my comment here :
> http://fusesource.com/forums/message.jspa?messageID=2005#2005
> http://fusesource.com/forums/message.jspa?messageID=2005#2005 )
>
> - Update feature file (update features.xml file based on POM.xml
> modification),

We already have a maven plugin that does that.

> - Install features file (deploy feature.xml in the maven repository)

Yeah, this is just a matter of adding the needed configuration for the
build-helper-maven-plugin

> - Package osgi bundles defined in the feature file (in an archive like a jar
> or a zip)

I suppose this would be using the maven assembly plugin, right ?

> - Deploy package on SMX4 (update the org.apache.servicemix.features.cfg
> config file like we have in Tomcat when we deploy a war of SMX4 and ask the
> server the launch the deployment of the features requested

I've just added support for auto depoyment of features descriptors in
servicemix kernel,
see https://issues.apache.org/activemq/browse/SMX4KNL-214

> - Undeploy package on SMX

Removing the feature descriptor from the deploy folder should do the trick.
I guess we could also use JMX or SSH to install / uninstall the feature.

> - Update package
>
> Regards,

Overall, sounds a really good idea.
I usually tend to copy / paste the pom instead of using maven
archetypes, but I understand this require a bit more knowledge about
how this all works.  Wanna raise a JIRA for that ?

>
>
>
>
> -----
> Charles Moulliard
> SOA Architect
>
> My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
> --
> View this message in context: http://www.nabble.com/Suggestion-about-packaging-of-osgi-applications-through-features-maven-archetype-%28SMX4%29-tp22245968p22245968.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com