Maven将package打包并提交两个jar包。 一个是只包含自己编写的代码,另一个是包含所有依赖导入的jar包,俗称胖jar包。
! - -在项目下- -构建插件! --scala编译插件--plugingroupidnet.ALC him 31.maven/groupidartifactidscala-maven-plugin/artifactidversion4. con versionexecutionsexecutionidscala-compile-first/idphaseprocess-resources/phasegoalsgoaladd-source/goalgoalcompillies ---fatjar插件----plugingroupidorg.Apache.maven.plugins/groupidartifactidmaven-shade-PLL 创建artifactidversion2.的versionexecutionsexecutionphasepackage/phasegoalsgoalshade/goal/goalsconfigurationfiltersfiltered artifactexcludesexcludemeta-INF/*.SF/excludeexcludemeta-INF/*.DSA/excludeeexcludemeta-INF/*.RSA/exclude -编译插件----plugingroupidorg.Apache.maven.plugins/groupidartifactidmaven-compiler-plugin/artifing targetencodingutf-8/encoding/configurationexecutionsexecutionphasecompile/phasegoalsgoalcompile/gompile