Re: tutorial doxia and maven plugin

2007-10-02 Thread Lukas Theussl

You can use apt or docbook sources instead of xdocs.

-Lukas

Giovanni Pedone wrote:

Hi,
I filed the attach on the issue you opened. Thank you and let me know about
your findings.

Meanwhile, is there any other way to format the content files to allow them
to be formatted as PDF ?

Giovanni


-Original Message-
From: Lukas Theussl [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 02, 2007 8:54 AM

To: [EMAIL PROTECTED]
Subject: Re: tutorial doxia and maven plugin

I could reproduce your problem, I opened an issue:

http://jira.codehaus.org/browse/DOXIA-157

Apparently, by default all xml files are parsed by the docbook parser (which
explains your original stack trace). I don't know the reason for the xml
parsing error (could be a hidden special character or an encoding issue), if
you attach your file (better the whole project) to the jira above I'll have
a look.

-Lukas

Giovanni Pedone wrote:


It is just this:

document
 properties
   titlePage Title/title
   author email=[EMAIL PROTECTED]John Doe/author
 /properties
 head
 titlePage Title/title
 /head
 body
   section name=bindings
 pHi!/p
 ciao ciao gio
   /section
 /body
/document


And I just run the command:

mvn doxia:render-books

If I do use it to mvn site it works fine and generates an html file.




-Original Message-
From: Lukas Theussl

This is a simple xml parsing error, nothing to do with doxia. Your 
input document src\site\xdoc\bindings.xml is not well-formed (is it 
being processed by the site plugin?).


-Lukas




[INFO] Error while generating book in format 'pdf'.

Embedded error: Error while parsing document:
F:\projects\Gio\gioMaven\src\site\xdoc\bindings.xml.
only whitespace content allowed before start tag and not t (position:
START_DOCUMENT seen t... @1:1)







--
-- 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.


Re: tutorial doxia and maven plugin

2007-10-01 Thread Lukas Theussl

See http://maven.apache.org/doxia/book/index.html

The section titles need to match the source documents name, eg

section
  idsection-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(DocBookParser
.java:686)
at
org.apache.maven.doxia.parser.AbstractXmlParser.parseXml(AbstractXmlParser.j
ava:96)
at
org.apache.maven.doxia.parser.AbstractXmlParser.parse(AbstractXmlParser.java
:53)
at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:59)
at
org.apache.maven.doxia.book.services.renderer.AbstractITextBookRenderer.rend
erSection(AbstractITextBookRenderer.java:260)
at
org.apache.maven.doxia.book.services.renderer.AbstractITextBookRenderer.rend
erChapter(AbstractITextBookRenderer.java:216)
at
org.apache.maven.doxia.book.services.renderer.AbstractITextBookRenderer.rend
erBook(AbstractITextBookRenderer.java:142)
at
org.apache.maven.doxia.book.DefaultBookDoxia.renderBook(DefaultBookDoxia.jav
a:126)
at
org.apache.maven.doxia.plugin.DoxiaRenderBooksMojo.execute(DoxiaRenderBooksM
ojo.java:214)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage
r.java:443)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De
faultLifecycleExecutor.java:493)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java:463)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
ultLifecycleExecutor.java:278)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
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.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.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.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.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
groupIdorg.apache.maven.doxia/groupId

RE: tutorial doxia and maven plugin

2007-10-01 Thread Giovanni Pedone
I just tried  with a simple txt file to be converted to PDF, but I get this
error:

[INFO] Error while generating book in format 'pdf'.

Embedded error: Error while parsing document:
F:\projects\Gio\gioMaven\src\site\xdoc\bindings.xml.
only whitespace content allowed before start tag and not t (position:
START_DOCUMENT seen t... @1:1)



Where can I find some documentation about all this? The web site is not very
helpful :(

thank you


-Original Message-
From: Lukas Theussl [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 01, 2007 2:43 PM
To: [EMAIL PROTECTED]
Subject: Re: tutorial doxia and maven plugin

difficult to say with the information... it seems that you have docbook
sources, the docbook parser is not very well supported. I can generate pdf
and rtf from simple documents, so I know it works. You could try to start
with some simplified source files to rule out any parser/sink issues. If you
can't get it to work, open a JIRA ticket [1] and attach a reproducible test
case.

Cheers,
-Lukas

[1] http://jira.codehaus.org/browse/DOXIA


Giovanni Pedone wrote:
 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
idsection-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

Re: tutorial doxia and maven plugin

2007-10-01 Thread Lukas Theussl
This is a simple xml parsing error, nothing to do with doxia. Your input 
document src\site\xdoc\bindings.xml is not well-formed (is it being 
processed by the site plugin?).


-Lukas

Giovanni Pedone wrote:

I just tried  with a simple txt file to be converted to PDF, but I get this
error:

[INFO] Error while generating book in format 'pdf'.

Embedded error: Error while parsing document:
F:\projects\Gio\gioMaven\src\site\xdoc\bindings.xml.
only whitespace content allowed before start tag and not t (position:
START_DOCUMENT seen t... @1:1)



Where can I find some documentation about all this? The web site is not very
helpful :(

thank you




RE: tutorial doxia and maven plugin

2007-10-01 Thread Giovanni Pedone
It is just this:

document
  properties
titlePage Title/title
author email=[EMAIL PROTECTED]John Doe/author
  /properties
  head
  titlePage Title/title
  /head
  body
section name=bindings
  pHi!/p
  ciao ciao gio
/section
  /body
/document


And I just run the command:

mvn doxia:render-books

If I do use it to mvn site it works fine and generates an html file.




-Original Message-
From: Lukas Theussl 

This is a simple xml parsing error, nothing to do with doxia. Your input
document src\site\xdoc\bindings.xml is not well-formed (is it being
processed by the site plugin?).

-Lukas

 
 [INFO] Error while generating book in format 'pdf'.
 
 Embedded error: Error while parsing document:
 F:\projects\Gio\gioMaven\src\site\xdoc\bindings.xml.
 only whitespace content allowed before start tag and not t (position:
 START_DOCUMENT seen t... @1:1)
 





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.