Create different products from a common base (Java)

I am looking for a way to pack different products from a common base. This can be, for example, for packaging a light version of a product or a specially customized edition.

The differences between my various products are mainly as follows:

  • Creation of different configuration files (text files) from one (there may be slight differences or deleted large blocks, added, etc.)

  • Filtering (deleting), adding or overriding file groups (help files, whole modules, etc.)

I am learning various solutions related to Maven or Ant (or something else). For example: using the speed plugin to create different configuration files during build.

I am wondering if there are better tools to solve this problem. There are many commercial products that are distributed in different "flavors", so I think that to create such a package there must be existing tools or best practices.

Any insight would be appreciated!

+4
source share
1 answer

The maven-shade plugin is your friend in combination with profiles. You can use it to combine disparate JAR files and things like META-INF specification files.

+1
source

Source: https://habr.com/ru/post/1302296/


All Articles