Hello,
We work with a vendor which provides hot fixes and we need a way to integrate them in our build. We used
ant before but now want to migrate to Maven.
We have a hot fix control file with an ordered list of hotfix jar files. So each line of that file (csv format) has a name of a hot fix jar and the directory in which it is located.
Each hot fix directory contains a hot fix jar which contains the classes; Additionally some of the hot fix jar files contain source files or
java files.
Only some of the hot fixes in the hot fix control file are valid. This is determined by a status or a comment. If they should be skipped then they are marked with INACTIVE or as comment (# or ') at the beginning of the line. Currently it is the status name but a comment would do as well.
For example: (hot fix control file)
ACTIVE,hotfix1/hotfix1.jar
INACTIVE,hotfix2/hotfix2.jar
ACTIVE,hotfix2b/hotfix2b.jar
...
For example: (hot fix control file with comments)
hotfix1/hotfix1.jar
#hotfix2/hotfix2.jar
hotfix2b/hotfix2b.jar
...
Maven should now do the following: Unzip each valid or relevant hot fix jar and put the class files in one directory and the sources in another one (preserving the package structure).
Then it should Jar the classes folder. -> artifact 1 and Jar the sources folder. -> artifact 2. For the source files no compilation is needed (just used for debugging.)
We could now just use the ant maven plugin and call the existing ant scripts. But we want to utilise Maven as much as possible. So if we could just do it the Maven way that would be great. But some questions are really hard to tackle, does anyone have an idea?
Is there a 'standard' Maven way of doing it, avoid writing a plugin or using the ant plugin?
How can Maven consider the order of the hot fix?
How can Maven consider the status column/field or the comment in the hot fix control file?
I guess we could use the prepare-package lifecycle step to do the unzip and in the package the other part.
Would we need to do two modules to get the two jars (classes jar and sources jar) or can it both be done in one module?
Thanks for any help and input.
Anmatr.