解决多模块项目用maven 打包时报错
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.1.1:jar (default-jar) on project app-interface: You have to use a classifier to attach supplemental artifacts to the project instead of replacing them. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :app-interface
查看maven 打包日志发现,原来是因为一个包中里面没有任何java文件,是空的。所以导致打包失败。
[INFO] --- maven-surefire-plugin:2.21.0:test (default-test) @ app-interface ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:3.1.1:jar (default-jar) @ app-interface ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] ------------------------------------------------------------------------
新建一个Test.java ,再打包,BUILD SUCCESS.