[groovy] branch master updated (575f67a -> eaf651e)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[groovy] branch master updated (575f67a -> eaf651e)

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

sunlan pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git.


    from 575f67a  copy method target for variable that resolves to implicit-this property
     new 412edb8  GROOVY-8305: build "file:" URL for "user.home" and set as Ivy variable
     new 707c2bf  remove extra config
     new eaf651e  if dependency is found in local .m2 repo, don't copy jars to grape cache

The 3 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:
 src/main/groovy/groovy/grape/GrapeIvy.groovy       |  1 +
 src/resources/groovy/grape/defaultGrapeConfig.xml  |  5 ++--
 .../groovy/grape/defaultGrapeConfig.xml            | 35 ----------------------
 3 files changed, 4 insertions(+), 37 deletions(-)
 delete mode 100644 src/test-resources/groovy/grape/defaultGrapeConfig.xml

Apache Groovy committer & PMC member

Blog: http://blog.sunlan.me
Twitter: @daniel_sun
Reply | Threaded
Open this post in threaded view
|

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

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

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 412edb87e78a62de9b0e4f6de09416cee0475cae
Author: Eric Milles <[hidden email]>
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>

Apache Groovy committer & PMC member

Blog: http://blog.sunlan.me
Twitter: @daniel_sun
Reply | Threaded
Open this post in threaded view
|

[groovy] 02/03: remove extra config

Daniel.Sun
In reply to this post by Daniel.Sun
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 707c2bf3a15c6354ba6d0f124fa08f3ff3fe22ff
Author: Eric Milles <[hidden email]>
AuthorDate: Thu Nov 7 10:06:40 2019 -0600

    remove extra config
---
 .../groovy/grape/defaultGrapeConfig.xml            | 35 ----------------------
 1 file changed, 35 deletions(-)

diff --git a/src/test-resources/groovy/grape/defaultGrapeConfig.xml b/src/test-resources/groovy/grape/defaultGrapeConfig.xml
deleted file mode 100644
index cd33ee2..0000000
--- a/src/test-resources/groovy/grape/defaultGrapeConfig.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
-
-     Licensed to the Apache Software Foundation (ASF) under one
-     or more contributor license agreements.  See the NOTICE file
-     distributed with this work for additional information
-     regarding copyright ownership.  The ASF licenses this file
-     to you under the Apache License, Version 2.0 (the
-     "License"); you may not use this file except in compliance
-     with the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing,
-     software distributed under the License is distributed on an
-     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-     KIND, either express or implied.  See the License for the
-     specific language governing permissions and limitations
-     under the License.
-
--->
-<ivysettings>
-  <settings defaultResolver="downloadGrapes"/>
-  <resolvers>
-    <chain name="downloadGrapes" returnFirst="true">
-      <filesystem name="cachedGrapes">
-        <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="jcenter" root="http://jcenter.bintray.com/" m2compatible="true"/>-->
-      <ibiblio name="ibiblio" m2compatible="true"/>
-    </chain>
-  </resolvers>
-</ivysettings>

Apache Groovy committer & PMC member

Blog: http://blog.sunlan.me
Twitter: @daniel_sun
Reply | Threaded
Open this post in threaded view
|

[groovy] 03/03: if dependency is found in local .m2 repo, don't copy jars to grape cache

Daniel.Sun
In reply to this post by Daniel.Sun
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit eaf651e18c407e8564131c3cde36060c04811b03
Author: Eric Milles <[hidden email]>
AuthorDate: Thu Nov 7 10:16:05 2019 -0600

    if dependency is found in local .m2 repo, don't copy jars to grape cache
---
 src/resources/groovy/grape/defaultGrapeConfig.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/resources/groovy/grape/defaultGrapeConfig.xml b/src/resources/groovy/grape/defaultGrapeConfig.xml
index 14a180f..4d17a40 100644
--- a/src/resources/groovy/grape/defaultGrapeConfig.xml
+++ b/src/resources/groovy/grape/defaultGrapeConfig.xml
@@ -19,6 +19,7 @@
 
 -->
 <ivysettings>
+  <caches useOrigin="true"/>
   <settings defaultResolver="downloadGrapes"/>
   <resolvers>
     <chain name="downloadGrapes" returnFirst="true">

Apache Groovy committer & PMC member

Blog: http://blog.sunlan.me
Twitter: @daniel_sun