You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by EJ Ciramella <ec...@upromise.com> on 2009/01/31 10:27:57 UTC

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.

Re: Creating an exploded ear file.

Posted by Wayne Fay <wa...@gmail.com>.
> I also want to know how to deploy to auto-deploy of weblogic in exploded
> format using maven.

Perhaps the Cargo plugin can help? Or the weblogic-maven-plugin?

http://cargo.codehaus.org/Maven2+plugin
http://mojo.codehaus.org/weblogic-maven-plugin/

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Creating an exploded ear file.

Posted by "a.prabhu" <an...@gmail.com>.
I also want to know how to deploy to auto-deploy of weblogic in exploded
format using maven.

Presently we run 'mvn clean install' which creates ear. We run a batch file
to explode this ear and copy this exploded ear to the autodeploy directory.
If we have java changes, we do 'mvn compile' on java source files and then
copy the java files ('com') into the autodeploy and touch the REDEPLOY file
to trigger auto-deploy.

I would like to improve/automat this as lot of steps above are manual (like
running batch file to explode, copying, touching the file etc.)

Any help on this ?
-- 
View this message in context: http://maven.40175.n5.nabble.com/Creating-an-exploded-ear-file-tp80817p3330081.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Creating an exploded ear file.

Posted by EJ Ciramella <ec...@upromise.com>.
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:eciramella@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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org