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

Taher Alkhateeb commented on OFBIZ-7893:
----------------------------------------

Hi Jacques,

I also like the idea of improving the jvm memory, however I recommend not to 
change the generated jar and apply the changes above because:

- by convention all gradle generated artifacts go in /build. there is even a 
buildDir variable. the jar by convention always sits next to the classes (even 
back in ant days except the start component)
- the ofbiz.jar you are looking at is not the same ofbiz.jar. It contains the 
full classpath of all the libraries which are hardcoded including things in 
your gradle cache. This requires re-running the build for any tiny changes. So 
using Java directly is really unreliable. That is why, for example, any server 
tasks depends on "build" in gradle to always make sure the classpath is correct 
so that the user does not have to call build after every change.
- Gradle as a full programming language is part of the OFBiz solution. One of 
the primary and excellent improvements it brought along is to isolate the user 
from knowing and passing JVM arguments. Even interacting with the server has a 
much nicer syntax and everything like sending to background or activating debug 
mode is all done for you wihout worrying about any details. So my 
recommendation is to let users focus on the work and let gradle handle the java 
details.
- Changing the jar name is not the best way, rather we should rename the 
project in settings.gradle. This is safer and maintains multiple conventions in 
place.
- The exclusions above are not the best solution and adds code bloat because we 
put them there. Instead we should fine tune the sourcesets block (specifically 
the resources section) to exclude whatever we want in there.
- This patch was made specifically for a user who has specific deployment 
requirements in which the build system is stripped away, for example even the 
rc scripts are reconverted from gradle to java. This is not a preferred idea 
for the above mentioned reasons.

So if you want to change things, I would recommend the following:
- we can apply the jvm memory arguments
- we can change and fix the name of the project to "ofbiz" in settings.gradle 
which would avoid the interventions on the jar task that affects other 
operations.

> Rename generated *ofbiz-gradle.jar* to *ofbiz.jar*
> --------------------------------------------------
>
>                 Key: OFBIZ-7893
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7893
>             Project: OFBiz
>          Issue Type: Sub-task
>            Reporter: Pierre Smits
>            Assignee: Pierre Smits
>         Attachments: OFBIZ-7893-build.gradle-v2.patch, 
> OFBIZ-7893-build.gradle.patch
>
>
> With the implementation of the Gradle build methodology the name of the OFBiz 
> executable changed from *ofbiz.jar* to *ofbiz-gradle.jar*.
> In order to keep consistency with older releases this should be changed so 
> that the old name is back.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to