赞
踩
https://maven.apache.org/
https://maven.apache.org/docs/history.html
https://mvnrepository.com/
历史版本列表:https://maven.apache.org/docs/history.html
Maven 需要本机安装 Java 环境、必需包含 JAVA_HOME 环境变量!
bin:含有 Maven 的运行脚本;
boot:含有 plexus-classworlds 类加载器框架;
conf:含有 Maven 的核心配置文件;
lib:含有 Maven 运行时所需要的 Java 类库;
LICENSE、NOTICE、README.txt:针对 Maven 版本,第三方软件等简要介绍。
变量名:MAVEN_HOME
变量值:D:\MySoft\Environment\Maven\apache-maven-3.8.8(解压的目录)
新增:%MAVEN_HOME%\bin
mvn -v
我们需要修改 conf/settings.xml 配置文件,来修改 maven 的一些默认配置。
主要修改的有三个配置:
<!-- 阿里云镜像源 -->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
https://mirrors.huaweicloud.com/home
https://mirrors.huaweicloud.com/mirrorDetail/5fbb71cd07bbb121c2aded7b
使用说明:
本镜像仅包含兼容 aarch64 环境的 jar 包,不是完整的 Maven 中央仓库,需要配置其他 Maven 中央仓库一起使用,例如华为云Maven。
使用前,参考如下内容修改**<Maven安装目录>/conf/settings.xml**文件:<profile> <id>kunpeng</id> <!-- 远程仓库列表,将华为鲲鹏 Maven 仓库放在最前面 --> <repositories> <repository> <id>kunpengmaven</id> <name>kunpeng maven</name> <url>https://repo.huaweicloud.com/kunpeng/maven/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> <!-- 其他 repository,配置其他Maven中央仓库,以华为云Maven为例 --> <repository> <id>huaweicloud</id> <name>huaweicloud maven</name> <url>https://repo.huaweicloud.com/repository/maven/</url> <releases> <enabled>true</enabled> </releases> </repository> </repositories> </profile> <!-- 激活上面的profile --> <activeProfiles> <activeProfile>kunpeng</activeProfile> </activeProfiles>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
<profile>
<id>kunpeng</id>
<!-- 远程仓库列表,将华为鲲鹏 Maven 仓库放在最前面 -->
<repositories>
<repository>
<id>kunpengmaven</id>
<name>kunpeng maven</name>
<url>https://repo.huaweicloud.com/kunpeng/maven/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<!-- 其他 repository,配置其他Maven中央仓库,以华为云Maven为例 -->
<repository>
<id>huaweicloud</id>
<name>huaweicloud maven</name>
<url>https://repo.huaweicloud.com/repository/maven/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
<repository>
<id>activiti-repos2</id>
<name>Activiti Repository 2</name>
<url>https://app.camunda.com/nexus/content/groups/public</url>
</repository>
<repository>
<id>activiti-repos</id>
<name>Activiti Repository</name>
<url>https://maven.alfresco.com/nexus/content/groups/public</url>
</repository>
</repositories>
</profile>
<profile>
<id>jdk-17</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>17</jdk>
</activation>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.compilerVersion>17</maven.compiler.compilerVersion>
</properties>
</profile>
<!-- 激活上面的profile -->
<activeProfiles>
<activeProfile>jdk-17</activeProfile>
</activeProfiles>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。