<?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">
<localRepository>${user.home}/.m2/repository</localRepository>
<interactiveMode>true</interactiveMode><!--是否使用交互模式,默认true(交互模式)-->
<offline>false</offline><!--是否 开启离线模式:默认false-->
<pluginGroups><!--插件组:默认 包含org.apache.maven.plugins 和 org.codehaus.mojo-->
<pluginGroup>org.apache.maven.plugins</pluginGroup>
<pluginGroup>org.codehaus.mojo</pluginGroup>
</pluginGroups>
<servers>
<server>
<id>repo.aaa.bbb</id><!--server id 对应 repository/mirror-->
<username>loginname</username>
<password>passw0rd!</password>
</server>
</servers>
<mirrors>
<mirror>
<id>repo.aaa.bbb.longji</id><!--和server id 对应-->
<mirrorOf>central</mirrorOf><!--写repo的id值,这里的意思是把id=central(中央仓库)替换了
1、*:代表所有远程仓库
2、repo1,repo2:代表具体的制定的多个具体仓库
3、*,!repo1:代表除了repo1外的所有原程仓库-->
<url>http://192.168.0.23:8081/repository/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>repo.aaaa.bbb.snapshots</id>
<activation><!--动态激活-->
<property>
<name>aaa-repodev</name>
</property>
</activation>
<properties><!--一旦profile生效后,以下参数就可以在POM读取使用-->
<deploy.repository.id>repo.aaa.bbb.snapshots</deploy.repository.id>
<deploy.env>dev</deploy.env>
<deploy.repository.url>http://192.168.0.23:8081/repository/aaa-repodev</deploy.repository.url>
</properties>
<repositories>
<repository>
<id>repo.aaa.bbb.snapshots</id>
<url>http://192.168.0.23:8081/repository/aaa-repodev</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
<profile>
<id>repo.aaa.bbb.public</id>
<activation><!--动态激活-->
<property>
<name>aaa-repopublic</name>
</property>
</activation>
<repositories>
<repository>
<id>repo.aaa.bbb.public</id>
<url>http://192.168.0.23:8081/repository/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.aaa.bbb.public.plugin</id>
<url>http://192.168.0.23:8081/repository/public</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>repo.aaa.bbb.public</activeProfile><!--默认静态激活哪个profile-->
</activeProfiles>
</settings>
maven中setting文件的说明
最新推荐文章于 2024-10-02 22:49:31 发布