1.mvn -v
显示 如下:
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-18T02:33:14+08:00)
Maven home: /opt/maven/apache-maven-3.5.4
Java version: 1.8.0_161, vendor: Oracle Corporation, runtime: /usr/local/jdk1.8/jdk1.8.0_161/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-101-generic", arch: "amd64", family: "unix"
weimingyang@a11191021050468:/opt/maven/apache-maven-3.5.4/conf$
2.IDEA 配置如下:
3.IEEA 报错如下:
Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.RELEASE from/to spring-snapshots (https://repo.spring.io/snapshot): /opt/maven/apache-maven-3.5.4/maven-repo/org/springframework/boot/spring-boot-starter-parent/2.0.0.RELEASE/spring-boot-starter-parent-2.0.0.RELEASE.pom.part.lock (No such file or directory)
仓库没有这个版本的,改成
2.0.0.BUILD-SNAPSHOT
或者换个仓库吧