MyEclipse Configuring MAVEN

Source: Internet
Author: User

1. First configure the Java operating environment (JDK to 1.7 and above version), the web has detailed information.

2. Download maven, specific download link http://maven.apache.org/download.html

3. Download Apache-maven-3.2.1-bin.zip and unzip to the specified location.

4. Create a new system variable: m2_home, the path format is: D:\maven\apache-maven-3.2.1 (your decompression path).

5. Configure the PATH environment variable, add "%m2_home%\bin" at the end of the path value, note (if the previous path is not there, manually fill in the English format).

6. After configuration, open the cmd window: Enter Mvn-version, there will be version information, indicating success.

7. Go to Maven to configure the local repository

Open the local Maven directory for example: D:\maven\apache-maven-3.2.1, open the Settings.xml file under the Conf folder, find the 53rd line, remove the comment, modify it to:<localrepository> E:/mvnrespo</localrepository> (Modify it to a specified file directory of your own local).

------------------MyEclipse configuration-------can refer to http://jingyan.baidu.com/article/4f7d5712aa9c631a201927ea.html

The Maven plugin is already in 1.myeclipse and you don't have to download it yourself, configure Maven for Eclipse, and from the Eclipse menu bar, click Maven, Preferences, Windows-- installations, add the previously extracted maven

2, click User Settings to use our own MAVEN configuration.

3. Open MyEclipse---window--preferences--java--installjars----add

To add a local JDK, be sure to configure the default VM arguments otherwise run the MAVEN project times

-dmaven.multimoduleprojectdirectory system propery is not set. Error message.

Specific configurations such as:

-dmaven.multimoduleprojectdirectory= $M 2_home (directly copy parameters)

Now that the MyEclipse configuration is complete, you can create a MAVEN project.

Create a run--------------------------maven Project

File--new--other---maven project

At this point, you can create a WebApp project.

You can configure the jar package to be used in pom.xml, and it will automatically download to the local repository you set up earlier.

-----------Run the MAVEN project----

Right-click the project name, select Run as = + Maven Install in the pop-up option, and eclise will download and install the dependent package. After waiting for some time, the results of the build success are as follows:

Once again, build and publish again, right-click the project name, select Run as = + Maven build in the pop-up option, and the first run will pop up a dialog box like this:

Add the Tomcat:run----run in the goals entry.

You will run the MAVEN project directly from the run As--maven build later.

He will download the dependency package automatically, and after success can go directly to the address of the console, just like after Tomcat runs.

MyEclipse Configuring MAVEN

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.