大赵传奇

GIS解决方案,webgis , 桌面、数据、服务--QQ276605216

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

重来:

1、我用的是本地仓库,图在最下面。

2、在pom.xml里加上GeoTools官方的仓库

复制代码
    <repositories>
        <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>
    </repositories>
复制代码

3、配置maven的 conf 中的 Settings.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/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<localRepository>C:\TOOLS\maven-repositoryy</localRepository>

  <pluginGroups>
  </pluginGroups>

  <proxies>
  </proxies>

  <servers>
  </servers>


  <mirrors>
        <mirror> 
          <id>alimaven</id> 
          <name>aliyun maven</name> 
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url> 
          <mirrorOf>*,!osgeo,!maven2-repository.dev.java.net,!boundless</mirrorOf> 
        </mirror>

<mirror>
    <id>osgeo</id>
    <mirrorOf>osgeo</mirrorOf>
    <name>OSGeo Release Repository</name>
    <url>https://repo.osgeo.org/repository/release/</url>
</mirror>

  </mirrors>


  <profiles>
  </profiles>

</settings>
复制代码

4、再刷新Maven,不行。

5、把其他电脑已经配置好的仓库中的 Geotools复制覆盖本地:再刷新,这次可以。但不知编译发布有无问题。

 

 

 

 

参照了这里:

maven 国内加速,修改镜像源 - huiyi0521 - 博客园

修改了本地maven:

打开了FQ 

复制代码
<?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>C:\TOOLS\maven-repositoryy</localRepository>


  <pluginGroups>
  </pluginGroups>


  <proxies>
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
       <!--<username></username>
      <password></password>-->
      <host>127.0.0.1</host>
      <port>10809</port>
      <!--<nonProxyHosts>local.net|some.host.com</nonProxyHosts>-->
    </proxy>
  </proxies>


  <servers>
  </servers>


  <mirrors>
<!--     
     <mirror>
        <id>nexus-aliyun</id>
        <mirrorOf>*,!osgeo,!GeoSolutions,!osgeo-snapshot,!alfresco</mirrorOf>
        <name>Nexus aliyun</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    </mirror>
    

 阿里云仓库,个人配置     
    <mirror>
        <id>aliyun-maven</id>
        <mirrorOf>central</mirrorOf>
        <url>https://maven.aliyun.com/repository/public</url>
        <blocked>false</blocked>
    </mirror> -->
      
        <mirror>
            <id>mvnrepository</id>
            <mirrorOf>mvnrepository</mirrorOf>
            <url>http://mvnrepository.com/</url>
        </mirror>

        <!--自定义添加-->
        <mirror>
            <id>repo2</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo2.maven.org/maven2/</url>
        </mirror>

        <!--默认的中央仓库-->
        <mirror>
            <id>mirrorId</id>
            <mirrorOf>repositoryId</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://my.repository.com/repo/path</url>
        </mirror>
    

        <!--    maven仓库官方-->
        <mirror>
            <id>nexus</id>
            <name>internal nexus repository</name>
            <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->
            <url>http://repo.maven.apache.org/maven2</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
  </mirrors>



<profiles> <profile> <id>jdk-1.8</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties> </profile> </profiles> </settings>
复制代码

 

posted on   赵长青  阅读(69)  评论(0)    收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示