I have similar need. I don't like standard site.dvsl because it uses
table layout
and I can't for example move navigation on the right side with simple
CSS modification.
I suggest the following patch. It adds two features described below.
1. It allows user to specify maven.docs.style property in
project.properties or build.properties file that sets dvsl file name.
2. It tries to find the specified style file with the name
${maven.docs.style}.dvsl
- first in ${maven.docs.src} (that is usually xdocs project
subdirectory);
- then in ${plugin.dir}
- and at last if uses ${plugin.dir}/site.dvsl if specified style is
not found.
So you can create several different dvsl files, put them in plugin
directory and select for each project which one to use.
Or you may just put your own site.dvsl into xdocs subdirectory and
plugin will use it instead of the standard one.
Or combine these two approaches.
Here is the patch against the latest CVS version:
bash$ cvs diff -u src/plugins-build/xdoc/plugin.jelly
Index: src/plugins-build/xdoc/plugin.jelly
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-maven/src/plugins-build/xdoc/plugin.jell
y,v
retrieving revision 1.13
diff -u -r1.13 plugin.jelly
--- src/plugins-build/xdoc/plugin.jelly 21 Aug 2002 07:46:17 -0000
1.13
+++ src/plugins-build/xdoc/plugin.jelly 22 Aug 2002 06:43:06 -0000
@@ -97,6 +97,34 @@
<mkdir dir="${maven.docs.dest}"/>
+ <!-- Select transformation style -->
+
+ <j:set var="styleX" value="${maven.docs.style}X"/>
+ <j:if test="${styleX == 'X'}">
+ <j:set var="maven.docs.style" value="site"/>
+ </j:if>
+
+ <j:set var="maven.docs.style.file.project"
value="${maven.docs.src}/${maven.docs.style}.dvsl"/>
+ <j:set var="maven.docs.style.file.plugin"
value="${plugin.dir}/${maven.docs.style}.dvsl"/>
+ <j:set var="maven.docs.style.file.default"
value="${plugin.dir}/site.dvsl"/>
+
+ <echo>${maven.docs.style.file.plugin}</echo>
+
+ <available file="${maven.docs.style.file.project}" type="file"
property="maven.docs.style.project"/>
+ <available file="${maven.docs.style.file.plugin}" type="file"
property="maven.docs.style.plugin"/>
+
+ <j:choose>
+ <j:when test="${maven.docs.style.project}">
+ <j:set var="maven.docs.style.file"
value="${maven.docs.style.file.project}"/>
+ </j:when>
+ <j:when test="${maven.docs.style.plugin}">
+ <j:set var="maven.docs.style.file"
value="${maven.docs.style.file.plugin}"/>
+ </j:when>
+ <j:otherwise>
+ <j:set var="maven.docs.style.file"
value="${maven.docs.style.file.default}"/>
+ </j:otherwise>
+ </j:choose>
+
<!-- Transform the auto-generated xdocs first -->
<available
@@ -121,7 +149,7 @@
extension = ".html"
force = "true"
toolboxFile = "${plugin.dir}/toolbox.props"
- style = "${plugin.dir}/site.dvsl"
+ style = "${maven.docs.style.file}"
excludes = "**/project.xml,**/template.xml"
includes = "**/*.xml"
outputEncoding = "${maven.docs.outputencoding}"
@@ -211,7 +239,7 @@
extension = ".html"
force = "true"
toolboxFile = "${plugin.dir}/toolbox.props"
- style = "${plugin.dir}/site.dvsl"
+ style = "${maven.docs.style.file}"
excludes = "**/project.xml,**/template.xml"
includes = "**/*.xml"
outputEncoding = "${maven.docs.outputencoding}"
@@ -239,7 +267,7 @@
<mkdir dir="${maven.docs.src}/stylesheets"/>
<!-- Copy user supplied stylesheets, can override maven -->
- <copy todir="${maven.docs.dest}/style" overwrite="true"
filtering="no">
+ <copy todir="${maven.docs.dest}/style" filtering="no">
<fileset dir="${maven.docs.src}/stylesheets">
<include name="**/*.css"/>
</fileset>
Best regards,
--
Alexei Barantsev, ISP RAS
E-mail: [EMAIL PROTECTED]
ICQ : 3959207
> -----Original Message-----
> From: Ted Stockwell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 22, 2002 2:48 AM
> To: Turbine Maven Users List
> Subject: How to add new xdoc tags
>
>
> Hi,
>
> I suppose this isn't strictly a Maven question but I thought
> that someone here could point me in the right direction...
>
> I want to add support for some new tags in my web site
> documents (that I am generating with Maven). I don't really
> know Velocity but it's pretty obvious how the
> maven-1.0-beta-5\plugins\maven-xdoc-plugin-1.0\site.dvsl file works.
>
> What's not obvious to me is how I might extend or alter the
> tag processing. Is there some way I can tell Maven to use a
> diferent site.dvsl file?
>
> Thanks,
> ted stockwell
>
> __________________________________________________
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>