一、假设

1、假设项目使用Java

2、假设项目使用Maven

3、假设你需要Maven全局仓库与定制化资源配置

二、全局配置(settings.xml)

<localRepository>F:/java/.m</localRepository>
<mirrors>
    <mirror>
	<id>nexus-aliyun</id>
	<mirrorOf>central</mirrorOf>
	<name>Nexus aliyun</name>
	<url>http://maven.aliyun.com/nexus/content/groups/public</url>
    </mirror>
    <mirror>        
        <id> maven-net-cn</id>        
        <name> Maven China Mirror</name>        
        <url>http://maven.net.cn/content/groups/public/</url>        
        <mirrorOf>central</mirrorOf>        
    </mirror> 
    <mirror>        
        <id>center</id>        
        <name>Maven center</name>        
        <url>https://repo1.maven.org/maven2/</url>        
        <mirrorOf>central</mirrorOf>        
    </mirror>
</mirrors>

三、项目配置(pom.xml)

1、常用阿里(aliyun)

<repository>
    <id>public</id>
    <url>https://maven.aliyun.com/repository/public</url>
    <snapshots>
        <enabled>false</enabled>
    </snapshots>
</repository>

2、空间位置(GeoTools)

<repository>
    <id>osgeo</id>
    <name>OSGeo Release Repository</name>
    <url>https://repo.osgeo.org/repository/release/</url>
    <snapshots><enabled>false</enabled></snapshots>
    <releases><enabled>true</enabled></releases>
</repository>
<repository>
    <id>osgeo-snapshot</id>
    <name>OSGeo Snapshot Repository</name>
    <url>https://repo.osgeo.org/repository/snapshot/</url>
    <snapshots><enabled>true</enabled></snapshots>
    <releases><enabled>false</enabled></releases>
</repository>

3、空间位置(ArcGIS)

<repository>
    <id>esri</id>
    <url>https://esri.bintray.com/arcgis</url>
</repository>

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