public class MavenWorkingSessionImpl extends Object implements MavenWorkingSession
MavenWorkingSession, encapsulating Maven/Aether backend| Constructor and Description |
|---|
MavenWorkingSessionImpl() |
| Modifier and Type | Method and Description |
|---|---|
MavenWorkingSession |
configureSettingsFromFile(File globalSettings,
File userSettings)
Loads Maven configuration and updates session settings accordingly.
|
void |
disableClassPathWorkspaceReader()
Disables the classpath workspace reader which may be used to resolve from dependencies on the ClassPath
|
void |
disableMavenCentral()
Disables use of the Maven Central Repository
|
Set<MavenDependency> |
getDeclaredDependencies()
Metadata for all defined
elements |
List<MavenDependency> |
getDependenciesForResolution()
Gets the
Set of dependencies to be resolved for this session |
Set<MavenDependency> |
getDependencyManagement()
Gets a set af dependency declarations stored in version management.
|
ParsedPomFile |
getParsedPomFile()
Returns an abstraction of Project Object Model.
|
MavenWorkingSession |
loadPomFromFile(File pomFile,
String... profiles)
Loads an effective POM file and updates session settings accordingly.
|
MavenWorkingSession |
regenerateSession()
Refreshes underlying Aether session in order to contain newly acquired information, such as new settings.xml
content
|
Collection<MavenResolvedArtifact> |
resolveDependencies(MavenResolutionStrategy strategy) |
MavenVersionRangeResult |
resolveVersionRange(MavenCoordinate coordinate)
Resolves version range request for given coordinate
|
void |
setOffline(boolean offline)
Whether or not to set this session in "offline" mode
|
public Set<MavenDependency> getDependencyManagement()
MavenWorkingSessionMavenDependency#getAddress() address and also affect transitive
dependency resolutions.getDependencyManagement in interface MavenWorkingSessionMavenDependencyspublic List<MavenDependency> getDependenciesForResolution()
MavenWorkingSessionSet of dependencies to be resolved for this sessiongetDependenciesForResolution in interface MavenWorkingSessionMavenDependencys to be resolved as part of the request to the backend; may be a subset of
MavenWorkingSession.getDeclaredDependencies() after pre-request filtering has been donepublic Set<MavenDependency> getDeclaredDependencies()
elementsgetDeclaredDependencies in interface MavenWorkingSessionMavenWorkingSession.getDeclaredDependencies()public MavenWorkingSession loadPomFromFile(File pomFile, String... profiles) throws InvalidConfigurationFileException
MavenWorkingSessionloadPomFromFile in interface MavenWorkingSessionpomFile - which represents Project Object Model fileprofiles - List of profiles to activated/disabledInvalidConfigurationFileExceptionpublic MavenWorkingSession configureSettingsFromFile(File globalSettings, File userSettings) throws InvalidConfigurationFileException
MavenWorkingSessionconfigureSettingsFromFile in interface MavenWorkingSessionglobalSettings - File which represents global settings fileuserSettings - File which represents user settings fileInvalidConfigurationFileExceptionpublic Collection<MavenResolvedArtifact> resolveDependencies(MavenResolutionStrategy strategy) throws ResolutionException
resolveDependencies in interface MavenWorkingSessionResolutionExceptionpublic MavenVersionRangeResult resolveVersionRange(MavenCoordinate coordinate) throws VersionResolutionException
MavenWorkingSessionresolveVersionRange in interface MavenWorkingSessionVersionResolutionExceptionpublic ParsedPomFile getParsedPomFile()
MavenWorkingSessiongetParsedPomFile in interface MavenWorkingSessionpublic MavenWorkingSession regenerateSession()
MavenWorkingSessionregenerateSession in interface MavenWorkingSessionpublic void setOffline(boolean offline)
MavenWorkingSessionsetOffline in interface MavenWorkingSessionpublic void disableClassPathWorkspaceReader()
disableClassPathWorkspaceReader in interface MavenWorkingSessionMavenWorkingSession.disableClassPathWorkspaceReader()public void disableMavenCentral()
disableMavenCentral in interface MavenWorkingSessionMavenWorkingSession.disableMavenCentral()Copyright © 2013 JBoss by Red Hat. All rights reserved.