Hi David,
A good thing could be to declare all your feature's dependencies on the
feature's pom with an <exclusion>*</> on them.
Then, you can reference that features pom on your business module
Example:
* In the feature's pom
<artId>featArtId</artId>
<depMngmt>
<dep>com.mycom:mydep:${myversion}
<excl>*</excl>
</dep>
</depMngmt>
<dep>com.mycom:mydep</dep>
<!-- You also have to list transitive ones...-->
* In the feature:
<feat "myFeat">
<bundle>mvn:com.mycom:mydep:${myversion}</bundle>
</feat>
* In your business module pom:
<dep>
mygroup:featArtId:xml:feature
</dep>
That's a little work and overhead, but it works :).
Regards,
2014-07-15 21:04 GMT+02:00 Michael Täschner <[email protected]>:
> Hi David,
>
> I don't know if this if helpful for you:
> In Servicemix (last checked with SMX 4.5) the features are generated
> inside a separate module based on declarations in dependencyManagement
> section of the pom. I use this to "import" the pom of this module into
> my project to gain access to all dependencies declared inside the
> servicemix features. Locally I can then pick and select the needed
> dependencies without having to worry about the version. In combination
> with the option in M2E you can see all inherited dependencies for your
> local project/module.
>
> Cheers,
> Michael
>
> 2014-07-15 18:46 GMT+02:00 David Bosschaert <[email protected]>:
> > Hi all,
> >
> > Just wondering whether this is possible. I'm using a Karaf feature at
> > runtime and want to make sure that at build time I'm picking up all
> > the dependencies exactly like they are in the feature (i.e. same
> > bundles at compile time as at runtime).
> >
> > So I was wondering is there a way to use a Karaf feature as some sort
> > of a composite dependency in Maven?
> >
> > Thanks,
> >
> > David
>
--
Charlie Mordant
Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent