Package org.codehaus.mojo.properties
Class AbstractWritePropertiesMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.properties.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
FieldsFields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.maven.project.MavenProject
private void
storeWithoutTimestamp
(Properties properties, File outputFile, String comments) protected void
protected void
writeProperties
(Properties properties, 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 Details
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject project -
outputFile
-
-
Constructor Details
-
AbstractWritePropertiesMojo
public AbstractWritePropertiesMojo()
-
-
Method Details
-
writeProperties
protected void writeProperties(Properties properties, File file) throws org.apache.maven.plugin.MojoExecutionException - Parameters:
properties
-Properties
file
-File
- Throws:
org.apache.maven.plugin.MojoExecutionException
-MojoExecutionException
-
storeWithoutTimestamp
private void storeWithoutTimestamp(Properties properties, File outputFile, String comments) throws IOException - Throws:
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
- Returns:
outputFile
-