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