Hello,
I have an issue, in that you can specify an id of 'default' for a
profile and that profile is automatically and always activated. No
mention of this little feature is made on the documentation page.
Here is the documentation: http://maven.apache.org/guides/
introduction/introduction-to-profiles.html.
The problem here is that a user would often want to name a profile
"default", and they will not know the side effects of doing so. I
know this because a developer at my work did so. This caused a bug
that went uncaught for quite some time. Worse still, I've found the
"default" profile stays activated even when another profile is
activated explicitly via -P or a parameter. I checked this using "mvn
clean help:active-profiles" while explicitly activating a number of
profiles other than the default. Frankly this is a nasty hack of a
feature. It would be proper to use the activeProfiles element to set
up the profiles by default. I would vote to remove this 'feature' due
to the confusion it can possibly cause, the fact no one bothered to
even document it, and that it puts constraints on what an actual 'id'
can be, which is malarky.
Something to ponder...
Create a simple project, add a profile named id. Add another called
production. In each add a section of params that share the same name.
Now try "mvn help:active-profiles package -Pproduction". You should
see that both profiles are active! Even worse if you where trying to
filter values into a file using the properties you set up, it is
likely that the "default" values of the properties would be filtered
into the file even with the "production" profile active.
I'd like to hear some thoughts from others about this feature.
cheers,
Rob O.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]