You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2019/11/07 14:22:53 UTC

[groovy] branch GROOVY-8305 created (now fe01cd0)

This is an automated email from the ASF dual-hosted git repository.

emilles pushed a change to branch GROOVY-8305
in repository https://gitbox.apache.org/repos/asf/groovy.git.


      at fe01cd0  GROOVY-8305: build "file:" URL for "user.home" and set as Ivy variable

This branch includes the following new commits:

     new fe01cd0  GROOVY-8305: build "file:" URL for "user.home" and set as Ivy variable

The 1 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.



[groovy] 01/01: GROOVY-8305: build "file:" URL for "user.home" and set as Ivy variable

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

emilles pushed a commit to branch GROOVY-8305
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit fe01cd0fe080bce52df047e475df025057233678
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Thu Nov 7 08:22:34 2019 -0600

    GROOVY-8305: build "file:" URL for "user.home" and set as Ivy variable
---
 src/main/groovy/groovy/grape/GrapeIvy.groovy      | 1 +
 src/resources/groovy/grape/defaultGrapeConfig.xml | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/groovy/groovy/grape/GrapeIvy.groovy b/src/main/groovy/groovy/grape/GrapeIvy.groovy
index c1c637e..64fef55 100644
--- a/src/main/groovy/groovy/grape/GrapeIvy.groovy
+++ b/src/main/groovy/groovy/grape/GrapeIvy.groovy
@@ -90,6 +90,7 @@ class GrapeIvy implements GrapeEngine {
         // start ivy
         Message.defaultLogger = new DefaultMessageLogger(System.getProperty('ivy.message.logger.level', '-1') as int)
         settings = new IvySettings()
+        settings.setVariable('user.home.url', new File(System.getProperty('user.home')).toURI().toURL() as String)
 
         // configure settings
         def grapeConfig = localGrapeConfig
diff --git a/src/resources/groovy/grape/defaultGrapeConfig.xml b/src/resources/groovy/grape/defaultGrapeConfig.xml
index 11161d3..14a180f 100644
--- a/src/resources/groovy/grape/defaultGrapeConfig.xml
+++ b/src/resources/groovy/grape/defaultGrapeConfig.xml
@@ -26,8 +26,8 @@
         <ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
         <artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"/>
       </filesystem>
-      <ibiblio name="localm2" root="file:${user.home}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
-      <!-- todo add 'endorsed groovy extensions' resolver here -->
+      <ibiblio name="localm2" root="${user.home.url}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
+      <!-- TODO: add 'endorsed groovy extensions' resolver here -->
       <ibiblio name="jcenter" root="https://jcenter.bintray.com/" m2compatible="true"/>
       <ibiblio name="ibiblio" m2compatible="true"/>
     </chain>