maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r633328 - in /maven/doxia/doxia-tools/trunk/doxia-converter: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/maven/ src/main/java/org/apache/maven/doxia/ src/main/java/org/apache/maven/...
Date Tue, 04 Mar 2008 00:16:24 GMT
Author: vsiveton
Date: Mon Mar  3 16:16:16 2008
New Revision: 633328

URL: http://svn.apache.org/viewvc?rev=633328&view=rev
Log:
DOXIA-228: Create a new tool to handle module conversion

o first add

Added:
    maven/doxia/doxia-tools/trunk/doxia-converter/
    maven/doxia/doxia-tools/trunk/doxia-converter/pom.xml   (with props)
    maven/doxia/doxia-tools/trunk/doxia-converter/src/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/Converter.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/ConverterException.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/UnsupportedFormatException.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/CLIManager.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/ConverterCli.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/mdo/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/mdo/converter.mdo
    maven/doxia/doxia-tools/trunk/doxia-converter/src/main/resources/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/site/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/index.apt   (with props)
    maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/usage.apt   (with props)
    maven/doxia/doxia-tools/trunk/doxia-converter/src/site/site.xml   (with props)
    maven/doxia/doxia-tools/trunk/doxia-converter/src/test/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/ConverterTest.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-converter/src/test/resources/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/test/resources/unit/
    maven/doxia/doxia-tools/trunk/doxia-converter/src/test/resources/unit/Doxia.htm

