You can accomplish something like this through some profiles magic. But I'd like to stress that the Maven theme is to have predictable (and reproducible) builds. To ensure that, the build output can't depend on the environment.
But if you absolutely have to do this through profiles, this is what you do: * Define the property with the default value. * Create a profile that is triggered on the env variable, and that profile with re-define the property to the value of the env variable (or whatever you want). /Anders On Tue, Jun 19, 2012 at 2:03 PM, Łukasz Tasz <[email protected]> wrote: > Hi All, > > I'm not mvn expert, but I'm working a lot others build systems. > I'm missing one of fundamental functionality, default value for > variable / property in case of maven. > > I would like to start mvn process and optionally parametrize it by > environment variable. > > e.g > <properties> > <myProp>${env.turboMode}:slowmode</myProp> > </properties> > > so if environmente variable is seted then myProp will get it;s value, > if not then slowmode will be the value. > > I' sure that I'm missing some manual page, but please don't blame :) > > Thanks a lot > > -- > Łukasz Tasz > > --------------------------------------------------------------------- > 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]
