Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>On my project, I have such a problem. To reduce the number of versions I define in my parent pom.xml some properties, which correspond to the versions of each module:</p> <pre><code>&lt;properties&gt; &lt;project-version&gt;1.0.0&lt;/project-version&gt; &lt;!-- Same version than the parent for the module 'commons' --&gt; &lt;project-commons-version&gt;${project-version}&lt;/project-commons-version&gt; &lt;!-- A specific version for the 'business' module --&gt; &lt;project-business-version&gt;1.0.1&lt;/project-business-version&gt; ... </code></pre> <p>And then, in the pom.xml of each module, I use these properties. The problem is that I must clearly input the version of the parent in this pom.xml. For example, in my business pom.xml, I have:</p> <pre><code>&lt;project&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;!-- I must indicate the version of the parent --&gt; &lt;parent&gt; &lt;groupId&gt;my.project&lt;/groupId&gt; &lt;artifactId&gt;parent&lt;/artifactId&gt; &lt;version&gt;1.0.0&lt;/version&gt; &lt;/parent&gt; ... &lt;dependencies&gt; &lt;!-- However, in my dependencies, I use directly the properties defined in the parent's pom.xml --&gt; &lt;dependency&gt; &lt;groupId&gt;my.project&lt;/groupId&gt; &lt;artifactId&gt;project-persistence&lt;/artifactId&gt; &lt;version&gt;${project-persistence-version}&lt;/version&gt; &lt;/dependency&gt; </code></pre> <p>However, I really suggest that you have a look to the <a href="http://maven.apache.org/plugins/maven-release-plugin/" rel="nofollow noreferrer">release plugin</a> that will take care of modifying all the version numbers for you.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload