Introduction of MAVEN dependency Management in Web projects

Source: Internet
Author: User
I'm a pro-test effective

Create a new MAVEN project first

Modify the. Project file: Copy the following MAVEN project. Project code into the. project file under the Web engineering root path.
Label (if the code exists, you don't need to copy it)

<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments></arguments> </buildCommand>
Copy the following code under the label in the. project file under the engineering root path (if the code exists, you do not need to copy it)

    <nature>org.maven.ide.eclipse.maven2Nature</nature>

modifying. classspath files
Modify the. classpath file under the Web project according to the classpath file of the MAVEN project

Reboot myeclipse add pom file As for Web projects:

<project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= /xmlschema-instance "xsi:schemalocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/ Maven-4.0.0.xsd "> <modelVersion>4.0.0</modelVersion> <groupId>org.xxx</groupId> < Artifactid>org.xxx.xxx</artifactid> <version>0.0.1-SNAPSHOT</version> <packaging>jar </packaging> <name>org.zhxie.mybaits.trymvn</name> <url>http://maven.apache.org</url > <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </prope rties> <dependencies> <dependency> <groupId>junit</groupId> <ARTIFACTID&G t;junit</artifactid> <version>3.8.1</version> <scope>test</scope> </depen dency> </dependencies> </project> 
Done

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.