Class PropertiesMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="properties",
          defaultPhase=GENERATE_RESOURCES,
          requiresDependencyResolution=COMPILE)
    public class PropertiesMojo
    extends org.tentackle.maven.AbstractTentackleMojo
    Generates maven properties from other maven properties.

    Example:

       <propertyDescriptors>
         <propertyDescriptor>
          <input>${dbPasswd}</input>
          <converter>@org.tentackle.common.Cryptor</converter>
          <property>encryptedPasswd</property>
         </propertyDescriptor>
       </propertyDescriptors>
     

    The converter is a FQCN of a singleton with a no-args constructor. Because it must be in the classpath of the tentackle-maven-plugin, its artifact must be placed within the plugin's <dependencies>.
    If the FQCN starts with an @, the converter is looked up via META-INF/services.

    Important: the converters must be stateless because their instances are cached!

    Author:
    harald
    • Field Summary

      • Fields inherited from class org.tentackle.maven.AbstractTentackleMojo

        charset, JDK_TOOLCHAIN, resourceDirs, verbosity, verbosityLevel
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertiesMojo()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void executeImpl()  
      • Methods inherited from class org.tentackle.maven.AbstractTentackleMojo

        determineEncoding, determineJavaToolVersion, determineVerbosity, execute, findResourceDirs, finishExecute, getCanonicalPath, getMajorVersion, getMavenProject, getMavenSession, getMojoExecution, getPathRelativeToBasedir, getResourceDirName, getSettings, getSettingsDecrypter, getToolchain, getToolchain, getToolchain, getToolchainManager, getToolFinder, isExecutionRecursive, isSkippedByDefault, loadResourceFileIntoString, prepareExecute, validate
      • 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
    • Constructor Detail

      • PropertiesMojo

        public PropertiesMojo()
    • Method Detail

      • executeImpl

        public void executeImpl()
                         throws org.apache.maven.plugin.MojoExecutionException,
                                org.apache.maven.plugin.MojoFailureException
        Specified by:
        executeImpl in class org.tentackle.maven.AbstractTentackleMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException