как сгенерировать банку командой gradle - PullRequest
0 голосов
/ 10 июня 2019

Добрый день,

У меня есть проект gradle, который разрабатывает старший, который уже ушел.

В настоящее время в проекте есть некоторые изменения, и теперь я хотел бы предоставитьпоследний jar для клиента, однако, я столкнулся с некоторой проблемой, когда я хочу создать этот jar.

Вот код build.gradle:

buildscript {
    ext {
        springBootVersion = '1.3.8.RELEASE'
        poiVersion = '3.15'
        springVersion = '3.0.4.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
    configurations {
        compile.exclude module: "spring-boot-starter-tomcat"
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'

jar {
    baseName = 'c.c.i.converter.statement'
    version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.6
targetCompatibility = 1.6

repositories {
    mavenCentral()
    flatDir {
        dirs 'libs'
    }
}


dependencies {
    compile('org.springframework.boot:spring-boot-starter-web')
    compile("org.springframework.boot:spring-boot-starter-undertow")
    compile("org.springframework.boot:spring-boot-starter-jdbc")
    compile("org.apache.poi:poi:$poiVersion")
    compile("org.apache.poi:poi-ooxml:$poiVersion")
    compile("org.springframework.batch:spring-batch-infrastructure:$springVersion")
    compile("commons-fileupload:commons-fileupload:1.2")
    compile("org.apache.commons:commons-io:1.3.2")

    compile name: 'db2jcc'
    compile name: 'db2jcc_license_cu'

    testCompile('org.springframework.boot:spring-boot-starter-test')
}

processResources {
    exclude('application-db.properties')
}

Я попробовал следующую команду, но все ещеfail:

./gradlew
./gradlew build

И вот ошибка, которую я получаю:

FAILURE: сборка не удалась с исключением.

* What went wrong:
A problem occurred configuring root project 'c.c.i.converter.statement'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.3.8.RELEASE.
     Required by:
         :com.cv.ibs.converter.epayment:unspecified
      > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.3.8.RELEASE.
         > Could not get resource 'https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.3.8.RELEASE/spring-boot-gradle-plugin-1.3.8.RELEASE.pom'.
            > Could not HEAD 'https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.3.8.RELEASE/spring-boot-gradle-plugin-1.3.8.RELEASE.pom'.
               > Received fatal alert: protocol_version

Просьба сообщить.

...