maven-assembly-plugin vs system scope dependencies

18.04.2008 by Dirk Olmes

I was playing around with Gigaspaces the other day. Since GS jars are not available on any Maven repo and GS comes with everything you need prepackaged I used Maven dependencies with system scope to pull the required jars into my build.

Then I tried to assemble a simple zip to move some code over to another machine and created an assembly descriptor to build a deployment package. One requirement was to keep the Gigaspaces jars in their original form i.e. no renaming, unpacking etc.

To package system scoped dependencies with unchanged filenames use the following snippets in your assembly descriptor:

<dependencySet>
    <outputDirectory>lib</outputDirectory>
    <scope>system</scope>
    <outputFileNameMapping>${artifact.file.name}</outputFileNameMapping>
</dependencySet>

Comments

There are no comments yet.

Leave a comment
Your name:
Comment: