title: How to embed archetype project version in Maven archetype?
body: <p>I'm creating a Maven archetype which generates a project skeleton that 
  will include a dependency on the project from which the archetype 
  originated. </p>
  
  <p>For example, the origin project looks like: </p>
  
  <pre><code>origin/archetype/... archetype for generating project 
        /core/... core services 
        /extra/... extra services 
  </code></pre>
  
  <p>and the archetype will generate a project with a POM that contains 
  dependencies like so: </p>
  
  <pre><code>&lt;dependencies&gt; 
    &lt;dependency&gt; 
      &lt;groupId&gt;com.foo&lt;/groupId&gt; 
      &lt;artifactId&gt;origin-core&lt;/artifactId&gt; 
      &lt;version&gt;SOMEVERSION&lt;/code&gt; 
    &lt;/dependency&gt; 
  &lt;/dependencies&gt; 
  </code></pre>
  
  <p>I want SOMEVERSION to be the version of the origin project at the time 
  that the archetype is built and installed into the repository. </p>
  
  <p>So if the origin project is at version 1.0-SNAPSHOT and is <code>mvn 
  install</code>ed, then I want the archetype to generate a dependency on 
  <code>origin-core 1.0-SNAPSHOT</code>. And when the origin project is released, and automatically 
  bumped to version 1.0, I want the archetype to generate a dependency on 
  <code>origin-core 1.0</code>. </p>
  
  <p>Basically I'd like to use <code>${archetypeVersion}</code> as a Velocity variable in the archetype 
  POM, but that doesn't seem possible. </p>
  
  <p>Is there any other way of accomplishing what I'm trying to do here?</p>