Basically, I have a multi-module project consisting of 5 different modules. One of the modules is kind of the parent module to the other 4, meaning the other 4 need to be built before the 5th, so you could say that each of the 4 modules is a dependency of the 5th. Thus, I’ve made dependency entries for each of the modules in the 5th module’s pom.xml.
However, when I build the project, I don’t want those 4 dependencies copied to the “lib” directory of the 5th module. I’d like to specify the directory into which each of them should be placed explicitly.
Is there any way to do this with Maven2?
Thanks for your help,
B.J.
I’m not sure I understood everything (from where does this
libdirectory come from, when do you want the copy to happen exactly?) but the Maven Dependency Plugin might help, itsdependency:copygoal takes anoutputDirectoryper dependency. Below the sample taken from the Usage page:Change the lifecycle phase binding according to your needs.
But as I said, this answer is more an hint, maybe using a custom assembly would be more appropriate. If it doesn’t help, please provide more details.