Hi JB, Have had any time yet to look at this?
I did and made some changes in a karaf fork. Basically the changes I made are: 1) Split dependency processing into 2 separate phases: - First phase to install kars and feature repositories recursively building a full map of all features present in the installed repositories (fullFeatureMap). - Second run to process features like it was done before building a list of features to be installed (localRepoFeatures). 2) Missing feature dependency handling - Missing features are collected per repository (no longer a global list) - Used a queue rather than a list since added recursive dependent features where not processed. - Added additional feedback/logging to show which features are being processed. 3) Collecting bundles features is simplified. - Check for bundle.isDependency() is removed. IMHO there is no need to filter on dependency is true, since that would actually result in excluding these dependencies from the assembly. - Removed redundant unused check, look for "test" in the original code - reused install() method to do the actual artefact copying. 4) Simplified execute() method by re-factoring stuff into separate methods. These changes can be found at: https://github.com/misl/karaf/blob/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/InstallKarsMojo.java Also I added some TODO's in place where I think things could be improved even more. Should I create a jira issue for this and send in a pull request? Please let me know. Regards, Minto van der Sluis Op 24-9-2013 14:16, Jean-Baptiste Onofré schreef: > Hi Minto, > > thanks for the use case, I will take a look on that. I'm pretty sure > that we fixed something in the Maven plugin around transitive > dependencies. > > I keep you posted. > > Regards > JB > > On 09/24/2013 02:12 PM, Minto van der Sluis wrote: >> Hi JB, >> >> One of my little example application has exactly the same behaviour. The >> example app is available on github >> https://github.com/misl/Samples/tree/master/WicketKaraf >> >> In this app there is a feature dependency on pax-wicket. In the final >> assembly archive the pax-wicket libraries are missing. Still the >> assembly runs just fine (with maven present). >> >> Regards, >> >> Minto >> >> Op 24-9-2013 13:22, Minto van der Sluis schreef: >>> Hi JB, >>> >>> Like this? >>> >>> <feature name="clerezza-jena-tdb" version="0.7.1.36" >>> description="Clarezza Jena TDB components" resolver="(obr)"> >>> <feature version="0.7.1.36">clerezza-jena</feature> >>> <bundle dependency="true" >>> start-level="36">mvn:org.apache.clerezza.ext/org.apache.jena.jena-tdb/1.0.0_1-SNAPSHOT</bundle> >>> >>> <bundle dependency="true" >>> start-level="36">mvn:org.apache.clerezza/rdf.jena.tdb.storage/0.7-SNAPSHOT</bundle> >>> >>> </feature> >>> >>> Doesn't seem to make any difference. >>> >>> Regards, >>> >>> Minto >>> >>> >>> Op 24-9-2013 11:09, Jean-Baptiste Onofré schreef: >>>> Hi Minto, >>>> >>>> can you try to use dependency="true" on the bundle ? >>>> >>>> Regards >>>> JB >>>> >>>> On 09/24/2013 10:58 AM, Minto van der Sluis wrote: >>>>> Hi Folks, >>>>> >>>>> When using Karaf 3.0.0. RC1 I end up with an assembly that does not >>>>> contain all dependencies. All features.xml files are present but >>>>> not all >>>>> bundles mentioned in these features are present. >>>>> >>>>> It almost seems as if bundles from dependent features are missing >>>>> in the >>>>> assembly. Like in the following brief example where "my-features" is >>>>> included in the assembly as bootFeature: >>>>> >>>>> <feature name="other-feature" ...> >>>>> <bundle>mvn:...</bundle> <-- not present in assembly >>>>> </feature> >>>>> >>>>> <feature name="my-features" .... > >>>>> <feature>other-feature</feature> >>>>> <bundle>mvn:.... </bundle> <-- present in assembly >>>>> </feature> >>>>> >>>>> On my development system I did not immediately noticed this >>>>> because the >>>>> bundles could be found by there maven id. However when I installed >>>>> the >>>>> assembly on a system without maven these bundles could not be >>>>> started. >>>>> >>>>> I am probably missing an important detail. What do I need to do to >>>>> get >>>>> these missing bundles in my assembly as well? >>>>> >>>>> Regards, >>>>> >>>>> Minto >>>>> >>>>> >>>>> Assembly build log adding all the feature files: >>>>> >>>>> <snip> >>>>> [INFO] --- karaf-maven-plugin:3.0.0.RC1:install-kars >>>>> (default-install-kars) @ reva-assembly --- >>>>> [INFO] Installing feature >>>>> file:/C:/Dev/src/Werk/Ictu/Digimelding2.0/github/reva/src/reva-assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.0.RC1/framework-3.0.0.RC1-features.xml >>>>> >>>>> >>>>> to system and startup.properties >>>>> [INFO] Adding feature repository to system: >>>>> mvn:org.apache.karaf.features/standard/3.0.0.RC1/xml/features >>>>> [INFO] Adding feature repository to system: >>>>> mvn:org.apache.karaf.features/enterprise/3.0.0.RC1/xml/features >>>>> [INFO] Adding feature repository to system: >>>>> mvn:nl.overheid.stelsel.gba.reva/reva-features/0.1.0-SNAPSHOT/xml/features >>>>> >>>>> >>>>> [INFO] Adding feature repository to system: >>>>> mvn:org.apache.shiro/shiro-features/1.2.2/xml/features >>>>> [INFO] Adding feature repository to system: >>>>> mvn:org.ops4j.pax.wicket/paxwicket/3.0.1/xml/features >>>>> [INFO] Adding feature repository to system: >>>>> mvn:org.ops4j.pax.wicket/features/3.0.1/xml/features >>>>> [INFO] Adding feature repository to system: >>>>> mvn:nl.overheid.stelsel.digimelding.astore/clerezza-features/0.7.1.36/xml/features >>>>> >>>>> >>>>> [INFO] Adding feature repository to system: >>>>> mvn:nl.overheid.stelsel.digimelding.astore/astore-features/0.7.1.36/xml/features >>>>> >>>>> >>>>> <snap> >>>>> >>> >> >> > -- ir. ing. Minto van der Sluis Software innovator / renovator Xup BV Mobiel: +31 (0) 626 014541