jvanzyl     2002/06/27 09:33:47

  Added:       src/templates/build/plugins/xdoc default.properties
                        plugin.jelly
  Log:
  Adding xdoc plugin so we can debug it.
  
  Revision  Changes    Path
  1.1                  
jakarta-turbine-maven/src/templates/build/plugins/xdoc/default.properties
  
  Index: default.properties
  ===================================================================
  # -------------------------------------------------------------------
  # P L U G I N  P R O P E R I E S
  # -------------------------------------------------------------------
  # Xdoc plugin.
  # -------------------------------------------------------------------
  
  maven.src.dir = ${basedir}/src
  maven.conf.dir = ${basedir}/conf
  maven.build.dir = ${basedir}/target
  maven.build.src = ${maven.build.dir}/src
  maven.build.dest = ${maven.build.dir}/classes
  
  maven.docs.src = ${basedir}/xdocs
  maven.docs.dest = ${maven.build.dir}/docs
  maven.docs.outputencoding = ISO-8859-1
  maven.gen.docs = ${maven.build.dir}/generated-xdocs
  
  #
  # UI Color Prefs
  #
  maven.ui.body.background = #fff
  maven.ui.body.foreground = #000
  maven.ui.section.background = #036
  maven.ui.section.foreground = #fff
  maven.ui.subsection.background = #888
  maven.ui.subsection.foreground = #fff
  maven.ui.table.header.background = #bbb
  maven.ui.table.header.foreground = #fff
  maven.ui.table.row.odd.background = #ddd
  maven.ui.table.row.odd.foreground = #000
  maven.ui.table.row.even.background = #efefef
  maven.ui.table.row.even.foreground = #000
  maven.ui.banner.background = #036
  maven.ui.banner.foreground = #fff
  maven.ui.banner.border.top = #369
  maven.ui.banner.border.bottom = #003
  maven.ui.source.background = #fff
  maven.ui.source.foreground = #000
  maven.ui.source.border.right = #888
  maven.ui.source.border.left = #888
  maven.ui.source.border.top = #888
  maven.ui.source.border.bottom = #888
  maven.ui.navcol.background = #eee
  maven.ui.navcol.background.ns4 = #fff
  maven.ui.navcol.foreground = #000
  maven.ui.navcol.foreground.ns4 = #555
  maven.ui.navcol.border.top = #fff
  maven.ui.navcol.border.right = #aaa
  maven.ui.navcol.border.bottom = #aaa
  maven.ui.breadcrumbs.background = #ddd
  maven.ui.breadcrumbs.foreground = #000
  maven.ui.breadcrumbs.border.top = #fff
  maven.ui.breadcrumbs.border.bottom = #aaa
  maven.ui.href.link = blue
  maven.ui.href.link.active = #f30
  maven.ui.href.link.selfref = #555
  
  
  
  1.1                  
jakarta-turbine-maven/src/templates/build/plugins/xdoc/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  <?xml version="1.0"?>
  
  <project xmlns:j="jelly:core">
  
    <goal
      name="docs"
      prereqs="generate-xdocs, docs:site"
      description="Generate html project documentation xdoc sources">
    </goal>
  
    <!-- ================================================================== -->
    <!-- P R O J E C T  D O C U M E N T A T I O N                           -->
    <!-- ================================================================== -->
  
    <taskdef
      name="create-xdocs"
      classname="org.apache.maven.BaseProjectTask">
      <classpath>
        <pathelement location="${maven.home}/lib/maven.jar"/>
        <path refid="maven.dependency.classpath"/>
      </classpath>
    </taskdef>
  
    <goal
      name="generate-xdocs"
      description="Generates xdocs for site based on project descriptor">
  
      <create-xdocs
        controlTemplate="Control.vm"
        outputDirectory="${maven.gen.docs}"
        templatePath="${maven.home}/templates/xdocs"
        outputFile="xdocs.report"
        projectDescriptor="project.xml"
      />
  
    </goal>
  
    <!-- ================================================================== -->
    <!-- D V S L  D O C U M E N T A T I O N                                 -->
    <!-- ================================================================== -->
  
    <goal
      name="docs:site"
      description="Generate html project documentation xdoc sources">
  
      <!-- Transform the auto-generated xdocs first -->
      <dvsl
        basedir="${maven.gen.docs}"
        destdir="${maven.docs.dest}/"
        extension=".html"
        force="true"
        toolboxfile="${maven.home}/stylesheets/toolbox.props"
        style="${maven.home}/stylesheets/site.dvsl"
        excludes="**/project.xml,**/template.xml"
        includes="**/*.xml"
        outputencoding="${maven.docs.outputencoding}">
        <!-- Need to add the maven jar to load the toolbox -->
        <classpath refid="maven-classpath"/>
        <tool name="toolbox.string.basedir" value="${basedir}"/>
        <tool name="toolbox.string.docDest" value="${maven.docs.dest}"/>
        <tool name="toolbox.string.docSrc" value="${maven.docs.src}"/>
        <tool name="toolbox.string.genDoc" value="${maven.gen.docs}"/>
        <tool name="toolbox.string.srcDir" value="${maven.src.dir}"/>
        <tool name="toolbox.string.srcPresent" value="${maven.sourcesPresent}"/>
        <tool name="toolbox.string.testSrcPresent" 
