maven 私服的setting.xml配置

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
 3           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4           xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
 5
 6   <pluginGroups></pluginGroups>
 7   <proxies></proxies>
 8
 9   <servers>
10       <server>
11       <id>nexus-releases</id>
12       <username>admin</username>
13       <password>admin123</password>
14     </server>
15     <server>
16       <id>nexus-snapshots</id>
17       <username>admin</username>
18       <password>admin123</password>
19     </server>
20   </servers>
21
22   <mirrors>
23     <mirror>
24       <id>nexus-releases</id>
25       <mirrorOf>*</mirrorOf>
26       <url>http://localhost:8081/nexus/content/groups/public</url>
27     </mirror>
28     <mirror>
29       <id>nexus-snapshots</id>
30       <mirrorOf>*</mirrorOf>
31       <url>http://localhost:8081/nexus/content/groups/public-snapshots</url>
32     </mirror>
33   </mirrors>
34
35   <profiles>
36    <profile>
37       <id>nexus</id>
38       <repositories>
39         <repository>
40           <id>nexus-releases</id>
41           <url>http://nexus-releases</url>
42           <releases><enabled>true</enabled></releases>
43           <snapshots><enabled>true</enabled></snapshots>
44         </repository>
45         <repository>
46           <id>nexus-snapshots</id>
47           <url>http://nexus-snapshots</url>
48           <releases><enabled>true</enabled></releases>
49           <snapshots><enabled>true</enabled></snapshots>
50         </repository>
51       </repositories>
52       <pluginRepositories>
53          <pluginRepository>
54                 <id>nexus-releases</id>
55                  <url>http://nexus-releases</url>
56                  <releases><enabled>true</enabled></releases>
57                  <snapshots><enabled>true</enabled></snapshots>
58                </pluginRepository>
59                <pluginRepository>
60                  <id>nexus-snapshots</id>
61                   <url>http://nexus-snapshots</url>
62                 <releases><enabled>true</enabled></releases>
63                  <snapshots><enabled>true</enabled></snapshots>
64              </pluginRepository>
65          </pluginRepositories>
66     </profile>
67   </profiles>
68
69   <activeProfiles>
70       <activeProfile>nexus</activeProfile>
71   </activeProfiles>
72
73 </settings>

maven 项目 的pom.xml配置

 1 <distributionManagement>
 2         <!-- 两个ID必须与 setting.xml中的<server><id>nexus-releases</id></server>保持一致-->
 3         <repository>
 4             <id>nexus-releases</id>
 5             <name>Nexus Release Repository</name>
 6             <url>http://localhost:8081/nexus/content/repositories/releases</url>
 7         </repository>
 8         <snapshotRepository>
 9             <id>nexus-snapshots</id>
10             <name>Nexus Snapshot Repository</name>
11             <url>http://localhost:8081/nexus/content/repositories/snapshots</url>
12         </snapshotRepository>
13     </distributionManagement>
时间: 2024-08-09 04:11:13

maven 私服的setting.xml配置的相关文章

idea下修改maven的setting.xml配置阿里云镜像

1.打开idea中自带的maven插件或者自己安装的maven,将存放配置参数的conf文件夹找到,并编辑settings.xml 配置文件. 2.找到 mirror 标签,修改为以下信息: <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url>

Maven之setting.xml配置

<?xml version="1.0" encoding="UTF-8"?> <!--Licensed to the Apache Software Foundation (ASF) under oneor more contributor license agreements. See the NOTICE filedistributed with this work for additional informationregarding cop

Maven系列一pom.xml 配置详解

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <!--父项目的坐标.如果项

Maven项目的pom.xml配置文件格式初识

Maven项目 有pom.xml文件的项目就已经是一个maven项目了,但是还没有被maven托管,我们需要将该项目添加为maven项目 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0

Maven系列--setting.xml 配置详解

文件存放位置 全局配置: ${M2_HOME}/conf/settings.xml 用户配置: ${user.home}/.m2/settings.xml note:用户配置优先于全局配置.${user.home} 和和所有其他系统属性只能在3.0+版本上使用.请注意windows和Linux使用变量的区别. settings.xml详解 声明规范 <?xml version="1.0" encoding="UTF-8"?> <settings x

Maven中setting.xml 配置详解

文件存放位置 全局配置: ${M2_HOME}/conf/settings.xml 用户配置: ${user.home}/.m2/settings.xml note:用户配置优先于全局配置.${user.home} 和和所有其他系统属性只能在3.0+版本上使用.请注意windows和Linux使用变量的区别. settings.xml详解 声明规范 <?xml version="1.0" encoding="UTF-8"?> <settings x

maven+nexus setting.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/SETTING

maven setting.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/SETTING

maven下的pom.xml配置(SSM框架)

<properties> <!-- 基础配置 --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.locales>zh_CN</project.build.locales> <project.build.jdk>1.7</project.build.jdk> <!-- 插件配置 --&g