Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to fix maven deploy hangs while downloading maven metadata?


Asked by Forest Pugh on Dec 07, 2021 Maven



First you have to find the ID of the repository for this URL. That is if you are stuck on downloading from artifactoryonline.org, search for this repository in your POMs: Go to the found POM and fetch the repository ID. Then edit your ~/.m2/settings.xml to something like this:
In respect to this,
Whenever you run build job, maven first try to find dependency from local repository. If it is not there, then, by default, maven will trigger the download from this central repository location. To override this default location, you can can make changes to your settings.xml file to use one or more mirrors.
Thereof, Selecting a Maven metadata file ( maven-metadata.xml) or a POM file ( pom.xml) from the Tree browsing mode in the Artifact Repository Browser, provides you with details on the selected item. To configure Maven to resolve artifacts through Artifactory you need to modify the settings.xml.
In addition,
If you have an indexed repository, but still get a Maven repository error, check the following options: Check the user settings file In the Settings/Preferences dialog Ctrl+Alt+S, go to Build, Execution, Deployment | Build Tools | Maven. You can click the icon in the Maven tool window to open the Maven settings.
Also,
They come from projects with repositories that have been synced into central without extra checks (particularly historical ones that were in Maven 1 format). We know about the problems but can't do anything unless you provide a POM for it or you ask the project in question to add the POM when they add the artifacts.