Issue
I have multiple projects. I want to create different maven repository paths for each project. Means, each project should point to different folder as maven repository (by default C:/Users/USERNAME/.m2 is used as repo). I know that this may increase the download and same files if used in multiple projects will be downloaded/kept multiple times. But i want to separate out the repository for different projects so that i can bundle the repository along with my project's source code to be shared to the other person. I simply dont want to share my whole m2 repository (of size 2 gb) for a very small project sized 50 mb.
Regards,
Vibhav
Solution
Thanks everyone for your comments.
I finally did the following:
- Setup each project as a separate workspace in eclipse
- Created a separate apache maven folder for each project (actually duplicating the maven home even though i am using same version of maven)
- From eclipse workspace, I pointed out the appropriate maven home
- configured the repository path (localRepository) in MAVEN_HOME/conf/settings.xml file from default ~./m2/repository to something like MAVEN_HOME/repo
This way, I could get separate maven repositories for each project (or I should say workspace).
Thanks, Vibhav Agrawal
Answered By - Vibhav Agrawal
Answer Checked By - Pedro (JavaFixing Volunteer)