Maven <LocalRepository> tag in pom.xml

情到浓时终转凉″ 提交于 2019-12-24 01:45:15

问题


By default Maven downloads all the dependencies to ${user.home}/.m2/repository/ dirctory.

I read about the tag LocalRepository which allows us to change the default path. I tried adding this tag add different locations in pom.xml file. But I could not find its exact location in the pom.xml file.

Do I need to put it in settings.xml or pom.xml?

can you please help me to add this tag to correct position in xml file.

<settings> <localRepository> D:\Ravindra\Projects\MavenSpringJar\ </localRepository> </settings>

Is it inside <project>,<dependencies>,<dependency> tag?

Thanks.


回答1:


The localRepository tag is only allowed within the setttings.xml file but not in the pom.xml file.



来源:https://stackoverflow.com/questions/19255129/maven-localrepository-tag-in-pom-xml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!