Search code examples
spring-cloudspring-cloud-contract

Unable to build spring-cloud-contract


Attempting to build the latest https://github.com/spring-cloud/spring-cloud-contract repository.

forked repo from github

cloned fork to my local machine

mvn clean install -U

The error:

[ERROR] The build could not read 2 projects -> [Help 1] [ERROR] [ERROR] The project org.springframework.cloud:spring-cloud-contract-verifier:2.0.0.BUILD-SNAPSHOT (/Users/damienburke/workspace/oss/spring-cloud-contract/spring-cloud-contract-verifier/pom.xml) has 1 error [ERROR] 'dependencies.dependency.version' for javax.inject:javax.inject:jar is missing. @ org.springframework.cloud:spring-cloud-contract-verifier:[unknown-version], /Users/damienburke/workspace/oss/spring-cloud-contract/spring-cloud-contract-verifier/pom.xml, line 43, column 15 [ERROR] [ERROR] The project org.springframework.cloud:spring-cloud-contract-maven-plugin:2.0.0.BUILD-SNAPSHOT (/Users/damienburke/workspace/oss/spring-cloud-contract/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/pom.xml) has 1 error [ERROR] 'dependencies.dependency.version' for javax.inject:javax.inject:jar is missing. @ line 337, column 15 [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

I'm able to fix by adding this entry to spring-cloud-contract-parent pom.xml

<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>${javax.inject.version}</version>
</dependency>

Seems like a bug? I can file an issue (https://github.com/spring-cloud/spring-cloud-contract/issues/new) and submit a PR if so...


Solution

  • We've fixed this issue recently. Pull the Changes and try again