项目出现Unable to import maven project: See logs for details
解决方法: 安装maven 3.6.1 百度网盘 提取码: jz2s更新idea至最新版(网上教程,未尝试)【ERROR】不再支持源选项5。请使用7或更高版本
解决方法: 打开 settings.xml 浏览配置文件,我们发现maven默认jdk版本是1.4。因此才会报版本问题。 发现原因后我们只需在settings.xml文件中找到 <profiles></profiles> 然后插入 <profile> <id>jdk</id> <activation> <activeByDefault>true</activeByDefault> <jdk>你的jdk版本</jdk> </activation> <properties> <maven.compiler.source>你的jdk版本</maven.compiler.source> <maven.compiler.target>你的jdk版本</maven.compiler.target> <maven.compiler.compilerVersion>你的jdk版本</maven.compiler.compilerVersion> </properties> </profile>[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
解决方案:在 settings.xml 加下位置加入<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <profiles> <profile> <properties> <!-- 加入的代码 --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> </profile> </profiles>有些小伙伴可能会觉得maven下载远程仓库里的依赖包时太慢了。
解决办法:在settings.xml 中的<mirrors> </mirrors> 位置插入aliyun的镜像 <mirror> <id>nexus-aliyun</id> <mirrorOf>*</mirrorOf> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror>无