You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by apupier <gi...@git.apache.org> on 2017/08/30 15:42:13 UTC

[GitHub] groovy pull request #597: GROOVY-8305: Fix default Ivy settings file for loc...

GitHub user apupier opened a pull request:

    https://github.com/apache/groovy/pull/597

    GROOVY-8305: Fix default Ivy settings file for local m2 path

    - worth being tested on Linux
    - not sure how to write a test for that

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apupier/groovy GROOVY-8305-FixIvySettingsFile

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/597.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #597
    
----
commit 9740919cee991a573a45e288f8aa7d4490dfcc4f
Author: Aurélien Pupier <ap...@redhat.com>
Date:   2017-08-30T15:39:44Z

    GROOVY-8305: Fix default Ivy settings file for local m2 path
    
    Signed-off-by: Aurélien Pupier <ap...@redhat.com>

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] groovy pull request #597: GROOVY-8305: Fix default Ivy settings file for loc...

Posted by apupier <gi...@git.apache.org>.
Github user apupier commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/597#discussion_r136132695
  
    --- Diff: src/resources/groovy/grape/defaultGrapeConfig.xml ---
    @@ -26,7 +26,7 @@
             <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"/>
    +      <ibiblio name="localm2" root="file:/${user.home}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
    --- End diff --
    
    I tried with file:/// and it is not working:
    
    cachedGrapes: resource not reachable for org.apache.camel#camel-catalog-provider-karaf;2.19.2: res=C:\Users\Aurelien Pupier\.groovy\grapes\org.apache.camel\camel-catalog-provider-karaf\jars\camel-catalog-provider-karaf-2.19.2.jar
    	 trying file:///C:\Users\Aurelien Pupier/.m2/repository/org/apache/camel/camel-catalog-provider-karaf/2.19.2/camel-catalog-provider-karaf-2.19.2.jar
    		tried file:///C:\Users\Aurelien Pupier/.m2/repository/org/apache/camel/camel-catalog-provider-karaf/2.19.2/camel-catalog-provider-karaf-2.19.2.jar


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] groovy pull request #597: GROOVY-8305: Fix default Ivy settings file for loc...

Posted by lhein <gi...@git.apache.org>.
Github user lhein commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/597#discussion_r137280911
  
    --- Diff: src/resources/groovy/grape/defaultGrapeConfig.xml ---
    @@ -26,7 +26,7 @@
             <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"/>
    +      <ibiblio name="localm2" root="file:/${user.home}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
    --- End diff --
    
    just tested with file:// and it fails for me.


---

[GitHub] groovy pull request #597: GROOVY-8305: Fix default Ivy settings file for loc...

Posted by nickboldt <gi...@git.apache.org>.
Github user nickboldt commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/597#discussion_r141862977
  
    --- Diff: src/resources/groovy/grape/defaultGrapeConfig.xml ---
    @@ -26,7 +26,7 @@
             <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"/>
    +      <ibiblio name="localm2" root="file:/${user.home}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
    --- End diff --
    
    This seems logical/obvious since ${user.home} includes a prefix slash, and for a valid URI you need two slashes. Thus when in doubt, file:/${user.home}/path/to/things. This is true for p2 repo URIs too.


---

[GitHub] groovy pull request #597: GROOVY-8305: Fix default Ivy settings file for loc...

Posted by lhein <gi...@git.apache.org>.
Github user lhein commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/597#discussion_r137277087
  
    --- Diff: src/resources/groovy/grape/defaultGrapeConfig.xml ---
    @@ -26,7 +26,7 @@
             <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"/>
    +      <ibiblio name="localm2" root="file:/${user.home}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
    --- End diff --
    
     file:///${user.home}/.m2/repository/ 
    
    is most likely not correct. You will end up with 4 slashes on Linux/Unix.
    
    It should be file:// afaik


---

[GitHub] groovy pull request #597: GROOVY-8305: Fix default Ivy settings file for loc...

Posted by jaikiran <gi...@git.apache.org>.
Github user jaikiran commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/597#discussion_r136121797
  
    --- Diff: src/resources/groovy/grape/defaultGrapeConfig.xml ---
    @@ -26,7 +26,7 @@
             <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"/>
    +      <ibiblio name="localm2" root="file:/${user.home}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
    --- End diff --
    
    Actually, as noted in the RFC[1] and the simplified version[2], this should be:
    
    ```
    file:///${user.home}/.m2/repository/
    ```
    That should work fine both on Windows and *nix
    
    [1] https://tools.ietf.org/html/rfc8089
    [2] https://en.wikipedia.org/wiki/File_URI_scheme


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] groovy pull request #597: GROOVY-8305: Fix default Ivy settings file for loc...

Posted by apupier <gi...@git.apache.org>.
Github user apupier commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/597#discussion_r137282315
  
    --- Diff: src/resources/groovy/grape/defaultGrapeConfig.xml ---
    @@ -26,7 +26,7 @@
             <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"/>
    +      <ibiblio name="localm2" root="file:/${user.home}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
    --- End diff --
    
    to sum up:
    - "file:/"
    -- Windows OK
    -- Linux OK
    - "file://"
    -- Windows OK
    -- Linux KO
    - "file:///"
    -- Windows KO
    -- Linux KO
    
    and the winner is: "file:/"


---

[GitHub] groovy pull request #597: GROOVY-8305: Fix default Ivy settings file for loc...

Posted by lhein <gi...@git.apache.org>.
Github user lhein commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/597#discussion_r137279308
  
    --- Diff: src/resources/groovy/grape/defaultGrapeConfig.xml ---
    @@ -26,7 +26,7 @@
             <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"/>
    +      <ibiblio name="localm2" root="file:/${user.home}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
    --- End diff --
    
    besides that the change works on my fedora machine.


---

[GitHub] groovy pull request #597: GROOVY-8305: Fix default Ivy settings file for loc...

Posted by apupier <gi...@git.apache.org>.
Github user apupier commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/597#discussion_r136134093
  
    --- Diff: src/resources/groovy/grape/defaultGrapeConfig.xml ---
    @@ -26,7 +26,7 @@
             <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"/>
    +      <ibiblio name="localm2" root="file:/${user.home}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
    --- End diff --
    
    it is working with file://


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---