Maven存储库位置在Eclipse中未更新 [英] Maven repository location is not updated in eclipse
问题描述
我有一个Maven项目.我已经使用命令将其转换为eclipse项目.
I have a Maven project. I have converted it to eclipse project using the command.
mvn eclipse:eclipse
我将此项目导入到Eclipse中.我正在丢失图书馆错误.
我已经在Eclipse的Maven设置中更新了Maven存储库详细信息.
I have updated the maven repository details in Maven setting of eclipse.
我当前的Maven存储库是E:\myfolder\repository
My current maven repository is E:\myfolder\repository
我也已经编辑了我的 settings.xml .
<localRepository>E:\myfolder\repository</localRepository>
我添加了一个类路径变量MAVEN_REPO.
I have added a class-path variable MAVEN_REPO.
MAVEN_REPO = E:\myfolder\repository
存储库中jar的实际地址为M2_REPO/javax/ccpp/ccpp/1.0/ccpp-1.0.jar.
但是eclipse无法在资源库中找到jar.
But the eclipse is not able to locate the jar in the repository.
It is taking default repository address.
仍然会丢失库错误,它指向默认的Maven存储库地址,而不是我的新存储库地址.
Still I am getting missing library error and it is pointing to default maven repository address rather than my new repository address.
Project 'Testproj' is missing required library: '\\user dir\.m2\repository\antlr\antlr\2.7.6\antlr-2.7.6.jar'
有人可以告诉您如何克服此错误.
Can some one tell how to overcome this error.
预先感谢.
推荐答案
在月食中,转到Preferences
> Maven
> Installations
In eclipse, go to Preferences
> Maven
> Installations
确保全局设置文件指向正确的配置,并且指向正确的本地存储库.
Make sure that the Global Settings file is pointing to the right config and it is pointing to the right local repository.
这篇关于Maven存储库位置在Eclipse中未更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!