svn commit: r425432 - /maven/doxia/trunk/doxia-doc-renderer/pom.xml
Author: vsiveton Date: Tue Jul 25 08:57:49 2006 New Revision: 425432 URL: http://svn.apache.org/viewvc?rev=425432&view=rev Log: DOXIA-67: Compilation failure under JDK 1.5 for doxia-doc-renderer Added xalan 2.7.0 as dependency Added copyright too Modified: maven/doxia/trunk/doxia-doc-renderer/pom.xml Modified: maven/doxia/trunk/doxia-doc-renderer/pom.xml URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-doc-renderer/pom.xml?rev=425432&r1=425431&r2=425432&view=diff == --- maven/doxia/trunk/doxia-doc-renderer/pom.xml (original) +++ maven/doxia/trunk/doxia-doc-renderer/pom.xml Tue Jul 25 08:57:49 2006 @@ -1,4 +1,23 @@ + + + http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 @@ -59,6 +78,11 @@ org.codehaus.plexus plexus-utils 1.2-SNAPSHOT + + + xalan + xalan + 2.7.0
svn commit: r425453 - /maven/doxia/trunk/pom.xml
Author: vsiveton Date: Tue Jul 25 09:44:45 2006 New Revision: 425453 URL: http://svn.apache.org/viewvc?rev=425453&view=rev Log: Added doxia-doc-renderer as module Added copyright Modified: maven/doxia/trunk/pom.xml Modified: maven/doxia/trunk/pom.xml URL: http://svn.apache.org/viewvc/maven/doxia/trunk/pom.xml?rev=425453&r1=425452&r2=425453&view=diff == --- maven/doxia/trunk/pom.xml (original) +++ maven/doxia/trunk/pom.xml Tue Jul 25 09:44:45 2006 @@ -1,4 +1,24 @@ -http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> + + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 org.apache.maven @@ -64,5 +84,6 @@ doxia-decoration-model doxia-modules doxia-sandbox +doxia-doc-renderer
svn commit: r425517 - in /maven/doxia/site: pom.xml src/site/apt/book/index.apt src/site/apt/index.apt src/site/site.xml
Author: vsiveton Date: Tue Jul 25 13:41:58 2006 New Revision: 425517 URL: http://svn.apache.org/viewvc?rev=425517&view=rev Log: o Updated documentation for new rtf format o Consistent layout: updated site.xml (maven-stylus-skin) o Updated POM for reporting and book despriptor. Added a parent Modified: maven/doxia/site/pom.xml maven/doxia/site/src/site/apt/book/index.apt maven/doxia/site/src/site/apt/index.apt maven/doxia/site/src/site/site.xml Modified: maven/doxia/site/pom.xml URL: http://svn.apache.org/viewvc/maven/doxia/site/pom.xml?rev=425517&r1=425516&r2=425517&view=diff == --- maven/doxia/site/pom.xml (original) +++ maven/doxia/site/pom.xml Tue Jul 25 13:41:58 2006 @@ -1,3 +1,23 @@ + + + + http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; @@ -7,6 +27,7 @@ org.apache.maven maven-parent 2 +../pom/maven/pom.xml org.apache.maven.doxia site @@ -35,6 +56,28 @@ [EMAIL PROTECTED] http://mail-archives.apache.org/mod_mbox/maven-doxia-commits/ + + + Maven Announcements List + announce@maven.apache.org + [EMAIL PROTECTED] + [EMAIL PROTECTED] + http://mail-archives.apache.org/mod_mbox/maven-announce/ + + + Maven Issues List + issues@maven.apache.org + [EMAIL PROTECTED] + [EMAIL PROTECTED] + http://mail-archives.apache.org/mod_mbox/maven-issues/ + + + Maven Notifications List + notifications@maven.apache.org + [EMAIL PROTECTED] + [EMAIL PROTECTED] + http://mail-archives.apache.org/mod_mbox/maven-notifications/ + scm:svn:http://svn.apache.org/repos/asf/maven/doxia/site @@ -78,12 +121,40 @@ xdoc + + pdf + + + rtf + + +org.codehaus.modello +modello-maven-plugin + + src/main/modello/book.mdo + 1.0.0 + + + +site-docs +pre-site + + xdoc + xsd + + + ../trunk/doxia-sandbox/doxia-book/src/main/modello/book.mdo + 1.0.0 + + + + Modified: maven/doxia/site/src/site/apt/book/index.apt URL: http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/book/index.apt?rev=425517&r1=425516&r2=425517&view=diff == --- maven/doxia/site/src/site/apt/book/index.apt (original) +++ maven/doxia/site/src/site/apt/book/index.apt Tue Jul 25 13:41:58 2006 @@ -8,24 +8,32 @@ Doxia allows you to write books like user manuals and guides in any format supported by Doxia. Combined with the Doxia Book Maven you are able to include the manuals directly in your generated site with links to the off-line - friendly formats like PDF and LaTeX. + friendly formats like XDoc, PDF, RTF and LaTeX. - The Xdoc output which has been rendered into this site can be viewed {{{../doxia-example-book/}here}}. + The Xdoc output which has been rendered into this site can be viewed {{{../doxia-example-book/index.html}here}}. * How It Works The only thing you need in addition to the content files itself is a simple book descriptor which is used to specify the ordering of the sections and the names for the chapters. - See {{{doxia-books/book/index.html}The Book Descriptor Reference}} for a reference to the descriptor. + See {{{../book.html}The Book Descriptor Reference}} for a reference to the descriptor. -* Example Book Descriptor +* Creating Book Descriptor + + An XML file is used to describe the layout of the book. + + A sample is given below: %{snippet|id=example|file=src/books/example-book.xml} -* Example Maven Doxia Plug-in Configuration +* Configuring Maven Doxia Plug-in This example illustrates how to configure the Doxia Maven plugin. It will render the book in three different formats. By default the output will be under < >>>. + + Actually, the out-of-box format ids are: <<>>, <<>>, <<>>, <<>> + + A sample pom.xml is given below: %{snippet|id=configuration|file=pom.xml} Modified: maven/doxia/site/src/site/apt/index.apt URL: http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/index.apt?rev=425517&r1=425516&r2=425517&view=diff == --- maven/doxia/site/src/site/apt/index.apt (original) +++ maven/doxia/site/src/site/apt/index.apt Tue Jul 25 13:41:58 2006 @@ -20,4 +20,4 @@ to produce PDFs, LaTeX documents and Xdoc for direct integration in your Maven site. The Doxia Book code is still in the sandbox but it is full
svn commit: r425493 - in /maven/doxia/trunk/doxia-sandbox: doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/ doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/
Author: vsiveton Date: Tue Jul 25 12:33:51 2006 New Revision: 425493 URL: http://svn.apache.org/viewvc?rev=425493&view=rev Log: o Replaced ITextBookRenderer by PDF and RTF renderers. itext is deprecated in favor of pdf o Corrected a toString() bug. Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/AbstractITextBookRenderer.java maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/PdfBookRenderer.java maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/RtfBookRenderer.java Removed: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/ITextBookRenderer.java Modified: maven/doxia/trunk/doxia-sandbox/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/AbstractITextBookRenderer.java URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/AbstractITextBookRenderer.java?rev=425493&view=auto == --- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/AbstractITextBookRenderer.java (added) +++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/AbstractITextBookRenderer.java Tue Jul 25 12:33:51 2006 @@ -0,0 +1,293 @@ +package org.apache.maven.doxia.book.services.renderer; + +/* + * Copyright 2001-2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +import org.apache.maven.doxia.Doxia; +import org.apache.maven.doxia.book.BookDoxiaException; +import org.apache.maven.doxia.book.context.BookContext; +import org.apache.maven.doxia.book.model.BookModel; +import org.apache.maven.doxia.book.model.Chapter; +import org.apache.maven.doxia.book.model.Section; +import org.apache.maven.doxia.editor.io.PipelineSink; +import org.apache.maven.doxia.module.itext.ITextSink; +import org.apache.maven.doxia.parser.ParseException; +import org.apache.maven.doxia.parser.manager.ParserNotFoundException; +import org.apache.maven.doxia.sink.Sink; +import org.codehaus.plexus.logging.AbstractLogEnabled; +import org.codehaus.plexus.util.StringUtils; +import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter; + +/** + * Base class for iText renderer. + * + * @author mailto:[EMAIL PROTECTED]">Trygve Laugstøl + * @author mailto:[EMAIL PROTECTED]">Vincent Siveton + * @version $Id$ + */ +public abstract class AbstractITextBookRenderer +extends AbstractLogEnabled +implements BookRenderer +{ +/** + * @plexus.requirement + */ +private Doxia doxia; + +// -- +// BookRenderer Implementation +// -- + +public void renderBook( BookContext context ) +throws BookDoxiaException +{ +BookModel book = context.getBook(); + +if ( !context.getOutputDirectory().exists() ) +{ +if ( !context.getOutputDirectory().mkdirs() ) +{ +throw new BookDoxiaException( "Could not make directory: " ++ context.getOutputDirectory().getAbsolutePath() + "." ); +} +} + +File bookFile = new File( context.getOutputDirectory(), book.getId() + ".xml" ); + +FileWriter fileWriter; + +try +{ +fileWriter = new FileWriter( bookFile ); +} +catch ( IOException e ) +{ +throw new BookDoxiaException( "Error while opening file.", e ); +} + +// -- +// Create the XML File +// -- + +PrettyPrintXMLWri
svn commit: r425465 - in /maven/doxia/trunk/doxia-sandbox: doxia-book/src/main/modello/book.mdo doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java
Author: vsiveton Date: Tue Jul 25 10:33:24 2006 New Revision: 425465 URL: http://svn.apache.org/viewvc?rev=425465&view=rev Log: Revised documentation for modello and mojo. Added copyright. Modified: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/modello/book.mdo maven/doxia/trunk/doxia-sandbox/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java Modified: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/modello/book.mdo URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/modello/book.mdo?rev=425465&r1=425464&r2=425465&view=diff == --- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/modello/book.mdo (original) +++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/modello/book.mdo Tue Jul 25 10:33:24 2006 @@ -1,9 +1,38 @@ + + book BookModel - Model for a book in Doxia + + + package @@ -13,7 +42,9 @@ BookModel - + +Describes the book layout and packaging. + 1.0.0 @@ -21,25 +52,41 @@ 1.0.0 String true + +Specifies the id of this book. This is a symbolic name for a +particular book from this project. + title 1.0.0 String + +Specifies the title of this book. + author 1.0.0 String + +Specifies the author of this book. + date 1.0.0 String + +Specifies the date of this book. + chapters 1.0.0 + +Specifies a collection of chapters. + Chapter * @@ -129,15 +176,25 @@ 1.0.0 String true + +Specifies the id of this chapter. This is a symbolic name for a +particular chapter. + title 1.0.0 String + +Specifies the title of this chapter. + sections 1.0.0 + +Specifies a collection of sections. + Section * @@ -154,16 +211,26 @@ 1.0.0 String true + +Specifies the id of this section. This is a symbolic name for a +particular section. + title 1.0.0 String + +Specifies the title of this section. + file 1.0.0 String + +Specifies the file of this section. + Modified: maven/doxia/trunk/doxia-sandbox/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java?rev=425465&r1=425464&r2=425465&view=diff == --- maven/doxia/trunk/doxia-sandbox/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java (original) +++ maven/doxia/trunk/doxia-sandbox/doxia-maven-plugin/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java Tue Jul 25 10:33:24 2006 @@ -1,5 +1,21 @@ package org.apache.maven.doxia.plugin; +/* + * Copyright 2004-2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import org.apache.maven.doxia.book.BookDoxia; import org.apache.maven.doxia.book.BookDoxiaException; import org.apache.maven.doxia.book.InvalidBookDescriptorException; @@ -30,21 +46,29 @@ // -- /** + * A list of books. + * * @parameter */ private List books; /** + * Base directory of the project. + * * @parameter expression="${basedir}" */ private File basedir; /** + * Directory containing the generated project docs.