db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1831666 - in /db/derby/code/trunk: build.xml java/engine/org/apache/derby/loc/build.xml java/locales/ java/locales/module-info.template java/tools/build.xml tools/ant/properties/dirs.properties
Date Wed, 16 May 2018 00:06:00 GMT
Author: rhillegas
Date: Wed May 16 00:05:59 2018
New Revision: 1831666

URL: http://svn.apache.org/viewvc?rev=1831666&view=rev
Log:
DERBY-6945: Add module descriptors to locale jars; commit derby-6945-36-aa-moduleDescriptorsForLocaleJars.diff.

Added:
    db/derby/code/trunk/java/locales/
    db/derby/code/trunk/java/locales/module-info.template   (with props)
Modified:
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/loc/build.xml
    db/derby/code/trunk/java/tools/build.xml
    db/derby/code/trunk/tools/ant/properties/dirs.properties

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=1831666&r1=1831665&r2=1831666&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Wed May 16 00:05:59 2018
@@ -109,7 +109,6 @@
     <mkdir dir="${out.testing.dir}"/>
     <mkdir dir="${out.pptesting.dir}"/>
     <mkdir dir="${out.tools.dir}"/>
-    <mkdir dir="${out.locales.dir}"/>
   </target>
 
    <target name="make-generated-dirs">
@@ -395,16 +394,18 @@
 <!-- ==================================================================== -->
 
   <target name="buildlocaleinfo">
+    <property name="locale.output.dir" value="${out.dir}/${locale.stub}${locale.iname}/org/apache/derby/info/${locale.stub}${locale.iname}"/>
+    <mkdir dir="${locale.output.dir}"/>
+
     <antcall target="localeinfowriter">
       <param name="info.buildnumber" value="1"/>
       <param name="info.iname" value="_${locale.iname}"/>
       <param name="info.ename" value="${locale.ename}"/>
-      <param name="info.file" value="${out.locales.dir}/org/apache/derby/info/locale_${locale.iname}/info.properties"/>
+      <param name="info.file" value="${locale.output.dir}/info.properties"/>
     </antcall>
   </target>
 
   <target name="localeinfowriter">
-    <mkdir dir="${out.locales.dir}/org/apache/derby/info/locale_${locale.iname}"/>
     <propertyfile file="${info.file}" comment="${copyright.comment}">
       <entry key="derby.locale.version.major" value="${major}"/>
       <entry key="derby.locale.version.minor" value="${minor}"/>
@@ -510,37 +511,36 @@
   <target name="checklocaleinfo">
     <condition property="localeinfo.available">
       <and>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_cs.properties"/>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_de_DE.properties"/>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_es.properties"/>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_fr.properties"/>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_hu.properties"/>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_it.properties"/>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_ja_JP.properties"/>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_ko_KR.properties"/>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_pl.properties"/>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_pt_BR.properties"/>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_ru.properties"/>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_zh_CN.properties"/>
-        <available file="${out.locales.dir}/org/apache/derby/info/locale_zh_TW.properties"/>
+        <available file="${${out.dir}/${locale.stub}cs/org/apache/derby/info/${locale.stub}cs/info.properties"/>
+        <available file="${${out.dir}/${locale.stub}de_DE/org/apache/derby/info/${locale.stub}de_DE/info.properties"/>
+        <available file="${${out.dir}/${locale.stub}es/org/apache/derby/info/${locale.stub}es/info.properties"/>
+        <available file="${${out.dir}/${locale.stub}fr/org/apache/derby/info/${locale.stub}fr/info.properties"/>
+        <available file="${${out.dir}/${locale.stub}hu/org/apache/derby/info/${locale.stub}hu/info.properties"/>
+        <available file="${${out.dir}/${locale.stub}it/org/apache/derby/info/${locale.stub}it/info.properties"/>
+        <available file="${${out.dir}/${locale.stub}ja_JP/org/apache/derby/info/${locale.stub}ja_JP/info.properties"/>
+        <available file="${${out.dir}/${locale.stub}ko_KR/org/apache/derby/info/${locale.stub}ko_KR/info.properties"/>
+        <available file="${${out.dir}/${locale.stub}pl/org/apache/derby/info/${locale.stub}pl/info.properties"/>
+        <available file="${${out.dir}/${locale.stub}pt_BR/org/apache/derby/info/${locale.stub}pt_BR/info.properties"/>
+        <available file="${${out.dir}/${locale.stub}ru/org/apache/derby/info/${locale.stub}ru/info.properties"/>
+        <available file="${${out.dir}/${locale.stub}zh_CN/org/apache/derby/info/${locale.stub}zh_CN/info.properties"/>
+        <available file="${${out.dir}/${locale.stub}zh_TW/org/apache/derby/info/${locale.stub}zh_TW/info.properties"/>
       </and>
     </condition>
   </target>
 
   <target name="cleanlocale">
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_cs.properties"/>
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_de_DE.properties"/>
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_es.properties"/>
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_fr.properties"/>
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_hu.properties"/>
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_it.properties"/>
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_ja_JP.properties"/>
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_ko_KR.properties"/>
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_pl.properties"/>
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_pt_BR.properties"/>
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_ru.properties"/>
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_zh_CN.properties"/>
-    <delete file="${out.locales.dir}/org/apache/derby/info/locale_zh_TW.properties"/>
+    <delete file="${out.dir}/${locale.stub}cs/org/apache/derby/info/${locale.stub}cs/info.properties"/>
          <delete file="${out.dir}/${locale.stub}de_DE/org/apache/derby/info/${locale.stub}de_DE/info.properties"/>
