<mirrors>
</mirrors>
2.(忘了讲)当多个profiles被激活, download jar的repository顺序是定义时的profile反序。For example:
<profiles> <profile> <id>CMWRepository</id> <repositories> <repository> <url>http://jabdw3422:8181/nexus/content/groups/public/</url> </repository> </repositories> </profile> <profile> <id>jenkins</id> <repositories> <repository> <url>http://repo.jenkins-ci.org/public/</url> </repository> </repositories> </profile> </profiles>
当上面两个profile都被激活时,search 和 download jar包的repository顺序先http://repo.jenkins-ci.org/public/, 再http://jabdw3422:8181/nexus/content/groups/public/. 跟Profile定义的顺序是相反的。
3. 最有效的检查dependency jar从哪个repository search和download顺序是看Effective POM.xml的repositories。注意,不包括maven plugin jar下载, maven plugin jar从哪个repository search和download顺序看Effective POM.xml的pluginRepositories.
4.在不同的环境下支持多个version, 比如dev需要2.x.x, qa需要1.x.x.
<Import-Package> ... com.ssc.ssgm.fx.ffo.services.*;version="(0,10]", ... </Import-Package> <dependency> <groupId>com.ssc.ssgm.fx.ffo</groupId> <artifactId>ffo-ref-data-retrieve-bundle</artifactId> <version>(0,10]</version> <scope>provided</scope> </dependency>
5. mirror是镜像, 而不是“分库”, 只有当前一个mirror无法连接的时候,才会去找后一个,类似于备份和容灾.