value="${maven.unitTestSourcesPresent}"/>
        <tool name="toolbox.string.currentYear" value="${maven.current.year}"/>
      </dvsl>
  
      <!-- Then transform user supplied xdocs next -->
      <dvsl
        basedir="${maven.docs.src}"
        destdir="${maven.docs.dest}/"
        extension=".html"
        force="true"
        toolboxfile="${maven.home}/stylesheets/toolbox.props"
        style="${maven.home}/stylesheets/site.dvsl"
        excludes="**/project.xml,**/template.xml"
        includes="**/*.xml"
        outputencoding="${maven.docs.outputencoding}">
        <!-- Need to add the maven jar to load the toolbox -->
        <classpath refid="maven-classpath"/>
        <tool name="toolbox.string.basedir" value="${basedir}"/>
        <tool name="toolbox.string.docSrc" value="${maven.docs.src}"/>
        <tool name="toolbox.string.srcDir" value="${maven.src.dir}"/>
        <tool name="toolbox.string.genDoc" value="${maven.gen.docs}"/>
        <tool name="toolbox.string.srcPresent" value="${maven.sourcesPresent}"/>
        <tool name="toolbox.string.testSrcPresent" 
value="${maven.unitTestSourcesPresent}"/>
        <tool name="toolbox.string.currentYear" value="${maven.current.year}"/>
      </dvsl>
  
      <!-- Copy site images -->
      <copy todir="${maven.docs.dest}/images" filtering="no">
        <fileset dir="${maven.home}/images">
          <include name="**/*.gif"/>
          <include name="**/*.jpeg"/>
          <include name="**/*.jpg"/>
          <include name="**/*.png"/>
        </fileset>
      </copy>
  
      <!-- Copy user supplied images -->
      <copy todir="${maven.docs.dest}/images" filtering="no">
        <fileset dir="${maven.docs.src}/images">
          <include name="**/*.gif"/>
          <include name="**/*.jpeg"/>
          <include name="**/*.jpg"/>
          <include name="**/*.png"/>
        </fileset>
      </copy>
  
      <!-- Copy maven supplied stylesheets.  -->
      <copy todir="${maven.docs.dest}/style" overwrite="yes" filtering="yes">
        <fileset dir="${maven.home}/stylesheets">
          <include name="**/*.css"/>
        </fileset>
        <filterset>
          <filter token="UI_BODY_BACKGROUND" value="${maven.ui.body.background}"/>
          <filter token="UI_BODY_FOREGROUND" value="${maven.ui.body.foreground}"/>
          <filter token="UI_SECTION_BACKGROUND" 
value="${maven.ui.section.background}"/>
          <filter token="UI_SECTION_FOREGROUND" 
value="${maven.ui.section.foreground}"/>
          <filter token="UI_SUBSECTION_BACKGROUND" 
value="${maven.ui.subsection.background}"/>
          <filter token="UI_SUBSECTION_FOREGROUND" 
value="${maven.ui.subsection.foreground}"/>
  
          <filter token="UI_TABLE_HEADER_BACKGROUND" 
value="${maven.ui.table.header.background}"/>
          <filter token="UI_TABLE_HEADER_FOREGROUND" 
value="${maven.ui.table.header.foreground}"/>
          <filter token="UI_TABLE_ROW_ODD_BACKGROUND" 
value="${maven.ui.table.row.odd.background}"/>
          <filter token="UI_TABLE_ROW_ODD_FOREGROUND" 
value="${maven.ui.table.row.odd.foreground}"/>
          <filter token="UI_TABLE_ROW_EVEN_BACKGROUND" 
value="${maven.ui.table.row.even.background}"/>
          <filter token="UI_TABLE_ROW_EVEN_FOREGROUND" 
value="${maven.ui.table.row.even.foreground}"/>
  
          <filter token="UI_BANNER_BACKGROUND" value="${maven.ui.banner.background}"/>
          <filter token="UI_BANNER_FOREGROUND" value="${maven.ui.banner.foreground}"/>
          <filter token="UI_BANNER_BORDER_TOP" value="${maven.ui.banner.border.top}"/>
          <filter token="UI_BANNER_BORDER_BOTTOM" 
value="${maven.ui.banner.border.bottom}"/>
  
          <filter token="UI_SOURCE_BACKGROUND" value="${maven.ui.source.background}"/>
          <filter token="UI_SOURCE_FOREGROUND" value="${maven.ui.source.foreground}"/>
          <filter token="UI_SOURCE_BORDER_TOP" value="${maven.ui.source.border.top}"/>
          <filter token="UI_SOURCE_BORDER_BOTTOM" 
