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

[jira] [Updated] (IVY-1616) useOrigin="true" fails with file-based ibiblio

     [ https://issues.apache.org/jira/browse/IVY-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles updated IVY-1616:
-----------------------------
    Description: 
We are trying to use Maven's artifacts if they have already been downloaded.  To that end, we have a file-based {{ibiblio}} resolver that points to the local .m2 repository directory.  If maven is used to download an artifact so that it is in .m2 and not in Ivy's cache, we are getting errors from the origin check in {{DefaultRepositoryCacheManager}}.

{code}
    java.lang.IllegalArgumentException: org.apache.maven.shared#maven-shared-utils;3.2.1!maven-shared-utils.jar origin location must be absolute: file:/C:/Users/Name/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
        at org.apache.ivy.util.Checks.checkAbsolute(Checks.java:57)
        at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getArchiveFileInCache(DefaultRepositoryCacheManager.java:410)
        at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.download(DefaultRepositoryCacheManager.java:996)
        at org.apache.ivy.plugins.resolver.BasicResolver.download(BasicResolver.java:836)
        at org.apache.ivy.plugins.resolver.RepositoryResolver.download(RepositoryResolver.java:305)
        at org.apache.ivy.plugins.resolver.IBiblioResolver.download(IBiblioResolver.java:563)
        at org.apache.ivy.core.resolve.ResolveEngine.downloadArtifacts(ResolveEngine.java:405)
        at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:351)
        at org.apache.ivy.Ivy.resolve(Ivy.java:522)
{code}


{code:xml}
<ivysettings>
  <caches useOrigin="true"/>
  <resolvers>
    <chain name="X" returnFirst="true">
      <ibiblio name="localm2" root="file:/C:/Users/Name/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
      <ibiblio name="ibiblio" m2compatible="true"/>
    </chain>
  </resolvers>
  <settings defaultResolver="X"/>
</ivysettings>
{code}


  was:
We are trying to use Maven's artifacts if they have already been downloaded.  To that end, we have a file-based {{ibiblio}} resolver that points to the local .m2 repository directory.  If maven is used to download an artifact so that it is in .m2 and not in Ivy's cache, we are getting errors from the origin check in {{DefaultRepositoryCacheManager}}.

{code}
    java.lang.IllegalArgumentException: org.apache.maven.shared#maven-shared-utils;3.2.1!maven-shared-utils.jar origin location must be absolute: file:/C:/Users/Name/.m2/repository/org/apache/mav
en/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
        at org.apache.ivy.util.Checks.checkAbsolute(Checks.java:57)
        at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getArchiveFileInCache(DefaultRepositoryCacheManager.java:410)
        at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.download(DefaultRepositoryCacheManager.java:996)
        at org.apache.ivy.plugins.resolver.BasicResolver.download(BasicResolver.java:836)
        at org.apache.ivy.plugins.resolver.RepositoryResolver.download(RepositoryResolver.java:305)
        at org.apache.ivy.plugins.resolver.IBiblioResolver.download(IBiblioResolver.java:563)
        at org.apache.ivy.core.resolve.ResolveEngine.downloadArtifacts(ResolveEngine.java:405)
        at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:351)
        at org.apache.ivy.Ivy.resolve(Ivy.java:522)
{code}


{code:xml}
<ivysettings>
  <caches useOrigin="true"/>
  <resolvers>
    <chain name="X" returnFirst="true">
      <ibiblio name="localm2" root="file:/C:/Users/Name/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
      <ibiblio name="ibiblio" m2compatible="true"/>
    </chain>
  </resolvers>
  <settings defaultResolver="X"/>
</ivysettings>
{code}



> useOrigin="true" fails with file-based ibiblio
> ----------------------------------------------
>
>                 Key: IVY-1616
>                 URL: https://issues.apache.org/jira/browse/IVY-1616
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.5.0
>            Reporter: Eric Milles
>            Priority: Major
>
> We are trying to use Maven's artifacts if they have already been downloaded.  To that end, we have a file-based {{ibiblio}} resolver that points to the local .m2 repository directory.  If maven is used to download an artifact so that it is in .m2 and not in Ivy's cache, we are getting errors from the origin check in {{DefaultRepositoryCacheManager}}.
> {code}
>     java.lang.IllegalArgumentException: org.apache.maven.shared#maven-shared-utils;3.2.1!maven-shared-utils.jar origin location must be absolute: file:/C:/Users/Name/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
>         at org.apache.ivy.util.Checks.checkAbsolute(Checks.java:57)
>         at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getArchiveFileInCache(DefaultRepositoryCacheManager.java:410)
>         at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.download(DefaultRepositoryCacheManager.java:996)
>         at org.apache.ivy.plugins.resolver.BasicResolver.download(BasicResolver.java:836)
>         at org.apache.ivy.plugins.resolver.RepositoryResolver.download(RepositoryResolver.java:305)
>         at org.apache.ivy.plugins.resolver.IBiblioResolver.download(IBiblioResolver.java:563)
>         at org.apache.ivy.core.resolve.ResolveEngine.downloadArtifacts(ResolveEngine.java:405)
>         at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:351)
>         at org.apache.ivy.Ivy.resolve(Ivy.java:522)
> {code}
> {code:xml}
> <ivysettings>
>   <caches useOrigin="true"/>
>   <resolvers>
>     <chain name="X" returnFirst="true">
>       <ibiblio name="localm2" root="file:/C:/Users/Name/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
>       <ibiblio name="ibiblio" m2compatible="true"/>
>     </chain>
>   </resolvers>
>   <settings defaultResolver="X"/>
> </ivysettings>
> {code}



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