maven 项目编译报错

背景环境:

1、maven项目

2、spring boot 框架

3、eclipse ide 开发

报错信息:

1、maven install 操作
[ERROR] Caused by: java.security.NoSuchAlgorithmException: SHA-256 MessageDigest not available
[ERROR] Caused by: SHA-256 MessageDigest not available
 

2 maven debug 操作

Caused by: java.nio.charset.UnsupportedCharsetException: GBK
    at java.nio.charset.Charset.forName(Unknown Source) ~[na:1.8.0_172]
    at sun.nio.fs.Util.<clinit>(Unknown Source) ~[na:1.8.0_172]

解决方法:

项目右键 -> properties -> Maven,输入框中输入 pom.xml , 点击  Applay and Close 即可,如下图:

maven 项目编译报错