Java file outside of source root intelliJ

If you do an ‘import from git’, IntelliJ doesn’t import the project structure from maven (or gradle) automatically.

One way to do this afterwards is to right-click on the pom.xml file in the root directory, and select ‘Add as maven project’. Then the folders will be marked correctly, and dependent libraries will be imported. There should be no need to mark individual source folders manually.

I prefer to do a git clone outside of IntelliJ, and open the project from the local filesystem, then IntelliJ imports the maven project structure automatically.

Leave a Comment