Alexander Wels has uploaded a new change for review. Change subject: userportal,webadmin: fix available locale variable ......................................................................
userportal,webadmin: fix available locale variable - The available locale variable was not being set properly in maven, causing the build to fail when selecting all locales. This patch fixes that issues as well as use the variable in webadmin/userportal gwt xml. - Removed hard coded version for maven plugin, now it is being managed by a parent pom. Change-Id: Icc90fdcd05dd460cce4b2084a8e5793b77b5b09b Signed-off-by: Alexander Wels <[email protected]> --- M frontend/webadmin/modules/userportal-gwtp/pom.xml M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/UserPortal.gwt.xml M frontend/webadmin/modules/webadmin/pom.xml M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/WebAdmin.gwt.xml 4 files changed, 102 insertions(+), 16 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/24/30324/1 diff --git a/frontend/webadmin/modules/userportal-gwtp/pom.xml b/frontend/webadmin/modules/userportal-gwtp/pom.xml index eac49bf..7b18185 100644 --- a/frontend/webadmin/modules/userportal-gwtp/pom.xml +++ b/frontend/webadmin/modules/userportal-gwtp/pom.xml @@ -208,15 +208,58 @@ <!-- Have to have this here as this dynamic property doesn't persist between poms so can't move it to parent --> <groupId>com.github.goldin</groupId> <artifactId>properties-maven-plugin</artifactId> - <version>0.2.5</version> - <configuration> - <property> - <name>gwt.availableLocales</name> - <value>{{ def bd=project.basedir; new File(bd + allLocaleFile).withInputStream { def prop = new Properties();prop.load(it);prop.keySet().sort().join(',')} }}</value> - </property> - </configuration> + <executions> + <execution> + <id>set-properties</id> + <phase>validate</phase> + <goals> + <goal>set-properties</goal> + </goals> + <configuration> + <properties> + <property> + <name>gwt.availableLocales</name> + <value>{{ new File("${allLocaleFile}").withInputStream { def prop = new Properties();prop.load(it);prop.keySet().sort().join(',')} }}</value> + </property> + </properties> + </configuration> + </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.--> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId>com.github.goldin</groupId> + <artifactId> + properties-maven-plugin + </artifactId> + <versionRange> + [0.2.5,) + </versionRange> + <goals> + <goal>set-properties</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore></ignore> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> </build> <profiles> <profile> diff --git a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/UserPortal.gwt.xml b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/UserPortal.gwt.xml index 6710e1d..aeb945e 100644 --- a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/UserPortal.gwt.xml +++ b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/UserPortal.gwt.xml @@ -38,7 +38,7 @@ <set-configuration-property name="locale.useragent" value="Y" /> <!-- Supported locales (defined via maven property) --> - <extend-property name="locale" values="en_US,es_ES,fr_FR,ja_JP,pt_BR,zh_CN,de_DE,ko_KR" /> + <extend-property name="locale" values="${gwt.availableLocales}" /> <set-property name="locale" value="${gwt.locale}" /> <set-property-fallback name="locale" value="en_US" /> diff --git a/frontend/webadmin/modules/webadmin/pom.xml b/frontend/webadmin/modules/webadmin/pom.xml index dc22ed6..f500229 100644 --- a/frontend/webadmin/modules/webadmin/pom.xml +++ b/frontend/webadmin/modules/webadmin/pom.xml @@ -158,13 +158,23 @@ <!-- Have to have this here as this dynamic property doesn't persist between poms so can't move it to parent --> <groupId>com.github.goldin</groupId> <artifactId>properties-maven-plugin</artifactId> - <version>0.2.5</version> - <configuration> - <property> - <name>gwt.availableLocales</name> - <value>{{ def bd=project.basedir; new File(bd + allLocaleFile).withInputStream { def prop = new Properties();prop.load(it);prop.keySet().sort().join(',')} }}</value> - </property> - </configuration> + <executions> + <execution> + <id>set-properties</id> + <phase>validate</phase> + <goals> + <goal>set-properties</goal> + </goals> + <configuration> + <properties> + <property> + <name>gwt.availableLocales</name> + <value>{{ new File("${allLocaleFile}").withInputStream { def prop = new Properties();prop.load(it);prop.keySet().sort().join(',')} }}</value> + </property> + </properties> + </configuration> + </execution> + </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -217,6 +227,39 @@ </configuration> </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.--> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId>com.github.goldin</groupId> + <artifactId> + properties-maven-plugin + </artifactId> + <versionRange> + [0.2.5,) + </versionRange> + <goals> + <goal>set-properties</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore></ignore> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> </build> <profiles> <profile> diff --git a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/WebAdmin.gwt.xml b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/WebAdmin.gwt.xml index 2c0e65c..2027693 100644 --- a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/WebAdmin.gwt.xml +++ b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/WebAdmin.gwt.xml @@ -38,7 +38,7 @@ <set-configuration-property name="locale.useragent" value="Y" /> <!-- Supported locales (defined via maven property) --> - <extend-property name="locale" values="en_US,es_ES,fr_FR,ja_JP,pt_BR,zh_CN,de_DE,ko_KR" /> + <extend-property name="locale" values="${gwt.availableLocales}" /> <set-property name="locale" value="${gwt.locale}" /> <set-property-fallback name="locale" value="en_US" /> -- To view, visit http://gerrit.ovirt.org/30324 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc90fdcd05dd460cce4b2084a8e5793b77b5b09b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
