First, assuming your code is in the location
assembly.xml. This file should contain the following:
This file will tell the assembly plugin how to package (into a zip, gzip-tarball, and bzip2-tarball) and what to include (“*”, or everything – you can include only specific things or exclude specific things. Please see the Assembly Plugin for more information about configuring includes/excludes).
Next, you need to tell maven to execute the Assembly plugin. Do this by adding the following to your pom.xml:
What if the code isn’t yours, though? OK, now we are in a strange place. First, make sure that the licensing allows you to republish this if you are publishing this somewhere public. If it is Apache 2, GPL or LGPL, you won’t have an issue republishing it unmodified. But check to be sure. After that, it gets way more complex. I’d suggest a private maven repository so that you aren’t distributing others code.
Ok, that will have downloaded this into your target/checkout folder. Now, jut make a quick tweak to what we’ve already done. Change the directory that the assembly.xml is pointing at to
And Voila! Now, if you just use the Maven release plugin or follow standard deployment procedures, this will be released for everyone in your company (or in the world, depending on where you are publishing to)!