Package org.apache.maven.plugins.help
Class AbstractHelpMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.help.AbstractHelpMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractEffectiveMojo
,ActiveProfilesMojo
,AllProfilesMojo
,DescribeMojo
,ExpressionsMojo
,SystemMojo
public abstract class AbstractHelpMojo extends org.apache.maven.plugin.AbstractMojo
Base class with some Help Mojo functionalities.- Since:
- 2.1
- Version:
- $Id: AbstractHelpMojo.java 1384337 2012-09-13 13:53:19Z olamy $
- Author:
- Vincent Siveton
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
LINE_LENGTH
The maximum length of a display line.protected File
output
Optional parameter to write the output of this help in a given file, instead of writing to the console.
-
Constructor Summary
Constructors Constructor Description AbstractHelpMojo()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static void
writeFile(File output, String content)
Utility method to write a content in a given file.protected static void
writeFile(File output, StringBuilder content)
Utility method to write a content in a given file.-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
LINE_LENGTH
protected static final int LINE_LENGTH
The maximum length of a display line.- See Also:
- Constant Field Values
-
output
@Parameter(property="output") protected File output
Optional parameter to write the output of this help in a given file, instead of writing to the console.
Note: Could be a relative path.
-
-
Method Detail
-
writeFile
protected static void writeFile(File output, StringBuilder content) throws IOException
Utility method to write a content in a given file.- Parameters:
output
- is the wanted output file.content
- contains the content to be written to the file.- Throws:
IOException
- if any- See Also:
writeFile(File, String)
-
writeFile
protected static void writeFile(File output, String content) throws IOException
Utility method to write a content in a given file.- Parameters:
output
- is the wanted output file.content
- contains the content to be written to the file.- Throws:
IOException
- if any
-
-