aheritier    2004/09/22 14:39:30

  Modified:    pdf      plugin.jelly plugin.properties
               pdf/xdocs changes.xml properties.xml
  Log:
  Fix MPPDF-11 and MPPDF-12
  
  Revision  Changes    Path
  1.21      +24 -40    maven-plugins/pdf/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/pdf/plugin.jelly,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- plugin.jelly      28 Jun 2004 00:07:24 -0000      1.20
  +++ plugin.jelly      22 Sep 2004 21:39:30 -0000      1.21
  @@ -25,34 +25,20 @@
     
     
     <goal name="pdf:init" prereqs="xdoc:init">
  +  
       <!-- xdoc plugin properties -->
       <maven:get var="maven.xdoc.src"                   plugin="maven-xdoc-plugin" 
property="maven.docs.src"/>
       <maven:get var="maven.xdoc.dest"                  plugin="maven-xdoc-plugin" 
property="maven.docs.dest"/>
       <maven:get var="maven.xdoc.gen"                   plugin="maven-xdoc-plugin" 
property="maven.gen.docs"/>
       <maven:get var="maven.xdoc.date.format"           plugin="maven-xdoc-plugin" 
property="maven.xdoc.date.format"/>
       <maven:get var="maven.xdoc.date.locale"           plugin="maven-xdoc-plugin" 
property="maven.xdoc.date.locale"/>
  -
  -    <!-- pdf plugin properties -->
  -    <maven:get var="maven.pdf.confidential"           plugin="maven-pdf-plugin" 
property="maven.pdf.confidential"/>
  -    <maven:get var="maven.pdf.paperType"              plugin="maven-pdf-plugin" 
property="maven.pdf.paperType"/>
  -    <maven:get var="maven.pdf.companyIncName"         plugin="maven-pdf-plugin" 
property="maven.pdf.companyIncName"/>
  -    <maven:get var="maven.pdf.copyrightYear"          plugin="maven-pdf-plugin" 
property="maven.pdf.copyrightYear"/>
  -    <maven:get var="maven.pdf.imageDpi"               plugin="maven-pdf-plugin" 
property="maven.pdf.imageDpi"/>
  -    <maven:get var="maven.pdf.debug"                  plugin="maven-pdf-plugin" 
property="maven.pdf.debug"/>
  -    <maven:get var="maven.pdf.navigationFile"         plugin="maven-pdf-plugin" 
property="maven.pdf.navigationFile"/>
  -    <maven:get var="maven.pdf.pdfName"                plugin="maven-pdf-plugin" 
property="maven.pdf.pdfName"/>
  -    <maven:get var="maven.pdf.cover.projectCompany"   plugin="maven-pdf-plugin" 
property="maven.pdf.cover.projectCompany"/>
  -    <maven:get var="maven.pdf.cover.projectName"      plugin="maven-pdf-plugin" 
property="maven.pdf.cover.projectName"/>
  -    <maven:get var="maven.pdf.cover.type"             plugin="maven-pdf-plugin" 
property="maven.pdf.cover.type"/>
  -    <maven:get var="maven.pdf.cover.version"          plugin="maven-pdf-plugin" 
property="maven.pdf.cover.version"/>
  -    <maven:get var="maven.pdf.cover.date"             plugin="maven-pdf-plugin" 
property="maven.pdf.cover.date"/>
  +  
       <tstamp>
         <format 
  -        property="maven.pdf.cover.date" 
  -        pattern="${maven.xdoc.date.format}" 
  +        property="maven.pdf.cover.date"
  +        pattern="${maven.xdoc.date.format}"
           locale="${maven.xdoc.date.locale}"/>
       </tstamp>    
  -    <maven:get var="maven.pdf.projectLogo"            plugin="maven-pdf-plugin" 
property="maven.pdf.projectLogo"/>
       <j:if test="not ${maven.pdf.projectLogo.startsWith('http://')}">
         <maven:makeAbsolutePath 
           var="maven.pdf.projectLogo" 
  @@ -60,7 +46,6 @@
           path="${maven.pdf.projectLogo}" 
           trim="true"/>
       </j:if>
  -    <maven:get var="maven.pdf.companyLogo"            plugin="maven-pdf-plugin" 
property="maven.pdf.companyLogo"/>
       <j:if test="not ${maven.pdf.companyLogo.startsWith('http://')}">
         <maven:makeAbsolutePath 
           var="maven.pdf.companyLogo" 
  @@ -70,8 +55,7 @@
       </j:if>
   
       <!-- internal variables -->
  -    <j:set var="internal.pdf.workingDir" value="${maven.build.dir}/pdf"/>
  -    <j:set var="internal.pdf.tocFile" 
