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>