开发者

Build different products out of common base (Java)

开发者 https://www.devze.com 2022-12-21 00:01 出处:网络
I\'m looking for a way of packaging different products out of a common base.This could be, for example, for packaging a light version of a product or a specially customized edition.

I'm looking for a way of packaging different products out of a common base. This could be, for example, for packaging a light version of a product or a specially customized edition.

The differences between my different products are mainly the following:

  • Producing different开发者_Python百科 configuration files (text files) out of a single one (could be slight differences or larger blocks removed, added, etc.)

  • Filtering (removing), adding or overriding groups of files (help files, entire modules, etc.)

I'm exploring different solutions related to either Maven or Ant (or whatever else). For example: using a velocity plugin to generate the different config files at build time.

I'm wondering though if there are better tools to adress that kind of problem. There are lots of commercial products out there that are distributed in different "flavours" so I'm thinking there must be existing tools or best practices for creating different packaging like that.

Any insight would be appreciated!


The maven-shade-plugin is your friend, combined with profiles. You can use it to merge disparate JAR files and things like META-INF spec files.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号