I want to pick up certificates from a different paths and add them to the final zip file. I have a xml file which has the location of all the certs. I need maven to read from this xml file and pick up the certs. I am struck here.
Asked
Active
Viewed 28 times
1 Answers
0
As reading files is generally not an intended maven use case, getting the cert into your final artifact will be cumbersome.
I see mainly 2 options for you.
First, use the gmaven-plugin and execute a Groovy script to copy your files to an appropriate place ( somewhere into the target folder i guess). This anwser on SO provides hints how to do that.
An alternative would be to pack this process into your own maven-plugin, which is less difficult than it sounds. The advantage would be, that the copy logic is sealed in the plugin (in contrast to openly accessible Groovy script in the pom) and is therefor more maintainable and secure.

Hendrik Jander
- 5,515
- 3
- 23
- 31