Hi Tom,
Here's a pom.xml to do what you want:
<?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>
<groupId>example</groupId>
<artifactId>my-karaf</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>karaf-assembly</packaging>
<dependencies>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>framework</artifactId>
<version>4.1.1</version>
<type>kar</type>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>standard</artifactId>
<version>4.1.1</version>
<classifier>features</classifier>
<type>xml</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>4.1.1</version>
<extensions>true</extensions>
<configuration>
<bootFeatures>
<feature>standard</feature>
</bootFeatures>
<javase>1.8</javase>
</configuration>
</plugin>
</plugins>
</build>
</project>
It's what I used during ApacheCon to build a custom distribution of Karaf
embedding Cellar (I removed the Cellar part for you).
Regards
JB
On 06/13/2017 09:52 AM, t...@quarendon.net wrote:
I've attempted to build a simple custom Karaf distribution using the maven
plugin and the karaf-assembly packaging.
I can build the assembly, but when I start the result I get an exception.
My pom configuration is currently very simple, just:
<dependencies>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>framework</artifactId>
<version>${karafVersion}</version>
<type>kar</type>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>standard</artifactId>
<version>${karafVersion}</version>
<classifier>features</classifier>
<type>xml</type>
<scope>compile</scope>
</dependency>
...
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<configuration>
<!-- <startupFeatures/> -->
<bootFeatures>
<!-- standard distribution -->
<feature>standard</feature>
<!-- minimal distribution -->
<!--<feature>minimal</feature>-->
</bootFeatures>
<javase>1.8</javase>
</configuration>
</plugin>
karafVersion is 4.1.1
So I'm just bundling karaf, I'm not including anything else. This is the "minimal
example" in the karaf docs.
On startup I get the log here :
https://gist.github.com/tomq42/47403ec44413fdc517c70dc3cccbf0cb
I get the same if I specify "minimal" in "bootFeatures".
Am I doing something wrong here?
Thanks.
--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com