maven-plugins/changelog/plugin.jelly
evenisse 9a278f5c42 Update to ASL v.2
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114791 13f79535-47bb-0310-9956-ffa450edef68
2004-03-04 18:05:31 +00:00

102 lines
3.2 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:changelog="changelog"
xmlns:doc="doc">
<goal name="maven-changelog-plugin:register">
<j:if test="${context.getVariable('maven.mode.online') == null}">
<j:set var="maven.mode.online" value="true" />
</j:if>
<j:if test="${maven.mode.online}">
<doc:registerReport
name="Change Log"
pluginName="maven-changelog-plugin"
link="changelog-report"
description="Report on the source control changelog."/>
</j:if>
</goal>
<goal name="maven-changelog-plugin:deregister">
<doc:deregisterReport name="Change Log"/>
</goal>
<define:taglib uri="changelog">
<define:jellybean
name="changelog"
className="org.apache.maven.changelog.ChangeLog"
method="doExecute"
/>
</define:taglib>
<!-- ================================================================== -->
<!-- C H A N G E L O G R E P O R T -->
<!-- ================================================================== -->
<goal
name="maven-changelog-plugin:report"
description="Generate a changelog report">
<j:if test="${context.getVariable('maven.mode.online') == null}">
<j:set var="maven.mode.online" value="true"/>
</j:if>
<j:choose>
<j:when test="${maven.mode.online}">
<j:set var="_connection">${pom.repository.connection}</j:set>
<j:if test="${empty(_connection)}">
<j:set var="_connection">${pom.repository.developerConnection}</j:set>
</j:if>
<j:if test="${!empty(_connection)}">
<ant:echo>Generating the changelog report</ant:echo>
<changelog:changelog
basedir="${maven.changelog.basedir}"
developers="${pom.developers}"
factory="${maven.changelog.factory}"
output="${maven.build.dir}/changelog.xml"
outputEncoding="${maven.docs.outputencoding}"
range="${maven.changelog.range}"
repositoryConnection="${_connection}"
dateFormat="${maven.changelog.dateformat}"
/>
<doc:jsl
input="${maven.build.dir}/changelog.xml"
output="changelog-report.xml"
stylesheet="${plugin.resources}/changelog.jsl"
encoding="${maven.docs.outputencoding}"
outputMode="xml"
prettyPrint="true"
/>
</j:if>
</j:when>
<j:otherwise>
<ant:echo>The Changelog is available in the online mode only.</ant:echo>
</j:otherwise>
</j:choose>
</goal>
</project>