title: Maven - versioning parent pom and child pom to inherit parent pom version
body: <p>I am using Maven 3.x and I have the below structure in my parent pom and child pom.</p>
  
  <p>parent pom</p>
  
  <pre><code>&lt;groupId&gt;com.mygoogle.sample&lt;/groupId&gt;
  &lt;artifactId&gt;workorder&lt;/artifactId&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;properties&gt;
      &lt;project.version&gt;1.0-SNAPSHOT&lt;/project.version&gt;             
  &lt;/properties&gt;
  </code></pre>
  
  <p>I have a child pom that is as below</p>
  
  <pre><code>&lt;parent&gt;
   &lt;groupId&gt;com.mygoogle.sample&lt;/groupId&gt;
   &lt;version&gt;${project.version}&lt;/version&gt;
   &lt;artifactId&gt;workorder&lt;/artifactId&gt;     
  &lt;/parent&gt;
  &lt;artifactId&gt;workorder-client&lt;/artifactId&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  </code></pre>
  
  <p>When I build my artifacts using mvn install, 
  I see the jars getting built in my .m2 folder but the project.version is not replaced with the actual version , that is 1.0-SNAPSHOT.</p>
  
  <ol>
  <li><p>Will the parent pom and/or child pom in my .m2 repository for each of the artifacts have the version specified or will it be project.version</p></li>
  <li><p>Should I even specify project.version as a property in my parent pom. The maven documentation stated that project.version is available by defualt. I also tried mvn install post removing project.version property in my parent pom but the artifacts generated still had the version as {project.version} in my .m2 folder rather than the actual version</p></li>
  <li><p>How do I set a version in my parent pom and have all my child pom have the same version. For eg, I want to set a version in workorder pom and workorder-client pom should also inherit the same version .</p></li>
  </ol>