Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="https://stackoverflow.com/a/350865/933106">Matthew's answer</a> provides a solution where the artifacts get uploaded into the local and remote repository having the desired version number, i.e. the paths inside the repository are contain the correct version numbers, however, Maven installs and deploys always the source POM file that would still contain the <code>${ciVersion}</code> in the version element. </p> <p>If you have a multi-module with a common parent like this:</p> <pre class="lang-xml prettyprint-override"><code>&lt;project xmlns="..." xmlns:xsi="..." xsi:schemaLocation="..."&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;parent&gt; &lt;artifactId&gt;myParent&lt;/artifactId&gt; &lt;groupId&gt;com.stackoverflow&lt;/groupId&gt; &lt;version&gt;${ciVersion}&lt;/version&gt; &lt;/parent&gt; &lt;artifactId&gt;myChild&lt;/artifactId&gt; ... &lt;/project&gt; </code></pre> <p>you won't be able to reference a dedicated version of the <code>myChild</code> module, as the dependency resolution will exist with an error that it cannot find the <code>myParent</code> module with version <code>${ciVersion}</code>.</p> <p>However, you could use the <a href="https://github.com/sap-production/resolve-pom-maven-plugin" rel="nofollow noreferrer">resolve-pom-maven-plugin</a> that uploads a POM into the local and remote repository where all variables inside the POM get substituted by their actual values. In order to do this, you have to add the following snippet into your (parent) POM:</p> <pre class="lang-xml prettyprint-override"><code>... &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;com.sap.prd.mobile.ios.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;resolve-pom-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.0&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;resolve-pom-props&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;resolve-pom-props&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; ... </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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