-1

When starting the application following resolving issue is raised.

Cannot resolve org.springframework.boot:spring-boot-devtools:pom:2.6.5 failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt.
This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer artifact org.springframework.boot:spring-boot-devtools:pom:2.6.5 from/to central (https://repo.maven.apache.org/maven2):
    transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-devtools/2.6.5/spring-boot-devtools-2.6.5.pom

The URL is reachable.

Valerij Dobler
  • 804
  • 7
  • 21
Sahan randika
  • 143
  • 1
  • 5

2 Answers2

1

It seems that your local version (inside ~/.m2/repository) of this dependency is corrupted. Try deleting it there and restart the download process from maven central again.

Valerij Dobler
  • 804
  • 7
  • 21
0

When you build the application after adding a dependency when maven try to download the artifact and its dependencies the download may fail for some reason (may be a network issue) then maven put a file with the timestamp of the first try. if you try maven build after that first try maven reorganize the first try failed and check the timestamp to check weather sufficient time has elapsed if not it will throw This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced

If you want to force maven to update the dependencies those are failed before update interval you can use -U switch.

So run you maven goal with -U switch like mvn <goal> -U

Karthikeyan
  • 7,700
  • 10
  • 46
  • 66