Nicolas,
From what I read in your pom. Your feature should look for
com.xxx.dms/content-rs-cxf/0.0.1.SNAPSHOT
instead of
com.xxx.dms.content-rs-cxf/0.0.1.SNAPSHOT
Regards,
Morgan
On 2016-02-19 15:46, Nicolas Brasey wrote:
Hey guys,
I'm evaluating karaf at the moment to be our middleware runtime for
our product.
Our solution runs within internal networks with no connection to the
outside world so we need built our custom karaf distribution
containing all the needed bundles already packaged in the system
repository.
I trying to create my own distribution based on the example found on
the documentation, but I can't figure out why the felix resolver
cannot resolve a package:
Caused by: org.osgi.service.resolver.ResolutionException: Unable to
resolve root: missing requirement [root] osgi.identity;
osgi.identity=dms-content; type=karaf.feature; version=0.0.1.SNAPSHOT;
filter:="(&(osgi.identity=dms-content)(type=karaf.feature)(version>=0.0.1.SNAPSHOT))"
[caused by: Unable to resolve dms-content/0.0.1.SNAPSHOT: missing
requirement [dms-content/0.0.1.SNAPSHOT] osgi.identity;
osgi.identity=com.xxx.dms.content-rs-cxf; type=osgi.bundle;
version="[0.0.1.SNAPSHOT,0.0.1.SNAPSHOT]"; resolution:=mandatory
[caused by: Unable to resolve
com.xxx.dms.content-rs-cxf/0.0.1.SNAPSHOT: missing requirement
[com.xxx.dms.content-rs-cxf/0.0.1.SNAPSHOT] osgi.wiring.package;
filter:="(&(osgi.wiring.package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0)))"]]
at
org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:235)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:158)
at
org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:216)
at
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)
at org.apache.karaf.profile.assembly.Builder.resolve(Builder.java:1214)
at
org.apache.karaf.profile.assembly.Builder.startupStage(Builder.java:1002)
at
org.apache.karaf.profile.assembly.Builder.doGenerateAssembly(Builder.java:606)
at
org.apache.karaf.profile.assembly.Builder.generateAssembly(Builder.java:389)
at org.apache.karaf.tooling.AssemblyMojo.doExecute(AssemblyMojo.java:392)
at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:228)
... 22 more
Here is the content of the pom.xml:
<?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>
<artifactId>dms-karaf</artifactId>
<groupId>com.xxx.dms</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>dms-karaf-minimal</artifactId>
<packaging>karaf-assembly</packaging>
<name>${project.artifactId}</name>
<dependencies>
<dependency>
<!-- scope is compile so all features (there is only one)
are installed into startup.properties and the feature repo itself is
not added in etc/org.apache.karaf.features.cfg file -->
<groupId>org.apache.karaf.features</groupId>
<artifactId>framework</artifactId>
<version>4.0.4</version>
<type>kar</type>
</dependency>
<dependency>
<!-- scope is runtime so the feature repo is listed in
etc/org.apache.karaf.features.cfg file, and features will installed
into the system directory -->
<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>
<!-- scope is runtime so the feature repo is listed in
etc/org.apache.karaf.features.cfg file, and features will installed
into the system directory if specify in the plugin configuration -->
<groupId>com.xxx.dms</groupId>
<artifactId>dms-content-features</artifactId>
<version>${project.version}</version>
<classifier>features</classifier>
<type>xml</type>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<!-- if you want to include resources in the distribution -->
<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>
<!-- if you want to include resources in the distribution -->
<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>
<!-- karaf-maven-plugin will call both assembly and
archive goals -->
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<configuration>
<javase>1.8</javase>
<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>aries-blueprint</feature>
<feature>dms-content</feature>
</bootFeatures>
</configuration>
</plugin>
</plugins>
</build>
</project>
Thanks a lot!
Nicolas