Integration With Maven

This page presents how to use Doxia 1.1 under Maven 2.0.x and 2.1.x with a Maven reporting plugin. Its goal is to help the Maven reporting plugin developer to integrate it.

Maven 2.0.x

Doxia 1.0 API is embedded in Maven 2.0.x (see MNG-3402), so your Maven reporting plugin needs to shade Doxia 1.1 API and Logging to be backward compatible with Maven 2.0.x.

<project>
  ...
  <build>
    ...
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>1.2</version>
        <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>
      ...
    </plugins>
  </build>
  ...
</project>

Maven 2.1.x

Doxia 1.1 API and Logging are embedded in Maven 2.1.x, your Maven reporting plugin is directly compatible with 2.1.x.

Common Bugs and Pitfalls

Please read the Doxia Issues page.