You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Barrie Treloar (Jira)" <ji...@apache.org> on 2021/04/15 07:56:00 UTC
[jira] [Commented] (MRESOLVER-98) resolver ant task doesn't appear
to obey dependencyManagement
[ https://issues.apache.org/jira/browse/MRESOLVER-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17321989#comment-17321989 ]
Barrie Treloar commented on MRESOLVER-98:
-----------------------------------------
This only happens when you attempt to resolve via a pom
Resolving via coords works fine.
{code:java}
<maven-resolver:pom id="pom.mypom" file="path/to/my/pom.xml"/>
<maven-resolver:resolve>
<!--
This one doesn't work, it does not resolve the correct version from the dependencyManagement in the parent pom
<maven-resolver:dependencies pomRef="pom.mypom" />
-->
<!-- This one works by using the version installed locally in your ~/.m2/repository, not from the local project filesystem -->
<maven-resolver:dependencies>
<maven-resolver:dependency coords="g:a:v" />
</maven-resolver:dependencies>
<maven-resolver:path refid="mypom:deps" classpath="runtime" />
</maven-resolver:resolve>
{code}
> resolver ant task doesn't appear to obey dependencyManagement
> -------------------------------------------------------------
>
> Key: MRESOLVER-98
> URL: https://issues.apache.org/jira/browse/MRESOLVER-98
> Project: Maven Resolver
> Issue Type: Bug
> Components: Ant Tasks
> Affects Versions: ant-tasks-1.2.0
> Reporter: Jay Kahrman
> Priority: Major
> Fix For: waiting-for-feedback
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> We have a dependency in our pom which has dependencies that don't specify an upper bound to the version range. To avoid getting different versions in every build we use a dependencyManagement section in the POM to lock down the version. This works via the maven 3 CLI, and via the old ant-tasks utility we were using (). The maven-resolver-ant-tasks jar doesn't appear to obey the dependencyManagement section, however.
>
> I'm not sure is this is related to MRESOLVER-33 and/or MRESOLVER-10 and if updating maven-resolver-ant-tasks to depend on Maven Resolver 1.4.0 would solve the problem.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)