You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ka...@apache.org on 2003/01/25 19:19:55 UTC

cvs commit: jakarta-turbine-maven/src/plugins-build/word2html plugin.jelly

kaz         2003/01/25 10:19:55

  Modified:    src/plugins-build/dist plugin.jelly plugin.properties
               src/plugins-build/jdiff plugin.jelly
               src/plugins-build/pdf plugin.jelly plugin.properties
               src/plugins-build/site plugin.jelly plugin.properties
               src/plugins-build/word2html plugin.jelly
  Log:
  Updating some more plugins that were referring to maven.docs.dest
  property from the xdoc plugin.  These have been updated to use the new
  method of accessing properties in other plugins.  While cleaning this
  up, I also noticed a handful of other repetitive properties in
  plugin.properties files, which I also removed/cleaned.
  
  Revision  Changes    Path
  1.2       +3 -1      jakarta-turbine-maven/src/plugins-build/dist/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/dist/plugin.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.jelly	24 Jan 2003 03:45:07 -0000	1.1
  +++ plugin.jelly	25 Jan 2003 18:19:54 -0000	1.2
  @@ -19,7 +19,7 @@
   
     <goal
       name="dist:prepare-bin-filesystem"
  -    prereqs="java:jar,javadoc:generate"
  +    prereqs="xdoc:init, java:jar, javadoc:generate"
       description="Builds the binary distribution file system.">
       
       <!--
  @@ -53,6 +53,8 @@
       </copy>
   
       <!-- Copy documentation -->
  +    <j:set var="docsDest"
  +      value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}"/>
       <copy todir="${maven.dist.bin.assembly.dir}/docs">
         <fileset dir="${maven.docs.dest}">
           <include name="**"/>
  
  
  
  1.2       +0 -7      jakarta-turbine-maven/src/plugins-build/dist/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/dist/plugin.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.properties	24 Jan 2003 03:45:07 -0000	1.1
  +++ plugin.properties	25 Jan 2003 18:19:54 -0000	1.2
  @@ -4,11 +4,4 @@
   # Distribution plugin.
   # -------------------------------------------------------------------
   
  -maven.build.dir = ${basedir}/target
  -
  -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
  -
   maven.src.docbook-simple=${maven.src.dir}/sdocbook
  
  
  
  1.2       +4 -1      jakarta-turbine-maven/src/plugins-build/jdiff/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/jdiff/plugin.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.jelly	24 Jan 2003 03:45:35 -0000	1.1
  +++ plugin.jelly	25 Jan 2003 18:19:54 -0000	1.2
  @@ -8,12 +8,15 @@
         
     <goal
       name="jdiff"
  +    prereqs="xdoc:init"
       description="generate an api difference report between versions">
   
       <property name="maven.jdiff.dir" value="${maven.build.dir}/jdiff"/>
       <mkdir dir="${maven.jdiff.dir}"/>
   
  -    <property name="maven.jdiff.changes.dir" value="${maven.docs.dest}/jdiff"/>    
  +    <j:set var="docsDest"
  +      value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}"/>
  +    <property name="maven.jdiff.changes.dir" value="${docsDest}/jdiff"/>    
       <mkdir dir="${maven.jdiff.changes.dir}"/>
               
       <condition property="maven.jdiff.new.current" value="true">
  
  
  
  1.2       +24 -13    jakarta-turbine-maven/src/plugins-build/pdf/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/pdf/plugin.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.jelly	24 Jan 2003 03:45:47 -0000	1.1
  +++ plugin.jelly	25 Jan 2003 18:19:54 -0000	1.2
  @@ -2,19 +2,30 @@
   
   <project xmlns:j="jelly:core">
   
  +  <goal 
  +    name="pdf:init"
  +    prereqs="xdoc:init">
  +
  +    <j:set var="docsDest"
  +      value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}"/>
  +    <j:set var="docsSrc"
  +      value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.src')}"/>
  +
  +  </goal>
  +
     <goal
       name="fo"
       prereqs="fo:fo"
       description="Generate XSL:FO project documentation"/>
   
  -  <goal name="fo:fo" description="Generate XSL:FO project documentation">
  -
  -    <mkdir dir="${maven.docs.dest}"/>
  +  <goal name="fo:fo" 
  +    prereqs="pdf:init"
  +    description="Generate XSL:FO project documentation">
       
  -    <echo>Generating ${maven.docs.dest}/project.fo ...</echo>
  -    <available file="${maven.docs.src}/navigation.xml" 
  +    <echo>Generating ${docsDest}/project.fo ...</echo>
  +    <available file="${docsSrc}/navigation.xml" 
         property="maven.fo.navigation.available"/>
  -    <fail message="PDF generation cannot complete as ${maven.docs.src}/navigation.xml is missing"
  +    <fail message="PDF generation cannot complete as ${docsSrc}/navigation.xml is missing"
         unless="maven.fo.navigation.available"/>
       <java classname="org.apache.xalan.xslt.Process" fork="yes" failonerror="true">
         <classpath>
  @@ -24,14 +35,14 @@
         </classpath>
         <sysproperty key="user.language" value="en"/>
         <arg value="-in"/>
  -      <arg value="file://${maven.docs.src}/navigation.xml"/>
  +      <arg value="file://${docsSrc}/navigation.xml"/>
         <arg value="-out"/>
  -      <arg value="${maven.docs.dest}/project.fo"/>
  +      <arg value="${docsDest}/project.fo"/>
         <arg value="-xsl"/>
         <arg value="file://${plugin.resources}/project2fo.xslt"/>
         <arg value="-param"/>
         <arg value="basePath"/>
  -      <arg value="${maven.docs.src}"/>
  +      <arg value="${docsSrc}"/>
       </java>
   
     </goal>
  @@ -42,9 +53,9 @@
       description="Generate PDF project documentation"/>
   
     <goal name="pdf:pdf" description="Generate PDF project documentation"
  -     prereqs="fo">
  +     prereqs="pdf:inif, fo">
   
  -    <echo>Generating ${maven.docs.dest}/project.pdf ...</echo>
  +    <echo>Generating ${docsDest}/project.pdf ...</echo>
       <java classname="org.apache.fop.apps.Fop" fork="yes" failonerror="true">
         <classpath>
           <pathelement location="${plugin.getDependencyPath('fop')}"/>
  @@ -55,9 +66,9 @@
         </classpath>
         <arg value="-d" />
         <arg value="-fo" />
  -      <arg value="${maven.docs.dest}/project.fo" />
  +      <arg value="${docsDest}/project.fo" />
         <arg value="-pdf" />
  -      <arg value="${maven.docs.dest}/project.pdf"/>
  +      <arg value="${docsDest}/project.pdf"/>
       </java>
   
     </goal>
  
  
  
  1.2       +0 -4      jakarta-turbine-maven/src/plugins-build/pdf/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/pdf/plugin.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.properties	24 Jan 2003 03:45:47 -0000	1.1
  +++ plugin.properties	25 Jan 2003 18:19:54 -0000	1.2
  @@ -4,7 +4,3 @@
   # PDF plugin.
   # -------------------------------------------------------------------
   
  -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
  
  
  
  1.2       +12 -5     jakarta-turbine-maven/src/plugins-build/site/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/site/plugin.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.jelly	24 Jan 2003 03:45:50 -0000	1.1
  +++ plugin.jelly	25 Jan 2003 18:19:55 -0000	1.2
  @@ -10,6 +10,11 @@
     <!-- ================================================================== -->
     
     <goal name="site:generate" prereqs="site"/>
  +
  +  <goal name="site:init" prereqs="xdoc:init">
  +    <j:set var="docsDest"
  +      value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}"/>
  +  </goal>
     
     <goal
       name="site"
  @@ -87,6 +92,7 @@
     <!-- ================================================================== -->
   
     <goal name="site:sshdeploy" 
  +    prereqs="site:init"
       description="Deploy the generated site docs using ssh">
   
       <m:user-check user="${maven.username}"/>
  @@ -99,7 +105,7 @@
       <!-- This needs to taken from the project properties -->
       <property name="maven.homepage" value="${pom.siteDirectory}"/>
   
  -    <tar tarfile="${maven.build.dir}/${maven.final.name}-site.tar" basedir="${maven.docs.dest}"/>
  +    <tar tarfile="${maven.build.dir}/${maven.final.name}-site.tar" basedir="${docsDest}"/>
       <gzip zipfile="${maven.build.dir}/${maven.final.name}-site.tar.gz" src="${maven.build.dir}/${maven.final.name}-site.tar"/>
       <delete file="${maven.build.dir}/${maven.final.name}-site.tar"/>
   
  @@ -127,6 +133,7 @@
     <!-- ================================================================== -->
   
     <goal name="site:fsdeploy" 
  +    prereqs="site:init"
       description="Deploy the generated site by copying to the site directory">
   
       <echo>
  @@ -137,7 +144,7 @@
       <!-- copy the site to the directory specified in the project.xml file -->
   
       <copy todir="${pom.siteDirectory}">
  -      <fileset dir="${maven.docs.dest}">
  +      <fileset dir="${docsDest}">
           <include name="**/*.*"/>
         </fileset>
       </copy>
  @@ -145,11 +152,11 @@
     </goal>
   
     <goal name="site:war" description="Create a WAR File from the generated site"
  -    prereqs="site">
  -    <mkdir dir="${maven.docs.dest}/WEB-INF" />
  +    prereqs="site:init, site">
  +    <mkdir dir="${docsDest}/WEB-INF" />
       <war destfile="${maven.build.dir}/${maven.final.name}-site.war"
         webxml="${plugin.resources}/web.xml">
  -      <fileset dir="${maven.docs.dest}" />
  +      <fileset dir="${docsDest}" />
       </war>
     </goal>
   
  
  
  
  1.2       +0 -15     jakarta-turbine-maven/src/plugins-build/site/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/site/plugin.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.properties	24 Jan 2003 03:45:50 -0000	1.1
  +++ plugin.properties	25 Jan 2003 18:19:55 -0000	1.2
  @@ -5,15 +5,6 @@
   # keep them apart from the project specific properties.
   # -------------------------------------------------------------------
   
  -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.final.name = ${pom.id}-${pom.currentVersion}
  -maven.final.dir = ${basedir}/${maven.final.name}
  -
   # set maven.site.deploy.method to 'fs' if you want to COPY the site
   # instead of SSH'ing it to the webserver (pom.siteDirectory is used
   # to copy the site to
  @@ -21,9 +12,3 @@
   
   maven.username=USERNAME_NOT_SET
   
  -#
  -# FIXME: This is a copy of maven.docs.dest, as there is a dependency
  -#        issue where plugins dont get access to other plugins properties
  -#        from the context
  -#
  -maven.docs.dest = ${maven.build.dir}/docs
  \ No newline at end of file
  
  
  
  1.2       +6 -3      jakarta-turbine-maven/src/plugins-build/word2html/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/word2html/plugin.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.jelly	24 Jan 2003 03:46:25 -0000	1.1
  +++ plugin.jelly	25 Jan 2003 18:19:55 -0000	1.2
  @@ -13,7 +13,7 @@
     </goal>
   
     <goal name="word2html:generate"
  -        prereqs="word2html:prepare-filesystem"
  +        prereqs="xdoc:init, word2html:prepare-filesystem"
           description="Generate HTML docs from Word via CScript">
   
       <j:if test="${!wordSrcDir.equals('MAVEN_WORD2HTML_SRC_DIR_NOT_SET')}">
  @@ -28,11 +28,14 @@
           </fileset>
         </fileScanner>
   
  +      <j:set var="docsDest"
  +        value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}"/>
  +
         <j:forEach var="file" items="${wordFiles.iterator()}">
  -        <echo>Generating from ${file} to ${maven.docs.dest}</echo>
  +        <echo>Generating from ${file} to ${docsDest}</echo>
           <exec executable="cscript.exe">
             <arg line='"${plugin.resources}/word2html.vbs" "${file}"' />
  -          <arg line='"${maven.docs.dest}"' />
  +          <arg line='"${docsDest}"' />
             <arg line='"${wordSrcDir}"' />
           </exec>