On Thu, September 27, 2007 8:09 pm, Stefan Prange wrote:

> there are two reasons.
> 1. I didn't want to create a new java project only to package an EAR file.
> Well, this reason is not quite cogent, I suppose. When using Maven one
> should engage with Maven's multi module approach.

We relented and converted our ant based ejb+ear, to a maven ejb module,
and a maven ear module. It was way simpler than trying to do it all in one
go.

It was also siginificantly quicker for developers too, as building the ejb
doesn't involve the time wasting phase of building the ear file.

> 2. I want my EAR file named after a predefined pattern. It shall be name
> like appname.ear_<timestamp>, e.g. "appname.ear_20070927". I tried to
> achieve this with Maven before (with build/finalname) but with no success.
> ANT allows me to name the resulting EAR file whatever I like.

Is there a reason you want this particular pattern?

What following the maven defaults buys you is that you get a whole lot of
downstream functionality for free.

We relented and let maven call our ear file my-project-ear-4.3.2.ear, and
we had to tweak some code in our app accordingly to support this.

We make releases of our code using the maven-release-plugin, which handles
the tagging, the building and deploying to our internal maven repository
for us, for free.

If we had done the ear step with ant, then we would have been forced to do
the tagging, building and deploying ourselves by hand, and we would have
had to train each developer on the team how to support our proprietry
methods themselves, a real headache.

Instead in our case, each member of the team takes it in turn to act as
release manager (to spread the knowledge), and they follow a relatively
simple recipe to prepare and perform the release, not caring about the
details - the details are maven's job.

In our case, on a very complex system involving 5 multi module projects,
about 20 artifacts (jars, ejbs, ears), and an Eclipse RCP application, can
be formally released and made available in our repo beginning to end in 30
minutes.

Thinking about this one of the key differences in using ant and maven is
this:

When using ant, the developer asks "how do I do X?".

When using maven, the developer asks "how does maven do X".

Maven already knows how to do "stuff", but on condition you follow the
conventions. Following the conventions in maven is in the vast majority of
cases less work for you in the long run.

Regards,
Graham
--



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to