karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Add feature to karaf .kar file
Date Tue, 03 May 2016 10:43:57 GMT
Hi Christian,

you don't have to gather in an unique feature.

If in your feature, you define the CXF repository:

<repository>mvn...</repository>

then the kar file will include your features XML and all dependencies.

Regards
JB

On 05/03/2016 11:36 AM, Christian Lutz wrote:
> Hello,
> I do have feature.xml as basic for my kar file.
> <?xml version="1.0" encoding="UTF-8"?>
> <features name="spray-server-1.0.0"
> xmlns="http://karaf.apache.org/xmlns/features/v1.3.0">
>   <feature name="spray-server" version="1.0.0">
>    <feature>cxf-rs-security-cors</feature>
>    <feature>own-adapter-feature</feature>
>    <bundle>mvn:de.spray.server/server-orm/1.0.0</bundle>
>    <bundle>mvn:de.spray.server/spray-server/1.0.0</bundle>
>   </feature>
> </features>
> I create the kar file with karaf-maven-plugin.
>   <plugins>
>     <plugin>
>
>   <groupId>org.apache.karaf.tooling</groupId>
>      <artifactId>karaf-maven-plugin</artifactId>
>      <version>4.0.5</version>
>      <extensions>true</extensions>
>      <configuration>
>       <includeTransitiveDependency>false</includeTransitiveDependency>
>       <aggregateFeatures>true</aggregateFeatures>
>       <addBundlesToPrimaryFeature>true</addBundlesToPrimaryFeature>
>      </configuration>
>     </plugin>
>    </plugins>
> I do have two different feature within my
> feature.xml cxf-rs-security-cors and own-adapter-feature.
> Is it somehow possible to add all bundles from
> the own-adapter-feature (but not from cxf-rs-security-cors ) into the
> kar file? I did expect that this should be possible
> with aggregateFeatures=true but nothing from own-adapter-feature or
> cxf-rs-security-cors  had been added.
> I also tried to add the feature as dependency within
> <dependencies>
>    <dependency>
>     <groupId>de.spray</groupId>
>     <artifactId>own-adapter-feature</artifactId>
>     <classifier>features</classifier>
>     <version>1.0.0</version>
>     <type>xml</type>
>     <scope>runtime</scope>
>    </dependency>
>   </dependencies>
> But this didn't work either. I do know i could copy alle the
> dependencies into my own feature.xml but then I do have to care about to
> features.
> Thanks
> Christian

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message