The following examples describe the basic usage of the plugin:
To rasterize all SVGs in src/main/svg to PNGs in target/generated-resources/images, add the following to your pom:
<project>
...
<build>
...
<plugins>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>batik-maven-plugin</artifactId>
<version>1.0-beta-1</version>
</plugin>
...
</plugins>
...
</build>
...
</project>
Then execute the following command to run Batik:
mvn batik:rasterize
To rasterize SVGs as part of the build process, add the following to your pom:
<project>
...
<build>
...
<plugins>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>batik-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<executions>
<execution>
<goals>
<goal>rasterize</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
...
</build>
...
</project>
Batik will then rasterize the SVGs during the generate-resources phase. This can be explicitly invoked using:
mvn generate-resources