Hello again. Good idea ! adding this configuration to the plugin : <configuration> <dependencyFeatures> <dependencyFeature>camel-blueprint</dependencyFeature> </dependencyFeatures> </configuration>
The needed feature "camel-blueprint" is marked as dependency, but all other features are still in my result : .../... <feature version="2.9.0" prerequisite="false" dependency="false">xml-specs-api</feature> <feature version="2.25.4" prerequisite="false" dependency="false">camel</feature> <feature version="2.25.4" prerequisite="false" dependency="false">camel-core</feature> <feature version="2.25.4" prerequisite="false" dependency="false">camel-catalog</feature> <feature version="2.25.4" prerequisite="false" dependency="true">camel-blueprint</feature> <feature version="2.25.4" prerequisite="false" dependency="false">camel-spring</feature> .../... No way to keep only my actual dependencies... Thanks again. Regards. Le lun. 8 août 2022 à 15:43, Richard Hierlmeier <rhierlme...@googlemail.com> a écrit : > > Did you try the dependencyFeatures option: > > I got this option with the following maven > mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:describe > -Dcmd=org.apache.karaf.tooling:karaf-maven-plugin:features-generate-descriptor > -Ddetail > ... > dependencyFeatures > Name of features which are dependencies (they still need to be defined > separately). > > Regards > Richard > > Am Mo., 8. Aug. 2022 um 14:03 Uhr schrieb Ephemeris Lappis > <ephemeris.lap...@gmail.com>: >> >> Hello. >> >> Thanks for your reply, Richard, but for now I'd prefer to use >> dependencies to create the features for our bundles, and rely on BOM >> version management. >> >> I've found a post talking about feature maven dependency declaration. >> In my case, for camel features, this should be something like that : >> >> <dependency> >> <groupId>org.apache.camel.karaf</groupId> >> <artifactId>apache-camel</artifactId> >> <version>${version.of.camel}</version> >> <classifier>features</classifier> >> <type>xml</type> >> </dependency> >> >> This declaration perhaps should work, but has two drawbacks for now : >> - all the camel features that are in this feature repository are >> identified as features in mine : in my case I just want >> camel-blueprint and its transitive dependent features >> - none of them is marked as requirement : <feature version="2.25.4" >> prerequisite="false" dependency="false">camel-blueprint</feature> >> >> Another idea to go this way ;) ? >> >> Anyway to limit dependencies to individual features, and make them >> automatically installed by Karaf when installing our feature? >> >> Thanks again. >> >> Regards. >> >> Le lun. 8 août 2022 à 13:40, Richard Hierlmeier >> <rhierlme...@googlemail.com> a écrit : >> > >> > I have the same problem. I define feature dependencies in >> > >> > src/main/feature/features.xml >> > >> > For each feature dependency I have to define in the pom a version or >> > version range property. >> > >> > Example: >> > https://github.com/rhierlmeier/vaadin8_karaf_demo/blob/main/src/main/feature/feature.xml >> > >> > You can find the configuration of the karaf maven plugin here: >> > https://github.com/rhierlmeier/vaadin8_karaf_demo/blob/main/pom.xml >> > >> > This approach works, but is has the following disadvantages: >> > >> > * You can not reuse feature version or version range properties with the >> > Maven BOM mechanism (import the dependency management). >> > * CI-system like Jenkins track build dependencies via Maven dependencies. >> > Jenkins will not trigger a build of a project when the parent feature >> > changes. >> > >> > Regards >> > >> > Richard >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > Am Mo., 8. Aug. 2022 um 11:49 Uhr schrieb Ephemeris Lappis >> > <ephemeris.lap...@gmail.com>: >> >> >> >> Hello. >> >> >> >> I can't find any way to add dependent features to the feature I try to >> >> generate using the maven plugin. >> >> >> >> The maven dependencies are added as expected with the matching bundles. >> >> >> >> How can I add features ? I've tried putting a feature.xml file in the >> >> src/main/feature folder, but then the generation just copy this file >> >> and do not update it... >> >> >> >> Thanks for your help. >> >> >> >> Regards.