Maven Combat (iii) Eclipse build MAVEN Project

Source: Internet
Author: User



reprint: http://www.iteye.com/topic/1123225





1. Installing the m2eclipse plugin ?
 to use Eclipse Build Maven project, we need to install first Meeclipse Plugins ?
Click the Eclipse menu bar help->eclipse Marketplace search for plugins Maven integration for Eclipse and click Install, such as:





after the installation, we Eclipse in the menu bar, click File->new->other, in the popup dialog box, you will see the following:








2.? Build Maven Project ??






 in eclipse3.6 as an example



 Create a simple Maven Project



Click Eclipse Menu Bar File->new->ohter->maven get the dialog box as shown:








selected Maven Project and click Next To continue clicking on the next dialog box Next get the following dialog box




 operation, select Maven-archetype-quickstart , click Next





? Fill in the picture as shown. GroupId, Artfactid,version and other information, click Finish .



as a result, we have successfully created a simple Maven project, Project structure








2 ) to create Maven Web Project



 operation and Creation Simple Maven similar to the project, click Eclipse Menu File->new->other->maven->maven Project



 in the Select Maven-archetype interface to do the following:




 Click Next, fill in the appropriate groupid,artifactid,version and other information, click Finish



Get the Maven Web The project structure looks like this:






? Right-click the project and click Properties->project Facets








If you can see the project as web2.3 java1.5 Of course we can also change to the version we need, open XML file My-app-web/.settings/org.eclipse.wst.common.project.facet.core.xml , you can make changes:



Xml Code ??


  1. <?xml ? version="1.0"? Encoding="UTF-8"?>??
  2. <faceted-project> ??
  3. ?? <fixed? Facet="Wst.jsdt.web"/>??
  4. ?? <installed? Facet="java"? Version="1.5"/>??
  5. ?? <installed ? Facet= "Jst.web" ? Version= "2.3" /> ?? /li>
  6. ?? <installed? Facet="Wst.jsdt.web"? Version="1.0"/>??
  7. </faceted-project> ??





 3 ) Import Maven Project



 in the Eclipse Project Explorer Right-click in the pop-up box and select Import , get as shown: ??????????




 Select Existing Maven Projects , and click Next , get the dialog box as shown:






Select an already created Maven project, and click Finish .



From this, import Maven Project Success






3.? Run Maven Command



 Right-click the project and click Run as , such as:






 you can see that there are many existing maven command, click to run, and you can see the running information in the console



 If you want to run the maven command is not found here, click on Maven Build Create a new command, as shown in the following:








 such as filling in Maven command, click Run can be








the new maven the command can be found in the following ways and run again:







Maven Combat (iii) Eclipse build maven project (GO)


Related Article

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.