Class ToolboxTool
java.lang.Object
org.apache.maven.cling.executor.internal.ToolboxTool
- All Implemented Interfaces:
ExecutorTool
ExecutorTool
implementation based on Maveniverse Toolbox. It uses Toolbox mojos to implement all the
required operations.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionartifactPath
(ExecutorRequest.Builder executorRequest, String gav, String repositoryId) Returns relative (toExecutorTool.localRepository(ExecutorRequest.Builder)
) path of given artifact in local repository.dump
(ExecutorRequest.Builder executorRequest) Performs a diagnostic dump of the environment.localRepository
(ExecutorRequest.Builder executorRequest) Returns the location of local repository, as detected by Maven.metadataPath
(ExecutorRequest.Builder executorRequest, String gav, String repositoryId) Returns relative (toExecutorTool.localRepository(ExecutorRequest.Builder)
) path of given metadata in local repository.
-
Constructor Details
-
ToolboxTool
-
-
Method Details
-
dump
Description copied from interface:ExecutorTool
Performs a diagnostic dump of the environment.- Specified by:
dump
in interfaceExecutorTool
- Parameters:
executorRequest
- nevernull
- Throws:
ExecutorException
-
localRepository
Description copied from interface:ExecutorTool
Returns the location of local repository, as detected by Maven. TheuserSettings
param may contain some override (equivalent of-s settings.xml
on CLI).- Specified by:
localRepository
in interfaceExecutorTool
- Parameters:
executorRequest
- nevernull
- Throws:
ExecutorException
-
artifactPath
public String artifactPath(ExecutorRequest.Builder executorRequest, String gav, String repositoryId) throws ExecutorException Description copied from interface:ExecutorTool
Returns relative (toExecutorTool.localRepository(ExecutorRequest.Builder)
) path of given artifact in local repository.- Specified by:
artifactPath
in interfaceExecutorTool
- Parameters:
executorRequest
- nevernull
gav
- the usual resolver artifact GAV string, nevernull
repositoryId
- the remote repository ID in case "remote artifact" is asked for- Throws:
ExecutorException
-
metadataPath
public String metadataPath(ExecutorRequest.Builder executorRequest, String gav, String repositoryId) throws ExecutorException Description copied from interface:ExecutorTool
Returns relative (toExecutorTool.localRepository(ExecutorRequest.Builder)
) path of given metadata in local repository. The metadata coordinates in form of[G]:[A]:[V]:[type]
. Absence ofA
implies absence ofV
as well (in other words, it can beG
,G:A
orG:A:V
). The absence oftype
implies it is "maven-metadata.xml". The simplest spec string is:::
.Examples:
:::
is root metadata named "maven-metadata.xml":::my-metadata.xml
is root metadata named "my-metadata.xml"G:::
equals toG:::maven-metadata.xml
G:A::
equals toG:A::maven-metadata.xml
- Specified by:
metadataPath
in interfaceExecutorTool
- Parameters:
executorRequest
- nevernull
gav
- the resolver metadata GAV stringrepositoryId
- the remote repository ID in case "remote metadata" is asked for- Throws:
ExecutorException
-