Maven 2 Jalopy Plugin

This plugin is for formatting java source files following a coding convention. Please see Jalopy Home Page.

This plugin will format all java source files in the sourceDirectory and testDirectory following a coding convention.

Available Configuration Options

ParameterOptionalDescription
fileFormatOptionalSets 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. Defaults to "AUTO" (case insensitive).
historyOptionalSpecifies the history policy to use. Either one of "COMMENT", "FILE" or "NONE"
can be used. Defaults to "none".
failOnErrorOptionalIndicates whether a run should be held if errors occured. Defaults to "true".
conventionOptionalSets the preferences file to use - given either relative to the project's basedir or
as an absolute local path or internet address. If omitted, the current preferences
are used, if available. Otherwise the Jalopy build-in defaults will be used.
The built-in configuration file is called jalopy.xml, so take care of not putting your
configuration file in the default package with the same name.
srcIncludesPatternOptionalFor Source Directory. Specifies a fileset source file to format. This is a comma-
or space-separated list of patterns of files. Defaults to **\*.java.
srcExcludesPatternOptionalFor Source Directory. Source files excluded from format. This is a comma- or
space-separated list of patterns of files. Defaults to **\*.exc
testIncludesPatternOptionalFor Test Directory. Specifies a fileset source file to format. This is a comma- or
space-separated list of patterns of files. Defaults to **\*.java.
testExcludesPatternOptionalFor Test Directory. Source files excluded from format. This is a comma- or
space-separated list of patterns of files. Defaults to **\*.exc

How to Use

<project>
   ...
      <build>
         ...
         <plugins>
            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>jalopy-maven-plugin</artifactId>
               <version>1.0-SNAPSHOT</version>
            </plugin>
         </plugins>
         ...
      </build>
   ...
</project>

To run Jalopy plugin

m2 jalopy:format