maven將包打進私服
阿新 • • 發佈:2021-01-16
step 1:
在需要打包的專案的pom檔案中,新增倉庫的如下配置
<distributionManagement> <repository> <id>group</id> <name>aliyun maven</name> <url>http://xx.xx.xx.xx:8081/repository/hosted/</url> </repository> </distributionManagement>
注意:如果pom裡面配置瞭如下maven外掛會將打的包外邊多一層BOOT-INFO結構,導致class無法引入,有的話建議刪除
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
step 2:
執行命令 mvn deploy,或者idea中右側點選mvn deploy,並檢查私服倉庫中的中是否將包打進去了
step 3:
需要應用該專案的pom中引入maven的座標依賴