Fix Eclipse Failure To Transfer Antlr:antlr:jar:2.7.7 Cached In The Local Repository Error

I have some spring projects in my workspace. And I use GitHub to manage all the source code of different spring projects. When I import those spring projects to a newly set up machine in eclipse, I find an error message like Failure to transfer antlr:antlr:jar:2.7.7 from https://repo.maven.apache.org/maven2 was cached in the local repository. After some time of investigation, I finally find the method to fix this error. This article will tell you how to resolve it.

Failure to transfer antlr:antlr:jar:2.7.7 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact antlr:antlr:jar:2.7.7 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org

org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer antlr:antlr:jar:2.7.7 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact antlr:antlr:jar:2.7.7 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:240)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:208)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:563)

You can follow the below steps to fix this problem.

  1. Open a terminal and go to the spring project folder.
  2. Then execute the below maven command to force update the local maven repository.
    $ mvn eclipse:eclipse
  3. You can see that the above command will download several jars from the maven repository again and build the project until success. Open eclipse and import the spring project again then the error is fixed.
0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Bonnie
Bonnie

it worked for me!

1
0
Would love your thoughts, please comment.x
()
x