首页 技术后端spring boot正文

maven中引入多个仓库

anan spring boot 2020-03-23 615 0 | 文章出自:https://www.cnblogs.com/goatherd/p/11095764.html

maven中的中央仓库是阿里云的,现在还需要引入有赞云的仓库;

maven中的配置信息:

<?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>D:/development/MavenRepository</localRepository>
    <mirrors>
        <mirror>
            <id>nexus-aliyun</id>
            <mirrorOf>*</mirrorOf>
            <name>Nexus aliyun</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
        </mirror>
    </mirrors>
</settings>

在pom中引入有赞云的maven库:

<dependencies>
      
        <dependency>
            <groupId>com.youzan.cloud</groupId>
            <artifactId>open-sdk-core</artifactId>
            <version>1.0.5-RELEASE</version>
        </dependency>

        <dependency>
            <groupId>com.youzan.cloud</groupId>
            <artifactId>open-sdk-gen</artifactId>
            <version>1.0.5.201906241951-RELEASE</version>
        </dependency>
        
    </dependencies>
    
    <repositories>
        <repository>
            <id>baymax-releases</id>
            <name>Nexus Release Repository</name>
            <url>http://maven.youzanyun.com/repository/maven-releases/</url>
        </repository>
    </repositories>

同时更新项目的maven库

版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。

评论