Class BootstrapMavenContextConfig<T extends BootstrapMavenContextConfig<?>>
java.lang.Object
io.quarkus.bootstrap.resolver.maven.BootstrapMavenContextConfig<T>
- Direct Known Subclasses:
MavenArtifactResolver.Builder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected booleanprotected BootstrapMavenOptionsprotected LocalProjectprotected Booleanprotected Stringprotected Booleanprotected booleanprotected List<org.eclipse.aether.repository.RemoteRepository>protected org.eclipse.aether.impl.RemoteRepositoryManagerprotected List<org.eclipse.aether.repository.RemoteRepository>protected org.eclipse.aether.RepositorySystemSessionprotected org.eclipse.aether.RepositorySystemprotected Pathprotected org.apache.maven.settings.crypto.SettingsDecrypterprotected Fileprotected Booleanprotected booleanprotected Boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexcludeSisuBeanPackage(String packageName) getPomForDirOrNull(Path basedir) Resolves a POM file for a basedir.includeSisuBeanPackage(String packageName) setArtifactTransferLogging(boolean artifactTransferLogging) Whether to enable progress logging of artifact transfers.setCurrentProject(LocalProject currentProject) Workspace in the context of which this configuration is being initializedsetCurrentProject(String currentProject) The meaning of this option is equivalent to alternative POM in Maven, which can be specified with command line argument '-f'.setEffectiveModelBuilder(boolean effectiveModelBuilder) When workspace is loaded, the current implementation reads the POM files of every project found and initializes the workspace model based on the raw POMs.setLocalRepository(String localRepo) Local repository locationsetOffline(boolean offline) Whether to operate offlinesetPreferPomsFromWorkspace(boolean preferPomsFromWorkspace) By default POM artifacts of modules with packaging other thanpomare resolved from the workspace only if the main artifact has been built locally, otherwise both the main artifact and the POM will be resolved from a Maven repository (local and/or remote).setProjectModelProvider(Function<Path, org.apache.maven.model.Model> modelProvider) When workspace discovery is enabled, this method allows to set a POM provider that would return aModelfor a given workspace module directory.setRemotePluginRepositories(List<org.eclipse.aether.repository.RemoteRepository> remotePluginRepos) Remote plugin repositories that should be used by the resolversetRemoteRepositories(List<org.eclipse.aether.repository.RemoteRepository> remoteRepos) Remote repositories that should be used by the resolversetRemoteRepositoryManager(org.eclipse.aether.impl.RemoteRepositoryManager remoteRepoManager) Remote repository managersetRepositorySystem(org.eclipse.aether.RepositorySystem repoSystem) RepositorySystem that should be used by the resolversetRepositorySystemSession(org.eclipse.aether.RepositorySystemSession repoSession) RepositorySystemSession that should be used by the resolversetRootProjectDir(Path rootProjectDir) Root project directory.setSettingsDecrypter(org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter) Settings decryptorsetUserSettings(File userSettings) User Maven settings file locationsetWarnOnFailedWorkspaceModules(boolean warnOnFailedWorkspaceModules) Whether to warn about failures loading workspace modules instead of throwing errorssetWorkspaceDiscovery(boolean workspaceDiscovery) Enables or disables workspace discovery.setWorkspaceModuleParentHierarchy(boolean wsModuleParentHierarchy) Whether to enable initialization of the parent hierarchy for discoveredWorkspaceModules.
-
Field Details
-
localRepo
-
offline
-
currentProject
-
workspaceDiscovery
protected boolean workspaceDiscovery -
repoSystem
protected org.eclipse.aether.RepositorySystem repoSystem -
repoSession
protected org.eclipse.aether.RepositorySystemSession repoSession -
remoteRepos
-
remotePluginRepos
-
remoteRepoManager
protected org.eclipse.aether.impl.RemoteRepositoryManager remoteRepoManager -
settingsDecrypter
protected org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter -
alternatePomName
-
userSettings
-
artifactTransferLogging
protected boolean artifactTransferLogging -
cliOptions
-
rootProjectDir
-
preferPomsFromWorkspace
protected boolean preferPomsFromWorkspace -
effectiveModelBuilder
-
wsModuleParentHierarchy
-
modelProvider
-
excludeSisuBeanPackages
-
includeSisuBeanPackages
-
warnOnFailedWorkspaceModules
-
-
Constructor Details
-
BootstrapMavenContextConfig
public BootstrapMavenContextConfig()
-
-
Method Details
-
excludeSisuBeanPackage
-
getExcludeSisuBeanPackages
-
includeSisuBeanPackage
-
getIncludeSisuBeanPackages
-
setLocalRepository
Local repository location- Parameters:
localRepo- local repository location- Returns:
- this instance
-
setOffline
Whether to operate offline- Parameters:
offline- whether to operate offline- Returns:
-
setCurrentProject
Workspace in the context of which this configuration is being initialized- Parameters:
currentProject- current project- Returns:
-
setWorkspaceDiscovery
Enables or disables workspace discovery. By default, workspace discovery is enabled, meaning that when the resolver is created in the context of a Maven project, the Maven's project POM configuration will be picked up by the resolver and all the local projects belonging to the workspace will be resolved at their original locations instead of the actually artifacts installed in the repository.- Parameters:
workspaceDiscovery- enables or disables workspace discovery- Returns:
- this instance of the builder
-
setRepositorySystem
RepositorySystem that should be used by the resolver- Parameters:
repoSystem-- Returns:
-
setRepositorySystemSession
RepositorySystemSession that should be used by the resolver- Parameters:
repoSession- repository session- Returns:
-
setRemoteRepositories
Remote repositories that should be used by the resolver- Parameters:
remoteRepos- remote repositories- Returns:
-
setRemotePluginRepositories
public T setRemotePluginRepositories(List<org.eclipse.aether.repository.RemoteRepository> remotePluginRepos) Remote plugin repositories that should be used by the resolver- Parameters:
remotePluginRepos- remote plugin repositories- Returns:
-
setRemoteRepositoryManager
public T setRemoteRepositoryManager(org.eclipse.aether.impl.RemoteRepositoryManager remoteRepoManager) Remote repository manager- Parameters:
remoteRepoManager-- Returns:
-
setSettingsDecrypter
Settings decryptor- Parameters:
settingsDecrypter- settings decrypter- Returns:
-
setCurrentProject
The meaning of this option is equivalent to alternative POM in Maven, which can be specified with command line argument '-f'.- Parameters:
currentProject-- Returns:
-
setUserSettings
User Maven settings file location- Parameters:
userSettings-- Returns:
-
setArtifactTransferLogging
Whether to enable progress logging of artifact transfers. The default value is true.- Parameters:
artifactTransferLogging-- Returns:
-
getPomForDirOrNull
Resolves a POM file for a basedir.- Parameters:
basedir- project's basedir- Returns:
- POM file for the basedir or null, if it could not be resolved
-
setRootProjectDir
Root project directory.- Parameters:
rootProjectDir- root project directory- Returns:
- this instance
-
setPreferPomsFromWorkspace
By default POM artifacts of modules with packaging other thanpomare resolved from the workspace only if the main artifact has been built locally, otherwise both the main artifact and the POM will be resolved from a Maven repository (local and/or remote).Enabling this option will make the resolver ignore the fact that the main artifact hasn't been built yet and will pick up its
pomfrom the workspace.- Parameters:
preferPomsFromWorkspace- whether the POM artifact should always be resolved from the workspace- Returns:
- this instance
-
setEffectiveModelBuilder
When workspace is loaded, the current implementation reads the POM files of every project found and initializes the workspace model based on the raw POMs. This approach has its limitations, e.g. it doesn't properly support interpolation of POMs, including properties and profiles. But it is relatively fast compared to the resolving the effective POMs.This option enables workspace initialization based on effective POMs of every found project.
- Parameters:
effectiveModelBuilder- whether to enable effective model builder for workspace discovery- Returns:
- this instance
-
setWorkspaceModuleParentHierarchy
Whether to enable initialization of the parent hierarchy for discoveredWorkspaceModules. Enabling complete POM hierarchy is useful for project info and update use-cases but not really for runtime be it test or dev modes.- Parameters:
wsModuleParentHierarchy- whether to initialize parents forWorkspaceModule- Returns:
- this instance
-
setProjectModelProvider
When workspace discovery is enabled, this method allows to set a POM provider that would return aModelfor a given workspace module directory.- Parameters:
modelProvider- POM provider- Returns:
- this instance
-
setWarnOnFailedWorkspaceModules
Whether to warn about failures loading workspace modules instead of throwing errors- Parameters:
warnOnFailedWorkspaceModules- whether to warn about failures loading workspace modules instead of throwing errors- Returns:
- this config instance
-