Yes, I suppose that would be one way of activating it. In my case, I
know that the environment variable is set by Hudson, so I just added
"-Pspecial" to my build command.
Good tip for general purposes, though!
Stevo Slavic' wrote:
Shouldn't your profile with id=special also contain:
<profiles>
<profile>
<id>special</id>
<activation>
<property>
<name>env.BUILD_NUMBER</name>
</property>
</activation>
...
</profile>
</profiles>
to have profile active only when environment variable BUILD_NUMBER is
present?
Regards,
Stevo.
On Tue, Oct 14, 2008 at 9:55 PM, David C. Hicks <[EMAIL PROTECTED]> wrote:
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]