maven本地仓库安装jar

deploy

mvn deploy:deploy-file -DgroupId=com.xixiact -DartifactId=demo -Dversion=1.0.0 -Durl=file:./local-maven-repo/ -DrepositoryId=local-maven-repo -DupdateReleaseInfo=true -Dfile=./lib/demo-1.0.0.jar

配置本地repository

<repositories>
        <repository>
            <id>local-maven-repo</id>
            <name>local-maven-repo</name>
            <url>file://${project.basedir}/local-maven-repo</url>
        </repository>
    </repositories>

正常引入依赖

<dependency>
            <groupId>com.xixicat</groupId>
            <artifactId>demo</artifactId>
            <version>1.0.0</version>
        </dependency>

docs

    原文作者:codecraft
    原文地址: https://segmentfault.com/a/1190000006844359
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