I solved this using a profile for my "special" build environment. Pretty straightforward. For those who are interested, here is my solution...

Example:
<properties>
   <my.property>defaultValue<my.property>
</properties>

<profiles>
   <profile>
      <id>special</id>
      <properties>
         <my.property>${env.BUILD_NUMBER}</my.property>
      </properties>
   </profile>
</profiles>


David C. Hicks wrote:
Is there a way to have Maven use a default value if the environment variable referenced by an env.VAR property is not set?

Example:

<my.build.number>${env.BUILD_NUMBER}</my.build.number

This is how you might capture the build number from a Hudson CI server. For a developer, though, the value would end up blank. I'd rather it say "DEVELOPMENT". Can that be done?

Thanks,
Dave


---------------------------------------------------------------------
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