On 15 April 2013 20:42, Karl Heinz Marbaise <khmarba...@gmx.de> wrote:

> A case in point of the improving (though not related to the idea of being
>> able to get a property exposing the root (never mind the which root:
>> reactor/inheritence/**inheritence within reactor) but more related to
>> re-engineering to make life easier) is the templating maven pluging. In
>> the
>> case of templating java source, one could do that already... just with
>> about 30-50 lines of pom.xml config... now with the templating plugin
>> you're looking at about 5-10 lines and 5 of those are just the standard
>> <plugin><groupId><artifactId><**version></plugin> boilerplate.
>>
>
> I made often the experience that there is always a solution but often it's
> not really short....
>
>
And those cases are the warning shots that the Maven community is letting
its users down.

Where there is a Maven Way™ solution, we should be making that solution as
easy and pain free as possible.

Too often we have taken easy ways out by saying things like:

"Use these 5 plugins in your pom and attach them to the following 5 phases
like so for reasons of magic and you are following the Maven Way™"

"Add this pile of boilerplate and lay your folders out like so, that's the
Maven Way™"

The reality is that the true goal of the Maven Way™ is that your pom should
be as close as possible to the following

<project>
  <groupId>...</groupId>
  <artifactId>...</artifactId>
  <version>...</version>
  <packaging>...</packaging>
  <dependencies>
    ...
  </dependencies>
</project>

Every line you add to the above is moving further from the Maven Way™

Some additions are necessary, and don't move you more than 1mm, such as the
<parent> reference, or adding an <extension> to support a custom packaging
type.

Some move you 1m or so, such as adding additional <plugin> definitions

Some move you 1,000km, such as <profiles>

Some move you 500m or so, such as adding additional <plugin> definitions
with multiple <executions> with their own <configuration> and a default
<configuration>

When you are building a new type of project it is to be expected that you
will be moved far from the Maven Way™ *because* it is a new type of project
and we have not discovered the way *yet*, such explorers wander far from
the Maven Way™ and then they find their way back again and tell us the
paths to follow... at that point we should be stepping up and creating
packaging types or well written plugins that enable people to build that
type of project as close to the minimal pom as possible.

The power of Maven comes from the minimal pom with just dependencies, where
a project is just set out on disk according to convention and everything
just works. I think we have forgotten that...

Reply via email to