|
MavenRepository
This page explains how to edit your Maven 2 pom.xml file to use the Gettext Commons Maven repository.
Featured Adding the repositoryAdd the following lines to your pom.xml file to include the Gettext Commons repository: <project>
...
<repositories>
...
<repository>
<id>gettext-commons-site</id>
<url>http://gettext-commons.googlecode.com/svn/maven-repository/</url>
</repository>
</repositories>Adding the Gettext Commons libraryAdd the following lines to your pom.xml file to add the Gettext Commons library as a dependency to your project: <project>
...
<dependencies>
...
<dependency>
<groupId>org.xnap.commons</groupId>
<artifactId>gettext-commons</artifactId>
<version>0.9.6</version>
</dependency>
</dependencies>Adding the Maven pluginAdd the following lines to your pom.xml file to make use of the maven gettext plugin for generating messages templates and deploying messages bundles. <project>
...
<pluginRepositories>
<pluginRepository>
<id>gettext-commons-site</id>
<url>http://gettext-commons.googlecode.com/svn/maven-repository/</url>
<releases>
<updatePolicy>daily</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
...
<plugins>
...
<plugin>
<groupId>org.xnap.commons</groupId>
<artifactId>maven-gettext-plugin</artifactId>
<version>1.2.3</version>
<configuration>
<poDirectory>${basedir}/po</poDirectory>
<targetBundle>my.package.Messages</targetBundle>
</configuration>
</plugin>
</plugins>
|
► Sign in to add a comment
I follow these instructions and failed, just like this guy: http://www.mail-archive.com/dhis2-devs@lists.launchpad.net/msg00754.html
And the section "Adding the Maven plugin", maybe have somethings wrong.
I modified my pom.xml like below, and it seems work fine.
<build> ... <plugin> <groupId>org.xnap.commons</groupId> <artifactId>maven-gettext-plugin</artifactId> <version>${gettextPluginVersion}</version> <configuration> <targetBundle>Message</targetBundle> </configuration> </plugin> </plugins> </build>Thanks, zpsigma, I added your changes to the wiki page.
I would really recommend putting this up on Sonatype/Nexus and syncing with Maven central. Having it on separate repo causes all sorts of issues.