On 17 April 2012 09:48, Curtis Rueden <[email protected]> wrote: > Hi everyone, > > Especially since the most valuable single >> bit of advice one can give a new Maven user is: "if you don't do >> things Maven's way, Maven will fight you and Maven will win." > > I disagree that it is the "most valuable single bit of advice." It is > repeated far too frequently, often in cases where there *is* a reasonable > technical answer to the question being asked. > > Maven is much more flexible than many give it credit for. You can write > your own plugins to do nearly anything, or invoke Ant with AntRun if you > have existing Ant-based builds. Even conventions like "one project = one > JAR" are not universally true—the assembly plugin lets you do all kinds of > nifty stuff including building multiple artifacts as part of the same > project. People complain about the nested "src/main/java" directory > structure but you don't even need that; it is actually really easy to > override the source and resource directories in the great majority of > cases. People complain about profiles being "evil" but they are an > extremely powerful tool, and like any powerful tool are only as "good" or > "evil" as their use. > > I think it is great to caution people against anti-patterns, etc., pointing > out how they could make their lives easier by structuring things > differently. But if we are not careful, such advice can degenerate into > nonconstructive criticism, as illustrated by the unfortunate saying: "Don't > fight against Maven, you'll loose [sic]." This attitude causes real > problems within the developer community: at least one of the teams with > which I collaborate dislikes Maven due to its "our way or the highway" > attitude. > > Maven is an extremely powerful set of building blocks, and I think we > should be focusing on promoting that power and flexibility, rather than > criticizing anyone who tries to use Maven in an unconventional way. After > all, the beauty of "convention over configuration" is that you *can* > configure and override behavior as needed.
Hear, hear! Thank you Curtis, I've been meaning to respond to one of those "Don't Fight Maven" statements for a long time. I completely agree with you. The world isn't black-and-white, there's lots of grey ... and, *shudder*, even colour! ;-) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
