罐子没有上传到位桶

时间:2019-09-16 20:22:49

标签: spring spring-boot gradle spring-boot-gradle-plugin

我正在使用多模块spring gradle项目。我无法将jar上传到我的存储桶存储库中。

我尝试通过运行根文件夹的build.gradle文件来运行该文件,但是jar无法上传到位存储库中。

我不确定我是对还是错。如果错了,建议我怎么做。

根文件夹build.gradle:

plugins {
    id 'org.springframework.boot' version '2.1.8.RELEASE'
    id 'io.spring.dependency-management' version '1.0.8.RELEASE'
    id 'java'
}

group = 'com.nn'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'

repositories {
    mavenCentral()
        maven { url "https://repo.spring.io/snapshot" }
        maven { url "https://repo.spring.io/milestone" }
}



allprojects {

    group = 'com.nn'
    //version = rootProject.version
    //sourceCompatibility = 1.8

    apply plugin: 'application'
    apply plugin: 'java'
    apply plugin: 'jacoco'
    apply plugin: 'maven'
    apply plugin: 'io.spring.dependency-management'
    apply plugin: 'org.springframework.boot'

    mainClassName = 'com.cc.CcAdminApplication'

    version = rootProject.version



    ext {
        set('springCloudVersion', 'Greenwich.RC2')
    }

    configurations {
        provided
        compile.extendsFrom provided
        compile.exclude module: 'log4j-slf4j-impl'
    }

    repositories {
        mavenCentral()
        maven { url "http://repo.spring.io/release" }
        maven { url "http://repo.spring.io/milestone" }
        maven { url "http://repo.spring.io/snapshot" }
        maven { url "http://repo.maven.apache.org/maven2" }
        maven { url 'https://repo.spring.io/libs-release' }

    }

    dependencies {

        compile('org.springframework.boot:spring-boot-starter-actuator')
        compile('org.springframework.boot:spring-boot-starter-log4j2')
        testCompile('org.springframework.boot:spring-boot-starter-test')
        compile('org.springframework.boot:spring-boot-starter-logging')
        compile('org.apache.commons:commons-lang3:3.6')


        provided group: 'org.projectlombok', name: 'lombok', version: '1.16.20'
        compile group: 'com.vaadin.external.google', name: 'android-json', version: '0.0.20131108.vaadin1'

    }


}


subprojects {

    configurations {
        deployerJar
    }

    dependencies {
        deployerJar "ar.com.synergian:wagon-git:0.2.3"

    }



    task packageSources (type: Jar) {
        from project.sourceSets.main.allSource
        classifier = 'sources'
    }

    artifacts {
        archives packageSources

    }

    uploadArchives {
    println "inside"
        configuration = configurations.archives
        repositories.mavenDeployer {

            configuration = configurations.deployerJar

            repository(url: "https://helloworld@bitbucket.org/helloworld/mydependency.git"){
             println "repository"
             authentication(userName: "nithin@gmail.com", password: "xxxxxxxx")
            }
            snapshotRepository(url: "https://helloworld@bitbucket.org/helloworld/mydependency.git"){
              println "snapshotRepository"
             authentication(userName: "nithin@gmail.com", password: "xxxxxxx")
            }

        }
    }
}

0 个答案:

没有答案