1.找到apache-maven-3.5.2\conf\settings.xml
2.在mirrors中添加
<!--阿里仓库镜像--> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> <mirrorOf>central</mirrorOf> </mirror>
3.在profiles中添加
<!--jdk编译版本--> <profile> <id>jdk17</id> <activation> <property> <activeByDefault>true</activeByDefault> <value>1.7</value> </property> </activation> <properties> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion> </properties> </profile>
4.在activeProfiles中添加
<activeProfiles> <!--激活jdk编译版本配置--> <activeProfile>jdk17</activeProfile> </activeProfiles>