Hi,

just reference this feature in your feature.

Basically, you create the features repo XML like this:

<features ...>

        <feature name="my" version="xx">
                <feature>jetty</feature>
                <feature>war</feature>
                <feature>webconsole</feature>
                <feature>pax-jdbc-oracle</feature>
                <bundle>...</bundle>
        <feature>

</features>

you provide this features XML to the maven plugin to create the kar
similar to the example here:

https://github.com/apache/karaf/tree/master/examples/karaf-maven-example/karaf-maven-example-kar

The kar installation will install the my feature including the
transitive features.

Another approach instead of a kar is to create a custom distribution.

Regards
JB

On 10/01/2020 04:02, Davi Baldin Tavares wrote:
> Hi,
> 
> I would like to create a KAR file using karaf-maven-plugin
> 
> Dependencies are being inserted correctly as maven bundles, however, how
> to include other features like that?
> 
> feature:install jetty
> feature:install war
> feature:install webconsole
> feature:install pax-jdbc-oracle 
> 
> Basically, I would like to drop a .kar file in the deploy directory that
> does all the feature:install and bundle:install behind that is required
> for my application…
> 
> Regards,
> 
> Davi
> 
> 
> 
> 
> pom.xml file
> 
> 
> 
> 
> <projectxmlns=/"http://maven.apache.org/POM/4.0.0"/xmlns:xsi=/"http://www.w3.org/2001/XMLSchema-instance"/xsi:schemaLocation=/"http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd"/>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>io.infolayer.siteview</groupId>
>   <artifactId>io.infolayer.siteview-kar</artifactId>
>   <version>4.2.7</version>
>   <packaging>kar</packaging>
>   <name>Siteview :: KAR</name>
>   <build>
>         <pluginManagement>
>             <plugins>
>                 <plugin>
>                     <groupId>org.apache.karaf.tooling</groupId>
>                     <artifactId>karaf-maven-plugin</artifactId>
>                     <version>${project.version}</version>
>                     <extensions>true</extensions>
>                 </plugin>
>             </plugins>
>         </pluginManagement>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.karaf.tooling</groupId>
>                 <artifactId>karaf-maven-plugin</artifactId>
>             </plugin>
>         </plugins>
>     </build>
>   <dependencies>
>   <dependency>
>   <groupId>org.mongodb</groupId>
>   <artifactId>mongo-java-driver</artifactId>
>   <version>3.11.0</version>
>   </dependency>
>   <dependency>
>   <groupId>com.google.code.gson</groupId>
>   <artifactId>gson</artifactId>
>   <version>2.8.5</version>
>   </dependency>
>   <dependency>
>   <groupId>commons-io</groupId>
>   <artifactId>commons-io</artifactId>
>   <version>2.6</version>
>   </dependency>
>   <dependency>
>   <groupId>org.apache.commons</groupId>
>   <artifactId>commons-lang3</artifactId>
>   <version>3.9</version>
>   </dependency>
>   <dependency>
>   <groupId>org.apache.commons</groupId>
>   <artifactId>commons-text</artifactId>
>   <version>1.8</version>
>   </dependency>
>   </dependencies>
> </project>

-- 
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to