abstract class AbstractDockerMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
private String |
dockerHost
URL of the docker host as specified in pom.xml.
|
protected org.apache.maven.plugin.MojoExecution |
execution |
private String |
registryUrl |
private org.sonatype.plexus.components.sec.dispatcher.SecDispatcher |
secDispatcher
https://issues.apache.org/jira/browse/MNG-4384
|
private String |
serverId |
protected org.apache.maven.execution.MavenSession |
session |
private org.apache.maven.settings.Settings |
settings
The system settings for Maven.
|
| Constructor and Description |
|---|
AbstractDockerMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected com.spotify.docker.client.messages.AuthConfig |
authConfig()
Builds the AuthConfig object from server details.
|
void |
execute() |
protected abstract void |
execute(com.spotify.docker.client.DockerClient dockerClient) |
protected com.spotify.docker.client.DefaultDockerClient.Builder |
getBuilder() |
private String |
getEmail(org.apache.maven.settings.Server server)
Get the email from the server configuration in
~/.m2/settings.xml. |
private boolean |
incompleteAuthSettings(String username,
String password,
String email)
Checks for incomplete private Docker registry authorization settings.
|
protected String |
rawDockerHost() |
@Component(role=org.apache.maven.execution.MavenSession.class) protected org.apache.maven.execution.MavenSession session
@Component(role=org.apache.maven.plugin.MojoExecution.class) protected org.apache.maven.plugin.MojoExecution execution
@Component private org.apache.maven.settings.Settings settings
@Component(role=org.sonatype.plexus.components.sec.dispatcher.SecDispatcher.class,
hint="mng-4384")
private org.sonatype.plexus.components.sec.dispatcher.SecDispatcher secDispatcher
@Parameter(property="dockerHost") private String dockerHost
@Parameter(property="serverId") private String serverId
@Parameter(property="registryUrl") private String registryUrl
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected com.spotify.docker.client.DefaultDockerClient.Builder getBuilder()
throws com.spotify.docker.client.DockerCertificateException
com.spotify.docker.client.DockerCertificateExceptionprotected abstract void execute(com.spotify.docker.client.DockerClient dockerClient)
throws Exception
Exceptionprotected String rawDockerHost()
private String getEmail(org.apache.maven.settings.Server server)
~/.m2/settings.xml.
The abovemy-private-docker-registry [...]foo@bar.com
settings.xml would return "foo@bar.com".server - Serverprivate boolean incompleteAuthSettings(String username, String password, String email)
username - Auth username.password - Auth password.email - Auth email.protected com.spotify.docker.client.messages.AuthConfig authConfig()
throws org.apache.maven.plugin.MojoExecutionException,
org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException
org.apache.maven.plugin.MojoExecutionExceptionorg.sonatype.plexus.components.sec.dispatcher.SecDispatcherExceptionCopyright © 2015. All rights reserved.