[JBoss JIRA] (SHRINKRES-303) Dependencies with version ranges cannot be resolved in offline mode
by Thorsten Meinl (Jira)
[ https://issues.redhat.com/browse/SHRINKRES-303?page=com.atlassian.jira.pl... ]
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)
4 years
[JBoss JIRA] (SHRINKRES-303) Dependencies with version ranges cannot be resolved in offline mode
by Thorsten Meinl (Jira)
[ https://issues.redhat.com/browse/SHRINKRES-303?page=com.atlassian.jira.pl... ]
Thorsten Meinl updated SHRINKRES-303:
-------------------------------------
Attachment: shrinkres-303.zip
> 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)
4 years
[JBoss JIRA] (SHRINKRES-303) Dependencies with version ranges cannot be resolved in offline mode
by Thorsten Meinl (Jira)
Thorsten Meinl created SHRINKRES-303:
----------------------------------------
Summary: 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
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)
4 years
[JBoss JIRA] (SHRINKRES-302) shrinkwrap fails to resolve com.github.docker-java:docker-java:3.1.5
by Max Andersen (Jira)
[ https://issues.redhat.com/browse/SHRINKRES-302?page=com.atlassian.jira.pl... ]
Max Andersen commented on SHRINKRES-302:
----------------------------------------
fyi, your workaround worked.
> shrinkwrap fails to resolve com.github.docker-java:docker-java:3.1.5
> --------------------------------------------------------------------
>
> Key: SHRINKRES-302
> URL: https://issues.redhat.com/browse/SHRINKRES-302
> Project: ShrinkWrap Resolvers
> Issue Type: Bug
> Reporter: Max Andersen
> Priority: Blocker
>
> trying to resolve "com.github.docker-java:docker-java:3.1.5" you get:
> {code:java}
> Feb 03, 2020 11:38:28 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
> WARNING: Failed downloading io/netty/netty-transport-native-unix-common/4.1.31.Final/netty-transport-native-unix-common-4.1.31.Final-$%7Bos.detected.name%7D-$%7Bos.detected.arch%7D.jar from https://jcenter.bintray.com/. Reason:
> org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.netty:netty-transport-native-unix-common:jar:${os.detected.name}-${os.detected.arch}:4.1.31.Final in jcenter (https://jcenter.bintray.com/)
> Feb 03, 2020 11:38:28 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
> WARNING: Failed downloading io/netty/netty-tcnative/2.0.19.Final/netty-tcnative-2.0.19.Final-$%7Bos.detected.classifier%7D.jar from https://jcenter.bintray.com/. Reason:
> org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.netty:netty-tcnative:jar:${os.detected.classifier}:2.0.19.Final in jcenter (https://jcenter.bintray.com/)
> Feb 03, 2020 11:38:32 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
> WARNING: Failed downloading io/netty/netty-tcnative/2.0.19.Final/netty-tcnative-2.0.19.Final-$%7Bos.detected.classifier%7D.jar from https://repo.maven.apache.org/maven2/. Reason:
> org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.netty:netty-tcnative:jar:${os.detected.classifier}:2.0.19.Final in central (https://repo.maven.apache.org/maven2)
> Feb 03, 2020 11:38:32 PM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
> WARNING: Failed downloading io/netty/netty-transport-native-unix-common/4.1.31.Final/netty-transport-native-unix-common-4.1.31.Final-$%7Bos.detected.name%7D-$%7Bos.detected.arch%7D.jar from https://repo.maven.apache.org/maven2/. Reason:
> org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.netty:netty-transport-native-unix-common:jar:${os.detected.name}-${os.detected.arch}:4.1.31.Final in central (https://repo.maven.apache.org/maven2)
> {code}
> it works using acegi to resolve and plain maven so not sure why it fails in mavenresolver - should ${os.detected.arch} be set somewhere to work?
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years
[JBoss JIRA] (SHRINKWRAP-525) document how to resolve/mimick import scope for a pom dependency
by Max Andersen (Jira)
Max Andersen created SHRINKWRAP-525:
---------------------------------------
Summary: document how to resolve/mimick import scope for a pom dependency
Key: SHRINKWRAP-525
URL: https://issues.redhat.com/browse/SHRINKWRAP-525
Project: ShrinkWrap
Issue Type: Enhancement
Reporter: Max Andersen
I can see there are a notion of ScopeType.IMPORT but no where could I find how you have .resolve() take into account dependencies declared in a bom that is a dependency.
could only find loadFromPom(file path) ...is it not possible or is there some magic I've missed?
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years