You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by "niibasta@gmail.com" <ni...@gmail.com> on 2011/06/10 15:22:56 UTC
Features plugin
Hello!
First of all, I'd like to thank you for such useful application as Karaf :)
Second, maybe, you could help me to implement scenario below.
I have a "my-features.xml" file with my features and standard
"karaf-features.xml".
I'm developing my module which depends on some of my bundles, which
described in "my-features.xml" file and on bundles from
"standard-2.2.0-features.xml" file.
I'd like to generate "module-features.xml" for my new module like this:
<?xml version="1.0" encoding="UTF-8"?>
<features>
<feature name="mymodule" version="1.0">
<bundle>mvn:somebundle/1.1.0</bundle>
//...some other bundles
<feature>myfeature</feature>
<feature>some-karaf-myfeature</feature>
</feature>
</features>
Where:
All "bundle" lines are references to bundles, which have been described
in my pom.xml file and are not described in any "feature.xml" file or
"standard-2.2.0-features.xml".
"feature" appears only when my module depends on the bundle, which has
already been described in "my-features.xml" or
"standard-2.2.0-features.xml".
For example, if my module depends on "spring-beans:3.0.5" and I've put
"standard-2.2.0-features.xml" file in module dependencies I get result
"module-feature.xml" file like this:
<?xml version="1.0" encoding="UTF-8"?>
<features>
<feature name="mymodule" version="1.0">
<feature name="spring" version="3.0.5.RELEASE"/>
</feature>
</features>
but not like:
<?xml version="1.0" encoding="UTF-8"?>
<features>
<feature name="mymodule" version="1.0">
<bundle>mvn:org.springframework/spring-beans/3.0.5.RELEASE</bundle>
</feature>
</features>
I there any way to do this using maven-feature-plugin or I must do it
manually?
Thanks for your help.
With best regards, Vadim.
Re: Features plugin
Posted by "niibasta@gmail.com" <ni...@gmail.com>.
Thanks!
On 10.06.2011 17:50, Achim Nierbeck wrote:
> Hi,
>
> AFAIK you still have to build such a feature xml files yourself.
> But the plugin helps you to check if the features.xml file is a valid one.
>
> regards, Achim
>
> 2011/6/10 niibasta@gmail.com<ni...@gmail.com>:
>> Hello!
>>
>> First of all, I'd like to thank you for such useful application as Karaf :)
>>
>> Second, maybe, you could help me to implement scenario below.
>>
>> I have a "my-features.xml" file with my features and standard
>> "karaf-features.xml".
>>
>> I'm developing my module which depends on some of my bundles, which
>> described in "my-features.xml" file and on bundles from
>> "standard-2.2.0-features.xml" file.
>>
>> I'd like to generate "module-features.xml" for my new module like this:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <features>
>> <feature name="mymodule" version="1.0">
>> <bundle>mvn:somebundle/1.1.0</bundle>
>> //...some other bundles
>> <feature>myfeature</feature>
>> <feature>some-karaf-myfeature</feature>
>> </feature>
>> </features>
>>
>> Where:
>> All "bundle" lines are references to bundles, which have been described in
>> my pom.xml file and are not described in any "feature.xml" file or
>> "standard-2.2.0-features.xml".
>>
>> "feature" appears only when my module depends on the bundle, which has
>> already been described in "my-features.xml" or
>> "standard-2.2.0-features.xml".
>>
>> For example, if my module depends on "spring-beans:3.0.5" and I've put
>> "standard-2.2.0-features.xml" file in module dependencies I get result
>> "module-feature.xml" file like this:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <features>
>> <feature name="mymodule" version="1.0">
>> <feature name="spring" version="3.0.5.RELEASE"/>
>> </feature>
>> </features>
>>
>> but not like:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <features>
>> <feature name="mymodule" version="1.0">
>> <bundle>mvn:org.springframework/spring-beans/3.0.5.RELEASE</bundle>
>> </feature>
>> </features>
>>
>> I there any way to do this using maven-feature-plugin or I must do it
>> manually?
>>
>> Thanks for your help.
>> With best regards, Vadim.
>>
>>
>>
>
>
Re: Features plugin
Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,
AFAIK you still have to build such a feature xml files yourself.
But the plugin helps you to check if the features.xml file is a valid one.
regards, Achim
2011/6/10 niibasta@gmail.com <ni...@gmail.com>:
> Hello!
>
> First of all, I'd like to thank you for such useful application as Karaf :)
>
> Second, maybe, you could help me to implement scenario below.
>
> I have a "my-features.xml" file with my features and standard
> "karaf-features.xml".
>
> I'm developing my module which depends on some of my bundles, which
> described in "my-features.xml" file and on bundles from
> "standard-2.2.0-features.xml" file.
>
> I'd like to generate "module-features.xml" for my new module like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <features>
> <feature name="mymodule" version="1.0">
> <bundle>mvn:somebundle/1.1.0</bundle>
> //...some other bundles
> <feature>myfeature</feature>
> <feature>some-karaf-myfeature</feature>
> </feature>
> </features>
>
> Where:
> All "bundle" lines are references to bundles, which have been described in
> my pom.xml file and are not described in any "feature.xml" file or
> "standard-2.2.0-features.xml".
>
> "feature" appears only when my module depends on the bundle, which has
> already been described in "my-features.xml" or
> "standard-2.2.0-features.xml".
>
> For example, if my module depends on "spring-beans:3.0.5" and I've put
> "standard-2.2.0-features.xml" file in module dependencies I get result
> "module-feature.xml" file like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <features>
> <feature name="mymodule" version="1.0">
> <feature name="spring" version="3.0.5.RELEASE"/>
> </feature>
> </features>
>
> but not like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <features>
> <feature name="mymodule" version="1.0">
> <bundle>mvn:org.springframework/spring-beans/3.0.5.RELEASE</bundle>
> </feature>
> </features>
>
> I there any way to do this using maven-feature-plugin or I must do it
> manually?
>
> Thanks for your help.
> With best regards, Vadim.
>
>
>
--
--
*Achim Nierbeck*
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
Re: Features plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
By careful, check the documentation on trunk: I changed the goals name.
Regards
JB
On 06/10/2011 06:50 PM, David Jencks wrote:
> You might want to try the plugin in trunk. The features packaging lets you start with a features.xml file and adds a feature containing the maven transitive dependencies of the pom that aren't in other features you mention.
>
> david jencks
>
> On Jun 10, 2011, at 6:22 AM, niibasta@gmail.com wrote:
>
>> Hello!
>>
>> First of all, I'd like to thank you for such useful application as Karaf :)
>>
>> Second, maybe, you could help me to implement scenario below.
>>
>> I have a "my-features.xml" file with my features and standard "karaf-features.xml".
>>
>> I'm developing my module which depends on some of my bundles, which described in "my-features.xml" file and on bundles from "standard-2.2.0-features.xml" file.
>>
>> I'd like to generate "module-features.xml" for my new module like this:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <features>
>> <feature name="mymodule" version="1.0">
>> <bundle>mvn:somebundle/1.1.0</bundle>
>> //...some other bundles
>> <feature>myfeature</feature>
>> <feature>some-karaf-myfeature</feature>
>> </feature>
>> </features>
>>
>> Where:
>> All "bundle" lines are references to bundles, which have been described in my pom.xml file and are not described in any "feature.xml" file or "standard-2.2.0-features.xml".
>>
>> "feature" appears only when my module depends on the bundle, which has already been described in "my-features.xml" or "standard-2.2.0-features.xml".
>>
>> For example, if my module depends on "spring-beans:3.0.5" and I've put "standard-2.2.0-features.xml" file in module dependencies I get result "module-feature.xml" file like this:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <features>
>> <feature name="mymodule" version="1.0">
>> <feature name="spring" version="3.0.5.RELEASE"/>
>> </feature>
>> </features>
>>
>> but not like:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <features>
>> <feature name="mymodule" version="1.0">
>> <bundle>mvn:org.springframework/spring-beans/3.0.5.RELEASE</bundle>
>> </feature>
>> </features>
>>
>> I there any way to do this using maven-feature-plugin or I must do it manually?
>>
>> Thanks for your help.
>> With best regards, Vadim.
>>
>>
>
Re: Features plugin
Posted by David Jencks <da...@yahoo.com>.
You might want to try the plugin in trunk. The features packaging lets you start with a features.xml file and adds a feature containing the maven transitive dependencies of the pom that aren't in other features you mention.
david jencks
On Jun 10, 2011, at 6:22 AM, niibasta@gmail.com wrote:
> Hello!
>
> First of all, I'd like to thank you for such useful application as Karaf :)
>
> Second, maybe, you could help me to implement scenario below.
>
> I have a "my-features.xml" file with my features and standard "karaf-features.xml".
>
> I'm developing my module which depends on some of my bundles, which described in "my-features.xml" file and on bundles from "standard-2.2.0-features.xml" file.
>
> I'd like to generate "module-features.xml" for my new module like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <features>
> <feature name="mymodule" version="1.0">
> <bundle>mvn:somebundle/1.1.0</bundle>
> //...some other bundles
> <feature>myfeature</feature>
> <feature>some-karaf-myfeature</feature>
> </feature>
> </features>
>
> Where:
> All "bundle" lines are references to bundles, which have been described in my pom.xml file and are not described in any "feature.xml" file or "standard-2.2.0-features.xml".
>
> "feature" appears only when my module depends on the bundle, which has already been described in "my-features.xml" or "standard-2.2.0-features.xml".
>
> For example, if my module depends on "spring-beans:3.0.5" and I've put "standard-2.2.0-features.xml" file in module dependencies I get result "module-feature.xml" file like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <features>
> <feature name="mymodule" version="1.0">
> <feature name="spring" version="3.0.5.RELEASE"/>
> </feature>
> </features>
>
> but not like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <features>
> <feature name="mymodule" version="1.0">
> <bundle>mvn:org.springframework/spring-beans/3.0.5.RELEASE</bundle>
> </feature>
> </features>
>
> I there any way to do this using maven-feature-plugin or I must do it manually?
>
> Thanks for your help.
> With best regards, Vadim.
>
>