>>>>> Ephemeris Lappis <[email protected]>: > 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... Hm... my template.xml files are expanded the way I expect them to be. What version of karaf-maven-plugin are you using? Here is one of my src/main/feature/feature.xml files https://github.com/steinarb/liquibase-karaf-feature/blob/master/liquibase-integration-test/karaf.liquibase.sample/src/main/feature/feature.xml#L16 This template feature.xml contains feature dependencies for a feature with a name set by the maven property karaf-feature-name, and a handwritten jdbc-config feature that depends on the feature with name defined by maven property karaf-feature-name and the pax-jdbc-config feature. In addition, the pom.xml for the project defines the karaf-feature-name property, https://github.com/steinarb/liquibase-karaf-feature/blob/master/liquibase-integration-test/karaf.liquibase.sample/pom.xml#L28 and a dependency to the liquibase feature (discussed in a different thread): https://github.com/steinarb/liquibase-karaf-feature/blob/master/liquibase-integration-test/karaf.liquibase.sample/pom.xml#L32 This template is transformed into the following file in target/feature/feature.xml : https://gist.github.com/steinarb/6b49cb2a6eeba74186d754683e97c958 1. The maven feature dependency of the pom is turned into an import https://gist.github.com/steinarb/6b49cb2a6eeba74186d754683e97c958#file-feature-xml-L3 and a versioned feature dependency https://gist.github.com/steinarb/6b49cb2a6eeba74186d754683e97c958#file-feature-xml-L8 2. The feature with name given by maven property karaf-feature-name has the property expanded and gets a description and version values provided by the pom 3. The unversioned feature dependencies scr and pax-jdbc-derby are kept from the template feature.xml https://gist.github.com/steinarb/6b49cb2a6eeba74186d754683e97c958#file-feature-xml-L6 4. The jdbc-config feature "sample-db" is copied from the template feature.xml https://gist.github.com/steinarb/6b49cb2a6eeba74186d754683e97c958#file-feature-xml-L11
