Re: Bundle dependencies in prod env
The deployment packaging does not have to be tied to the release cycle / code management. Think about the simple use case where you implement a public interface: you don't release the API (it may never change), but you're still free to embed the API in your bundle or not. Also, the use case for embedding a package which is exported is different than embedding a package which is private. 2018-01-05 5:44 GMT+01:00 Francois Papon: > Hi, > > I think it's better to separate bundle interface and bundle > implementation, you can have many implementations of the same interface > (like OSGi specifications) and you can release a new implementation > version without release the api version. Generally, implementations > bundles are releases more frequently than interfaces bundles, but this > is my understanding :) > > François > > > Le 05/01/2018 à 02:46, David Jencks a écrit : > > Why do you advise that fat bundles should be avoided? My current idea of > good osgi design is to only export service interfaces, and generally > package the interfaces with the implementations; since jarA and libA aren’t > even bundles they are good candidates for hiding inside bundleA since they > are quite unlikely to contain both exported interfaces and osgi-usable > implementations. > > > > Thanks > > David Jencks > > > > Sent from my iPhone > > > >> On Jan 4, 2018, at 9:21 AM, Jean-Baptiste Onofré > wrote: > >> > >> Did you check your import/export ? > >> > >> Creating a uber bundle is also an option, but fat bundles should be > avoided. > >> > >> Regards > >> JB > >> > >>> On 01/04/2018 06:18 PM, GFO wrote: > >>> Hi, > >>> Thanks for your answer. > >>> I have tried to create a kar file: my bundle does not find some > dependencies > >>> although dependencies are started as bundles. > >>> I have the following dependencies: > >>> BundleA (mine) depends on jarA (mine) which depends on libA (third > party). > >>> jarA and libA are wrapped as bundles in Karaf. > >>> BundleA finds the jarA but BundleA tell me it does not find libA > (class not > >>> found). Why does BundleA do not find libA by itself? > >>> Another question: what about embeding all the jars in the bundle > instead of > >>> creating a feature (for instance via maven-bundle-plugin and > >>> Embed-Dependency directive)? Does it make a big difference? > >>> Thanks > >>> GFO > >>> -- > >>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html > >> -- > >> Jean-Baptiste Onofré > >> jbono...@apache.org > >> http://blog.nanthrax.net > >> Talend - http://www.talend.com > > -- Guillaume Nodet
Re: Bundle dependencies in prod env
Hi, I think it's better to separate bundle interface and bundle implementation, you can have many implementations of the same interface (like OSGi specifications) and you can release a new implementation version without release the api version. Generally, implementations bundles are releases more frequently than interfaces bundles, but this is my understanding :) François Le 05/01/2018 à 02:46, David Jencks a écrit : > Why do you advise that fat bundles should be avoided? My current idea of good > osgi design is to only export service interfaces, and generally package the > interfaces with the implementations; since jarA and libA aren’t even bundles > they are good candidates for hiding inside bundleA since they are quite > unlikely to contain both exported interfaces and osgi-usable implementations. > > Thanks > David Jencks > > Sent from my iPhone > >> On Jan 4, 2018, at 9:21 AM, Jean-Baptiste Onofréwrote: >> >> Did you check your import/export ? >> >> Creating a uber bundle is also an option, but fat bundles should be avoided. >> >> Regards >> JB >> >>> On 01/04/2018 06:18 PM, GFO wrote: >>> Hi, >>> Thanks for your answer. >>> I have tried to create a kar file: my bundle does not find some dependencies >>> although dependencies are started as bundles. >>> I have the following dependencies: >>> BundleA (mine) depends on jarA (mine) which depends on libA (third party). >>> jarA and libA are wrapped as bundles in Karaf. >>> BundleA finds the jarA but BundleA tell me it does not find libA (class not >>> found). Why does BundleA do not find libA by itself? >>> Another question: what about embeding all the jars in the bundle instead of >>> creating a feature (for instance via maven-bundle-plugin and >>> Embed-Dependency directive)? Does it make a big difference? >>> Thanks >>> GFO >>> -- >>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html >> -- >> Jean-Baptiste Onofré >> jbono...@apache.org >> http://blog.nanthrax.net >> Talend - http://www.talend.com
Re: Bundle dependencies in prod env
Why do you advise that fat bundles should be avoided? My current idea of good osgi design is to only export service interfaces, and generally package the interfaces with the implementations; since jarA and libA aren’t even bundles they are good candidates for hiding inside bundleA since they are quite unlikely to contain both exported interfaces and osgi-usable implementations. Thanks David Jencks Sent from my iPhone > On Jan 4, 2018, at 9:21 AM, Jean-Baptiste Onofréwrote: > > Did you check your import/export ? > > Creating a uber bundle is also an option, but fat bundles should be avoided. > > Regards > JB > >> On 01/04/2018 06:18 PM, GFO wrote: >> Hi, >> Thanks for your answer. >> I have tried to create a kar file: my bundle does not find some dependencies >> although dependencies are started as bundles. >> I have the following dependencies: >> BundleA (mine) depends on jarA (mine) which depends on libA (third party). >> jarA and libA are wrapped as bundles in Karaf. >> BundleA finds the jarA but BundleA tell me it does not find libA (class not >> found). Why does BundleA do not find libA by itself? >> Another question: what about embeding all the jars in the bundle instead of >> creating a feature (for instance via maven-bundle-plugin and >> Embed-Dependency directive)? Does it make a big difference? >> Thanks >> GFO >> -- >> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html > > -- > Jean-Baptiste Onofré > jbono...@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com
Re: Bundle dependencies in prod env
Did you check your import/export ? Creating a uber bundle is also an option, but fat bundles should be avoided. Regards JB On 01/04/2018 06:18 PM, GFO wrote: Hi, Thanks for your answer. I have tried to create a kar file: my bundle does not find some dependencies although dependencies are started as bundles. I have the following dependencies: BundleA (mine) depends on jarA (mine) which depends on libA (third party). jarA and libA are wrapped as bundles in Karaf. BundleA finds the jarA but BundleA tell me it does not find libA (class not found). Why does BundleA do not find libA by itself? Another question: what about embeding all the jars in the bundle instead of creating a feature (for instance via maven-bundle-plugin and Embed-Dependency directive)? Does it make a big difference? Thanks GFO -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Bundle dependencies in prod env
Hi, Thanks for your answer. I have tried to create a kar file: my bundle does not find some dependencies although dependencies are started as bundles. I have the following dependencies: BundleA (mine) depends on jarA (mine) which depends on libA (third party). jarA and libA are wrapped as bundles in Karaf. BundleA finds the jarA but BundleA tell me it does not find libA (class not found). Why does BundleA do not find libA by itself? Another question: what about embeding all the jars in the bundle instead of creating a feature (for instance via maven-bundle-plugin and Embed-Dependency directive)? Does it make a big difference? Thanks GFO -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Re: Bundle dependencies in prod env
Hi, 1/ If you really want a zip file, then take a kar. If you want to work with a repo, feature is better. 2/ It's possible using fileinstall and specifying your folder 3/ Cave can be an option too (with Bundle Repository). Regards JB On 01/04/2018 12:05 PM, GFO wrote: Hello, I have a question about dependencies in Karaf. I have a bundle which contains a lot of dependencies: - jars created by me - third party jars Those dependencies may have transitive dependencies. To deploy my application in a production environment I would like a zip file which contains my bundle and all its dependencies. What is the best way to achieve that? 1/ A kar file which contains a feature.xml file? And wrap every non-OSGi dependency (more than 50 dependencies...) ? 2/ A basic zip file which contains my bundle and my libs in another directory? In this case, how can I tell Karaf to look at the "lib directory" to resolve dependencies for my bundle ? 3/ Another solution? Thanks a lot, GFO -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Bundle dependencies in prod env
Hello, I have a question about dependencies in Karaf. I have a bundle which contains a lot of dependencies: - jars created by me - third party jars Those dependencies may have transitive dependencies. To deploy my application in a production environment I would like a zip file which contains my bundle and all its dependencies. What is the best way to achieve that? 1/ A kar file which contains a feature.xml file? And wrap every non-OSGi dependency (more than 50 dependencies...) ? 2/ A basic zip file which contains my bundle and my libs in another directory? In this case, how can I tell Karaf to look at the "lib directory" to resolve dependencies for my bundle ? 3/ Another solution? Thanks a lot, GFO -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
assembly : bundle + dependencies?
Jean-Baptiste: 1) thank you for a great post: http://blog.nanthrax.net/2011/12/do-you-know-the-apache-karaf-maven-plugins/ 2) in your example, you use packagingpom/packaging to use pom as descriptor document for other feature(s) assembly; 3) I am trying to follow your post and to create feature for packagingbundle/packaging so it will include in the final feature.xml and in the target/assembly folder both its own bundle jar and also this' bundle dependencies; so in my case project pom is a self-descriptor document : self bundle + dependencies; I get both self bundle entry and dependency entires OK in the final feature.xml I also get all the dependencies jar OK in the target/assembly, but the main self bundle jar is missing form target/assembly :-) can you please let me know which obvious setting do I miss for karaf-maven-plugin / maven-bundle-plugin? probably you cold link to a working example somewhere? 4) the intent of this exercise is to be able to produce a) feature.xml b) maven-standard-layout assembly of main bundle jar plus all dependency bundle jars for deployment to s3 via https://github.com/jcaddel/maven-s3-wagon Thank you, Andrei
Re: assembly : bundle + dependencies?
Hi Andrei, I'm stuck with a customer this morning, I will get back to you asap. Regards JB On 02/09/2012 04:50 AM, Andrei Pozolotin wrote: Jean-Baptiste: 1) thank you for a great post: http://blog.nanthrax.net/2011/12/do-you-know-the-apache-karaf-maven-plugins/ 2) in your example, you use packagingpom/packaging to use pom as descriptor document for other feature(s) assembly; 3) I am trying to follow your post and to create feature for packagingbundle/packaging so it will include in the final feature.xml and in the target/assembly folder both its own bundle jar and also this' bundle dependencies; so in my case project pom is a self-descriptor document : self bundle + dependencies; I get both self bundle entry and dependency entires OK in the final feature.xml I also get all the dependencies jar OK in the target/assembly, but the main self bundle jar is missing form target/assembly :-) can you please let me know which obvious setting do I miss for karaf-maven-plugin / maven-bundle-plugin? probably you cold link to a working example somewhere? 4) the intent of this exercise is to be able to produce a) feature.xml b) maven-standard-layout assembly of main bundle jar plus all dependency bundle jars for deployment to s3 via https://github.com/jcaddel/maven-s3-wagon Thank you, Andrei -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Bundle dependencies
Hey Fulco, Short answer: The clean way to go here is to define all bundles required in your features.xml. Everything else could generate a GREAT mess, because (for example) not all deps have to be osginized, not all deps import versions correctly (which leads to some problems since transitive dependencies could pull in various versions of the same bundles into Karaf) and several other issues... Kind regards, Andreas On Fri, Jun 10, 2011 at 12:29 PM, Houkes, Fulco fulco.hou...@efgbank.com wrote: Hi folks, I’m relatively new to Karaf and I’m struggling since a few days about solving a problem of dependencies. I don’t know if I’m doing something wrong, if it’s a proxy issue or if it’s not handled by Karaf Provisioning. I didn’t found any previous post about this in the mailing list. My problem is that I’m building a custom bundle, which I can successfully deploy in Karaf, but the dependencies of this bundle aren’t deployed and the bundle won’t start. I tried to make a feature of this bundle by adding the direct dependencies as bundlemvn:…./bundle entries. All these dependencies are deployed now in the system/ repo, however the dependencies of the dependencies are not deployed. This will be a recurrent issue until reaching the end of the dependencies chain. Do I have to include all dependencies (and all dependencies of dependencies of…) as a bundlemvn:…./bundle entry in my feature description? Or did I overlooked a way to do it automatically? Or should Karaf automatically try do get those dependencies from the MVN repositories defined in the ‘org.ops4j.pax.url.mvn.repositories’ property? Many thanks in advance for any help :) Cheers, Fulco For information, I’m using Karaf 2.2.1 and Maven 3 for my project. My bundle’s POM contains the following dependencies: dependencies dependency groupIdorg.springframework.ldap/groupId artifactIdorg.springframework.ldap/artifactId version1.3.0.RELEASE /version /dependency dependency groupIdcom.thoughtworks.xstream/groupId artifactIdcom.springsource.com.thoughtworks.xstream/artifactId version 1.3.1 /version /dependency /dependencies And the JAR file is build by the maven-bundle-plugin, configured like plugin groupIdorg.apache.felix/groupId artifactIdmaven-bundle-plugin/artifactId extensionstrue/extensions configuration instructions Bundle-SymbolicName${bundle.symbolicName}/Bundle-SymbolicName Bundle-Version${project.version}/Bundle-Version Export-Package${bundle.namespace}.*;version=${project.version}/Export-Package /instructions /configuration /plugin I followed the Custom distribution guide. The feature-maven-plugin configuration looks like: plugin groupIdorg.apache.karaf.tooling/groupId artifactIdfeatures-maven-plugin/artifactId executions execution idadd-features-to-repo/id phasegenerate-resources/phase goals goaladd-features-to-repo/goal /goals configuration descriptors descriptormvn:org.apache.karaf.assemblies.features/standard/2.2.1/xml/features/descriptor descriptormvn:com.myapps/features/${myapps.release}/xml/features/descriptor /descriptors features featureconfig/feature featuressh/feature featuremanagement/feature featurejetty/feature featurewebconsole/feature featurewar/feature featurespring/feature featurespring-web/feature featurespring-dm/feature featurespring-dm-web/feature featuremy-custom-bundle/feature /features includeMvnBasedDescriptorstrue/includeMvnBasedDescriptors repositorytarget/features-repo/repository addTransitiveFeaturestrue/addTransitiveFeatures /configuration /execution /executions /plugin I tried to add the includeMvnBasedDescriptors and addTransitiveFeatures tags, but it doesn’t seem to fix the problem. I also customized the org.ops4j.pax.ulr.mvn.cfg file, so that the proxy support is enabled and that the ‘org.ops4j.pax.url.mvn.settings’ and ‘org.ops4j.pax.url.mvn.localRepository’ properties are correctly set to my local repository and maven settings (where my proxy is defined). My feature description looks like: feature name=myFeature version=${myapps.release} resolver=(orb) bundlemvn:org.springframework.ldap/org.springframework.ldap/1.3.0.RELEASE /bundle bundlemvn:com.thoughtworks.xstream/com.springsource.com.thoughtworks.xstream/1.3.1/bundle bundlemvn:com.myapps/myapps/${myapps.release}/bundle /feature The EFG Mail Gateway made the following
RE: Bundle dependencies
Andreas, Thanks a lot for the quick answer, I appreciate! In a short time I guess I've no other choice to add all dependencies in the features descriptions. I understand that for a single custom bundle it's important to keep control of all dependencies. However, for bigger projects like a custom distribution of Karaf with a bunch of home-developed bundles, it would be nice to have an automatic way for enumerating all needed JAR libs as it's the case when building a WAR project. Keeping track of all dependencies and sub dependencies of all project's bundles might quickly become a nightmare. Is there any project (I'm not aware of) or planned development (maven build plugin) for providing such capabilities? Cheers, Fulco -Original Message- From: Andreas Pieber [mailto:anpie...@gmail.com] Sent: vendredi, 10. juin 2011 12:40 To: user@karaf.apache.org Subject: Re: Bundle dependencies Hey Fulco, Short answer: The clean way to go here is to define all bundles required in your features.xml. Everything else could generate a GREAT mess, because (for example) not all deps have to be osginized, not all deps import versions correctly (which leads to some problems since transitive dependencies could pull in various versions of the same bundles into Karaf) and several other issues... Kind regards, Andreas On Fri, Jun 10, 2011 at 12:29 PM, Houkes, Fulco fulco.hou...@efgbank.com wrote: Hi folks, I'm relatively new to Karaf and I'm struggling since a few days about solving a problem of dependencies. I don't know if I'm doing something wrong, if it's a proxy issue or if it's not handled by Karaf Provisioning. I didn't found any previous post about this in the mailing list. My problem is that I'm building a custom bundle, which I can successfully deploy in Karaf, but the dependencies of this bundle aren't deployed and the bundle won't start. I tried to make a feature of this bundle by adding the direct dependencies as bundlemvn:/bundle entries. All these dependencies are deployed now in the system/ repo, however the dependencies of the dependencies are not deployed. This will be a recurrent issue until reaching the end of the dependencies chain. Do I have to include all dependencies (and all dependencies of dependencies of...) as a bundlemvn:/bundle entry in my feature description? Or did I overlooked a way to do it automatically? Or should Karaf automatically try do get those dependencies from the MVN repositories defined in the 'org.ops4j.pax.url.mvn.repositories' property? Many thanks in advance for any help :) Cheers, Fulco For information, I'm using Karaf 2.2.1 and Maven 3 for my project. My bundle's POM contains the following dependencies: dependencies dependency groupIdorg.springframework.ldap/groupId artifactIdorg.springframework.ldap/artifactId version1.3.0.RELEASE /version /dependency dependency groupIdcom.thoughtworks.xstream/groupId artifactIdcom.springsource.com.thoughtworks.xstream/artifactId version 1.3.1 /version /dependency /dependencies And the JAR file is build by the maven-bundle-plugin, configured like plugin groupIdorg.apache.felix/groupId artifactIdmaven-bundle-plugin/artifactId extensionstrue/extensions configuration instructions Bundle-SymbolicName${bundle.symbolicName}/Bundle-SymbolicName Bundle-Version${project.version}/Bundle-Version Export-Package${bundle.namespace}.*;version=${project.version}/Ex port-Package /instructions /configuration /plugin I followed the Custom distribution guide. The feature-maven-plugin configuration looks like: plugin groupIdorg.apache.karaf.tooling/groupId artifactIdfeatures-maven-plugin/artifactId executions execution idadd-features-to-repo/id phasegenerate-resources/phase goals goaladd-features-to-repo/goal /goals configuration descriptors descriptormvn:org.apache.karaf.assemblies.features/standard/2.2.1/xm l/features/descriptor descriptormvn:com.myapps/features/${myapps.release}/xml/features/de scriptor /descriptors features featureconfig/feature featuressh/feature featuremanagement/feature featurejetty/feature featurewebconsole/feature featurewar/feature featurespring/feature featurespring-web/feature featurespring-dm/feature featurespring-dm-web/feature featuremy-custom-bundle/feature /features includeMvnBasedDescriptorstrue/includeMvnBasedDescriptors repositorytarget/features-repo
Re: Bundle dependencies
Well, there are two goals in the Karaf Maven Plugin which might do what you want ([1] and [2]). Please check if they do what you like. I've never used them but they should be able to automatically generate the feature files including dependencies. Kind regards, Andreas [1] http://svn.apache.org/repos/asf/karaf/tags/karaf-2.2.1/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesFileMojo.java [2] http://svn.apache.org/repos/asf/karaf/tags/karaf-2.2.1/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojo.java On Fri, Jun 10, 2011 at 3:46 PM, Houkes, Fulco fulco.hou...@efgbank.com wrote: Andreas, Thanks a lot for the quick answer, I appreciate! In a short time I guess I've no other choice to add all dependencies in the features descriptions. I understand that for a single custom bundle it's important to keep control of all dependencies. However, for bigger projects like a custom distribution of Karaf with a bunch of home-developed bundles, it would be nice to have an automatic way for enumerating all needed JAR libs as it's the case when building a WAR project. Keeping track of all dependencies and sub dependencies of all project's bundles might quickly become a nightmare. Is there any project (I'm not aware of) or planned development (maven build plugin) for providing such capabilities? Cheers, Fulco -Original Message- From: Andreas Pieber [mailto:anpie...@gmail.com] Sent: vendredi, 10. juin 2011 12:40 To: user@karaf.apache.org Subject: Re: Bundle dependencies Hey Fulco, Short answer: The clean way to go here is to define all bundles required in your features.xml. Everything else could generate a GREAT mess, because (for example) not all deps have to be osginized, not all deps import versions correctly (which leads to some problems since transitive dependencies could pull in various versions of the same bundles into Karaf) and several other issues... Kind regards, Andreas On Fri, Jun 10, 2011 at 12:29 PM, Houkes, Fulco fulco.hou...@efgbank.com wrote: Hi folks, I'm relatively new to Karaf and I'm struggling since a few days about solving a problem of dependencies. I don't know if I'm doing something wrong, if it's a proxy issue or if it's not handled by Karaf Provisioning. I didn't found any previous post about this in the mailing list. My problem is that I'm building a custom bundle, which I can successfully deploy in Karaf, but the dependencies of this bundle aren't deployed and the bundle won't start. I tried to make a feature of this bundle by adding the direct dependencies as bundlemvn:/bundle entries. All these dependencies are deployed now in the system/ repo, however the dependencies of the dependencies are not deployed. This will be a recurrent issue until reaching the end of the dependencies chain. Do I have to include all dependencies (and all dependencies of dependencies of...) as a bundlemvn:/bundle entry in my feature description? Or did I overlooked a way to do it automatically? Or should Karaf automatically try do get those dependencies from the MVN repositories defined in the 'org.ops4j.pax.url.mvn.repositories' property? Many thanks in advance for any help :) Cheers, Fulco For information, I'm using Karaf 2.2.1 and Maven 3 for my project. My bundle's POM contains the following dependencies: dependencies dependency groupIdorg.springframework.ldap/groupId artifactIdorg.springframework.ldap/artifactId version1.3.0.RELEASE /version /dependency dependency groupIdcom.thoughtworks.xstream/groupId artifactIdcom.springsource.com.thoughtworks.xstream/artifactId version 1.3.1 /version /dependency /dependencies And the JAR file is build by the maven-bundle-plugin, configured like plugin groupIdorg.apache.felix/groupId artifactIdmaven-bundle-plugin/artifactId extensionstrue/extensions configuration instructions Bundle-SymbolicName${bundle.symbolicName}/Bundle-SymbolicName Bundle-Version${project.version}/Bundle-Version Export-Package${bundle.namespace}.*;version=${project.version}/Ex port-Package /instructions /configuration /plugin I followed the Custom distribution guide. The feature-maven-plugin configuration looks like: plugin groupIdorg.apache.karaf.tooling/groupId artifactIdfeatures-maven-plugin/artifactId executions execution idadd-features-to-repo/id phasegenerate-resources/phase goals goaladd-features-to-repo/goal /goals configuration descriptors descriptormvn:org.apache.karaf.assemblies.features/standard/2.2.1/xm l/features/descriptor descriptormvn:com.myapps/features/${myapps.release}/xml/features/de scriptor
Re: Bundle dependencies
Note that those goals have some problems in karaf 2.x (not bugs, but rather by design). This is being worked out for 3.x and auto-generation of features descriptors should be much better. On Fri, Jun 10, 2011 at 16:24, Andreas Pieber anpie...@gmail.com wrote: Well, there are two goals in the Karaf Maven Plugin which might do what you want ([1] and [2]). Please check if they do what you like. I've never used them but they should be able to automatically generate the feature files including dependencies. Kind regards, Andreas [1] http://svn.apache.org/repos/asf/karaf/tags/karaf-2.2.1/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesFileMojo.java [2] http://svn.apache.org/repos/asf/karaf/tags/karaf-2.2.1/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateFeaturesXmlMojo.java On Fri, Jun 10, 2011 at 3:46 PM, Houkes, Fulco fulco.hou...@efgbank.com wrote: Andreas, Thanks a lot for the quick answer, I appreciate! In a short time I guess I've no other choice to add all dependencies in the features descriptions. I understand that for a single custom bundle it's important to keep control of all dependencies. However, for bigger projects like a custom distribution of Karaf with a bunch of home-developed bundles, it would be nice to have an automatic way for enumerating all needed JAR libs as it's the case when building a WAR project. Keeping track of all dependencies and sub dependencies of all project's bundles might quickly become a nightmare. Is there any project (I'm not aware of) or planned development (maven build plugin) for providing such capabilities? Cheers, Fulco -Original Message- From: Andreas Pieber [mailto:anpie...@gmail.com] Sent: vendredi, 10. juin 2011 12:40 To: user@karaf.apache.org Subject: Re: Bundle dependencies Hey Fulco, Short answer: The clean way to go here is to define all bundles required in your features.xml. Everything else could generate a GREAT mess, because (for example) not all deps have to be osginized, not all deps import versions correctly (which leads to some problems since transitive dependencies could pull in various versions of the same bundles into Karaf) and several other issues... Kind regards, Andreas On Fri, Jun 10, 2011 at 12:29 PM, Houkes, Fulco fulco.hou...@efgbank.com wrote: Hi folks, I'm relatively new to Karaf and I'm struggling since a few days about solving a problem of dependencies. I don't know if I'm doing something wrong, if it's a proxy issue or if it's not handled by Karaf Provisioning. I didn't found any previous post about this in the mailing list. My problem is that I'm building a custom bundle, which I can successfully deploy in Karaf, but the dependencies of this bundle aren't deployed and the bundle won't start. I tried to make a feature of this bundle by adding the direct dependencies as bundlemvn:/bundle entries. All these dependencies are deployed now in the system/ repo, however the dependencies of the dependencies are not deployed. This will be a recurrent issue until reaching the end of the dependencies chain. Do I have to include all dependencies (and all dependencies of dependencies of...) as a bundlemvn:/bundle entry in my feature description? Or did I overlooked a way to do it automatically? Or should Karaf automatically try do get those dependencies from the MVN repositories defined in the 'org.ops4j.pax.url.mvn.repositories' property? Many thanks in advance for any help :) Cheers, Fulco For information, I'm using Karaf 2.2.1 and Maven 3 for my project. My bundle's POM contains the following dependencies: dependencies dependency groupIdorg.springframework.ldap/groupId artifactIdorg.springframework.ldap/artifactId version1.3.0.RELEASE /version /dependency dependency groupIdcom.thoughtworks.xstream/groupId artifactIdcom.springsource.com.thoughtworks.xstream/artifactId version 1.3.1 /version /dependency /dependencies And the JAR file is build by the maven-bundle-plugin, configured like plugin groupIdorg.apache.felix/groupId artifactIdmaven-bundle-plugin/artifactId extensionstrue/extensions configuration instructions Bundle-SymbolicName${bundle.symbolicName}/Bundle-SymbolicName Bundle-Version${project.version}/Bundle-Version Export-Package${bundle.namespace}.*;version=${project.version}/Ex port-Package /instructions /configuration /plugin I followed the Custom distribution guide. The feature-maven-plugin configuration looks like: plugin groupIdorg.apache.karaf.tooling/groupId artifactIdfeatures-maven-plugin/artifactId executions execution idadd-features-to-repo/id phasegenerate-resources/phase goals goaladd