zoukankan      html  css  js  c++  java
  • java 解决maven导入jeecg依赖失败问题

    项目中导入jeecg依赖,显示无法读取导入失败。
    在这里插入图片描述

    原因分析:maven之前就已经配置了阿里镜像,默认所有的依赖都只会去阿里镜像下载,而jeecg依赖需要从私服进行下载,因此需要将jeecg从阿里镜像中排除。

    备注:如果也有自己的私服,可以参考jeecg方式排除一下,不然不会从自己的私服去下载私有的依赖。
    在这里插入图片描述
    解决方法一:
    在项目的pom.xml文件中新增以下内容:

    	<distributionManagement>
    	  	<repository>
                <id>jeecg</id>
                <name>jeecg Repository</name>
                <url>http://maven.jeecg.com:8090/nexus/content/repositories/jeecg</url>
            </repository>
            <snapshotRepository>
    	        <id>jeecg-snapshots</id>
                <name>jeecg Snapshot Repository</name>
                <url>http://maven.jeecg.com:8090/nexus/content/repositories/snapshots/</url>
    	    </snapshotRepository>
    	</distributionManagement>
    	
    	<repositories>
    		<repository>
                <id>aliyun</id>
                <name>aliyun Repository</name>
                <url>http://maven.aliyun.com/nexus/content/groups/public</url>
                <snapshots>
    				<enabled>false</enabled>
    			</snapshots>
            </repository>
    		<repository>
                <id>jeecg</id>
                <name>jeecg Repository</name>
                <url>http://maven.jeecg.org/nexus/content/repositories/jeecg</url>
                <snapshots>
    				<enabled>false</enabled>
    			</snapshots>
            </repository>
    	</repositories>
    

    在这里插入图片描述
    解决方法二:
    在maven的settings.xml文件中添加镜像如下:

        <mirror>
           <id>aliyun</id>
           <name>aliyun Maven</name>
           <mirrorOf>*,!jeecg,!jeecg-snapshots</mirrorOf>
           <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
       </mirror>
    

    在这里插入图片描述

  • 相关阅读:
    docker的网络服务
    想真正了解JAVA设计模式看着一篇就够了。 详解+代码实例
    再问你Java内存模型的时候别再给我讲堆栈方法区
    ssh爆破脚本
    ecshop3.0.0注入
    zabbix 安装配置以及漏洞检测脚本
    代理爬取
    selenium2使用记录
    初级AD域渗透系列
    用ftplib爆破FTP口令
  • 原文地址:https://www.cnblogs.com/gmhappy/p/13457025.html
Copyright © 2011-2022 走看看