Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven build fail - Project "image-microservice" pom.xml lack of version field #834

Closed
zhangyuejia opened this issue Dec 18, 2018 · 4 comments · Fixed by #940
Closed

Maven build fail - Project "image-microservice" pom.xml lack of version field #834

zhangyuejia opened this issue Dec 18, 2018 · 4 comments · Fixed by #940

Comments

@zhangyuejia
Copy link

Hi. When I run "mvn eclipse:eclipse" in the base path to convert to eclipse project.
An error occur and it's error info as below.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.10:eclipse (default-cli) on project image-microservice: Execution default-cli of goal org.apache.maven.plugins:maven-eclipse-plugin:2.10:eclipse failed: For artifact {org.springframework.boot:spring-boot-dependencies:null:jar}: The version cannot be empty. -> [Help 1]

Does the 'version' field is abscent?
The target dependency in java-design-patterns\api-gateway\image-microservice\pom.xml is:

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

@neerajmahajan
Copy link

Hi,

This error is coming, because 'spring-boot-dependencies' dependency is redeclared inside dependencyManagement section of image-microservice project without specifying it's version. This dependency has already a version in the top parent pom.xml (https://github.com/iluwatar/java-design-patterns/blob/master/pom.xml).

To correct this issue remove dependencyManagement section from java-design-patterns\api-gateway\image-microservice\pom.xml and declare this dependency in dependencies section of this pom.xml.

Kind Regards,
Neeraj Mahajan

@snehalatapandit
Copy link
Contributor

Hi,
Maven build is still failing.
I have found below modules in which the spring-boot-dependencies are redeclared in the 'dependencyManagement' section due to which the mavel build fails :

  1. 'aggregator-microservices\aggregator-service\pom.xml'
  2. 'aggregator-microservices\information-microservice\pom.xml'
  3. 'aggregator-microservices\inventory-microservice\pom.xml'
  4. 'api-gateway\image-microservice\pom.xml'
  5. 'api-gateway\api-gateway-service\pom.xml'
  6. 'api-gateway\price-microservice\pom.xml'
    The build succeeds if the redeclaration is removed. Should these dependencies be removed.

@perwramdemark
Copy link
Contributor

I can fix this one!

@iluwatar
Copy link
Owner

iluwatar commented Oct 3, 2019

Ok @perwramdemark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants