Maven combat-missing jar package

Source: Internet
Author: User

the new Maven project, in Build always pack a failure, tips less Jar package, as follows:


[ERROR] Failed Toexecute goal on Project Jyypt_tool:could not resolve dependencies for Projectcom.tgb:jyypt_tool:jar:0.0.1-snaps Hot:the following artifacts could not Beresolved:jboss.web:jbossweb:jar:2.1.7.ga, Xalan:xalan:jar:2.7.1,com.oracle:o Jdbc14:jar:10.2.0.4.0:failure to Findjboss.web:jbossweb:jar:2.1.7.ga Inhttp://repo.maven.apache.org/maven2was Cached in the local repository, resolution won't is reattempted untilthe update interval of Central have elapsed or UPDA TES is forced [help 1]


The main reason is not to find the corresponding Jar package, go to the local warehouse to see the corresponding Jar , reconfigure Maven , still have problems, finally find out the problem, such as:


generally, when we choose the goodglobalsettingsthe path, the followingUser Settingswill be automatically located in the user directory, so there is no way to control the user's configuration file whether there is a problem. Open. M2folder, found not only noSetting.xml, and there's no inside the warehouse.Jarpackage, it's a problem. So we should putsettings.xmlThe file is copied to the user directory, and then the file is modified, customized at the user scopeMaven's behavior.

What is the difference between these two paths?

The first path is global and will be affected for all users on the machine, which is user-scoped only if the current user is affected by the configuration. It is recommended to use user-scoped settings.xml, on the one hand, to avoid unintended effects on other users in the system, and to facilitate Maven upgrades.

       by default,. M2folder has been placedMavenlocal warehouses, all theMavenartifacts are stored in the repository for easy reuse. By default, the folder directory is in addition to theRepositoryThere are no other directories and files outside the warehouse, but mostMavenusers need to replicateM2_home/conf/settings.xmlfiles to. M2folder, or change the path to the currentSetting.xmlthe path to the file.


Summarize:

Encounter such a problem, must not be anxious to go down, stop, ask a few more why. To find out more about the relevant information, some knowledge is necessary, some knowledge is extended, then now is the necessary, we should learn more about.


Maven combat-missing jar package

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.