Wrap gettext plugin inside a new profile i18n to save time while developing

As number of languages is increased, the time used to process them is bigger
every time you do a "mvn clean install". Thanks to this new profile you could
save some timpe passing the following argument "-P-i18n".

FEA: ItEr76S03Community
This commit is contained in:
Manuel Rego Casasnovas 2012-03-14 17:14:15 +01:00
parent a6c90e1348
commit b403dfd719
2 changed files with 78 additions and 59 deletions

View file

@ -12,41 +12,52 @@
<packaging>jar</packaging>
<name>LibrePlan ZK Components Module</name>
<build>
<plugins>
<plugin>
<groupId>org.xnap.commons</groupId>
<artifactId>maven-gettext-plugin</artifactId>
<configuration>
<targetBundle>app.i18n.Messages</targetBundle>
<poDirectory>${project.build.sourceDirectory}/../resources/i18n</poDirectory>
<keywords>-k_</keywords>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>dist</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>default</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
<profiles>
<profile>
<id>i18n</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.xnap.commons</groupId>
<artifactId>maven-gettext-plugin</artifactId>
<configuration>
<targetBundle>app.i18n.Messages</targetBundle>
<poDirectory>${project.build.sourceDirectory}/../resources/i18n</poDirectory>
<keywords>-k_</keywords>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>dist</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>default</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->

View file

@ -162,36 +162,44 @@
</plugins>
</build>
</profile>
<profile>
<id>i18n</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<!--
Gettext Commons plugin
goals:
merge: parses source code and generates keys.pot
dist: generates binary Resoruce Bundle (Messages_XX.class)
-->
<plugins>
<plugin>
<groupId>org.xnap.commons</groupId>
<artifactId>maven-gettext-plugin</artifactId>
<configuration>
<targetBundle>i18n.Messages</targetBundle>
<poDirectory>${project.build.sourceDirectory}/../resources/i18n</poDirectory>
<keywords>-k_</keywords>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>dist</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<finalName>libreplan-webapp</finalName>
<!--
Gettext Commons plugin
goals:
merge: parses source code and generates keys.pot
dist: generates binary Resoruce Bundle (Messages_XX.class)
-->
<plugins>
<plugin>
<groupId>org.xnap.commons</groupId>
<artifactId>maven-gettext-plugin</artifactId>
<configuration>
<targetBundle>i18n.Messages</targetBundle>
<poDirectory>${project.build.sourceDirectory}/../resources/i18n</poDirectory>
<keywords>-k_</keywords>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>dist</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->