【问题标题】:Can't update remote maven repositories index无法更新远程 Maven 存储库索引
【发布时间】:2015-05-21 16:23:39
【问题描述】:

我在Linux服务器上部署了最新的nexus,nexus版本是2.11.2-06。在 linux 服务器上启动 Nexus 后,我可以通过带有 url http://ip:port/nexus 的浏览器访问 nexus。然后我想在 IntelliJ IDEA 13.1.6 中创建 maven 项目。创建项目后,我想在 Settings -> Maven -> Repositories -> Indexed Maven Repositories 窗口更新 maven 存储库索引。点击更新按钮后总是报错:

FileNotFoundException: 找不到 nexus-maven-repository-index.zip

当我在这个窗口中指向maven repo url时会弹出,我已经搜索了几天的答案,似乎很多人都被这个问题所困扰,有没有人知道如何解决这个问题?任何帮助将不胜感激。

user/.m2/下我的本地settings.xml内容如下:

    <mirrors>
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>*</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://linux_server_ip:8091/nexus/content/groups/public</url>
    </mirror>   

  </mirrors>


  <profiles>
    <profile>  
        <id>nexus</id>  
        <repositories>  
             <repository>  
               <id>nexus-releases</id>  
               <url>http://central</url>  
              <releases><enabled>true</enabled></releases>  
               <snapshots><enabled>true</enabled></snapshots>  
             </repository>  
             <repository>  
               <id>nexus-snapshots</id>  
               <url>http://central</url>  
               <releases><enabled>true</enabled></releases>  
               <snapshots><enabled>true</enabled></snapshots>  
             </repository>  
           </repositories>  
           <pluginRepositories>  
              <pluginRepository>  
                     <id>nexus-releases</id>  
                      <url>http://central</url>  
                      <releases><enabled>true</enabled></releases>  
                      <snapshots><enabled>true</enabled></snapshots>  
                    </pluginRepository>  
                    <pluginRepository>  
                      <id>nexus-snapshots</id>  
                       <url>http://central</url>  
                     <releases><enabled>true</enabled></releases>  
                      <snapshots><enabled>true</enabled></snapshots>  
                  </pluginRepository>  
              </pluginRepositories>  
        </profile>
  </profiles>

  <activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>

在我的想法 maven 存储库窗口中:

网址类型已更新
C:/Users/1/.m2/repository 本地 2015/5/21
http://central 远程错误
pop msg is java.io.FileNotFoundException: Resources nexus-maven-repository-index.zip 不存在。

【问题讨论】:

  • 需要配置nexus来创建索引并发布索引。可以从文档中提取如何做到这一点。

标签: maven indexing intellij-idea nexus repository


【解决方案1】:

您应该将setting.xml 文件添加到您的.m2 文件夹中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-02-26
    • 2016-07-08
    • 2015-11-09
    • 2016-05-05
    • 2011-07-05
    • 2011-12-30
    • 2012-08-10
    • 2016-02-16
    相关资源
    最近更新 更多