New 'lastRelease' option for maven.changelog.date
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@371829 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
14f7f7a806
commit
ddb957d938
@ -24,6 +24,8 @@
|
|||||||
xmlns:define="jelly:define"
|
xmlns:define="jelly:define"
|
||||||
xmlns:changelog="changelog"
|
xmlns:changelog="changelog"
|
||||||
xmlns:doc="doc"
|
xmlns:doc="doc"
|
||||||
|
xmlns:util="jelly:util"
|
||||||
|
xmlns:x="jelly:xml"
|
||||||
xmlns:maven="jelly:maven">
|
xmlns:maven="jelly:maven">
|
||||||
|
|
||||||
<goal name="maven-changelog-plugin:register">
|
<goal name="maven-changelog-plugin:register">
|
||||||
@ -78,6 +80,29 @@
|
|||||||
<maven:paramCheck value="${maven.changelog.date}" fail="true">
|
<maven:paramCheck value="${maven.changelog.date}" fail="true">
|
||||||
The maven.changelog.date property is required when maven.changelog.type==date. The value should be the absolute date for the start of the log.
|
The maven.changelog.date property is required when maven.changelog.type==date. The value should be the absolute date for the start of the log.
|
||||||
</maven:paramCheck>
|
</maven:paramCheck>
|
||||||
|
<j:set var="_changelogdate" value="${maven.changelog.date}"/>
|
||||||
|
<j:if test="${_changelogdate == 'lastRelease'}">
|
||||||
|
<util:file var="changesAsFile"
|
||||||
|
name="${maven.docs.src}/changes.xml"/>
|
||||||
|
<j:choose>
|
||||||
|
<j:when test="${changesAsFile.exists()}">
|
||||||
|
<x:parse var="doc" xml="${changesAsFile}"/>
|
||||||
|
<x:set var="versionElems"
|
||||||
|
select="$doc//release[contains(@date,'-')]"/>
|
||||||
|
<j:choose>
|
||||||
|
<j:when test="${not(versionElems.isEmpty())}">
|
||||||
|
<j:set var="maven.changelog.date">${versionElems.get(0).attributeValue('date')}</j:set>
|
||||||
|
</j:when>
|
||||||
|
<j:otherwise>
|
||||||
|
<ant:fail>Release date must be of the form yyyy-mm-dd!</ant:fail>
|
||||||
|
</j:otherwise>
|
||||||
|
</j:choose>
|
||||||
|
</j:when>
|
||||||
|
<j:otherwise>
|
||||||
|
<ant:fail>No changes.xml found in ${maven.docs.src}!</ant:fail>
|
||||||
|
</j:otherwise>
|
||||||
|
</j:choose>
|
||||||
|
</j:if>
|
||||||
</j:case>
|
</j:case>
|
||||||
<j:case value="tag">
|
<j:case value="tag">
|
||||||
<maven:paramCheck value="${maven.changelog.tag}" fail="true">
|
<maven:paramCheck value="${maven.changelog.tag}" fail="true">
|
||||||
|
|||||||
@ -25,6 +25,7 @@ maven.changelog.svn.baseurl=${pom.repository.url}
|
|||||||
|
|
||||||
maven.changelog.type = range
|
maven.changelog.type = range
|
||||||
maven.changelog.range = 30
|
maven.changelog.range = 30
|
||||||
|
#maven.changelog.date could be 'lastRelease'
|
||||||
#maven.changelog.date =
|
#maven.changelog.date =
|
||||||
#maven.changelog.tag =
|
#maven.changelog.tag =
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<body>
|
<body>
|
||||||
<release version="1.9-SNAPSHOT" date="in SVN">
|
<release version="1.9-SNAPSHOT" date="in SVN">
|
||||||
|
<action dev="ltheussl" type="add">New '<code>lastRelease</code>' option for <code>maven.changelog.date</code>.</action>
|
||||||
<action dev="ltheussl" type="fix" issue="MPCHANGELOG-81" due-to="Dennis Lundberg">Some valid scm urls are not allowed.</action>
|
<action dev="ltheussl" type="fix" issue="MPCHANGELOG-81" due-to="Dennis Lundberg">Some valid scm urls are not allowed.</action>
|
||||||
<action dev="ltheussl" type="fix" issue="MPCHANGELOG-72" due-to="Pascal Larin">Auto select factory from connection doesn't work if provider name length different from 3.</action>
|
<action dev="ltheussl" type="fix" issue="MPCHANGELOG-72" due-to="Pascal Larin">Auto select factory from connection doesn't work if provider name length different from 3.</action>
|
||||||
<action dev="ltheussl" type="add" issue="MPCHANGELOG-80" due-to="Christoph Jerolimov">Add MKS SI support.</action>
|
<action dev="ltheussl" type="add" issue="MPCHANGELOG-80" due-to="Christoph Jerolimov">Add MKS SI support.</action>
|
||||||
|
|||||||
@ -70,6 +70,8 @@
|
|||||||
Specifies an absolute date to use when generating the change log.
|
Specifies an absolute date to use when generating the change log.
|
||||||
This is used by the "changelog" goal if the maven.changelog.type
|
This is used by the "changelog" goal if the maven.changelog.type
|
||||||
property is "date". The log will contain changes made after this date.
|
property is "date". The log will contain changes made after this date.
|
||||||
|
If it is set to '<code>lastRelease</code>', the date found for
|
||||||
|
the last release in <code>changes.xml</code> is used.
|
||||||
The date format is that specified by maven.changelog.dateformat if
|
The date format is that specified by maven.changelog.dateformat if
|
||||||
present; otherwise, the format is yyyy-MM-dd.
|
present; otherwise, the format is yyyy-MM-dd.
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user