thanks much, that helped. I got to generate the book in xdoc format. Instead, if I try to add the pdf or rtf format (adding the corresponding <format> into the pom.xml), I get that ERROR Exception.
What am I missing? thank you Giovanni -----Original Message----- From: Lukas Theussl [mailto:[EMAIL PROTECTED] Sent: Monday, October 01, 2007 12:35 PM To: [email protected] Subject: Re: tutorial doxia and maven plugin See http://maven.apache.org/doxia/book/index.html The section titles need to match the source documents name, eg <section> <id>section-1</id> </section> will get the source from a file apt/section-1.apt, or xdoc/section-1.xml, etc. You don't have to specify a title tag inside a section, the title will be taken from the source document. Actually I don't know what the file tag is for, you certainly don't need it... HTH, -Lukas Giovanni Pedone wrote: > hello, > may you please publish a quick tutorial on how to set up dozia and use it ? > > I have a maven project with documentantion generated by "maven site" > given a set of xdoc documents under src/site/xdoc with a maven > site.xml for generation. > > I would like to generate the same docs thru doxia maven plugin and get > the output into different formats. > > How can I do that? > I dont understand if I need to have the content files named exactly > like the sections id defined in the book.xml. > Also do I MUST specify title and file tags elements inside the section > element of book.xml ? > > When I tried the following then I got this error: > > [INFO] [doxia:render-books] > [INFO] > ---------------------------------------------------------------------- > -- > [ERROR] FATAL ERROR > [INFO] > ---------------------------------------------------------------------- > -- > [INFO] null > [INFO] > ---------------------------------------------------------------------- > -- > [INFO] Trace > java.lang.reflect.UndeclaredThrowableException > at $Proxy0.text(Unknown Source) > at > org.apache.maven.doxia.module.docbook.DocBookParser.handleText(DocBook > Parser > .java:686) > at > org.apache.maven.doxia.parser.AbstractXmlParser.parseXml(AbstractXmlPa > rser.j > ava:96) > at > org.apache.maven.doxia.parser.AbstractXmlParser.parse(AbstractXmlParse > r.java > :53) > at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:59) > at > org.apache.maven.doxia.book.services.renderer.AbstractITextBookRendere > r.rend > erSection(AbstractITextBookRenderer.java:260) > at > org.apache.maven.doxia.book.services.renderer.AbstractITextBookRendere > r.rend > erChapter(AbstractITextBookRenderer.java:216) > at > org.apache.maven.doxia.book.services.renderer.AbstractITextBookRendere > r.rend > erBook(AbstractITextBookRenderer.java:142) > at > org.apache.maven.doxia.book.DefaultBookDoxia.renderBook(DefaultBookDox > ia.jav > a:126) > at > org.apache.maven.doxia.plugin.DoxiaRenderBooksMojo.execute(DoxiaRender > BooksM > ojo.java:214) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugin > Manage > r.java:443) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defau > ltLife > cycleExecutor.java:539) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneG > oal(De > faultLifecycleExecutor.java:493) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defaul > tLifec > ycleExecutor.java:463) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHand > leFail > ures(DefaultLifecycleExecutor.java:311) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegment > s(Defa > ultLifecycleExecutor.java:278) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLif > ecycle > Executor.java:143) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j > ava:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess > orImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > Caused by: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j > ava:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess > orImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.maven.doxia.sink.PipelineSink.invoke(PipelineSink.java:55) > ... 28 more > Caused by: java.util.EmptyStackException > at java.util.Stack.peek(Stack.java:79) > at > org.apache.maven.doxia.module.itext.SinkActionContext.getCurrentAction > (SinkA > ctionContext.java:83) > at > org.apache.maven.doxia.module.itext.ITextSink.text(ITextSink.java:1354) > ... 33 more > > > > > This is waht I tried: > > ------------------- > pom.xml > ------------------- > <plugin> > <groupId>org.apache.maven.doxia</groupId> > <artifactId>doxia-maven-plugin</artifactId> > <version>1.0-alpha-9</version> > <executions> > <execution> > <phase>pre-site</phase> > <goals> > <goal>render-books</goal> > </goals> > </execution> > </executions> > <configuration> > <books> > <book> > <directory>src/site</directory> > <descriptor>src/site/book.xml</descriptor> > <formats> > <format> > <id>xdoc</id> > </format> > > <format> > <id>pdf</id> > </format> > <format> > <id>rtf</id> > </format> > </formats> > </book> > </books> > </configuration> > </plugin> > > ------------------- > book.xml: > ------------------- > <?xml version="1.0" encoding="UTF-8"?> <book> > <id>doxia-example-book</id> > <title>XFire User Manual</title> > <chapters> > <chapter> > <id>bind</id> > <title>Bindings</title> > <sections> > <section> > <id>bindings</id> > </section> > </sections> > </chapter> > </chapters> > </book> > > > ------------------- > bindings.xml: > ------------------- > <document> > <properties> > <title>Page Title</title> > <author email="[EMAIL PROTECTED]">John Doe</author> > </properties> > <body> > <section name="bindings"> > <p>Hi!</p> > ciao ciao gio > </section> > </body> > </document> > > > > > > > ---------------------------------------------------------------------- > ------ "La presente comunicazione elettronica contiene informazioni > aziendali non private. Eventuali risposte alla presente potrebbero > essere conosciute, per motivi organizzativi e di sicurezza, dal > personale di Postecom S.p.a." ---------------------------------------------------------------------------- "La presente comunicazione elettronica contiene informazioni aziendali non private. Eventuali risposte alla presente potrebbero essere conosciute, per motivi organizzativi e di sicurezza, dal personale di Postecom S.p.a."
