在IDEA中进行开发时,Maven的插件或依赖显示红线的问题

如果maven的插件显示红线,其实这并不影响运行,但是还是很闹心对吧。

1、可以在maven设置中找到maven库的位置,文件资源管理器打开路径,删除红线的依赖和插件对应的文件/文件夹,再reimport。

2、依赖问题先检查网络,网络没问题的话可以考虑更换依赖的版本,去Maven仓库寻找对应版本号,或者用的最多的版本号(换版本的话,pom也要改),下载更换就可以了。

3、更换阿里云的镜像。在项目-maven-“open settings.xml”或者 “create settings.xml”,写下列代码:



    
        

        
            alimaven
            aliyun maven
            http://maven.aliyun.com/nexus/content/groups/public/
            central
        

        
            uk
            central
            Human Readable Name for this Mirror.
            http://uk.maven.org/maven2/
        

        
            CN
            OSChina Central
            http://maven.oschina.net/content/groups/public/
            central
        

        
            nexus
            internal nexus repository
            
            http://repo.maven.apache.org/maven2
            central
        

    

参考https://www.cnblogs.com/tiandi/p/10666454.html

4、还可以下载安装Maven Helper。

你可能感兴趣的:(Debug记录,Java,maven,plugin,阿里云)