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
2005-09-03 22:46:57 +00:00
parent 37809605a1
commit ef0236ed26
6 changed files with 37 additions and 41 deletions

View File

@@ -973,14 +973,8 @@
<tstamp>
<format property="mavenCurrentYear" pattern="yyyy"/>
</tstamp>
<!-- Set the current time in a locale-sensitive manner (pattern/locale) -->
<tstamp>
<format property="build.date" pattern="${maven.xdoc.date.format}"
locale="${maven.xdoc.date.locale}"/>
</tstamp>
<!-- Set the current time to display the date in the current locale -->
<!-- Instantiate one date object for all locales and pages -->
<j:useBean var="now" class="java.util.Date"/>
</goal>

View File

@@ -86,7 +86,7 @@ maven.xdoc.copy.excludes.classic=external-classic.png,help_logo.gif,icon_arrowfo
maven.xdoc.date=
maven.xdoc.date.format=dd MMMM yyyy
# The date locale
maven.xdoc.date.locale=en
maven.xdoc.date.locale=${maven.xdoc.locale.default}
# The default locale (if null, it is the default locale for this instance of the Java Virtual Machine)
# By default it is en to ensure backward compatible

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>

View File

@@ -16,33 +16,24 @@
* limitations under the License.
*/
-->
<project name="MPXDOC-128"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="MAVEN_HOME/maven-navigation-1.0.xsd">
<title key="navigation.title"/>
<body>
<project name="MPXDOC-128">
<title key="navigation.title"/>
<body>
<breadcrumbs>
<item name="Maven" href="http://maven.apache.org"/>
<item name="Maven Plugins" href="http://maven.apache.org/reference/plugins/index.html"/>
</breadcrumbs>
<links>
<!--
<links>
<!--
<item name="PDF Documentation" href="app.pdf"
img="images/pdf.gif"/>
-->
</links>
<!-- project overview -->
<menu key="navigation.menu1.title">
<item key="navigation.menu1.item1"
href="/myfile_i18n.html" />
<item key="navigation.menu1.item2"
href="/subdir/testjsltosite.html" />
<item key="navigation.menu1.item3"
href="/subdir/subdir2/testjsltosite2.html" />
</menu>
</body>
</links>
<!-- project overview -->
<menu key="navigation.menu1.title">
<item key="navigation.menu1.item1" href="/myfile_i18n.html"/>
<item key="navigation.menu1.item2" href="/subdir/testjsltosite.html"/>
<item key="navigation.menu1.item3" href="/subdir/subdir2/testjsltosite2.html"/>
</menu>
</body>
</project>

View File

@@ -28,13 +28,14 @@
<release version="1.9.2-SNAPSHOT" date="In SVN">
<action dev="aheritier" type="fix" issue="MPXDOC-154" due-to="Juan F. Codagnone,Vincent Siveton,Lukas Theussl">System locale setting makes test cases fail.</action>
<action dev="vsiveton" type="fix" issue="MPXDOC-152" due-to="Arnaud Heritier">cvs-usage link not shown in project-info page</action>
<action dev="aheritier" type="fix">i18n : html code removed from bundles.</action>
<action dev="aheritier" type="fix">i18n : doc title wasn't printed in breadcrumbs.</action>
<action dev="aheritier" type="fix" issue="MPXDOC-151">i18n : menu tag in xdoc does not work with "key" translated text id.</action>
<action dev="aheritier" type="fix" issue="MPXDOC-150" due-to="Ignacio G. Mac Dowell">maven.xdoc.date.format does not seem to have any effect.</action>
<action dev="aheritier" type="fix" issue="MPXDOC-149" due-to="Lukas Theussl">&lt;DT&gt; is appearing same way as subsection. Fix layout for the FAQ plugin.</action>
<action dev="vsiveton" type="fix" issue="MPXDOC-148" due-to="Incze Lajos">Fixed bundles expression.</action>
<action dev="aheritier" type="fix" issue="MPXDOC-147">Missing "Project Reports" header in the generated menu.</action>
<action dev="aheritier" type="add" issue="MPXDOC-131" due-to="Ignacio G. Mac Dowell">Allow i18n links.</action>
<action dev="aheritier" type="fix">i18n : html code removed from bundles.</action>
<action dev="aheritier" type="fix">i18n : doc title wasn't printed in breadcrumbs.</action>
</release>
<release version="1.9.1" date="2005-06-16">
<action dev="brett" type="fix">Don't override the Maven library. This makes the plugin compatible with both Maven 1.0.2 and Maven 1.1</action>

View File

@@ -19,7 +19,7 @@
<document>
<properties>
<title>Xdoc Properties</title>
<title>XDoc plugin properties</title>
<author email="smor@apache.org">Stéphane MOR</author>
<author email="vmassol@apache.org">Vincent Massol</author>
<author email="vincent.siveton@gmail.com">Vincent Siveton</author>
@@ -133,7 +133,7 @@
<tr>
<td>maven.xdoc.date.locale</td>
<td>Yes</td>
<td>Sets the locale used for the date. Defaults to "en", ie english.
<td>DEPRECATED. Use the property maven.xdoc.locale.default instead.<br/>Sets the locale used for the date. Defaults to ${maven.xdoc.locale.default}.
</td>
</tr>
<tr>