issue 0009015
authorAsier Lostalé <asier.lostale@openbravo.com>
Tue, 20 Oct 2009 16:37:04 +0200
changeset 5275 04b64e763122
parent 5274 2c97818848a5
child 5276 92157df159bf
issue 0009015

Do not stop the compilation process in case validation is not successful to allow instances with
not valid modules to compile successfully.
build.xml
src-wad/src/org/openbravo/wad/Wad.java
src-wad/src/org/openbravo/wad/validation/WADValidationResult.java
src/build.xml
--- a/build.xml	Tue Oct 20 11:12:21 2009 +0200
+++ b/build.xml	Tue Oct 20 16:37:04 2009 +0200
@@ -105,7 +105,7 @@
   <property name="local" value="true" />
   <property name="apply.modules.complete.compilation" value="false" />
   <property name="calculate.core.revision" value="true"/>
-  <property name="stopOnWadError" value="true"/>
+  <property name="stopOnWadError" value="false"/>
 
   <available file=".hg" property="is.hg" />
 
--- a/src-wad/src/org/openbravo/wad/Wad.java	Tue Oct 20 11:12:21 2009 +0200
+++ b/src-wad/src/org/openbravo/wad/Wad.java	Tue Oct 20 16:37:04 2009 +0200
@@ -291,6 +291,7 @@
       log4j.info("Web path: " + webPath);
       log4j.info("Src path: " + strBaseSrc);
       log4j.info("Quick mode: " + quick);
+      log4j.info("Stop on failed verification:" + failOnErrorVerification);
 
       final File fileFin = new File(dirFin);
       if (!fileFin.exists()) {
--- a/src-wad/src/org/openbravo/wad/validation/WADValidationResult.java	Tue Oct 20 11:12:21 2009 +0200
+++ b/src-wad/src/org/openbravo/wad/validation/WADValidationResult.java	Tue Oct 20 16:37:04 2009 +0200
@@ -116,12 +116,19 @@
       }
     }
 
+    if (errors.size() > 0) {
+      log.error("The following errors during validation do not stop the");
+      log.error("compilation process to allow backwards compatibility for");
+      log.error("modules, but they MUST be fixed because in future core ");
+      log.error("releases they will not be allowed.");
+    }
+
     for (WADValidationType type : errors.keySet()) {
       log.error("+++++++++++++++++++++++++++++++++++++++++++++++++++");
       log.error("Errors for Validation type: " + type.getDescription());
       log.error("+++++++++++++++++++++++++++++++++++++++++++++++++++");
-      for (String warn : errors.get(type)) {
-        log.warn(warn);
+      for (String error : errors.get(type)) {
+        log.error(error);
       }
     }
 
--- a/src/build.xml	Tue Oct 20 11:12:21 2009 +0200
+++ b/src/build.xml	Tue Oct 20 16:37:04 2009 +0200
@@ -346,17 +346,15 @@
 
   <target name="wad" depends="init">
     <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}' '${stopOnWadError}'" />
+      <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' '${stopOnWadError}'" />
       <classpath refid="project.class.path" />
     </java>
     <antcall target="postwad" inheritall="true" inheritrefs="true" />
   </target>
 
   <target name="wad.quick" depends="init">
-
-
     <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}' '${client.web.xml}' '..' '${attach.path}' '${web.url}' '${base.src}' '${complete}' '${module}' 'quick' '${stopOnWadError}'" />
       <classpath refid="project.class.path" />
     </java>
     <antcall target="postwad" inheritall="true" inheritrefs="true" />