Fork me on GitHub

Usage

The plugin offers goals for validating and transforming XML files. Basically, the plugin is used as follows:

  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>xml-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>...</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          ...
        </configuration>
      </plugin>
      ...
    </plugins>
  </build>

In the above example, the goal would be either of validate, or transform.

Transformation and Validation are described on separate pages.

Using snapshot versions

Snapshot versions (development builds) are available from the Codehaus Snapshot Repository. This repository must be configured in your POM, if you'd like to use a snapshot version. Configration of the snapshot repository is described in the page on the Mojo Sandbox.

Using a proxy server

It is not unusual, that an XML parser attempts to load documents from external servers. In a corporate environment, this will likely work only, if a proxy server is used. The plugin accepts the standard Maven proxy configuration. See the Mini guide on proxy configuration for details.