Using descriptive names is a good programming practice. Today I came across an example that does quite the opposite. In Maven 2 you can define a proxy when you are working behind a proxy server, and there is this active flag that sets this proxy to active or inactive…. or at least that is what you expect right?

Here is how you can configure a proxy in your settings.xml

You would think this would mark the company-proxy as not active. But reality taught me otherwise. Here is the corresponding Maven code that returns the active proxy:

So apparently “active” does not mean “active”, but actually means “active if there is more than one proxy defined”. So I suggest to change the name of the “active” property into something like: activeButIfIAmTheOnlyProxyDefinedInTheListOfProxiesThenIAmAlwaysActive. Or perhaps clear documentation would also be an option if you think the name is too long.

Would have saved me half a day of debugging….