A plugin to integrate gettext tools into a Maven build.
This plugin is for Maven 1.x. A Maven 2.x plugin is available as well.
There are two alternative ways to install the plugin. Choose one:
maven plugin:download -DartifactId=maven-gettext-plugin -DgroupId=xnap-commons -Dversion=1.1
<dependency> <groupId>xnap-commons</groupId> <artifactId>maven-gettext-plugin</artifactId> <version>1.1</version> <type>plugin</type> </dependency>
And add the XNap Commons repository to your project.properties:
maven.repo.remote = http://www.ibiblio.org/maven,http://xnap-commons.sf.net/repository
If you are using the XNap Commons for internationalization (i18n) and if your project is layed out as shown below, the plugin will not require any configuration through properties.
+ po - keys.pot - xy.po + src + java
Invoke the merge
goal to create or update your
key template and po files:
maven gettext:merge
Additionally create a file called maven.xml
in
your project's base directory:
<project> <postGoal name="java:compile"> <attainGoal name="gettext:dist"/> </postGoal> </project>
This will update your Java class or property files from the po files each time the project is compiled.