Class EncryptFromClipboardMojo
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.EncryptFromClipboardMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="encrypt-from-clipboard",
aggregator=true,
requiresProject=false)
public class EncryptFromClipboardMojo
extends AbstractEncryptFileMojo
Encrypts text content from the user clipboard to a file. This can be used to avoid saving any decrypted data to
disk. Only works with clipboard content in text form, will fail if there is no clipboard data or clipboard data is
not text.
-
Field Summary
FieldsFields 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
-
targetFile
The file to save encrypted data to. Overwritten if it already exists.
-
-
Constructor Details
-
EncryptFromClipboardMojo
public EncryptFromClipboardMojo()
-
-
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
-