[ 
https://issues.apache.org/jira/browse/OFBIZ-12136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17265974#comment-17265974
 ] 

ASF subversion and git services commented on OFBIZ-12136:
---------------------------------------------------------

Commit cc76b990cf3aee0b216c0b4d0dd589a2f5dee947 in ofbiz-framework's branch 
refs/heads/trunk from Ioan Eugen Stan
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=cc76b99 ]

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

> Add extra classpath directories for ofbiz.tar/zip distribution
> --------------------------------------------------------------
>
>                 Key: OFBIZ-12136
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12136
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Trunk
>            Reporter: Ioan Eugen Stan
>            Assignee: Daniel Watford
>            Priority: Major
>
> See 
> [https://lists.apache.org/thread.html/r210c63f3f0d6efd0b4fe2e2141689ae501c518671cfe1e5d4f7a9417%40%3Cdev.ofbiz.apache.org%3E
>  
> |https://lists.apache.org/thread.html/r210c63f3f0d6efd0b4fe2e2141689ae501c518671cfe1e5d4f7a9417%40%3Cdev.ofbiz.apache.org%3E]
> It would help to have the ability to add jars and configuration files to the 
> classpath - since that is where ofbiz looks for. 
>  
> So the idea is to make it easy for people to add things at the BEGINING of 
> the classpath so they can override ofbiz configurations (and / or libraries 
> ?!) 
>  
> I believe this can achieved for both gradle deploy and binary (ofbiz.tar) 
> deploy with minimal changes. 
>  
> If you could add the code snippet bellow to build.gradle then people can add 
> files to config/ and lib-extra/ directories and they will be available for 
> ofbiz when it starts. 
>  
> I've tested this and it works for my ofbiz docker build (I'm planning an 
> article these next 2 days and will share it. Spoiler: it works on ARM - 
> raspberry pi 4 ). 
>  
> I'm also adding the database drivers post build to lib-extra since gradle 
> hardcodes the classpath at build. Adding new jars to lib/ does not do 
> anything. 
>  
> That way I can keep the ofbiz source unchanged and still get what I need. 
> {code:java}
> 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')
>     }
> } 
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to