You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2019/11/21 19:37:00 UTC

[jira] [Comment Edited] (GROOVY-9312) Recent grape changes break certain usage on Windows

    [ https://issues.apache.org/jira/browse/GROOVY-9312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16979558#comment-16979558 ] 

Eric Milles edited comment on GROOVY-9312 at 11/21/19 7:36 PM:
---------------------------------------------------------------

This is the check that Ivy is making:
{code:java}
private File getArchiveFileInCache(Artifact artifact, ArtifactOrigin origin, boolean useOrigin) {
    if (useOrigin && !ArtifactOrigin.isUnknown(origin) && origin.isLocal()) {
        return Checks.checkAbsolute(origin.getLocation(), artifact + " origin location"); // HERE
    }
    return new File(getRepositoryCacheRoot(), getArchivePathInCache(artifact, origin));
}
{code}

The addition of {{<caches useOrigin="true"/>}} to {{defaultGrapeConfig.xml}} triggered this.


was (Author: emilles):
This is the check that Ivy is making:
{code:java}
    private File getArchiveFileInCache(Artifact artifact, ArtifactOrigin origin, boolean useOrigin) {
        if (useOrigin && !ArtifactOrigin.isUnknown(origin) && origin.isLocal()) {
            return Checks.checkAbsolute(origin.getLocation(), artifact + " origin location"); // HERE
        }
        return new File(getRepositoryCacheRoot(), getArchivePathInCache(artifact, origin));
    }
{code}

The addition of {{<caches useOrigin="true"/>}} to {{defaultGrapeConfig.xml}} triggered this.

> Recent grape changes break certain usage on Windows
> ---------------------------------------------------
>
>                 Key: GROOVY-9312
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9312
>             Project: Groovy
>          Issue Type: Improvement
>          Components: Grape
>         Environment: Windows 10
>            Reporter: Paul King
>            Assignee: Eric Milles
>            Priority: Major
>
> The following code works in 3.0.0-rc-1 but fails in master and the 3_0_X branch:
> {code}
> @Grab('net.jqwik:jqwik:1.1.4')
> import groovy.transform.CompileStatic
> import net.jqwik.api.ForAll
> import net.jqwik.api.Property
> import net.jqwik.api.constraints.IntRange;
> @CompileStatic
> class Jsr308 {
>     @Property
>     boolean 'size zero or positive'(
>             @ForAll List<Integer> items
>     ) {
>         items.size() >= 0
>     }
> }
> {code}
> The error is:
> {noformat}
> java.lang.IllegalArgumentException: org.opentest4j#opentest4j;1.1.1!opentest4j.jar origin location must be absolute: file:C:/Users/Paul King/.m2/repository/org/opentest4j/opentest4j/1.1.1/opentest4j-1.1.1.jar
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)