kaz         02/03/17 10:22:13

  Modified:    src/dvsl/xdocs site.dvsl toolbox.props
               src/templates/build build-docs.xml
  Log:
  These changes will allow a user of Maven to create a web site for their
  project even if they don't have an xdocs/project.xml file.  The
  site.dvsl template now checks for the existence of the file and builds
  the site even if it doesn't exist.  The Texen FileUtil tool is used.
  
  In addition, to prevent the build-docs.xml from crapping out if the
  xdocs directory doesn't exist, it does a mkdir on those directories
  first.  Again, this is to make Maven as easy to use as possible.  Users
  don't even need an xdoc directory and they'll get a web site with their
  project.
  
  Revision  Changes    Path
  1.3       +8 -3      jakarta-turbine-maven/src/dvsl/xdocs/site.dvsl
  
  Index: site.dvsl
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/dvsl/xdocs/site.dvsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- site.dvsl 17 Mar 2002 16:42:05 -0000      1.2
  +++ site.dvsl 17 Mar 2002 18:22:13 -0000      1.3
  @@ -13,11 +13,14 @@
   
   #match( "document" )
   
  -  #set( $project = $node.selectSingleNode("document('xdocs/project.xml')/project" ) 
)
  +  #set( $projectFile = $context.toolbox.fileutil.file('xdocs/project.xml'))
  +  #if ($projectFile.exists())
  +      #set( $project = 
$node.selectSingleNode("document('xdocs/project.xml')/project" ) )
  +  #end
   
     <html>
       <head>
  -      <title>$project.title - $node.properties.title</title>
  +      <title>$!project.title - $node.properties.title</title>
   
         #foreach( $n in $node.properties.selectNodes("author") )
           <meta name="author" value="$n"/>
  @@ -73,7 +76,9 @@
   
           ## LEFT SIDE NAVIGATION
           <td width="20%" valign="top" nowrap="true">
  -          $context.applyTemplates( $project, "body/menu" )
  +          #if ($project)
  +            $context.applyTemplates( $project, "body/menu" )
  +          #end
   
             ## Standard Maven Navigation 
             <p><strong>Maven Generated Docs</strong></p>
  
  
  
  1.2       +1 -0      jakarta-turbine-maven/src/dvsl/xdocs/toolbox.props
  
  Index: toolbox.props
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/dvsl/xdocs/toolbox.props,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- toolbox.props     16 Mar 2002 05:12:25 -0000      1.1
  +++ toolbox.props     17 Mar 2002 18:22:13 -0000      1.2
  @@ -1,6 +1,7 @@
   toolbox.contextname = toolbox
   toolbox.tool.htmlescape = org.apache.velocity.anakia.Escape
   toolbox.tool.numbers = org.apache.commons.lang.Numbers
  +toolbox.tool.fileutil = org.apache.velocity.texen.util.FileUtil
   toolbox.tool.strings = org.apache.commons.lang.Strings
   toolbox.tool.formatter = org.apache.maven.DVSLFormatter
   
  
  
  
  1.34      +4 -0      jakarta-turbine-maven/src/templates/build/build-docs.xml
  
  Index: build-docs.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build-docs.xml,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- build-docs.xml    17 Mar 2002 16:35:02 -0000      1.33
  +++ build-docs.xml    17 Mar 2002 18:22:13 -0000      1.34
  @@ -173,6 +173,10 @@
         </classpath>
       </taskdef>
   
  +    <!-- Make sure the source doc directories exist -->
  +    <mkdir dir="${docs.src}"/>
  +    <mkdir dir="${docs.src}/images"/>
  +
       <!-- Make sure the target directory -->
       <mkdir dir="${docs.dest}"/>
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to