Maybe a bit more background to this question/problem.
Currently, we have some smaller war based projects that to build, people
run mvn assembly:directory. Once this "setup" has been performed once,
then they just have to run a "mvn process-resources" with a specific
profile activated. This allows them copy over to the assembly output
directory ONLY the web content that has changed. If the initial setup
takes (in the smaller projects) 5 min, the "update web bits"
process-resources run takes 1 - 2 seconds to copy over any changed
jsp/html/images/jspf/etc.
The problem with the ear file build is that web content directory lives
INSIDE the ear, which I seem to be unable to decompress. I see I can
tell the ear plugin to extract the war file, but I don't see a way to
tell the assembly descriptor to unpack the ear.
Somewhat related - when the war file contains hundreds of thousands of
files, it's hugely inefficient to build an artifact, tuck it into the
local repository only to unpack that with every build.
The standard process seems to be:
1 - build all underlying jars, put them in the local m2 repository
2 - build war (or wars), put them in the local m2 repository
3 - build an ear file that consumes that war file, put that in the local
m2 repository
In our case where we're forced to merge two war files:
1 - build all underlying jars, put them in the local m2 repository
2 - build war (or wars), put them in the local m2 repository
3 - build second war, merge with first war, put in local m2 repository
4 - build an ear file that consumes that war file, put that in the local
m2 repository
If you break it down, any given war project copies bits from src ->
target then from target -> local repo. In the case of merging war
files, this gets duplicated with what seems like an exponential increase
in time. We're trying to cut that all down/out, possibly by moving more
of the static bits (html, gifs, etc) to another jar artifact that is
installed once and then forgotten about and by possibly abandoning ear
artifacts.
With everything I read (and I've read/re-read better builds with maven
about a dozen or so times - I have it open at the moment as well), there
doesn't seem to be a way around this with ear building. Back in the ant
days, you could say, "my war is comprised of these 25 folders that exist
all over the place". And same with an ear. After using maven 2 for so
long now, that makes me a bit panicky. But builds were lightning fast.
I'm open to any/all suggestions.
-Original Message-
From: EJ Ciramella [mailto:ecirame...@upromise.com]
Sent: Saturday, January 31, 2009 4:28 AM
To: users@maven.apache.org
Subject: Creating an exploded ear file.
Hello again all -
One of developments biggest complaints is waiting for maven to build up
the actual war/ear file (sometimes it can take 20 min). Is there a
simple way of having an ear project build into the target directory
(much like assembly:directory) in exploded format (including the
exploded war file)?
I don't see any flags in the earfile plugin to say -> don't create an
artifact, just create the exploded directory structure.
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org