Maven file transfer failure
When using maven to get dependencies, files are required to download from respository. In some situation, file transfer may be failure.
The following exception will be encountered:
Description Resource Path Location Type Could not calculate build plan: Failure to transfer xxxxxx:pom:xx.xx.xx from http://repo1.maven.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 xxxxxxx:xxxx:pom:xx.xx.xx from/to central (http://repo1.maven.org/maven2):
Solution:
Remove all the failed download from your local respository:
Mac or Linux:
find ~/.m2 -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;
Windows:
cd %userprofile%\.m2\repository
for /r %i in (*.lastUpdated) do del %i
The following exception will be encountered:
Description Resource Path Location Type Could not calculate build plan: Failure to transfer xxxxxx:pom:xx.xx.xx from http://repo1.maven.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 xxxxxxx:xxxx:pom:xx.xx.xx from/to central (http://repo1.maven.org/maven2):
Solution:
Remove all the failed download from your local respository:
Mac or Linux:
find ~/.m2 -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;
Windows:
cd %userprofile%\.m2\repository
for /r %i in (*.lastUpdated) do del %i
留言
張貼留言