You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Benson Margulies <be...@basistech.com> on 2015/07/24 20:53:28 UTC
assembly and the 'standard' feature
I took:
<configuration>
<!-- no startupFeatures -->
<bootFeatures>
<feature>standard</feature>
<feature>management</feature>
</bootFeatures>
<!-- no installedFeatures -->
</configuration>
from
https://karaf.apache.org/manual/latest/developers-guide/writing-tests.html
The plugin tells me that there is no feature named 'standard'.
Re: assembly and the 'standard' feature
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
First, Karaf starts the bundles describe in etc/startup.properties. It's
the core system bundles.
Then, Karaf starts the featuresBoot as described in
etc/org.apache.karaf.features.cfg file.
So, basically:
- a startup feature will add all bundles describe in the feature, in
etc/startup.properties
- a boot feature will add the features XML and all resources described
in the feature (bundles, configfiles) and add the feature in
etc/org.apache.karaf.features.cfg (in featuresBoot)
- a installed feature will add the feature XML and all resources
described in the feature (bundles, configfiles) in the system folder,
but without updating the etc/startup.properties or
etc/org.apache.karaf.features.cfg
Regards
JB
On 07/25/2015 02:34 PM, Benson Margulies wrote:
> JB, sending that email was an act of rubber-duck; I realized what file
> from Achim's sample I must have disturbed. I would still be grateful
> to a pointer to background on the karaf startup process so I can make
> sense of the taxonomy of features.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: assembly and the 'standard' feature
Posted by Benson Margulies <be...@basistech.com>.
JB, sending that email was an act of rubber-duck; I realized what file
from Achim's sample I must have disturbed. I would still be grateful
to a pointer to background on the karaf startup process so I can make
sense of the taxonomy of features.
Re: assembly and the 'standard' feature
Posted by Benson Margulies <be...@basistech.com>.
JB, I can now build a working assembly -- working when I just run it
on my dev system. It, however, 'loses' my features when launched in
docker. I've pulled the karaf.log file from the container, and the
problem is that it's looking for feature.xml files from the file
system or Maven instead of from inside the assembled karaf
installation.
I've read the description of compile versus runtime a few times, and
the boot/startup/install taxonomy, but I haven't found enough
background yet to make sense of it. The only thing that comes close to
working it to list everything as runtime and 'boot'.
First -- trying to load a file from where the assembly was built:
2015-07-25 01:57:31,472 | ERROR | pool-1-thread-1 |
BootFeaturesInstaller | 6 - org.apache.karaf.features.core
- 4.0.0 | Error installing boot feature repository
file:/Users/benson/x/anvils/assembly/target/assembly/system/org/apache/karaf/features/framework/4.0.0/framework-4.0.0-features.xml
java.io.IOException:
/Users/benson/x/anvils/assembly/target/assembly/system/org/apache/karaf/features/framework/4.0.0/framework-4.0.0-features.xml
(No such file or directory) :
file:/Users/benson/x/anvils/assembly/target/assembly/system/org/apache/karaf/features/framework/4.0.0/framework-4.0.0-features.xml
Second -- trying to load my feature.xml from maven.
2015-07-25 12:13:58,560 | WARN | pool-1-thread-1 |
AetherBasedResolver | 1 -
org.ops4j.pax.logging.pax-logging-api - 1.8.3 | Error resolving
artifactcom.basistech.ws:rosapi-worker:xml:features:0.0.1-SNAPSHOT:Could
not find artifact
com.basistech.ws:rosapi-worker:xml:features:0.0.1-SNAPSHOT
Looking inside the assembly, I see:
/system/com/basistech/ws/rosapi-worker/0.0.1-SNAPSHOT/rosapi-worker-0.0.1-SNAPSHOT-features.xml
Is there some configuration I've goofed up that would set up pax to
use that system directory correctly?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>anvils-prototype</artifactId>
<groupId>com.basistech.ws</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>rosapi-assembly</artifactId>
<packaging>karaf-assembly</packaging>
<name>karaf assembly</name>
<properties>
<skip-dependency-convergence>true</skip-dependency-convergence>
</properties>
<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>
<dependency>
<groupId>org.apache.cxf.karaf</groupId>
<artifactId>apache-cxf</artifactId>
<version>${cxf.version}</version>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rosette-base-linguistics</artifactId>
<version>${project.version}</version>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rosapi-worker</artifactId>
<version>${project.version}</version>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<finalName>${project.artifactId}</finalName>
<bootFeatures>
<feature>bundle</feature>
<feature>config</feature>
<feature>diagnostic</feature>
<feature>feature</feature>
<feature>jaas</feature>
<feature>shell</feature>
<feature>log</feature>
<feature>management</feature>
<feature>package</feature>
<feature>shell-compat</feature>
<feature>ssh</feature>
<feature>system</feature>
<feature>wrap</feature>
<feature>war</feature>
<feature>cxf</feature>
<feature>rosette-base-linguistics</feature>
<feature>rosapi-worker</feature>
</bootFeatures>
</configuration>
</plugin>
</plugins>
</build>
</project>
On Sat, Jul 25, 2015 at 6:26 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> Hi Benson,
>
> standard feature doesn't exist anymore (I will update the documentation).
>
> You have to use:
>
> <startupFeatures>
> <feature>eventadmin</feature>
> </startupFeatures>
> <bootFeatures>
> <feature>wrap</feature>
> <feature>aries-blueprint</feature>
> <feature>shell</feature>
> <feature>shell-compat</feature>
> <feature>feature</feature>
> <feature>jaas</feature>
> <feature>ssh</feature>
> <feature>management</feature>
> <feature>bundle</feature>
> <feature>config</feature>
> <feature>deployer</feature>
> <feature>diagnostic</feature>
> <feature>feature</feature>
> <feature>instance</feature>
> <feature>kar</feature>
> <feature>log</feature>
> <feature>package</feature>
> <feature>service</feature>
> <feature>system</feature>
> </bootFeatures>
>
> Regards
> JB
>
> On 07/24/2015 08:53 PM, Benson Margulies wrote:
>>
>> I took:
>>
>> <configuration>
>> <!-- no startupFeatures -->
>> <bootFeatures>
>> <feature>standard</feature>
>> <feature>management</feature>
>> </bootFeatures>
>> <!-- no installedFeatures -->
>> </configuration>
>>
>> from
>>
>> https://karaf.apache.org/manual/latest/developers-guide/writing-tests.html
>>
>> The plugin tells me that there is no feature named 'standard'.
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
Re: assembly and the 'standard' feature
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Benson,
standard feature doesn't exist anymore (I will update the documentation).
You have to use:
<startupFeatures>
<feature>eventadmin</feature>
</startupFeatures>
<bootFeatures>
<feature>wrap</feature>
<feature>aries-blueprint</feature>
<feature>shell</feature>
<feature>shell-compat</feature>
<feature>feature</feature>
<feature>jaas</feature>
<feature>ssh</feature>
<feature>management</feature>
<feature>bundle</feature>
<feature>config</feature>
<feature>deployer</feature>
<feature>diagnostic</feature>
<feature>feature</feature>
<feature>instance</feature>
<feature>kar</feature>
<feature>log</feature>
<feature>package</feature>
<feature>service</feature>
<feature>system</feature>
</bootFeatures>
Regards
JB
On 07/24/2015 08:53 PM, Benson Margulies wrote:
> I took:
>
> <configuration>
> <!-- no startupFeatures -->
> <bootFeatures>
> <feature>standard</feature>
> <feature>management</feature>
> </bootFeatures>
> <!-- no installedFeatures -->
> </configuration>
>
> from
>
> https://karaf.apache.org/manual/latest/developers-guide/writing-tests.html
>
> The plugin tells me that there is no feature named 'standard'.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: assembly and the 'standard' feature
Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,
yes this isn't valid any longer for Karaf 4.
You actually need to use the same features as Karaf itself.
This leaves you with a very modular build, but can be cumbersome to find
the pieces.
There is already a jira for improvement. [1]
regards, Achim
[1] - https://issues.apache.org/jira/browse/KARAF-3880
2015-07-24 20:53 GMT+02:00 Benson Margulies <be...@basistech.com>:
> I took:
>
> <configuration>
> <!-- no startupFeatures -->
> <bootFeatures>
> <feature>standard</feature>
> <feature>management</feature>
> </bootFeatures>
> <!-- no installedFeatures -->
> </configuration>
>
> from
>
> https://karaf.apache.org/manual/latest/developers-guide/writing-tests.html
>
> The plugin tells me that there is no feature named 'standard'.
>
--
Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
Software Architect / Project Manager / Scrum Master