springboot的gradle項目上傳jar包到maven倉庫

定義一個默認變量
def nexusUrl =“http://localhost:8080/repository/maven-releases/
if (version.endsWith("-SNAPSHOT")){
nexusUrl=“http://localhost:8081/repository/maven-snapshots
}
uploadArchives {
repositories {
mavenDeployer {
repository(url:nexusUrl) {
authentication(userName: “admin”, password: “admin@123”)
}
pom.version = “project.version"pom.groupId="project.version" pom.groupId = "project.group”
}
}
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章