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 = “ p r o j e c t . v e r s i o n " p o m . g r o u p I d = " project.version" pom.groupId = " project.version"pom.groupId="project.group”
}
}
}

你可能感兴趣的:(springboot的gradle项目上传jar包到maven仓库)