|
[ https://issues.apache.org/jira/browse/OFBIZ-10145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16829422#comment-16829422 ] Swapnil M Mane commented on OFBIZ-10145: ---------------------------------------- Thanks, everyone for detailed discussion. Loved your work [~soledad] ! :) Here are my inputs and details on minor issue I faced +*Issue faced:*+ The whereis -b $1 | grep / command in my machine is giving following error {code:java} whereis: illegal option -- b usage: whereis program [...]{code} I am using Mac, here are details of my OS *macOS Mojave* *Version 10.14.3 (18D109)* I can understand that we used -b to search only for binaries in the script. I also checked the manual of whereis command on mac using command {code:java} man whereis{code} It also don't show -b option for whereis command on mac. (I know it generally works for Linux based OS). So, to fix this, I removed the -b option from whereis command in script. After this everything works like charm for me. Is anybody faced the same issue on the Mac? +*Suggestion/Improvement:*+ When I run the script the first time (after above fix), it starts downloading gradle. Now before completing the download, I mistakenly stop the downloading by terminating the download process. After this, I run the *init-gradle-wrapper-trunk-and-18.sh* script *again*. But this time I got following error {code:java} Archive: gradle-5.0-bin.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of gradle-5.0-bin.zip or gradle-5.0-bin.zip.zip, and cannot find gradle-5.0-bin.zip.ZIP, period. init-gradle-wrapper-trunk-and-18.sh: line 63: ./runtime/tmp/gradle-5.0/bin/gradle: No such file or directory{code} Since my *gradle-5.0-bin.zip* was corrupted because I stoped the download process in between. The command {code:java} unzip gradle-5.0-bin.zip{code} throws the above error. To fix this, I removed the corrupted file and run the script again,and everything worked as expected. We can do an improvement here, after running the command *unzip gradle-5.0-bin.zip* If it fails, we can show the message to the user to remove the corrupted file and run the script again. Here is suggested code improvement {code:java} unzip $GRADLE_ZIP_RELEASE; if [ $? -eq 0 ]; then cd ../.. ./runtime/tmp/$GRADLE_RELEASE/bin/$CMD_INIT_WRAPPER else echo "\nThe gradle-5.0-bin.zip file is corrupted.\nPlease remove this file from $OFBIZ_HOME/runtime/tmp location and run the script again." fi{code} Please feel free to share your thoughts on this. Nice work [~soledad] , thanks again! > 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: init-gradle-wrapper-trunk-and-18.sh, init-gradle-wrapper.sh, init-gradle-wrapper.sh > > > 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) |
| Free forum by Nabble | Edit this page |
