Class AbstractKeyBasedMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
au.net.causal.maven.plugins.jgitcrypt.AbstractKeyBasedMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractDecryptFileMojo,AbstractEncryptFileMojo,DecryptFilesMojo,EncryptFilesMojo
public abstract class AbstractKeyBasedMojo
extends org.apache.maven.plugin.AbstractMojo
Abstract mojo that uses a git-crypt key. The key may be sourced from either a base-64 encoded property value,
a base64-encoded value read from a server password in the user's settings, a private key file defined in a server in the user's settings,
or a key file specified by property. Only one of these three settings should be defined.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.maven.execution.MavenSessionprotected org.apache.maven.project.MavenProjectFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected GitcryptKeyLoads the git-crypt key using one of the key properties.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
mavenSession
@Parameter(defaultValue="${session}", readonly=true, required=true) protected org.apache.maven.execution.MavenSession mavenSession -
project
@Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
-
-
Constructor Details
-
AbstractKeyBasedMojo
public AbstractKeyBasedMojo()
-
-
Method Details
-
getGitcryptKeyLocationDescription
- Returns:
- a textual description of the key location, used for log messages.
-
loadGitcryptKey
Loads the git-crypt key using one of the key properties.- Returns:
- the loaded git-crypt key.
- Throws:
org.apache.maven.plugin.MojoExecutionException- if an error occurs loading the key, or no key is found or defined.
-