Package org.apache.maven.cling.executor
Interface ExecutorTool
- All Known Subinterfaces:
ExecutorHelper
- All Known Implementing Classes:
HelperImpl
,ToolboxTool
public interface ExecutorTool
A tool implementing some common Maven operations.
-
Method Summary
Modifier and TypeMethodDescriptionartifactPath
(ExecutorRequest.Builder request, String gav, String repositoryId) Returns relative (tolocalRepository(ExecutorRequest.Builder)
) path of given artifact in local repository.dump
(ExecutorRequest.Builder request) Performs a diagnostic dump of the environment.localRepository
(ExecutorRequest.Builder request) Returns the location of local repository, as detected by Maven.metadataPath
(ExecutorRequest.Builder request, String gav, String repositoryId) Returns relative (tolocalRepository(ExecutorRequest.Builder)
) path of given metadata in local repository.
-
Method Details
-
dump
Performs a diagnostic dump of the environment.- Parameters:
request
- nevernull
- Throws:
ExecutorException
-
localRepository
Returns the location of local repository, as detected by Maven. TheuserSettings
param may contain some override (equivalent of-s settings.xml
on CLI).- Parameters:
request
- nevernull
- Throws:
ExecutorException
-
artifactPath
String artifactPath(ExecutorRequest.Builder request, String gav, @Nullable String repositoryId) throws ExecutorException Returns relative (tolocalRepository(ExecutorRequest.Builder)
) path of given artifact in local repository.- Parameters:
request
- nevernull
gav
- the usual resolver artifact GAV string, nevernull
repositoryId
- the remote repository ID in case "remote artifact" is asked for- Throws:
ExecutorException
-
metadataPath
String metadataPath(ExecutorRequest.Builder request, String gav, @Nullable String repositoryId) throws ExecutorException Returns relative (tolocalRepository(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
- Parameters:
request
- nevernull
gav
- the resolver metadata GAV stringrepositoryId
- the remote repository ID in case "remote metadata" is asked for- Throws:
ExecutorException
-