PR: MPXDOC-183
Submitted by: Niall Pemberton Enable user-defined custom templates git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@370683 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ab73751157
commit
954bd531d4
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
* Copyright 2001-2006 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.
|
||||
@ -697,13 +697,17 @@
|
||||
|
||||
<j:forEach var="pomDocument" items="${pomDocuments}">
|
||||
|
||||
<j:set var="templateBaseDir" value="${plugin.resources}/templates"/>
|
||||
<util:available file="${maven.xdoc.custom.templateDir}/${pomDocument}">
|
||||
<j:set var="templateBaseDir" value="${maven.xdoc.custom.templateDir}"/>
|
||||
</util:available>
|
||||
<!-- If the template ends with ".xml" use velocity to generate the
|
||||
HTML. If it ends with ".jelly" use JSL. -->
|
||||
<j:choose>
|
||||
<j:when test="${pomDocument.endsWith('.xml')}">
|
||||
<velocity:merge
|
||||
name="${maven.gen.docs}/${pomDocument}"
|
||||
basedir="${plugin.resources}/templates"
|
||||
basedir="${templateBaseDir}"
|
||||
template="${pomDocument}"
|
||||
inputEncoding="${encoding}"
|
||||
outputEncoding="${encoding}"
|
||||
@ -712,7 +716,7 @@
|
||||
<j:when test="${pomDocument.endsWith('.jelly')}">
|
||||
<doc:jslFile
|
||||
output="${maven.gen.docs}/${pomDocument.substring(0,pomDocument.indexOf('.jelly'))}.xml"
|
||||
stylesheet="${plugin.resources}/templates/${pomDocument}"
|
||||
stylesheet="${templateBaseDir}/${pomDocument}"
|
||||
outputMode="xml"
|
||||
prettyPrint="no"/>
|
||||
</j:when>
|
||||
|
||||
@ -72,6 +72,10 @@ maven.xdoc.projectInfo = cvs-usage.xml,\
|
||||
team-list.xml,\
|
||||
downloads.jelly
|
||||
|
||||
# Custom user template directory,
|
||||
# if not defined, ${plugin.resources}/templates is used by plugin.jelly
|
||||
#maven.xdoc.custom.templateDir=
|
||||
|
||||
# List of xml files (or patterns) that are copied but not transformed
|
||||
#maven.xdoc.xml.copy=
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.10-SNAPSHOT" date="in SVN">
|
||||
<action dev="ltheussl" type="add" issue="MPXDOC-183" due-to="Niall Pemberton">Enable user-defined custom templates.</action>
|
||||
<action dev="ltheussl" type="fix" issue="MPXDOC-187">Correct cvs checkout instructions on cvs-usage page.</action>
|
||||
<action dev="ltheussl" type="fix" issue="MPXDOC-125" due-to="Shinobu Kawai Yoshida">Url and timezone not used for contributor.</action>
|
||||
<action dev="ltheussl" type="fix" issue="MPXDOC-186">Mailing list links break if the address starts with http.</action>
|
||||
|
||||
@ -279,6 +279,19 @@
|
||||
that can be used in addition to maven-base.css.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.xdoc.custom.templateDir</td>
|
||||
<td>Yes</td>
|
||||
<td>
|
||||
A directory where custom templates for Maven generated sites may
|
||||
be defined. The template files should have the same names as
|
||||
the ones used by the xdoc plugin (<code>mail-lists.xml</code>,
|
||||
<code>issue-tracking.xml</code>, etc.). By default, the templates
|
||||
in the <code>${plugin.resources}/templates</code> directory
|
||||
of the xdoc plugin are used.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>maven.xdoc.crumb.separator</td>
|
||||
<td>Yes</td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user