public class MavenWorkingSessionImpl extends ConfigurableMavenWorkingSessionImpl
MavenWorkingSession, encapsulating Maven/Aether backend| Constructor 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, useLegacyLocalRepositorypublic Set<MavenDependency> getDependencyManagement()
MavenWorkingSessionCoordinate.toCanonicalForm() and also affect transitive
dependency resolutions.MavenDependencyspublic List<MavenDependency> getDependenciesForResolution()
MavenWorkingSessionSet of dependencies to be resolved for this sessionMavenDependencys 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
MavenWorkingSessionpomFile - which represents Project Object Model fileprofiles - List of profiles to activated/disabledInvalidConfigurationFileExceptionpublic Collection<MavenResolvedArtifact> resolveDependencies(MavenResolutionStrategy strategy) throws ResolutionException
ResolutionExceptionpublic MavenVersionRangeResult resolveVersionRange(MavenCoordinate coordinate) throws VersionResolutionException
MavenWorkingSessioncoordinate - The coordinateVersionResolutionException - If the version range request failspublic ParsedPomFile getParsedPomFile()
MavenWorkingSessionpublic void disableMavenCentral()
public void addRemoteRepo(MavenRemoteRepository repository)
repository - The remote repositoryMavenWorkingSession.addRemoteRepo(MavenRemoteRepository)Copyright © 2025 JBoss by Red Hat. All rights reserved.