details: /erp/devel/main/rev/0ead9342d172
changeset: 8777:0ead9342d172
user: Martin Taal <martin.taal <at> openbravo.com>
date: Mon Nov 01 15:27:53 2010 +0100
summary: Fixes issue 15081 You cannot update from RC2 to the latest MP
diffstat:
build.xml | 2 +-
src/org/openbravo/erpCommon/modules/ApplyModuleTask.java | 19 ++++++++++++++++
2 files changed, 20 insertions(+), 1 deletions(-)
diffs (66 lines):
diff -r beedd2ff8f70 -r 0ead9342d172 build.xml
--- a/build.xml Thu Oct 28 16:03:36 2010 +0200
+++ b/build.xml Mon Nov 01 15:27:53 2010 +0100
@@ -766,7 +766,7 @@
-->
<target name="apply.module" depends="compile.apply.module">
<java classname="org.openbravo.erpCommon.modules.ApplyModuleTask"
fork="true" maxmemory="${build.maxmemory}" failonerror="true">
- <arg line="'${base.src}'" />
+ <arg line="'${base.src}' '${friendlyWarnings}'" />
<classpath refid="apply.module.runtime.classpath" />
</java>
<delete includeEmptyDirs="true" dir="${build.apply.module}" />
diff -r beedd2ff8f70 -r 0ead9342d172
src/org/openbravo/erpCommon/modules/ApplyModuleTask.java
--- a/src/org/openbravo/erpCommon/modules/ApplyModuleTask.java Thu Oct 28
16:03:36 2010 +0200
+++ b/src/org/openbravo/erpCommon/modules/ApplyModuleTask.java Mon Nov 01
15:27:53 2010 +0100
@@ -25,6 +25,7 @@
import org.apache.tools.ant.BuildException;
import org.openbravo.base.AntExecutor;
import org.openbravo.base.exception.OBException;
+import org.openbravo.base.session.OBPropertiesProvider;
import org.openbravo.dal.core.DalInitializingTask;
import org.openbravo.database.CPStandAlone;
@@ -39,10 +40,15 @@
public static void main(String[] args) {
final String srcPath = args[0];
+ String friendlyWarnings = "false";
+ if (args.length >= 2) {
+ friendlyWarnings = args[1];
+ }
final File srcDir = new File(srcPath);
final File baseDir = srcDir.getParentFile();
try {
final AntExecutor antExecutor = new
AntExecutor(baseDir.getAbsolutePath());
+ antExecutor.setProperty("friendlyWarnings", friendlyWarnings);
antExecutor.runTask("apply.module.forked");
} catch (final Exception e) {
throw new OBException(e);
@@ -50,6 +56,11 @@
}
public void execute() {
+ // always do friendly warnings for the dal layer during apply module
+ // the unfriendly warnings are shown in generate.entities anyway
+ // if the correct property is not set.
+ OBPropertiesProvider.setFriendlyWarnings(true);
+
// Initialize DAL only in case it is needed: modules have refrence data to
be loaded
CPStandAlone pool = new CPStandAlone(propertiesFile);
ApplyModuleData[] ds = null;
@@ -75,6 +86,14 @@
}
}
+ public boolean getFriendlyWarnings() {
+ return OBPropertiesProvider.isFriendlyWarnings();
+ }
+
+ public void setFriendlyWarnings(boolean doFriendlyWarnings) {
+ OBPropertiesProvider.setFriendlyWarnings(doFriendlyWarnings);
+ }
+
@Override
public void doExecute() {
try {
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits