Maven 1.x PDF Plugin
  1. Maven 1.x PDF Plugin
  2. MPPDF-57

Unable to remove cover type and version

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5.1
    • Labels:
      None
    • Environment:
      Maven 1.1-RC1-SNAPSHOT
    • Number of attachments :
      2

      Description

      I'm trying to remove the 'cover type' and 'cover version' (set them to blank/nothing.) If I put the following in project.properties:

      maven.pdf.cover.type=
      maven.pdf.cover.version=

      I get the text '-PARAM' for the cover type, and 'v1.0' for the cover version.

      If I try it again with '.' for both of those properties, cover type works (just prints a dot) but cover version prints 'v..'.

      This seems to call for something like a 'maven.pdf.cover.version.prefix' property (that can be set to blank.)

      1. pdf-test.tar.gz
        1 kB
        Wendy Smoak
      2. svn-intro.pdf
        164 kB
        Wendy Smoak

        Activity

        Hide
        Wendy Smoak added a comment -

        Yes, I meant 'maven site'.

        $ echo $MAVEN_HOME
        c:\java\maven-1.1-RC1-SNAPSHOT

        $PATH contains $MAVEN_HOME/bin.

        $ ll $MAVEN_HOME/plugins/ | grep pdf
        rwx-----+ 1 wsmoak wsmoak 430109 Oct 26 12:05 maven-pdf-plugin-2.5.1-SNAPSHOT.jar

        I'm using Maven 1.1-RC1, and I've build the pdf plugin from source. I'm fairly sure I've got the latest, because the recent fix for 'cover version' is working (I no longer see v1.0 on the cover).

        Console output of building the plugin (after deleting the cache) and building the test project follows. The resulting PDF is attached.

        /cygdrive/c/svn/maven-1/plugins/pdf
        $ maven plugin:install
        __ __

        \/ __ Apache_ ___
          \/ / ` \ V / -) ' \ ~ intelligent projects ~
        _   _,_ _/___ _ _ v. 1.1-RC1-SNAPSHOT

        build:start:

        plugin:plugin:
        java:prepare-filesystem:
        [mkdir] Created dir: C:\svn\maven-1\plugins\pdf\target\classes

        java:compile:
        [echo] No java source files to compile.

        java:jar-resources:
        Copying 1 file to c:\svn\maven-1\plugins\pdf\target\classes\META-INF
        Copying 17 files to c:\svn\maven-1\plugins\pdf\target\classes\plugin-resources
        Copying 4 files to c:\svn\maven-1\plugins\pdf\target\classes

        test:test:
        [echo] No tests to run.

        jar:jar:
        [jar] Building jar: C:\svn\maven-1\plugins\pdf\target\maven-pdf-plugin-2.5.1
        -SNAPSHOT.jar

        [echo] Rewriting POM...
        [copy] Copying 1 file to C:\svn\maven-1\plugins\pdf\target
        [jar] Updating jar: C:\svn\maven-1\plugins\pdf\target\maven-pdf-plugin-2.5.1
        -SNAPSHOT.jar
        [delete] Deleting: C:\svn\maven-1\plugins\pdf\target\project.xml

        plugin:install:
        [delete] Deleting 1 files from C:\java\maven-1.1-RC1-SNAPSHOT\plugins
        [delete] C:\java\m1-repository\plugins not found.
        [delete] Deleting 24 files from C:\java\m1-repository\cache
        [delete] Deleted 5 directories from C:\java\m1-repository\cache
        [copy] Copying 1 file to C:\java\maven-1.1-RC1-SNAPSHOT\plugins
        BUILD SUCCESSFUL
        Total time : 6 seconds
        Finished at : Thursday, October 26, 2006 12:05:20 PM GMT-07:00

        /cygdrive/c/svn/maven-1/plugins/pdf
        $

        /cygdrive/c/java/pdf-test
        $ maven site
        __ __

        \/ __ Apache_ ___
          \/ / ` \ V / -) ' \ ~ intelligent projects ~
        _   _,_ _/___ _ _ v. 1.1-RC1-SNAPSHOT

        Directory C:\java\m1-repository\cache does not exist. Attempting to create.
        Plugin cache will be regenerated
        build:start:

        site:
        xdoc:register-reports:
        xdoc:init-i18n:
        [echo] Init the i18n support

        xdoc:init:
        [echo] Generates the directory structure required for xdocs

        pdf:init:
        [copy] Copying 98 files to C:\java\pdf-test\target\docs\images

        maven-pdf-plugin:register:

        site:run-reports:
        [echo] Generating the PDF Documentation...
        maven-pdf-plugin:report:

        xdoc:init-i18n:

        xdoc:init:
        [echo] Generates the directory structure required for xdocs

        xdoc:i18n-validation:
        [echo] Validation of the locale entries

        xdoc:register-reports:
        xdoc:init-i18n:

        xdoc:init:
        [echo] Generates the directory structure required for xdocs

        pdf:init:
        [copy] Copying 98 files to C:\java\pdf-test\target\docs\images

        maven-pdf-plugin:register:

        xdoc:generate-from-pom:
        [echo] Generating xdocs from POM ...

        Running post goal: xdoc:generate-from-pom
        xdoc:init-i18n:

        xdoc:init:
        [echo] Generates the directory structure required for xdocs

        pdf:init:
        [copy] Copying 98 files to C:\java\pdf-test\target\docs\images

        pdf:prepare:
        [copy] Copying 10 files to C:\java\pdf-test\target\pdf
        [copy] Copying 2 files to C:\java\pdf-test\target\pdf
        [copy] Copying 98 files to C:\java\pdf-test\target\pdf
        [copy] Copying 7 files to C:\java\pdf-test\target\pdf

        fo:fo:
        [echo] Generating c:\java\pdf-test/target/pdf/project.fo from c:\java\pdf-te
        st/xdocs/navigation.xml ...
        [java] Invalid option: coverDate
        [java] Invalid option: 26 October 2006

        pdf:pdf:
        [echo] Generating c:\java\pdf-test/target/pdf/svn-intro.pdf ...
        [echo] Config file: c:\java\pdf-test/target/pdf/userconfig.xml
        [java] [INFO] Using org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser as SA
        X2 Parser
        [java] [INFO] Using org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser as SA
        X2 Parser
        [java] [INFO] FOP 0.20.5
        [java] [INFO] Using org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser as SA
        X2 Parser
        [java] [INFO] building formatting object tree
        [java] [INFO] setting up fonts
        [java] [INFO] [1]
        [java] [INFO] [2] (blank)
        [java] [INFO] [1]
        [java] [INFO] [2] (blank)
        [java] [INFO] [1]
        [java] [INFO] Using org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser as SA
        X2 Parser
        [java] [INFO] Parsing of document complete, stopping renderer
        [copy] Copying 1 file to C:\java\pdf-test\target\docs

        pdf:

        xdoc:transform:
        xdoc:init-i18n:

        xdoc:init:
        [echo] Generates the directory structure required for xdocs

        xdoc:copy-resources:
        [copy] Copying 5 files to C:\java\pdf-test\target\docs\style

        xdoc:init-i18n:

        xdoc:init:
        [echo] Generates the directory structure required for xdocs
        Copying user supplied resources.

        xdoc:copy-user-resources:

        xdoc:init-i18n:

        xdoc:init:
        [echo] Generates the directory structure required for xdocs

        xdoc:jelly-init:

        xdoc:register-reports:
        xdoc:init-i18n:

        xdoc:init:
        [echo] Generates the directory structure required for xdocs

        pdf:init:
        [copy] Copying 98 files to C:\java\pdf-test\target\docs\images

        maven-pdf-plugin:register:

        xdoc:jelly-transform:
        About to use JSL stylesheet file:/C:/java/m1-repository/cache/maven-xdoc-plugin-
        1.10.1-SNAPSHOT/plugin-resources/site.jsl
        [echo] en
        [echo] The current Locale is the default one
        [echo] Scanning 'C:\java\pdf-test\target\generated-xdocs'...
        [echo] Generating C:/java/pdf-test/target/docs/dependencies.html from C:\jav
        a\pdf-test\target\generated-xdocs\dependencies.xml
        [echo] Generating C:/java/pdf-test/target/docs/development-process.html from
        C:\java\pdf-test\target\generated-xdocs\development-process.xml
        [echo] Generating C:/java/pdf-test/target/docs/downloads.html from C:\java\p
        df-test\target\generated-xdocs\downloads.xml
        [echo] Generating C:/java/pdf-test/target/docs/index.html from C:\java\pdf-t
        est\target\generated-xdocs\index.xml
        [echo] Generating C:/java/pdf-test/target/docs/issue-tracking.html from C:\j
        ava\pdf-test\target\generated-xdocs\issue-tracking.xml
        [echo] Generating C:/java/pdf-test/target/docs/mail-lists.html from C:\java\
        pdf-test\target\generated-xdocs\mail-lists.xml
        [echo] Generating C:/java/pdf-test/target/docs/maven-reports.html from C:\ja
        va\pdf-test\target\generated-xdocs\maven-reports.xml
        [echo] Generating C:/java/pdf-test/target/docs/project-info.html from C:\jav
        a\pdf-test\target\generated-xdocs\project-info.xml
        [echo] Generating C:/java/pdf-test/target/docs/scm-usage.html from C:\java\p
        df-test\target\generated-xdocs\scm-usage.xml
        [echo] Generating C:/java/pdf-test/target/docs/team-list.html from C:\java\p
        df-test\target\generated-xdocs\team-list.xml
        Transforming user supplied documentation.
        [echo] The current Locale is the default one
        [echo] Scanning 'C:\java\pdf-test\xdocs'...
        [echo] Generating C:/java/pdf-test/target/docs/index.html from C:\java\pdf-t
        est\xdocs\index.xml

        xdoc:

        BUILD SUCCESSFUL
        Total time : 31 seconds
        Finished at : Thursday, October 26, 2006 12:17:17 PM GMT-07:00

        /cygdrive/c/java/pdf-test
        $

        Show
        Wendy Smoak added a comment - Yes, I meant 'maven site'. $ echo $MAVEN_HOME c:\java\maven-1.1-RC1-SNAPSHOT $PATH contains $MAVEN_HOME/bin. $ ll $MAVEN_HOME/plugins/ | grep pdf rwx -----+ 1 wsmoak wsmoak 430109 Oct 26 12:05 maven-pdf-plugin-2.5.1-SNAPSHOT.jar I'm using Maven 1.1-RC1, and I've build the pdf plugin from source. I'm fairly sure I've got the latest, because the recent fix for 'cover version' is working (I no longer see v1.0 on the cover). Console output of building the plugin (after deleting the cache) and building the test project follows. The resulting PDF is attached. /cygdrive/c/svn/maven-1/plugins/pdf $ maven plugin:install __ __ \/ __ Apache _ ___   \/ / ` \ V / - ) ' \ ~ intelligent projects ~ _   _ ,_ _/___ _ _ v. 1.1-RC1-SNAPSHOT build:start: plugin:plugin: java:prepare-filesystem: [mkdir] Created dir: C:\svn\maven-1\plugins\pdf\target\classes java:compile: [echo] No java source files to compile. java:jar-resources: Copying 1 file to c:\svn\maven-1\plugins\pdf\target\classes\META-INF Copying 17 files to c:\svn\maven-1\plugins\pdf\target\classes\plugin-resources Copying 4 files to c:\svn\maven-1\plugins\pdf\target\classes test:test: [echo] No tests to run. jar:jar: [jar] Building jar: C:\svn\maven-1\plugins\pdf\target\maven-pdf-plugin-2.5.1 -SNAPSHOT.jar [echo] Rewriting POM... [copy] Copying 1 file to C:\svn\maven-1\plugins\pdf\target [jar] Updating jar: C:\svn\maven-1\plugins\pdf\target\maven-pdf-plugin-2.5.1 -SNAPSHOT.jar [delete] Deleting: C:\svn\maven-1\plugins\pdf\target\project.xml plugin:install: [delete] Deleting 1 files from C:\java\maven-1.1-RC1-SNAPSHOT\plugins [delete] C:\java\m1-repository\plugins not found. [delete] Deleting 24 files from C:\java\m1-repository\cache [delete] Deleted 5 directories from C:\java\m1-repository\cache [copy] Copying 1 file to C:\java\maven-1.1-RC1-SNAPSHOT\plugins BUILD SUCCESSFUL Total time : 6 seconds Finished at : Thursday, October 26, 2006 12:05:20 PM GMT-07:00 /cygdrive/c/svn/maven-1/plugins/pdf $ /cygdrive/c/java/pdf-test $ maven site __ __ \/ __ Apache _ ___   \/ / ` \ V / - ) ' \ ~ intelligent projects ~ _   _ ,_ _/___ _ _ v. 1.1-RC1-SNAPSHOT Directory C:\java\m1-repository\cache does not exist. Attempting to create. Plugin cache will be regenerated build:start: site: xdoc:register-reports: xdoc:init-i18n: [echo] Init the i18n support xdoc:init: [echo] Generates the directory structure required for xdocs pdf:init: [copy] Copying 98 files to C:\java\pdf-test\target\docs\images maven-pdf-plugin:register: site:run-reports: [echo] Generating the PDF Documentation... maven-pdf-plugin:report: xdoc:init-i18n: xdoc:init: [echo] Generates the directory structure required for xdocs xdoc:i18n-validation: [echo] Validation of the locale entries xdoc:register-reports: xdoc:init-i18n: xdoc:init: [echo] Generates the directory structure required for xdocs pdf:init: [copy] Copying 98 files to C:\java\pdf-test\target\docs\images maven-pdf-plugin:register: xdoc:generate-from-pom: [echo] Generating xdocs from POM ... Running post goal: xdoc:generate-from-pom xdoc:init-i18n: xdoc:init: [echo] Generates the directory structure required for xdocs pdf:init: [copy] Copying 98 files to C:\java\pdf-test\target\docs\images pdf:prepare: [copy] Copying 10 files to C:\java\pdf-test\target\pdf [copy] Copying 2 files to C:\java\pdf-test\target\pdf [copy] Copying 98 files to C:\java\pdf-test\target\pdf [copy] Copying 7 files to C:\java\pdf-test\target\pdf fo:fo: [echo] Generating c:\java\pdf-test/target/pdf/project.fo from c:\java\pdf-te st/xdocs/navigation.xml ... [java] Invalid option: coverDate [java] Invalid option: 26 October 2006 pdf:pdf: [echo] Generating c:\java\pdf-test/target/pdf/svn-intro.pdf ... [echo] Config file: c:\java\pdf-test/target/pdf/userconfig.xml [java] [INFO] Using org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser as SA X2 Parser [java] [INFO] Using org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser as SA X2 Parser [java] [INFO] FOP 0.20.5 [java] [INFO] Using org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser as SA X2 Parser [java] [INFO] building formatting object tree [java] [INFO] setting up fonts [java] [INFO] [1] [java] [INFO] [2] (blank) [java] [INFO] [1] [java] [INFO] [2] (blank) [java] [INFO] [1] [java] [INFO] Using org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser as SA X2 Parser [java] [INFO] Parsing of document complete, stopping renderer [copy] Copying 1 file to C:\java\pdf-test\target\docs pdf: xdoc:transform: xdoc:init-i18n: xdoc:init: [echo] Generates the directory structure required for xdocs xdoc:copy-resources: [copy] Copying 5 files to C:\java\pdf-test\target\docs\style xdoc:init-i18n: xdoc:init: [echo] Generates the directory structure required for xdocs Copying user supplied resources. xdoc:copy-user-resources: xdoc:init-i18n: xdoc:init: [echo] Generates the directory structure required for xdocs xdoc:jelly-init: xdoc:register-reports: xdoc:init-i18n: xdoc:init: [echo] Generates the directory structure required for xdocs pdf:init: [copy] Copying 98 files to C:\java\pdf-test\target\docs\images maven-pdf-plugin:register: xdoc:jelly-transform: About to use JSL stylesheet file:/C:/java/m1-repository/cache/maven-xdoc-plugin- 1.10.1-SNAPSHOT/plugin-resources/site.jsl [echo] en [echo] The current Locale is the default one [echo] Scanning 'C:\java\pdf-test\target\generated-xdocs'... [echo] Generating C:/java/pdf-test/target/docs/dependencies.html from C:\jav a\pdf-test\target\generated-xdocs\dependencies.xml [echo] Generating C:/java/pdf-test/target/docs/development-process.html from C:\java\pdf-test\target\generated-xdocs\development-process.xml [echo] Generating C:/java/pdf-test/target/docs/downloads.html from C:\java\p df-test\target\generated-xdocs\downloads.xml [echo] Generating C:/java/pdf-test/target/docs/index.html from C:\java\pdf-t est\target\generated-xdocs\index.xml [echo] Generating C:/java/pdf-test/target/docs/issue-tracking.html from C:\j ava\pdf-test\target\generated-xdocs\issue-tracking.xml [echo] Generating C:/java/pdf-test/target/docs/mail-lists.html from C:\java\ pdf-test\target\generated-xdocs\mail-lists.xml [echo] Generating C:/java/pdf-test/target/docs/maven-reports.html from C:\ja va\pdf-test\target\generated-xdocs\maven-reports.xml [echo] Generating C:/java/pdf-test/target/docs/project-info.html from C:\jav a\pdf-test\target\generated-xdocs\project-info.xml [echo] Generating C:/java/pdf-test/target/docs/scm-usage.html from C:\java\p df-test\target\generated-xdocs\scm-usage.xml [echo] Generating C:/java/pdf-test/target/docs/team-list.html from C:\java\p df-test\target\generated-xdocs\team-list.xml Transforming user supplied documentation. [echo] The current Locale is the default one [echo] Scanning 'C:\java\pdf-test\xdocs'... [echo] Generating C:/java/pdf-test/target/docs/index.html from C:\java\pdf-t est\xdocs\index.xml xdoc: BUILD SUCCESSFUL Total time : 31 seconds Finished at : Thursday, October 26, 2006 12:17:17 PM GMT-07:00 /cygdrive/c/java/pdf-test $
        Hide
        Arnaud Heritier added a comment -

        Lukas, I reproduced (and fixed) it with wendy's testcase
        In fact it's logical because there's no test arround the cover type attribute.
        If maven.pdf.cover.type is empty or null, the generated command line will be :
        .... -PARAM coverType -PARAM coverVersion ...
        Thus coverType=-PARAM and coverVersion isn't used.
        I just added the same test like for the version
        <j:set var="_coverType" value="$

        {maven.pdf.cover.type}

        "/>
        <j:if test="$

        {not empty(_coverType)}

        ">
        <arg value="-PARAM"/>
        <arg value="coverType"/>
        <arg value="${_coverType}"/>
        </j:if>
        And I removed the default value in project2fo.xslt
        I'm not sure if we don't have to this test for each PARAM to be sure to not reproduce it later..

        Show
        Arnaud Heritier added a comment - Lukas, I reproduced (and fixed) it with wendy's testcase In fact it's logical because there's no test arround the cover type attribute. If maven.pdf.cover.type is empty or null, the generated command line will be : .... -PARAM coverType -PARAM coverVersion ... Thus coverType=-PARAM and coverVersion isn't used. I just added the same test like for the version <j:set var="_coverType" value="$ {maven.pdf.cover.type} "/> <j:if test="$ {not empty(_coverType)} "> <arg value="-PARAM"/> <arg value="coverType"/> <arg value="${_coverType}"/> </j:if> And I removed the default value in project2fo.xslt I'm not sure if we don't have to this test for each PARAM to be sure to not reproduce it later..
        Hide
        Arnaud Heritier added a comment -
        • To avoid problems, be sure to not use a -PARAM without arg
        • Remove default hardcoded settings to allow users to remove them using an empty property
        Show
        Arnaud Heritier added a comment - To avoid problems, be sure to not use a -PARAM without arg Remove default hardcoded settings to allow users to remove them using an empty property
        Hide
        Lukas Theussl added a comment -

        I still wonder why I couldn't reproduce it ... ?

        Show
        Lukas Theussl added a comment - I still wonder why I couldn't reproduce it ... ?
        Hide
        Arnaud Heritier added a comment -

        I don't understand.
        Are you a black cat ??

        Show
        Arnaud Heritier added a comment - I don't understand. Are you a black cat ??

          People

          • Assignee:
            Lukas Theussl
            Reporter:
            Wendy Smoak
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: