Maven 给测试的源代码打包

如果需要让 Maven 给测试的源代码打包的话,需要在 maven-source-plugin 插件中添加一个 test-jar 的 goals

如果上面的代码所示,这样 Maven 就可以把项目中的测试源代码一同打包成 jar 文件后发布到代码仓库上。