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

Jacques Le Roux commented on OFBIZ-10145:
-----------------------------------------

Thanks Swapnil,

Yes this is what I thought about, your script looks good to me. Previouysly I 
wrote:

bq. I even thought about hacking the gradlew scripts, then we would not need 
init-gradle-wrapper at all. But those are generated with Gradle installation 
and better keep them as delivered by Gradle.

I thought about it a bit more. We have those 2 scripts in our repo. When we 
will update Gradle (using something like {{gradlew wrapper --gradle-version 
5.4.1}}) Gradle may change those scripts. So if we put a call to our 
init-gradle-wrapper scripts in them they will be removed. But it's then very 
easy to put them again notably because we will have a copy of the preceding 
version in our repo.

So I finally suggest that we call our init-gradle-wrapper scripts from both 
gradlew and gradlew.bat script if the Wrapper is not present. Then no need to 
ask our users to run the init-gradle-wrapper by hand using the starting script 
(gradlew or gradlew.bat) would be enough. 

I even suggest that we keep the message from init-gradle-wrapper.sh
bq. "Gradle is not found in your system, downloading it to instantiate the 
wrapper."
to reassure the users about what's going on. The download can be long before 
you can really use OFBiz, I'd even add a message explaining that.

> Remove the Gradle wrapper from our release packages and add a step to our 
> build notes
> -------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-10145
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10145
>             Project: OFBiz
>          Issue Type: Task
>          Components: Gradle
>    Affects Versions: 17.12.01, 16.11.06, 18.12.01
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>            Priority: Blocker
>             Fix For: 17.12.01
>
>         Attachments: OFBIZ-10145-gradlew.patch, init-gradle-wrapper-R16.sh, 
> init-gradle-wrapper-trunk-and-18.sh, init-gradle-wrapper-trunk-and-18.sh, 
> init-gradle-wrapper-trunk-and-18.sh, init-gradle-wrapper-trunk-and-18.sh, 
> init-gradle-wrapper.ps1, init-gradle-wrapper.sh, init-gradle-wrapper.sh, 
> init-gradle-wrapper.sh, init-gradle-wrapper.sh, init-gradle-wrapper.sh, 
> init-gradlew-readme-R16.patch, init-gradlew-readme-R17.1.patch, 
> init-gradlew-readme-R17.1.patch, init-gradlew-readme.patch, 
> init-gradlew-readme.patch
>
>
> Following the discussion at http://markmail.org/message/nd7grfiyobjkfwae, 
> considering LEGAL-288 and based on a lazy consensus on dev ML, we want to 
> remove the gradle-wrapper.jar file from the next packaged releases and  use 
> [~jacopoc]'s related proposition to document how to have Gradle working in 
> the main README.md file.
> # Extract the archive file to your local directory.
> # Download gradle-wrapper.jar and place it in the 
> OFBiz-root-dir/gradle/wrapper folder.
> I'm not sure if we should recommend a link to download the 
> gradle-wrapper.jar. This might change in the future (versions, etc.), so 
> indeed maybe simply asking to download is enough, cf  
> https://www.google.com/search?q=gradle-wrapper.jar+download&ie=UTF-8
> Also we need to add a point about removing gradle-wrapper.jar in 
> https://cwiki.apache.org/confluence/display/OFBIZ/Release+Management+Guide+for+OFBiz



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to