Author: ltheussl Date: Mon Jan 23 22:02:54 2006 New Revision: 371829 URL: http://svn.apache.org/viewcvs?rev=371829&view=rev Log: New 'lastRelease' option for maven.changelog.date
Modified: maven/maven-1/plugins/trunk/changelog/plugin.jelly maven/maven-1/plugins/trunk/changelog/plugin.properties maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml maven/maven-1/plugins/trunk/changelog/xdocs/properties.xml Modified: maven/maven-1/plugins/trunk/changelog/plugin.jelly URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/plugin.jelly?rev=371829&r1=371828&r2=371829&view=diff ============================================================================== --- maven/maven-1/plugins/trunk/changelog/plugin.jelly (original) +++ maven/maven-1/plugins/trunk/changelog/plugin.jelly Mon Jan 23 22:02:54 2006 @@ -24,6 +24,8 @@ xmlns:define="jelly:define" xmlns:changelog="changelog" xmlns:doc="doc" + xmlns:util="jelly:util" + xmlns:x="jelly:xml" xmlns:maven="jelly:maven"> <goal name="maven-changelog-plugin:register"> @@ -78,6 +80,29 @@ <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. </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 value="tag"> <maven:paramCheck value="${maven.changelog.tag}" fail="true"> Modified: maven/maven-1/plugins/trunk/changelog/plugin.properties URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/plugin.properties?rev=371829&r1=371828&r2=371829&view=diff ============================================================================== --- maven/maven-1/plugins/trunk/changelog/plugin.properties (original) +++ maven/maven-1/plugins/trunk/changelog/plugin.properties Mon Jan 23 22:02:54 2006 @@ -25,6 +25,7 @@ maven.changelog.type = range maven.changelog.range = 30 +#maven.changelog.date could be 'lastRelease' #maven.changelog.date = #maven.changelog.tag = Modified: maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml?rev=371829&r1=371828&r2=371829&view=diff ============================================================================== --- maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml (original) +++ maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml Mon Jan 23 22:02:54 2006 @@ -25,6 +25,7 @@ </properties> <body> <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-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> Modified: maven/maven-1/plugins/trunk/changelog/xdocs/properties.xml URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/xdocs/properties.xml?rev=371829&r1=371828&r2=371829&view=diff ============================================================================== --- maven/maven-1/plugins/trunk/changelog/xdocs/properties.xml (original) +++ maven/maven-1/plugins/trunk/changelog/xdocs/properties.xml Mon Jan 23 22:02:54 2006 @@ -70,6 +70,8 @@ Specifies an absolute date to use when generating the change log. This is used by the "changelog" goal if the maven.changelog.type 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 present; otherwise, the format is yyyy-MM-dd. </td>