maven-plugins/changes/plugin.jelly
ltheussl 1c082383cb Remove debug code
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@292350 13f79535-47bb-0310-9956-ffa450edef68
2005-09-28 23:50:08 +00:00

116 lines
3.5 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:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:define="jelly:define"
xmlns:util="jelly:util"
xmlns:c="changes:transform"
xmlns:plugin="plugin"
xmlns:doc="doc">
<goal name="maven-changes-plugin:register">
<util:file var="changes" name="${maven.docs.src}/changes.xml"/>
<j:if test="${changes.exists()}">
<doc:registerReport
name="Changes"
pluginName="changes"
link="changes-report"
description="Report on the project changes."/>
</j:if>
</goal>
<goal name="maven-changes-plugin:deregister">
<doc:deregisterReport name="Changes"/>
</goal>
<!-- ================================================================== -->
<!-- C H A N G E S R E P O R T -->
<!-- ================================================================== -->
<goal
name="changes:report"
description="Generate a changes report">
<doc:jsl
input="${maven.docs.src}/changes.xml"
output="changes-report.xml"
stylesheet="${plugin.resources}/changes.jsl"
encoding="${maven.docs.outputencoding}"
outputMode="xml"
prettyPrint="off"
/>
<tstamp>
<format property="currentYear" pattern="yyyy"/>
</tstamp>
<!-- Generate a RSS feed of the changes -->
<doc:jsl
input="${maven.docs.src}/changes.xml"
output="changes.rss"
stylesheet="${plugin.resources}/changes2rss.jsl"
encoding="${maven.docs.outputencoding}"
outputMode="xml"
prettyPrint="true"/>
<!-- Copy the RSS XML logo -->
<mkdir dir="${maven.docs.dest}/images"/>
<copy todir="${maven.docs.dest}/images" file="${plugin.resources}/images/rss.png"/>
</goal>
<goal name="changes:validate"
description="Validates the changes.xml file">
<available
file="${maven.docs.src}/changes.xml"
property="changesFile.available"/>
<j:if test="${changesFile.available}">
<plugin:validate-xml
schema="${plugin.resources}/xsd/changes.xsd"
file="${maven.docs.src}/changes.xml"/>
</j:if>
</goal>
<define:taglib uri="changes:transform">
<define:tag name="release-version">
<j:useBean var="transformer" class="org.apache.maven.changes.ReleaseVersion"/>
<util:file var="f" name="${maven.docs.src}/changes.xml" />
<!-- Set default encoding if not set. -->
<j:if test="${encoding == null}">
<j:set var="encoding" value="${maven.docs.outputencoding}" />
</j:if>
<j:choose>
<j:when test="${date != null}">
${transformer.releaseVersion(f, pom.currentVersion, version, encoding, date)}
</j:when>
<j:otherwise>
${transformer.releaseVersion(f, pom.currentVersion, version, encoding)}
</j:otherwise>
</j:choose>
</define:tag>
</define:taglib>
</project>