Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Mojo's Build-Helper Maven Plugin can help you out here.</p> <p>There are a number of goals that can be used to help transform properties.</p> <p>There is </p> <ul> <li><p><a href="http://www.mojohaus.org/build-helper-maven-plugin/regex-property-mojo.html">build-helper:regex-property</a></p></li> <li><p><a href="http://www.mojohaus.org/build-helper-maven-plugin/parse-version-mojo.html">build-helper:parse-version</a></p></li> <li><p><a href="http://www.mojohaus.org/build-helper-maven-plugin/released-version-mojo.html">build-helper:released-version</a></p></li> </ul> <p>Probably <a href="http://www.mojohaus.org/build-helper-maven-plugin/regex-property-mojo.html">regex-property</a> is the one you want, but if your version numbers conform to the "standards" the other two might save you.</p> <p>To use the <a href="http://www.mojohaus.org/build-helper-maven-plugin/regex-property-mojo.html">regex-property</a> goal you would do something like</p> <pre><code>&lt;project&gt; ... &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;build-helper-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.7&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;regex-property&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;regex-property&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;name&gt;tag.version&lt;/name&gt; &lt;value&gt;${project.version}&lt;/value&gt; &lt;regex&gt;^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.(-SNAPSHOT)?$&lt;/regex&gt; &lt;replacement&gt;V$1_$2_$3_P$4&lt;/replacement&gt; &lt;failIfNoMatch&gt;true&lt;/failIfNoMatch&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; ... &lt;/project&gt; </code></pre> <p>Note: my regex might be slightly off so you should test the above.</p> <p>Note: The property value will only be available for executions after the phase that this execution is bound to. The default phase that it is bound to is <code>validate</code> but if you are on a different lifecycle (e.g. the site lifecycle) the value will not be available.</p>
    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. 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.
 

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