Search code examples
javamavenintellij-idea

Enums from imported maven libraries result in a compile error


I have written my own library. However when importing it via maven the enums of that library are not implemented correctly.

enter image description here

When trying to use them it says cannot resolve symbol.
enter image description here

This is a IntelliJ issue only. When I generate the jar via mvn clean compile assembly:single the jar is been created and the program also works. I am using the newest Java version (Java 21) in all instances.

I appreciate your help! Thanks a lot

I tried both IJ COmmunity and IJ Ultimate edition. I also tried "invalidate caches" and "reimport maven".

Here is the pom:

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>
<dependency>
    <groupId>com.github.Xahrie</groupId>
    <artifactId>trueapi</artifactId>
    <version>3.3.72</version>
</dependency>

Im currently using Version 2022.3.1.


Solution

  • upgrading to IntelliJ 2023.3 solved the issue