value="${maven.xdoc.src}/${maven.pdf.navigationFile}"/>
  +    <j:set var="internal_pdf_workingDir" value="${maven.build.dir}/pdf"/>
      
       <j:if test="${maven.pdf.debug}">
         <ant:echo>
  @@ -94,6 +78,7 @@
   maven.pdf.imageDpi              = [${maven.pdf.imageDpi}]
   maven.pdf.debug                 = [${maven.pdf.debug}]
   maven.pdf.navigationFile        = [${maven.pdf.navigationFile}]
  +maven.pdf.navigationFilePath    = [${maven.pdf.navigationFilePath}]
   maven.pdf.pdfName               = [${maven.pdf.pdfName}]
   maven.pdf.cover.projectCompany  = [${maven.pdf.cover.projectCompany}]
   maven.pdf.cover.projectName     = [${maven.pdf.cover.projectName}]
  @@ -105,8 +90,7 @@
   ==============================
   === pdf internal variables ===
   ==============================
  -internal.pdf.workingDir         = [${internal.pdf.workingDir}]
  -internal.pdf.tocFile            = [${internal.pdf.tocFile}]
  +internal_pdf_workingDir         = [${internal_pdf_workingDir}]
         </ant:echo>
       </j:if>
       <j:if test="not ${maven.pdf.debug}">
  @@ -116,7 +100,7 @@
       </j:if>
   
       <!-- Create working directory -->      
  -    <mkdir dir="${internal.pdf.workingDir}"/>
  +    <mkdir dir="${internal_pdf_workingDir}"/>
     </goal>
     
     
  @@ -131,20 +115,20 @@
       prereqs="pdf:prepare" 
       description="Generates an fo xml document from the ${maven.pdf.navigationFile} 
file supplied as part of the documentation.">  
       
  -    <echo>Generating ${maven.xdoc.dest}/project.fo ...</echo>
  -    <available file="${internal.pdf.tocFile}" 
property="maven.fo.navigation.available"/>
  +    <echo>Generating ${maven.xdoc.dest}/project.fo from 
${maven.pdf.navigationFilePath}/${maven.pdf.navigationFile} ...</echo>
  +    <available file="${maven.pdf.navigationFilePath}/${maven.pdf.navigationFile}" 
property="maven.fo.navigation.available"/>
       <fail 
  -      message="PDF generation cannot complete as ${internal.pdf.tocFile} is 
missing" 
  +      message="PDF generation cannot complete as 
${maven.pdf.navigationFilePath}/${maven.pdf.navigationFile} is missing" 
         unless="maven.fo.navigation.available"/>
       <!-- 'Major hack.' Stolen from the Latka plugin.jelly. All of this could be 
avoided by putting
        xalan into $MAVEN_HOME/lib/endorsed directory in the distribution, but never 
mind -->
       
