Package io.apicurio.registry.maven
Class AbstractRegistryMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.apicurio.registry.maven.AbstractRegistryMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
DownloadRegistryMojo
,RegisterRegistryMojo
,TestUpdateRegistryMojo
public abstract class AbstractRegistryMojo
extends org.apache.maven.plugin.AbstractMojo
Base class for all Registry Mojo's. It handles RegistryService's (aka client) lifecycle.
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected io.apicurio.registry.rest.client.RegistryClient
createClient
(io.vertx.core.Vertx vertx) protected io.vertx.core.Vertx
void
execute()
protected abstract void
protected String
getContentTypeByExtension
(String fileName) protected void
logAndThrow
(com.microsoft.kiota.ApiException e) protected void
logAndThrow
(io.apicurio.registry.rest.client.models.ProblemDetails e) protected void
logAndThrow
(io.apicurio.registry.rest.client.models.RuleViolationProblemDetails e) void
setAuthServerUrl
(String authServerUrl) void
setClientId
(String clientId) void
setClientScope
(String clientScope) void
setClientSecret
(String clientSecret) void
setPassword
(String password) void
setRegistryUrl
(String registryUrl) void
setUsername
(String username) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
AbstractRegistryMojo
public AbstractRegistryMojo()
-
-
Method Details
-
createVertx
protected io.vertx.core.Vertx createVertx() -
createClient
protected io.apicurio.registry.rest.client.RegistryClient createClient(io.vertx.core.Vertx vertx) -
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
executeInternal
protected abstract void executeInternal() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException, ExecutionException, InterruptedException- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
ExecutionException
InterruptedException
-
getContentTypeByExtension
-
setRegistryUrl
-
setAuthServerUrl
-
setClientId
-
setClientSecret
-
setClientScope
-
setUsername
-
setPassword
-
logAndThrow
protected void logAndThrow(com.microsoft.kiota.ApiException e) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException - Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
logAndThrow
protected void logAndThrow(io.apicurio.registry.rest.client.models.ProblemDetails e) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
logAndThrow
protected void logAndThrow(io.apicurio.registry.rest.client.models.RuleViolationProblemDetails e) throws org.apache.maven.plugin.MojoFailureException - Throws:
org.apache.maven.plugin.MojoFailureException
-