Author:  Mike Atkinson Software
Release Notes
Download
Contributors

Previous Page

Pretty Ant Task

Next Page

<pretty/> simply gives you the chance to integrate source-beautification on selected source files into your build process. It's great tool for teams that work on open source projects. The coding convention is defined in a pretty.settings file and <pretty/> task defined before the compile target. <pretty/> is smart enough not to reformat unmodified code if cvs="true" parameter specified and using CVS as the source control system. It also does not try to beautify if the compiled form source file is older than source file.

Parameters

Attribute Description Required
settingsdir Directory where JavaStyle settings are placed. Under this directory a ".Refactory" sub-directory holds the style settings. Yes
cvs If true then try to beautify only files that are either new or modified in CVS, do not try to reformat something not modified by current user, so the file is not modified unnecessarily. No, default is false
compileDir If true then try to beautify only files that are modified after the last compile. No, default is false

Usage example

<taskdef name="pretty" classname="org.acm.seguin.ant.Pretty" classpath="lib/pretty.jar;lib/JavaStyle.jar"/>

<pretty settingsDir="${my.config.dir}" cvs="true" compileDir="${build.dir}/classes">
	<fileset dir="${src.dir}">
		<include name="**/*.java" />
	</fileset>
</pretty>
Previous Page

Last Modified: October 7, 2003

Previous Page