Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用Gradle导入spring集成kafka时出错_Java_Spring_Gradle_Spring Boot_Spring Integration - Fatal编程技术网

Java 使用Gradle导入spring集成kafka时出错

Java 使用Gradle导入spring集成kafka时出错,java,spring,gradle,spring-boot,spring-integration,Java,Spring,Gradle,Spring Boot,Spring Integration,我的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.

我的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>
警告:根项目“CalcMicroService”:将不配置Web方面/工件
详细信息:org.gradle.api.artifacts.ResolveException:无法解析配置“:runtime”的所有依赖项。
原因:org.gradle.internal.resolve.ModuleVersionResolveException:无法解析org.springframework.integration:spring集成kafka:1.0.0.BUILD-SNAPSHOT。
要求:
:CalcMicroService:未指定
原因:org.gradle.internal.resource.ResourceException:无法从加载Maven元数据https://repo.springsource.org/libs-milestone/org/springframework/integration/spring-integration-kafka/1.0.0.BUILD-SNAPSHOT/maven-metadata.xml.
原因:org.gradle.internal.resource.transport.http.HttpRequestException:无法获取'https://repo.springsource.org/libs-milestone/org/springframework/integration/spring-integration-kafka/1.0.0.BUILD-SNAPSHOT/maven-metadata.xml'.
原因:javax.net.ssl.SSLPeerUnverifiedException:对等未验证
苦苦挣扎了几个小时 有什么想法吗


谢谢。

因为您正在提取快照,所以需要使用快照repo:而不是发布repo(实际上应该是)


但是,我建议您使用当前的里程碑(1.0.0.M2)并使用里程碑回购:

谢谢您的工作。我现在还有其他问题。但愿我能在某个地方有这样的工作实例。有kafka和使用适配器的模块。我用SpringIntegration尝试了这一点,它使用与SpringXD相同的配置。但制作人仍然没有工作。我创建了一个新问题:请看一看。谢谢