zoukankan      html  css  js  c++  java
  • resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced

    Maven在执行中报错:

    - Failure to transfer org.slf4j:slf4j-api:jar:1.7.24 from http://localhost:8081/nexus/content/groups/public/ was cached in the local repository, 
        resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced. 

    原因是有些jar包没有完全下载下来,在编译中找不到jar包。

    解决方法是 在setting.xml中增加一个更新策略,如下:

      <profiles>
        <profile>
      <id>nexus</id>
        <!--所有请求均通过镜像 -->
        <repositories>
             <repository>
                <id>central</id>
                <url>http://central</url>
                <releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
                <snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
             </repository>
        </repositories>
        <pluginRepositories>
              <pluginRepository>
                 <id>central</id>
                 <url>http://central</url>
                 <releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
                 <snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
              </pluginRepository>
         </pluginRepositories>
        </profile>
        
        <profile>   
            <id>jdk-1.7</id>   
            <activation>   
              <activeByDefault>true</activeByDefault>   
              <jdk>1.7</jdk>   
            </activation>   
            <properties>   
                <maven.compiler.source>1.7</maven.compiler.source>   
                <maven.compiler.target>1.7</maven.compiler.target>   
                <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>   
            </properties>   
        </profile>
      </profiles>
  • 相关阅读:
    适度平衡树
    适度平衡树
    卡特兰(Catalan)数列
    卡特兰(Catalan)数列
    从二叉搜索树到平衡二叉搜索树
    java开发环境配置(windows下JDK7+tomcat7)
    Spring整合Hibernate的步骤
    C++重载加号运算符实现两个结构体的相加
    AABB包围盒、OBB包围盒、包围球的比較
    Html的空格显示
  • 原文地址:https://www.cnblogs.com/xbq8080/p/6737506.html
Copyright © 2011-2022 走看看