Maven instal could not resolve dependencies for project cannot find a jar under the local warehouse

Source: Internet
Author: User

I was not found in the local jar file, maven instal. But the jar is correct.


Typically, this is a problem with the MAVEN local repository. The solution is:

Locate the folder where the jar is located in the local repository, delete the folder , and then rerun the MAVEN command.



If it still doesn't work, see if it's for the following reasons:


After the investigation, found that the version of the Jar problem,

The version I set is 1.0.1-snapshot, and this jar is also automatically installed and automatically named by Maven.


Also, my remote (private) warehouse configuration is

<repository>
	<id>nexus</id>
	<name>nexus</name>
	<url>
		http ://172.26.1.15:8081/nexus/content/groups/public/
	</url>
	<releases>
		<enabled>true </enabled>
	</releases>
	<snapshots>
		<enabled>false</enabled>
	</snapshots>
</repository>

Notice the <SNAPSHOTS>, and change the value inside to true to find the local jar. I guess Maven saw that jar version number contained the snapshot keyword, blocked it (or MAVEN has a list that marks the jar as a snapshot version, so if you set this option to False, you can't find the jar).

This option is a bit of a pit, obviously the remote warehouse settings, did not expect to affect the local jar lookup.



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.