maven本地倉庫安裝jar

codecraft發表於2016-09-07

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

相關文章