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 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.