Eclipse Maven dependency doesn't find

大城市里の小女人 提交于 2019-12-10 20:44:33

问题


I have add to pom.xml of my project repository:

        <repository>
        <id>java.net</id>
        <name>java.net</name>
        <url>http://download.java.net/maven/2</url>
    </repository>

But when I go to tab dependencies of pom - click add I don't see version jsf-impl 2.0 or more

How to fix it? Thanks.


回答1:


You can't unless Maven can download the remote index to power the dependency search. Check the Maven console for log details.




回答2:


To fix search dependency search engine you have to "download repository index". To do so:

Window -> Preferences -> Maven -> User Settings -> Update Settings

(even if this file does not exist!)

If you want to be up to date with this list I recommend enabling:

Window -> Preferences -> Maven -> Download repository index updates on startup




回答3:


Just add the dependency to the pom:

<dependency>
    <groupId>com.sun.faces</groupId>
    <artifactId>jsf-impl</artifactId>
    <version>2.0.0</version>
</dependency>


来源:https://stackoverflow.com/questions/6799449/eclipse-maven-dependency-doesnt-find

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