mvn install -Dmaven.test.skip=true 在自己的库里生成文件jar
mvn deploy -Dmaven.test.skip=true 在中央库打包
https://maven.apache.org/pom.html
这是pom的一篇介绍,里面说了
引用
This is a listing of the elements directly under the POM's project element. Notice that modelVersion contains 4.0.0. That is currently the only supported POM version for both Maven 2 & 3, and is always required.
所以不要纠结了,在maven的pom里面
<modelVersion>4.0.0</modelVersion> 这是必须的 ,没有理由没有原因