Jochen Kuhnle wrote:
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"

When/where is it 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...

True, but proper defaults should be specified in the pom itself using
the normal properties tag. Commandline, profiles, and settings
can override these. A pom should just work out of the box. If you
want to customize it you'll have to read the pom to see what can be customized;
there should be a readme or documentation in the pom for that.

There's lots of cases where properties are used - pom interpolation,
plugin configuration, filtering.. which one are you talking about?

For pom interpolation, you may not always want properties evaluated.
In any case, if the property can't be evaluated, the ${expression} is left intact. So the null case doesn't apply here..

For plugin configuration, you cannot possibly list all properties for all
plugins out there.

For filtering, you may just want to print a warning or fail; this could
be configured in the resources plugin.

So how/when do you get the 'translations-null-null' problem exactly?

I don't like the proposal as it's way too verbose and as others have said
only fixes a small set of problems you may have, but doesn't cover all
cases.

There's an issue out there to make all property references/declarations
in the pom the same, preferrably <propname>value</propname>.
Perhaps a '<propertyManagement>' section is more appropriate? :)


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>

This is rather verbose. Do you really want to list all locales in this case?


Of course, Maven should display an error if a required variable is missing. And it would be nice to have "help:describe-properties"...

-- Kenney



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]

Reply via email to