Class AbstractWritePropertiesMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    WriteActiveProfileProperties, WriteProjectProperties

    public abstract class AbstractWritePropertiesMojo
    extends org.apache.maven.plugin.AbstractMojo
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File outputFile  
      private org.apache.maven.project.MavenProject project  
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.File getOutputFile()  
      org.apache.maven.project.MavenProject getProject()  
      private void storeWithoutTimestamp​(java.util.Properties properties, java.io.File outputFile, java.lang.String comments)  
      protected void validateOutputFile()  
      protected void writeProperties​(java.util.Properties properties, java.io.File file)  
      • 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
      • Methods inherited from interface org.apache.maven.plugin.Mojo

        execute
    • Field Detail

      • project

        @Parameter(defaultValue="${project}",
                   required=true,
                   readonly=true)
        private org.apache.maven.project.MavenProject project
      • outputFile

        @Parameter(required=true)
        private java.io.File outputFile
    • Constructor Detail

      • AbstractWritePropertiesMojo

        public AbstractWritePropertiesMojo()
    • Method Detail

      • writeProperties

        protected void writeProperties​(java.util.Properties properties,
                                       java.io.File file)
                                throws org.apache.maven.plugin.MojoExecutionException
        Parameters:
        properties - Properties
        file - File
        Throws:
        org.apache.maven.plugin.MojoExecutionException - MojoExecutionException
      • storeWithoutTimestamp

        private void storeWithoutTimestamp​(java.util.Properties properties,
                                           java.io.File outputFile,
                                           java.lang.String comments)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • validateOutputFile

        protected void validateOutputFile()
                                   throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException - MojoExecutionException
      • getProject

        public org.apache.maven.project.MavenProject getProject()
        Returns:
        MavenProject
      • getOutputFile

        public java.io.File getOutputFile()
        Returns:
        outputFile