Hi!

Is it possible to only input system property and a suffix/prefix when the
property exists?

I want to setup <version></version> using properties. These properties are
used in other  places as well (e.g. in templates) when we need to know
major, minor etc individually and just not as a whole.

pom.xml:

  <properties>
        <buildVersionMajor>1</buildVersionMajor>
        <buildVersionMinor>4</buildVersionMinor>
        <buildVersionMicro>0</buildVersionMicro>
        <buildVersionRevision>0</buildVersionRevision>                          
        
        <buildVersionBranch>MAIN</buildVersionBranch>                   
        <buildVersionType>SNAPSHOT</buildVersionType>                           
        
  </properties>
   
<version>${buildVersionBranch}-${buildVersionMajor}.${buildVersionMinor}.${buildVersionMicro}.${buildVersionRevision}-${buildVersionType}</version>

The above will not work when and/or <buildVersionBranch> or
<buildVersionType> are empty since version will then be "-1.4.0.0-" instead
of  "1.4.0.0".

Regards,
Jimisola


-- 
View this message in context: 
http://www.nabble.com/System-Properties-in-POM-tf1953900.html#a5358433
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to