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 2022/02/21 20:40:00 UTC
[jira] [Closed] (MPH-172) Allow expression to fetch a dependency given an artifactId
[ https://issues.apache.org/jira/browse/MPH-172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov closed MPH-172.
------------------------------
Resolution: Information Provided
> Allow expression to fetch a dependency given an artifactId
> ----------------------------------------------------------
>
> 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.20.1#820001)