Hi John

sorry for the inconvenient URL postings.

I have an example for a features file here: [1] features.xml

(1) What is obvious is, that you are putting all your bundle dependencies into 
a single feature. This is quite unusual from my perspective.
(2) You need to make your feature visible to your application container. This 
can be manually conducted via:

features:addurl mvn:<path-to-your-features-file>

But it is also possible to conduct that via an entry in your 
‘org.apache.karaf.features.cfg’ that you need to adjust when building your 
custom distribution.
(3) The created bundle may be also copied over to your $KARAF_HOME/lib 
directory to get resolved (in case you do not want to pull it from any maven 
repo.

Let me know of you have any further questions.

- Christoph


On 18 Nov 2013, at 13:36, John D. Ament <[email protected]> wrote:

> Hi Christoph
> 
> Thanks for the response.  To be honest, I'm not sure how it helps.  I
> can't open your link, I'm wondering if your line wraps are breaking
> the URL.  Do you see something wrong in my features.xml?
> 
> On Mon, Nov 18, 2013 at 3:01 AM, Christoph Emmersberger
> <[email protected]> wrote:
>> Hi John
>> 
>> I=92ve been playing in the past quite a bit with custom distributions, =
>> and own features. My current approach is:
>> 
>> (1) Proceed with the custom distribution according to [1] =
>> http://karaf.apache.org/manual/latest-2.2.x/developers-guide/custom-distri=
>> bution.html
>> (2) Write manual features.xml that is later packaged in an own bundle =
>> pulling all required dependencies. You can find an example on how this =
>> can be achieved in [2] =
>> https://git-wip-us.apache.org/repos/asf?p=3Dcamel.git;a=3Dtree;f=3Dplatfor=
>> ms/karaf/features;h=3Dc25f336d154df0d13dfd8ab8291f522f282c8652;hb=3DHEAD
>> 
>> Hope this helps,
>> 
>> Kind regards,
>> 
>> Christoph
>> 
>> On 17 Nov 2013, at 16:37, John D. Ament <[email protected]> wrote:
>> 
>> HI all,
>> 
>> I'm using ServiceMix 4.5.3, which uses Karaf 2.2.11.
>> 
>> I'm essentially trying to start from a base karaf installation, and install
>> on top of it the custom bundles from ServiceMix + bundles my application
>> needs, so that the end result is a tar.gz with all of that preconfigured and
>> nothing else needed but to start up.
>> 
>> I'm able to get the packaging fine.  I followed the instructions here:
>> http://karaf.apache.org/manual/latest-2.2.x/developers-guide/custom-distribution.html
>> 
>> For all of the base stuff, prebuilt features, the install works fine.  I see
>> those getting installed at start up.
>> 
>> I then attempted to generate a features.xml for my bundle (right now I just
>> have a single JAR).  This seems to not go well.  The generated features.xml,
>> from feedback from others is wrong.  Here's a gist of the features.xml and
>> the error: https://gist.github.com/johnament/7466114
>> 
>> A few things I've noticed.
>> 
>> 1. even though many JARs are listed, my JAR file is not listed.  Is this
>> expected?
>> 2. The biggest error seems to be that it generated a features 1.2 XML file.
>> I'm told this is wrong.  I generated this XML file using this plugin config:
>> 
>>   <plugin>
>>                <groupId>org.apache.karaf.tooling</groupId>
>>                <artifactId>features-maven-plugin</artifactId>
>>                <version>2.2.11</version>
>>                <executions>
>>                    <execution>
>>                        <id>generate</id>
>>                        <phase>generate-resources</phase>
>>                        <goals>
>>                            <goal>generate-features-xml</goal>
>>                        </goals>
>>                        <configuration>
>>                            <kernelVersion>2.2.11</kernelVersion>
>>                            <outputFile>target/features.xml</outputFile>
>>                        </configuration>
>>                    </execution>
>>                </executions>
>>            </plugin>
>> 
>> Which I would assume the 2.2.11 version of the plugin is compatible with
>> Karaf 2.2.11.
>> 
>> Thanks for any feedback you can give.  This is honestly my first time
>> dealing with Karaf & OSGi.
>> 
>> John
>> 
>> 

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to