How do I create a maven project from eclipse?

Source: Internet
Author: User

Step through Reading

How do I create a maven project from eclipse?

This experience is based on some simple understanding of Eclipse and maven. If you do not understand, you can Baidu Eclipse and MAVEN related information, it is not described here, you can also choose to follow me, see its related experience.

Tools/Materials
    • JDK environment. Baidu Search (Guo Sea How to configure the Java JDK environment? )
    • MAVEN environment. Baidu Search (Guo Sea How to configure the download, install, configure MAVEN environment? )
    • Eclipse. Baidu Search (Guo sea How to download, install, configure eclipse?) )
Method/Step
  1. 1

    Open the Eclipse software, in the Open Software view, on the left is the project presentation area.

    Personal Recommendations using the package Explorer (packet structure) as the default project structure on the left, makes it easier to see the MAVEN project structure.

    Baidu Search (How does Guo Eclipse use the Package Explorer Showcase project?) )

  2. 2

    To start a new project, tap the menu file→new→other , or right-click an empty space in the project area and select new→other.

  3. 3

    From the pop-up box, enter MAVEN search at wizards, select Maven Projectfrom the results of the search, and then click next>.

  4. 4

    In the New Maven Project window, select the box:

    -create a simple project (skip archetype selection) (translation: Creating a single item (skipping the prototype selection)). If you choose this will skip MAVEN project prototype (template) selection, it is recommended not to tick , you can use the built-in template.

  5. 5

    In the New Maven Project window, select the box:

    -use Default workspace location (translation: Using the default working range), after the tick, the established project will be placed in the default work area, if not selected, click Browse, select a working area.

  6. 6

    In the New Maven Project window, select the box:

    -add project (s) to Working set (translation: Add project to Working set), select to put the new project into the working set, where the concept of working set is the project collation , similar to the document as a document, convenient to distinguish, optional.

  7. 7

    After entering the next step:

    Enter Maven-archetype-webapp(the model for the Web project) or enter Maven-archetype-quickstart(non-Web project) in the filter. These two are more commonly used models.

    Now take WebApp (Web project as an example).

  8. 8

    After entering the next step:

    Group ID (the project organization's unique identifier, such as: com.****)

    Artifact Id (the name of the project, the name of the root directory)

    Version (current)

    Package (default packet structure, this can not be filled)

    then click Finish.

  9. 9

    Here the project is built:

    But there are some minor problems that need to be dealt with in advance, and when the project is completed, you can see that the project is using jdk1.5 by default, because we are using prototypes that are relatively early versions.

  10. 10

    We want to replace the JDK:

    Right-click on the newly created project, in the right-click menu, select Build Path→configure build Path ...

  11. 11

    In the pop-up properties for * * * *:

    Java Build path→libraries→jre System Library [j2se-1.5], then click Edit ....

  12. 12

    In the edit library that pops up:

    Select the Alternate JRE, choose your own native JDK, or click installed JREs to install one.

  13. 13

    After switching over the JDK, the structure of the project is the one that Maven has. You can look at the structure and compare it with the project you set up, and confirm that there are no falling steps.

How do I create a maven project from eclipse?

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.