How maven adds jar package dependencies to Web projects

Source: Internet
Author: User

How maven adds Jar pack dependencies to Web projects createtime--2018 April 19 19:06:21author:marydon

Development tools: Eclipse

1. Open pom.xml file--Switch to Pom.xml view--

2. On the Build tab, create a dependencies tag, and the introduction of the jar package is placed inside the tag;

3. See which jar packages are referenced by the project: Src/main/webapp/web-inf/lib, and then http://mvnrepository.com the following jar package one from the Maven repository,

Found and introduced into the Pom.xml file.

Example:

Search "Aopalliance"-click the link below--

Find the desired version and click--

Copy

Paste into the dependencies tag in the Pom.xml file

Description: You may not be able to find the jar package you need on the MAVEN website, you will need to add the jar package to the local repository using the MVN command.

Note:after the Pom.xml file has been modified to save, be sure to remember to update the project, otherwise it will be an error (the project refers to the original Pom.xml file).

The last red box shows how to update the Pom.xml file in the project.

Related recommendations:

Maven adds a jar package to the local repository

Eclipse transforms the Javaweb project into a MAVEN project

How maven adds jar package dependencies to Web projects

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.