zoukankan      html  css  js  c++  java
  • 解决maven中某些依赖无法下载,手动安装Maven依赖

    <!--先下载jar包,然后在仓库中手动安装,下面是遇到的两个例子-->
    <!--第一个-->
    mvn install:install-file -Dfile=D:kaptcha-2.3.jar -DgroupId=com.google.code.kaptcha -DartifactId=kaptcha -Dversion=2.3 -Dpackaging=jar -DgeneratePom=true
    <!--第二个-->
    mvn install:install-file -Dfile=D:fastdfs-client-java-1.27-RELEASE.jar -DgroupId=org.csource -DartifactId=fastdfs-client-java -Dversion=1.27-RELEASE -Dpackaging=jar -DgeneratePom=true
    

    这样做如果还是遇到依赖无法下载,需要检查一下maven的配置文件,conf下的setting.xml文件中是否设置了代理。代理需要设置正确。

    <proxies>
        <proxy>
            <id>optional</id>
            <active>true</active>
            <protocol>http</protocol>
            <username></username>
            <password></password>
            <host>你的域名</host>
            <port>你的端口</port>
            <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
        </proxy>
    </proxies>
    
  • 相关阅读:
    最终版需求分析
    第九次会议
    第八次会议
    软工测试文档
    软工第七次会议记录
    第六次会议
    软件工程第二次和第三次会议
    Java环境搭建与概述
    [JavaWeb] Ajax&JQuery
    [JavaWeb] JSP
  • 原文地址:https://www.cnblogs.com/smalldong/p/13574366.html
Copyright © 2011-2022 走看看