How to use Maven assembly plugin with multi module maven project

前端 未结 2 1034
南笙
南笙 2020-12-29 08:24

I am new to maven and spent ~3 days in generating the zip file with assembly plugin refering to http://www.petrikainulainen.net/programming/tips-and-tricks/creating-a-runnab

2条回答
  •  北海茫月
    2020-12-29 08:59

    I think the post How to Assemble Multi-Module Project with Maven might answer your question with an example.

    My answers to your questions:

    1) You should add the Assembly plugin in the parent pom within the build and pluginManagement tags to reuse it in the modules; the post mentioned above is a good example on how to do it. You can also take a look at 8.6 Best Practise chapter, topic 8.6.2, of the online book 'Maven: The Complete Reference'.

    2) The exclusion tag might be tricky. Again, take a look at 8.5 Controlling the Contents of an Assembly chapter of the online book 'Maven: The Complete Reference'. For example, the subtopic 8.5.4, about dependencySets mentions how to fine tune dependency includes and excludes for dependencySets; again, the subtopic 8.5.5, now about moduleSets, shows how to use it in that context.

提交回复
热议问题