Class DecryptMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
au.net.causal.maven.plugins.jgitcrypt.AbstractKeyBasedMojo
au.net.causal.maven.plugins.jgitcrypt.AbstractDecryptFileMojo
au.net.causal.maven.plugins.jgitcrypt.DecryptMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="decrypt",
aggregator=true,
requiresProject=false)
public class DecryptMojo
extends AbstractDecryptFileMojo
Decrypt a single git-crypt encrypted file. Original encrypted file is not modified, rather the decrypted data is written
to a separate target file.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FileThe file to decrypt.protected FileDecrypted data is written to this file.Fields inherited from class au.net.causal.maven.plugins.jgitcrypt.AbstractKeyBasedMojo
mavenSession, projectFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()protected InputStreamStream of encrypted data to decrypt.protected OutputStreamStream to write decrypted data to.Methods inherited from class au.net.causal.maven.plugins.jgitcrypt.AbstractKeyBasedMojo
getGitcryptKeyLocationDescription, loadGitcryptKeyMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
sourceFile
The file to decrypt. -
targetFile
Decrypted data is written to this file. Will be overwritten if it already exists.
-
-
Constructor Details
-
DecryptMojo
public DecryptMojo()
-
-
Method Details
-
sourceInputStream
Description copied from class:AbstractDecryptFileMojoStream of encrypted data to decrypt.- Specified by:
sourceInputStreamin classAbstractDecryptFileMojo- Throws:
IOException
-
targetOutputStream
Description copied from class:AbstractDecryptFileMojoStream to write decrypted data to.- Specified by:
targetOutputStreamin classAbstractDecryptFileMojo- Throws:
IOException
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classAbstractDecryptFileMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-