Class ContextOverrides.Builder
java.lang.Object
eu.maveniverse.maven.mima.context.ContextOverrides.Builder
- Enclosing class:
ContextOverrides
-
Method Summary
Modifier and TypeMethodDescriptionaddRepositoriesOp(ContextOverrides.AddRepositoriesOp addRepositoriesOp) How to handle therepositories(List)provided list.build()Builds an immutable instance ofContextOverridesusing so far applied settings and configuration.checksumPolicy(ContextOverrides.ChecksumPolicy checksumPolicy) Sets the checksum update policy.configProperties(Map<String, Object> configProperties) Sets Maven Configuration Properties to be used.extraArtifactTypes(List<org.eclipse.aether.artifact.ArtifactType> extraArtifactTypes) Sets the list ofArtifactTypeinstances you want to extend resolver with.ignoreArtifactDescriptorRepositories(boolean ignoreArtifactDescriptorRepositories) Sets ignore artifact descriptor repositories.offline(boolean offline) Sets session offline.repositories(List<org.eclipse.aether.repository.RemoteRepository> repositories) Sets the list ofRemoteRepositoryinstance you want to use.repositoryListener(org.eclipse.aether.RepositoryListener repositoryListener) SetsRepositoryListenerinstance to be used.snapshotUpdatePolicy(ContextOverrides.SnapshotUpdatePolicy snapshotUpdatePolicy) Sets the snapshot update policy.systemProperties(Map<String, String> systemProperties) Sets Maven System Properties to be used.transferListener(org.eclipse.aether.transfer.TransferListener transferListener) SetsTransferListenerinstance to be used.userProperties(Map<String, String> userProperties) Sets Maven User Properties to be used.withActiveProfileIds(List<String> activeProfileIds) Sets explicitly activated profile IDs.withBasedirOverride(Path basedirOverride) Overrides basedir path (cwd), it must be non-nulland point to an existing directory.withEffectiveSettings(Object effectiveSettings) Sets Maven Effective Settings.withEffectiveSettingsMixin(Object effectiveSettingsMixin) Sets Maven Effective Settings mixin.withGlobalSettingsXmlOverride(Path globalSettingsXmlOverride) Overrides Maven Global settings.xml location.withGlobalToolchainsXmlOverride(Path globalToolchainsXmlOverride) Overrides Maven Global toolchains.xml location.withInactiveProfileIds(List<String> inactiveProfileIds) Sets explicitly inactivated profile IDs.withLocalRepositoryOverride(Path localRepositoryOverride) Overrides Maven User local repository location.withMavenSystemHomeOverride(Path mavenSystemHomeOverride) Sets Maven System Home override.withMavenUserHomeOverride(Path mavenUserHomeOverride) Override for Maven User Home.withUserSettings(boolean withUserSettings) Enables or disables use of userSettingsXml, used to find out location of local repository, authentication, remote repositories and many more.withUserSettingsSecurityXmlOverride(Path userSettingsSecurityXmlOverride) Overrides Maven User settings-security.xml location.withUserSettingsXmlOverride(Path userSettingsXmlOverride) Overrides Maven User settings.xml location.withUserToolchainsXmlOverride(Path userToolchainsXmlOverride) Overrides Maven User toolchains.xml location.
-
Method Details
-
withBasedirOverride
Overrides basedir path (cwd), it must be non-nulland point to an existing directory. If these are not met, this method will throw. Basedir by default is initialized withCWDthat is "current working directory" of the process.- Since:
- 2.3.0
-
systemProperties
Sets Maven System Properties to be used. Users usually don't want to tamper with this. -
userProperties
Sets Maven User Properties to be used. These override the Maven System Properties. -
configProperties
Sets Maven Configuration Properties to be used. These acceptObjectvalues, and may be used for advanced configuration of some Resolver aspect. Usually users don't want to tamper with these. -
repositories
public ContextOverrides.Builder repositories(List<org.eclipse.aether.repository.RemoteRepository> repositories) Sets the list ofRemoteRepositoryinstance you want to use. The list may replace or append the list of repositories coming from Maven, seeContextOverrides.addRepositoriesOp().If
withUserSettings(boolean)invoked withtrue, thesettings.xmldiscovered repositories (and many more) will be used to create context. Also, in case when MIMA runs within Maven, the current project repositories will be provided. -
addRepositoriesOp
public ContextOverrides.Builder addRepositoriesOp(ContextOverrides.AddRepositoriesOp addRepositoriesOp) How to handle therepositories(List)provided list.- Since:
- 2.4.0
-
extraArtifactTypes
public ContextOverrides.Builder extraArtifactTypes(List<org.eclipse.aether.artifact.ArtifactType> extraArtifactTypes) Sets the list ofArtifactTypeinstances you want to extend resolver with. The list will append the existing list of types coming from Maven.In case when MIMA runs within Maven, this is ignored.
- Since:
- 2.4.11
-
offline
Sets session offline. -
ignoreArtifactDescriptorRepositories
public ContextOverrides.Builder ignoreArtifactDescriptorRepositories(boolean ignoreArtifactDescriptorRepositories) Sets ignore artifact descriptor repositories.- Since:
- 2.4.13
-
snapshotUpdatePolicy
public ContextOverrides.Builder snapshotUpdatePolicy(ContextOverrides.SnapshotUpdatePolicy snapshotUpdatePolicy) Sets the snapshot update policy. -
checksumPolicy
Sets the checksum update policy. -
withUserSettings
Enables or disables use of userSettingsXml, used to find out location of local repository, authentication, remote repositories and many more. -
withActiveProfileIds
Sets explicitly activated profile IDs.- Since:
- 2.3.0
-
withInactiveProfileIds
Sets explicitly inactivated profile IDs.- Since:
- 2.3.0
-
repositoryListener
public ContextOverrides.Builder repositoryListener(org.eclipse.aether.RepositoryListener repositoryListener) SetsRepositoryListenerinstance to be used. -
transferListener
public ContextOverrides.Builder transferListener(org.eclipse.aether.transfer.TransferListener transferListener) SetsTransferListenerinstance to be used. -
withMavenUserHomeOverride
Override for Maven User Home.- Since:
- 2.4.0
-
withUserSettingsXmlOverride
Overrides Maven User settings.xml location.- Since:
- 2.3.0
-
withUserSettingsSecurityXmlOverride
public ContextOverrides.Builder withUserSettingsSecurityXmlOverride(Path userSettingsSecurityXmlOverride) Overrides Maven User settings-security.xml location.- Since:
- 2.3.0
-
withUserToolchainsXmlOverride
Overrides Maven User toolchains.xml location.- Since:
- 2.4.0
-
withLocalRepositoryOverride
Overrides Maven User local repository location.- Since:
- 2.1.0
-
withMavenSystemHomeOverride
Sets Maven System Home override.- Since:
- 2.4.0
-
withGlobalSettingsXmlOverride
Overrides Maven Global settings.xml location.- Since:
- 2.3.0
-
withGlobalToolchainsXmlOverride
Overrides Maven Global toolchains.xml location.- Since:
- 2.4.0
-
withEffectiveSettings
Sets Maven Effective Settings. If set, this fully replaces any discovered settings.Important: it must be "effective" (all paths interpolated, resolved, etc.), as this object is accepted as is, there is no any processing applied to it!
- Since:
- 2.3.0
-
withEffectiveSettingsMixin
Sets Maven Effective Settings mixin. If set, this is merged into effective settings.Important: it must be "effective" (all paths interpolated, resolved, etc.), as this object is accepted as is, there is no any processing applied to it!
- Since:
- 2.4.0
-
build
Builds an immutable instance ofContextOverridesusing so far applied settings and configuration.
-