Generate Features XML and dependency types

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Generate Features XML and dependency types

iocanel
Hi,

I was trying to generate the features xml for a web application using the
features-maven-plugin and having the war as a dependency.
It seems to me to the generate features mojo ignores the dependency type.
Example:

My dependency looks like this

    <dependency>
        <groupId>net.iocanel.sample</groupId>
        <artifactId>web</artifactId>
        <version>1.0-SNAPSHOT</version>
        <type>war</type>
    </dependency>

The generated feature looks like this

  <feature name='web' version='1.0-SNAPSHOT'>
    <bundle>mvn:net.iocanel.sample/web/1.0-SNAPSHOT</bundle>
  </feature>

I would expect
<bundle>mvn:net.iocanel.sample/web/1.0-SNAPSHOT/war</bundle>

This causes two problems:
a) The feature is not getting installed.
b) Transitive dependency bundles are not added to the feature.

I would create a jira issue, but I am not sure if I miss something here.
--
Ioannis D. Canellos
Ioannis Canellos
http://iocanel.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: Generate Features XML and dependency types

Guillaume Nodet
I think it's just a bug.  We haven't had much exposure with the
generation of features xml, so there are chances a lot of use cases
aren't covered yet.

On Tue, Aug 24, 2010 at 15:25, Ioannis Canellos <[hidden email]> wrote:

> Hi,
>
> I was trying to generate the features xml for a web application using the
> features-maven-plugin and having the war as a dependency.
> It seems to me to the generate features mojo ignores the dependency type.
> Example:
>
> My dependency looks like this
>
>    <dependency>
>        <groupId>net.iocanel.sample</groupId>
>        <artifactId>web</artifactId>
>        <version>1.0-SNAPSHOT</version>
>        <type>war</type>
>    </dependency>
>
> The generated feature looks like this
>
>  <feature name='web' version='1.0-SNAPSHOT'>
>    <bundle>mvn:net.iocanel.sample/web/1.0-SNAPSHOT</bundle>
>  </feature>
>
> I would expect
> <bundle>mvn:net.iocanel.sample/web/1.0-SNAPSHOT/war</bundle>
>
> This causes two problems:
> a) The feature is not getting installed.
> b) Transitive dependency bundles are not added to the feature.
>
> I would create a jira issue, but I am not sure if I miss something here.
> --
> Ioannis D. Canellos
>



--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com
Reply | Threaded
Open this post in threaded view
|

Re: Generate Features XML and dependency types

iocanel
The first problem (depedency type is ignonred) is just uniplemented.
The second has to do with the fact that maven transitive dependencies from
war artifacts are not inherited and thus the plug-in cannot find the
bundles.

Maybe we should change the discoveryBundles method to treat non-classpath
dependencies(e.g. war etc) differently. By differently I mean to search for
bundles inside the dependency pom.




On Tue, Aug 24, 2010 at 4:29 PM, Guillaume Nodet <[hidden email]> wrote:

> I think it's just a bug.  We haven't had much exposure with the
> generation of features xml, so there are chances a lot of use cases
> aren't covered yet.
>
> On Tue, Aug 24, 2010 at 15:25, Ioannis Canellos <[hidden email]> wrote:
> > Hi,
> >
> > I was trying to generate the features xml for a web application using the
> > features-maven-plugin and having the war as a dependency.
> > It seems to me to the generate features mojo ignores the dependency type.
> > Example:
> >
> > My dependency looks like this
> >
> >    <dependency>
> >        <groupId>net.iocanel.sample</groupId>
> >        <artifactId>web</artifactId>
> >        <version>1.0-SNAPSHOT</version>
> >        <type>war</type>
> >    </dependency>
> >
> > The generated feature looks like this
> >
> >  <feature name='web' version='1.0-SNAPSHOT'>
> >    <bundle>mvn:net.iocanel.sample/web/1.0-SNAPSHOT</bundle>
> >  </feature>
> >
> > I would expect
> > <bundle>mvn:net.iocanel.sample/web/1.0-SNAPSHOT/war</bundle>
> >
> > This causes two problems:
> > a) The feature is not getting installed.
> > b) Transitive dependency bundles are not added to the feature.
> >
> > I would create a jira issue, but I am not sure if I miss something here.
> > --
> > Ioannis D. Canellos
> >
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>



--
Ioannis D. Canellos
Ioannis Canellos
http://iocanel.blogspot.com