Class GenerateKeyMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
au.net.causal.maven.plugins.jgitcrypt.GenerateKeyMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="generate-key", aggregator=true, requiresProject=false) public class GenerateKeyMojo extends org.apache.maven.plugin.AbstractMojo
Generates a new randomly generated git-crypt key and saves it to file.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected File
    The key file to write.
    protected org.apache.maven.project.MavenProject
     

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • keyFile

      @Parameter(property="jgitcrypt.key.file") protected File keyFile
      The key file to write. If it already exists, this file is overwritten. If running with a project, the default is ${project.build.directory}/gitcrypt.key.
    • project

      @Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
  • Constructor Details

    • GenerateKeyMojo

      public GenerateKeyMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException