You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Kerry Billingham <ke...@redbite.com> on 2016/02/11 13:41:24 UTC

Features archetype - bundle start-level

Hello All,

I'm using the Karaf features archetype but don't seem to be able to 
specify the start-level of the bundles in the features XML.

In my POM I have set the <startLevel> property in the karaf-maven-plugin 
but that start level doesn't get propagated through to the features XML 
when I build the project. Is there something I'm doing wrong or missing 
an extra configuration?

Thanks

Kerry

Re: Features archetype - bundle start-level

Posted by Kerry Billingham <ke...@redbite.com>.
Hi JB,

Actually it's a mix of 4.0.3 and 4.0.1 I have been using. No particular 
reason for that other than I've not kept an eye on my IDE when it 
selects the version to use for the archetype. I've just tried 4.0.4 and 
I still get the same result. Below is the template features XML I have used:

<features name="${project.artifactId}-${project.version}" 
xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">

     <feature name='${project.artifactId}' description='${project.name}' 
version='${project.version}'>
         <details>${project.description}</details>
         <!-- <config>foo=bar</config> -->
<bundle>mvn:com.example/test-bundle/1.0.0</bundle>
     </feature>

</features>

And the configuration in the POM is:

<plugin>
     <groupId>org.apache.karaf.tooling</groupId>
      <artifactId>karaf-maven-plugin</artifactId>

       <configuration>
            <startLevel>50</startLevel>
             <aggregateFeatures>true</aggregateFeatures>
              <resolver>(obr)</resolver>
<checkDependencyChange>true</checkDependencyChange>
<failOnDependencyChange>false</failOnDependencyChange>
<logDependencyChanges>true</logDependencyChanges>
<overwriteChangedDependencies>true</overwriteChangedDependencies>
        </configuration>
</plugin>

As you can see the features template is the standard one except for the 
bundle. Do I need to include (in the template) a reference to the 
startLevel specified in the POM on each bundle entry?

Regards

Kerry


On 11/02/16 12:52, Jean-Baptiste Onofré wrote:
> Hi Kerry,
>
> I guess you use archetype from Karaf 4.0.4, correct ?
>
> Regards
> JB
>
> On 02/11/2016 01:41 PM, Kerry Billingham wrote:
>> Hello All,
>>
>> I'm using the Karaf features archetype but don't seem to be able to
>> specify the start-level of the bundles in the features XML.
>>
>> In my POM I have set the <startLevel> property in the karaf-maven-plugin
>> but that start level doesn't get propagated through to the features XML
>> when I build the project. Is there something I'm doing wrong or missing
>> an extra configuration?
>>
>> Thanks
>>
>> Kerry
>


Re: Features archetype - bundle start-level

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Kerry,

I guess you use archetype from Karaf 4.0.4, correct ?

Regards
JB

On 02/11/2016 01:41 PM, Kerry Billingham wrote:
> Hello All,
>
> I'm using the Karaf features archetype but don't seem to be able to
> specify the start-level of the bundles in the features XML.
>
> In my POM I have set the <startLevel> property in the karaf-maven-plugin
> but that start level doesn't get propagated through to the features XML
> when I build the project. Is there something I'm doing wrong or missing
> an extra configuration?
>
> Thanks
>
> Kerry

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com