General steps for importing an open-source project to eclipse

Source: Internet
Author: User

               General steps for importing an open-source project to eclipse

Zhou yinhui

 

 

After downloading it to an open-source project, we still want to import it to eclipse. The general steps are as follows:

 

Open the source code directory,

  • If you see. Calsspath. projectFile, it indicates that this project was originally developed by eclipse, so in eclipse-> file-> Import-> existing project
  • If you seeBuild. xml, It indicates that this project is built by ant. Refer to the "import ant project" section below"
  • If you seePom. xmlFile, it indicates that this project is built by Maven. Refer to the "Import Maven project" section below"
  • For others, create a project and import the source code.

 

 

About importing ant Projects

This is relatively simple. Open eclipse, file-> New-> Project (yes, you are not mistaken, it is new, not import)

Select "Create a java project from the existing ant build File", next, take a project name, and specify the location of the build. xml mentioned above.

 

 

 

 

About importing Maven Projects

Maven is a construction tool, which is similar to make, clearmake, and ant.

First, install Java, and then:

1. Download

Http://maven.apache.org/download the compressed package and decompress it to a directory.

2. Configure Environment Variables

Open the environment variable settings and add the Maven installation location to the path. For example, my path is:

C: \ jdk1.8.0 \ bin \; C: \ Program Files (x86) \ apache-maven-3.2.1 \ bin

Open a new cmd and enter mvn-v to view the version information.

3. After Maven is installed, go to the source code directory, open cmd, enter mvn eclipse: eclipse, and press Enter. At this time, maven converts the mvn project under the directory to an eclipse project (after the conversion is complete, you will find that there are more projects under the directory. calsspath. project file). At this time, you can go back to the first case mentioned above and import it directly.

 

In addition, maven has an eclipse plug-in. You can click eclipse Marketplace under the Eclipse help menu and search for and install it in the market.

 

Then, you can use the GUI to import the mvn project.

 

 

 

 

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.