net.sf.maven.plugins.eclipseformat
Class EclipseFormatMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by net.sf.maven.plugins.eclipseformat.EclipseFormatMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class EclipseFormatMojo
extends org.apache.maven.plugin.AbstractMojo

Format java source files with the Eclipse java formatter.

Version:
$Revision: 13 $

Field Summary
protected static java.lang.String CODE_FORMAT_CONFIG
           
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
EclipseFormatMojo()
           
 
Method Summary
 void execute()
          
 void setFailOnError(boolean failOnError)
           Set the failOnError value.
 void setFileEncoding(java.lang.String fileEncoding)
          Set the fileEncoding value.
 void setFileFormat(java.lang.String fileFormat)
           Set the fileFormat value.
 void setFormatConfig(java.lang.String formatConfig)
          Set the formatConfig value.
 void setProject(org.apache.maven.project.MavenProject project)
          Set the project value.
 void setSourceDirectory(java.io.File sourceDirectory)
           Set the sourceDirectory value.
 void setSrcExcludesPattern(java.lang.String srcExcludesPattern)
           Set the srcExcludesPattern value.
 void setSrcIncludesPattern(java.lang.String srcIncludesPattern)
           Set the srcIncludesPattern value.
 void setTestExcludesPattern(java.lang.String testExcludesPattern)
           Set the testExcludesPattern value.
 void setTestIncludesPattern(java.lang.String testIncludesPattern)
           Set the testIncludesPattern value.
 void setTestSourceDirectory(java.io.File testSourceDirectory)
           Set the testSourceDirectory value.
 
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 Detail

CODE_FORMAT_CONFIG

protected static final java.lang.String CODE_FORMAT_CONFIG
See Also:
Constant Field Values
Constructor Detail

EclipseFormatMojo

public EclipseFormatMojo()
Method Detail

execute

public void execute()


setFileFormat

public void setFileFormat(java.lang.String fileFormat)

Set the fileFormat value.

Sets the file format of the output files. The file format controls what end of line character is used. Either one of "UNIX", "DOS", "MAC", "DEFAULT" or "AUTO" can be used. The values are case insensitive.

Parameters:
fileFormat - the value to set.

setFailOnError

public void setFailOnError(boolean failOnError)

Set the failOnError value.

Indicates whether a run should be held if errors occured.

Parameters:
failOnError - the value to set.

setSourceDirectory

public void setSourceDirectory(java.io.File sourceDirectory)

Set the sourceDirectory value.

Expression ${project.build.sourceDirectory}

Parameters:
sourceDirectory - the value to set.

setTestSourceDirectory

public void setTestSourceDirectory(java.io.File testSourceDirectory)

Set the testSourceDirectory value.

Expression ${project.build.testSourceDirectory}

Parameters:
testSourceDirectory - the value to set.

setSrcIncludesPattern

public void setSrcIncludesPattern(java.lang.String srcIncludesPattern)

Set the srcIncludesPattern value.

For Source Directory. Specifies filesets defining which source files to format. This is a comma- or space-separated list of patterns of files.

Parameters:
srcIncludesPattern - the value to set.

setSrcExcludesPattern

public void setSrcExcludesPattern(java.lang.String srcExcludesPattern)

Set the srcExcludesPattern value.

For Source Directory. Specifies filesets defining which source files not to format. This is a comma- or space-separated list of patterns of files. Default value is **\*.exc.

Parameters:
srcExcludesPattern - the value to set.

setTestIncludesPattern

public void setTestIncludesPattern(java.lang.String testIncludesPattern)

Set the testIncludesPattern value.

For Test Directory. Specifies filesets defining which test source files to format. This is a comma- or space-separated list of patterns of files.

Parameters:
testIncludesPattern - the value to set.

setTestExcludesPattern

public void setTestExcludesPattern(java.lang.String testExcludesPattern)

Set the testExcludesPattern value.

For Test Directory. Specifies filesets defining which test source files not to format. This is a comma- or space-separated list of patterns of files. Default value is *\*\*.exc.

Parameters:
testExcludesPattern - the value to set.

setFormatConfig

public void setFormatConfig(java.lang.String formatConfig)
Set the formatConfig value.

Parameters:
formatConfig - the value to set.

setFileEncoding

public void setFileEncoding(java.lang.String fileEncoding)
Set the fileEncoding value.

Parameters:
fileEncoding - the value to set.

setProject

public void setProject(org.apache.maven.project.MavenProject project)
Set the project value.

Parameters:
project - the value to set.


Copyright © 2010. All Rights Reserved.