You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by xav <xa...@eaton.com> on 2014/05/27 08:59:19 UTC
karaf:features-maven-plugin
Hi all,
Question about this plugin.
in my case it's work very well, just, I would like add a "feature cap", i.e.
if I have the following dependencies
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>my-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>my-manager</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>my-impl</artifactId>
<version>${project.version}</version>
</dependency>
in the feature.xml generated, I have
<features>
<feature name='my-api' version='0.1.0' >
<bundle>mvn:com.eaton.pqsoft/my-api/0.1.0</bundle>
</feature>
<feature name='my-manager' version='0.1.0' >
<feature version='0.1.0'>my-api</feature>
<bundle>mvn:com.eaton.pqsoft/my-manager/0.1.0</bundle>
</feature>
<feature name='my-impl' version='0.1.0' >
<bundle>mvn:commons-lang/commons-lang/2.6</bundle>
<feature version='0.1.0'>my-api</feature>
<bundle>mvn:commons-io/commons-io/2.0.1</bundle>
<bundle>mvn:commons-codec/commons-codec/1.4</bundle>
<bundle>mvn:com.eaton.pqsoft/my-impl/0.1.0</bundle>
</feature>
</features>
Ok, but if I want a feature named "my" where inside I have this:
<feature name='my' version='0.1.0' >
<feature version='0.1.0'>my-manager</feature>
<feature version='0.1.0'>my-impl</feature>
</feature>
In the plugin's documentation, I don't find, any information to add
manually, or automatically somethings like this.
Is there a solution to my problem?
Thanks
Regards
--
View this message in context: http://karaf.922171.n3.nabble.com/karaf-features-maven-plugin-tp4033284.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: karaf:features-maven-plugin
Posted by Charlie Mordant <cm...@gmail.com>.
Hi Xavier,
You can use the maven resource plugin filtering feature in combination with
build-helper-maven plugin in order to make your custom feature.
Here's a sample of a manual-made feature:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent/tree/master/net.osgiliath.framework/net.osgiliath.features.karaf-features/net.osgiliath.features.karaf-features-derby
Regards,
2014-05-27 8:59 GMT+02:00 xav <xa...@eaton.com>:
> Hi all,
>
> Question about this plugin.
>
> in my case it's work very well, just, I would like add a "feature cap",
> i.e.
> if I have the following dependencies
> <dependency>
> <groupId>${project.groupId}</groupId>
> <artifactId>my-api</artifactId>
> <version>${project.version}</version>
> </dependency>
> <dependency>
> <groupId>${project.groupId}</groupId>
> <artifactId>my-manager</artifactId>
> <version>${project.version}</version>
> </dependency>
> <dependency>
> <groupId>${project.groupId}</groupId>
> <artifactId>my-impl</artifactId>
> <version>${project.version}</version>
> </dependency>
>
> in the feature.xml generated, I have
> <features>
> <feature name='my-api' version='0.1.0' >
> <bundle>mvn:com.eaton.pqsoft/my-api/0.1.0</bundle>
> </feature>
> <feature name='my-manager' version='0.1.0' >
> <feature version='0.1.0'>my-api</feature>
> <bundle>mvn:com.eaton.pqsoft/my-manager/0.1.0</bundle>
> </feature>
> <feature name='my-impl' version='0.1.0' >
> <bundle>mvn:commons-lang/commons-lang/2.6</bundle>
> <feature version='0.1.0'>my-api</feature>
> <bundle>mvn:commons-io/commons-io/2.0.1</bundle>
> <bundle>mvn:commons-codec/commons-codec/1.4</bundle>
> <bundle>mvn:com.eaton.pqsoft/my-impl/0.1.0</bundle>
> </feature>
> </features>
>
> Ok, but if I want a feature named "my" where inside I have this:
> <feature name='my' version='0.1.0' >
> <feature version='0.1.0'>my-manager</feature>
> <feature version='0.1.0'>my-impl</feature>
> </feature>
> In the plugin's documentation, I don't find, any information to add
> manually, or automatically somethings like this.
> Is there a solution to my problem?
>
> Thanks
>
> Regards
>
>
>
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/karaf-features-maven-plugin-tp4033284.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Charlie Mordant
Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent
Re: karaf:features-maven-plugin
Posted by xav <xa...@eaton.com>.
Hi all,
Actually, I used gmaven-plugin (<goal>execute</goal>) to manipulate my
generated file (done by features-maven-plugin), It's works, but to improve
the features-maven-plugin, it's will be great.
Regards
--
View this message in context: http://karaf.922171.n3.nabble.com/karaf-features-maven-plugin-tp4033284p4033389.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: karaf:features-maven-plugin
Posted by xav <xa...@eaton.com>.
thanks, I will post my feedback
Regards
--
View this message in context: http://karaf.922171.n3.nabble.com/karaf-features-maven-plugin-tp4033284p4033292.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: karaf:features-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Using velocity for instance, you can change the XML. It should work ;)
Regards
JB
On 05/27/2014 02:48 PM, xav wrote:
> Hi JB,
>
> Yes it's will be great. Thank you for this improvement.
> To automatize my feature's file, perhaps is there a plugin which allow to
> append a string in the built file?
>
>
> regards
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/karaf-features-maven-plugin-tp4033284p4033290.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: karaf:features-maven-plugin
Posted by xav <xa...@eaton.com>.
Hi JB,
Yes it's will be great. Thank you for this improvement.
To automatize my feature's file, perhaps is there a plugin which allow to
append a string in the built file?
regards
--
View this message in context: http://karaf.922171.n3.nabble.com/karaf-features-maven-plugin-tp4033284p4033290.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: karaf:features-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Xav,
includeDependencies allows you to embed the <dependencies/> set in your
feature (not refer to another feature).
I don't think that you want is supported yet. As I'm working of the
karaf-maven-plugin for 3.0.2, I can take a look on that.
Regards
JB
On 05/27/2014 02:31 PM, xav wrote:
> Hi, all
>
> Thanks a lot for yours answers, it's useful for my project.
> With your inputs, I found somethings very interesting, for my, but, it's
> does not work!!
>
> in the features-maven-plugin:
>
> <configuration>
> <includeDependencies>true</includeDependencies>
> <outputFile>target/features.xml</outputFile>
> </configuration>
>
> the doc say: Should we generate a feature for the current project's
> dependencies? and it's exactly what I want, to having a feature name,
> including all my dependencies, but I have not the feature name????
>
> Regards
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/karaf-features-maven-plugin-tp4033284p4033287.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: karaf:features-maven-plugin
Posted by xav <xa...@eaton.com>.
Hi, all
Thanks a lot for yours answers, it's useful for my project.
With your inputs, I found somethings very interesting, for my, but, it's
does not work!!
in the features-maven-plugin:
<configuration>
<includeDependencies>true</includeDependencies>
<outputFile>target/features.xml</outputFile>
</configuration>
the doc say: Should we generate a feature for the current project's
dependencies? and it's exactly what I want, to having a feature name,
including all my dependencies, but I have not the feature name????
Regards
--
View this message in context: http://karaf.922171.n3.nabble.com/karaf-features-maven-plugin-tp4033284p4033287.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: karaf:features-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Xav,
you mean using the generate-feature goal of the plugin ?
Honestly, if you want some "special" configuration like this, you have
to create the feature by hand and upload the feature XML artifact using
the build-helper-plugin to attach the artifact.
By the way, soon in the karaf-maven-plugin, it will be possible to
resolve the transitive features (in the install-kar goal first).
Regards
JB
On 05/27/2014 08:59 AM, xav wrote:
> Hi all,
>
> Question about this plugin.
>
> in my case it's work very well, just, I would like add a "feature cap", i.e.
> if I have the following dependencies
> <dependency>
> <groupId>${project.groupId}</groupId>
> <artifactId>my-api</artifactId>
> <version>${project.version}</version>
> </dependency>
> <dependency>
> <groupId>${project.groupId}</groupId>
> <artifactId>my-manager</artifactId>
> <version>${project.version}</version>
> </dependency>
> <dependency>
> <groupId>${project.groupId}</groupId>
> <artifactId>my-impl</artifactId>
> <version>${project.version}</version>
> </dependency>
>
> in the feature.xml generated, I have
> <features>
> <feature name='my-api' version='0.1.0' >
> <bundle>mvn:com.eaton.pqsoft/my-api/0.1.0</bundle>
> </feature>
> <feature name='my-manager' version='0.1.0' >
> <feature version='0.1.0'>my-api</feature>
> <bundle>mvn:com.eaton.pqsoft/my-manager/0.1.0</bundle>
> </feature>
> <feature name='my-impl' version='0.1.0' >
> <bundle>mvn:commons-lang/commons-lang/2.6</bundle>
> <feature version='0.1.0'>my-api</feature>
> <bundle>mvn:commons-io/commons-io/2.0.1</bundle>
> <bundle>mvn:commons-codec/commons-codec/1.4</bundle>
> <bundle>mvn:com.eaton.pqsoft/my-impl/0.1.0</bundle>
> </feature>
> </features>
>
> Ok, but if I want a feature named "my" where inside I have this:
> <feature name='my' version='0.1.0' >
> <feature version='0.1.0'>my-manager</feature>
> <feature version='0.1.0'>my-impl</feature>
> </feature>
> In the plugin's documentation, I don't find, any information to add
> manually, or automatically somethings like this.
> Is there a solution to my problem?
>
> Thanks
>
> Regards
>
>
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/karaf-features-maven-plugin-tp4033284.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com