gpt4 book ai didi

java - 使用Gradle导入spring-integration-kafka时出错

转载 作者:行者123 更新时间:2023-12-03 06:19:51 27 4
gpt4 key购买 nike

我的gradle.build脚本如下所示:

buildscript {
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/simple/ext-release-local' }

}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.9.RELEASE")

}
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'war'
apply plugin: 'maven'
apply plugin: 'application'



jar {
baseName = 'calc-service'
version = '0.1.0'
}

ext {
springBootVersion = '1.1.9.RELEASE'
springIntegrationVersion = '4.0.3.RELEASE'
springIntegrationKafkaVersion = '1.0.0.BUILD-SNAPSHOT'
}

repositories {
mavenCentral()
maven {
url 'https://repository.apache.org/content/groups/public'
}
maven { url 'https://repo.springsource.org/libs-milestone' }


}

dependencies {
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-actuator'
compile 'org.projectreactor.spring:reactor-spring-context'
compile 'javax.inject:javax.inject:1'


//SI
// compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion"
compile "org.springframework.integration:spring-integration-stream:$springIntegrationVersion"


compile 'org.springframework.integration:spring-integration-mongodb:4.0.4.RELEASE'


//kafka
compile("org.springframework.integration:spring-integration-kafka:$springIntegrationKafkaVersion") {
exclude module: 'log4j'
exclude module: 'jms'
exclude module: 'jmxtools'
exclude module: 'jmxri'
}

compile("log4j:log4j:1.2.15") {
exclude module: 'mail'
exclude module: 'jms'
exclude module: 'jmx'
exclude module: 'jmxtools'
exclude module: 'jmxri'
}
compile "commons-logging:commons-logging:1.1.1"

//Required dependency for JSP
providedRuntime 'org.apache.tomcat.embed:tomcat-embed-jasper'

testCompile("org.springframework.boot:spring-boot-starter-test:$springBootVersion")
testCompile("junit:junit")
}






task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}

我收到此错误:
Warning:<i><b>root project 'CalcMicroService': Web Facets/Artifacts will not be configured</b>
Details: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':runtime'.
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve org.springframework.integration:spring-integration-kafka:1.0.0.BUILD-SNAPSHOT.
Required by:
:CalcMicroService:unspecified
Caused by: org.gradle.internal.resource.ResourceException: Unable to load Maven meta-data from https://repo.springsource.org/libs-milestone/org/springframework/integration/spring-integration-kafka/1.0.0.BUILD-SNAPSHOT/maven-metadata.xml.
Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'https://repo.springsource.org/libs-milestone/org/springframework/integration/spring-integration-kafka/1.0.0.BUILD-SNAPSHOT/maven-metadata.xml'.
Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated</i>

奋斗了几个小时
任何的想法?

谢谢。

最佳答案

由于要拉入快照,因此需要使用快照存储库:http://repo.spring.io/snapshot/而不是发行存储库(实际上应该是http://repo.spring.io/release/)。

但是,我建议您使用当前的里程碑(1.0.0.M2)并使用里程碑仓库:http://repo.spring.io/milestone/

关于java - 使用Gradle导入spring-integration-kafka时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27129911/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com