Idea配置Maven优先从本地仓库获取依赖

news2024/9/22 21:15:52


             



idea配置maven依赖优先从指定本地仓库获取

在设置中搜索 Runner ,在VM Option中设置参数-DarchetypeCatalog=internal





<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <!--设置spring-boot依赖的版本 -->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.6.RELEASE</version>
        <relativePath/>
    </parent>
    <groupId>org.jd.auth.data.security.server</groupId>
    <artifactId>SSO-AuthServer-provider</artifactId>
    <version>1.0-RELEASE</version>
    <packaging>pom</packaging>
    <modules>
        <module>SSO-Authentication-Server</module>
        <module>SSO-AuthServer-Gateway</module>
        <module>SSO-AuthServer-EurekaServer</module>
        <module>SSO-AuthServer-Config</module>
        <module>SSO-Mybatis-Generator</module>
        <module>SSO-Pay-Account-Server</module>
        <module>SSO-Business-Order-Server</module>
    </modules>
    <name>SSO-AuthServer-provider</name>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source.version>1.8</maven.compiler.source.version>
        <maven.compiler.target.version>1.8</maven.compiler.target.version>
        <lombok.version>1.18.22</lombok.version>
        <spring-boot-devtools.version>2.2.6.RELEASE</spring-boot-devtools.version>
        <spring-cloud-starter-netflix-hystrix.version>2.2.6.RELEASE</spring-cloud-starter-netflix-hystrix.version>
        <spring-cloud-starter-netflix-eureka-client.version>2.2.6.RELEASE</spring-cloud-starter-netflix-eureka-client.version>
    </properties>

    <!-- 设定主仓库,按设定顺序进行查找。 -->
    <repositories>
        <repository>
            <id>repos</id>
            <name>Repository</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
        </repository>
        <repository>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <layout>default</layout>
            <url>http://repo1.maven.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
    <!-- 设定插件仓库 -->
    <pluginRepositories>
        <pluginRepository>
            <id>repos</id>
            <name>Repository</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
        </pluginRepository>
    </pluginRepositories>


    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
            <version>${spring-cloud-starter-netflix-hystrix.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>archaius-core</artifactId>
                    <groupId>com.netflix.archaius</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
            <version>${spring-cloud-starter-netflix-eureka-client.version}</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
           <!-- <scope>provided</scope>-->
        </dependency>
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
            <version>5.8.18</version>
        </dependency>
        <!--映射相关jar包 begin-->
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct</artifactId>
            <version>1.5.3.Final</version>
        </dependency>
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct-processor</artifactId>
            <version>1.5.3.Final</version>
        </dependency>
        <!--映射相关jar包 end-->

        <!-- 开发环境的热部署,不至于频繁启动,效率低下-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <version>${spring-boot-devtools.version}</version>
            <optional>true</optional>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <!--源代码使用的jdk版本-->
                    <source>${maven.compiler.source.version}</source>
                    <!--需要生成的目标class文件的编译版本-->
                    <target>${maven.compiler.target.version}</target>
                    <!--字符集编码-->
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <!--跳过测试-->
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <addResources>true</addResources>
                    <fork>true</fork>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/759187.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

沐风老师MaxScript快速入门教程

Maxscript是将自定义3dMax应用的更强大的方法之一。结合内置的侦听器和编辑器&#xff0c;我们在运行时操作和测试代码&#xff0c;使其成为用户试验和探索改进软件体验的强大选项。通过Maxscript&#xff0c;我们几乎可以操作软件中的每一个对象&#xff0c;包括但不限于&…

【C++】-vector的模拟实现(以及memcpy如何使用)

&#x1f496;作者&#xff1a;小树苗渴望变成参天大树&#x1f388; &#x1f389;作者宣言&#xff1a;认真写好每一篇博客&#x1f4a4; &#x1f38a;作者gitee:gitee✨ &#x1f49e;作者专栏&#xff1a;C语言,数据结构初阶,Linux,C 动态规划算法&#x1f384; 如 果 你 …

Spring-MVC的注解扫描-spring17

包括我们业务层和Dao层&#xff0c;去帮助别人去扫 只扫controller下的注解

00_YS_硬件电路图

1.主控制芯片的型号 STM32F407IGT6&#xff0c;LQFP-176&#xff0c;1MB 内部 FLASH&#xff0c;192KB RAM USART3 RS485 通信&#xff0c;芯片使用 SP3072EEN; UART5 RS232 通信&#xff0c; CAN 1 路&#xff0c;型号 SN65HVD230 USB 支持 …

Python应用实例(二)数据可视化(三)

数据可视化&#xff08;三&#xff09; 1.使用Plotly模拟掷骰子1.1 安装Plotly1.2 创建Die类1.3 掷骰子1.4 分析结果1.5 绘制直方图1.6 同时掷两个骰子1.7 同时掷两个面数不同的骰子 1.使用Plotly模拟掷骰子 本节将使用Python包Plotly来生成交互式图表。需要创建在浏览器中显示…

代码随想录算法训练营第十九天 | 动态规划系列5,6,7,8

动态规划系列5,6,7,8 377 组合总和 Ⅳ未看解答自己编写的青春版重点代码随想录的代码我的代码(当天晚上理解后自己编写) 爬楼梯进阶322 零钱兑换未看解答自己编写的青春版写完这道题后的感受重点代码随想录的代码动态规划&#xff0c;也要时刻想着剪枝操作。我的代码(当天晚上理…

异常执行结果随笔

前段时间有朋友问我异常执行顺序问题&#xff0c;这里简单记录下哈。 伪代码描述&#xff0c;当j0和j1&#xff0c;输出结果分别是什么&#xff1f; int i 0; int j 0或1; try {j i / j&#xff1b;System.out.println(i);return i; } catch (Exception e) {System.out.pri…

win10如何使用wsl配置Ubuntu并使用vscode连接

文章目录 0. 前置资料1. 下载wsl2. 下载Ubuntu3. vscode连接wsl 0. 前置资料 wsl为适用于 Linux 的 Windows 子系统&#xff0c;可参考以下微软的官方文档 https://learn.microsoft.com/zh-cn/windows/wsl/ 1. 下载wsl 点击屏幕左下角的放大镜&#xff0c;直接在输入框键入P…

第 354 场LeetCode周赛

A 特殊元素平方和 模拟 class Solution { public:int sumOfSquares(vector<int> &nums) {int res 0;int n nums.size();for (int i 0; i < n; i)if (n % (i 1) 0)res nums[i] * nums[i];return res;} };B 数组的最大美丽值 差分数组: n u m s [ i ] nums[…

cmake处理参数时的一些问题说明

cmake处理参数时的一些问题说明 函数传参空格和分号的坑函数转发的坑demo 函数传参遇到不平衡方括号的坑 函数传参空格和分号的坑 我们在处理函数和宏的时候不过不小心会遇到很多坑例如: someCommand(a b c) someCommand(a b c)因为cmake中使用空格或者分号分隔符所以上面代…

Django实现接口自动化平台(十一)项目模块Projects序列化器及视图【持续更新中】

相关文章&#xff1a; Django实现接口自动化平台&#xff08;十&#xff09;自定义action names【持续更新中】_做测试的喵酱的博客-CSDN博客 本章是项目的一个分解&#xff0c;查看本章内容时&#xff0c;要结合整体项目代码来看&#xff1a; python django vue httprunner …

LangChain 本地化方案 - 使用 ChatYuan-large-v2 作为 LLM 大语言模型

一、ChatYuan-large-v2 模型 ChatYuan-large-v2是一个开源的支持中英双语的功能型对话语言大模型&#xff0c;与其他 LLM 不同的是模型十分轻量化&#xff0c;并且在轻量化的同时效果相对还不错&#xff0c;仅仅通过0.7B参数量就可以实现10B模型的基础效果&#xff0c;正是其如…

自动化测试-selenium环境搭建

文章目录 1. 什么是自动化2. 自动化测试分类3. selenium的环境搭建4. 测试selenium 1. 什么是自动化 自动化是指使用软件工具、脚本或程序来执行一系列的任务、操作或流程&#xff0c;而无需人工干预或指导。 自动化测试&#xff1a;使用自动化工具和脚本来执行测试用例&#x…

浅谈端口 | 80端口和8080端口是2个不同的端口吗?有何区别?

目录 写在前面 端口及其特点 端口号的范围和分类 在HTTP超文本传输协议中80端口有正式的身份 写在前面 首先&#xff0c;确定以及肯定的是他们俩是完全不同的端口。一般80作为网页服务器的访问端口&#xff0c;比如一个网站的ip地址是119.119.119.119&#xff0c;我们在浏…

如何将SAP数据抽取到Azure数据湖平台?

经过多年的发展&#xff0c;SNP Glue 在全球已成为值得信赖且广为人知的解决方案&#xff0c;支持客户将其 SAP 数据与现代化的平台集成。SNP Glue 打破了数据孤岛&#xff0c;向数据科学家开放了 SAP&#xff0c;支持基于企业 SAP 数据的多个新用例。 随着时间的推移&#xff…

MySQL数据库之事物

一、MySQL事务的概念 &#xff08;1&#xff09;事务是一种机制、一个操作序列&#xff0c;包含了一组数据库操作命令&#xff0c;并且把所有的命令作为一个整体一起向系统提交或撤销操作请求&#xff0c;即这一组数据库命令要么都执行&#xff0c;要么都不执行。 &#xff08…

【基础理论】描述性统计基本概念

一、说明 统计学是数学的一个分支&#xff0c;涉及数据的收集、解释、组织和解释。本博客旨在回答以下问题&#xff1a; 1. 什么是描述性统计&#xff1f;2. 描述性统计的类型&#xff1f;3. 集中趋势的度量&#xff08;平均值、中位数、模式&#xff09; 4. 散布/离差度量&…

每天一道C语言编程(6):委派任务

题目描述 某侦察队接到一项紧急任务&#xff0c;要求在A、B、C、D、E、F六个队员中尽可能多地挑若干人&#xff0c;但有以下限制条件&#xff1a; 1)A和B两人中至少去一人&#xff1b; 2)A和D不能一起去&#xff1b; 3)A、E和F三人中要派两人去&#xff1b; 4)B和C都去或都不去…

使用CatBoost和SHAP进行多分类完整代码示例

CatBoost是顶尖的机器学习模型之一。凭借其梯度增强技术以及内置函数&#xff0c;可以在不做太多工作的情况下生成一些非常好的模型。SHAP (SHapley Additive exPlanation)是旨在解释具有独特视觉效果和性能价值的机器学习模型的输出。CatBoost和SHAP结合在一起构成了一个强大的…

《动手学深度学习》(pytorch版本)中`d2lzh_pytorch`包问题

《动手学深度学习》&#xff08;pytorch版本&#xff09;中d2lzh_pytorch包问题