[ 
https://issues.apache.org/jira/browse/FELIX-1492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744204#action_12744204
 ] 

David Savage commented on FELIX-1492:
-------------------------------------

This is similar to a used case found in the sigil resolver where the user 
wishes to analyse how a bundle would resolve in different configurations. In 
the sigil resolver the api for resolve looks like:

public interface IBundleResolver
{
    IResolution resolve( IModelElement element, ResolutionConfig config, 
IResolutionMonitor monitor )
        throws ResolutionException;
}

Where element is an OSGi bundle or something that contains bundles (such as a 
karaf feature) and config is a pretty crude bitmask style filter telling the 
resolver what to do when it get's to certain branches in the graph.

public class ResolutionConfig {
...
    public static final int INCLUDE_DEPENDENTS = 1;
    public static final int INCLUDE_OPTIONAL = 2;
    public static final int IGNORE_ERRORS = 4;
    /** Return only bundles that are indexed locally */
    public static final int INDEXED_ONLY = 8;
    /** Return only bundles that are stored or cached locally */
    public static final int LOCAL_ONLY = 16;
}

Sure there are a /lot/ more options on here in the end game. Also not 
suggesting that this API is perfect but thought it useful to flag it's 
existence for this issue.

> Add option to exclude optional dependencies during OBR deploy
> -------------------------------------------------------------
>
>                 Key: FELIX-1492
>                 URL: https://issues.apache.org/jira/browse/FELIX-1492
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>            Reporter: Allen Lau
>            Priority: Minor
>
> Currently, OBR client will pull down all optional dependencies from the OBR 
> repository if found.  Sometimes this is not desirable for the end-user.  
> Would be nice to have an optional flag to the OBR "deploy" and "start" 
> commands to exclude optional dependencies.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to