public interface MavenDependencyResolver extends DependencyBuilder<MavenDependencyResolver>, DependencyResolver<MavenResolutionFilter,MavenDependency>
Modifier and Type | Method and Description |
---|---|
MavenDependencyResolver |
configureFrom(String path)
Configures Maven from a settings.xml file
|
MavenDependencyResolver |
exclusion(String exclusion)
Adds an exclusion for current dependency.
|
MavenDependencyResolver |
exclusions(Collection<String> exclusions)
Adds multiple exclusions for current dependency
|
MavenDependencyResolver |
exclusions(String... exclusions)
Adds multiple exclusions for current dependency
|
MavenDependencyResolver |
goOffline()
Disables touching remote repositories at all, rely on local repository only
|
MavenDependencyResolver |
includeDependenciesFromPom(String path)
Resolves based upon dependencies declared in the POM at the specified path
|
MavenDependencyResolver |
loadDependenciesFromPom(String path)
Deprecated.
please use
includeDependenciesFromPom(String) instead |
MavenDependencyResolver |
loadDependenciesFromPom(String path,
MavenResolutionFilter filter)
Deprecated.
please use
includeDependenciesFromPom(String) instead |
MavenDependencyResolver |
loadMetadataFromPom(String path)
Loads remote repositories for a POM file.
|
MavenDependencyResolver |
loadReposFromPom(String path)
Deprecated.
please use
loadMetadataFromPom(String) instead |
MavenDependencyResolver |
optional(boolean optional)
Sets dependency as optional.
|
MavenDependencyResolver |
scope(String scope)
Sets a scope of dependency
|
MavenDependencyResolver |
useCentralRepo(boolean useCentral)
Sets the resolver to either consider (or not) Maven Central in resolution
|
artifact, artifacts
resolveAs, resolveAs, resolveAsFiles, resolveAsFiles
MavenDependencyResolver configureFrom(String path)
path
- A path to a settings.xml configuration fileMavenDependencyResolver loadMetadataFromPom(String path) throws ResolutionException
pathx
- A path to the POM file, must not be null
or emptyException
ResolutionException
@Deprecated MavenDependencyResolver loadReposFromPom(String path) throws ResolutionException
loadMetadataFromPom(String)
insteadpath
- A path to the POM file, must not be null
or emptyException
ResolutionException
MavenDependencyResolver scope(String scope)
scope
- A scope, for example @{code compile}, @{code test} and othersMavenDependencyResolver optional(boolean optional)
optional
flagoptional
- Optional flagMavenDependencyResolver exclusion(String exclusion)
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 valuesMavenDependencyResolver exclusions(String... exclusions)
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 valuesMavenDependencyResolver exclusions(Collection<String> exclusions)
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 valuesMavenDependencyResolver includeDependenciesFromPom(String path) throws ResolutionException
path
- ResolutionException
@Deprecated MavenDependencyResolver loadDependenciesFromPom(String path) throws ResolutionException
includeDependenciesFromPom(String)
insteadpath
- ResolutionException
@Deprecated MavenDependencyResolver loadDependenciesFromPom(String path, MavenResolutionFilter filter) throws ResolutionException
includeDependenciesFromPom(String)
insteadpath
- filter
- ResolutionException
MavenDependencyResolver useCentralRepo(boolean useCentral)
useCentral
- a flag whether to use Maven centralMavenDependencyResolver goOffline()
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.