incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r425235 [1/11] - in /incubator/adffaces/branches/matzew-repackaging-trinidad/plugins: ./ maven-adf-archetype/ maven-adf-archetype/src/main/resources/archetype-resources/ maven-adf-archetype/src/main/resources/archetype-resources/src/main/ja...
Date Tue, 25 Jul 2006 00:24:18 GMT
Author: matzew
Date: Mon Jul 24 17:24:16 2006
New Revision: 425235

URL: http://svn.apache.org/viewvc?rev=425235&view=rev
Log:
set some props...

Modified:
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/pom.xml   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/src/main/resources/archetype-resources/pom.xml   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/src/main/resources/archetype-resources/src/main/java/org/apache/myfaces/adf/blank/HelloWorldBacking.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/pom.xml   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateFaceletsTaglibsMojo.java   (props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/pom.xml   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/uixtools/JSLocaleElementsGenerator.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/uixtools/VersionUtils.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javacc-plugin/pom.xml   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javacc-plugin/src/main/java/org/apache/myfaces/trinidadinternal/view/faces/maven/plugin/javacc/JavaCCMojo.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javacc-plugin/src/test/java/org/apache/myfaces/trinidadinternal/view/faces/maven/plugin/javacc/JavaCCMojoTest.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javacc-plugin/src/test/resources/SelectorParser.jj   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/pom.xml   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascript20parser/JSParser20.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascript20parser/JSParser20Constants.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascript20parser/JSParser20TokenManager.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascript20parser/JSParser20TreeConstants.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascript20parser/JSParser20Visitor.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascript20parser/js2.0.jjt   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascriptcompiler/JavascriptCompilerMain.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/obfuscator/javascript15parser/AnnotationConstants.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/obfuscator/javascript15parser/JSParserTest15.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/obfuscator/javascript15parser/JSParserUtils.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/obfuscator/javascript15parser/NameGen.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/obfuscator/javascript15parser/ProgramContext.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/obfuscator/javascript15parser/ProgramContextStack.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/obfuscator/javascript15parser/Token.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/obfuscator/javascript15parser/js1.5.jj   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/uixtools/Detokenizer.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/uixtools/FileProcessor.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/uixtools/Filter1.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/uixtools/Filter2.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/uixtools/Queue.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/uixtools/Reducer.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/uixtools/Token.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/uixtools/TokenBuffer.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/uixtools/TokenException.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/uixtools/TokenReader.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/uixtools/Tokenizer.java   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-jdev-plugin/pom.xml   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-jdev-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/JDeveloperMojo.java   (props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-tagdoc-plugin/pom.xml   (props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java   (props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-xrts-plugin/pom.xml   (contents, props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-xrts-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/xrts/AbstractGenerateSourcesMojo.java   (props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-xrts-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/xrts/ListRTSWriter.java   (props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-xrts-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/xrts/OrderedDictionary.java   (props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-xrts-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/xrts/RTSWriter.java   (props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-xrts-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/xrts/UnicodeEscapes.java   (props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-xrts-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/xrts/XRTSGenerator.java   (props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-xrts-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/xrts/XRTSParser.java   (props changed)
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/pom.xml   (contents, props changed)

Modified: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/pom.xml?rev=425235&r1=425234&r2=425235&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/pom.xml (original)
+++ incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/pom.xml Mon Jul 24 17:24:16 2006
@@ -1,34 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Copyright 2002-2005 The Apache Software Foundation.
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- 
--->
-<project> 
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.myfaces.adfbuild</groupId>
-    <artifactId>maven-plugin-parent</artifactId> 
-    <version>incubator-alpha-1-SNAPSHOT</version>
-  </parent>
-
-  <groupId>org.apache.myfaces.adfbuild</groupId>
-  <artifactId>maven-adf-archetype</artifactId>
-  <version>1.0-SNAPSHOT</version>
-  <packaging>maven-plugin</packaging>
-  <name>ADF Archetype</name>
-  <description>Archetype to ease the burden of creating a new application based with ADF</description>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ *    Licensed under the Apache License, Version 2.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ 
+-->
+<project> 
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.myfaces.adfbuild</groupId>
+    <artifactId>maven-plugin-parent</artifactId> 
+    <version>incubator-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.myfaces.adfbuild</groupId>
+  <artifactId>maven-adf-archetype</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+  <name>ADF Archetype</name>
+  <description>Archetype to ease the burden of creating a new application based with ADF</description>
+
 </project>

Propchange: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/src/main/resources/archetype-resources/pom.xml?rev=425235&r1=425234&r2=425235&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/src/main/resources/archetype-resources/pom.xml (original)
+++ incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/src/main/resources/archetype-resources/pom.xml Mon Jul 24 17:24:16 2006
@@ -1,128 +1,128 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>${groupId}</groupId>
-  <artifactId>${artifactId}</artifactId>
-  <packaging>war</packaging>
-  <version>${version}</version>
-  <name>A custom project using myfaces</name>
-  <url>http://www.myorganization.org</url>
-
-  <build>
-    <finalName>${artifactId}</finalName>
-  </build>
-
-  <!-- Profile to run jetty, so the tomcat jars are included in the bundle. They are not included by default -->
-  <profiles>
-    <profile>
-      <id>jettyConfig</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.mortbay.jetty</groupId>
-            <artifactId>maven-jetty6-plugin</artifactId>
-            <configuration>
-              <scanIntervalSeconds>10</scanIntervalSeconds>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-
-      <dependencies>
-        <dependency>
-          <groupId>javax.servlet</groupId>
-          <artifactId>jsp-api</artifactId>
-          <version>2.0</version>
-          <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-          <groupId>tomcat</groupId>
-          <artifactId>jasper-compiler</artifactId>
-          <version>5.5.9</version>
-          <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-          <groupId>tomcat</groupId>
-          <artifactId>jasper-runtime</artifactId>
-          <version>5.5.9</version>
-          <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-          <groupId>tomcat</groupId>
-          <artifactId>jasper-compiler-jdt</artifactId>
-          <version>5.5.9</version>
-          <scope>compile</scope>
-        </dependency>
-      </dependencies>
-
-      <pluginRepositories>
-      <!-- Repository to get the jetty plugin -->
-        <pluginRepository>
-          <id>mortbay-repo</id>
-          <name>mortbay-repo</name>
-          <url>http://www.mortbay.org/maven2/snapshot</url>
-        </pluginRepository>
-      </pluginRepositories>
-
-    </profile>
-  </profiles>
-
-  <repositories>
-    <repository>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-      <id>apache-maven-snapshots</id>
-      <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
-    </repository>
-  </repositories>
-
-  <!-- Project dependencies -->
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.myfaces.core</groupId>
-      <artifactId>myfaces-api</artifactId>
-      <version>1.1.5-SNAPSHOT</version>
-      <scope>compile</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.myfaces.core</groupId>
-      <artifactId>myfaces-impl</artifactId>
-      <version>1.1.5-SNAPSHOT</version>
-      <scope>compile</scope>
-    </dependency>
-
-    <!-- adf -->
-    <dependency>
-      <groupId>org.apache.myfaces.adf</groupId>
-      <artifactId>adf-faces-api</artifactId>
-      <version>incubator-m1-SNAPSHOT</version>
-      <scope>compile</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.myfaces.adf</groupId>
-      <artifactId>adf-faces-impl</artifactId>
-      <version>incubator-m1-SNAPSHOT</version>
-      <scope>compile</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.0</version>
-      <scope>test</scope>
-    </dependency>
-
-  </dependencies>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <packaging>war</packaging>
+  <version>${version}</version>
+  <name>A custom project using myfaces</name>
+  <url>http://www.myorganization.org</url>
+
+  <build>
+    <finalName>${artifactId}</finalName>
+  </build>
+
+  <!-- Profile to run jetty, so the tomcat jars are included in the bundle. They are not included by default -->
+  <profiles>
+    <profile>
+      <id>jettyConfig</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>maven-jetty6-plugin</artifactId>
+            <configuration>
+              <scanIntervalSeconds>10</scanIntervalSeconds>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+
+      <dependencies>
+        <dependency>
+          <groupId>javax.servlet</groupId>
+          <artifactId>jsp-api</artifactId>
+          <version>2.0</version>
+          <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>tomcat</groupId>
+          <artifactId>jasper-compiler</artifactId>
+          <version>5.5.9</version>
+          <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>tomcat</groupId>
+          <artifactId>jasper-runtime</artifactId>
+          <version>5.5.9</version>
+          <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>tomcat</groupId>
+          <artifactId>jasper-compiler-jdt</artifactId>
+          <version>5.5.9</version>
+          <scope>compile</scope>
+        </dependency>
+      </dependencies>
+
+      <pluginRepositories>
+      <!-- Repository to get the jetty plugin -->
+        <pluginRepository>
+          <id>mortbay-repo</id>
+          <name>mortbay-repo</name>
+          <url>http://www.mortbay.org/maven2/snapshot</url>
+        </pluginRepository>
+      </pluginRepositories>
+
+    </profile>
+  </profiles>
+
+  <repositories>
+    <repository>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+      <id>apache-maven-snapshots</id>
+      <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+    </repository>
+  </repositories>
+
+  <!-- Project dependencies -->
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.myfaces.core</groupId>
+      <artifactId>myfaces-api</artifactId>
+      <version>1.1.5-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.myfaces.core</groupId>
+      <artifactId>myfaces-impl</artifactId>
+      <version>1.1.5-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <!-- adf -->
+    <dependency>
+      <groupId>org.apache.myfaces.adf</groupId>
+      <artifactId>adf-faces-api</artifactId>
+      <version>incubator-m1-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.myfaces.adf</groupId>
+      <artifactId>adf-faces-impl</artifactId>
+      <version>incubator-m1-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.0</version>
+      <scope>test</scope>
+    </dependency>
+
+  </dependencies>
 </project>

Propchange: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/src/main/resources/archetype-resources/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/src/main/resources/archetype-resources/src/main/java/org/apache/myfaces/adf/blank/HelloWorldBacking.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/src/main/resources/archetype-resources/src/main/java/org/apache/myfaces/adf/blank/HelloWorldBacking.java?rev=425235&r1=425234&r2=425235&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/src/main/resources/archetype-resources/src/main/java/org/apache/myfaces/adf/blank/HelloWorldBacking.java (original)
+++ incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/src/main/resources/archetype-resources/src/main/java/org/apache/myfaces/adf/blank/HelloWorldBacking.java Mon Jul 24 17:24:16 2006
@@ -1,65 +1,65 @@
-/*
- * Copyright 2006 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.myfaces.adf.blank;
-
-import javax.faces.context.FacesContext;
-
-import org.apache.myfaces.adf.render.ExtendedRenderKitService;
-import org.apache.myfaces.adf.util.Service;
-
-/**
- * A typical simple backing bean, that is backed to <code>helloworld.jsp</code>
- * 
- * @author <a href="mailto:matzew@apache.org">Matthias We├čendorf</a> 
- */
-public class HelloWorldBacking
-{
-
-  //properties
-  private String _name;
-
-  /**
-   * default empty constructor
-   */
-  public HelloWorldBacking()
-  {   
-  }
-
-  //-------------------getter & setter
-  public String getName()
-  {
-    return _name;
-  }
-
-  public void setName(String name)
-  {
-    this._name = name;
-  }
-
-  /**
-   * Method that is backed to a submit button of a form.
-   */
-  public String send()
-  {
-    FacesContext facesContext = FacesContext.getCurrentInstance();
-    ExtendedRenderKitService service = (ExtendedRenderKitService)
-      Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
-    service.addScript(facesContext, "alert('Script added by ExtendedRenderKitService')");
-
-    //do real logic
-    return ("success");
-  }
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.adf.blank;
+
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.adf.render.ExtendedRenderKitService;
+import org.apache.myfaces.adf.util.Service;
+
+/**
+ * A typical simple backing bean, that is backed to <code>helloworld.jsp</code>
+ * 
+ * @author <a href="mailto:matzew@apache.org">Matthias We├čendorf</a> 
+ */
+public class HelloWorldBacking
+{
+
+  //properties
+  private String _name;
+
+  /**
+   * default empty constructor
+   */
+  public HelloWorldBacking()
+  {   
+  }
+
+  //-------------------getter & setter
+  public String getName()
+  {
+    return _name;
+  }
+
+  public void setName(String name)
+  {
+    this._name = name;
+  }
+
+  /**
+   * Method that is backed to a submit button of a form.
+   */
+  public String send()
+  {
+    FacesContext facesContext = FacesContext.getCurrentInstance();
+    ExtendedRenderKitService service = (ExtendedRenderKitService)
+      Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
+    service.addScript(facesContext, "alert('Script added by ExtendedRenderKitService')");
+
+    //do real logic
+    return ("success");
+  }
 }

Propchange: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-adf-archetype/src/main/resources/archetype-resources/src/main/java/org/apache/myfaces/adf/blank/HelloWorldBacking.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/pom.xml?rev=425235&r1=425234&r2=425235&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/pom.xml (original)
+++ incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/pom.xml Mon Jul 24 17:24:16 2006
@@ -1,70 +1,70 @@
-<project> 
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.myfaces.trinidadbuild</groupId>
-    <artifactId>maven-plugin-parent</artifactId> 
-    <version>incubator-alpha-1-SNAPSHOT</version>
-  </parent>
-
-  <groupId>org.apache.myfaces.trinidadbuild</groupId>
-  <artifactId>maven-faces-plugin</artifactId> 
-  <version>incubator-alpha-9-SNAPSHOT</version>
-  <packaging>maven-plugin</packaging>
-  <name>Maven Faces Plugin</name>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <inherited>true</inherited>
-        <configuration>
-          <source>1.4</source>
-          <target>1.4</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
-      <version>2.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-project</artifactId>
-      <version>2.0</version>
-    </dependency>
-    <dependency>
-      <groupId>commons-digester</groupId>
-      <artifactId>commons-digester</artifactId>
-      <version>1.7</version>
-    </dependency>
-    <dependency>
-      <groupId>saxon</groupId>
-      <artifactId>saxon</artifactId>
-      <version>6.5.3</version>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>xerces</groupId>
-      <artifactId>xercesImpl</artifactId>
-      <version>2.6.2</version>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>stax</groupId>
-      <artifactId>stax-api</artifactId>
-      <version>1.0.1</version>
-    </dependency>
-    <dependency>
-      <groupId>stax</groupId>
-      <artifactId>stax</artifactId>
-      <version>1.2.0_rc2-dev</version>
-    </dependency>
-  </dependencies>
-
-</project>
+<project> 
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.myfaces.trinidadbuild</groupId>
+    <artifactId>maven-plugin-parent</artifactId> 
+    <version>incubator-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.myfaces.trinidadbuild</groupId>
+  <artifactId>maven-faces-plugin</artifactId> 
+  <version>incubator-alpha-9-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+  <name>Maven Faces Plugin</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <inherited>true</inherited>
+        <configuration>
+          <source>1.4</source>
+          <target>1.4</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-digester</groupId>
+      <artifactId>commons-digester</artifactId>
+      <version>1.7</version>
+    </dependency>
+    <dependency>
+      <groupId>saxon</groupId>
+      <artifactId>saxon</artifactId>
+      <version>6.5.3</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>xerces</groupId>
+      <artifactId>xercesImpl</artifactId>
+      <version>2.6.2</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>stax</groupId>
+      <artifactId>stax-api</artifactId>
+      <version>1.0.1</version>
+    </dependency>
+    <dependency>
+      <groupId>stax</groupId>
+      <artifactId>stax</artifactId>
+      <version>1.2.0_rc2-dev</version>
+    </dependency>
+  </dependencies>
+
+</project>

Propchange: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateFaceletsTaglibsMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/pom.xml?rev=425235&r1=425234&r2=425235&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/pom.xml (original)
+++ incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/pom.xml Mon Jul 24 17:24:16 2006
@@ -1,43 +1,43 @@
-<project> 
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.myfaces.trinidadbuild</groupId>
-    <artifactId>maven-plugin-parent</artifactId> 
-    <version>incubator-alpha-1-SNAPSHOT</version>
-  </parent>
-
-  <groupId>org.apache.myfaces.trinidadbuild</groupId>
-  <artifactId>maven-i18n-plugin</artifactId> 
-  <version>incubator-alpha-2-SNAPSHOT</version>
-  <packaging>maven-plugin</packaging>
-  <name>Maven i18n Plugin</name>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <inherited>true</inherited>
-        <configuration>
-          <source>1.4</source>
-          <target>1.4</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
-      <version>2.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-project</artifactId>
-      <version>2.0</version>
-    </dependency>
-  </dependencies>
-
-</project>
+<project> 
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.myfaces.trinidadbuild</groupId>
+    <artifactId>maven-plugin-parent</artifactId> 
+    <version>incubator-alpha-1-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.myfaces.trinidadbuild</groupId>
+  <artifactId>maven-i18n-plugin</artifactId> 
+  <version>incubator-alpha-2-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+  <name>Maven i18n Plugin</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <inherited>true</inherited>
+        <configuration>
+          <source>1.4</source>
+          <target>1.4</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>2.0</version>
+    </dependency>
+  </dependencies>
+
+</project>

Propchange: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/uixtools/JSLocaleElementsGenerator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/uixtools/JSLocaleElementsGenerator.java?rev=425235&r1=425234&r2=425235&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/uixtools/JSLocaleElementsGenerator.java (original)
+++ incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/uixtools/JSLocaleElementsGenerator.java Mon Jul 24 17:24:16 2006
@@ -1,863 +1,863 @@
-/*
- * Copyright 2000-2004,2006 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.myfaces.trinidadbuild.plugin.i18n.uixtools;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.Writer;
-
-import java.lang.reflect.Method;
-
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Generates JavaScript libraries containing the Locale information from
- * Java.
- * @version $Name:  $ ($Revision: 1.3 $) $Date: 2004/03/25 22:36:42 $
- * @author Blake Sullivan
- * @author Bud Osterberg
- */
-public class JSLocaleElementsGenerator
-{
-  public static void main(
-    String[] args
-    )
-  {
-
-    if ((args.length == 1) && ("?".equals(args[0])))
-    {
-      System.out.println("Generates JavaScript Locale information files");
-      System.out.println("for the Locales available in the JVM.");
-      System.out.println("These files are used by the Cabo HTML client");
-      System.out.println("logic to handle date formatting and validation.");
-      System.out.println();
-      System.out.println("Parameters:");
-      System.out.println("\tprettyPrint=false\tTurns off pretty printed output");
-      System.out.println("\toutDir=[path]\t\tDirectory path to write JavaScript files to");
-      System.out.println("\tsourceDir=[path]\t\tRoot directory path to write Java source to");
-      System.out.println("\tbundleOutDir=[path]\t\tRoot directory path to write Java ResourceBundles to (defaults to sourceDir).");
-      System.out.println("\tvariant=[variant name]\t\tIf supplied utility will generate ResourceBundles for this variant, and nothing else.");
-      System.out.println("\tverbose=true\t\tTurns on verbose output");
-      System.out.println("\tgenerateBundleBaseOnly=true\t\tGenerates the base LocaleElement.java file only");
-      System.exit(0);
-    }
-
-    // whether the output should be pretty printed for legibility
-    boolean prettyPrint = getArgBooleanValue(args, "prettyPrint", true);
-
-    // whether verbose ouput should be generated.
-    boolean verbose = getArgBooleanValue(args, "verbose", false);
-
-    boolean writeSource = getArgBooleanValue(args, "writeSource", true);
-    boolean writeJavascript = getArgBooleanValue(args, "writeJavascript", true);
-
-    // whether only the Base LocaleElements.java file should be created.
-    // this is based on the Locale.US
-    boolean generateBundleBaseOnly = getArgBooleanValue(args,"generateBundleBaseOnly",false);
-
-    // the output directory
-    String outDir = getArgStringValue(args, "outDir", null);
-
-    if (outDir == null)
-    {
-      outDir = System.getProperty("user.dir") +
-               File.separator +
-               _DEFAULT_LOCATION_PATH;
-    }
-
-    if (!outDir.endsWith(File.separator))
-    {
-      outDir = outDir + File.separator;
-    }
-
-
-    // the requested variant
-    String variant = getArgStringValue(args, "variant", null);
-    boolean writeAll = true;
-    if (variant != null)
-    {
-      writeAll = false;
-      variant = variant.toUpperCase();
-    }
-
-    // the source directory
-    String sourceDir = getArgStringValue(args, "sourceDir", null);
-
-    if (sourceDir == null)
-    {
-      sourceDir = System.getProperty("user.dir");
-    }
-
-    String bundleOutDir = getArgStringValue(args, "bundleOutDir", null);
-
-    if (bundleOutDir == null)
-      bundleOutDir = sourceDir;
-
-    // The bundle output dir is the base of the heirarchy, we'll actually put
-    // the files into the appropriate sub directory for the package.
-    String fullBundleOutDir = (bundleOutDir
-                               + (bundleOutDir.endsWith(File.separator)
-                                  ? ""
-                                  : File.separator)
-                              + _DEFAULT_BUNDLE_LOCATION_PATH);
-
-    String version = getArgStringValue(args, "version", null);
-    version = VersionUtils.normalizeVersionSuffix(version);
-
-    if (verbose)
-    {
-      System.out.println("Writing files to: " + outDir);
-      if (writeAll)
-      {
-        System.out.println("Writing source to: " + sourceDir);
-      }
-      System.out.println("Writing bundles to: " + fullBundleOutDir);
-    }
-
-    try
-    {
-      File localeListFile = null;
-
-      if (writeSource)
-        (new File(fullBundleOutDir)).mkdirs();
-
-      if (writeJavascript)
-        (new File(outDir)).mkdirs();
-
-      if (writeAll && writeSource && !generateBundleBaseOnly)
-      {
-        localeListFile = new File(sourceDir, _LOCALE_LIST_PATH);
-        localeListFile.getParentFile().mkdirs();
-        localeListFile.createNewFile();
-      }
-
-      Locale[] locales = null;
-
-      if (generateBundleBaseOnly)
-      {
-         locales = new Locale[1];
-         locales[0] = Locale.US;
-      }
-      else
-      {
-        locales = Locale.getAvailableLocales();
-      }
-
-      //
-      // loop through the available Locales, writing their contents out
-      // as JavaScript libraries and/or ResourceBundles
-      //
-      for (int i = 0; i < locales.length; i++)
-      {
-        // write the JavaSCript library for this locale
-        _generateJSLocaleElements(outDir, fullBundleOutDir, locales[i],
-                                  variant, prettyPrint, verbose,
-                                  writeJavascript, writeSource, generateBundleBaseOnly, version);
-      }
-
-      // And write out a listing of all the locales, but  not when we want to
-      // just generate the base Resource file.
-      if (writeAll && writeSource && !generateBundleBaseOnly)
-      {
-        Writer sourceWriter = new FileWriter(localeListFile);
-        sourceWriter.write(_LOCALE_LIST_CODE_START);
-
-        for (int i = 0; i < locales.length; i++)
-        {
-          sourceWriter.write("    new Locale(\"");
-          sourceWriter.write(locales[i].getLanguage());
-          sourceWriter.write("\",\"");
-          sourceWriter.write(locales[i].getCountry());
-          sourceWriter.write("\",\"");
-          sourceWriter.write(locales[i].getVariant());
-          sourceWriter.write("\"),\n");
-        }
-        sourceWriter.write(_LOCALE_LIST_CODE_END);
-        sourceWriter.close();
-      }
-    }
-    catch (IOException e)
-    {
-      System.err.println(e);
-      e.printStackTrace();
-    }
-
-    if (verbose)
-    {
-      System.out.println("Done writing files");
-    }
-  }
-
-  private static String getArgStringValue(
-    String[] args,
-    String   argName,
-    String   defaultValue
-    )
-  {
-    int argLength = argName.length();
-
-    for (int i = 0; i < args.length; i++)
-    {
-      String currArg = args[i];
-
-      if (currArg.startsWith(argName))
-      {
-        if (!currArg.equals(argName) &&
-            ('=' == currArg.charAt(argLength)))
-        {
-          return currArg.substring(argLength + 1);
-        }
-      }
-    }
-
-    return defaultValue;
-  }
-
-  private static boolean getArgBooleanValue(
-    String[] args,
-    String   argName,
-    boolean  defaultValue
-    )
-  {
-    //
-    // check for = true or = false
-    //
-    String argValue = getArgStringValue(args, argName, null);
-
-    if (argValue != null)
-    {
-      // check for = self
-      if (argName.equals(argValue))
-      {
-        return true;
-      }
-      else
-      {
-        return Boolean.valueOf(argValue).booleanValue();
-      }
-    }
-
-    //
-    // check for the name by itself
-    //
-    for (int i = 0; i < args.length; i++)
-    {
-      if (args[i].equals(argName))
-      {
-        return true;
-      }
-    }
-
-    //
-    // check for the name turned off
-    //
-    String notName = "-" + argName;
-
-    for (int i = 0; i < args.length; i++)
-    {
-      if (args[i].equals(notName))
-      {
-        return false;
-      }
-    }
-
-    return defaultValue;
-  }
-
-  private static void _generateJSLocaleElements(
-    String  outDir,
-    String  bundleOutDir,
-    Locale  targetLocale,
-    String  variant,
-    boolean prettyPrint,
-    boolean verbose,
-    boolean writeJavascript,
-    boolean writeSource,
-    boolean generateBundleBaseOnly,
-    String version
-    ) throws IOException
-  {
-    String fileName;
-    PrintWriter localeWriter;
-
-    if (variant == null && writeJavascript)
-    {
-      fileName = _getFileName(targetLocale, version, generateBundleBaseOnly) + _JAVASCRIPT_EXTENSION;
-
-      if (verbose)
-      {
-        System.out.println("Writing " + fileName);
-      }
-
-      // create the file to write to
-      localeWriter = new PrintWriter
-        (new BufferedWriter(new FileWriter(outDir + fileName),
-                            _DEFAULT_BUFFER_SIZE));
-      _writeLocale(localeWriter, targetLocale, prettyPrint);
-      localeWriter.close();
-    }
-  }
-
-  private static void _writeJavaBundle(
-    Writer      output,
-    Locale      targetLocale,
-    String      fileName
-    ) throws IOException
-  {
-    output.write(_LOCALE_JAVA_CODE_START);
-    output.write("public class "
-                 + fileName
-                 + " extends ListResourceBundle\n{\n"
-                 + "  public Object[][] getContents()\n  {\n"
-                 + "    return contents;\n  }\n\n");
-    try
-    {
-      ResourceBundle elementsData =
-        ResourceBundle.getBundle(_LOCALE_ELEMENTS_PATH, targetLocale);
-
-      boolean doneOne = false;
-
-      for (int i = 0; i < LOCALE_ELEMENTS_GET_KEYS.length; i ++)
-      {
-        String currKey = LOCALE_ELEMENTS_GET_KEYS[i];
-
-        Object data = _getElementData(currKey, elementsData, targetLocale);
-        _writeJavaBundleElement(output, currKey, data, doneOne);
-        doneOne = true;
-      }
-      doneOne = false;
-      output.write("  static final Object[][] contents = \n  {\n");
-      for (int i = 0; i < LOCALE_ELEMENTS_GET_KEYS.length; i ++)
-      {
-        String currKey = LOCALE_ELEMENTS_GET_KEYS[i];
-        output.write((doneOne ? ",\n" : "")
-                     + "    { \""
-                     + currKey
-                     + "\", "
-                     + _getKeyArrayName(currKey)
-                     + "}");
-        doneOne = true;
-      }
-      output.write("\n  };");
-    }
-    catch (MissingResourceException e)
-    {
-      // make sure that the class will, at least, compile even if incomplete.
-      output.write("  // Bundle generation error:\n  // " + e);
-      output.write("\n  static final Object[][] contents = null;");
-      System.err.println(e);
-    }
-    output.write("\n}\n");
-  }
-
-  private static void _writeLocale(
-    Writer      output,
-    Locale      targetLocale,
-    boolean     prettyPrint
-    ) throws IOException
-  {
-
-    output.write("var LocaleSymbols_");
-    output.write(targetLocale.toString());
-    output.write(" = new LocaleSymbols({");
-
-    if (prettyPrint)
-      output.write('\n');
-
-    Enumeration zoneEnumeration =
-                               new ArrayEnumeration(DATE_FORMAT_ZONE_GET_KEYS);
-
-    // write the locale elements into the file
-    _writeResourceContents(output,
-                           _LOCALE_ELEMENTS_PATH,
-                           new ArrayEnumeration(LOCALE_ELEMENTS_GET_KEYS),
-                           targetLocale,
-                           zoneEnumeration.hasMoreElements(),
-                           prettyPrint);
-
-    // write the date format elements into the file
-    _writeResourceContents(output,
-                           _DATE_FORMAT_ZONE_PATH,
-                           zoneEnumeration,
-                           targetLocale,
-                           false,  // this is the last resource to write
-                           prettyPrint);
-
-    output.write("});");
-
-    if (prettyPrint)
-      output.write('\n');
-  }
-
-
-  private static void _writeResourceContents(
-    Writer      output,
-    String      baseName,
-    Enumeration keys,
-    Locale      targetLocale,
-    boolean     hasMoreResources,
-    boolean     prettyPrint
-    ) throws IOException
-  {
-    try
-    {
-      ResourceBundle elementsData = ResourceBundle.getBundle(baseName,
-                                                             targetLocale);
-
-      while(keys.hasMoreElements())
-      {
-        String currKey = (String)keys.nextElement();
-
-        Object data = _getElementData(currKey, elementsData, targetLocale);
-        boolean wroteElement = _writeResourceElement(
-                                    output,
-                                    currKey,
-                                    data,
-                                    hasMoreResources || keys.hasMoreElements(),
-                                    prettyPrint);
-
-        if (wroteElement && prettyPrint)
-        {
-          output.write('\n');
-        }
-      }
-    }
-    catch (MissingResourceException e)
-    {
-      System.err.println(e);
-    }
-  }
-
-  private static Object _getElementData(
-    String currKey,
-    ResourceBundle elementsData,
-    Locale targetLocale
-   )
-  {
-    return elementsData.getObject(currKey);
-  }
-
-  private static boolean _writeResourceElement(
-    Writer  output,
-    String  key,
-    Object  value,
-    boolean notLast,
-    boolean prettyPrint
-    ) throws IOException
-  {
-    if (key != null)
-    {
-      // start writing element, using key as the property name
-      output.write(key);
-      output.write(':');
-    }
-
-    Object[] values = null;
-    int valueCount = 0;
-
-    if (value instanceof Object[])
-    {
-      values = (Object[])value;
-
-      valueCount = values.length;
-
-      if (valueCount == 0)
-      {
-        value = "";
-      }
-    }
-
-    if (valueCount != 0)
-    {
-      // output.write("new Array(");
-      output.write('[');
-
-      for (int i = 0; i < valueCount; i++)
-      {
-        _writeResourceElement(output,
-                              null,
-                              values[i],
-                              i < valueCount - 1,
-                              prettyPrint);
-      }
-
-      //output.write(')');
-      output.write(']');
-    }
-    else
-    {
-      output.write('\"');
-      _writeEscapedString(output, value.toString(), false);
-      output.write('\"');
-    }
-
-    if (notLast)
-    {
-      output.write(',');
-
-      if (prettyPrint)
-      {
-        output.write(' ');
-      }
-    }
-
-    // we wrote some ouput
-    return true;
-  }
-
-  private static void _writeJavaBundleElement(
-    Writer  output,
-    String  key,
-    Object  value,
-    boolean wasPrevious
-    ) throws IOException
-  {
-    output.write("  private static final String "
-                 + _getKeyArrayName(key)
-                 + "[]");
-    Object[] values = null;
-    int valueCount = 0;
-    boolean doneOne = false;
-
-    if (value instanceof Object[])
-    {
-      values = (Object[]) value;
-
-      valueCount = values.length;
-
-      if (valueCount <= 0)
-      {
-        values = _EMPTY_VALUES;
-        valueCount = 1;
-      }
-    }
-
-    if (valueCount > 0)
-    {
-      output.write(" = \n  {\n");
-      for (int i = 0; i < valueCount; i++)
-      {
-        output.write((doneOne ? ", \n" : "") + "    \"");
-        _writeEscapedString(output, values[i].toString(), true);
-        output.write("\"");
-        doneOne = true;
-      }
-      output.write("\n  };\n\n");
-    }
-    else
-      output.write(" = null");
-  }
-
-  private static void _writeEscapedString(
-    Writer output,
-    String value,
-    boolean isJava
-    ) throws IOException
-  {
-    int length = value.length();
-
-    for (int i = 0; i < length; i++)
-    {
-      char currChar = value.charAt(i);
-
-      if (currChar > 255)
-      {
-        output.write("\\u");
-        output.write(_getHexString(currChar, 4));
-      }
-      else
-      {
-        if (isJava)
-        {
-          if ((currChar > 31)
-              && (currChar < 128))
-          {
-            if (currChar == '\"')
-              output.write("\\\"");
-            else
-              output.write(currChar);
-          }
-          else
-          {
-            output.write("\\u");
-            output.write(_getHexString(currChar, 4));
-          }
-        }
-        else
-        {
-          // write ascii printable characters, except for the double quote,
-          // which needs to be escaped because we are already in a String.
-          if ((currChar > 31)    &&
-              (currChar < 128)   &&
-              (currChar != '\"') &&
-              (currChar != '\''))
-          {
-            output.write(currChar);
-          }
-          else
-          {
-            output.write("\\x");
-            output.write(_getHexString(currChar, 2));
-          }
-        }
-      }
-    }
-  }
-
-
-  private static String _getHexString(
-    int number,
-    int minDigits
-    )
-  {
-    String hexString = Integer.toHexString(number);
-
-    int hexLength = hexString.length();
-
-    int zeroPadding = minDigits - hexLength;
-
-    if (zeroPadding > 0)
-    {
-      String paddedString = "0";
-
-      while (zeroPadding > 1)
-      {
-        paddedString += "0";
-        zeroPadding--;
-      }
-
-      hexString = paddedString + hexString;
-    }
-    else
-    {
-      if (zeroPadding < 0)
-      {
-        throw new IllegalArgumentException();
-      }
-    }
-
-    return hexString;
-  }
-
-  private static String _getKeyArrayName(String key)
-  {
-    return "_array" + key;
-  }
-
-  private static String _getFileName(
-    Locale locale,
-    String version,
-    boolean generateBundleBaseOnly
-    )
-  {
-
-    if (generateBundleBaseOnly)
-    {
-      return "LocaleElements";
-    }
-
-    if (version == null)
-      return "LocaleElements_" + locale;
-    return "LocaleElements_" + locale + version;
-  }
-
-  private static String _getLocaleSuffix(
-    Locale locale
-    )
-  {
-    String localeString =  locale.toString();
-
-    return localeString.substring(localeString.indexOf('_'));
-  }
-
-  //
-  // Array of DateFormatZoneData key names to retrieve.
-  // Only keys from this list are used to generate locale information
-  //
-  private static final String[] LOCALE_ELEMENTS_GET_KEYS = new String[]
-  {
-    "MonthNames",
-    "MonthAbbreviations",
-    "DayNames",
-    "DayAbbreviations",
-    "AmPmMarkers",
-    "Eras",
-    "DateTimePatterns",
-    "DateTimeElements",
-    "NumberElements",
-  };
-
-  //
-  // Array of DateFormatZoneData key names to retrieve.
-  // Only keys from this list are used to generate locale information
-  //
-  private static final String[] LOCALE_ELEMENTS_MAPPINGS = new String[]
-  {
-    "MonthNames", "getMonths",
-    "MonthAbbreviations", "getShortMonths",
-    "DayNames", "getWeekdays",
-    "DayAbbreviations", "getShortWeekdays",
-    "AmPmMarkers", "getAmPmStrings",
-    "Eras", "getEras",
-    "DateTimePatterns", null,
-    "DateTimeElements", null,
-    "NumberElements", null
-  };
-
-  //
-  // Array of LocaleElements key names to retrieve.
-  // Only keys from this list are used to generate locale information
-  //
-  private static final String[] DATE_FORMAT_ZONE_GET_KEYS= new String[]
-  {
-    // none currently
-  };
-
-  // J2SE 1.3:
-  // private static String _RESOURCES_PACKAGE = "java.text.resources";
-
-  // J2SE 1.4:
-  private static String _RESOURCES_PACKAGE = "sun.text.resources";
-
-  private static final String _DATE_FORMAT_ZONE_PATH =
-                          _RESOURCES_PACKAGE + ".DateFormatZoneData";
-
-  private static final String _LOCALE_ELEMENTS_PATH =
-                          _RESOURCES_PACKAGE + ".LocaleElements";
-
-  private static final String _DEFAULT_LOCATION_PATH =
-          "org\\apache\\myfaces\\adfinternal\\ui\\jsLibs\\resources\\".replace('\\',
-                                                          File.separatorChar);
-
-  // Mimicking to be in api path. In the adf-faces impl side we have
-  // the following directory structure. There is identical directory sturcture
-  // in adf-faces api side.
-  // Only _ADF_LOCALE_ELEMENT base file will be added to the api side,
-  // while all the variants will be in impl side in the directory structure
-  // defined below.
-  private static final String _ADF_LOCALE_ELEMENTS_PACKAGE =
-    "org.apache.myfaces.adf.resource";
-
-  public static final String _DEFAULT_BUNDLE_LOCATION_PATH =
-    (_ADF_LOCALE_ELEMENTS_PACKAGE.replace('.', File.separatorChar)
-     + File.separatorChar);
-
-  private static final String _ADF_LOCALE_ELEMENTS_PATH =
-    _ADF_LOCALE_ELEMENTS_PACKAGE + ".LocaleElements";
-
-  // buffer size of the BufferedWriter to which output is written
-  private static final int _DEFAULT_BUFFER_SIZE = 1 << 14;
-
-  private static final String _LOCALE_LIST_PATH =
-          "org\\apache\\myfaces\\adfinternal\\ui\\laf\\base\\xhtml\\LocaleList.java".replace('\\',
-                                                          File.separatorChar);
-
-  private static final String _EMPTY_VALUES[] = { "" };
-
-  private static final String _LOCALE_LIST_CODE_START =
-"/*\n" +
-"**\n" +
-"**34567890123456789012345678901234567890123456789012345678901234567890123456789\n" +
-"*/\n" +
-"package org.apache.myfaces.adfinternal.ui.laf.base.xhtml;\n" +
-"\n" +
-"import java.util.Locale;\n" +
-"\n" +
-"import java.util.HashMap;\n" +
-"\n" +
-"/**\n" +
-" * List of supported locales.  Automatically generated - do not modify!\n" +
-" * @author Adam Winer\n" +
-" */\n" +
-"public class LocaleList\n" +
-"{\n" +
-"  /**\n" +
-"   * Returns the list of supported locales.\n" +
-"   */\n" +
-"  static public HashMap getSupportedLocales()\n" +
-"  {\n" +
-"    return _sLocaleMapper;\n" +
-"  }\n" +
-"  \n" +
-"  private LocaleList()\n" +
-"  {\n" +
-"  }\n" +
-"\n" +
-"  static private final Locale[] _sLocales = new Locale[]\n" +
-"  {\n";
-
-
-  private static final String _LOCALE_LIST_CODE_END =
-"  };\n" +
-"\n" +
-"  static private HashMap _sLocaleMapper;\n" +
-"\n" +
-"  static\n" +
-"  {\n" +
-"    _sLocaleMapper = new HashMap();\n" +
-"    for(int i=0; i<_sLocales.length;i++) {"+
-"        _sLocaleMapper.put(_sLocales[i],_sLocales[i]);\n"+
-"     }\n"+
-"  }\n" +
-"}\n";
-
-  private static final String _LOCALE_JAVA_CODE_START =
-    "// Do not edit this file!\n"
-    + "// This file has been automatically generated.\n"
-    + "// Edit JSLocaleElementsGenerator instead.\n//\n"
-    + "package "
-    + _ADF_LOCALE_ELEMENTS_PACKAGE
-    + ";\n\n"
-    + "import java.util.ListResourceBundle;\n";
-
-  private static final String _JAVASCRIPT_EXTENSION = ".js";
-  private static final String _JAVA_EXTENSION = ".java";
- 
-  //Introduced to remove the dependency on bali-share in the api side.
-  private static class ArrayEnumeration implements Enumeration
-  {
-    public ArrayEnumeration(Object[] array)
-    {
-      _objects = (array == null)? _EMPTY_ARRAY : array;
-    }
-
-    public boolean hasMoreElements()
-    {
-      return _currentIndex < _objects.length;
-    }
-
-    public Object nextElement()
-    {
-      return _objects[_currentIndex++];
-    }
-
-    private Object[] _objects;
-
-    private int _currentIndex;
-
-    private static final Object[] _EMPTY_ARRAY = new Object[0];
-  }
-
-}
-
-
+/*
+ * Copyright 2000-2004,2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.trinidadbuild.plugin.i18n.uixtools;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Writer;
+
+import java.lang.reflect.Method;
+
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Generates JavaScript libraries containing the Locale information from
+ * Java.
+ * @version $Name:  $ ($Revision: 1.3 $) $Date: 2004/03/25 22:36:42 $
+ * @author Blake Sullivan
+ * @author Bud Osterberg
+ */
+public class JSLocaleElementsGenerator
+{
+  public static void main(
+    String[] args
+    )
+  {
+
+    if ((args.length == 1) && ("?".equals(args[0])))
+    {
+      System.out.println("Generates JavaScript Locale information files");
+      System.out.println("for the Locales available in the JVM.");
+      System.out.println("These files are used by the Cabo HTML client");
+      System.out.println("logic to handle date formatting and validation.");
+      System.out.println();
+      System.out.println("Parameters:");
+      System.out.println("\tprettyPrint=false\tTurns off pretty printed output");
+      System.out.println("\toutDir=[path]\t\tDirectory path to write JavaScript files to");
+      System.out.println("\tsourceDir=[path]\t\tRoot directory path to write Java source to");
+      System.out.println("\tbundleOutDir=[path]\t\tRoot directory path to write Java ResourceBundles to (defaults to sourceDir).");
+      System.out.println("\tvariant=[variant name]\t\tIf supplied utility will generate ResourceBundles for this variant, and nothing else.");
+      System.out.println("\tverbose=true\t\tTurns on verbose output");
+      System.out.println("\tgenerateBundleBaseOnly=true\t\tGenerates the base LocaleElement.java file only");
+      System.exit(0);
+    }
+
+    // whether the output should be pretty printed for legibility
+    boolean prettyPrint = getArgBooleanValue(args, "prettyPrint", true);
+
+    // whether verbose ouput should be generated.
+    boolean verbose = getArgBooleanValue(args, "verbose", false);
+
+    boolean writeSource = getArgBooleanValue(args, "writeSource", true);
+    boolean writeJavascript = getArgBooleanValue(args, "writeJavascript", true);
+
+    // whether only the Base LocaleElements.java file should be created.
+    // this is based on the Locale.US
+    boolean generateBundleBaseOnly = getArgBooleanValue(args,"generateBundleBaseOnly",false);
+
+    // the output directory
+    String outDir = getArgStringValue(args, "outDir", null);
+
+    if (outDir == null)
+    {
+      outDir = System.getProperty("user.dir") +
+               File.separator +
+               _DEFAULT_LOCATION_PATH;
+    }
+
+    if (!outDir.endsWith(File.separator))
+    {
+      outDir = outDir + File.separator;
+    }
+
+
+    // the requested variant
+    String variant = getArgStringValue(args, "variant", null);
+    boolean writeAll = true;
+    if (variant != null)
+    {
+      writeAll = false;
+      variant = variant.toUpperCase();
+    }
+
+    // the source directory
+    String sourceDir = getArgStringValue(args, "sourceDir", null);
+
+    if (sourceDir == null)
+    {
+      sourceDir = System.getProperty("user.dir");
+    }
+
+    String bundleOutDir = getArgStringValue(args, "bundleOutDir", null);
+
+    if (bundleOutDir == null)
+      bundleOutDir = sourceDir;
+
+    // The bundle output dir is the base of the heirarchy, we'll actually put
+    // the files into the appropriate sub directory for the package.
+    String fullBundleOutDir = (bundleOutDir
+                               + (bundleOutDir.endsWith(File.separator)
+                                  ? ""
+                                  : File.separator)
+                              + _DEFAULT_BUNDLE_LOCATION_PATH);
+
+    String version = getArgStringValue(args, "version", null);
+    version = VersionUtils.normalizeVersionSuffix(version);
+
+    if (verbose)
+    {
+      System.out.println("Writing files to: " + outDir);
+      if (writeAll)
+      {
+        System.out.println("Writing source to: " + sourceDir);
+      }
+      System.out.println("Writing bundles to: " + fullBundleOutDir);
+    }
+
+    try
+    {
+      File localeListFile = null;
+
+      if (writeSource)
+        (new File(fullBundleOutDir)).mkdirs();
+
+      if (writeJavascript)
+        (new File(outDir)).mkdirs();
+
+      if (writeAll && writeSource && !generateBundleBaseOnly)
+      {
+        localeListFile = new File(sourceDir, _LOCALE_LIST_PATH);
+        localeListFile.getParentFile().mkdirs();
+        localeListFile.createNewFile();
+      }
+
+      Locale[] locales = null;
+
+      if (generateBundleBaseOnly)
+      {
+         locales = new Locale[1];
+         locales[0] = Locale.US;
+      }
+      else
+      {
+        locales = Locale.getAvailableLocales();
+      }
+
+      //
+      // loop through the available Locales, writing their contents out
+      // as JavaScript libraries and/or ResourceBundles
+      //
+      for (int i = 0; i < locales.length; i++)
+      {
+        // write the JavaSCript library for this locale
+        _generateJSLocaleElements(outDir, fullBundleOutDir, locales[i],
+                                  variant, prettyPrint, verbose,
+                                  writeJavascript, writeSource, generateBundleBaseOnly, version);
+      }
+
+      // And write out a listing of all the locales, but  not when we want to
+      // just generate the base Resource file.
+      if (writeAll && writeSource && !generateBundleBaseOnly)
+      {
+        Writer sourceWriter = new FileWriter(localeListFile);
+        sourceWriter.write(_LOCALE_LIST_CODE_START);
+
+        for (int i = 0; i < locales.length; i++)
+        {
+          sourceWriter.write("    new Locale(\"");
+          sourceWriter.write(locales[i].getLanguage());
+          sourceWriter.write("\",\"");
+          sourceWriter.write(locales[i].getCountry());
+          sourceWriter.write("\",\"");
+          sourceWriter.write(locales[i].getVariant());
+          sourceWriter.write("\"),\n");
+        }
+        sourceWriter.write(_LOCALE_LIST_CODE_END);
+        sourceWriter.close();
+      }
+    }
+    catch (IOException e)
+    {
+      System.err.println(e);
+      e.printStackTrace();
+    }
+
+    if (verbose)
+    {
+      System.out.println("Done writing files");
+    }
+  }
+
+  private static String getArgStringValue(
+    String[] args,
+    String   argName,
+    String   defaultValue
+    )
+  {
+    int argLength = argName.length();
+
+    for (int i = 0; i < args.length; i++)
+    {
+      String currArg = args[i];
+
+      if (currArg.startsWith(argName))
+      {
+        if (!currArg.equals(argName) &&
+            ('=' == currArg.charAt(argLength)))
+        {
+          return currArg.substring(argLength + 1);
+        }
+      }
+    }
+
+    return defaultValue;
+  }
+
+  private static boolean getArgBooleanValue(
+    String[] args,
+    String   argName,
+    boolean  defaultValue
+    )
+  {
+    //
+    // check for = true or = false
+    //
+    String argValue = getArgStringValue(args, argName, null);
+
+    if (argValue != null)
+    {
+      // check for = self
+      if (argName.equals(argValue))
+      {
+        return true;
+      }
+      else
+      {
+        return Boolean.valueOf(argValue).booleanValue();
+      }
+    }
+
+    //
+    // check for the name by itself
+    //
+    for (int i = 0; i < args.length; i++)
+    {
+      if (args[i].equals(argName))
+      {
+        return true;
+      }
+    }
+
+    //
+    // check for the name turned off
+    //
+    String notName = "-" + argName;
+
+    for (int i = 0; i < args.length; i++)
+    {
+      if (args[i].equals(notName))
+      {
+        return false;
+      }
+    }
+
+    return defaultValue;
+  }
+
+  private static void _generateJSLocaleElements(
+    String  outDir,
+    String  bundleOutDir,
+    Locale  targetLocale,
+    String  variant,
+    boolean prettyPrint,
+    boolean verbose,
+    boolean writeJavascript,
+    boolean writeSource,
+    boolean generateBundleBaseOnly,
+    String version
+    ) throws IOException
+  {
+    String fileName;
+    PrintWriter localeWriter;
+
+    if (variant == null && writeJavascript)
+    {
+      fileName = _getFileName(targetLocale, version, generateBundleBaseOnly) + _JAVASCRIPT_EXTENSION;
+
+      if (verbose)
+      {
+        System.out.println("Writing " + fileName);
+      }
+
+      // create the file to write to
+      localeWriter = new PrintWriter
+        (new BufferedWriter(new FileWriter(outDir + fileName),
+                            _DEFAULT_BUFFER_SIZE));
+      _writeLocale(localeWriter, targetLocale, prettyPrint);
+      localeWriter.close();
+    }
+  }
+
+  private static void _writeJavaBundle(
+    Writer      output,
+    Locale      targetLocale,
+    String      fileName
+    ) throws IOException
+  {
+    output.write(_LOCALE_JAVA_CODE_START);
+    output.write("public class "
+                 + fileName
+                 + " extends ListResourceBundle\n{\n"
+                 + "  public Object[][] getContents()\n  {\n"
+                 + "    return contents;\n  }\n\n");
+    try
+    {
+      ResourceBundle elementsData =
+        ResourceBundle.getBundle(_LOCALE_ELEMENTS_PATH, targetLocale);
+
+      boolean doneOne = false;
+
+      for (int i = 0; i < LOCALE_ELEMENTS_GET_KEYS.length; i ++)
+      {
+        String currKey = LOCALE_ELEMENTS_GET_KEYS[i];
+
+        Object data = _getElementData(currKey, elementsData, targetLocale);
+        _writeJavaBundleElement(output, currKey, data, doneOne);
+        doneOne = true;
+      }
+      doneOne = false;
+      output.write("  static final Object[][] contents = \n  {\n");
+      for (int i = 0; i < LOCALE_ELEMENTS_GET_KEYS.length; i ++)
+      {
+        String currKey = LOCALE_ELEMENTS_GET_KEYS[i];
+        output.write((doneOne ? ",\n" : "")
+                     + "    { \""
+                     + currKey
+                     + "\", "
+                     + _getKeyArrayName(currKey)
+                     + "}");
+        doneOne = true;
+      }
+      output.write("\n  };");
+    }
+    catch (MissingResourceException e)
+    {
+      // make sure that the class will, at least, compile even if incomplete.
+      output.write("  // Bundle generation error:\n  // " + e);
+      output.write("\n  static final Object[][] contents = null;");
+      System.err.println(e);
+    }
+    output.write("\n}\n");
+  }
+
+  private static void _writeLocale(
+    Writer      output,
+    Locale      targetLocale,
+    boolean     prettyPrint
+    ) throws IOException
+  {
+
+    output.write("var LocaleSymbols_");
+    output.write(targetLocale.toString());
+    output.write(" = new LocaleSymbols({");
+
+    if (prettyPrint)
+      output.write('\n');
+
+    Enumeration zoneEnumeration =
+                               new ArrayEnumeration(DATE_FORMAT_ZONE_GET_KEYS);
+
+    // write the locale elements into the file
+    _writeResourceContents(output,
+                           _LOCALE_ELEMENTS_PATH,
+                           new ArrayEnumeration(LOCALE_ELEMENTS_GET_KEYS),
+                           targetLocale,
+                           zoneEnumeration.hasMoreElements(),
+                           prettyPrint);
+
+    // write the date format elements into the file
+    _writeResourceContents(output,
+                           _DATE_FORMAT_ZONE_PATH,
+                           zoneEnumeration,
+                           targetLocale,
+                           false,  // this is the last resource to write
+                           prettyPrint);
+
+    output.write("});");
+
+    if (prettyPrint)
+      output.write('\n');
+  }
+
+
+  private static void _writeResourceContents(
+    Writer      output,
+    String      baseName,
+    Enumeration keys,
+    Locale      targetLocale,
+    boolean     hasMoreResources,
+    boolean     prettyPrint
+    ) throws IOException
+  {
+    try
+    {
+      ResourceBundle elementsData = ResourceBundle.getBundle(baseName,
+                                                             targetLocale);
+
+      while(keys.hasMoreElements())
+      {
+        String currKey = (String)keys.nextElement();
+
+        Object data = _getElementData(currKey, elementsData, targetLocale);
+        boolean wroteElement = _writeResourceElement(
+                                    output,
+                                    currKey,
+                                    data,
+                                    hasMoreResources || keys.hasMoreElements(),
+                                    prettyPrint);
+
+        if (wroteElement && prettyPrint)
+        {
+          output.write('\n');
+        }
+      }
+    }
+    catch (MissingResourceException e)
+    {
+      System.err.println(e);
+    }
+  }
+
+  private static Object _getElementData(
+    String currKey,
+    ResourceBundle elementsData,
+    Locale targetLocale
+   )
+  {
+    return elementsData.getObject(currKey);
+  }
+
+  private static boolean _writeResourceElement(
+    Writer  output,
+    String  key,
+    Object  value,
+    boolean notLast,
+    boolean prettyPrint
+    ) throws IOException
+  {
+    if (key != null)
+    {
+      // start writing element, using key as the property name
+      output.write(key);
+      output.write(':');
+    }
+
+    Object[] values = null;
+    int valueCount = 0;
+
+    if (value instanceof Object[])
+    {
+      values = (Object[])value;
+
+      valueCount = values.length;
+
+      if (valueCount == 0)
+      {
+        value = "";
+      }
+    }
+
+    if (valueCount != 0)
+    {
+      // output.write("new Array(");
+      output.write('[');
+
+      for (int i = 0; i < valueCount; i++)
+      {
+        _writeResourceElement(output,
+                              null,
+                              values[i],
+                              i < valueCount - 1,
+                              prettyPrint);
+      }
+
+      //output.write(')');
+      output.write(']');
+    }
+    else
+    {
+      output.write('\"');
+      _writeEscapedString(output, value.toString(), false);
+      output.write('\"');
+    }
+
+    if (notLast)
+    {
+      output.write(',');
+
+      if (prettyPrint)
+      {
+        output.write(' ');
+      }
+    }
+
+    // we wrote some ouput
+    return true;
+  }
+
+  private static void _writeJavaBundleElement(
+    Writer  output,
+    String  key,
+    Object  value,
+    boolean wasPrevious
+    ) throws IOException
+  {
+    output.write("  private static final String "
+                 + _getKeyArrayName(key)
+                 + "[]");
+    Object[] values = null;
+    int valueCount = 0;
+    boolean doneOne = false;
+
+    if (value instanceof Object[])
+    {
+      values = (Object[]) value;
+
+      valueCount = values.length;
+
+      if (valueCount <= 0)
+      {
+        values = _EMPTY_VALUES;
+        valueCount = 1;
+      }
+    }
+
+    if (valueCount > 0)
+    {
+      output.write(" = \n  {\n");
+      for (int i = 0; i < valueCount; i++)
+      {
+        output.write((doneOne ? ", \n" : "") + "    \"");
+        _writeEscapedString(output, values[i].toString(), true);
+        output.write("\"");
+        doneOne = true;
+      }
+      output.write("\n  };\n\n");
+    }
+    else
+      output.write(" = null");
+  }
+
+  private static void _writeEscapedString(
+    Writer output,
+    String value,
+    boolean isJava
+    ) throws IOException
+  {
+    int length = value.length();
+
+    for (int i = 0; i < length; i++)
+    {
+      char currChar = value.charAt(i);
+
+      if (currChar > 255)
+      {
+        output.write("\\u");
+        output.write(_getHexString(currChar, 4));
+      }
+      else
+      {
+        if (isJava)
+        {
+          if ((currChar > 31)
+              && (currChar < 128))
+          {
+            if (currChar == '\"')
+              output.write("\\\"");
+            else
+              output.write(currChar);
+          }
+          else
+          {
+            output.write("\\u");
+            output.write(_getHexString(currChar, 4));
+          }
+        }
+        else
+        {
+          // write ascii printable characters, except for the double quote,
+          // which needs to be escaped because we are already in a String.
+          if ((currChar > 31)    &&
+              (currChar < 128)   &&
+              (currChar != '\"') &&
+              (currChar != '\''))
+          {
+            output.write(currChar);
+          }
+          else
+          {
+            output.write("\\x");
+            output.write(_getHexString(currChar, 2));
+          }
+        }
+      }
+    }
+  }
+
+
+  private static String _getHexString(
+    int number,
+    int minDigits
+    )
+  {
+    String hexString = Integer.toHexString(number);
+
+    int hexLength = hexString.length();
+
+    int zeroPadding = minDigits - hexLength;
+
+    if (zeroPadding > 0)
+    {
+      String paddedString = "0";
+
+      while (zeroPadding > 1)
+      {
+        paddedString += "0";
+        zeroPadding--;
+      }
+
+      hexString = paddedString + hexString;
+    }
+    else
+    {
+      if (zeroPadding < 0)
+      {
+        throw new IllegalArgumentException();
+      }
+    }
+
+    return hexString;
+  }
+
+  private static String _getKeyArrayName(String key)
+  {
+    return "_array" + key;
+  }
+
+  private static String _getFileName(
+    Locale locale,
+    String version,
+    boolean generateBundleBaseOnly
+    )
+  {
+
+    if (generateBundleBaseOnly)
+    {
+      return "LocaleElements";
+    }
+
+    if (version == null)
+      return "LocaleElements_" + locale;
+    return "LocaleElements_" + locale + version;
+  }
+
+  private static String _getLocaleSuffix(
+    Locale locale
+    )
+  {
+    String localeString =  locale.toString();
+
+    return localeString.substring(localeString.indexOf('_'));
+  }
+
+  //
+  // Array of DateFormatZoneData key names to retrieve.
+  // Only keys from this list are used to generate locale information
+  //
+  private static final String[] LOCALE_ELEMENTS_GET_KEYS = new String[]
+  {
+    "MonthNames",
+    "MonthAbbreviations",
+    "DayNames",
+    "DayAbbreviations",
+    "AmPmMarkers",
+    "Eras",
+    "DateTimePatterns",
+    "DateTimeElements",
+    "NumberElements",
+  };
+
+  //
+  // Array of DateFormatZoneData key names to retrieve.
+  // Only keys from this list are used to generate locale information
+  //
+  private static final String[] LOCALE_ELEMENTS_MAPPINGS = new String[]
+  {
+    "MonthNames", "getMonths",
+    "MonthAbbreviations", "getShortMonths",
+    "DayNames", "getWeekdays",
+    "DayAbbreviations", "getShortWeekdays",
+    "AmPmMarkers", "getAmPmStrings",
+    "Eras", "getEras",
+    "DateTimePatterns", null,
+    "DateTimeElements", null,
+    "NumberElements", null
+  };
+
+  //
+  // Array of LocaleElements key names to retrieve.
+  // Only keys from this list are used to generate locale information
+  //
+  private static final String[] DATE_FORMAT_ZONE_GET_KEYS= new String[]
+  {
+    // none currently
+  };
+
+  // J2SE 1.3:
+  // private static String _RESOURCES_PACKAGE = "java.text.resources";
+
+  // J2SE 1.4:
+  private static String _RESOURCES_PACKAGE = "sun.text.resources";
+
+  private static final String _DATE_FORMAT_ZONE_PATH =
+                          _RESOURCES_PACKAGE + ".DateFormatZoneData";
+
+  private static final String _LOCALE_ELEMENTS_PATH =
+                          _RESOURCES_PACKAGE + ".LocaleElements";
+
+  private static final String _DEFAULT_LOCATION_PATH =
+          "org\\apache\\myfaces\\adfinternal\\ui\\jsLibs\\resources\\".replace('\\',
+                                                          File.separatorChar);
+
+  // Mimicking to be in api path. In the adf-faces impl side we have
+  // the following directory structure. There is identical directory sturcture
+  // in adf-faces api side.
+  // Only _ADF_LOCALE_ELEMENT base file will be added to the api side,
+  // while all the variants will be in impl side in the directory structure
+  // defined below.
+  private static final String _ADF_LOCALE_ELEMENTS_PACKAGE =
+    "org.apache.myfaces.adf.resource";
+
+  public static final String _DEFAULT_BUNDLE_LOCATION_PATH =
+    (_ADF_LOCALE_ELEMENTS_PACKAGE.replace('.', File.separatorChar)
+     + File.separatorChar);
+
+  private static final String _ADF_LOCALE_ELEMENTS_PATH =
+    _ADF_LOCALE_ELEMENTS_PACKAGE + ".LocaleElements";
+
+  // buffer size of the BufferedWriter to which output is written
+  private static final int _DEFAULT_BUFFER_SIZE = 1 << 14;
+
+  private static final String _LOCALE_LIST_PATH =
+          "org\\apache\\myfaces\\adfinternal\\ui\\laf\\base\\xhtml\\LocaleList.java".replace('\\',
+                                                          File.separatorChar);
+
+  private static final String _EMPTY_VALUES[] = { "" };
+
+  private static final String _LOCALE_LIST_CODE_START =
+"/*\n" +
+"**\n" +
+"**34567890123456789012345678901234567890123456789012345678901234567890123456789\n" +
+"*/\n" +
+"package org.apache.myfaces.adfinternal.ui.laf.base.xhtml;\n" +
+"\n" +
+"import java.util.Locale;\n" +
+"\n" +
+"import java.util.HashMap;\n" +
+"\n" +
+"/**\n" +
+" * List of supported locales.  Automatically generated - do not modify!\n" +
+" * @author Adam Winer\n" +
+" */\n" +
+"public class LocaleList\n" +
+"{\n" +
+"  /**\n" +
+"   * Returns the list of supported locales.\n" +
+"   */\n" +
+"  static public HashMap getSupportedLocales()\n" +
+"  {\n" +
+"    return _sLocaleMapper;\n" +
+"  }\n" +
+"  \n" +
+"  private LocaleList()\n" +
+"  {\n" +
+"  }\n" +
+"\n" +
+"  static private final Locale[] _sLocales = new Locale[]\n" +
+"  {\n";
+
+
+  private static final String _LOCALE_LIST_CODE_END =
+"  };\n" +
+"\n" +
+"  static private HashMap _sLocaleMapper;\n" +
+"\n" +
+"  static\n" +
+"  {\n" +
+"    _sLocaleMapper = new HashMap();\n" +
+"    for(int i=0; i<_sLocales.length;i++) {"+
+"        _sLocaleMapper.put(_sLocales[i],_sLocales[i]);\n"+
+"     }\n"+
+"  }\n" +
+"}\n";
+
+  private static final String _LOCALE_JAVA_CODE_START =
+    "// Do not edit this file!\n"
+    + "// This file has been automatically generated.\n"
+    + "// Edit JSLocaleElementsGenerator instead.\n//\n"
+    + "package "
+    + _ADF_LOCALE_ELEMENTS_PACKAGE
+    + ";\n\n"
+    + "import java.util.ListResourceBundle;\n";
+
+  private static final String _JAVASCRIPT_EXTENSION = ".js";
+  private static final String _JAVA_EXTENSION = ".java";
+ 
+  //Introduced to remove the dependency on bali-share in the api side.
+  private static class ArrayEnumeration implements Enumeration
+  {
+    public ArrayEnumeration(Object[] array)
+    {
+      _objects = (array == null)? _EMPTY_ARRAY : array;
+    }
+
+    public boolean hasMoreElements()
+    {
+      return _currentIndex < _objects.length;
+    }
+
+    public Object nextElement()
+    {
+      return _objects[_currentIndex++];
+    }
+
+    private Object[] _objects;
+
+    private int _currentIndex;
+
+    private static final Object[] _EMPTY_ARRAY = new Object[0];
+  }
+
+}
+
+

Propchange: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/uixtools/JSLocaleElementsGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/uixtools/VersionUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/uixtools/VersionUtils.java?rev=425235&r1=425234&r2=425235&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/uixtools/VersionUtils.java (original)
+++ incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/uixtools/VersionUtils.java Mon Jul 24 17:24:16 2006
@@ -1,30 +1,30 @@
-/*
- * Copyright 1999-2003,2006 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.myfaces.trinidadbuild.plugin.i18n.uixtools;
-
-public class VersionUtils
-{
-  /**
-   * Normalize a version number for use as a file suffix.
-   */
-  static public String normalizeVersionSuffix(String version)
-  {
-    if (version == null)
-      return null;
-
-    return version.replace('.', '_');
-  }
-}
+/*
+ * Copyright 1999-2003,2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.trinidadbuild.plugin.i18n.uixtools;
+
+public class VersionUtils
+{
+  /**
+   * Normalize a version number for use as a file suffix.
+   */
+  static public String normalizeVersionSuffix(String version)
+  {
+    if (version == null)
+      return null;
+
+    return version.replace('.', '_');
+  }
+}

Propchange: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/uixtools/VersionUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message