Creating IntelliJ Projects from Maven: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
=External=
* http://maven.apache.org/plugins/maven-idea-plugin/usage.html
=Internal=
=Internal=


Line 10: Line 14:


This article describes the process of creating an IntelliJ project based on an existing Maven multi-module structure.
This article describes the process of creating an IntelliJ project based on an existing Maven multi-module structure.
!!!Import a Maven Project in IntelliJ
''generated based on IntelliJ 13''
Import Project -> Select File or Directory to Import
Select the main pom.xml
Import Form
__Root directory__ the project's root directory - usually where the top-most pom.xml file lives.
__Search for projects recursively__ IntelliJ looks for nested pom.xml files if selected.
__Project format__ .ipr (file based)
__Keep project files in__ Select this check box to specify the desired location for storing project and module files. <font color=red>The alternative is to keep them in the root directory.</font>
__Import Maven projects automatically__ - If checked, IntelliJ will re-import the project automatically every time the pom.xml file(s)(?) is/are changed.
__Create IntelliJ IDEA modules for aggregator projects (with 'pom' packaging)__. Clear this check box to skip creating IntelliJ IDEA modules. You might want to do that if the Maven project you import is an aggregator, and its packaging element has the value pom. By default is enabled. <font color=red>What if I want the behavior for some of them, and I don't for others?</font>
__Create module groups for multi-module Maven projects__ - if checked, a module group will be created from an aggregator Maven project, with nested modules included in the group.
__Keep source and test folders on reimport__ - <font color=red>If this check box is selected, the source and test folders are kept when you reimport a project. What does this mean?</font>
__Exclude build directory (PROJECT_ROOT/target)__ Enables automatic exclusion of target folders. However if /target contains /target/generated-sources, then /target cannot be excluded since /target/generated-sources is marked as sources. Other subdirectories in /target are excluded.
__Use Maven output directories__ If selected, the build is generated in target, and the results of IntelliJ compilation are reused. However, IntelliJ itself does not reuse the Maven build, and performs the compilation from scratch.
__Generate source folders__
<font color=red>...</font>
__Referenced by:__\\
[{INSERT com.ecyrd.jspwiki.plugin.ReferringPagesPlugin WHERE max=20, maxwidth=50}]

Revision as of 19:18, 18 March 2016

External

Internal

Relevance

IntelliJ 14

Overview

This article describes the process of creating an IntelliJ project based on an existing Maven multi-module structure.







!!!Import a Maven Project in IntelliJ

generated based on IntelliJ 13


Import Project -> Select File or Directory to Import

Select the main pom.xml

Import Form

__Root directory__ the project's root directory - usually where the top-most pom.xml file lives.

__Search for projects recursively__ IntelliJ looks for nested pom.xml files if selected.

__Project format__ .ipr (file based)

__Keep project files in__ Select this check box to specify the desired location for storing project and module files. The alternative is to keep them in the root directory.


__Import Maven projects automatically__ - If checked, IntelliJ will re-import the project automatically every time the pom.xml file(s)(?) is/are changed.

__Create IntelliJ IDEA modules for aggregator projects (with 'pom' packaging)__. Clear this check box to skip creating IntelliJ IDEA modules. You might want to do that if the Maven project you import is an aggregator, and its packaging element has the value pom. By default is enabled. What if I want the behavior for some of them, and I don't for others?

__Create module groups for multi-module Maven projects__ - if checked, a module group will be created from an aggregator Maven project, with nested modules included in the group.


__Keep source and test folders on reimport__ - If this check box is selected, the source and test folders are kept when you reimport a project. What does this mean?


__Exclude build directory (PROJECT_ROOT/target)__ Enables automatic exclusion of target folders. However if /target contains /target/generated-sources, then /target cannot be excluded since /target/generated-sources is marked as sources. Other subdirectories in /target are excluded.

__Use Maven output directories__ If selected, the build is generated in target, and the results of IntelliJ compilation are reused. However, IntelliJ itself does not reuse the Maven build, and performs the compilation from scratch.


__Generate source folders__

...

__Referenced by:__\\ [{INSERT com.ecyrd.jspwiki.plugin.ReferringPagesPlugin WHERE max=20, maxwidth=50}]