Added: maven/doxia/doxia-tools/trunk/doxia-converter/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/pom.xml?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/pom.xml (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/pom.xml Mon Mar  3 16:16:16 2008
@@ -0,0 +1,174 @@
+<?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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.doxia</groupId>
+    <artifactId>doxia-tools</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+
+  <artifactId>doxia-converter</artifactId>
+  <name>Doxia Tools :: Converter</name>
+  <description>Doxia Converter Tool to convert a supported format to another</description>
+
+  <dependencies>
+    <!-- doxia -->
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-core</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-logging-api</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-sink-api</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-apt</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-confluence</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-docbook-simple</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-fml</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-fo</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-latex</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-itext</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-rtf</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-twiki</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-xdoc</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-module-xhtml</artifactId>
+      <version>${doxiaVersion}</version>
+    </dependency>
+
+    <!-- Misc -->
+    <dependency>
+      <groupId>commons-cli</groupId>
+      <artifactId>commons-cli</artifactId>
+      <version>1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.3</version>
+    </dependency>
+
+    <!-- Plexus -->
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+  </dependencies>
+
+  <properties>
+    <doxiaVersion>1.0-beta-1-SNAPSHOT</doxiaVersion>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.modello</groupId>
+        <artifactId>modello-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>converter</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>java</goal>
+            </goals>
+            <configuration>
+              <model>src/main/mdo/converter.mdo</model>
+              <version>1.0.0</version>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.2-beta-2</version>
+        <configuration>
+          <descriptorId>jar-with-dependencies</descriptorId>
+          <finalName>apache-doxia-${version}</finalName>
+          <archive>
+            <manifestEntries>
+              <Main-Class>org.apache.maven.doxia.cli.ConverterCli</Main-Class>
+            </manifestEntries>
+          </archive>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
\ No newline at end of file

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/Converter.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/Converter.java?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/Converter.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/Converter.java Mon Mar  3 16:16:16 2008
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+package org.apache.maven.doxia;
+
+import org.apache.maven.doxia.convertor.model.InputFile;
+import org.apache.maven.doxia.convertor.model.OutputFile;
+import org.apache.maven.doxia.logging.LogEnabled;
+
+/**
+ * Interface to convert a Doxia file to another one.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public interface Converter
+    extends LogEnabled
+{
+    /**
+     * @return a not null array containing supported input format, i.e. <code>apt</code>.
+     */
+    String[] getInputFormats();
+
+    /**
+     * @return a not null array containing supported input format, i.e. <code>xhtml</code>.
+     */
+    String[] getOutputFormats();
+
+    /**
+     * @param input an input file, not null.
+     * @param output an output file, not null.
+     * @throws UnsupportedFormatException if any
+     * @throws ConverterException if any
+     */
+    void convert( InputFile input, OutputFile output )
+        throws UnsupportedFormatException, ConverterException;
+}

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/Converter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/Converter.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/ConverterException.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/ConverterException.java?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/ConverterException.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/ConverterException.java Mon Mar  3 16:16:16 2008
@@ -0,0 +1,59 @@
+package org.apache.maven.doxia;
+
+/*
+ * 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.
+ */
+
+/**
+ * Wrap an exception that occurs during the conversion.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class ConverterException
+    extends Exception
+{
+    /** The serialVersionUID */
+    static final long serialVersionUID = -5251213141888260575L;
+
+    /**
+     * Construct a new ConverterException with the specified detail message.
+     *
+     * @param message The detailed message.
+     * This can later be retrieved by the Throwable.getMessage() method.
+     */
+    public ConverterException( String message )
+    {
+        super( message );
+    }
+
+    /**
+     * Construct a new ConverterException with the specified
+     * detail message and cause.
+     *
+     * @param message The detailed message.
+     * This can later be retrieved by the Throwable.getMessage() method.
+     * @param cause the cause. This can be retrieved later by the
+     * Throwable.getCause() method. (A null value is permitted, and indicates
+     * that the cause is nonexistent or unknown.)
+     */
+    public ConverterException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+}

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/ConverterException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/ConverterException.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java Mon Mar  3 16:16:16 2008
@@ -0,0 +1,380 @@
+/*
+ * 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.
+ */
+package org.apache.maven.doxia;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.commons.lang.ClassUtils;
+import org.apache.maven.doxia.convertor.model.InputFile;
+import org.apache.maven.doxia.convertor.model.OutputFile;
+import org.apache.maven.doxia.logging.Log;
+import org.apache.maven.doxia.logging.SystemStreamLog;
+import org.apache.maven.doxia.module.apt.AptParser;
+import org.apache.maven.doxia.module.apt.AptSink;
+import org.apache.maven.doxia.module.confluence.ConfluenceParser;
+import org.apache.maven.doxia.module.docbook.DocBookParser;
+import org.apache.maven.doxia.module.docbook.DocBookSink;
+import org.apache.maven.doxia.module.fml.FmlParser;
+import org.apache.maven.doxia.module.fo.FoSink;
+import org.apache.maven.doxia.module.itext.ITextSink;
+import org.apache.maven.doxia.module.latex.LatexSink;
+import org.apache.maven.doxia.module.rtf.RtfSink;
+import org.apache.maven.doxia.module.twiki.TWikiParser;
+import org.apache.maven.doxia.module.xdoc.XdocParser;
+import org.apache.maven.doxia.module.xdoc.XdocSink;
+import org.apache.maven.doxia.module.xhtml.XhtmlParser;
+import org.apache.maven.doxia.module.xhtml.XhtmlSink;
+import org.apache.maven.doxia.parser.ParseException;
+import org.apache.maven.doxia.parser.Parser;
+import org.apache.maven.doxia.sink.Sink;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.SelectorUtils;
+import org.codehaus.plexus.util.StringUtils;
+
+/**
+ * Default implementation of <code>Converter</code>
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class DefaultConverter
+    implements Converter
+{
+    private static final String APT_PARSER = getParserFormat( AptParser.class );
+
+    private static final String CONFLUENCE_PARSER = getParserFormat( ConfluenceParser.class );
+
+    private static final String DOCBOOK_PARSER = getParserFormat( DocBookParser.class );
+
+    private static final String FML_PARSER = getParserFormat( FmlParser.class );
+
+    private static final String TWIKI_PARSER = getParserFormat( TWikiParser.class );
+
+    private static final String XDOC_PARSER = getParserFormat( XdocParser.class );
+
+    private static final String XHTML_PARSER = getParserFormat( XhtmlParser.class );
+
+    /** Supported input format, i.e. supported Doxia parser */
+    public static final String[] SUPPORTED_FROM_FORMAT = {
+        APT_PARSER,
+        CONFLUENCE_PARSER,
+        DOCBOOK_PARSER,
+        FML_PARSER,
+        TWIKI_PARSER,
+        XDOC_PARSER,
+        XHTML_PARSER };
+
+    private static final String APT_SINK = getSinkFormat( AptSink.class );
+
+    private static final String DOCBOOK_SINK = getSinkFormat( DocBookSink.class );
+
+    private static final String FO_SINK = getSinkFormat( FoSink.class );
+
+    private static final String ITEXT_SINK = getSinkFormat( ITextSink.class );
+
+    private static final String LATEX_SINK = getSinkFormat( LatexSink.class );
+
+    private static final String RTF_SINK = getSinkFormat( RtfSink.class );
+
+    private static final String XDOC_SINK = getSinkFormat( XdocSink.class );
+
+    private static final String XHTML_SINK = getSinkFormat( XhtmlSink.class );
+
+    /** Supported output format, i.e. supported Doxia Sink */
+    public static final String[] SUPPORTED_TO_FORMAT = {
+        APT_SINK,
+        DOCBOOK_SINK,
+        FO_SINK,
+        ITEXT_SINK,
+        LATEX_SINK,
+        RTF_SINK,
+        XDOC_SINK,
+        XHTML_SINK };
+
+    private Log log;
+
+    /** {@inheritDoc} */
+    public void enableLogging( Log log )
+    {
+        this.log = log;
+    }
+
+    /**
+     * Returns a logger for this sink.
+     * If no logger has been configured, a new SystemStreamLog is returned.
+     *
+     * @return Log
+     */
+    protected Log getLog()
+    {
+        if ( log == null )
+        {
+            log = new SystemStreamLog();
+        }
+
+        return log;
+    }
+
+    /** {@inheritDoc} */
+    public String[] getInputFormats()
+    {
+        return SUPPORTED_FROM_FORMAT;
+    }
+
+    /** {@inheritDoc} */
+    public String[] getOutputFormats()
+    {
+        return SUPPORTED_TO_FORMAT;
+    }
+
+    /** {@inheritDoc} */
+    public void convert( InputFile input, OutputFile output )
+        throws UnsupportedFormatException, ConverterException
+    {
+        if ( input == null )
+        {
+            throw new IllegalArgumentException( "input is required" );
+        }
+        if ( output == null )
+        {
+            throw new IllegalArgumentException( "output is required" );
+        }
+
+        Parser parser = getParser( input.getFormat() );
+
+        if ( getLog().isDebugEnabled() )
+        {
+            getLog().debug( "Parser used: " + parser.getClass().getName() );
+        }
+
+        StringWriter stringWriter = new StringWriter();
+        Sink sink = getSink( output.getFormat(), stringWriter );
+
+        if ( getLog().isDebugEnabled() )
+        {
+            getLog().debug( "Sink used: " + sink.getClass().getName() );
+        }
+
+        if ( input.getFile().isFile() )
+        {
+            parse( input.getFile(), output, parser, sink, stringWriter );
+        }
+        else
+        {
+            List files;
+            try
+            {
+                files = FileUtils.getFiles( input.getFile(), "**/*." + input.getFormat(), StringUtils.join( FileUtils
+                    .getDefaultExcludes(), ", " ) );
+            }
+            catch ( IOException e )
+            {
+                throw new ConverterException( "IOException: " + e.getMessage(), e );
+            }
+
+            for ( Iterator it = files.iterator(); it.hasNext(); )
+            {
+                File f = (File) it.next();
+
+                parse( f, output, parser, sink, stringWriter );
+            }
+        }
+    }
+
+    /**
+     * @param clazz an implementation of <code>Parser</code> with the pattern <code>&lt;format&gt;Parser</code>
+     * @return the parser format in lower case.
+     * @see Parser implementations
+     */
+    private static String getParserFormat( Class clazz )
+    {
+        return StringUtils.replace( ClassUtils.getShortClassName( clazz ).toLowerCase(), "parser", "" );
+    }
+
+    /**
+     * @param clazz an implementation of <code>Sink</code> with the pattern <code>&lt;format&gt;Sink</code>
+     * @return the sink format in lower case.
+     * @see Sink implementations
+     */
+    private static String getSinkFormat( Class clazz )
+    {
+        return StringUtils.replace( ClassUtils.getShortClassName( clazz ).toLowerCase(), "sink", "" );
+    }
+
+    /**
+     * @param format
+     * @return an instance of <code>Parser</code> depending the format.
+     * @throws IllegalArgumentException if any
+     */
+    private static Parser getParser( String format )
+    {
+        if ( format.equals( APT_PARSER ) )
+        {
+            return new AptParser();
+        }
+        else if ( format.equals( CONFLUENCE_PARSER ) )
+        {
+            return new ConfluenceParser();
+        }
+        else if ( format.equals( DOCBOOK_PARSER ) )
+        {
+            return new DocBookParser();
+        }
+        else if ( format.equals( FML_PARSER ) )
+        {
+            return new FmlParser();
+        }
+        else if ( format.equals( XDOC_PARSER ) )
+        {
+            return new XdocParser();
+        }
+        else if ( format.equals( XHTML_PARSER ) )
+        {
+            return new XhtmlParser();
+        }
+
+        throw new IllegalArgumentException( "Parser not found for: " + format );
+    }
+
+    /**
+     * @param format
+     * @return an instance of <code>Sink</code> depending the format.
+     * @throws IllegalArgumentException if any
+     */
+    private static Sink getSink( String format, StringWriter stringWriter )
+    {
+        if ( format.equals( APT_SINK ) )
+        {
+            return new AptSink( stringWriter );
+        }
+        else if ( format.equals( DOCBOOK_SINK ) )
+        {
+            return new DocBookSink( stringWriter );
+        }
+        else if ( format.equals( FO_SINK ) )
+        {
+            return new FoSink( stringWriter );
+        }
+        else if ( format.equals( ITEXT_SINK ) )
+        {
+            return new ITextSink( stringWriter );
+        }
+        else if ( format.equals( LATEX_SINK ) )
+        {
+            return new LatexSink( stringWriter );
+        }
+        else if ( format.equals( RTF_SINK ) )
+        {
+            // TODO
+            //return  new RtfSink( s );
+        }
+        else if ( format.equals( XDOC_SINK ) )
+        {
+            return new XdocSink( stringWriter );
+        }
+        else if ( format.equals( XHTML_SINK ) )
+        {
+            return new XhtmlSink( stringWriter );
+        }
+
+        throw new IllegalArgumentException( "Sink not found for: " + format );
+    }
+
+    /**
+     * @param inputFile
+     * @param output
+     * @param parser
+     * @param sink
+     * @param stringWriter
+     * @throws ConverterException if any
+     */
+    private void parse( File inputFile, OutputFile output, Parser parser, Sink sink, StringWriter stringWriter )
+        throws ConverterException
+    {
+        if ( getLog().isDebugEnabled() )
+        {
+            getLog().debug(
+                            "Parsing file from '" + inputFile.getAbsolutePath() + "' to '" + output.getAbsolutePath()
+                                + "'" );
+        }
+
+        Reader reader = null;
+        try
+        {
+            reader = new FileReader( inputFile );
+            parser.parse( reader, sink );
+        }
+        catch ( IOException e )
+        {
+            throw new ConverterException( "IOException: " + e.getMessage(), e );
+        }
+        catch ( ParseException e )
+        {
+            throw new ConverterException( "ParseException: " + e.getMessage(), e );
+        }
+        finally
+        {
+            IOUtil.close( reader );
+        }
+
+        Writer writer = null;
+        try
+        {
+            if ( output.getFile().exists() && output.getFile().isDirectory() )
+            {
+                writer = new FileWriter( new File( output.getFile(), inputFile.getName() + "." + output.getFormat() ) );
+            }
+            else
+            {
+                if ( !SelectorUtils.match( "**.*", output.getFile().getName() ) )
+                {
+                    // assume it is a directory
+                    output.getFile().mkdirs();
+                    writer = new FileWriter(
+                                             new File( output.getFile(), inputFile.getName() + "." + output.getFormat() ) );
+                }
+                else
+                {
+                    output.getFile().getParentFile().mkdirs();
+                    writer = new FileWriter( output.getFile() );
+                }
+            }
+
+            IOUtil.copy( stringWriter.toString(), writer );
+        }
+        catch ( IOException e )
+        {
+            throw new ConverterException( "IOException: " + e.getMessage(), e );
+        }
+        finally
+        {
+            IOUtil.close( writer );
+            IOUtil.close( stringWriter );
+        }
+    }
+}

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/UnsupportedFormatException.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/UnsupportedFormatException.java?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/UnsupportedFormatException.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/UnsupportedFormatException.java Mon Mar  3 16:16:16 2008
@@ -0,0 +1,65 @@
+package org.apache.maven.doxia;
+
+import org.codehaus.plexus.util.StringUtils;
+
+/*
+ * 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.
+ */
+
+/**
+ * Wrap an exception that occurs if a format is not supported.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class UnsupportedFormatException
+    extends Exception
+{
+    /** serialVersionUID */
+    static final long serialVersionUID = -4334290887832961366L;
+
+    /**
+     * Constructs an UnsupportedFormatException with the specified
+     * detail message.
+     *
+     * @param format the unsupported format
+     * @param supportedFormat the supported formats
+     */
+    public UnsupportedFormatException( String format, String[] supportedFormat )
+    {
+        super( "Unsupported format '" + format + "'. The allowed format are: "
+            + StringUtils.join( supportedFormat, ", " ) );
+    }
+
+    /**
+     * Construct a new UnsupportedFormatException with the specified
+     * detail message and cause.
+     *
+     * @param format the unsupported format
+     * @param supportedFormat the supported formats
+     * This can later be retrieved by the Throwable.getMessage() method.
+     * @param cause the cause. This can be retrieved later by the
+     * Throwable.getCause() method. (A null value is permitted, and indicates
+     * that the cause is nonexistent or unknown.)
+     */
+    public UnsupportedFormatException( String format, String[] supportedFormat, Throwable cause )
+    {
+        super( "Unsupported format '" + format + "'. The allowed format are: "
+            + StringUtils.join( supportedFormat, ", " ), cause );
+    }
+}

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/UnsupportedFormatException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/UnsupportedFormatException.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/CLIManager.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/CLIManager.java?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/CLIManager.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/CLIManager.java Mon Mar  3 16:16:16 2008
@@ -0,0 +1,225 @@
+/*
+ * 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.
+ */
+package org.apache.maven.doxia.cli;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.GnuParser;
+import org.apache.commons.cli.HelpFormatter;
+import org.apache.commons.cli.OptionBuilder;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.ParseException;
+import org.apache.maven.doxia.DefaultConverter;
+import org.codehaus.plexus.util.StringUtils;
+
+/**
+ * Manager for Doxia converter CLI options.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+class CLIManager
+{
+    /** h character */
+    public static final char HELP = 'h';
+
+    /** v character */
+    public static final char VERSION = 'v';
+
+    /** in String */
+    public static final String IN = "in";
+
+    /** out String */
+    public static final String OUT = "out";
+
+    /** from String */
+    public static final String FROM = "from";
+
+    /** to String */
+    public static final String TO = "to";
+
+    /** X character */
+    public static final char DEBUG = 'X';
+
+    /** e character */
+    public static final char ERRORS = 'e';
+
+    private static final Options options;
+
+    static
+    {
+        options = new Options();
+
+        options.addOption( OptionBuilder.withLongOpt( "help" ).withDescription( "Display help information" )
+            .create( HELP ) );
+        options.addOption( OptionBuilder.withLongOpt( "version" ).withDescription( "Display version information" )
+            .create( VERSION ) );
+
+        options.addOption( OptionBuilder.withLongOpt( "input" ).withDescription( "Input file or directory" ).hasArg()
+            .create( IN ) );
+        options.addOption( OptionBuilder.withLongOpt( "output" ).withDescription( "Output directory" ).hasArg()
+            .create( OUT ) );
+        options.addOption( OptionBuilder.withDescription( "From format" ).hasArg().create( FROM ) );
+        options.addOption( OptionBuilder.withDescription( "To format" ).hasArg().create( TO ) );
+
+        options.addOption( OptionBuilder.withLongOpt( "debug" ).withDescription( "Produce execution debug output" )
+            .create( DEBUG ) );
+        options.addOption( OptionBuilder.withLongOpt( "errors" ).withDescription( "Produce execution error messages" )
+            .create( ERRORS ) );
+    }
+
+    /**
+     * @param args
+     * @return
+     * @throws ParseException
+     */
+    public CommandLine parse( String[] args )
+        throws ParseException
+    {
+        // We need to eat any quotes surrounding arguments...
+        String[] cleanArgs = cleanArgs( args );
+
+        CommandLineParser parser = new GnuParser();
+        return parser.parse( options, cleanArgs );
+    }
+
+    protected static void displayHelp()
+    {
+        System.out.println();
+
+        HelpFormatter formatter = new HelpFormatter();
+        formatter.printHelp( "doxia [options] [-in <arg>] [-from <arg>] [-out <arg>] [-to <arg>]\n", "\nOptions:",
+                             options, getSupportedFormat() );
+    }
+
+    protected static void displaySupportedFormat()
+    {
+        System.out.println( getSupportedFormat() );
+    }
+
+    private static String getSupportedFormat()
+    {
+        return "\nSupported Formats:\n from: " + StringUtils.join( DefaultConverter.SUPPORTED_FROM_FORMAT, ", " )
+            + "\n out: " + StringUtils.join( DefaultConverter.SUPPORTED_TO_FORMAT, ", " ) + "\n";
+    }
+
+    private String[] cleanArgs( String[] args )
+    {
+        List cleaned = new ArrayList();
+
+        StringBuffer currentArg = null;
+
+        for ( int i = 0; i < args.length; i++ )
+        {
+            String arg = args[i];
+
+            boolean addedToBuffer = false;
+
+            if ( arg.startsWith( "\"" ) )
+            {
+                // if we're in the process of building up another arg, push it and start over.
+                // this is for the case: "-Dfoo=bar "-Dfoo2=bar two" (note the first unterminated quote)
+                if ( currentArg != null )
+                {
+                    cleaned.add( currentArg.toString() );
+                }
+
+                // start building an argument here.
+                currentArg = new StringBuffer( arg.substring( 1 ) );
+                addedToBuffer = true;
+            }
+
+            // this has to be a separate "if" statement, to capture the case of: "-Dfoo=bar"
+            if ( arg.endsWith( "\"" ) )
+            {
+                String cleanArgPart = arg.substring( 0, arg.length() - 1 );
+
+                // if we're building an argument, keep doing so.
+                if ( currentArg != null )
+                {
+                    // if this is the case of "-Dfoo=bar", then we need to adjust the buffer.
+                    if ( addedToBuffer )
+                    {
+                        currentArg.setLength( currentArg.length() - 1 );
+                    }
+                    // otherwise, we trim the trailing " and append to the buffer.
+                    else
+                    {
+                        // TODO: introducing a space here...not sure what else to do but collapse whitespace
+                        currentArg.append( ' ' ).append( cleanArgPart );
+                    }
+
+                    // we're done with this argument, so add it.
+                    cleaned.add( currentArg.toString() );
+                }
+                else
+                {
+                    // this is a simple argument...just add it.
+                    cleaned.add( cleanArgPart );
+                }
+
+                // the currentArg MUST be finished when this completes.
+                currentArg = null;
+                continue;
+            }
+
+            // if we haven't added this arg to the buffer, and we ARE building an argument
+            // buffer, then append it with a preceding space...again, not sure what else to
+            // do other than collapse whitespace.
+            // NOTE: The case of a trailing quote is handled by nullifying the arg buffer.
+            if ( !addedToBuffer )
+            {
+                // append to the argument we're building, collapsing whitespace to a single space.
+                if ( currentArg != null )
+                {
+                    currentArg.append( ' ' ).append( arg );
+                }
+                // this is a loner, just add it directly.
+                else
+                {
+                    cleaned.add( arg );
+                }
+            }
+        }
+
+        // clean up.
+        if ( currentArg != null )
+        {
+            cleaned.add( currentArg.toString() );
+        }
+
+        int cleanedSz = cleaned.size();
+        String[] cleanArgs = null;
+
+        if ( cleanedSz == 0 )
+        {
+            // if we didn't have any arguments to clean, simply pass the original array through
+            cleanArgs = args;
+        }
+        else
+        {
+            cleanArgs = (String[]) cleaned.toArray( new String[cleanedSz] );
+        }
+
+        return cleanArgs;
+    }
+}

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/CLIManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/CLIManager.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/ConverterCli.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/ConverterCli.java?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/ConverterCli.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/ConverterCli.java Mon Mar  3 16:16:16 2008
@@ -0,0 +1,242 @@
+/*
+ * 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.
+ */
+package org.apache.maven.doxia.cli;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.ParseException;
+import org.apache.maven.doxia.Converter;
+import org.apache.maven.doxia.ConverterException;
+import org.apache.maven.doxia.DefaultConverter;
+import org.apache.maven.doxia.UnsupportedFormatException;
+import org.apache.maven.doxia.convertor.model.InputFile;
+import org.apache.maven.doxia.convertor.model.OutputFile;
+import org.apache.maven.doxia.logging.Log;
+import org.apache.maven.doxia.logging.SystemStreamLog;
+import org.codehaus.plexus.util.Os;
+
+/**
+ * Doxia converter CLI
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class ConverterCli
+{
+    /**
+     * Default main which terminates the JVM with <code>0</code> if no errors occurs.
+     *
+     * @param args
+     * @see #doMain(String[])
+     * @see System#exit(int)
+     */
+    public static void main( String[] args )
+    {
+        System.exit( ConverterCli.doMain( args ) );
+    }
+
+    /**
+     * @param args
+     */
+    private static int doMain( String[] args )
+    {
+        // ----------------------------------------------------------------------
+        // Setup the command line parser
+        // ----------------------------------------------------------------------
+
+        CLIManager cliManager = new CLIManager();
+
+        CommandLine commandLine;
+        try
+        {
+            commandLine = cliManager.parse( args );
+        }
+        catch ( ParseException e )
+        {
+            System.err.println( "Unable to parse command line options: " + e.getMessage() );
+            CLIManager.displayHelp();
+
+            return 1;
+        }
+
+        // TODO: maybe classworlds could handle this requirement...
+        if ( "1.4".compareTo( System.getProperty( "java.specification.version" ) ) > 0 )
+        {
+            System.err.println( "Sorry, but JDK 1.4 or above is required to execute Maven. You appear to be using "
+                + "Java:" );
+            System.err.println( "java version \"" + System.getProperty( "java.version", "<unknown java version>" )
+                + "\"" );
+            System.err.println( System.getProperty( "java.runtime.name", "<unknown runtime name>" ) + " (build "
+                + System.getProperty( "java.runtime.version", "<unknown runtime version>" ) + ")" );
+            System.err.println( System.getProperty( "java.vm.name", "<unknown vm name>" ) + " (build "
+                + System.getProperty( "java.vm.version", "<unknown vm version>" ) + ", "
+                + System.getProperty( "java.vm.info", "<unknown vm info>" ) + ")" );
+
+            return 1;
+        }
+
+        if ( commandLine.hasOption( CLIManager.HELP ) )
+        {
+            CLIManager.displayHelp();
+
+            return 0;
+        }
+
+        if ( commandLine.hasOption( CLIManager.VERSION ) )
+        {
+            showVersion();
+
+            return 0;
+        }
+
+        boolean debug = commandLine.hasOption( CLIManager.DEBUG );
+
+        boolean showErrors = debug || commandLine.hasOption( CLIManager.ERRORS );
+
+        if ( showErrors )
+        {
+            System.out.println( "+ Error stacktraces are turned on." );
+        }
+
+        Converter converter = new DefaultConverter();
+        Log log = new SystemStreamLog();
+        if ( debug )
+        {
+            log.setLogLevel( Log.LEVEL_DEBUG );
+        }
+        converter.enableLogging( log );
+
+        InputFile input;
+        OutputFile output;
+        try
+        {
+            input = InputFile.valueOf( commandLine.getOptionValue( CLIManager.IN ), commandLine
+                .getOptionValue( CLIManager.FROM ), converter.getInputFormats() );
+            output = OutputFile.valueOf( commandLine.getOptionValue( CLIManager.OUT ), commandLine
+                .getOptionValue( CLIManager.TO ), converter.getOutputFormats() );
+        }
+        catch ( IllegalArgumentException e )
+        {
+            showFatalError( "Illegal argument: " + e.getMessage(), e, showErrors );
+
+            CLIManager.displayHelp();
+
+            return 1;
+        }
+        catch ( UnsupportedFormatException e )
+        {
+            showFatalError( "Unsupported format", e, showErrors );
+
+            CLIManager.displaySupportedFormat();
+
+            return 1;
+        }
+
+        try
+        {
+            converter.convert( input, output );
+        }
+        catch ( UnsupportedFormatException e )
+        {
+            showFatalError( "Unsupported format", e, showErrors );
+
+            CLIManager.displaySupportedFormat();
+
+            return 1;
+        }
+        catch ( ConverterException e )
+        {
+            showFatalError( "Converter exception: " + e.getMessage(), e, showErrors );
+
+            return 1;
+        }
+        catch ( IllegalArgumentException e )
+        {
+            showFatalError( "Illegal argument: " + e.getMessage(), e, showErrors );
+
+            return 1;
+        }
+        catch ( RuntimeException e )
+        {
+            showFatalError( "Runtime exception: " + e.getMessage(), e, showErrors );
+
+            return 1;
+        }
+
+        return 0;
+    }
+
+    private static void showVersion()
+    {
+        InputStream resourceAsStream;
+        try
+        {
+            Properties properties = new Properties();
+            resourceAsStream = ConverterCli.class.getClassLoader()
+                .getResourceAsStream( "META-INF/maven/org.apache.maven.doxia/doxia-convertor/pom.properties" );
+
+            if ( resourceAsStream != null )
+            {
+                properties.load( resourceAsStream );
+
+                if ( properties.getProperty( "builtOn" ) != null )
+                {
+                    System.out.println( "Doxia Convertor version: " + properties.getProperty( "version", "unknown" )
+                        + " built on " + properties.getProperty( "builtOn" ) );
+                }
+                else
+                {
+                    System.out.println( "Doxia Convertor version: " + properties.getProperty( "version", "unknown" ) );
+                }
+            }
+            else
+            {
+                System.out.println( "Doxia Convertor version: " + properties.getProperty( "version", "unknown" ) );
+            }
+
+            System.out.println( "Java version: " + System.getProperty( "java.version", "<unknown java version>" ) );
+
+            System.out.println( "OS name: \"" + Os.OS_NAME + "\" version: \"" + Os.OS_VERSION + "\" arch: \""
+                + Os.OS_ARCH + "\" Family: \"" + Os.OS_FAMILY + "\"" );
+
+        }
+        catch ( IOException e )
+        {
+            System.err.println( "Unable determine version from JAR file: " + e.getMessage() );
+        }
+    }
+
+    private static void showFatalError( String message, Exception e, boolean show )
+    {
+        System.err.println( "FATAL ERROR: " + message );
+        if ( show )
+        {
+            System.err.println( "Error stacktrace:" );
+
+            e.printStackTrace();
+        }
+        else
+        {
+            System.err.println( "For more information, run with the -e flag" );
+        }
+    }
+}

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/ConverterCli.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/cli/ConverterCli.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/doxia-tools/trunk/doxia-converter/src/main/mdo/converter.mdo
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/main/mdo/converter.mdo?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/src/main/mdo/converter.mdo (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/src/main/mdo/converter.mdo Mon Mar  3 16:16:16 2008
@@ -0,0 +1,226 @@
+<?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.
+-->
+
+<model>
+  <id>convertor</id>
+  <name>ConvertorModel</name>
+  <description>Model for the convertor tool.</description>
+  <defaults>
+    <default>
+      <key>package</key>
+      <value>org.apache.maven.doxia.convertor.model</value>
+    </default>
+  </defaults>
+  <classes>
+    <class>
+      <name>AbstractFile</name>
+      <description><![CDATA[
+        The <code>&lt;file&gt;</code> to be checked.
+      ]]></description>
+      <abstract>true</abstract>
+      <version>1.0.0</version>
+      <fields>
+        <field>
+          <name>absolutePath</name>
+          <version>1.0.0</version>
+          <description><![CDATA[
+            The absolute Path.
+          ]]></description>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>format</name>
+          <version>1.0.0</version>
+          <description><![CDATA[
+            The wanted format.
+          ]]></description>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+      </fields>
+      <codeSegments>
+        <codeSegment>
+          <version>1.0.0</version>
+          <code>
+            <![CDATA[
+    /**
+     * @see File#File(String)
+     */
+    public java.io.File getFile()
+    {
+        return new java.io.File( this.absolutePath );
+    }
+
+    /**
+     * @param in an absolute path
+     * @param from a supported format
+     * @param supported an array of supported format
+     * @return <code>from</code> or the extension of <code>in</code>
+     * @throws IllegalArgumentException if any
+     * @throws UnsupportedFormatException if any
+     */
+    protected static String getSupportedFormat( String in, String from, String[] supported )
+        throws org.apache.maven.doxia.UnsupportedFormatException
+    {
+        String fromFormat = null;
+        if ( org.codehaus.plexus.util.StringUtils.isEmpty( from ) )
+        {
+            // try to detect format
+            if ( org.codehaus.plexus.util.SelectorUtils.match( "**.*", in ) )
+            {
+                fromFormat = in.substring( in.lastIndexOf( '.' ) + 1, in.length() );
+            }
+            else
+            {
+                throw new IllegalArgumentException( "'" + in + "' is directory: cannot detect the format" );
+            }
+        }
+        else
+        {
+            fromFormat = from;
+        }
+
+        String supportedString = org.codehaus.plexus.util.StringUtils.join( supported, ", " );
+        if ( supportedString.indexOf( fromFormat.toLowerCase() ) == -1 )
+        {
+            throw new org.apache.maven.doxia.UnsupportedFormatException( fromFormat, supported );
+        }
+
+        return fromFormat.toLowerCase();
+    }
+            ]]>
+          </code>
+        </codeSegment>
+      </codeSegments>
+    </class>
+    <class>
+      <name>InputFile</name>
+      <description><![CDATA[
+        An input file with pathname and wanted format.
+      ]]></description>
+      <version>1.0.0</version>
+      <superClass>AbstractFile</superClass>
+      <codeSegments>
+        <codeSegment>
+          <version>1.0.0</version>
+          <code>
+            <![CDATA[
+    /**
+     * Default constructor.
+     */
+    private InputFile()
+    {
+        //nop
+    }
+
+    /**
+     * @param pathname not null
+     * @param format not null
+     * @param supportedFormat not null
+     * @return a type safe InputFile
+     * @throws org.apache.maven.doxia.UnsupportedFormatException
+     * @see AbstractFile#setAbsolutePath(String)
+     * @see AbstractFile#setFormat(String)
+     * @see AbstractFile#getSupportedFormat(String, String, String[])
+     */
+    public static InputFile valueOf( String pathname, String format, String[] supportedFormat )
+        throws org.apache.maven.doxia.UnsupportedFormatException
+    {
+        if ( pathname == null || pathname.trim().length() == 0 )
+        {
+            throw new IllegalArgumentException( "pathname is required" );
+        }
+        if ( supportedFormat == null )
+        {
+            throw new IllegalArgumentException( "supportedFormat is required" );
+        }
+
+        format = getSupportedFormat( pathname, format, supportedFormat );
+
+        InputFile input = new InputFile();
+        input.setAbsolutePath( pathname );
+        input.setFormat( format );
+
+        return input;
+    }
+            ]]>
+          </code>
+        </codeSegment>
+      </codeSegments>
+    </class>
+    <class>
+      <name>OutputFile</name>
+      <description><![CDATA[
+        An output file with pathname and wanted format.
+      ]]></description>
+      <version>1.0.0</version>
+      <superClass>AbstractFile</superClass>
+      <codeSegments>
+        <codeSegment>
+          <version>1.0.0</version>
+          <code>
+            <![CDATA[
+    /**
+     * Default constructor.
+     */
+    private OutputFile()
+    {
+        //nop
+    }
+
+    /**
+     * @param pathname not null
+     * @param format not null
+     * @param supportedFormat not null
+     * @return a type safe OutputFile
+     * @throws org.apache.maven.doxia.UnsupportedFormatException
+     * @see AbstractFile#setAbsolutePath(String)
+     * @see AbstractFile#setFormat(String)
+     * @see AbstractFile#getSupportedFormat(String, String, String[])
+     */
+    public static OutputFile valueOf( String pathname, String format, String[] supportedFormat )
+        throws org.apache.maven.doxia.UnsupportedFormatException
+    {
+        if ( pathname == null || pathname.trim().length() == 0 )
+        {
+            throw new IllegalArgumentException( "pathname is required" );
+        }
+        if ( supportedFormat == null )
+        {
+            throw new IllegalArgumentException( "supportedFormat is required" );
+        }
+
+        format = getSupportedFormat( pathname, format, supportedFormat );
+
+        OutputFile output = new OutputFile();
+        output.setAbsolutePath( pathname );
+        output.setFormat( format );
+
+        return output;
+    }
+            ]]>
+          </code>
+        </codeSegment>
+      </codeSegments>
+    </class>
+  </classes>
+</model>

Added: maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/index.apt?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/index.apt (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/index.apt Mon Mar  3 16:16:16 2008
@@ -0,0 +1,43 @@
+ -----
+ Introduction
+ -----
+ Vincent Siveton
+ ------
+ March 2007
+ ------
+
+~~ 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/guides/mini/guide-apt-format.html
+
+Maven Doxia Converter
+
+ Doxia Converter is a tool that help you to convert a supported Doxia format to another supported Doxia format.
+
+ Actually, the supported formats are:
+
+   * input format: apt, confluence, docbook, fml, twiki, xdoc, xhtml
+
+   * output format: apt, docbook, fo, itext, latex, rtf, xdoc, xhtml
+
+   []
+
+* Usage
+
+   Instructions on how to use the Doxia Converter can be found {{{usage.html}here}}.

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/index.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/index.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/usage.apt?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/usage.apt (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/usage.apt Mon Mar  3 16:16:16 2008
@@ -0,0 +1,64 @@
+ ------
+ Usage
+ ------
+ Vincent Siveton
+ ------
+ March 2007
+ ------
+
+~~ 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/guides/mini/guide-apt-format.html
+
+Usage
+
+ The following examples describe the basic usage of the Doxia Converter.
+
+* Display Help
+
++-----+
+# java -jar target/apache-doxia-1.0-SNAPSHOT-jar-with-dependencies.jar -h
+
+usage: doxia [options] [-in <arg>] [-from <arg>] [-out <arg>] [-to <arg>]
+
+
+Options:
+ -e,--errors           Produce execution error messages
+ -from <arg>           From format
+ -h,--help             Display help information
+ -in,--input <arg>     Input file or directory
+ -out,--output <arg>   Output directory
+ -to <arg>             To format
+ -v,--version          Display version information
+ -X,--debug            Produce execution debug output
+
+Supported Format:
+from: apt, confluence, docbook, fml, twiki, xdoc, xhtml
+out: apt, docbook, fo, itext, latex, rtf, xdoc, xhtml
++-----+
+
+* Executes Conversion
+
++-----+
+# java -jar target/apache-doxia-1.0-SNAPSHOT-jar-with-dependencies.jar \
+    -in /path/to/xhtml.file \
+    -from xhtml \
+    -out /path/to/outputdir \
+    -to apt
++-----+

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/usage.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/site/apt/usage.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/doxia-tools/trunk/doxia-converter/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/site/site.xml?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/src/site/site.xml (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/src/site/site.xml Mon Mar  3 16:16:16 2008
@@ -0,0 +1,57 @@
+<?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>
+  <bannerLeft>
+    <name>Doxia :: Converter</name>
+    <src>http://maven.apache.org/images/apache-maven-project-2.png</src>
+    <href>http://maven.apache.org/doxia/</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>http://maven.apache.org/images/maven-logo-2.gif</src>
+  </bannerRight>
+  <publishDate format="dd MMM yyyy" />
+  <skin>
+    <groupId>org.apache.maven.skins</groupId>
+    <artifactId>maven-stylus-skin</artifactId>
+  </skin>
+  <body>
+    <links>
+      <item name="Apache" href="http://www.apache.org/"/>
+      <item name="Maven 1.x" href="http://maven.apache.org/maven-1.x"/>
+      <item name="Maven 2.x" href="http://maven.apache.org/"/>
+      <item name="Continuum" href="http://maven.apache.org/continuum"/>
+      <item name="SCM" href="http://maven.apache.org/scm"/>
+      <item name="Wagon" href="http://maven.apache.org/wagon"/>
+      <item name="JXR" href="http://maven.apache.org/jxr"/>
+      <item name="Doxia" href="http://maven.apache.org/doxia"/>
+    </links>
+
+    <menu name="Doxia :: Converter">
+      <item name="Overview" href="index.html"/>
+      <item name="Usage" href="usage.html"/>
+    </menu>
+
+    ${reports}
+  </body>
+</project>

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/site/site.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/site/site.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/ConverterTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/ConverterTest.java?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/ConverterTest.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/ConverterTest.java Mon Mar  3 16:16:16 2008
@@ -0,0 +1,130 @@
+/*
+ * 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.
+ */
+package org.apache.maven.doxia;
+
+import java.io.File;
+
+import org.apache.maven.doxia.convertor.model.InputFile;
+import org.apache.maven.doxia.convertor.model.OutputFile;
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.util.FileUtils;
+
+/**
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class ConverterTest
+    extends PlexusTestCase
+{
+    Converter converter;
+
+    /** {@inheritDoc} */
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        converter = new DefaultConverter();
+    }
+
+    /**
+     * @see Converter#getInputFormats()
+     */
+    public void testGetInputFormats()
+    {
+        assertNotNull( converter.getInputFormats() );
+    }
+
+    /**
+     * @see Converter#getOutputFormats()
+     */
+    public void testGetOutputFormats()
+    {
+        assertNotNull( converter.getOutputFormats() );
+    }
+
+    /**
+     * @see Converter#convert(InputFile, OutputFile)
+     * @throws Exception
+     */
+    public void testConvert()
+        throws Exception
+    {
+        String in = getBasedir() + "/src/test/resources/unit/Doxia.htm";
+        String from = "xhtml";
+        String out = getBasedir() + "/target/unit/";
+        String to = "apt";
+
+        InputFile input = InputFile.valueOf( in, from, converter.getInputFormats() );
+        OutputFile output = OutputFile.valueOf( out, to, converter.getOutputFormats() );
+
+        converter.convert( input, output );
+        assertTrue( new File( out, "Doxia.htm.apt" ).exists() );
+
+        // ----------------------------------------------------------------------
+
+        FileUtils.deleteDirectory( new File( getBasedir() + "/target/unit/" ) );
+
+        in = getBasedir() + "/src/test/resources/unit/Doxia.htm";
+        from = "xhtml";
+        out = getBasedir() + "/target/unit/Doxia.apt";
+        to = "apt";
+
+        input = InputFile.valueOf( in, from, converter.getInputFormats() );
+        output = OutputFile.valueOf( out, to, converter.getOutputFormats() );
+
+        converter.convert( input, output );
+        assertTrue( new File( out ).exists() );
+
+        // ----------------------------------------------------------------------
+
+        FileUtils.deleteDirectory( new File( getBasedir() + "/target/unit/" ) );
+
+        FileUtils.copyFile( new File( in ), new File( getBasedir(), "/target/unit/Doxia.xhtml" ) );
+
+        in = getBasedir() + "/target/unit/Doxia.xhtml";
+        from = null;
+        out = getBasedir() + "/target/unit/Doxia.apt";
+        to = "apt";
+
+        input = InputFile.valueOf( in, from, converter.getInputFormats() );
+        output = OutputFile.valueOf( out, to, converter.getOutputFormats() );
+
+        converter.convert( input, output );
+        assertTrue( new File( out ).exists() );
+
+        // ----------------------------------------------------------------------
+
+        FileUtils.deleteDirectory( new File( getBasedir() + "/target/unit/" ) );
+
+        FileUtils.copyFile( new File( getBasedir() + "/src/test/resources/unit/Doxia.htm" ),
+                            new File( getBasedir(), "/target/unit/Doxia.xhtml" ) );
+
+        in = getBasedir() + "/target/unit/Doxia.xhtml";
+        from = null;
+        out = getBasedir() + "/target/unit/Doxia.apt";
+        to = null;
+
+        input = InputFile.valueOf( in, from, converter.getInputFormats() );
+        output = OutputFile.valueOf( out, to, converter.getOutputFormats() );
+
+        converter.convert( input, output );
+        assertTrue( new File( out ).exists() );
+    }
+}

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/ConverterTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-converter/src/test/java/org/apache/maven/doxia/ConverterTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/doxia/doxia-tools/trunk/doxia-converter/src/test/resources/unit/Doxia.htm
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/test/resources/unit/Doxia.htm?rev=633328&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-converter/src/test/resources/unit/Doxia.htm (added)
+++ maven/doxia/doxia-tools/trunk/doxia-converter/src/test/resources/unit/Doxia.htm Mon Mar  3 16:16:16 2008
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Doxia - Introduction</title>
+    <meta name="author" content="Jason van Zyl
+Vincent Siveton"/>
+    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+
+  </head>
+
+  <body>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <div class="section">
+          <h2>Maven Doxia</h2>
+          <p>Doxia is a content generation framework which aims to provide its users with powerful
+            techniques for generating static and dynamic content: Doxia can be used in web-based
+            publishing context to generate static sites, in addition to being incorporated into
+            dynamic content generation systems like blogs, wikis and content management systems.</p>
+          <p>Doxia supports markup languages with simple syntaxes. Lightweight markup languages are
+            used by people who might be expected to read the document source as well as the rendered
+            output.</p>
+          <p>Doxia is used extensively by Maven and it powers the entire documentation system of
+            Maven. It gives Maven the ability to take any document that Doxia supports and output it
+            any format.</p>
+
+          <div class="section">
+            <h3>Brief History</h3>
+            <p>Based on the <a href="http://www.xmlmind.com/aptconvert.html" class="externalLink"
+                >Aptconvert</a> project developed by <a href="http://www.xmlmind.com/"
+                class="externalLink">Xmlmind</a> company, Doxia was initially hosted by Codehaus, to
+              become a sub-project of Maven early in 2006.</p>
+          </div>
+          <div class="section">
+            <h3>Main Features</h3>
+            <ul>
+              <li>Developed in Java</li>
+
+              <li>Support of several markup formats: APT (Almost Plain Text), Confluence, DocBook,
+                FML (FAQ Markup Language), LaTeX, RTF, TWiki, XDoc (popular in Apache land), XHTML</li>
+              <li>Easy to learn the syntax of the supported markup formats</li>
+              <li>Macro support</li>
+              <li>No need to have a corporate infrastructure (like wiki) to host your documentation</li>
+              <li>Extensible framework</li>
+            </ul>
+          </div>
+        </div>
+
+      </div>
+    </div>
+  </body>
+</html>



Mime
View raw message