Issue
I have a dual boot system with Windows and Linux. I have another partition which is visible to both Windows and Linux. I want to put my local repository there. How can I provide a path that both Linux and Windows will understand. Windows see it as d:/repository
drive and Linux sees it as /media/234242342/repository
. How should I configure this in pom.xml
?
Solution
Each OS needs an M2_HOME
as per the Maven documentation. Inside $M2_HOME/conf/
you can put a settings.xml
file and in that you can specify the location for the local repository using the <localRepository/>
element.
So for your specific system, in Windows use
<localRepository>d:\repository</localRepository>
and in Linux
<localRepository>/media/234242342/repository</localRepository>
Answered By - andyb
Answer Checked By - Gilberto Lyons (JavaFixing Admin)