public class MavenWorkingSessionImpl extends ConfigurableMavenWorkingSessionImpl
MavenWorkingSession
, encapsulating Maven/Aether backendConstructor and Description |
---|
MavenWorkingSessionImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addRemoteRepo(MavenRemoteRepository repository)
Adds a remote repository to use in resolution.
|
void |
disableMavenCentral()
Disables use of the Maven Central Repository
|
Set<MavenDependency> |
getDeclaredDependencies()
Metadata for all defined
<dependencies> 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.
|
Collection<MavenResolvedArtifact> |
resolveDependencies(MavenResolutionStrategy strategy) |
MavenVersionRangeResult |
resolveVersionRange(MavenCoordinate coordinate)
Resolves version range request for given coordinate
|
configureSettingsFromFile, disableClassPathWorkspaceReader, getSession, getSettings, getSystem, isOffline, regenerateSession, setOffline, useLegacyLocalRepository
public Set<MavenDependency> getDependencyManagement()
MavenWorkingSession
Coordinate.toCanonicalForm()
and also affect transitive
dependency resolutions.MavenDependency
spublic List<MavenDependency> getDependenciesForResolution()
MavenWorkingSession
Set
of dependencies to be resolved for this sessionMavenDependency
s 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()
<dependencies>
elements<dependencies>
elementsMavenWorkingSession.getDeclaredDependencies()
public MavenWorkingSession loadPomFromFile(File pomFile, String... profiles) throws InvalidConfigurationFileException
MavenWorkingSession
pomFile
- which represents Project Object Model fileprofiles
- List of profiles to activated/disabledInvalidConfigurationFileException
public Collection<MavenResolvedArtifact> resolveDependencies(MavenResolutionStrategy strategy) throws ResolutionException
ResolutionException
public MavenVersionRangeResult resolveVersionRange(MavenCoordinate coordinate) throws VersionResolutionException
MavenWorkingSession
coordinate
- The coordinateVersionResolutionException
- If the version range request failspublic ParsedPomFile getParsedPomFile()
MavenWorkingSession
public void disableMavenCentral()
public void addRemoteRepo(MavenRemoteRepository repository)
repository
- The remote repositoryMavenWorkingSession.addRemoteRepo(MavenRemoteRepository)
Copyright © 2022 JBoss by Red Hat. All rights reserved.