Maven: how to export project with sources and dependencies

前端 未结 3 617
醉酒成梦
醉酒成梦 2020-12-05 10:06

I have Maven project with dependencies in repo and stuff. I want to \"export\" its sources with all dependencies so that I can successfully open it in IDE without Maven runn

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-05 10:55

    Actually, there is nothing that will create a bundle with sources and dependencies out of the box. For this, you'll need to use a combination of the some plugins.

    For dependencies, the Maven 2 Dependency Plugin and its copy-dependencies will help as pointed out by cetnar.

    For sources, you might need the Maven Source Plugin and its source:aggregate goal (or maybe the Maven Assembly Plugin and the pre-defined src descriptor but source:aggregate is handy for multi-modules builds).

    To bind the whole thing together (and maybe unpack sources), I'd use the Maven Assembly Plugin.

提交回复
热议问题