How to create self-containing (standalone) jar of each modules of a multi-module maven project

后端 未结 2 1579
面向向阳花
面向向阳花 2021-01-15 02:41

I have a multi-module maven project. The parent POM and individual module\'s pom are working fine (because code in each module runs fine without any dependency issue and

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-15 02:52

    I did this with the AppAssembler maven plugin. It auto copies all needed dependencies and creates shortcuts for your main classes. It's much easier then other plugins I tried.

    For the uber-jar applications I use maven-shade-plugin for merging jars into one + proguard for shrinking, but AppAssembler is much quicker and stable to use.

提交回复
热议问题