You could check it in a plugin, but to set it globally is probably going to have side effects you weren't expecting since the interpolation is sometimes fussy and does do multiple passes.

I feel it is better to be specific about the properties that you require to be set (in a way, defining the inputs to your build). Perhaps as a debug mode to check for "bugs" in your build it might be more useful to be global...

- Brett

On 05/03/2009, at 2:58 PM, Rusty Wright wrote:

Thanks; I realized on my way home that someone would point out the enforcer plugin. What I'm after is to have it abort if any ${} refers to an unset property; environment, system, etc. Perhaps one way would be to add to the enforcer plugin a rule for "require all properties".


Brett Porter wrote:
There's no option for that in Maven - this might have side effects you didn't intend so it is better to be explicit.
Try this: http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html
On 05/03/2009, at 12:43 PM, Rusty Wright wrote:
I was going to add a jira issue for this but before I do that I thought I'd ask here to see if this is a boneheaded idea, or perhaps it's already there and I overlooked it.

What I'm wanting/looking for is an option to say that whenever $ {varName} is used in the pom.xml (or profiles.xml and settings.xml too I suppose) and varName hasn't been set, that maven abort with an error.

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

--
Brett Porter
[email protected]
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
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]


--
Brett Porter
[email protected]
http://blogs.exist.com/bporter/


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

Reply via email to