Hi JB,

sure, here it is. The scope of the framework KAR is compile, the scope of
the features XML is runtime. 

<?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>my.custom</groupId>
   <artifactId>my.distribution</artifactId>
   <version>1.0</version>
   <packaging>karaf-assembly</packaging>

   <dependencies>
      <dependency>
        
         <groupId>org.apache.karaf.features</groupId>
         <artifactId>framework</artifactId>
         <version>4.0.4</version>
         <type>kar</type>
      </dependency>
      <dependency>
        
         <groupId>org.apache.karaf.features</groupId>
         <artifactId>standard</artifactId>
         <classifier>features</classifier>
         <version>4.0.4</version>
         <type>xml</type>
         <scope>runtime</scope>
      </dependency>
      <dependency>
        
         <groupId>org.apache.karaf.features</groupId>
         <artifactId>spring</artifactId>
         <classifier>features</classifier>
         <version>4.0.4</version>
         <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.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.6</version>
            <executions>
               <execution>
                  <id>process-resources</id>
                  <goals>
                     <goal>resources</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.karaf.tooling</groupId>
            <artifactId>karaf-maven-plugin</artifactId>
            <version>4.0.0</version>
            <extensions>true</extensions>
            <configuration>
                    
               <bootFeatures>
                  <feature>jaas</feature>
                  <feature>shell</feature>
                  <feature>ssh</feature>
                  <feature>management</feature>
                  <feature>bundle</feature>
                  <feature>config</feature>
                  <feature>deployer</feature>
                  <feature>diagnostic</feature>
                  <feature>instance</feature>
                  <feature>kar</feature>
                  <feature>log</feature>
                  <feature>package</feature>
                  <feature>service</feature>
                  <feature>system</feature>
                  <feature>eventadmin</feature>
               </bootFeatures>
               <installedFeatures>
                  <feature>wrapper</feature>
               </installedFeatures>
            </configuration>
         </plugin>
      </plugins>
   </build>
</project>


Regards
Jan



jbonofre wrote
> Hi Jan,
> 
> can you share your pom.xml ?
> 
> Especially what's the scope of the framework kar and features XML 
> dependencies ?
> 
> Regards
> JB
> 
> On 03/07/2016 05:09 PM, Jan Kreutzfeld wrote:
>> Hi everyone,
>>
>> i am trying to set up a custom distribution with karaf 4.0.4.
>> I copied the example from
>> http://karaf.apache.org/manual/latest/developers-guide/custom-distribution.html.
>> Unfortunately, I encountered two problems:
>>
>> 1. When adding any feature to the 
> <bootFeatures>
> , the
>> pax-logging-service does no longer start automatically (status is
>> Resolved).
>>
>> 2. When adding the feature "eventadmin", i get the exception
>> "java.lang.IllegalStateException: Unknown protocol: mvn". This seems to
>> be a race condition - i copied the feature and increased the start level
>> for the eventadmin and metatype bundles to 10 and now it works.
>>
>> Is there any known solution for this? Should i create issues in JIRA?
>>
>>
>> Regards
>> Jan
> 
> -- 
> Jean-Baptiste Onofré

> jbonofre@

> http://blog.nanthrax.net
> Talend - http://www.talend.com





--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-4-0-4-Custom-distribution-issues-tp4045709p4045712.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to