Hi,

You can take a look on the docker example, it contains a app included in a 
custom bistro:

https://github.com/apache/karaf/tree/master/examples/karaf-docker-example 
<https://github.com/apache/karaf/tree/master/examples/karaf-docker-example>

Basically, you just have to create a features XML and include in dependency of 
your assembly.
Then, you can add your applications:
- as installed feature (meaning that it will be included in the system folder 
of your custom distribution for offline use but not start by default)
- as boot feature (added in etc/org.apache.karaf.features.cfg)
- as startup feature (very early stage of the startup even before the features 
service, added in etc/startup.properties)

Regards
JB

> Le 6 févr. 2020 à 22:17, Matthias <mic.mat.weg...@web.de> a écrit :
> 
> Hi all,
> 
> i want to create an assembly for a own karaf-instance with brand, resource,
> features and bundles. I looked at
> 
> https://github.com/apache/karaf/blob/master/examples/karaf-maven-example/karaf-maven-example-assembly/pom.xml
> http://svn.apache.org/repos/asf/karaf/site/production/manual/latest/custom-distribution.html
> 
> and have a working solution which has ressources and brand. Also i  get a
> copy of relevant features in target/features-repo.
> 
> But what i don't get is the installation ob my own features and own bundles.
> I am not finding examples for that. How can i install custom features? Is it
> possible to have them installed in the packaged distribution? I have not for
> every custom bundle a own feature. So is it possible to install and start
> the bundles?
> 
> The pom for the distribution (so far) is:
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="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>
> 
>       <parent>
>               <groupId>org.rogatio.circlead.sunray</groupId>
>               <artifactId>circlead-core</artifactId>
>               <version>0.7.16-SNAPSHOT</version>
>               <relativePath>../pom.xml</relativePath>
>       </parent>
> 
>       <artifactId>circlead-install</artifactId>
>       <name>Circlead :: Distribution</name>
>       <packaging>karaf-assembly</packaging>
> 
>       <dependencies>
>               <dependency>
>                       
>                       <groupId>org.apache.karaf.features</groupId>
>                       <artifactId>framework</artifactId>
>                       <version>${karaf.version}</version>
>                       <type>kar</type>
>               </dependency>
>               <dependency>
>                       
>                       <groupId>org.apache.karaf.features</groupId>
>                       <artifactId>standard</artifactId>
>                       <version>${karaf.version}</version>
>                       <classifier>features</classifier>
>                       <type>xml</type>
>                       <scope>runtime</scope>
>               </dependency>
>       </dependencies>
> 
>       <build>
>               
>               <resources>
>                       <resource>
>                               <directory>src/main/resources</directory>
>                               <filtering>false</filtering>
>                               <includes>
>                                       <include>**/*</include>
>                               </includes>
>                       </resource>
>                       <resource>
>                               
> <directory>src/main/filtered-resources</directory>
>                               <filtering>true</filtering>
>                               <includes>
>                                       <include>**/*</include>
>                               </includes>
>                       </resource>
>               </resources>
> 
>               <plugins>
>                       
>                       <plugin>
>                               <groupId>org.apache.karaf.tooling</groupId>
>                               <artifactId>karaf-maven-plugin</artifactId>
>                               <extensions>true</extensions>
>                               <executions>
>                                       <execution>
>                                               <id>features-add-to-repo</id>
>                                               
> <phase>generate-resources</phase>
>                                               <goals>
>                                                       
> <goal>features-add-to-repository</goal>
>                                               </goals>
>                                               <configuration>
>                                                       <descriptors>
>                                                       
> <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
>                                                       
> <descriptor>mvn:org.rogatio.circlead.sunray/circlead-core-features/0.7.16-SNAPSHOT/xml</descriptor>
>                                                       </descriptors>
>                                                       <features>
>                                                               
> <feature>circlead-core</feature>
>                                                       </features>
>                                                       
> <repository>target/features-repo</repository>
>                                               </configuration>
>                                       </execution>
>                               </executions>
>                               <configuration>
>                                       <bootFeatures>
>                                               <feature>standard</feature>
>                                       </bootFeatures>
>                                       <archiveZip>true</archiveZip>
>                               </configuration>
>                       </plugin>
>               </plugins>
>       </build>
> 
> </project>
> 
> Regards,
> Matthias
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Reply via email to