美文网首页
maven-assembly-plugin使用

maven-assembly-plugin使用

作者: 江江的大猪 | 来源:发表于2021-01-01 16:33 被阅读0次

    使用maven-assembly-plugin的背景

    • 通过springboot打包出的可执行fat jar大多还需要一个启动脚本和一些使用说明,所以需要用maven-assembly-plugin将可执行jar和其他别的东西打包到一起进行交付
    • 工程结构如下,最后将bin目录和可执行jar打包成一个tgz文件
    image.png

    maven-assembly-plugin配置参数说明

    • maven配置如下,按照官方文档配置了一个assembly.xml(注意该文件路径和src平级),里面指定具体要做的事情


      image.png
    • assembly.xml配置如下

    image.png

    相关文章

      网友评论

          本文标题:maven-assembly-plugin使用

          本文链接:https://www.haomeiwen.com/subject/boejoktx.html