public class AuthConfigFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static String[] |
DEFAULT_REGISTRIES |
| Constructor and Description |
|---|
AuthConfigFactory(org.codehaus.plexus.PlexusContainer container)
Constructor which should be used during startup phase of a plugin
|
| Modifier and Type | Method and Description |
|---|---|
AuthConfig |
createAuthConfig(boolean isPush,
Map authConfigMap,
org.apache.maven.settings.Settings settings,
String user,
String registry)
Create an authentication config object which can be used for communication with a Docker registry
The authentication information is looked up at various places (in this order):
From system properties
From the provided map which can contain key-value pairs
From the Maven settings stored typically in ~/.m2/settings.xml
The following properties (prefix with 'docker.') and config key are evaluated:
username: User to authenticate
password: Password to authenticate.
|
public static final String[] DEFAULT_REGISTRIES
public AuthConfigFactory(org.codehaus.plexus.PlexusContainer container)
container - the container used for do decrytion of passwordspublic AuthConfig createAuthConfig(boolean isPush, Map authConfigMap, org.apache.maven.settings.Settings settings, String user, String registry) throws org.apache.maven.plugin.MojoExecutionException
isPush - if true this authconfig is created for a push, if false its for a pullauthConfigMap - String-String Map holding configuration info from the plugin's configuration. Can be null in
which case the settings are consulted.settings - the global Maven settings objectuser - user to check forregistry - registry to use, might be null in which case a default registry is checked,null if none could be foundorg.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionExceptionCopyright © 2016. All Rights Reserved.