Maven Combat (11) Eclipse Download Dependency jar package problem

Source: Internet
Author: User

Problem description

Dependencies are configured in Pom.xml, but the dependency is not successful, or the dependency is not found in the local warehouse

The approximate error is as follows:
Artifactdescriptorexception:failed to read artifact descriptor for Commons-beanutils:commons-beanutils-core:jar : 1.8.0:artifactresolutionexception:could not transfer artifact commons-beanutils:commons-beanutils-core:pom:1.8.0

Problem-solving ideas 1. Check to see if the local repository has this jar package, that is, whether the download was successful

Generally not downloaded successfully, sometimes it may be a network problem, then deleted the retry

Update Maven project, right-click on project: Maven->update Project

and tick the force option, if you tick force, then do not delete the remaining files that have not been downloaded successfully, you can choose to tick force when a large number of JAR packages are not downloaded successfully.

2. View Warehouse Configuration

If you find that the download is not successful, check immediately if there is a problem with your eclipse-connected warehouse

Window->show View->maven repositories

If the warehouse is configured correctly, skim this step if the warehouse address is not configured here

So look at settings.xml.

%m2_home%\settings.xml

Whether to configure mirroring

Note that this corresponds to the public warehouse

Or if you have a configuration warehouse

Of course, some projects in Pom.xml also specify the warehouse address, then take pom.xml as a priority

3. Go to the warehouse to see if there is a corresponding jar

Search the repository, if the corresponding jar is found, basically a network problem, or a previous warehouse configuration problem

Configure the correct retry, if not, then there is no corresponding jar in the existing warehouse, there are 2 ways to solve

1) Configure more warehouses

Look at the configuration of the public warehouse

The warehouse on the left indicates that the repository is in use, and if it has central, it can be downloaded to the usual jar.

If not, consider adding a new warehouse, and sometimes we may drag central to the right, causing the download to be

2) upload jar to warehouse yourself

Please refer to my previous article: Maven Combat (10) Leverage Nexus to build enterprise Maven repositories

4. Update Maven Index

The above method has not been tried, you can re-update the index

Such as:

Right-click the warehouse and select Update Index

Finally forced to update the MAVEN project, basic on it, if there is a problem, please contact me

Maven Combat (11) Eclipse Download Dependency jar package problem

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.