title: Maven module - How to use it as an external lib in an unrelated project
body: <p>I have set-up a modular project in Maven with a parent project having more than one child projects. </p>
  
  <p>The <code>pom.xml</code> of parent looks as follows -</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;project ...&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.company&lt;/groupId&gt;
      &lt;artifactId&gt;parent-app&lt;/artifactId&gt;
      &lt;version&gt;${parent-application.version}&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
  
      &lt;dependencies&gt;...&lt;/dependencies&gt;
  
      &lt;properties&gt;
          &lt;parent-application.version&gt;1.0&lt;/parent-application.version&gt;
      &lt;/properties&gt;
  
      &lt;modules&gt;
          &lt;module&gt;parent-model&lt;/module&gt;
          &lt;module&gt;parent-masters&lt;/module&gt;
          &lt;module&gt;parent-web&lt;/module&gt;
      &lt;/modules&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The <code>pom.xml</code> of child projects looks as follows - </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;project ...&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;com.company&lt;/groupId&gt;
          &lt;artifactId&gt;parent-app&lt;/artifactId&gt;
          &lt;version&gt;${parent-application.version}&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;artifactId&gt;child-model&lt;/artifactId&gt;
  
      &lt;dependencies&gt;...&lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Now, I need to use one of the child projects as a lib in a separate unrelated project. The pom of the new project looks like below.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;project ...&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.company&lt;/groupId&gt;
      &lt;artifactId&gt;unrelated-app&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.company&lt;/groupId&gt;
              &lt;artifactId&gt;child-model&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I keep getting the below error
  <code>Illegal character in path at index 57: http://repo.maven.apache.org/maven2/com/company/parent-app/${parent-application.version}/parent-app-${parent-application.version}.pom</code></p>
  
  <p>The reason seems that I am inheriting the version attribute in child-model from prent-app.</p>
  
  <p>Is there a way to overcome this issue? OR do I need to provide the version for each child module in respective pom.xml and cannot inherit from common parent.</p>
  
  <p>Thanks in advance.</p>