MPXDOC-150 : maven.xdoc.date.format does not seem to have any effect.

Patch submitted by : Ignacio G. Mac Dowell
Patch reviewed by : Arnaud Heritier

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@267511 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
aheritier committed 2005-09-03 22:46:57 +00:00
1 parent 37809605a1
commit ef0236ed26
6 files changed
+37 -41

No files matched your search

+17 -7
View File
@@ -43,14 +43,24 @@
<j:setProperties object="${navbean}" document="${doc}" location="${location}"/>
<x:set var="templateContext" select="." />
<!-- Format the build date depending the current locale if no pattern is defined -->
<j:if test="${currentLocale.equals(defaultLocale)}">
<j:if test="${now == null}">
<j:useBean var="now" class="java.util.Date"/>
</j:if>
<fmt:formatDate value="${now}" type="both" dateStyle="long" timeStyle="long" var="build.date"/>
<!-- Sets the current locale -->
<fmt:setLocale trim="true" value="${currentLocale}"/>
<j:if test="${now == null}">
<j:useBean var="now" class="java.util.Date"/>
</j:if>
<!-- Format the build date depending the current locale and pattern depending if there is a pattern -->
<j:set var="myDateFormat" value="${maven.xdoc.date.format}"/>
<j:choose>
<j:when test="${!empty(myDateFormat)}">
<fmt:formatDate value="${now}" type="both" var="build.date" pattern="${maven.xdoc.date.format}"/>
</j:when>
<j:otherwise>
<fmt:formatDate value="${now}" type="both" dateStyle="long" timeStyle="long" var="build.date"/>
</j:otherwise>
</j:choose>
<html>
<head>
<j:set var="docTitle"><x:expr select="./properties/title"/></j:set>