title: Does Maven have a way to get a dependency version as a property?
body: <p>I'm using a BOM to import dependencies from another project to mine, and I need a way to reference a dependency's version that is already declared in said BOM.  So far, I've attempted to list the dependency version as a property in the BOM, but this approach fails because properties don't get imported with BOMs.</p>
  
  <p>I've seen where the Dependency Plugin's <a href="http://maven.apache.org/plugins/maven-dependency-plugin/properties-mojo.html" rel="noreferrer">dependency:properties</a> goal does <em>almost</em> exactly what I need, but instead of giving me a full path of the artifact I need the version as a property.  Is there something out there that can give me the version of a resolved artifact as a property?</p>
  
  <p><strong>UPDATE - 'Why not use a parent pom?'</strong></p>
  
  <p>I commonly find myself working in application server environments, where the dependencies provided are specified with BOM artifacts (as it appears that this has become a somewhat common/standard way to distribute groups of inter-related artifacts, i.e. <a href="https://github.com/wildfly/boms" rel="noreferrer">widlfly</a>).  As such, I want to treat the BOM as the single source of truth.  The idea of doing something like <em>re-delcaring</em> a dependency version property that has already been defined in a BOM seems incorrect.</p>
  
  <p>If I were to define properties in a parent pom that mirrored an application server's environment, I now have to worry about keeping parent pom properties and BOM properties in sync - why even have a BOM at all at that point?</p>
  
  <p>The information is already available on the dependency tree, it's just a matter of exposing it...</p>