當(dāng)前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
SpringBoot maven打包源码发布到仓库配置
生活随笔
收集整理的這篇文章主要介紹了
SpringBoot maven打包源码发布到仓库配置
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
?一、項(xiàng)目pom.xml配置
添加發(fā)布倉庫
配置上傳源碼
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.1.9.RELEASE</version><relativePath/></parent><groupId>com.mk</groupId><artifactId>test-maven</artifactId><version>1.0.0-SNAPSHOT</version><name>test-maven</name><description>test maven</description><properties><java.version>1.8</java.version></properties><distributionManagement><repository><id>releases-deploy</id><name>release Repository</name><url>http://maven.mk.com/repositories/releases/</url></repository><snapshotRepository><id>snapshots-deploy</id><name>snapshots Repository</name><url>http://maven.mk.com/repositories/snapshots</url></snapshotRepository></distributionManagement><build><plugins><!-- 上傳源碼插件 --><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><version>2.2.1</version><configuration><attach>true</attach></configuration><executions><execution><id>attach-sources</id><phase>install</phase><goals><goal>jar</goal></goals></execution></executions></plugin></plugins></build> </project>?
二、maven setting.xml配置
配置倉庫密碼
也可以把倉庫配置在setting文件里面mirror里面
<?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"><servers><server><id>releases-deploy</id><username>test-releases</username><password>R12345</password></server><server><id>snapshots-deploy</id><username>test-snapshots</username><password>S12345</password></server></servers></settings>?
總結(jié)
以上是生活随笔為你收集整理的SpringBoot maven打包源码发布到仓库配置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 华为要革微软的命华为 微软
- 下一篇: gradle idea java ssm