As its name implies the Image Metadata Plugin provides methods to access metadata in image files during a Maven build process.
Currently (1.0.0) the plugin only supports writing metadata to images. It is meant primarily to be used with generated or exported imagery, which often lacks metadata such as author name, description, or copyright information. The plugin helps publishing these images by injecting such metadata into the files.
The goal set-simple-metadata injects a minimal set of metadata items into image files, which means:
These items can be specified as default values or as image-specific values. Specific values override default values.
An example with a mixture of default and specific metadata items:
...
<plugin>
<groupId>de.textmulch</groupId>
<artifactId>image-metadata-plugin</artifactId>
<executions>
<execution>
<id>metadata simple</id>
<phase>generate-resources</phase>
<goals>
<goal>set-simple-metadata</goal>
</goals>
<configuration>
<defaultCreator>Mr. Example</defaultCreator>
<defaultCopyrightText>This work is licensed under the Creative Commons ...</defaultCopyrightText>
<defaultCopyrightUrl>http://creativecommons.org/licenses/by/3.0/de/</defaultCopyrightUrl>
<images>
<image>
<file>media/a1.png</file>
<description>A test image with two boxes and an arrow.</description>
<keywords>test, box, arrow</keywords>
</image>
<image>
...
</images>
</configuration>
</execution>
</executions>
</plugin>
...The information in the default... tags is used for every image without a specific equivalent. These default settings are typically used with static information, like the name and copyright license. Settings like descriptions vary almost always.
| Meaning | Default | Specific |
| image file name | n/a | file |
| creator name | defaultCreator | creator |
| description | defaultDescription | description |
| keywords | defaultKeywords | keywords |
| copyright notice | defaultCopyrightText | copyrightText |
| copyright URL | defaultCopyrightUrl | copyrightUrl |
This plugin uses Phil Harvey's ExifTool. Since ExifTool is a Perl library and command-line application, it must be installed separately. The exiftool command-line application must be available in the PATH.
Currently the plugin can process only the image formats supported by ExifTool (mostly bitmap files), see here for a list.