Can't reference type from .m2 jar
04:37 25 Nov 2025

A Maven dependency is loaded, expected types are present in the jar in .m2, yet IntelliJ paints the import in red.

I tried deleting the dependency directory and loading it again, it didn't help.



    4.0.0

    com.example
    dbftest
    1.0-SNAPSHOT

    
        8
        8
        UTF-8
    

    
        
            us_army
            https://www.hec.usace.army.mil/nexus/repository/maven-public/
        
    

    
        
            org.xBaseJ
            xBaseJ
            20140212
        

        
            org.junit.jupiter
            junit-jupiter-api
            5.13.1
            test
        
    

import org.junit.jupiter.api.Test;
import org.xBaseJ.DBF; // in red

public class XBaseJTest {

    @Test
    public void testCompilation() {}
}

expected DBF class is present in the jar

DBF class is in red

Why?

java maven intellij-idea