码迷,mamicode.com
首页 > Web开发 > 详细

Gradle 打包上传至私有仓库配置

时间:2019-04-25 10:35:13      阅读:679      评论:0      收藏:0      [点我收藏+]

标签:pat   ext   tor   password   cts   dep   groups   java   source   

 

allprojects{
    apply plugin: ‘java‘
    apply plugin: ‘idea‘
    apply plugin: ‘maven‘
    group ‘com.xxxxx.base‘
    sourceCompatibility = 1.8
    ext{
        mavenUrl = "http://maven.xxxxx.com/nexus/content/groups/public/"

        mavenThirdparty = "http://maven.xxxx.com/nexus/content/repositories/thirdparty"
        mavenSnapshot = "http://maven.xxxx.com/nexus/content/repositories/Snapshot"
        mavenThirdpartyUserName = "admin"
        mavenThirdpartyPwd = "xxxxx"
        mavenSnapshotUserName = "uploader"
        mavenSnapshotPwd = "uploader"
        
        packLogbackVersion = "0.0.1"
    }
    repositories {
        maven {
            url "${mavenUrl}"
        }
    }
}

//上传到nexus
uploadArchives {
    repositories {
        mavenDeployer {
            repository(url: "${mavenThirdparty}") {
                authentication(userName: "${mavenThirdpartyUserName}", password: "${mavenThirdpartyPwd}")
            }
            snapshotRepository(url: "${mavenSnapshot}") {
                authentication(userName: "${mavenSnapshotUserName}", password: "${mavenSnapshotPwd}")
            }
            println "$version"
            pom.version = "$version"
            pom.artifactId = "$archivesBaseName"
            pom.groupId = "$project.group"
        }
    }
}

技术图片

 

Gradle 打包上传至私有仓库配置

标签:pat   ext   tor   password   cts   dep   groups   java   source   

原文地址:https://www.cnblogs.com/fqybzhangji/p/10766680.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!