I hope that my comments are not taken as being critical of the person
asking for help.
Our team was in their position when we started and had to learn the
"Maven way".
We received a lot of help and got a lot of benefit from the free
resources provided by the community.
We also were working closely with the team from another Apache project
that used Maven in their build process and in the build process of
"customers" of their projects like ourselves so they brought us a lot of
basic knowledge built into the artifacts that they built for us.
Very often my comment about fighting Maven is accompanied by a
suggestion that the person try to rephrase their request at a higher level.
- what type of artifact are they trying to build?
- what is so peculiar about their project or environment that makes
their build "impossible" or "extremely complex" with Maven.
The second question has two purposes
a) Get some facts into the discussion that might reach out to someone
here who has experience in a similar situation
b) Get the person to understand that Maven is successfully used without
custom plug-ins or profiles to build a lot of projects everyday so they
will ultimately be successful and probably with a lot less pain than
they think.
I will also confess to sometimes just asking a question in a thread that
is not getting any attention because of the way the problem is posed, in
order to get the question back in the expert's inboxes with a better or
more amplified description of the problem so that the person gets some help.
Ron
On 17/04/2012 7:35 PM, Eric Kolotyluk wrote:
On 2012-04-17 9:48 AM, Curtis Rueden 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.
I think the comment "if you don't do things Maven's way, Maven will
fight you and Maven will win." is humor - not fact. Keeping your sense
of humor is always good advice when working with Maven.
IMHO - the most valuable single bit of advice one can give a new Maven
user is: don't try to master it on your own - ask for help - there are
thousands of people with great experience, knowledge and advice who
are willing to share it. The Sonatype training has enormous ROI.
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.
I do not see anyone criticizing someone who tries to use Maven in an
unconventional way - rather we are saying - if you are using Maven and
you don't want to hurt yourself...
My many years of experience tells me that far too much technology is
too configurable with too many options and choices - and ultimately
that causes more trouble than it is worth. Maven is more than
adequately configurable, but collectively we still have a lot to learn
about respecting and utilizing "convention over configuration" and
adapting to the common vision that is Maven.
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. :-)
This is very true. Very much of Maven is tribal knowledge and a tribal
vision. Fortunately the tribe is strong and friendly :-)
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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org