details: https://code.openbravo.com/erp/devel/pi/rev/58db95f4c316 changeset: 35545:58db95f4c316 user: Javier Armendáriz <javier.armendariz <at> openbravo.com> date: Thu Mar 21 09:52:12 2019 +0100 summary: Fixed issue 40425: log config file not created when updating from 18Q4.1+
Removed execution limit, so this build validation is executed when log4j2*.xml is not found. diffstat: src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/CopyLog4jConfigurationFromTemplates.class | Bin src-util/buildvalidation/src/org/openbravo/buildvalidation/CopyLog4jConfigurationFromTemplates.java | 15 ++-------- 2 files changed, 3 insertions(+), 12 deletions(-) diffs (52 lines): diff -r 35ce07c42013 -r 58db95f4c316 src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/CopyLog4jConfigurationFromTemplates.class Binary file src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/CopyLog4jConfigurationFromTemplates.class has changed diff -r 35ce07c42013 -r 58db95f4c316 src-util/buildvalidation/src/org/openbravo/buildvalidation/CopyLog4jConfigurationFromTemplates.java --- a/src-util/buildvalidation/src/org/openbravo/buildvalidation/CopyLog4jConfigurationFromTemplates.java Wed Mar 20 10:25:27 2019 +0100 +++ b/src-util/buildvalidation/src/org/openbravo/buildvalidation/CopyLog4jConfigurationFromTemplates.java Thu Mar 21 09:52:12 2019 +0100 @@ -11,7 +11,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) 2018 Openbravo SLU + * All portions are Copyright (C) 2018-2019 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -25,16 +25,12 @@ import java.util.ArrayList; import java.util.List; -import org.openbravo.base.ExecutionLimits; -import org.openbravo.modulescript.OpenbravoVersion; - /** * This script will be executed only when migrating from a version which still supports log4j 1.x * and copies all new configuration files from the template */ public class CopyLog4jConfigurationFromTemplates extends BuildValidation { - private static final String CORE_MODULE_ID = "0"; private static final String CONFIG_DIR = "/config/"; private static final String TEST_SRC_DIR = "/src-test/src/"; private static final String LOG4J_CONF_FILE = "log4j2.xml"; @@ -49,8 +45,8 @@ copyFromTemplateFile(sourcePath + CONFIG_DIR + LOG4J_WEB_CONF_FILE); copyFromTemplateFile(sourcePath + TEST_SRC_DIR + LOG4J_TEST_CONF_FILE); } catch (Exception e) { - System.out - .println("Copy log4j config from templates failed: Log4j may not be properly configured. Please check your configuration files manually."); + System.out.println( + "Copy log4j config from templates failed: Log4j may not be properly configured. Please check your configuration files manually."); } return new ArrayList<>(); @@ -89,9 +85,4 @@ throw new NoSuchFileException(configDir.toString()); } - @Override - protected ExecutionLimits getBuildValidationLimits() { - return new ExecutionLimits(CORE_MODULE_ID, null, new OpenbravoVersion(3, 0, 34826)); - } - } _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits