zoukankan      html  css  js  c++  java
  • Maven代理

      1,在conf/setting.xml中添加mirror

      

    View Code
         <mirror>
               <id>ibiblio.org</id>
               <name>ibiblio Mirror of http://repo1.maven.org/maven2/</name>
               <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
               <mirrorOf>central</mirrorOf>
               <!-- United States, North Carolina -->
         </mirror>
         <mirror> 
             <id>jboss-public-repository-group</id> 
             <mirrorOf>central</mirrorOf> 
             <name>JBoss Public Repository Group</name> 
             <url>http://repository.jboss.org/nexus/content/groups/public</url> 
         </mirror> 

       2,pom.xml提示

    View Code
    ArtifactTransferException: Failure to transfer org.slf4j:slf4j-api:jar:1.5.8 from http://mirrors.ibiblio.org/pub/mirrors/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of ibiblio.org has elapsed or updates are forced. Original error: 
     Could not transfer artifact org.slf4j:slf4j-api:jar:1.5.8 from/to ibiblio.org (http://mirrors.ibiblio.org/pub/mirrors/maven2): Access denied to http://mirrors.ibiblio.org/pub/mirrors/maven2/org/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.jar. Error code 403, Forbidden

      解决方法:清空本地仓库中的未成功下载的slf4j文件,然后重新下载。

      3,添加Oracle Driver到本地仓库

      用如下命令安装:mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 -Dpackaging=jar -Dfile=D:\1\classes12.jar

      然后在pom.xml中添加依赖

      

    View Code
    1     <dependency>
    2         <groupId>com.oracle</groupId>
    3         <artifactId>ojdbc14</artifactId>
    4         <version>10.2.0.1.0</version>
    5     </dependency>

      4,new Maven Project时候没有maven-archetype-quickstart这一项,可以找到maven-archetype-quickstart-1.1.jar[url:http://mirrors.ibiblio.org/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/1.1/maven-archetype-quickstart-1.1.jar]的url,然后添加。如下图

  • 相关阅读:
    MessageBoxButtons.OKCancel的选择事件
    Markdown 学习
    【Python】tesserocr的Path错误
    【Python套接字】socket编程
    【Python数据】懒人修仙传数值
    【Python画画】失败案例总结
    【Python画画】.ui文件转.py文件
    【Python截图】截图处理
    【想法】想做一个辅助工具
    【Python爬虫】从html里爬取中国大学排名
  • 原文地址:https://www.cnblogs.com/xiongyu/p/2710628.html
Copyright © 2011-2022 走看看