Hello, I'm having trouble creating a self contained KAR file, which depends on another KAR file (see below). KAR A specifies some core features such as activemq and cxf. KAR B depends on KAR A.
What I am finding is when I drop KAR B into the deploy folder of karaf, it is still going to the internet to fetch third party components such as activemq. The KAR A does not contain any of these features in it's repository folder and likewise, KAR B is missing it, so it needs to go to the net to fetch it. Is there something I am doing wrong or is my understanding of KAR deployment incorrect? -- KAR A-- <?xml version="1.0" encoding="UTF-8"?> <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.0.0 http://karaf.apache.org/xmlns/features/v1.0.0"> <repository>mvn:org.apache.activemq/activemq-karaf/5.14.5/xml/features</repository> <repository>mvn:org.apache.cxf.karaf/apache-cxf/3.1.11/xml/features</repository> <feature name="demo-base-features" version="${pom.version}"> <configfile finalname="etc/activemq.xml" override="true">mvn:com.demo/demo-base-features/${pom.version}/xml/activemq</configfile> <configfile finalname="etc/org.apache.cxf.osgi.cfg" override="true">mvn:com.demo/demo-base-features/${pom.version}/cfg/cxf</configfile> <feature>cxf-jaxrs</feature> <feature>http</feature> <feature>war</feature> <feature>jms</feature> <feature>jdbc</feature> <feature>activemq-broker</feature> <feature>activemq-client</feature> <feature>scr</feature> </feature> </features> -- KAR B -- <?xml version="1.0" encoding="UTF-8"?> <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.0.0 http://karaf.apache.org/xmlns/features/v1.0.0"> <repository>mvn:com.demo/demo-base-features/${pom.version}/xml/features</repository> <feature name="demo-mock-data-features" version="${pom.version}"> <feature>demo-base-features</feature> </feature> </features> -- POM Example -- <build> <plugins> <plugin> <groupId>org.apache.karaf.tooling</groupId> <artifactId>karaf-maven-plugin</artifactId> <version>4.1.1</version> <extensions>true</extensions> <executions> <execution> <id>generate-feature-file</id> <phase>package</phase> <goals> <goal>features-generate-descriptor</goal> </goals> <configuration> <includeProjectArtifact>false</includeProjectArtifact> <aggregateFeatures>true</aggregateFeatures> </configuration> </execution> </executions> </plugin> </plugins> </build> -- Warmest Regards, Stephen Munro
