maven-plugins/jalopy/plugin.jelly
2004-08-24 11:24:13 +00:00

79 lines
3.0 KiB
XML

<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project
xmlns:ant="jelly:ant"
xmlns:j="jelly:core">
<!--==================================================================-->
<!-- J A L O P Y (source code formatter) -->
<!--==================================================================-->
<goal name="jalopy"
description="Format all sources with code convention conformance"
prereqs="jalopy:format"/>
<goal name="jalopy:taskdef"
description="Define the jalopy task to Ant and Jelly">
<ant:taskdef name="jalopy"
classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
<ant:classpath>
<ant:pathelement path="${plugin.getDependencyPath('jalopy')}"/>
<ant:pathelement path="${plugin.getDependencyPath('jalopy:jalopy-ant')}"/>
<ant:pathelement path="${plugin.getDependencyPath('aelfred')}"/>
<ant:pathelement path="${plugin.getDependencyPath('jdom')}"/>
<ant:pathelement path="${plugin.getDependencyPath('log4j')}"/>
<ant:pathelement path="${plugin.getDependencyPath('oro')}"/>
<ant:pathelement path="${plugin.getDependencyPath('textarea')}"/>
</ant:classpath>
</ant:taskdef>
</goal>
<goal name="jalopy:format"
description="Format all sources with code convention conformance"
prereqs="jalopy:taskdef, java:compile">
<ant:path id="project.classpath">
<ant:path refid="maven.dependency.classpath"/>
<ant:pathelement path="${maven.build.dest}"/>
</ant:path>
<ant:jalopy fileformat="${maven.jalopy.fileFormat}"
style="${maven.jalopy.style}"
history="${maven.jalopy.history}"
loglevel="${maven.jalopy.logLevel}"
failonerror="${maven.jalopy.failOnError}"
threads="${maven.jalopy.nbThread}"
classpathref="project.classpath">
<j:if test="${sourcesPresent == 'true'}">
<ant:fileset dir="${pom.build.sourceDirectory}"
includes="${maven.jalopy.src.filesetInclude}"
excludes="${maven.jalopy.src.filesetExclude}"/>
</j:if>
<j:if test="${unitTestSourcesPresent == 'true'}">
<ant:fileset dir="${pom.build.unitTestSourceDirectory}"
includes="${maven.jalopy.test.filesetInclude}"
excludes="${maven.jalopy.test.filesetExclude}"/>
</j:if>
</ant:jalopy>
</goal>
</project>