ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Brodski <brodsky_bo...@yahoo.com.INVALID>
Subject Re: Selecting optional dependencies of OSGi-bundles with Ivy (+150 bounty on StackOverflow)
Date Tue, 15 Jul 2014 16:16:29 GMT
Hello Nicolas,


thank you for the quick reply. I use your suggestion already, but specifying the version is
some kind nasty, especially if you have many such optional dependencies.

Is there really absolutely no possibility to just activate a configuration of a bundle, like

<dependency org="bundle" name="org.eclipse.jdt"> <!-- No version here -->
   <conf name="use_xyz"/>
</dependency>
 
This would be completely enough for me!


Cheers,
Boris


On Tuesday, July 15, 2014 3:43 PM, Nicolas Lalevée <nicolas.lalevee@hibnet.org> wrote:
 


Hi,

Le 15 juil. 2014 à 11:18, Boris Brodski <brodsky_boris@yahoo.com.INVALID> a écrit
:

> Hello,
> 
> 
> I posted a question about selecting optional dependencies of OSGI-bundle on Stackoverflow:

> 
> ant - Selecting optional dependencies of OSGi-bundles with Ivy - Stack Overflow
> 
>  
>          
> ant - Selecting optional dependencies of OSGi-bundles with Ivy - Stack Overflow
> I use Ivy to resolve OSGi bundles, like org.eclipse.jdt: <dependencies> <dependency
org="bundle" name="org.eclipse.jdt" rev="x.y.z"/>
> </dependencies>  
> View on stackoverflow.com Preview by Yahoo  
>  
> 
> Even issuing a bounty of +150 didn't helped... No answers, no comments. (The bounty expired
within 24 hours.)
> 
> I going to repost my question here hoping to get an answer and also hoping to give away
+150 reputation on StackOverflow.
> 
> 
> 
> I use Ivy to resolve OSGi bundles, like org.eclipse.jdt:
> <dependencies><dependencyorg="bundle"name="org.eclipse.jdt"rev="x.y.z"/></dependencies>
> It works fine and gives me all mandatory dependencies.
> My question is, how can I select some (not all) optional dependencies of transitive bundles?
> I can:
>     * Select optional dependencies of org.eclipse.jdt by activating use_xxx configuration
>     * Select all optional dependencies using transitive-optional configuration
> What I actually need is a possibility to globally activate a configuration use_yyy. Globally
means (applying to all transitive dependencies):
>     * If a module doesn't have this configuration, do nothing
>     * If a module does have this configuration, activate it

Only the first solution you suggest is possible.

But if in your use case you need an optional dependency to be fetched, then it is actually
required for you. So in your ivy.xml, put an extra line about the dependency you require.
The non ideal point here is about choosing the right version of your dependency. With a pure
OSGi resolver, you just declare a dependency on a bundle symbolic name, OSGi will figure out
the version which can match while looking up the optional dependencies. Ivy cannot do that,
there is no notion of optionality, either the configuration is in the dependency graph, either
it's not. So you'll have to put a version to the extra dependency.

Nicolas


> 
> 
> Thank you very much for help!
> 
> 
> Kind regards,
> Boris Brodski
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message