My Intellij Idea file names in the Project Explorer all have a small Red circle with "J" written on them. What would that represent?
-
2Do they correspond to anything on this page: https://www.jetbrains.com/idea/help/symbols.html ? – ABMagil May 08 '15 at 20:00
-
Did you import the project? if yes what kind of project is it. Eg. maven, ant – Eranda May 08 '15 at 20:03
-
Yes i imported it and It is a maven project. – Hello May 08 '15 at 20:16
-
Anyone who's landed here may want to read : [_What does this symbol mean in IntelliJ? (red circle on bottom-left corner of file name, with 'J' in it_)](http://stackoverflow.com/q/4904052/320399) – blong Oct 28 '16 at 22:13
4 Answers
IntelliJ recognises that this is a java file, but it's not marked as part of the project source. Check that your project is following the maven standards, and if not configure the pom to tell it where your sources are. You can fix this temporarily in IntelliJ by right clicking on the source root (that's 'java' in the maven standards) and choosing to 'Mark Directory As --> Source Root'

- 15,457
- 7
- 74
- 102
When you create a module, typically it has one content root. You can create additional (and remove) content roots as explained in IntelliJ's Configuring Content Roots documentation.
However, it is possible that you imported a maven project that contains modules. In other words, you have a directory structure with sub-modules as shown below:
parent-proj/
|
|--module-a-proj/
| |-- src/
| |-- pom.xml
|
|--module-b-proj/
| |-- src/
| |-- pom.xml
|
|-- pom.xml
If you look in the parent-proj/pom.xml
you should see a <modules></modules>
section. If your <modules>
contains your sub-modules (such as module-a-proj
and module-b-proj
in our example above) then IntelliJ will properly add their src
directories as content roots.
On the other hand, if the sub-modules are not included in the parent pom then you might see the red symbol that indicates Java class located out of the source root.
Therefore, using our example above, the parent-proj/pom.xml
should look something like the pom example below. The pom example is intentionally sparse and is for demonstration purposes only. In particular, pay attention to the <modules>
section.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.your.groupid</groupId>
<artifactId>parent-proj</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>module-a-proj</module>
<module>module-b-proj</module>
</modules>
<dependencies></dependencies>
</project>

- 6,317
- 7
- 43
- 51
For me the issue was intelliJ was ignoring .pom files, somehow (Don't know why) Unchecked the checkbox to consider it and not ignore. and started working
File -> setting -> Build,Execution, deployment ->maven ->ignore files

- 21
- 2
what worked for me : Since I did a git pull but the cache was still from an older version all I did was invalidate the caches and rebuilt the project in Intellij

- 121
- 2
- 4