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
Constructors -
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:ExecutorToolPerforms a diagnostic dump of the environment.- Specified by:
dumpin interfaceExecutorTool- Parameters:
executorRequest- nevernull- Throws:
ExecutorException
-
localRepository
Description copied from interface:ExecutorToolReturns the location of local repository, as detected by Maven. TheuserSettingsparam may contain some override (equivalent of-s settings.xmlon CLI).- Specified by:
localRepositoryin interfaceExecutorTool- Parameters:
executorRequest- nevernull- Throws:
ExecutorException
-
artifactPath
public String artifactPath(ExecutorRequest.Builder executorRequest, String gav, String repositoryId) throws ExecutorException Description copied from interface:ExecutorToolReturns relative (toExecutorTool.localRepository(ExecutorRequest.Builder)) path of given artifact in local repository.- Specified by:
artifactPathin interfaceExecutorTool- Parameters:
executorRequest- nevernullgav- the usual resolver artifact GAV string, nevernullrepositoryId- 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:ExecutorToolReturns relative (toExecutorTool.localRepository(ExecutorRequest.Builder)) path of given metadata in local repository. The metadata coordinates in form of[G]:[A]:[V]:[type]. Absence ofAimplies absence ofVas well (in other words, it can beG,G:AorG:A:V). The absence oftypeimplies it is "maven-metadata.xml". The simplest spec string is:::.Examples:
:::is root metadata named "maven-metadata.xml":::my-metadata.xmlis root metadata named "my-metadata.xml"G:::equals toG:::maven-metadata.xmlG:A::equals toG:A::maven-metadata.xml
- Specified by:
metadataPathin interfaceExecutorTool- Parameters:
executorRequest- nevernullgav- the resolver metadata GAV stringrepositoryId- the remote repository ID in case "remote metadata" is asked for- Throws:
ExecutorException
-