IDEA使用自己的Maven配置
下载MavenMaven官网http://maven.apache.org/download.cgi下载Maven到自己的电脑上配置环境变量:新建变量:(具体文件夹路径根据实际情况做出改变)[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-AilylH6j-1607529442466)(C:\Users\Lucas_mai\AppData\Roaming\Typora\
·
下载Maven
Maven官网 http://maven.apache.org/download.cgi
下载Maven到自己的电脑上
配置环境变量:
新建变量:(具体文件夹路径根据实际情况做出改变)
在变量Path下添加
打开控制台进行测试:
IDEA maven配置
修改conf 下的setting.xml配置文件
修改镜像源为阿里云
<mirrors>
<!-- mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
</mirrors>
修改下载jar包的位置
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ${user.home}/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
-->
<localRepository>C:\maven\maven_jar</localRepository>
绑定java环境
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</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>
</profiles>
更多推荐
已为社区贡献1条内容
所有评论(0)