Gary Kennedy created KARAF-3263:
-----------------------------------
Summary: karaf-maven-plugin install=auto support for aggregate
features
Key: KARAF-3263
URL: https://issues.apache.org/jira/browse/KARAF-3263
Project: Karaf
Issue Type: Improvement
Components: karaf-tooling
Affects Versions: 3.0.1
Reporter: Gary Kennedy
Priority: Minor
When using karaf-maven-plugin:features-generate-descriptor, the generated
<feature> tags for xml/feature dependencies are not merged with the feature.xml
template so I cannot add install="auto" to the feature tag.
eg,
POM:
{code}
...
<packaging>feature</packaging>
...
<dependencies>
<dependency>
....
<artifactId>featureA</artifactId>
<type>xml</type>
<classifier>features</classifier>
</dependency>
</dependencies>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>3.0.1</version>
<extensions>true</extensions>
<configuration>
<aggregateFeatures>true</aggregateFeatures>
</configuration>
</plugins>
</plugins>
</build>
{code}
feature.xml template (src/main/feature/feature.xml):
{code}
<?xml ...>
<features ...>
<feature name="featureA" install="auto" />
</features>
{code}
results in:
{code}
<?xml ...>
<features ...>
<feature name="featureA" install="auto" />
<feature name="featureA" version="..." description="...">
<!-- Generated descriptor -->
</feature>
</features>
{code}
Since this is for generating an "application" feature from individual
"component" features, and none of the "component" features are auto-install in
one "application" and no-auto-install in another, I can work around this by
specifying the install attribute in the "component" feature.xml.
So, would it be possible to merge aggregated features with the feature
template? (eg, matching on name and only overriding the feature tag attributes
except for version, so only install/description/resolver/start-level. Contents
to be replaced with dependency feature content - we don't want to mess with
those)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)