${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apache.xalan.processor.TransformerFactoryImpl')}
       <style 
  -      in="${internal.pdf.tocFile}" 
  -      out="${internal.pdf.workingDir}/project.fo" 
  +      in="${maven.pdf.navigationFilePath}/${maven.pdf.navigationFile}" 
  +      out="${internal_pdf_workingDir}/project.fo" 
         style="${plugin.resources}/project2fo.xslt" 
         force="true">
  -      <param name="basePath" expression="${internal.pdf.workingDir}"/>
  +      <param name="basePath" expression="${internal_pdf_workingDir}"/>
         <param name="confidential" expression="${maven.pdf.confidential}"/>
         <param name="paperType" expression="${maven.pdf.paperType}"/>
         <param name="companyIncName" expression="${maven.pdf.companyIncName}"/>
  @@ -173,19 +157,19 @@
       prereqs="pdf:init" 
       description="Stages all files needed to generate the PDF">
       <!-- First, copy all of the generated xdocs -->
  -    <copy todir="${internal.pdf.workingDir}">
  +    <copy todir="${internal_pdf_workingDir}">
         <fileset dir="${maven.xdoc.gen}" force="true">
           <include name="**/*.*"/>
         </fileset>
       </copy>
       <!-- Copy all of the user-supplied xdocs -->
  -    <copy todir="${internal.pdf.workingDir}" force="true" overwrite="true">
  +    <copy todir="${internal_pdf_workingDir}" force="true" overwrite="true">
         <fileset dir="${maven.xdoc.src}">
           <include name="**/*.*"/>
         </fileset>
       </copy>
       <!-- Then, copy all of images generated -->
  -    <copy todir="${internal.pdf.workingDir}" force="true">
  +    <copy todir="${internal_pdf_workingDir}" force="true">
         <fileset dir="${maven.xdoc.dest}">
           <include name="**/*.gif"/>
           <include name="**/*.jpg"/>
  @@ -193,7 +177,7 @@
         </fileset>
       </copy>
       <!-- Finally, copy the FOP config file and all of the fonts -->
  -    <copy todir="${internal.pdf.workingDir}" force="true">
  +    <copy todir="${internal_pdf_workingDir}" force="true">
         <fileset dir="${plugin.resources}">
           <include name="userconfig.xml"/>
           <include name="fonts/*.*"/>
  @@ -207,8 +191,8 @@
       description="Generates a PDF document containing all project documentation. The 
PDF is generated from the .fo file generated in the fo:fo goal." 
       prereqs="pdf:prepare">
       
  -    <echo>Generating ${internal.pdf.workingDir}/${maven.pdf.pdfName} ...</echo>
  -    <echo>Config file: ${internal.pdf.workingDir}/userconfig.xml</echo>
  +    <echo>Generating ${internal_pdf_workingDir}/${maven.pdf.pdfName} ...</echo>
  +    <echo>Config file: ${internal_pdf_workingDir}/userconfig.xml</echo>
       <java classname="org.apache.fop.apps.Fop" fork="yes" failonerror="true" 
maxmemory="500m">
         <classpath>
           <pathelement location="${plugin.getDependencyPath('fop')}"/>
  @@ -236,16 +220,16 @@
           <pathelement location="${plugin.getDependencyPath('xml-apis')}"/>
         </classpath>
         <arg value="-c"/>
  -      <arg value="${internal.pdf.workingDir}/userconfig.xml"/>
  +      <arg value="${internal_pdf_workingDir}/userconfig.xml"/>
         <if test="${maven.pdf.debug}">
           <arg value="-d"/>
         </if>
         <arg value="-fo"/>
  -      <arg value="${internal.pdf.workingDir}/project.fo"/>
  +      <arg value="${internal_pdf_workingDir}/project.fo"/>
         <arg value="-pdf"/>
  -      <arg value="${internal.pdf.workingDir}/${maven.pdf.pdfName}"/>
  +      <arg value="${internal_pdf_workingDir}/${maven.pdf.pdfName}"/>
         <sysproperty key="javax.xml.transform.TransformerFactory" 
value="org.apache.xalan.processor.TransformerFactoryImpl"/>
       </java>
  -    <copy todir="${maven.xdoc.dest}" 
file="${internal.pdf.workingDir}/${maven.pdf.pdfName}"/>
  +    <copy todir="${maven.xdoc.dest}" 
file="${internal_pdf_workingDir}/${maven.pdf.pdfName}"/>
     </goal>
   </project>
  
  
  
  1.12      +1 -0      maven-plugins/pdf/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: /home/cvs/maven-plugins/pdf/plugin.properties,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- plugin.properties 4 Mar 2004 18:37:54 -0000       1.11
  +++ plugin.properties 22 Sep 2004 21:39:30 -0000      1.12
  @@ -26,6 +26,7 @@
   maven.pdf.imageDpi=72
   maven.pdf.debug=false
   maven.pdf.navigationFile=navigation.xml
  +maven.pdf.navigationFilePath=${maven.xdoc.src}
   maven.pdf.pdfName=${pom.artifactId}.pdf
   maven.pdf.cover.projectCompany=${pom.organization.name}
   maven.pdf.cover.projectName=${pom.name}
  
  
  
  1.20      +1 -0      maven-plugins/pdf/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/pdf/xdocs/changes.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- changes.xml       22 Sep 2004 20:37:18 -0000      1.19
  +++ changes.xml       22 Sep 2004 21:39:30 -0000      1.20
  @@ -25,6 +25,7 @@
       <release version="2.2-SNAPSHOT" date="In CVS">
         <action dev="aheritier" type="fix" issue="MPPDF-14">PRE tag support 
added.</action>
         <action dev="carlos" type="fix">Show "v." in cover only when version is not 
empty.</action>
  +      <action dev="aheritier" type="add" issue="MPPDF-11">The new property 
"maven.pdf.navigationFilePath" allows you to define a different directory from 
${maven.xdoc.src} for the navigation file (If this file is generated for 
example).</action>
         <action dev="aheritier" type="add" issue="MPPDF-10" due-to="M. Sean 
Gilligan">Add USLetter (8.5"x11") as a paper type.</action>
       </release>
       <release version="2.1" date="2004-05-15">
  
  
  
  1.11      +9 -2      maven-plugins/pdf/xdocs/properties.xml
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/pdf/xdocs/properties.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- properties.xml    13 Jun 2004 22:55:27 -0000      1.10
  +++ properties.xml    22 Sep 2004 21:39:30 -0000      1.11
  @@ -93,6 +93,14 @@
               </td>
             </tr>
             <tr>
  +            <td width="25%">maven.pdf.navigationFilePath</td>
  +            <td>The directory where the ${maven.pdf.navigationFile} can be found. 
This is useful to define it if this file is generated for example.</td>
  +            <td width="10%">Yes</td>
  +            <td>
  +              <code>${maven.xdoc.src}</code>
  +            </td>
  +          </tr>
  +          <tr>
               <td width="25%">maven.pdf.projectLogo</td>
               <td>Project logo URL (or relative path).</td>
               <td width="10%">Yes</td>
  @@ -161,8 +169,7 @@
             </tr>
             <tr>
               <td width="25%">maven.docs.src</td>
  -            <td>The source directory for the 
  -                    <code>${maven.pdf.navigationFile}</code> file and the user 
  +            <td>The source directory for the user 
                       xml documentations files.</td>
               <td width="10%">Yes</td>
               <td>
  
  
  

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

Reply via email to