首页 > 代码库 > maven_修改setting ,改为自己私服或者OSC开源中国 [为解决sqlite-jdbc 在中央仓库找不到]

maven_修改setting ,改为自己私服或者OSC开源中国 [为解决sqlite-jdbc 在中央仓库找不到]

因为项目要使用到sqlite ,虽然有现成的jar,但是考虑的项目的易用统一管理,决定还是用maven

结果纠结了半天 sqlite-jdbc 在maven默认的仓库根本找不着,于是乎修改 setting 采用开源中国基于neuxs

的仓库

<dependency>
            <groupId>com.github.axet.sqlite4java</groupId>
            <artifactId>sqlite4java</artifactId>
            <version>0.282-3</version>
        </dependency>
        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
            <version>3.7.2</version>
        </dependency>

 

修改 : C:\Users\Administrator\.m2\settings.xml

 

 <mirrors>
        <!-- mirror | Specifies a repository mirror site to use instead of a given
            repository. The repository that | this mirror serves has an ID that matches
            the mirrorOf element of this mirror. IDs are used | for inheritance and direct
            lookup purposes, and must be unique across the set of mirrors. | -->
        <mirror>
            <id>nexus-osc</id>
            <mirrorOf>*</mirrorOf>
            <name>Nexus osc</name>
            <url>http://maven.oschina.net/content/groups/public/</url>
        </mirror>
    </mirrors>
  

重启工具