Pass 1.
o It works, but is incomplete and broken. I am committing now as I have very bad non-deterministic behaviour with jelly and I like committing as I go. o Need to convert project documentation tree to navigation.jsl o Need to remove temporary file creation in plugin.jsl PR: MAVEN-602 git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113687 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dc1968cd6c
commit
f6e68cc813
@ -315,7 +315,22 @@
|
||||
<x:set var="nav" select="$navXML/project"/>
|
||||
<!-- parse the doc and pass it to the stylesheet -->
|
||||
<x:parse var="doc" xml="${file}"/>
|
||||
|
||||
|
||||
|
||||
<!-- parse the project nav. Someone jellier than me can remove the temp file requirement -->
|
||||
<util:file var="tempnav" name="${basedir}/target/pnav.xml"/>
|
||||
|
||||
<j:set var="navigationJSL" value="${resourceTool.findResource('plugin-resources/navigation.jsl')}"/>
|
||||
<j:file name="${tempnav.toString()}" outputMode="xml">
|
||||
<j:include uri="${navigationJSL.toString()}"/>
|
||||
</j:file>
|
||||
|
||||
<x:parse var="projectNavRoot" xml="${tempnav}"/>
|
||||
<echo>HASHISH ${size(projectNavRoot)} - ${projectNavRoot.getClass().getName()}</echo>
|
||||
|
||||
<x:set var="projectNav" select="$projectNavRoot/project"/>
|
||||
|
||||
|
||||
<j:file name="${outFile}" encoding="${outputencoding}"
|
||||
omitXmlDeclaration="true" outputMode="xml"
|
||||
prettyPrint="no">
|
||||
|
||||
29
xdoc/src/plugin-resources/navigation.jsl
Normal file
29
xdoc/src/plugin-resources/navigation.jsl
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- stylesheet to be used -->
|
||||
<jsl:stylesheet select="$doc"
|
||||
xmlns:define="jelly:define"
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:jsl="jelly:jsl"
|
||||
xmlns:log="jelly:log"
|
||||
xmlns:util="jelly:util"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:doc="doc"
|
||||
xmlns="dummy" trim="true">
|
||||
|
||||
|
||||
<jsl:template match="document" trim="false">
|
||||
<project>
|
||||
<body>
|
||||
<j:if test="${includeProjectDocumentation.equals('yes')}">
|
||||
<menu name="Project Documentation">
|
||||
<item name="About ${pom.name}" href="/index.html"/>
|
||||
</menu>
|
||||
</j:if>
|
||||
</body>
|
||||
</project>
|
||||
</jsl:template>
|
||||
|
||||
<!-- absorb any other elements -->
|
||||
<jsl:template match="*" trim="false"></jsl:template>
|
||||
|
||||
</jsl:stylesheet>
|
||||
@ -165,6 +165,8 @@
|
||||
<x:if select="$nav">
|
||||
<jsl:applyTemplates select="$nav/body/menu[not(@type) | @type='header'] | $nav/body/search"/>
|
||||
</x:if>
|
||||
|
||||
<jsl:applyTemplates select="$projectNav/body/menu"/>
|
||||
|
||||
<!-- Standard Maven Navigation -->
|
||||
<j:set var="fileName">${file}</j:set>
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
maven.xdoc.date=left
|
||||
maven.xdoc.includeProjectDocumentation=false
|
||||
mxaven.xdoc.includeProjectDocumentation=false
|
||||
@ -8,11 +8,9 @@
|
||||
<organization>
|
||||
<name>Apache Software Foundation</name>
|
||||
<url>http://jakarta.apache.org/</url>
|
||||
<logo>http://maven.apache.org/images/jakarta-logo-blue.gif</logo>
|
||||
</organization>
|
||||
<inceptionYear>2001</inceptionYear>
|
||||
<logo>http://maven.apache.org/images/maven.jpg</logo>
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user