IntelliJ idea Import and reimport a project

Source: Internet
Author: User



Here is the configuration you need to import a MAVEN project:



(1) Keep Projects files in:
Use this check box to specify the location after which the project file is imported.
For example, when you import a project and want to import the ". iML" File and the ". Idea" folder into the specified folder instead of the default location.
By default, Intellj idea places the "project file" next to Pom.xml.


(2) Import Maven projects automatically:
Select this option, and IntelliJ idea will automatically execute reimport whenever you want to modify your Pom.xml file.


(3) Create IntelliJ idea modules for aggregator projects (with ' pom ' packaging):
Select this item, and each MAVEN modules that is included in the pom.xml of the aggressive project will be created.


(4) Create module groups for Multi-module Maven projects:
With this option selected, IntelliJ idea will create a module group, containing each nested modules, based on the aggressive Maven project.


(5) Keep source and test folders on Reimport:
1. Select the item, and all the "source" and "test" folders will be saved at each import.
2. Without this option, all previously configured "source" and "test" folders will be removed at each import.
By default, the check box is set as follows:
1. For new project: Do not select this item;
2. For already imported projects: Select the item.


(6) Exclude build Directory (Project_root/target):
Select the item to drain the build directory from the project.
This may be useful if you want to speed up the process of project import.
Without this option, IntelliJ idea will index the files in the build directory every time you import a project, so there may be additional time overhead.


(7) Use Maven output directories:
Without this option, build will be created in the default output directory of IntelliJ idea:user_home\ideaprojects\<project>\classes\production\;
With this option selected, build is created in the Mavende output directory, and the result of IntelliJ idea compilation is reused.
However, IntelliJ idea itself will not reuse the results of Maven build, and will be compiled from scratch.


(8) Generated Sources folders:
When you reimport a project, specify the directory of your source root.
You can choose one of the following options:
1.Detect automatically: This is the default option. IntelliJ idea will automatically identify the location where the sources is generated.
IntelliJ idea also identifies the path marked as source root. However, IntelliJ idea only searches under target/generated-sources and target/generated-sources/*.
2.target/generated-sources: This option allows you to manually mark the source root.
3.subdirectories of "target/generated-sources": This option allows you to manually mark subdirectory as source root.
4.Don ' t detect: This option lets you skip detection process.


(9) Phase to is used for folders update:
Choose Maven phase for folder Updat. This may be useful if you adjust your plugins, in order for the extra sources to be load in at certain stages.


(10) Automatically download:
Select Source, Documenation, and in a opening Maven project, these will be downloaded automatically.


(11) Dependency types:
Use this field to specify when you reimport project dependency types.


(12) Use Maven3 to import a project:

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.