value="${maven.ui.source.border.bottom}"/>
          <filter token="UI_SOURCE_BORDER_RIGHT" 
value="${maven.ui.source.border.right}"/>
          <filter token="UI_SOURCE_BORDER_LEFT" 
value="${maven.ui.source.border.left}"/>
  
          <filter token="UI_NAVCOL_BACKGROUND" value="${maven.ui.navcol.background}"/>
          <filter token="UI_NAVCOL_FOREGROUND" value="${maven.ui.navcol.foreground}"/>
          <filter token="UI_NAVCOL_BACKGROUND_NS4" 
value="${maven.ui.navcol.background.ns4}"/>
          <filter token="UI_NAVCOL_FOREGROUND_NS4" 
value="${maven.ui.navcol.foreground.ns4}"/>
          <filter token="UI_NAVCOL_BORDER_TOP" value="${maven.ui.navcol.border.top}"/>
          <filter token="UI_NAVCOL_BORDER_RIGHT" 
value="${maven.ui.navcol.border.right}"/>
          <filter token="UI_NAVCOL_BORDER_BOTTOM" 
value="${maven.ui.navcol.border.bottom}"/>
  
          <filter token="UI_BREADCRUMBS_BACKGROUND" 
value="${maven.ui.breadcrumbs.background}"/>
          <filter token="UI_BREADCRUMBS_FOREGROUND" 
value="${maven.ui.breadcrumbs.foreground}"/>
          <filter token="UI_BREADCRUMBS_BORDER_TOP" 
value="${maven.ui.breadcrumbs.border.top}"/>
          <filter token="UI_BREADCRUMBS_BORDER_BOTTOM" 
value="${maven.ui.breadcrumbs.border.bottom}"/>
  
          <filter token="UI_HREF_LINK" value="${maven.ui.href.link}"/>
          <filter token="UI_HREF_LINK_ACTIVE" value="${maven.ui.href.link.active}"/>
          <filter token="UI_HREF_LINK_SELFREF" value="${maven.ui.href.link.selfref}"/>
        </filterset>
      </copy>
  
      <!-- Copy user supplied stylesheets, can override maven -->
      <copy todir="${maven.docs.dest}/style" filtering="no">
        <fileset dir="${maven.docs.src}/stylesheets">
          <include name="**/*.css"/>
        </fileset>
      </copy>
    </goal>
  
    <!-- ================================================================== -->
    <!-- S I T E                                                            -->
    <!-- ================================================================== -->
  
    <goal
      name="site"
      prereqs="do-site"
    />
  
    <goal
      name="do-site"
      prereqs="docs,cross-ref"
    />
  
    <!-- ================================================================== -->
    <!-- D E P L O Y  S I T E                                               -->
    <!-- ================================================================== -->
  
    <goal
      name="check-maven-username">
      
      <!--
      unless="maven.username">
      
      Not sure if there's an unless jelly tag or what syntax I need
      to test for null.
      
      -->
  
      <fail>
        +------------------------------------------------------------------
        | ERROR!
        |
        | You must specify a maven username in order to deploy the site!
        | You can either set this property in your ~/build.properties
        | or specify one on the command line:
        |
        | ant -Dmaven.username=${user.name} maven:deploy-site
        +------------------------------------------------------------------
      </fail>
    </goal>
  
    <goal
      name="deploy-site"
      prereqs="check-maven-username, site,do-deploy-site"
    />
  
    <goal
      name="do-deploy-site">
      
      <j:if test="${flags.mavenUserName}">
      
      <echo>
        siteAddress = ${maven.siteAddress}
        siteDirectory = ${maven.siteDirectory}
      </echo>
  
      <!-- This needs to taken from the project properties -->
      <property name="maven.homepage" value="${maven.siteDirectory}"/>
  
      <tar tarfile="${maven.final.name}-site.tar" basedir="${maven.docs.dest}"/>
      <gzip zipfile="${maven.final.name}-site.tar.gz" 
src="${maven.final.name}-site.tar"/>
      <delete file="${maven.final.name}-site.tar"/>
  
      <exec dir="." executable="${maven.scp.executable}">
        <arg value="${maven.final.name}-site.tar.gz"/>
        <arg value="${maven.username}@${maven.siteAddress}:${maven.homepage}"/>
      </exec>
  
      <exec dir="." executable="${maven.ssh.executable}">
        <arg line="${maven.siteAddress} -l ${maven.username} 'mkdir -p 
${maven.homepage};cd ${maven.homepage};gunzip ${maven.final.name}-site.tar.gz;tar xUvf 
${maven.final.name}-site.tar;chmod -R g+u *;rm ${maven.final.name}-site.tar'"/>
      </exec>
  
      <delete file="${maven.final.name}-site.tar.gz"/>
      
      </j:if>
      
    </goal>
  
  </project>
  
  
  

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

Reply via email to