文章目录
- 一、私服配置
- 1. 账户密码
- 2. 本地仓库
- 3. ip/port
- 二、IntelliJ IDEA
- 2.1. 创建项目
- 2.2. 指定配置
- 2.3. 下载依赖
- 2.4. 依赖查看
- 2.5. 注意事项
一、私服配置
将服务端生成的配置复制下来,进行修改
1. 账户密码
2. 本地仓库
3. ip/port
内容:
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.2.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><servers><server><username>gblfyuser</username><password>APA5NvgEGGHbw3mszVftZjsLj3b</password><id>central</id></server><server><username>gblfyuser</username><password>APA5NvgEGGHbw3mszVftZjsLj3b</password><id>snapshots</id></server><server><username>gblfyuser</username><password>APA5NvgEGGHbw3mszVftZjsLj3b</password><id>ssc-center</id></server></servers><localRepository>D:\rep2</localRepository><mirrors><mirror><mirrorOf>*</mirrorOf><name>ssc-center</name><url>http://192.168.159.134:8082/artifactory/ssc-center</url><id>ssc-center</id></mirror></mirrors><profiles><profile><repositories><repository><snapshots><enabled>false</enabled></snapshots><id>central</id><name>ssc-snapshots</name><url>http://192.168.159.134:8082/artifactory/ssc-snapshots</url></repository><repository><snapshots /><id>snapshots</id><name>ssc-snapshots</name><url>http://192.168.159.134:8082/artifactory/ssc-snapshots</url></repository></repositories><pluginRepositories><pluginRepository><snapshots><enabled>false</enabled></snapshots><id>central</id><name>ssc-center</name><url>http://192.168.159.134:8082/artifactory/ssc-center</url></pluginRepository><pluginRepository><snapshots /><id>snapshots</id><name>ssc-center</name><url>http://192.168.159.134:8082/artifactory/ssc-center</url></pluginRepository></pluginRepositories><id>artifactory</id></profile></profiles><activeProfiles><activeProfile>artifactory</activeProfile></activeProfiles>
</settings>
二、IntelliJ IDEA
idea 测试
新建项目或者在现有的项目中添加依赖都可以,要是在现有的项目中添加MySQL依赖,刷新maven
2.1. 创建项目
2.2. 指定配置
2.3. 下载依赖
2.4. 依赖查看
2.5. 注意事项
第一次配置好maven之后,重启一下idea,在刷新maven即可