You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2021/05/07 18:42:00 UTC
[jira] [Commented] (MPH-172) Allow expression to fetch a dependency
given an artefactID
[ https://issues.apache.org/jira/browse/MPH-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17340999#comment-17340999 ]
Michael Osipov commented on MPH-172:
------------------------------------
This is going to be very hard because the expression is handled at a very low level, I guess Plexus Interpolator. Don't expect this to be implemented anytime soon. I would recommend using {{xmlstarlet}} in this case.
> Allow expression to fetch a dependency given an artefactID
> ----------------------------------------------------------
>
> Key: MPH-172
> URL: https://issues.apache.org/jira/browse/MPH-172
> Project: Maven Help Plugin
> Issue Type: New Feature
> Components: expressions
> Reporter: Baubak Gandomi
> Priority: Major
>
> I would like to know the version of a dependency which is being used in the pom.
> Today if I want to do it, the only way I know is to:
> {code:java}
> mvn help:evaluate -Dexpression=project.dependencies[5].version -DforceStdout {code}
> The problem with this is that I need to know the order in which a dependency has been defined. What I would like is to do dependency map fetching. Example for an artefact with th artefactId "BBB", I should be able to get the used version by:
> {code:java}
> mvn help:evaluate -Dexpression=project.dependencies["BBB"].version -DforceStdout {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)