Is this a proposal on the wiki that is being summarized, or the whole 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?
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?
3. Can values be specified using a regex or wildcards?
 
(btw most of this can be done using the snapshot enforcer with the 
requireProperty rule)

________________________________

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]

Reply via email to