2017-12-27 16 views
0

私はmavenを初めて使用しています。しかし、私はGitlab CI Runnerを自動テストとビルド/デプロイメントに使用しようとしています。SpringBoot Mavenのビルドに失敗しました

私の同僚の私の現在のmaven設定を得ました。

今までジョブが実行されると、それはエラーメッセージの後に数秒後に失敗します。ここでは

Downloaded: https://repo.maven.apache.org/maven2/org/springframework/security/spring-security-bom/4.2.3.RELEASE/spring-security-bom-4.2.3.RELEASE.pom (5 KB at 101.0 KB/sec) 
[ERROR] [ERROR] Some problems were encountered while processing the POMs: 
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-processor:jar is missing. @ line 20, column 21 
@ 
[ERROR] The build could not read 1 project -> [Help 1] 
[ERROR] 
[ERROR] The project de.demo:Rest:2.0 (/builds/Dev/Demo/Restv2/pom.xml) has 1 error 
[ERROR]  'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-processor:jar is missing. @ line 20, column 21 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException 
ERROR: Job failed: exit code 1 

は私の春の依存関係です:

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

<dependencies> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-processor</artifactId> 
     <exclusions> 
      <exclusion> 
       <groupId>com.vaadin.external.google</groupId> 
       <artifactId>android.json</artifactId> 
      </exclusion> 
     </exclusions> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-web</artifactId> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-test</artifactId> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-data-jpa</artifactId> 
    </dependency> 
</dependencies> 

私は、任意の助けに感謝、私は「couldnエラーの解決策を見つける/

ありがとう!

+0

これは "spring-boot-starter-processor"の正しいアーティファクト名ですか?私がmvnリポジトリに見つけたのは、 "spring-boot-configuration-processor"(https://mvnrepository.com/search?q=spring-boot-starter-processor)です。これが正しい名前であればエラーが表示されます。この依存関係にはタグがありませんので、使用するアーティファクトのバージョンを判断できます。 –

答えて

1

私はここにそれをチェックアウト、あなたが

<!-- 
https://mvnrepository.com/artifact/org.springframework.boot/spring-boot 
-configuration-processor --> 
<dependency> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-configuration-processor</artifactId> 
</dependency> 

ないspring-boot-starter-processorを意味すると思う:https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor/1.5.9.RELEASE

+0

ありがとう、ありがとう、私はそれは私が同僚から得た依存関係だと言っていた、そして、それは存在しない依存関係だと思ったことがある.../ – PaddaelsM

1

をあなたが持っている根本的な問題から(spring-boot-starter-processor存在しない依存関係を使用しようとしているように見えますorg.springframework.boot)。あなたの親で実際に定義されているものへの依存関係名の修正 - spring-boot-starter-parentもあなたの "バージョン"の問題を修正します。

表示されているエラーは、それぞれのmaven依存関係に、直接定義されたバージョンまたは依存関係管理が必要であるため、別のもの(バージョンが定義されていない)です。 spring-boot-starter-parentは親として設定されているため、すべて有効なの依存関係を使用しています。

何らかの理由で、これは(非常に奇妙なだろう)正しい依存関係の名がある場合は、あなたが適切のように、バージョンを定義することで、エラーを修正します:

<dependency> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-starter-processor</artifactId> 
    <version>(insert version here)</version> 
</dependency> 

や依存関係の管理を経て:https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management

+0

ありがとう!私が上の私のコメントで言ったように、私は決してそれが存在しない依存のためになるとは思っていないだろう...:/とにかく、それは今働く! – PaddaelsM

関連する問題