[shrinkwrap-issues] [JBoss JIRA] (SHRINKRES-303) Dependencies with version ranges cannot be resolved in offline mode

Thorsten Meinl (Jira) issues at jboss.org
Mon Apr 20 09:09:20 EDT 2020


    [ https://issues.redhat.com/browse/SHRINKRES-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14046493#comment-14046493 ] 

Thorsten Meinl commented on SHRINKRES-303:
------------------------------------------

 [^shrinkres-303.zip] contains a minimal reproducer, simply run {{mvn verify}}. Resolution of _junit:junit [4.0,5.0)_ works online but not in offline mode although a matching artifact is certainly present in the .m2 cache.

> Dependencies with version ranges cannot be resolved in offline mode
> -------------------------------------------------------------------
>
>                 Key: SHRINKRES-303
>                 URL: https://issues.redhat.com/browse/SHRINKRES-303
>             Project: ShrinkWrap Resolvers
>          Issue Type: Bug
>    Affects Versions: 3.1.3
>            Reporter: Thorsten Meinl
>            Priority: Major
>         Attachments: shrinkres-303.zip
>
>
> We are using Maven version ranges for several dependencies in our project. Shrinkwrap is able to resolve those correctly as long it has access to the remove repository (or mirror). However, when the resolver is put into offline mode ({{workOffline()}}), dependencies with version ranges cannot be resolved any more although they are present/cached in the local .m2 repository.
> The reason seems to be that as soon as you use version ranges, _maven-metadata.xml_ files are used. However, when being in offline mode only _maven-metadata-local.xml_ is inspected during resolution but not _maven-metadata-mirror.xml_ (for example). maven-metadata-local.xml either doesn't exist at all or contains only locally {{install}} ed artifacts but no cached remote artifacts.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the shrinkwrap-issues mailing list