ShrinkWrap Resolver Maven API 2.0.0-alpha-1

org.jboss.shrinkwrap.resolver.api.maven
Interface MavenDependencyBuilder

All Superinterfaces:
Child<MavenDependencyResolver>, DependencyBuilder<MavenDependencyBuilder>, DependencyResolver<MavenResolutionFilter,MavenDependency>

public interface MavenDependencyBuilder
extends Child<MavenDependencyResolver>, DependencyBuilder<MavenDependencyBuilder>, DependencyResolver<MavenResolutionFilter,MavenDependency>


Method Summary
 MavenDependencyBuilder exclusion(String exclusion)
          Adds an exclusion for current dependency.
 MavenDependencyBuilder exclusions(Collection<String> exclusions)
          Adds multiple exclusions for current dependency/dependencies
 MavenDependencyBuilder exclusions(String... exclusions)
          Adds multiple exclusions for current dependency/dependencies
 MavenDependencyBuilder optional(boolean optional)
          Sets dependency/dependencies as optional.
 MavenDependencyBuilder scope(String scope)
          Sets a scope of dependency/dependencies
 
Methods inherited from interface org.jboss.shrinkwrap.resolver.api.Child
up
 
Methods inherited from interface org.jboss.shrinkwrap.resolver.api.DependencyBuilder
artifact, artifacts
 
Methods inherited from interface org.jboss.shrinkwrap.resolver.api.DependencyResolver
resolveAs, resolveAs, resolveAsFiles, resolveAsFiles
 

Method Detail

scope

MavenDependencyBuilder scope(String scope)
Sets a scope of dependency/dependencies

Parameters:
scope - A scope, for example @{code compile}, @{code test} and others
Returns:
Artifact builder with scope set

optional

MavenDependencyBuilder optional(boolean optional)
Sets dependency/dependencies as optional. If dependency is marked as optional, it is always resolved, however, the dependency graph can later be filtered based on optional flag

Parameters:
optional - Optional flag
Returns:
Artifact builder with optional flag set

exclusion

MavenDependencyBuilder exclusion(String exclusion)
Adds an exclusion for current dependency.

Parameters:
exclusion - the exclusion to be added to list of artifacts to be excluded, specified in the format <groupId>:<artifactId>[:<extension>[:<classifier>]], an empty string or * will match all exclusions, you can pass an * instead of any part of the coordinates to match all possible values
Returns:
Artifact builder with added exclusion

exclusions

MavenDependencyBuilder exclusions(String... exclusions)
Adds multiple exclusions for current dependency/dependencies

Parameters:
exclusions - the exclusions to be added to the list of artifacts to be excluded, specified in the format <groupId>:<artifactId>[:<extension>[:<classifier>]], an empty string or * will match all exclusions, you can pass an * instead of any part of the coordinates to match all possible values
Returns:
Artifact builder with added exclusions

exclusions

MavenDependencyBuilder exclusions(Collection<String> exclusions)
Adds multiple exclusions for current dependency/dependencies

Parameters:
exclusions - the exclusions to be added to the list of artifacts to be excluded, specified in the format <groupId>:<artifactId>[:<extension>[:<classifier>]], an empty string or * will match all exclusions, you can pass an * instead of any part of the coordinates to match all possible values
Returns:
Artifact builder with added exclusions

ShrinkWrap Resolver Maven API 2.0.0-alpha-1

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.