maven配置
文章目录
下载
在官网下载对应操作系统的maven
配置
解压之后找到conf文件夹的setting.xml找到<localRepository>配置本地仓库,用于下载jar包;<localRepository>本地仓库路径</localRepository>
配置远程仓库
找到<mirror>标签配置远程仓库,作为下载jar包的镜像地址
`<mirror>
<id>nexus-aliyun</id>
<name>Nexus aliyun</name>
<mirrorOf>central</mirrorOf>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>`配置jdk版本
通过修改<profile>标签中的jdk信息,选择使用的jdk版本
<profile>
<id>development</id>
<activation>
<jdk>1.8</jdk>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>`
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论