Eclipse配置问题解决笔记

    最近利用spring starter project 建了一个普通的java工程,导入IDEA中,没有报错,偿试向Eclipse中导入时,遇到了以下几个问题,尝试解决,这个Eclipse是2018年安装的,后来转向IDEA开发,这个工具一直保持着几 年前的状态,现在重新拿来使用,具体问题如下 :

问题1:刚导入时报Failure to transfer commons-io:commons-io:pom:2.4 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
 Original error: Could not transfer artifact commons-io:commons-io:pom:2.4 from/to central 
 (https://repo.maven.apache.org/maven2): The operation was cancelled.

到仓库中看,确实缺少commons-io 2.4版本,我们的eclipse中选中项目pom.xml,右键-Run As-MavenInstall

问题2:The requested profile "pom.xml" could not be activated because it does not exist

 在项目中单击右键 --属性 --maven,将此处清空保存即可

问题3: Project configuration is not up-to-date with pom.xml. 
 Select: Maven->Update Project... from the project context menu or use Quick Fix.

根据提示操作以后,会出现Jdk自动降低为1.7(本次使用JDK1.8),改为1.8以后,每次更新都为再降为1.7,解决方式是改为1.8以后,重启Eclipse,然后再执行update project

 Description    Resource    Path    Location    Type
Build path specifies execution environment JavaSE-1.7. There are no JREs installed in the workspace that are strictly compatible with this environment.     alibaba        Build path    JRE System Library Problem

问题4:Maven Configuration Problem

这个问题通常不影响工程的运行,只是影响视觉效果而已,解决方法也比较简单,在pom文件 <properties> 段添加如下配置内容:

    <properties

        <maven-jar-plugin.version>3.0.0</maven-jar-plugin.version>

    </properties>

工程上右键,选择 Maven-->Update Project 菜单,勾选当前工程,进行更新,更新完毕后,问题解决。

原因分析:这种问题通常就是版本不兼容导致的问题,这里是因为 maven-jar-plugin 插件的版本造成的。

参考地址:

https://jingyan.baidu.com/article/574c52196adb4d6c8d9dc18c.html

The requested profile "pom.xml" could not be activated because it does not exist_a1194821568的博客-优快云博客

https://jingyan.baidu.com/article/da1091fb93d53d427849d6f7.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值