How to build maven source exports with dependencies for escrow releases

649 Views Asked by At

We need to provide releases of source code occasionally for some customers (held in escrow by a third party).

This needs to include:

  • The main maven module (or multi-module) source code
  • Source code for all dependent maven modules, where available in our source code repository
  • Binaries for all other dependent modules (e.g. third party external libraries).
  • any other maven dependents, e.g. parent poms.

Ideally this should be an automated process. At the moment we don't store source jars in our maven repository and would prefer to use the scm tags in the poms and fetch the source from the svn repository.

mvn scm:export works well for individual modules. If we could combine this with the maven-dependency-plugin somehow (and make sure parentpoms are included!), it would probably do most of what we need. Does anyone know of a simple way of doing this?

1

There are 1 best solutions below

0
On

I would suggest to deploy source packages as well to the maven repository during the release. Afterwards you can extract the dependencies of your project from your repository manager and package this to a escrow kit. This can be handled by a separate maven project which contains all the projects you need to package as dependencies and use the assembly-plugin to package that into a zip archive incl. the source packages.