Class EncryptMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
au.net.causal.maven.plugins.jgitcrypt.AbstractKeyBasedMojo
au.net.causal.maven.plugins.jgitcrypt.AbstractEncryptFileMojo
au.net.causal.maven.plugins.jgitcrypt.EncryptMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="encrypt",
aggregator=true,
requiresProject=false)
public class EncryptMojo
extends AbstractEncryptFileMojo
Encrypts a single file. The original source file is not modified, rather the encrypted data is written to
a separate file.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FileThe file to encrypt.protected FileEncrypted 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 data to encrypt.protected OutputStreamStream to write encrypted 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 encrypt. -
targetFile
Encrypted data is written to this file. Overwritten if it already exists.
-
-
Constructor Details
-
EncryptMojo
public EncryptMojo()
-
-
Method Details
-
sourceInputStream
Description copied from class:AbstractEncryptFileMojoStream of data to encrypt.- Specified by:
sourceInputStreamin classAbstractEncryptFileMojo- Throws:
IOException
-
targetOutputStream
Description copied from class:AbstractEncryptFileMojoStream to write encrypted data to.- Specified by:
targetOutputStreamin classAbstractEncryptFileMojo- 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 classAbstractEncryptFileMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-