Maven配置本地仓库、中央仓库及默认编译环境JDK1.8

Maven配置详解
本文详细介绍了如何在Maven的setting.xml文件中配置默认编译环境为JDK1.8的方法,并提供了具体的配置代码示例。此外,还介绍了如何设置本地仓库路径及配置使用阿里云中央仓库作为镜像。
//setting.xml中相应位置配置
//配置默认编译环境JDK1.8
1
<profile> 2 <id>jdk-1.8</id> 3 <activation> 4 <activeByDefault>true</activeByDefault> 5 <jdk>1.8</jdk> 6 </activation> 7 <properties> 8 <maven.compiler.source>1.8</maven.compiler.source> 9 <maven.compiler.target>1.8</maven.compiler.target> 10 <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> 11 </properties> 12 </profile>

配置本地仓库:

1 <localRepository>E:\\localrepo</localRepository> 

配置中央仓库:

1 <mirror>
2       <id>alimaven</id>
3       <name>aliyun maven</name>
4       <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
7       <mirrorOf>central</mirrorOf>        
8 </mirror>

 

转载于:https://www.cnblogs.com/mituxiaogaoyang/p/8473519.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值