Maven 为什么m2e添加的依赖项总是零

Maven 为什么m2e添加的依赖项总是零,maven,dependencies,m2e,Maven,Dependencies,M2e,当我尝试在pom.xml中添加依赖项时,结果总是为零。 与输入log4j类似,选择依赖项UI显示“log4j”0的结果 如何从中央存储库中搜索结果? 这是my settings.xml: <?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-ins

当我尝试在pom.xml中添加依赖项时,结果总是为零。 与输入log4j类似,选择依赖项UI显示“log4j”0的结果 如何从中央存储库中搜索结果? 这是my settings.xml:

<?xml version="1.0" encoding="UTF-8"?>
<settings
  xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <localRepository>G:/Maven/repository</localRepository>
  <pluginGroups>
  </pluginGroups>

  <proxies>
  </proxies>
  <servers>
  </servers>

  <mirrors>
  </mirrors>


  <profiles>
  </profiles>

</settings>

为什么不尽可能简单地使用:

<?xml version="1.0" encoding="UTF-8"?>
<settings
  xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <localRepository>G:/Maven/repository</localRepository>
</settings>

您是否已配置在Eclipse中下载索引?我转到“全局存储库->中心”选项上的maven repositories view rebuild index。进度视图显示它重建成功,但没有用,问题仍然存在。我的Eclipse版本是4.1.2,m2e版本是1.0.2,maven版本是3.0.4