details:   /erp/devel/pi/rev/3f4efabf3019
changeset: 12082:3f4efabf3019
user:      Stefan Hühner <stefan.huehner <at> openbravo.com>
date:      Tue May 10 17:08:16 2011 +0200
summary:   Fixed 8346: Remove support for srcClient
srcClient has been obsoleted with start of 2.50 where customizations should be
done via modules but still carried arround for the 2.50 cycle to ease slow
migrations of people using now. Now for 3.0 its time to remove it.

diffstat:

 build.xml                                 |   1 -
 src-wad/src/org/openbravo/wad/Wad.java    |  46 +++---------------------------
 src-wad/src/org/openbravo/wad/web.xml     |   3 +-
 src-wad/src/org/openbravo/wad/webConf.xml |   3 +-
 src/build.xml                             |  19 ++----------
 5 files changed, 11 insertions(+), 61 deletions(-)

diffs (240 lines):

diff -r 1a7dbd852133 -r 3f4efabf3019 build.xml
--- a/build.xml Tue May 10 16:58:27 2011 +0200
+++ b/build.xml Tue May 10 17:08:16 2011 +0200
@@ -68,7 +68,6 @@
   <property name="base.src.trl" location="src-trl" />
   <property name="base.src.wad" location="src-wad" />
   <property name="base.src.gen" location="src-gen" />
-  <property name="base.client.src" location="srcClient" />
   <property name="base.db" location="src-db/database" />
   <property name="base.web" location="web" />
   <property name="base.context" location="WebContent" />
diff -r 1a7dbd852133 -r 3f4efabf3019 src-wad/src/org/openbravo/wad/Wad.java
--- a/src-wad/src/org/openbravo/wad/Wad.java    Tue May 10 16:58:27 2011 +0200
+++ b/src-wad/src/org/openbravo/wad/Wad.java    Tue May 10 17:08:16 2011 +0200
@@ -11,17 +11,15 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2011 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
  */
 package org.openbravo.wad;
 
-import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileReader;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -113,7 +111,6 @@
     String dirActionButton;
     boolean generateWebXml;
     boolean generateTabs;
-    String dirWebClients;
     String attachPath;
     String webPath;
     boolean complete;
@@ -183,10 +180,7 @@
       // was argv[8] no longer used
 
       // Path to find the client's web.xml file
-      if (argv.length <= 9)
-        dirWebClients = "";
-      else
-        dirWebClients = argv[9];
+      // was argv[9] no longer used
 
       // Path of the root project
       // was argv[10] no longer used
@@ -238,7 +232,6 @@
       log4j.info("directory web.xml: " + dirWebXml);
       log4j.info("directory ActionButtons: " + dirActionButton);
       log4j.info("generate web.xml: " + generateWebXml);
-      log4j.info("generate web.xml cliente: " + dirWebClients);
       log4j.info("generate tabs: " + generateTabs);
       log4j.info("File separator: " + wad.strSystemSeparator);
       log4j.info("Attach path: " + attachPath);
@@ -273,16 +266,6 @@
         return;
       }
 
