66 lines
2.1 KiB
XML
66 lines
2.1 KiB
XML
<?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
|
||
https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||
|
||
<!-- 项目级 Maven 设置:
|
||
1. 使用当前项目目录下的 .mvn/repository 作为本地仓库;
|
||
2. 明确使用 Maven Central 作为远程仓库;
|
||
3. 不依赖用户家目录 ~/.m2/settings.xml 中配置的私服(如 hongma)。 -->
|
||
<localRepository>${user.dir}/.mvn/repository</localRepository>
|
||
|
||
<mirrors>
|
||
<!-- 不配置任何私服镜像,避免外部镜像强制接管 central -->
|
||
</mirrors>
|
||
|
||
<servers>
|
||
<server>
|
||
<id>gitea</id>
|
||
<configuration>
|
||
<httpHeaders>
|
||
<property>
|
||
<name>Authorization</name>
|
||
<value>token e74959457eff4170b5aff418b17063c9cb84b48e</value>
|
||
</property>
|
||
</httpHeaders>
|
||
</configuration>
|
||
</server>
|
||
</servers>
|
||
|
||
<profiles>
|
||
<profile>
|
||
<id>project-repos</id>
|
||
<repositories>
|
||
<repository>
|
||
<id>central</id>
|
||
<url>https://repo1.maven.org/maven2</url>
|
||
<releases>
|
||
<enabled>true</enabled>
|
||
</releases>
|
||
<snapshots>
|
||
<enabled>false</enabled>
|
||
</snapshots>
|
||
</repository>
|
||
</repositories>
|
||
<pluginRepositories>
|
||
<pluginRepository>
|
||
<id>central</id>
|
||
<url>https://repo1.maven.org/maven2</url>
|
||
<releases>
|
||
<enabled>true</enabled>
|
||
</releases>
|
||
<snapshots>
|
||
<enabled>false</enabled>
|
||
</snapshots>
|
||
</pluginRepository>
|
||
</pluginRepositories>
|
||
</profile>
|
||
</profiles>
|
||
|
||
<activeProfiles>
|
||
<activeProfile>project-repos</activeProfile>
|
||
</activeProfiles>
|
||
|
||
</settings>
|