[ofbiz-framework] branch release18.12 updated (94265fd -> e0e9d0d)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch release18.12 updated (94265fd -> e0e9d0d)

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a change to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git.


    from 94265fd  Fixed: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)
     new 1a70633  Fixed: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)
     new e0e9d0d  Fixed: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.adoc                    | 17 ++++++++++-------
 gradle/init-gradle-wrapper.ps1 | 17 ++++++++++-------
 init-gradle-wrapper.bat        |  9 ++++++---
 3 files changed, 26 insertions(+), 17 deletions(-)

Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] 01/02: Fixed: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 1a70633c45405a9c9c144830c39286e0b83b39d2
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Sat Mar 13 23:13:40 2021 +0100

    Fixed: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)
   
    Updates init-gradle-wrapper.bat
      to exit if Gradle wrapper already exists
      to start PowerShell (>=7) in admin mode, this to be able to use Set-ItemProperty
   
    Updates init-gradle-wrapper.ps1
     to removes exit if Gradle wrapper already exists
     to create the gradle/wrapper dir if necessary
     to handle the ConstrainedLanguage mode if necessary
   
    Conflicts handled by hand
      gradle/init-gradle-wrapper.ps1
---
 gradle/init-gradle-wrapper.ps1 | 17 ++++++++++-------
 init-gradle-wrapper.bat        |  9 ++++++---
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/gradle/init-gradle-wrapper.ps1 b/gradle/init-gradle-wrapper.ps1
index c5fb0df..5d6a8c9 100644
--- a/gradle/init-gradle-wrapper.ps1
+++ b/gradle/init-gradle-wrapper.ps1
@@ -15,13 +15,16 @@
 # specific language governing permissions and limitations
 # under the License.
 
-if ((Test-Path -Path ((Get-Item -Path ".\").FullName + "\gradle\wrapper\gradle-wrapper.jar")) -and (Test-Path -Path ((Get-Item -Path ".\").FullName + "\gradle\wrapper\gradle-wrapper.properties"))) {
-    Write-Host "The Gradle Wrapper has already been downloaded.";
-    exit
+md -force gradle/wrapper
+
+If ($ExecutionContext.SessionState.LanguageMode -eq "ConstrainedLanguage") {
+    Set-ItemProperty 'hklm:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -name "__PSLockdownPolicy" -Value 8
+    Invoke-WebRequest -outf gradle\wrapper\gradle-wrapper.jar https://github.com/gradle/gradle/raw/v5.0.0/gradle/wrapper/gradle-wrapper.jar
+    Set-ItemProperty 'hklm:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -name "__PSLockdownPolicy" -Value 4
+} else {
+    Invoke-WebRequest -outf gradle\wrapper\gradle-wrapper.jar https://github.com/gradle/gradle/raw/v5.0.0/gradle/wrapper/gradle-wrapper.jar
 }
 
-# HTTPS is not used because it gets complicated with Powershell and .Net framework versions
-Invoke-WebRequest -outf gradle\wrapper\gradle-wrapper.jar http://dl.bintray.com/apacheofbiz/GradleWrapper/v5.0.0/gradle-wrapper.jar
-Invoke-WebRequest -outf gradle\wrapper\gradle-wrapper.properties http://dl.bintray.com/apacheofbiz/GradleWrapper/v5.0.0/gradle-wrapper.properties
-Invoke-WebRequest -outf gradlew.bat http://dl.bintray.com/apacheofbiz/GradleWrapper/v5.0.0/gradlew.bat
+#Write-Host $ExecutionContext.SessionState.LanguageMode
 
+Start-Sleep -s 3
diff --git a/init-gradle-wrapper.bat b/init-gradle-wrapper.bat
index 05327d7..3440521 100755
--- a/init-gradle-wrapper.bat
+++ b/init-gradle-wrapper.bat
@@ -17,7 +17,10 @@ rem KIND, either express or implied.  See the License for the
 rem specific language governing permissions and limitations
 rem under the License.
 rem #####################################################################
-rem interactive DOS version of mergefromtrunk.sh.
-rem to use : launch and pass the trunk version number to merge in release
 
-Powershell.exe -executionpolicy bypass -File  gradle\init-gradle-wrapper.ps1
\ No newline at end of file
+if exist "%~dp0gradle\wrapper\gradle-wrapper.jar" (
+    echo The Gradle Wrapper has already been downloaded.
+    exit /b
+)
+
+pwsh  -command "  Start-Process pwsh -Verb RunAs \""-Command `\""cd '%cd%'; & 'gradle\init-gradle-wrapper.ps1';`\""\""   "

Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] 02/02: Fixed: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)

jleroux@apache.org
In reply to this post by jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit e0e9d0deeea1cc3dfc85ba1ec06627e0b7558642
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Sun Mar 14 09:50:06 2021 +0100

    Fixed: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)
   
    Updates the documentation for Windows and Gradle wrapper download, needs
    Powershell
   
    Conflicts handled by hand
      README.adoc
---
 README.adoc | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/README.adoc b/README.adoc
index 1d4b821..43b83b1 100644
--- a/README.adoc
+++ b/README.adoc
@@ -59,14 +59,17 @@ ________________________________________________________________________________
 [[system-requirements]]
 == System requirements
 
-The only requirement to run OFBiz is to have the Java Development Kit (JDK)
-version 8 installed on your system (not just the JRE, but the full JDK) which
-you can download from the below link. Make sure of setting the $JAVA_HOME
-environment variable.
+The only requirements to run OFBiz is
+
+* to have the Java Development Kit (JDK) version 8 installed on your system
+(not just the JRE, but the full JDK) that you can download from the below link.
+Make sure of setting the $JAVA_HOME environment variable. +
+https://adoptopenjdk.net/[JDK download], https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244[To know more about the JDK]
+
+* If on Windows, a Powershell version >= 7.1.3 installed that you can download from the below link. +
+https://github.com/PowerShell/PowerShell[Powershell]
 
-https://adoptopenjdk.net/[JDK download]
 
-https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244[To know more about the JDK]
 
 [[quick-start]]
 // tag::quickstart[]
@@ -395,7 +398,7 @@ dash!
 Loads all data sets; meant for initial loading of generic OFBiz data. Can be
 applied for development, testing, demonstration, etc. purposes. Be aware that
 executing this task can result in your data being overwritten in your database
-of choice.
+of choice.
 
 `gradlew loadAll` OR `gradlew "ofbiz --load-data"`