I have a multi-module maven project with a lot of modules, and I'd like to store the built bundles in the respective folder of each module, i.e build
or bundle
. Right now, as we all know, maven stores everything under .m2/repository
. However, we want to change it for every project. I looked for a solution but most of them suggest the location change of the whole repository, which is not what we want.
Is there a way to tell maven to put the built bundle to the respective module's build
folder?
To illustrate how we want, this can be checked:
Now:
+ m2
+ repository
+ localGroup
+ moduleName <-- compiled bundle goes here
What we want:
+ workspace
+ localGroup
+ moduleName
+ src
+ **build** <-- compiled bundle goes here
+ pom.xml
+ .
+ .
+ ...
Note: I must say that it does not necessarily have to compile them into the folders, it can be done via copying from .m2/repository
to the build folder of the respective modules. I heard that there is a plugin used in this regard, to copy stuff inside the modules.