<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<id>NexusAliyun</id>
<name>NexusAliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
<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>
</settings>
配置镜像的和网上的都大相径庭,差不多。
配置jdk1.8版本的设置还是很有用的,不需要在项目中,添加指定JDK版本插件了。
定义了一个环境,环境的id是jdk-1.8,激活设置是默认激活在jdk环境是1.8的时候。
本文介绍了如何在Maven的settings.xml文件中配置镜像源以优化下载速度,并展示了如何设置JDK版本,避免在项目中使用特定JDK版本插件。这种方法允许在特定JDK环境下激活相应配置。
3728

被折叠的 条评论
为什么被折叠?



