生成maven3.8.1setting.xml模版
时间: 2023-10-04 10:08:20 浏览: 170
很高兴能为您解答,以下是 Maven 3.8.1 的 setting.xml 模板:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
| Licensed to the Apache Software Foundation (ASF) under one
| or more contributor license agreements. See the NOTICE file
| distributed with this work for additional information
| regarding copyright ownership. The ASF licenses this file
| to you under the Apache License, Version 2.0 (the
| "License"); you may not use this file except in compliance
| with the License. You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing,
| software distributed under the License is distributed on an
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
| KIND, either express or implied. See the License for the
| specific language governing permissions and limitations
| under the License.
-->
<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">
<localRepository>${user.home}/.m2/repository</localRepository>
<interactiveMode>true</interactiveMode>
<offline>false</offline>
<servers>
<!-- 配置私有仓库的认证信息 -->
<server>
<id>my-private-repo</id>
<username>myusername</username>
<password>mypassword</password>
</server>
</servers>
<mirrors>
<!-- 这里是阿里云的 Maven 镜像 -->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>my_profile</id>
<repositories>
<!-- 私有仓库 -->
<repository>
<id>my-private-repo</id>
<url>http://my.private.repo/url</url>
</repository>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- 这里是阿里云的 Maven 镜像 -->
<repository>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>my_profile</activeProfile>
</activeProfiles>
</settings>
```
希望能够帮到您,如果还有其他问题,请随时联系我。
阅读全文