Hi Olivier,

unfortunately, it's not possible to attach file on the Apache mailing lists. Can you share on github or so ?

Thanks,
Regards
JB

On 04/27/2016 05:29 PM, Olivier21 wrote:
Thank you JB,

In attached file, you can see my project. You have to unzip the file in your 
eclipse Workspace.

There is 5 modules :
     - OMEGA_WSREST is the parent module
     - omega-module-kar is the module which allows to generate the kar archive
     - omega-module-dao is the data access module
     - omega-module-jaxrs is the web layer module
     - omega-module-service-metier is the business layer module

In fact, I separated each layer of my Web Service Rest.

In order to create the kar archive, I right-click on the parent project (OMEGA_WSREST) then I choose "Run as" then 
"Maven build" then, in "goals", I type "clean install". It builds one jar by module and at the end, 
it generate a kar file thanks to the module "omega-module-kar".

In fact, I thougt that the only way to install all my bundles and all the 
dependencies in Karaf was to generate a kar archive.

Therefore, if you are a better way to install all my bundle easyly, I would 
like you show me.

Thank you for your help.

Olivier




---- Message d'origine ----
De : jbonofre [via Karaf] <[email protected]>
À : Olivier21 <[email protected]>
Objet : Re: Bundle versioning
Date : 27/04/2016 17:12:14 CEST

Hi Olivier,

sure, if you can share, I can take a look on your project.

Thanks,
Regards
JB

On 04/27/2016 05:10 PM, Olivier21 wrote:

Ok thank you.

I have multiple bundles. In eclipse, it's represented by multiple modules.

I have a parent module and many child modules.
Among these child modules, I have a module which contains a feature xml file
and it's created via the archetype "karaf-feature-archetype".

When I right-click on the parent project then I choose "Run as" then "Maven
build" then, in "goals", I type "clean install", It builds one jar by module
and at the end, it generate a kar file thanks to the module which has been
created via the "karaf-feature-archetype".

The xml feature contains :


<?xml version="1.0" encoding="UTF-8"?>
<features name="${project.artifactId}-${project.version}"
xmlns="http://karaf.apache.org/xmlns/features/v1.3.0";>



<repository>mvn:org.apache.cxf.karaf/apache-cxf/3.1.5/xml/features</repository>

<repository>mvn:org.ops4j.pax.jdbc/pax-jdbc-features/0.7.0/xml/features</repository>


      <feature name='${project.artifactId}' description='${project.name}'
version='${project.version}'>
          <details>${project.description}</details>


<feature version="3.1.5">cxf</feature>



<feature>pax-jdbc</feature>
          <feature>pax-jdbc-config</feature>
          <feature>pax-jdbc-pool-dbcp2</feature>


          <feature>jdbc</feature>

          <feature version="4.3.6.Final">hibernate</feature>
          <feature version="2.3.0">jpa</feature>
          <feature version="1.3.0">transaction</feature>
          <feature version="4.0.4">jndi</feature>


<bundle>mvn:org.postgresql/postgresql/9.4-1203-jdbc41</bundle>

<bundle>mvn:org.osgi/org.osgi.core/6.0.0</bundle>
          <bundle>mvn:commons-logging/commons-logging/1.2</bundle>
          <bundle>mvn:commons-io/commons-io/2.4</bundle>


<bundle>mvn:org.eclipse.persistence/javax.persistence/2.1.1</bundle>


          <bundle>mvn:org.omega.wsrest/omega-module-dao/1.0.0</bundle>

<bundle>mvn:org.omega.wsrest/omega-module-service-metier/1.0.0</bundle>
          <bundle>mvn:org.omega.wsrest/omega-module-jaxrs/1.0.0</bundle>
      </feature>

</features>



Have you a exemple of how to use the generate-descriptor plugin?

Can I send you my project to allow you to better understand What I did?



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Bundle-versioning-tp4046396p4046403.html
Sent from the Karaf - User mailing list archive at Nabble.com.



--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to