-      File fileWebXmlClient = null;
-      if (dirWebClients != null && !dirWebClients.equals("")) {
-        fileWebXmlClient = new File(dirWebClients);
-        if (!fileWebXmlClient.exists()) {
-          fileWebXmlClient = null;
-        } else {
-          log4j.info("srcClient folder found.");
-        }
-      }
-
       final File fileActionButton = new File(dirActionButton);
       if (!fileActionButton.exists()) {
         log4j.error("No such directory: " + 
fileActionButton.getAbsoluteFile());
@@ -345,7 +328,7 @@
       if (generateWebXml) {
 
         if (!quick || WadData.genereteWebXml(wad.pool))
-          wad.processWebXml(fileWebXml, fileWebXmlClient, attachPath, webPath);
+          wad.processWebXml(fileWebXml, attachPath, webPath);
         else
           log4j.info("No changes in web.xml");
       }
@@ -638,8 +621,6 @@
    * 
    * @param fileWebXml
    *          path to generate the new web.xml file.
-   * @param fileClients
-   *          Path where is allocated the client web.xml file.
    * @param attachPath
    *          The path where are the attached files.
    * @param webPath
@@ -647,30 +628,13 @@
    * @throws ServletException
    * @throws IOException
    */
-  private void processWebXml(File fileWebXml, File fileClients, String 
attachPath, String webPath)
+  private void processWebXml(File fileWebXml, String attachPath, String 
webPath)
       throws ServletException, IOException {
     try {
       log4j.info("Processing web.xml");
       final XmlDocument xmlDocument = 
xmlEngine.readXmlTemplate("org/openbravo/wad/webConf")
           .createXmlDocument();
-      final StringBuffer sb = new StringBuffer();
-
-      try {
-        if (fileClients != null) {
-          final BufferedReader fileBuffer = new BufferedReader(new 
FileReader(fileClients));
-
-          String nextLine = fileBuffer.readLine();
-          while (nextLine != null) {
-            sb.append(nextLine).append("\n");
-            nextLine = fileBuffer.readLine();
-          }
-          fileBuffer.close();
-        }
-      } catch (final Exception e) {
-        e.printStackTrace();
-        return;
-      }
-      xmlDocument.setParameter("webClients", sb.toString());
+
       xmlDocument.setParameter("webPath", webPath);
       xmlDocument.setParameter("attachPath", attachPath);
       xmlDocument.setData("structureListener", WadData.selectListener(pool));
diff -r 1a7dbd852133 -r 3f4efabf3019 src-wad/src/org/openbravo/wad/web.xml
--- a/src-wad/src/org/openbravo/wad/web.xml     Tue May 10 16:58:27 2011 +0200
+++ b/src-wad/src/org/openbravo/wad/web.xml     Tue May 10 17:08:16 2011 +0200
@@ -12,7 +12,7 @@
     * under the License. 
     * The Original Code is Openbravo ERP. 
     * The Initial Developer of the Original Code is Openbravo SLU
-    * All portions are Copyright (C) 2001-2010 Openbravo SLU 
+    * All portions are Copyright (C) 2001-2011 Openbravo SLU 
     * All Rights Reserved. 
     * Contributor(s):    ______________________________________.
     ************************************************************************
@@ -87,7 +87,6 @@
       <FIELD_TMP id="fieldLoadOnStartUp"></FIELD_TMP>
     </servlet>
   </FIELDS_TMP>
-  <PARAMS_TMP id="paramWebClients"></PARAMS_TMP>
 
 
   <!-- MAPPING -->
diff -r 1a7dbd852133 -r 3f4efabf3019 src-wad/src/org/openbravo/wad/webConf.xml
--- a/src-wad/src/org/openbravo/wad/webConf.xml Tue May 10 16:58:27 2011 +0200
+++ b/src-wad/src/org/openbravo/wad/webConf.xml Tue May 10 17:08:16 2011 +0200
@@ -12,7 +12,7 @@
     * under the License. 
     * The Original Code is Openbravo ERP. 
     * The Initial Developer of the Original Code is Openbravo SLU
-    * All portions are Copyright (C) 2001-2010 Openbravo SLU 
+    * All portions are Copyright (C) 2001-2011 Openbravo SLU 
     * All Rights Reserved. 
     * Contributor(s):    ______________________________________.
     ************************************************************************
@@ -22,7 +22,6 @@
 
 <REPORT>
   <template file="web.xml" />
-  <PARAMETER id="paramWebClients" name="webClients" default="" />
   <PARAMETER id="paramWebPath" name="webPath" default="" />
   <PARAMETER id="paramAttachPath" name="attachPath" default="" />
 
diff -r 1a7dbd852133 -r 3f4efabf3019 src/build.xml
--- a/src/build.xml     Tue May 10 16:58:27 2011 +0200
+++ b/src/build.xml     Tue May 10 17:08:16 2011 +0200
@@ -25,7 +25,6 @@
 init: creates all the folders.
 trl.clean: clean the AD_TEXTINTERFACES table
 clean: delete all folders.
-copy.srcClient: copy the content of the srcClient to the src folder.
 sqlc: generates the java from the xsql files.
 compileSqlc: compiles all the java generated from the xsqls.
 wad: generates all the files from the mda.
@@ -71,7 +70,6 @@
   <property name="tab" value="%" />
 
   <property name="base.translate.structure" value="org/openbravo/erpWindows" />
-  <property name="client.web.xml" value="${base.client.src}/web.xml" />
   <property name="extension" value="html" />
   <property name="src" value="." />
   <property name="tr" value="yes" />
@@ -182,7 +180,7 @@
     </javac>
   </target>
   
-  <target name="sqlc" depends="copy.srcClient">
+  <target name="sqlc">
     <java classname="org.openbravo.data.Sqlc" fork="yes" 
jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" 
failonerror="true">
       <arg line="'${base.config}'/Openbravo.properties .xsql . 
'${build.sqlc}'/src" />
       <classpath refid="project.class.path" />
@@ -203,15 +201,6 @@
     <ant dir="${build.AD}" target="buildAD" inheritAll="true" 
inheritRefs="true" />
   </target>
 
-  <target name="copy.srcClient">
-    <mkdir dir="${base.client.src}" />
-    <copy todir="${basedir}" overwrite="true" failonerror="false">
-      <fileset dir="${base.client.src}">
-        <exclude name="**/web.xml" />
-      </fileset>
-    </copy>
-  </target>
-
   <target name="clean.src.gen">
     <delete includeEmptyDirs="true" failonerror="false">
       <fileset dir="${base.src.gen}" >
@@ -422,7 +411,7 @@
   
   <target name="wad" depends="init, wadvalidation">
     <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" 
fork="yes" maxmemory="${build.maxmemory}" failonerror="true">
-      <arg line="'${base.config}' '${tab}' 
'${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' 
'${build.sqlc}/src' '${webTab}' 
'${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' 
'${base.translate.structure}' '${client.web.xml}' '..' '${attach.path}' 
'${web.url}' '${base.src}' '${complete}' '${module}' 'noquick'" />
+      <arg line="'${base.config}' '${tab}' 
'${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' 
'${build.sqlc}/src' '${webTab}' 
'${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' 
'${base.translate.structure}' '' '..' '${attach.path}' '${web.url}' 
'${base.src}' '${complete}' '${module}' 'noquick'" />
       <classpath refid="wad.class.path" />
       <syspropertyset>
          <propertyref name="java.security.egd" />
@@ -433,7 +422,7 @@
 
   <target name="wad.quick" depends="init, wadvalidation">
     <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" 
fork="yes" maxmemory="${build.maxmemory}">
-      <arg line="'${base.config}' '${tab}' 
'${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' 
'${build.sqlc}/src' '${webTab}' 
'${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' 
'${base.translate.structure}' '${client.web.xml}' '..' '${attach.path}' 
'${web.url}' '${base.src}' '${complete}' '${module}' 'quick'" />
+      <arg line="'${base.config}' '${tab}' 
'${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' 
'${build.sqlc}/src' '${webTab}' 
'${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' 
'${base.translate.structure}' '' '..' '${attach.path}' '${web.url}' 
'${base.src}' '${complete}' '${module}' 'quick'" />
       <classpath refid="wad.class.path" />
       <syspropertyset>
          <propertyref name="java.security.egd" />
@@ -500,7 +489,7 @@
   </target>
 
   <!-- FIXME: These tasks is only for development and testing purposes, remove 
it afterwards-->
-  <target name="sqlcmod" depends="copy.srcClient">
+  <target name="sqlcmod">
     <java classname="org.openbravo.data.Sqlc" fork="yes" 
jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" 
failonerror="true">
       <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' 
'${build.sqlc}'/src */src" />
       <classpath refid="project.class.path" />

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to