maven打包报错You have to use a classifier to attach supplemental artifacts to the project instead of replacing them.
[WARNING]JAR will be empty - no content was marked for inclusion!15:51:40 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.1.1:jar (default-jar) on project whqtest: You have to use a classifier to attach supplemental artifacts to the project instead of replacing them. -> [Help 1]
两种情况
1.whqtest项目中没有源码(src/main目录中),这种情况创建一个类就行了
2.所在目录结构比较特殊,比如jenkins从windows迁移过来后,没有修改为linux目录结构,仍然是D:/xxx/xxx。
此种情况,git命令执行正常,但maven识别有问题,会找不到,所以导致该错误。