io7m | single-page | multi-page | epub | xstructural 2.0.1
3.6. XHTML
Previous
Front Matter
Up
5. API
Next

# 4. Maven Plugin

- 4.1. Overview
- 4.2. Usage
- 4.3. Skipping

## 4.1. Overview

1
The xstructural package provides a Maven plugin for transforming documents as part of a Maven build.

## 4.2. Usage

1
The Maven plugin has a simple interface that mostly matches the command-line interface.

### 4.2.2. POM Definitions

    <build>
        <plugins>
          ...

          <!-- Generate documentation in various formats. -->
          <plugin>
            <groupId>com.io7m.xstructural</groupId>
            <artifactId>com.io7m.xstructural.maven_plugin</artifactId>
            <version>2.0.1</version>
            <executions>
              <execution>
                <id>xhtml-single</id>
                <phase>package</phase>
                <goals>
                  <goal>xhtml-single</goal>
                </goals>
                <configuration>
                  <brandingFile>src/main/xml/brand.xml</brandingFile>
                  <sourceFile>src/main/xml/main.xml</sourceFile>
                  <outputDirectory>target/documentation</outputDirectory>
                </configuration>
              </execution>
              <execution>
                <id>xhtml-multi</id>
                <phase>package</phase>
                <goals>
                  <goal>xhtml-multi</goal>
                </goals>
                <configuration>
                  <brandingFile>src/main/xml/brand.xml</brandingFile>
                  <sourceFile>src/main/xml/main.xml</sourceFile>
                  <outputDirectory>target/documentation</outputDirectory>
                  <typeFile>src/main/xml/types.xml</typeFile>
                </configuration>
              </execution>
              <execution>
                <id>epub</id>
                <phase>package</phase>
                <goals>
                  <goal>epub</goal>
                </goals>
                <configuration>
                  <brandingFile>src/main/xml/brand.xml</brandingFile>
                  <sourceFile>src/main/xml/main.xml</sourceFile>
                  <outputDirectory>target/epub</outputDirectory>
                  <outputFileName>documentation.epub</outputFileName>
                </configuration>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>

## 4.3. Skipping

1
Execution of the plugin may be skipped by setting the xstructural.skip system property to true.
3.6. XHTML
Previous
Front Matter
Up
5. API
Next
io7m | single-page | multi-page | epub | xstructural 2.0.1