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. People extol the virtues of "convention over configuration", but where > is the compact definitive specification of The Conventions? > I think one major difficulty is that as Maven develops, there is an evolving vision and understanding of what works well and what doesn't. And that is OK, and will continue to be the case. That said, someone could probably make some good money writing a book about the current vision and understanding, as well as updating it with new editions over time. :-) Regards, Curtis On Tue, Apr 17, 2012 at 11:12 AM, Mark H. Wood <mw...@iupui.edu> wrote: > On Tue, Apr 17, 2012 at 07:12:26AM -0700, Eric Kolotyluk wrote: > > I also recommend taking the Sonatype training courses - especially if > > you are a software architect. > > > > There is a lot to be said when you can ask question as the instructor is > > going over the material. > > > > However, you are right, if someone were to write a book called the "The > > Maven Way" in the style you suggest, I would certainly be interested in > > buying a copy. > > You are not alone in that. 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." > > People extol the virtues of "convention over configuration", but where > is the compact definitive specification of The Conventions? > > -- > Mark H. Wood, Lead System Programmer mw...@iupui.edu > What is obvious to A may be not so obvious to B and downright > ridiculous to C. -- Asimov >