We use the maven-assembly-plugin (m-a-p) to assemble our binary distributions in zip, tar and tar.gz formats.
The m-a-p reads an assembly descriptor to copy the dependencies, filesets, files into a work areea and then bundles them into archives of our chosen formats. -- When dependencySets are specified in the descriptor, it copies the transitive dependencies also. -- The descriptor can also be used to copy deps specified in the project from one repo to another repo, or parts of a repo (using include/exclude) to another repo. . It maintains the m2 repo structure. Here's the maven-assembly-plugin page http://maven.apache.org/plugins/maven-assembly-plugin/ Here's how we assemble our binaries 1. Our pom.xml first lists all and only geronimo modules, configs and apps as dependencies. The transitive deps are taken care of by m-a-p. 2. We first invoke the geronimo-assembly-plugin's "installConfig" goal to install the configs into target/archive-temp/repository. This mojo will try to install all dependencies of type "car" when no artifact is explicitly specified. Since we have listed all configs as deps in our j2ee-jetty-server pom.xml, they are installed. 3. Then we invoke m-a-p with assembly descriptor setup.xml and intermediaryAssembly set to true. The intermediaryAssembly set to true will create the staging area but skip the final archive creation. The setup.xml will copy all deps other than the <excludes> from localRepository to target/archive-temp/repository. We exclude the configs here b'coz the configs are installed in step 2 above. So now we have the modules and the configs all in the same repo. 4. We also use this setup.xml to unpack the scripts module into the staging area. 5. Then we invoke m-a-p again with assembly descriptor bin.xml. The plugin copies the library jars, the schema files, the jars for bin etc. The *.bat and *.sh files that we copied into the staging area in step 4 are now bundled into the archive but with correct mode and lineendings.. That's about it. Cheers Prasad On 6/30/06, David Jencks <[EMAIL PROTECTED]> wrote:
OK, I got further..... actually into the assembly. Prasad, can you outline what the maven assembly plugin is used for? For me it's objecting to a lot of our dependencies not having maven poms.... I removed a bunch that don't go into the server any more, but its now objecting to the jasper compiler not having poms. thanks david jencks On Jun 30, 2006, at 3:33 PM, David Jencks wrote: > I think that the missing files got included 2 or 3 times in the > patch.... which makes compiling the result somewhat difficult :-) > > Here's a pruned patch with (I hope) only one copy of each missing > file. > > david jencks > <maven-assembly-plugin.patch> > > On Jun 30, 2006, at 3:00 PM, Prasad Kashyap wrote: > >> I'm sorry. The earlier maven-assembly-plugin.patch had a whole >> directory that had gone missing. >> >> Here is the patch again. >> >> Thanks djencks for catching it. >> >> Cheers >> Prasad >> >> <snip>
