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 necessaryDefaultRepositorySystemSession
MavenWorkingSession
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, wait
addRemoteRepo, disableMavenCentral, getDeclaredDependencies, getDependenciesForResolution, getDependencyManagement, getParsedPomFile, loadPomFromFile, resolveDependencies, resolveVersionRange
public MavenWorkingSession configureSettingsFromFile(File globalSettings, File userSettings) throws InvalidConfigurationFileException
MavenWorkingSession
configureSettingsFromFile
in interface MavenWorkingSession
globalSettings
- File which represents global settings fileuserSettings
- File which represents user settings fileInvalidConfigurationFileException
public MavenWorkingSession regenerateSession()
MavenWorkingSession
regenerateSession
in interface MavenWorkingSession
public void setOffline(boolean offline)
MavenWorkingSession
setOffline
in interface MavenWorkingSession
offline
- Whether or not to set this session in "offline" modepublic void disableClassPathWorkspaceReader()
MavenWorkingSession
disableClassPathWorkspaceReader
in interface MavenWorkingSession
public void useLegacyLocalRepository(boolean useLegacyLocalRepository)
MavenWorkingSession
useLegacyLocalRepository
in interface MavenWorkingSession
useLegacyLocalRepository
- 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.DefaultRepositorySystemSession
protected org.apache.maven.settings.Settings getSettings()
Settings
.Settings
SettingsManager.getSettings()
protected boolean isOffline()
SettingsManager.isOffline()
protected MavenRepositorySystem getSystem()
MavenRepositorySystem
.MavenRepositorySystem
Copyright © 2022 JBoss by Red Hat. All rights reserved.