Maven< LocalRepository> pom.xml中的标签 [英] Maven <LocalRepository> tag in pom.xml
问题描述
默认情况下,Maven将所有依赖项下载到$ {user.home}/.m2/repository/dirctory.
By default Maven downloads all the dependencies to ${user.home}/.m2/repository/ dirctory.
我阅读了有关标签LocalRepository的信息,该标签使我们可以更改默认路径.我尝试添加此标记在pom.xml文件中添加其他位置.但是我无法在pom.xml文件中找到它的确切位置.
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.
是否需要将其放入settings.xml或pom.xml中?
Do I need to put it in settings.xml or pom.xml?
能帮我添加此标签到xml文件中的正确位置吗?
can you please help me to add this tag to correct position in xml file.
<settings>
<localRepository>
D:\Ravindra\Projects\MavenSpringJar\
</localRepository>
</settings>
<settings>
<localRepository>
D:\Ravindra\Projects\MavenSpringJar\
</localRepository>
</settings>
是在<project>
,<dependencies>
,<dependency>
标记内吗?
谢谢.
推荐答案
localRepository 标签是仅在setttings.xml
文件中允许,但在 pom.xml 文件.
The localRepository tag is only allowed within the setttings.xml
file but not in the pom.xml file.
这篇关于Maven< LocalRepository> pom.xml中的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!