You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Oliver Schrenk <ol...@gmail.com> on 2012/08/10 19:39:41 UTC

doxia-book-maven-plugin - How do I bind book sections to markdown files?

Hi,

I want to use the markdown files I use for site generation under
`src/site/markdown` to also generate a pdf using doxia-book-maven-plugin.

I created an examplary `book.xml` under `src/books/book.xml`

    <book xmlns="http://maven.apache.org/BOOK/1.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/BOOK/1.0.0
http://maven.apache.org/xsd/book-1.0.0.xsd">
        <id>book</id>
        <title>RefProc Snapshot Process Syntax Guide</title>
        <chapters>
            <chapter>
                <id>bind</id>
                <title>Bindings</title>
                <sections>
                    <section>
                        <id>01-stuff.md</id>
                    </section>
                </sections>
            </chapter>
        </chapters>
    </book>

My `pom.xml` looks like this:

    ...
    plugin>
        <groupId>org.apache.maven.doxia</groupId>
        <artifactId>doxia-book-maven-plugin</artifactId>
        <version>1.3-SNAPSHOT</version>
        <executions>
            <execution>
                <phase>pre-site</phase>
                <goals>
                    <goal>render-books</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <books>
                <book>
                    <directory>src/site/markdown</directory>
                    <descriptor>src/books/book.xml</descriptor>
                    <formats>
                        <format>
                            <id>pdf</id>
                        </format>
                    </formats>
                </book>
            </books>
        </configuration>
    </plugin>
    ...

I get

    [ERROR] Failed to execute goal
org.apache.maven.doxia:doxia-book-maven-plugin:1.3-SNAPSHOT:render-books
(default) on projectsnapshot-io-gson: Error while generating book in format
'pdf'. No document that matches section with id=01-json.md. -> [Help1]


Which is to be expected as I have no clue on how to map my markdown files
to the various chapters and sections and I can't find any infos on it.

Does anybody know how to do this?

Best regards
Oliver Schrenk

Re: doxia-book-maven-plugin - How do I bind book sections to markdown files?

Posted by Oliver Schrenk <ol...@gmail.com>.
Yeah, I might try that as there seems to be no one else out there who had this usecase before. I was hoping that someday doxia would support a docx sink.

For now I defaulted to pandoc.

Cheers
Oliver

Am 17.08.2012 um 11:23 schrieb Lukas Theussl <lt...@apache.org>:

> 
> If you only want to generate a pdf parallel to the site, you should
> rather use the maven-pdf-plugin [1] instead of the
> doxia-book-maven-plugin. It works better in my experience.
> 
> HTH,
> -Lukas
> 
> [1] http://maven.apache.org/plugins/maven-pdf-plugin/
> 
> 
> Oliver Schrenk wrote:
>> Hi,
>> 
>> I want to use the markdown files I use for site generation under
>> `src/site/markdown` to also generate a pdf using doxia-book-maven-plugin.
>> 
>> I created an examplary `book.xml` under `src/books/book.xml`
>> 
>>    <book xmlns="http://maven.apache.org/BOOK/1.0.0" xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance"
>>        xsi:schemaLocation="http://maven.apache.org/BOOK/1.0.0
>> http://maven.apache.org/xsd/book-1.0.0.xsd">
>>        <id>book</id>
>>        <title>RefProc Snapshot Process Syntax Guide</title>
>>        <chapters>
>>            <chapter>
>>                <id>bind</id>
>>                <title>Bindings</title>
>>                <sections>
>>                    <section>
>>                        <id>01-stuff.md</id>
>>                    </section>
>>                </sections>
>>            </chapter>
>>        </chapters>
>>    </book>
>> 
>> My `pom.xml` looks like this:
>> 
>>    ...
>>    plugin>
>>        <groupId>org.apache.maven.doxia</groupId>
>>        <artifactId>doxia-book-maven-plugin</artifactId>
>>        <version>1.3-SNAPSHOT</version>
>>        <executions>
>>            <execution>
>>                <phase>pre-site</phase>
>>                <goals>
>>                    <goal>render-books</goal>
>>                </goals>
>>            </execution>
>>        </executions>
>>        <configuration>
>>            <books>
>>                <book>
>>                    <directory>src/site/markdown</directory>
>>                    <descriptor>src/books/book.xml</descriptor>
>>                    <formats>
>>                        <format>
>>                            <id>pdf</id>
>>                        </format>
>>                    </formats>
>>                </book>
>>            </books>
>>        </configuration>
>>    </plugin>
>>    ...
>> 
>> I get
>> 
>>    [ERROR] Failed to execute goal
>> org.apache.maven.doxia:doxia-book-maven-plugin:1.3-SNAPSHOT:render-books
>> (default) on projectsnapshot-io-gson: Error while generating book in format
>> 'pdf'. No document that matches section with id=01-json.md. -> [Help1]
>> 
>> 
>> Which is to be expected as I have no clue on how to map my markdown files
>> to the various chapters and sections and I can't find any infos on it.
>> 
>> Does anybody know how to do this?
>> 
>> Best regards
>> Oliver Schrenk
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: doxia-book-maven-plugin - How do I bind book sections to markdown files?

Posted by Lukas Theussl <lt...@apache.org>.
If you only want to generate a pdf parallel to the site, you should
rather use the maven-pdf-plugin [1] instead of the
doxia-book-maven-plugin. It works better in my experience.

HTH,
-Lukas

[1] http://maven.apache.org/plugins/maven-pdf-plugin/


Oliver Schrenk wrote:
> Hi,
> 
> I want to use the markdown files I use for site generation under
> `src/site/markdown` to also generate a pdf using doxia-book-maven-plugin.
> 
> I created an examplary `book.xml` under `src/books/book.xml`
> 
>     <book xmlns="http://maven.apache.org/BOOK/1.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="http://maven.apache.org/BOOK/1.0.0
> http://maven.apache.org/xsd/book-1.0.0.xsd">
>         <id>book</id>
>         <title>RefProc Snapshot Process Syntax Guide</title>
>         <chapters>
>             <chapter>
>                 <id>bind</id>
>                 <title>Bindings</title>
>                 <sections>
>                     <section>
>                         <id>01-stuff.md</id>
>                     </section>
>                 </sections>
>             </chapter>
>         </chapters>
>     </book>
> 
> My `pom.xml` looks like this:
> 
>     ...
>     plugin>
>         <groupId>org.apache.maven.doxia</groupId>
>         <artifactId>doxia-book-maven-plugin</artifactId>
>         <version>1.3-SNAPSHOT</version>
>         <executions>
>             <execution>
>                 <phase>pre-site</phase>
>                 <goals>
>                     <goal>render-books</goal>
>                 </goals>
>             </execution>
>         </executions>
>         <configuration>
>             <books>
>                 <book>
>                     <directory>src/site/markdown</directory>
>                     <descriptor>src/books/book.xml</descriptor>
>                     <formats>
>                         <format>
>                             <id>pdf</id>
>                         </format>
>                     </formats>
>                 </book>
>             </books>
>         </configuration>
>     </plugin>
>     ...
> 
> I get
> 
>     [ERROR] Failed to execute goal
> org.apache.maven.doxia:doxia-book-maven-plugin:1.3-SNAPSHOT:render-books
> (default) on projectsnapshot-io-gson: Error while generating book in format
> 'pdf'. No document that matches section with id=01-json.md. -> [Help1]
> 
> 
> Which is to be expected as I have no clue on how to map my markdown files
> to the various chapters and sections and I can't find any infos on it.
> 
> Does anybody know how to do this?
> 
> Best regards
> Oliver Schrenk
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org