On 2007-07-03 18:35:01 +0200, "Brian E. Fox" <[EMAIL PROTECTED]> said:
Is this a proposal on the wiki that is being summarized, or the whole =
Just first thoughts... I'm relatively new to this, so any help or comments are welcome.
thing? If it's the whole thing, I have some questions: 1. Why a default value and a required flag? If it's required, when would = the default be used?
Either can be omitted. You're right that specifying both at the same time does not make sense. It is an error if a property is unspecified and required, and there is no default value. If a property is unspecified and has a default value, it is used.
2. How is the option value activated? Is this implying that these are = the only valid values and an error should be thrown if it doesn't match?
If specified, option values are the only valid ones.
3. Can values be specified using a regex or wildcards?
That would sure be nice.
=20 (btw most of this can be done using the snapshot enforcer with the = requireProperty rule)
Using the enforcer plugin is optional, while the proposal would force people to declare their variables.
Regards, Jochen
________________________________ From: news on behalf of Jochen Kuhnle Sent: Tue 7/3/2007 12:05 PM To: dev@maven.apache.org Subject: Proposal: Required declaration of properties in pom.xml Hi, currently, Maven does not require declaration of properties used in the pom, you just use them anywhere you like. Usually, if a property is missing, bad things tend to happen because it is replaced with the string "null". On a good day, resources from "translations-null-null" aren't included in the build, on bad days it's worse... And when you find the missing property in a pom you haven't written, you have to figure out what "${lopt}" means and what its legal values are... So instead typing <properties> <lopt>en_US</lopt> </properties> this proposal wants you to write <properties> <property> <name>lopt</name> <defaultValue>en_US</defaultValue> <required>true</required> <description>Locale to use</description> <options> <option> <value>de_DE</value> <description>Use German = locale</description> </option> </options> </property> </properties> Of course, Maven should display an error if a required variable is missing. And it would be nice to have "help:describe-properties"... Regards, Jochen --------------------------------------------------------------------- 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]