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 <aw...@redhat.com>
---
M frontend/webadmin/modules/pom.xml
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
5 files changed, 39 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/65/30465/1

diff --git a/frontend/webadmin/modules/pom.xml 
b/frontend/webadmin/modules/pom.xml
index 175ba14..7e3e3b3 100644
--- a/frontend/webadmin/modules/pom.xml
+++ b/frontend/webadmin/modules/pom.xml
@@ -65,7 +65,9 @@
     <engine.port.http>8080</engine.port.http>
     <!-- GWT CSS obfuscation style. production should be 'obf', use 'pretty' 
in development for easier css debugging -->
     <gwt.cssResourceStyle>obf</gwt.cssResourceStyle>
-    
<allLocaleFile>backend/manager/modules/utils/src/main/resources/languages.properties</allLocaleFile>
+    <!-- I need relative paths here, due to unknown file system, so I need to 
construct the path from the base dir + this path.
+         the base dir is too far into the tree, so I need to back out a bit -->
+    
<allLocaleFile>../../../../backend/manager/modules/utils/src/main/resources/languages.properties</allLocaleFile>
   </properties>
   <dependencyManagement>
     <dependencies>
diff --git a/frontend/webadmin/modules/userportal-gwtp/pom.xml 
b/frontend/webadmin/modules/userportal-gwtp/pom.xml
index 8e33485..7416ceb 100644
--- a/frontend/webadmin/modules/userportal-gwtp/pom.xml
+++ b/frontend/webadmin/modules/userportal-gwtp/pom.xml
@@ -208,13 +208,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("${project.basedir}" + "/" + 
"${allLocaleFile}").withInputStream { def prop = new 
Properties();prop.load(it);prop.keySet().sort().join(',')} }}</value>
+                </property>
+              </properties>
+            </configuration>
+          </execution>
+        </executions>
       </plugin>
     </plugins>
   </build>
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 bb7a7a2..def6ddc 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("${project.basedir}" + "/" + 
"${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>
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/30465
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc90fdcd05dd460cce4b2084a8e5793b77b5b09b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Alexander Wels <aw...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to