编译MyBatis源码时遇到的一系列问题
编译mybatis源码时,报错。
21:33 Error parsing .mvn/maven.config file: Unrecognized option: --no-transfer-progress
Fix maven config
maven.config 文件中内容都是红线
-Daether.checksums.algorithms=SHA-512,SHA-256,SHA-1,MD5
--no-transfer-progress
我当前使用的还是maven3.5.3
--no-transfer-progress
在构建过程中,不显示下载和上传的进度。这个参数在 Maven 3.6.1 才添加。
于是去maven官网下载来一个新的3.9.0。(https://maven.apache.org/download.cgi)
然后IDEA的 File >Settings >Build,Execution,Deployment >Build Tools >Maven
下更换maven home path。
环境变量中的maven path也要指向新版本。
先新建系统变量,
然后再环境变量path中,添加maven。
如果配置有误,可能IDEA中会出现下面的问题。
按照上述截图操作后:
接下来使用
mvn install -DskipTests=true -Dmaven.test.skip=true -Dlicense.skip=true
报错如下: Unknown lifecycle phase “.test.skip=true”.
将命令改为:
mvn clean install package '-DskipTests=true -Dmaven.test.skip=true -Dlicense.skip=true'
接下来报错如下:
从pom.xml文件中找到了JDK的限制条件,
<properties>
<!-- Copyright -->
<copyright>2022</copyright>
<!-- General configuration -->
<allowed.build.jdks>[11,12),[17,18),[19,20),[20,21),[21,22)