1

I am beginner in Maven development, Need our help to fix this issue. I can see jars are not available at .m2\repository\org\springframework\spring-context\3.1.0.RELEASE

only below jars are avaialble

spring-context-3.1.0.RELEASE.jar.lastUpdated  
spring-context-3.1.0.RELEASE.pom.lastUpdated

enter image description here

Also I am getting below error in pom.xml

Errors occurred during the build. Errors running builder 'Maven Project Builder' on project 'cim'. Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6

enter image description here

Sreekumar
  • 37
  • 1
  • 7
  • go to the project menu, then down to maven and update the project, also Alt-F5 – Essex Boy Dec 05 '18 at 09:08
  • Possible duplicate of [Maven: Failed to read artifact descriptor](https://stackoverflow.com/questions/6642146/maven-failed-to-read-artifact-descriptor) – Dhaval Simaria Dec 05 '18 at 09:28
  • Can you able to build the application in cmd prompt/terminal? – Karthikeyan Vaithilingam Dec 05 '18 at 09:30
  • Have tried to update the project and didn't help .. – Sreekumar Dec 05 '18 at 09:55
  • coreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2: ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from/to central (https://repo.maven.apache.org/maven2): connect timed out – Sreekumar Dec 05 '18 at 09:55

3 Answers3

1

It seems you are in need of the SpringBoot starters. In your project parent module you can use

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

There are many specialized bundles like:

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

And many more like spring-boot-starter-web, spring-boot-starter-batch, spring-boot-starter-data-rest... See this blog article for more.

Rafael
  • 493
  • 3
  • 10
0

remove all missing jars from library and add this dependency in pom.xml into dependencies tag

 <dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-context</artifactId>
     <version>5.1.3.RELEASE</version>
 </dependency>

after this right click on project click on maven and click on update project or just press ( alt+F5 )

  • Upgrading spring may break the application. the issue downloading maven dependency not spring itself. – Karthikeyan Vaithilingam Dec 05 '18 at 09:30
  • Any other thoughts ? @KarthikeyanVaithilingam – Sreekumar Dec 05 '18 at 09:49
  • @Sreekumar with out seeing the maven error cannot point the issue. try building in cmd/terminal and post the error. – Karthikeyan Vaithilingam Dec 05 '18 at 09:50
  • coreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2: ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from/to central (https://repo.maven.apache.org/maven2): connect timed out – Sreekumar Dec 05 '18 at 09:54
0

Add springboot starters to the POM.xml

Sreekumar
  • 37
  • 1
  • 7