public class MavenDependencyBuilder extends Object
A helper class for resolving dependency using maven.
| Constructor and Description |
|---|
MavenDependencyBuilder()
Creates new instance of
MavenDependencyBuilder class. |
| Modifier and Type | Method and Description |
|---|---|
void |
addDependency(String artifactName,
String artifactVersion,
String... exclusions)
Adds the dependency to the builder.
|
File[] |
getDependencies()
Retrieves the list of resolved artifacts.
|
void |
importPomDependencies(String pomFile,
String[] exclusions)
Loads the project dependencies from given pom file.
|
void |
setUseMavenOffline(boolean useMavenOffline)
Sets whether to use maven in offline mode.
|
public MavenDependencyBuilder()
Creates new instance of MavenDependencyBuilder class.
public void setUseMavenOffline(boolean useMavenOffline)
Sets whether to use maven in offline mode.
useMavenOffline - whether to use maven in offline modepublic void addDependency(String artifactName, String artifactVersion, String... exclusions)
Adds the dependency to the builder.
artifactName - the name of maven artifactartifactVersion - the version of maven artifactexclusions - the list of excluded maven artifactspublic void importPomDependencies(String pomFile, String[] exclusions)
Loads the project dependencies from given pom file.
public File[] getDependencies()
Retrieves the list of resolved artifacts.
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.