2016-09-21 18 views
1

我開始使用Spring Cloud Stream/App Starters使用spring引導進行遊戲。當我跟着上入門指導,我收到以下錯誤與MVN編譯:SpringCloudStream - 在彈簧核心版本上失敗

An invalid artifact was detected. 

This artifact might be in your project's POM, or it might have been included transitively during the resolution process. Here is the information we do have for this artifact: 

    o GroupID:  org.springframework 
    o ArtifactID: spring-core 
    o Version:  <<<MISSING>>> 
    o Type:  jar 

的pom.xml

<?xml version="1.0" encoding="UTF-8"?> 
<project xmlns="http://maven.apache.org/POM/4.0.0" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 

    <groupId>test.group</groupId> 
    <artifactId>spring-stream-sample-app</artifactId> 
    <version>01.00.00.01-SNAPSHOT</version> 

    <packaging>jar</packaging> 

    <parent> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-parent</artifactId> 
     <version>1.4.0.RELEASE</version> 
    </parent> 

    <properties> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
     <spring-cloud-stream.version>1.0.3.RELEASE</spring-cloud-stream.version> 
     <java.version>1.8</java.version> 
     <start-class>stream.Application</start-class> 
     <spring-boot.version>1.4.0.RELEASE</spring-boot.version> 
    </properties> 
    <dependencyManagement> 
     <dependencies> 
      <dependency> 
       <groupId>org.springframework.cloud</groupId> 
       <artifactId>spring-cloud-stream-dependencies</artifactId> 
       <version>1.0.3.RELEASE</version> 
       <type>pom</type> 
       <scope>import</scope> 
      </dependency> 
     </dependencies> 
    </dependencyManagement> 
    <dependencies> 
     <dependency> 
      <groupId>org.springframework.cloud</groupId> 
      <artifactId>spring-cloud-stream</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.cloud</groupId> 
      <artifactId>spring-cloud-starter-stream-rabbit</artifactId> 
     </dependency> 
    </dependencies> 
    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.springframework.boot</groupId> 
       <artifactId>spring-boot-maven-plugin</artifactId> 
       <version>${spring-boot.version}</version> 
       <configuration> 
        <classifier>exec</classifier> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 


</project> 

屬性文件

logging.level.org.springframework.integration=DEBUG 
logging.level.org.springframework.integration.handler.advice=TRACE 
logging.file=/logs/SpringBoot/stream-app.log 
spring.cloud.stream.bindings.input=start 
spring.cloud.stream.bindings.output=testchannel 
spring.rabbitmq.addresses=localhost:5672 
spring.rabbitmq.username=guest 
spring.rabbitmq.password=guest 

您的幫助表示讚賞。

感謝 KARTHIK

回答

2

這是您通過命令行生成或在Eclipse中遇到的問題?你使用的是Maven版本。

嘗試使用由start.spring.io項目提供的Maven包裝(mvnw)。

乾杯, 馬呂斯

+0

感謝您的幫助,我清理了舊版本的Maven和它的工作。 –