Lacoste, Dana wrote:
I'm far from the expert in dealing with this, but Maven's "assembly"
plugin will do what you need: make your staging area, populate it,
and zip it up in the end.
We do something similar: I need to produce an "autorun" CD image:
we build, with each jar having its own directory and maven pom,
and then a "packaging" pom that just generates .war files, and
then another "packaging" pom that generates a .zip of the CD image.
(It's much more complex than that in sheer number of components,
so I can't give you a sample directory structure easily, but
I'm sure someone else will speak up :)
Something like:
Parent\pom.xml <- placeholder, effectively
jar1\pom.xml <- generates your .jar
war1\pom.xml <- generates your .war
dist1\pom.xml <- generates an assembly putting all the pieces
together
dist1\dist.xml <- descriptor
(http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html)
dist1\resources <- "flat" files needed in your assembly, referred
to in the pom
Does that help?
Dana Lacoste
Yes, thanks.
The assembly.html page you reference has certainly changed since the
last time I looked at it. Last time I read it it seemed to suggest
assemblies were for creating different 'views' of the same information
(e.g. a source distribution, a binary distribution, etc.) Now it pretty
plainly says it is the mechanism for doing exactly what I want :) The
documentation on the page looks a lot more complete, too. I had
considered the assembly plugin the last time I looked at this but I
thought it would be counter to the design. It's good to have
confirmation that this is indeed what others are using to achieve this goal.
Would it be 'wrong' to merge the jar1 and dist1 folders (in your
example) and their corresponding poms together? The rationale for this
question is that the jar being produced is nothing on its own. It's not
a library or a shared component of any kind. Its reason for being is to
provide an executable, which by its nature requires the contents of the
resources directory. My prejudicial response to what you outline is
that it seems kind of complicated, but I'm open minded and happy to
revise my opinion if I understand the value in the split.
Thanks for your (astonishingly prompt) answer.
--
Danny MacMillan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]