assembly插件: dependencySets


 

classpath只加载当前服务需要的jar包(配置:dependencySet)

参考 hadoop打包方法:hdfs、yarn、MR所需要的jar放到不同目录下:

 

    <dependencySets>
        <dependencySet>
            <!--是否把本项目添加到依赖文件夹下:-->
            <useProjectArtifact>false</useProjectArtifact>
            <!-- 将项目所有依赖包拷贝到发布包的lib目录下 :-->
            <outputDirectory>lib</outputDirectory>
            <!-- 符合runtime作用范围的依赖会被打包进去: -->
            <scope>runtime</scope>
        </dependencySet>
        <dependencySet>
            <includes>
                <include>cn.ucloud.uds:uds-web</include>
            </includes>
            <!--是否把本项目添加到依赖文件夹下:-->
            <useProjectArtifact>false</useProjectArtifact>
            <!-- 将项目所有依赖包拷贝到发布包的lib目录下 :-->
            <outputDirectory>lib/web</outputDirectory>
            <!-- 符合runtime作用范围的依赖会被打包进去: -->
            <scope>runtime</scope>
        </dependencySet>
    </dependencySets>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM