Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
gathering api info for review and discuss.
/**
* A filter which accept all dependencies. This is the default behavior is no
* other filter is specified.
*/
public enum AcceptAllFilter implements MavenResolutionFilter
{
/*
* (non-Javadoc)
*
* @see
* org.jboss.shrinkwrap.resolver.maven.MavenResolutionFilter#configure(java
* .util.Collection)
*/
public MavenResolutionFilter configure(Collection<MavenDependency> dependencies);
/*
* (non-Javadoc)
*
* @see
* org.jboss.shrinkwrap.resolver.maven.MavenResolutionFilter#accept(org.jboss
* .shrinkwrap.resolver.maven.MavenResolutionElement)
*/
public boolean accept(MavenDependency element);
}
/**
* A combinator for multiple filters.
*
*/
public class CombinedFilter implements MavenResolutionFilter
{
private List<MavenResolutionFilter> filters;
/**
* Combines multiple filters in a such way that all must pass.
*
* Implementation note: The varargs arguments cannot have a type bound,
* because this leads to an unchecked cast while invoked
*
* @param filters The filters to be combined
* @throws DependencyException If any of the filter cannot be used to filter
* MavenDependencies
* @see MavenBuilderImpl
*/
public CombinedFilter(MavenResolutionFilter... filters);
/*
* (non-Javadoc)
*
* @see
* org.jboss.shrinkwrap.resolver.maven.MavenResolutionFilter#configure(java
* .util.Collection)
*/
public MavenResolutionFilter configure(Collection<MavenDependency> dependencies);
public boolean accept(MavenDependency element);
}
/**
* A filter which limits scope of the artifacts. Only the artifacts within
* specified scopes are included in resolution.
*
*
*/
public class ScopeFilter implements MavenResolutionFilter
{
/**
* Creates a filter which accepts all artifacts with no scope defined, that
* is their scope is an empty string.
*/
public ScopeFilter();
/**
* Creates a filter which accepts all artifacts that their scope is one of
* the specified.
*
* @param scopes The enumeration of allowed scopes
*/
public ScopeFilter(String... scopes);
/*
* (non-Javadoc)
*
* @see
* org.jboss.shrinkwrap.resolver.maven.MavenResolutionFilter#configure(java
* .util.Collection)
*/
public MavenResolutionFilter configure(Collection<MavenDependency> dependencies);
public boolean accept(MavenDependency dependency);
}
**
* A filter which accepts only dependencies which are directly specified in the
* builder All transitive dependencies are omitted.
*
*/
public class StrictFilter implements MavenResolutionFilter
{
/*
* (non-Javadoc)
*
* @see
* org.jboss.shrinkwrap.resolver.maven.MavenResolutionFilter#configure(java
* .util.Collection)
*/
public MavenResolutionFilter configure(Collection<MavenDependency> dependencies);
public boolean accept(MavenDependency element);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.