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/03/02 11:01:43 UTC

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



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 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