Usage

If you've never used a Maven plugin before please take a look at Maven's Getting Started Guide.

To use the plugin in your project you have to add it to the plugins section of your POM.

<plugin>
  <groupId>org.jibx</groupId>
  <artifactId>jibx-maven-plugin</artifactId>
  <version>1.2.5</version>
  <executions>
    <execution>
      <goals>
        <goal>bind</goal>
      </goals>
    </execution>
  </executions>
</plugin>

The project also needs to include jibx-run and optionally jibx-extras in its dependencies.

<dependency>
  <groupId>org.jibx</groupId>
  <artifactId>jibx-run</artifactId>
  <version>1.2.5</version>
</dependency>
<dependency>
  <groupId>org.jibx</groupId>
  <artifactId>jibx-extras</artifactId>
  <version>1.2.5</version>
</dependency>

Configuration

The plugin supports the following configuration options.

optiondefaultdescription
schemaBindingDirectorysrc/main/configIn which directory to search for binding definitions.
includeschemaBindingsbinding.xmlWhich files in the configuration directory to include as binding definitions.
excludeschemaBindingsnoneWhich files in the configuration directory that will be matched by one the include patterns to exclude.
multi-modulefalseControl flag to enable multi-module mode. (See modes.html#Multi-module mode)
modulesnoneWhich modules to include in multi-module mode. (See modes.html#Restricted multi-module mode)
loadfalseControl flag for test loading generated/modified classes.
validatetrueControl flag for binding definition validation.
verbosefalseControl flag for verbose processing reports.
verifyfalseControl flag for verifying generated/modified classes with BCEL.

Example

This example would include all files ending in -binding.xml except template-binding.xml in the src/main/jibx directory and output verbose messages during binding compilation:

<plugin>
  <groupId>org.jibx</groupId>
  <artifactId>jibx-maven-plugin</artifactId>
  <version>1.2.5</version>
  <configuration>
    <schemaBindingDirectory>src/main/jibx</schemaBindingDirectory>
    <includeSchemaBindings>
      <includeSchemaBindings>*-binding.xml</includeSchemaBindings>
    </includeSchemaBindings>
    <excludeSchemaBindings>
      <excludeSchemaBinding>template-binding.xml</excludeSchemaBinding>
    </excludeSchemaBindings>
    <verbose>true</verbose>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>bind</goal>
      </goals>
    </execution>
  </executions>
</plugin>