IntelliJ IDEA 14.0.0 Web Help

Creating a Project by Importing Existing Sources

You can create a project by importing a collection of sources available on your computer. Such a collection, in addition to source code files, may also include library, configuration, image and other files.

You can import the sources that come from Eclipse, Flash Builder, Gradle, or Maven. In such cases the corresponding import operations are referred to as importing from an external model.

You can also import the sources of "unspecified origin" (i.e. the sources that come from the systems other than Eclipse, Flash Builder, Gradle, or Maven). In such cases the sources are treated generically and are referred to simply as existing sources.

In technical terms, importing is just creating IntelliJ IDEA project and module definition files in corresponding locations. (IntelliJ IDEA will create a project with one or more modules.) In most of the cases, the "original" sources will stay where they are.

To create a project by importing the sources from Eclipse, Flash Builder, Gradle, or Maven

  1. If no project is currently open in IntelliJ IDEA, click Import Project on the Welcome screen. Otherwise, select Import Project from the File menu.
  2. In the dialog that opens, select the directory or file which you want to use as a source of import. This may be a directory that contains the corresponding collection of sources or a file that appropriately describes such a collection. (The possible choices are listed right in the dialog.) Click OK.

    As a result, the Import Project wizard opens.

  3. On the first page of the wizard, specify the origin of the sources. (This page is not shown if IntelliJ IDEA has guessed what you are importing.) Select Import project from external model, and select Eclipse, Flash Builder, Gradle, or Maven. Click Next.

To create a project by importing the sources of unspecified origin

  1. If no project is currently open in IntelliJ IDEA, click Import Project on the Welcome screen. Otherwise, select Import Project from the File menu.
  2. In the dialog that opens, select the directory which contains the collection of sources you want to import. Click OK.

    As a result, the Import Project wizard opens.

  3. On the first page of the wizard, select Create project from existing sources and click Next.
  4. On the next page of the wizard, specify the name and location of the project to be created. Note that the folder specified in the Project location field should contain the sources that you are importing. IntelliJ IDEA will try to sort out the files contained in this folder. Click Next.
  5. The next page of the wizard shows the directories in which source files are found. Potentially, these directories may be your source root directories.

    Select the directories which you want to include in your project as the source root directories and click Next.

  6. On the next page of the wizard, select and configure the libraries to be included in your project. Click Next.
  7. On the next page of the wizard, select and configure the modules to be included in your project. Click Next.
  8. On the next page of the wizard, specify the SDK to be used in your project and click Next.
  9. The next page of the wizard shows the frameworks and technologies detected in your sources. Select the ones that you want to be enabled and click Finish.

See Also

Last modified: 12 November 2014
comments powered by Disqus