You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2019/06/30 16:32:39 UTC

svn commit: r1862353 - in /ofbiz/ofbiz-framework/trunk: gradle/init-gradle-wrapper.ps1 gradlew gradlew.bat

Author: jleroux
Date: Sun Jun 30 16:32:39 2019
New Revision: 1862353

URL: http://svn.apache.org/viewvc?rev=1862353&view=rev
Log:
Improved: Remove the Gradle wrapper from our release packages and add a step to 
our build notes
(OFBIZ-10145)

Applies the last waiting gradlew.bat.patch in OFBIZ-10145 
Fixes a trivial issue in Mathieu last commits: repeated "-Xms64m" in gradlew 
scripts.
Uses HTTP in init-gradle-wrapper.ps1 instead of HTTP. Not everyone has an HTTPS 
access to the tools repo.

Modified:
    ofbiz/ofbiz-framework/trunk/gradle/init-gradle-wrapper.ps1
    ofbiz/ofbiz-framework/trunk/gradlew
    ofbiz/ofbiz-framework/trunk/gradlew.bat

Modified: ofbiz/ofbiz-framework/trunk/gradle/init-gradle-wrapper.ps1
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/gradle/init-gradle-wrapper.ps1?rev=1862353&r1=1862352&r2=1862353&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/gradle/init-gradle-wrapper.ps1 (original)
+++ ofbiz/ofbiz-framework/trunk/gradle/init-gradle-wrapper.ps1 Sun Jun 30 16:32:39 2019
@@ -22,5 +22,5 @@ if (! (Test-Path -Path ((Get-Item -Path
 
 # This uses  PowerShell Invoke-WebRequest command (aliased as wget here)
 # https is not used because we don't want users to be asked for a credential (not sure about that, maybe https is OK)
-wget -outf gradle\wrapper\gradle-wrapper.jar https://svn.apache.org/repos/asf/ofbiz/tools/Buildbot/Gradle/Wrapper/trunk/gradle-wrapper.jar
-wget -outf gradle\wrapper\gradle-wrapper.properties https://svn.apache.org/repos/asf/ofbiz/tools/Buildbot/Gradle/Wrapper/trunk/gradle-wrapper.properties
+wget -outf gradle\wrapper\gradle-wrapper.jar http://svn.apache.org/repos/asf/ofbiz/tools/Buildbot/Gradle/Wrapper/trunk/gradle-wrapper.jar
+wget -outf gradle\wrapper\gradle-wrapper.properties http://svn.apache.org/repos/asf/ofbiz/tools/Buildbot/Gradle/Wrapper/trunk/gradle-wrapper.properties

Modified: ofbiz/ofbiz-framework/trunk/gradlew
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/gradlew?rev=1862353&r1=1862352&r2=1862353&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/gradlew (original)
+++ ofbiz/ofbiz-framework/trunk/gradlew Sun Jun 30 16:32:39 2019
@@ -51,7 +51,7 @@ APP_NAME="Gradle"
 APP_BASE_NAME=`basename "$0"`
 
 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+DEFAULT_JVM_OPTS='"-Xmx64m"
 
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 MAX_FD="maximum"

Modified: ofbiz/ofbiz-framework/trunk/gradlew.bat
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/gradlew.bat?rev=1862353&r1=1862352&r2=1862353&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/gradlew.bat (original)
+++ ofbiz/ofbiz-framework/trunk/gradlew.bat Sun Jun 30 16:32:39 2019
@@ -30,7 +30,7 @@ set APP_BASE_NAME=%~n0
 set APP_HOME=%DIRNAME%
 
 @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+set DEFAULT_JVM_OPTS="-Xmx64m"
 
 @rem Find java.exe
 if defined JAVA_HOME goto findJavaFromJavaHome
@@ -78,16 +78,12 @@ set CMD_LINE_ARGS=%*
 
 :execute
 @rem Setup the command line
-
 set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
 
-@rem check if Gradle is installed
-if exist "%CLASSPATH%" goto GradleOK
-
-md %APP_HOME%\gradle\wrapper\
-Powershell.exe -executionpolicy remotesigned -File  %APP_HOME%\init-gradle-wrapper.ps1
+@rem Overwrites the local Gradle Wrapper files from tools repo in all cases (it's only 55kb). 
+@rem This way we are sure to always use the latest version. At least when an Internet connexion is available.
+Powershell.exe -executionpolicy remotesigned -File %APP_HOME%\gradle\init-gradle-wrapper.ps1
 
-:GradleOK
 @rem Execute Gradle
 "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
 



Re: svn commit: r1862353 - in /ofbiz/ofbiz-framework/trunk: gradle/init-gradle-wrapper.ps1 gradlew gradlew.bat

Posted by Jacques Le Roux <ja...@les7arts.com>.
Le 30/06/2019 à 18:57, Mathieu Lirzin a écrit :
> Hello Jacques,
>
> jleroux@apache.org writes:
>
>>   # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
>> -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
>> +DEFAULT_JVM_OPTS='"-Xmx64m"
> In fact there was no repetition here.  “Xms” and “Xmx” are different
> options corresponding respectively to the “initial heap size” and the
> “max heap size”.
>
> It was added automatically when doing the upgrade with the ‘./gradlew
> wrapper ...’ command, so I guess we should keep both options which are
> Gradle recommended defaults.
Hi Mathieu,

We crossed on wire, you are right. I just spotted it while reusing gradlew which puts it there again. I really fixed it again!

Sorry for the noise

Jacques


Re: svn commit: r1862353 - in /ofbiz/ofbiz-framework/trunk: gradle/init-gradle-wrapper.ps1 gradlew gradlew.bat

Posted by Mathieu Lirzin <ma...@nereide.fr>.
Hello Jacques,

jleroux@apache.org writes:

>  # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
> -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
> +DEFAULT_JVM_OPTS='"-Xmx64m"

In fact there was no repetition here.  “Xms” and “Xmx” are different
options corresponding respectively to the “initial heap size” and the
“max heap size”.

It was added automatically when doing the upgrade with the ‘./gradlew
wrapper ...’ command, so I guess we should keep both options which are
Gradle recommended defaults.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37