public abstract class ConfigurableMavenWorkingSessionImpl extends Object implements MavenWorkingSession
MavenWorkingSession, encapsulating Maven/Aether backend.
This is an abstract class and doesn't contain all the implementation - this class contains:
DefaultRepositorySystemSession when necessaryDefaultRepositorySystemSessionMavenWorkingSession that doesn't need to have created an instance
of the DefaultRepositorySystemSession for its callingSettings| Constructor and Description |
|---|
ConfigurableMavenWorkingSessionImpl() |
| 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
|
protected org.eclipse.aether.DefaultRepositorySystemSession |
getSession()
Returns an instance of the
DefaultRepositorySystemSession that is generated if hasn't been yet. |
protected org.apache.maven.settings.Settings |
getSettings()
Returns an instance of the
Settings. |
protected MavenRepositorySystem |
getSystem()
Returns an instance of the
MavenRepositorySystem. |
protected boolean |
isOffline()
Returns whether the resolver should work in offline mode or not
|
MavenWorkingSession |
regenerateSession()
Refreshes underlying Aether session in order to contain newly acquired information, such as new settings.xml
content
|
void |
setOffline(boolean offline)
Whether or not to set this session in "offline" mode
|
void |
useLegacyLocalRepository(boolean useLegacyLocalRepository)
Whether or not to track origin of artifacts present is local repository
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddRemoteRepo, disableMavenCentral, getDeclaredDependencies, getDependenciesForResolution, getDependencyManagement, getParsedPomFile, loadPomFromFile, resolveDependencies, resolveVersionRangepublic MavenWorkingSession configureSettingsFromFile(File globalSettings, File userSettings) throws InvalidConfigurationFileException
MavenWorkingSessionconfigureSettingsFromFile in interface MavenWorkingSessionglobalSettings - File which represents global settings fileuserSettings - File which represents user settings fileInvalidConfigurationFileExceptionpublic MavenWorkingSession regenerateSession()
MavenWorkingSessionregenerateSession in interface MavenWorkingSessionpublic void setOffline(boolean offline)
MavenWorkingSessionsetOffline in interface MavenWorkingSessionoffline - Whether or not to set this session in "offline" modepublic void disableClassPathWorkspaceReader()
MavenWorkingSessiondisableClassPathWorkspaceReader in interface MavenWorkingSessionpublic void useLegacyLocalRepository(boolean useLegacyLocalRepository)
MavenWorkingSessionuseLegacyLocalRepository in interface MavenWorkingSessionuseLegacyLocalRepository - Whether to ignore origin of artifacts in local repository; defaults to falseprotected org.eclipse.aether.DefaultRepositorySystemSession getSession()
DefaultRepositorySystemSession that is generated if hasn't been yet.DefaultRepositorySystemSessionprotected org.apache.maven.settings.Settings getSettings()
Settings.SettingsSettingsManager.getSettings()protected boolean isOffline()
SettingsManager.isOffline()protected MavenRepositorySystem getSystem()
MavenRepositorySystem.MavenRepositorySystemCopyright © 2025 JBoss by Red Hat. All rights reserved.