If you are using the Maven Release Plugin you can use the
releaseProfiles [1] configuration option in the perform goal [2] to
activate a specific profile during a release build. In that profile
you can override your specific configuration.

The idea is to configure your POM for snapshot builds by default, and
override that configuration in a profile which will be activated only
during release build.

[1]: 
http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#releaseProfiles
[2]: 
http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html

2014/1/19 Graham Leggett <[email protected]>:
> Hi all,
>
> Does there exist a property in maven that will indicate in some fashion 
> whether the build is a snapshot build or a release build?
>
> I am aware that "-SNAPSHOT" appears in the version number, but that won't do. 
> I'm after a variable that has one of two discrete values, one predictable 
> value if it is a snapshot and another predictable value when it is a release. 
> Does anything like this exist?
>
> Regards,
> Graham
> --
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to