Move book and plugin since they don't belong in the base of Doxia, and rename them in the process.
doxia/doxia-book --> doxia-tools/doxia-book-renderer
doxia/doxia-maven-plugin -> doxia/doxia-book-maven-plugin
git-svn-id: https://svn.apache.org/repos/asf/maven/doxia/doxia-tools/trunk@1307847 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..9461639
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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.
+-->
+
+<project xmlns="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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia</artifactId>
+ <version>1.3-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>doxia-maven-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+
+ <name>Doxia :: Maven Plugin</name>
+ <description>A Maven plugin for Doxia.</description>
+ <url>http://maven.apache.org/doxia/doxia/doxia-maven-plugin/</url>
+
+ <prerequisites>
+ <maven>${mavenVersion}</maven>
+ </prerequisites>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>doxia-book</artifactId>
+ <version>${projectVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>doxia-core</artifactId>
+ <version>${projectVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>doxia-logging-api</artifactId>
+ <version>${projectVersion}</version>
+ </dependency>
+
+ <!-- doxia modules ordered -->
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-module-apt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-module-docbook-simple</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-module-itext</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-module-latex</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-module-xdoc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-module-xhtml</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-doxia-tools</artifactId>
+ <version>1.4</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>2.5.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.2.2</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <!-- Backward compatibility with Maven 2.0.x (MNG-3402) -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <finalName>${project.build.finalName}</finalName>
+ <createDependencyReducedPom>false</createDependencyReducedPom>
+ <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
+ </transformers>
+ <artifactSet>
+ <includes>
+ <include>org.apache.maven.doxia:doxia-sink-api</include>
+ <include>org.apache.maven.doxia:doxia-logging-api</include>
+ </includes>
+ </artifactSet>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>clirr-maven-plugin</artifactId>
+ <configuration>
+ <comparisonVersion>1.1</comparisonVersion>
+ <excludes>
+ <!-- exclude shaded packages -->
+ <exclude>org/apache/maven/doxia/logging/**</exclude>
+ <exclude>org/apache/maven/doxia/sink/**</exclude>
+ <exclude>org/codehaus/doxia/sink/**</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generated-helpmojo</id>
+ <goals>
+ <goal>helpmojo</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>2.5.1</version>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
diff --git a/src/main/java/org/apache/maven/doxia/plugin/Book.java b/src/main/java/org/apache/maven/doxia/plugin/Book.java
new file mode 100644
index 0000000..0d34e40
--- /dev/null
+++ b/src/main/java/org/apache/maven/doxia/plugin/Book.java
@@ -0,0 +1,97 @@
+package org.apache.maven.doxia.plugin;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.util.List;
+
+/**
+ * A model for a Book.
+ *
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
+ * @version $Id$
+ * @since 1.0
+ */
+public class Book
+{
+ /** Path to the book descriptor file. */
+ private String descriptor;
+
+ /** The list of formats to produce. */
+ private List<Format> formats;
+
+ /** The base directory of source files. */
+ private String directory;
+
+ /** Files to include. */
+ private List<String> includes;
+
+ /** Files to exclude. */
+ private List<String> excludes;
+
+ /**
+ * Returns the path to the book descriptor file.
+ *
+ * @return the book descriptor file.
+ */
+ public String getDescriptor()
+ {
+ return descriptor;
+ }
+
+ /**
+ * Returns the list of {@link Format}s to produce.
+ *
+ * @return the list of formats.
+ */
+ public List<Format> getFormats()
+ {
+ return formats;
+ }
+
+ /**
+ * Returns the base directory of source files.
+ *
+ * @return the base directory.
+ */
+ public String getDirectory()
+ {
+ return directory;
+ }
+
+ /**
+ * Returns the list of files to include.
+ *
+ * @return the list of files to include.
+ */
+ public List<String> getIncludes()
+ {
+ return includes;
+ }
+
+ /**
+ * Returns the list of files to exclude.
+ *
+ * @return the list of files to exclude.
+ */
+ public List<String> getExcludes()
+ {
+ return excludes;
+ }
+}
diff --git a/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java b/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java
new file mode 100644
index 0000000..fcdc6bf
--- /dev/null
+++ b/src/main/java/org/apache/maven/doxia/plugin/DoxiaRenderBooksMojo.java
@@ -0,0 +1,314 @@
+package org.apache.maven.doxia.plugin;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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;
+import org.apache.maven.doxia.book.model.BookModel;
+import org.apache.maven.doxia.book.services.validation.ValidationResult;
+import org.apache.maven.doxia.tools.SiteTool;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.ReaderFactory;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * A Mojo to create books in different output formats.
+ *
+ * @goal render-books
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
+ * @version $Id$
+ * @since 1.0
+ */
+public class DoxiaRenderBooksMojo
+ extends AbstractMojo
+{
+ /** System EOL. */
+ private static final String LINE_SEPARATOR = System.getProperty( "line.separator" );
+
+ // ----------------------------------------------------------------------
+ // Mojo components
+ // ----------------------------------------------------------------------
+
+ /**
+ * BookDoxia component
+ *
+ * @component
+ */
+ private BookDoxia bookDoxia;
+
+ /**
+ * SiteTool.
+ *
+ * @component
+ */
+ protected SiteTool siteTool;
+
+ // ----------------------------------------------------------------------
+ // Mojo parameters
+ // ----------------------------------------------------------------------
+
+ /**
+ * A list of books.
+ *
+ * @parameter
+ * @required
+ */
+ private List<Book> books;
+
+ /**
+ * Base directory of the project.
+ *
+ * @parameter default-value="${basedir}"
+ */
+ private File basedir;
+
+ /**
+ * Directory containing the generated project docs.
+ *
+ * @parameter default-value="${project.build.directory}/generated-site"
+ */
+ private File generatedDocs;
+
+ /**
+ * A comma separated list of locales supported by Maven. The first valid token will be the default Locale
+ * for this instance of the Java Virtual Machine.
+ *
+ * @parameter default-value="${locales}"
+ */
+ protected String locales;
+
+ /**
+ * Specifies the input encoding.
+ *
+ * @parameter expression="${encoding}" default-value="${project.build.sourceEncoding}"
+ */
+ private String inputEncoding;
+
+ /**
+ * Specifies the output encoding.
+ *
+ * @parameter expression="${outputEncoding}" default-value="${project.reporting.outputEncoding}"
+ */
+ private String outputEncoding;
+
+ // ----------------------------------------------------------------------
+ //
+ // ----------------------------------------------------------------------
+
+ /**
+ * {@inheritDoc}
+ *
+ * Executes the Mojo.
+ */
+ public void execute()
+ throws MojoExecutionException, MojoFailureException
+ {
+ for ( Book book : books )
+ {
+ // ----------------------------------------------------------------------
+ // Validate
+ // ----------------------------------------------------------------------
+
+ if ( StringUtils.isEmpty( book.getDescriptor() ) )
+ {
+ throw new MojoFailureException( "Invalid configuration: "
+ + "The book is required to have a descriptor set." );
+ }
+
+ if ( StringUtils.isEmpty( book.getDirectory() ) )
+ {
+ throw new MojoFailureException( "Invalid configuration: "
+ + "The book is required to have a directory set." );
+ }
+
+ if ( book.getFormats() == null || book.getFormats().size() == 0 )
+ {
+ throw new MojoFailureException( "Invalid configuration: "
+ + "The book is required to have at least one format set." );
+ }
+
+ // ----------------------------------------------------------------------
+ //
+ // ----------------------------------------------------------------------
+
+ File descriptor = new File( basedir, book.getDescriptor() );
+
+ String includes;
+ if ( book.getIncludes() != null )
+ {
+ includes = StringUtils.join( book.getIncludes().iterator(), "," );
+ }
+ else
+ {
+ includes = "**/*";
+ }
+
+ String excludes = "";
+
+ if ( book.getExcludes() != null )
+ {
+ excludes = StringUtils.join( book.getExcludes().iterator(), "," );
+ }
+
+ // ----------------------------------------------------------------------
+ // Find all the files to pass to the renderer.
+ // ----------------------------------------------------------------------
+
+ if ( getLog().isDebugEnabled() )
+ {
+ getLog().debug( "Locating files to include in the book:" );
+ getLog().debug( "Basedir: " + basedir );
+ getLog().debug( "Includes: " + includes );
+ getLog().debug( "Excludes: " + excludes );
+ }
+
+ List<File> files;
+
+ try
+ {
+ files = FileUtils.getFiles( new File( basedir, book.getDirectory() ), includes, excludes );
+ }
+ catch ( IOException e )
+ {
+ throw new MojoExecutionException( "Error while looking for input files. " + "Basedir="
+ + basedir.getAbsolutePath() + ", " + "includes=" + includes + ", " + "excludes=" + excludes, e );
+ }
+
+ // -----------------------------------------------------------------------
+ // Load the model
+ // -----------------------------------------------------------------------
+
+ BookModel bookModel;
+
+ try
+ {
+ bookModel = bookDoxia.loadBook( descriptor );
+ }
+ catch ( InvalidBookDescriptorException e )
+ {
+ throw new MojoFailureException( "Invalid book descriptor: " + LINE_SEPARATOR
+ + formatResult( e.getValidationResult() ) );
+ }
+ catch ( BookDoxiaException e )
+ {
+ throw new MojoExecutionException( "Error while loading the book descriptor", e );
+ }
+
+ // -----------------------------------------------------------------------
+ // Render the book in all the formats
+ // -----------------------------------------------------------------------
+
+ List<Locale> localesList = siteTool.getAvailableLocales( locales );
+
+ // Default is first in the list
+ Locale defaultLocale = localesList.get( 0 );
+ Locale.setDefault( defaultLocale );
+
+ for ( Locale locale : localesList )
+ {
+ for ( Format format : book.getFormats() )
+ {
+ File outputDirectory = new File( generatedDocs, format.getId() );
+ File directory = new File( outputDirectory + "/" + locale.toString(), bookModel.getId() );
+
+ if ( locale.equals( defaultLocale ) )
+ {
+ directory = new File( outputDirectory, bookModel.getId() );
+ }
+
+ try
+ {
+ bookDoxia.renderBook( bookModel, format.getId(), files, directory, locale,
+ getInputEncoding(), getOutputEncoding() );
+ }
+ catch ( BookDoxiaException e )
+ {
+ throw new MojoExecutionException( "Error while generating book in format '"
+ + format.getId() + "'.", e );
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Gets the input files encoding.
+ *
+ * @return The input files encoding, never <code>null</code>.
+ * @since 1.1
+ */
+ protected String getInputEncoding()
+ {
+ return ( inputEncoding == null ) ? ReaderFactory.ISO_8859_1 : inputEncoding;
+ }
+
+ /**
+ * Gets the effective reporting output files encoding.
+ *
+ * @return The effective reporting output file encoding, never <code>null</code>.
+ * @since 1.1
+ */
+ protected String getOutputEncoding()
+ {
+ return ( outputEncoding == null ) ? ReaderFactory.UTF_8 : outputEncoding;
+ }
+
+ /**
+ * Returns a formatted message of a ValidationResult.
+ *
+ * @param result the ValidationResult to format.
+ * @return the formatted result.
+ */
+ private String formatResult( ValidationResult result )
+ {
+ StringBuffer buffer = new StringBuffer();
+
+ if ( result.getErrors().size() > 0 )
+ {
+ buffer.append( "Validation errors:" );
+
+ for ( String error : result.getErrors() )
+ {
+ buffer.append( LINE_SEPARATOR ).append( " " ).append( error );
+ }
+ }
+
+ if ( result.getWarnings().size() > 0 )
+ {
+ buffer.append( "Validation warnings:" );
+
+ for ( String error : result.getWarnings() )
+ {
+ buffer.append( LINE_SEPARATOR ).append( " " ).append( error );
+ }
+ }
+
+ return buffer.toString();
+ }
+}
diff --git a/src/main/java/org/apache/maven/doxia/plugin/Format.java b/src/main/java/org/apache/maven/doxia/plugin/Format.java
new file mode 100644
index 0000000..b5ffe3e
--- /dev/null
+++ b/src/main/java/org/apache/maven/doxia/plugin/Format.java
@@ -0,0 +1,43 @@
+package org.apache.maven.doxia.plugin;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+/**
+ * A model for a supported output format.
+ *
+ * @author <a href="mailto:trygve.laugstol@objectware.no">Trygve Laugstøl</a>
+ * @version $Id$
+ * @since 1.0
+ */
+public class Format
+{
+ /** A unique identifier for the format. */
+ private String id;
+
+ /**
+ * Returns the (unique) identifier of this format.
+ *
+ * @return the identifier.
+ */
+ public String getId()
+ {
+ return id;
+ }
+}
diff --git a/src/site/apt/index.apt b/src/site/apt/index.apt
new file mode 100644
index 0000000..979e66c
--- /dev/null
+++ b/src/site/apt/index.apt
@@ -0,0 +1,68 @@
+ -----
+ Doxia Maven Plugin
+ -----
+ Lukas Theussl
+ -----
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Introduction
+
+ Doxia allows you to write books like user manuals and guides in any format supported by Doxia. Combined with the
+ Doxia Book Maven Plugin, you are able to include the manuals directly in your generated site with links to the off-line
+ friendly formats like XDoc, PDF, RTF and LaTeX.
+
+* Goals Overview
+
+ The Doxia Maven Plugin has one goal:
+
+ * {{{./render-books-mojo.html}doxia:render-books}} to create books in different output formats.
+
+ []
+
+ First you need a simple book descriptor which is used to specify the layout of your book, i.e.
+ the ordering of the sections and the names for the chapters.
+ See {{{http://maven.apache.org/doxia/book/index.html}The Book Descriptor Reference}}
+ for a reference to the descriptor.
+
+* Usage
+
+ General instructions on how to use the Doxia Maven Plugin can be found on the {{{./usage.html}usage page}}. Some more
+ specific use cases are described in the examples given below. Last but not least, users occasionally contribute
+ additional examples, tips or errata to the
+ {{{http://docs.codehaus.org/display/MAVENUSER/PDF+Plugin}plugin's wiki page}}.
+
+ In case you still have questions regarding the plugin's usage, please have a look at the {{{./faq.html}FAQ}} and feel
+ free to contact the {{{./mail-lists.html}user mailing list}}. The posts to the mailing list are archived and could
+ already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching
+ the {{{./mail-lists.html}mail archive}}.
+
+ If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our
+ {{{./issue-tracking.html}issue tracker}}. When creating a new issue, please provide a comprehensive description of your
+ concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason,
+ entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated.
+ Of course, patches are welcome, too. Contributors can check out the project from our
+ {{{./source-repository.html}source repository}} and will find supplementary information in the
+ {{{http://maven.apache.org/guides/development/guide-helping.html}guide to helping with Maven}}.
+
+* Examples
+
+ An Xdoc output example which has been rendered into this site can be viewed {{{http://maven.apache.org/doxia/doxia-example-book/index.html}here}}.
diff --git a/src/site/apt/usage.apt.vm b/src/site/apt/usage.apt.vm
new file mode 100644
index 0000000..962f50e
--- /dev/null
+++ b/src/site/apt/usage.apt.vm
@@ -0,0 +1,49 @@
+ -----
+ Usage
+ -----
+ Lukas Theussl
+ -----
+
+Usage
+
+ Below is a sample <<<pom.xml>>> illustrating how to use it.
+
++------------------------------------------------------
+ <plugin>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <phase>pre-site</phase>
+ <goals>
+ <goal>render-books</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <books>
+ <book>
+ <directory>src/books/example-book</directory>
+ <descriptor>src/books/example-book.xml</descriptor>
+ <formats>
+ <format>
+ <id>latex</id>
+ </format>
+ <format>
+ <id>xdoc</id>
+ </format>
+ <format>
+ <id>pdf</id>
+ </format>
+ <format>
+ <id>rtf</id>
+ </format>
+ </formats>
+ </book>
+ </books>
+ </configuration>
+ </plugin>
++------------------------------------------------------
+
+ See also the sample given on the main Doxia {{{http://maven.apache.org/doxia/book/index.html}site}}.
diff --git a/src/site/site.xml b/src/site/site.xml
new file mode 100644
index 0000000..58c7c2a
--- /dev/null
+++ b/src/site/site.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+ -->
+
+<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
+ name="Doxia Maven plugin">
+
+ <body>
+
+ <menu ref="parent"/>
+
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ <item name="Goals" href="plugin-info.html"/>
+ <item name="Usage" href="usage.html"/>
+ <!--<item name="FAQ" href="faq.html"/>-->
+ </menu>
+
+ <menu ref="reports"/>
+
+ </body>
+
+</project>