title: How to pin latest version of a maven artifact while creating a project from archetype
body: <p>I have an archetype that we use to create new projects. At the point of project creation (i.e. when someone executes <code>mvn archetype:generate</code>) I want to pin some of the dependencies to <code>RELEASE</code> version available at that time (I strongly oppose putting <code>&lt;version&gt;RELEASE&lt;/version&gt;</code> in POM file). </p>
  
  <p>Is there a way I can make archetype to resolve <code>RELEASE</code> version and pin that for some of the libraries. </p>
  
  <p>Only way I solve this problem right now is by releasing new version of archetype every time some of the core libraries are released and then hard coding versions of those in the <code>archetype-resources/pom.xml</code></p>
  
  <p>I did see couple of similar questions but none of the solutions for those work for me.</p>
  
  <p>As I already mentioned, that I want to pin the latest release version available at the time of creating project from archetype. Using `RELEASE means that I can not recreate binaries from same source code as I will end up fetching a different version of dependency. </p>
  
  <p>Let me explain with concrete example. </p>
  
  <ul>
  <li>I have an archetype with maven co-ordinate <code>com.my-company:my-awesome-framework:1.0</code>. </li>
  <li>I have a library with maven co-ordinates <code>com.my-company:core-lib:1.0</code>.</li>
  <li><strong>Developer-1</strong> runs command <code>mvn archeype:generate my-awesome-framework</code>. He fills in required details and creates project called <code>service-foo</code>.  <code>service -foo</code> has dependency <code>core-lib</code> and since.</li>
  <li>We add more features to <code>core-lib</code> and release version <code>2.0</code></li>
  <li><strong>Developer-1</strong> build <code>service-foo</code> it still builds with <code>core-lib</code> version <code>1.0</code>. (since he hasn't changed the version the project's POM file. Had I used <code>&lt;version&gt;RELEASE&lt;version&gt;</code> for 'core-lib<code>, this time</code>service-foo<code>would have built with version</code>2.0<code>of the</code>core-lib`)</li>
  <li><strong>Devloper-2</strong> runs <code>mvn archetype:generate my-awesome-framework</code>. He fills out required fields and creates a service called <code>service-bar</code>. Now this time since <code>core-lib</code> version <code>2.0</code>. Note that I did not modify <code>my-awesome-archetype</code> to update version for <code>core-lib</code> inside <code>archetype-resources\pom.xml</code></li>
  </ul>
  
  <p>I hope this clarifies my use case</p>