You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by da...@apache.org on 2021/01/15 11:54:54 UTC

[ofbiz-framework] branch trunk updated: Improved: Add extra classpath directories for ofbiz.tar/zip

This is an automated email from the ASF dual-hosted git repository.

danwatford pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new cc76b99  Improved: Add extra classpath directories for ofbiz.tar/zip
cc76b99 is described below

commit cc76b990cf3aee0b216c0b4d0dd589a2f5dee947
Author: Eugen Stan <ie...@apache.org>
AuthorDate: Fri Jan 15 13:54:43 2021 +0200

    Improved: Add extra classpath directories for ofbiz.tar/zip
    
    (OFBIZ-12136)
    
    Allows people to add configuration files and jars (database drivers) when
    using the binary distribution.
    
    Thanks: Eugen Stan for improvement
---
 build.gradle | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/build.gradle b/build.gradle
index 55d0fbc..139f526 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1106,3 +1106,15 @@ new File("${gradle.getGradleUserHomeDir().getAbsolutePath()}/daemon/${gradle.get
         it.delete()
     }
 }
+
+tasks.startScripts {
+    doLast {
+        // Alter the start script for Unix systems.
+        unixScript.text =
+                unixScript.text.replace('CLASSPATH=$APP_HOME/lib','CLASSPATH=$APP_HOME/config/:$APP_HOME/lib-extra/*:$APP_HOME/lib')
+        // Alter the start script for Windows systems.
+        windowsScript.text =
+                windowsScript.text.replace('CLASSPATH=%APP_HOME%\\lib',
+ 'CLASSPATH=%APP_HOME%\\conf\\;%APP_HOME%\\lib-extra\\*;%APP_HOME%\\lib')
+    }
+}