+    <delete file="${out.dir}/${locale.stub}es/org/apache/derby/info/${locale.stub}es/info.properties"/>
+    <delete file="${out.dir}/${locale.stub}fr/org/apache/derby/info/${locale.stub}fr/info.properties"/>
+    <delete file="${out.dir}/${locale.stub}hu/org/apache/derby/info/${locale.stub}hu/info.properties"/>
+    <delete file="${out.dir}/${locale.stub}it/org/apache/derby/info/${locale.stub}it/info.properties"/>
+    <delete file="${out.dir}/${locale.stub}ja_JP/org/apache/derby/info/${locale.stub}ja_JP/info.properties"/>
+    <delete file="${out.dir}/${locale.stub}ko_KR/org/apache/derby/info/${locale.stub}ko_KR/info.properties"/>
+    <delete file="${out.dir}/${locale.stub}pl/org/apache/derby/info/${locale.stub}pl/info.properties"/>
+    <delete file="${out.dir}/${locale.stub}pt_BR/org/apache/derby/info/${locale.stub}pt_BR/info.properties"/>
+    <delete file="${out.dir}/${locale.stub}ru/org/apache/derby/info/${locale.stub}ru/info.properties"/>
+    <delete file="${out.dir}/${locale.stub}zh_CN/org/apache/derby/info/${locale.stub}zh_CN/info.properties"/>
+    <delete file="${out.dir}/${locale.stub}zh_TW/org/apache/derby/info/${locale.stub}zh_TW/info.properties"/>
   </target>
 
   <target name="checkmessages" depends="checkmessages-done"
@@ -1782,22 +1782,20 @@
     <echo level="info" message="Building derbyLocale_${locale.iname}.jar"/>
 
     <!-- generate new locale property file -->
+    <property name="locale.output.dir" value="${out.dir}/${locale.stub}${locale.iname}/org/apache/derby/info/${locale.stub}${locale.iname}"/>
     <antcall target="localeinfowriter">
       <param name="info.buildnumber" value="${changenumber}"/>
       <param name="info.iname" value="_${locale.iname}"/>
       <param name="info.ename" value="${locale.ename}"/>
       <param name="info.productfile" value="derbyLocale_${locale.iname}.jar"/>
-      <param name="info.file" value="${out.locales.dir}/org/apache/derby/info/locale_${locale.iname}/info.properties"/>
+      <param name="info.file" value="${locale.output.dir}/info.properties"/>
     </antcall>   
 
     <jar destfile="${derby.jar.dir}/derbyLocale_${locale.iname}.jar"
+         basedir="${out.dir}/${locale.stub}${locale.iname}"
          compress="true"
-	 filesonly="true">
-      <fileset dir="${out.locales.dir}"
-	       includes="org/apache/derby/info/*_${locale.iname}/info.properties,
-	                 org/apache/derby/loc/**/*_${locale.iname}.properties"
-           excludes="org/apache/derby/loc/**/clientmessages_${locale.iname}.properties"
-      />
+         filesonly="true"
+      >
       <fileset dir="${derby.jar.dir}/lists"
                includes="META-INF/LICENSE,META-INF/NOTICE"/>
     </jar>
@@ -2534,7 +2532,20 @@
             <pathelement location="${out.shared.dir}"/>
             <pathelement location="${out.testing.dir}"/>
             <pathelement location="${out.tools.dir}"/>
-            <pathelement location="${out.locales.dir}"/>
+
+            <pathelement location="${out.dir}/${locale.stub}cs}"/>
+            <pathelement location="${out.dir}/${locale.stub}de_DE}"/>
+            <pathelement location="${out.dir}/${locale.stub}es}"/>
+            <pathelement location="${out.dir}/${locale.stub}fr}"/>
+            <pathelement location="${out.dir}/${locale.stub}hu}"/>
+            <pathelement location="${out.dir}/${locale.stub}it}"/>
+            <pathelement location="${out.dir}/${locale.stub}ja_JP}"/>
+            <pathelement location="${out.dir}/${locale.stub}ko_KR}"/>
+            <pathelement location="${out.dir}/${locale.stub}pl}"/>
+            <pathelement location="${out.dir}/${locale.stub}pt_BR}"/>
+            <pathelement location="${out.dir}/${locale.stub}ru}"/>
+            <pathelement location="${out.dir}/${locale.stub}zh_CN}"/>
+            <pathelement location="${out.dir}/${locale.stub}zh_TW}"/>
         </classpath>
     </junit>
   </target>

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/build.xml?rev=1831666&r1=1831665&r2=1831666&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/build.xml Wed May 16 00:05:59 2018
@@ -27,6 +27,7 @@
   <property file="${properties.dir}/dirs.properties"/>
   <!-- Product names and release info -->
   <property file="${properties.dir}/release.properties"/>
+  <property name="msgStub" value="messages_"/>
 
 <!-- Define the task which creates the engine's messages_en.properties -->
   <taskdef
@@ -35,7 +36,7 @@
     classpath="${out.build.dir}"
   />
   <property name="messageDescriptors" value="${derby.locales.dir}/messages.xml"/>
-  <property name="englishMessages" value="${generated.engine.locale.dir}/messages_en.properties"/>
+  <property name="englishMessages" value="${generated.engine.locale.dir}/${msgStub}en.properties"/>
 
 <!-- Targets -->
   <target name="locales" depends="init,buildMessages,split"/>
@@ -69,90 +70,117 @@
 
     <antcall target="doSplit">
       <param name="msgdir" value="${generated.engine.locale.dir}"/>
-      <param name="msgfile" value="messages_en"/>
+      <param name="localeSuffix" value="en"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_cs"/>
+      <param name="localeSuffix" value="cs"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_de_DE"/>
+      <param name="localeSuffix" value="de_DE"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_es"/>
+      <param name="localeSuffix" value="es"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_hu"/>
+      <param name="localeSuffix" value="hu"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_ja_JP"/>
+      <param name="localeSuffix" value="ja_JP"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_ko_KR"/>
+      <param name="localeSuffix" value="ko_KR"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_qq_PP_testOnly"/>
+      <param name="localeSuffix" value="qq_PP_testOnly"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_pl"/>
+      <param name="localeSuffix" value="pl"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_pt_BR"/>
+      <param name="localeSuffix" value="pt_BR"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_ru"/>
+      <param name="localeSuffix" value="ru"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_zh_CN"/>
+      <param name="localeSuffix" value="zh_CN"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_zh_TW"/>
+      <param name="localeSuffix" value="zh_TW"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_it"/>
+      <param name="localeSuffix" value="it"/>
     </antcall>
     <antcall target="doSplit">
       <param name="msgdir" value="${derby.locales.dir}"/>
-      <param name="msgfile" value="messages_fr"/>
+      <param name="localeSuffix" value="fr"/>
     </antcall>
   </target>
 
   <target name="doSplit" depends="splitprops,verifysplit,noSplit,chksplit" unless="split.done">
     <mkdir dir="${loc.engine.dir}"/>
     <mkdir dir="${loc.client.dir}"/>
-    <mkdir dir="${loc.locales.dir}"/>
+
+    <mkdir dir="${generated.src.dir}/${locale.stub}${localeSuffix}"/>
+    <copy overwrite="true"
+          file="${derby.locales.src.dir}/module-info.template"
+          tofile="${generated.src.dir}/${locale.stub}${localeSuffix}/module-info.java">
+      <filterset>
+        <filter token="LOCALE" value="${localeSuffix}"/>
+      </filterset>
+    </copy>
+
+    <mkdir dir="${locale.output.dir}"/>
+    <mkdir dir="${locale.output.dir}/org/apache/derby/loc/${locale.stub}${localeSuffix}"/>
+  	<javac
+      source="${min.version}"
+      target="${min.version}"
+      nowarn="on"
+      debug="${debug}" debuglevel="${debuglevel}"
+      depend="${depend}"
+      deprecation="${deprecation}"
+      optimize="${optimize}"
+      proceed="${proceed}"
+      verbose="${verbose}"
+      srcdir="${generated.src.dir}/${locale.stub}${localeSuffix}"
+      destdir="${locale.output.dir}">
+      <compilerarg value="-Xlint:unchecked"/>
+    </javac>
+
     <java classname="org.apache.derbyBuild.splitmessages"
           classpath="${out.build.dir}:${out.shared.dir}"
           failonerror="true">
       <arg value="${loc.engine.dir}"/> 
       <arg value="${loc.client.dir}"/> 
-      <arg value="${loc.locales.dir}"/> 
+      <arg value="${locale.output.dir}/org/apache/derby/loc"/> 
       <arg value="${split.properties}"/>
     </java>
     <touch file="${split.donefile}"/>
   </target>
 
   <target name="splitprops">
-    <property name="split.properties" value="${msgdir}/${msgfile}.properties"/>
-    <property name="split.donefile" value="${loc.engine.dir}/${msgfile}.done"/>
+    <property name="split.properties" value="${msgdir}/${msgStub}${localeSuffix}.properties"/>
+    <property name="locale.output.dir" value="${out.dir}/${locale.stub}${localeSuffix}"/>
+    <property name="split.donefile" value="${loc.engine.dir}/${msgStub}${localeSuffix}.done"/>
   </target>
 
   <target name="chksplit">
     <uptodate property="split.done"
               targetfile="${split.donefile}" >
-      <srcfiles dir="${derby.locales.dir}" includes="${msgfile}.properties" />
+      <srcfiles dir="${derby.locales.dir}" includes="${msgStub}${localeSuffix}.properties"
/>
     </uptodate>
   </target>
 

Added: db/derby/code/trunk/java/locales/module-info.template
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/locales/module-info.template?rev=1831666&view=auto
==============================================================================
--- db/derby/code/trunk/java/locales/module-info.template (added)
+++ db/derby/code/trunk/java/locales/module-info.template Wed May 16 00:05:59 2018
@@ -0,0 +1,28 @@
+/*
+
+   Derby - Class module-info
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to you 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.
+
+ */
+
+/**
+ * Template for the module descriptor generated
+ * for each localization jar file.
+ */
+module org.apache.derby.locale_@LOCALE@
+{
+}

Propchange: db/derby/code/trunk/java/locales/module-info.template
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/tools/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/build.xml?rev=1831666&r1=1831665&r2=1831666&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/build.xml (original)
+++ db/derby/code/trunk/java/tools/build.xml Wed May 16 00:05:59 2018
@@ -135,8 +135,9 @@
   </target>
 
   <target name="copyLocalization">
-    <mkdir dir="${loc.locales.dir}/tools/locale_${localization}"/>
-    <copy todir="${loc.locales.dir}/tools/locale_${localization}">
+    <property name="locale.output.dir" value="${out.dir}/${locale.stub}${localization}/org/apache/derby/loc/tools/${locale.stub}${localization}"/>
+    <mkdir dir="${locale.output.dir}"/>
+    <copy todir="${locale.output.dir}">
       <fileset dir="${derby.tools.locales.dir}">
         <include name="sysinfoMessages_${localization}.properties"/>
         <include name="toolsmessages_${localization}.properties"/>

Modified: db/derby/code/trunk/tools/ant/properties/dirs.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/ant/properties/dirs.properties?rev=1831666&r1=1831665&r2=1831666&view=diff
==============================================================================
--- db/derby/code/trunk/tools/ant/properties/dirs.properties (original)
+++ db/derby/code/trunk/tools/ant/properties/dirs.properties Wed May 16 00:05:59 2018
@@ -59,7 +59,8 @@ out.storeless.dir=${out.dir}/storeless
 out.stubs.dir=${out.dir}/stubs
 out.testing.dir=${out.dir}/testing
 out.tools.dir=${out.dir}/tools
-out.locales.dir=${out.dir}/locales
+
+locale.stub=locale_
 
 out.all.dir=${out.build.dir}:${out.client.dir}:${out.drda.dir}:${out.engine.dir}:${out.optional.dir}:${out.run.dir}:${out.shared.dir}:${out.storeless.dir}:${out.stubs.dir}:${out.testing.dir}:${out.tools.dir}:${out.locales.dir}
 
@@ -67,7 +68,6 @@ metadata.out.dir=${out.engine.dir}/org/a
 
 loc.engine.dir=${out.engine.dir}/org/apache/derby/loc
 loc.client.dir=${out.client.dir}/org/apache/derby/loc/client
-loc.locales.dir=${out.locales.dir}/org/apache/derby/loc
 loc.tools.dir=${out.tools.dir}/org/apache/derby/loc/tools
 
 
@@ -102,6 +102,7 @@ derby.pptesting.src.dir=${derbysrc.dir}/
 derby.storeless.src.dir=${derbysrc.dir}/storeless
 derby.metadata.src.dir=${derby.engine.src.dir}/org/apache/derby/impl/jdbc
 derby.notice.src.dir=${basedir}/tools/release/notices
+derby.locales.src.dir=${derbysrc.dir}/locales
 
 derby.engine.dir=${derby.engine.src.dir}/${derby.dir}
 derby.drda.dir=${derby.drda.src.dir}/${derby.dir}



Mime
View raw message