I am thinking using truezip API in Java to manipulate with ear file by
- extract ear into tmp directory,
- then search through jars in tmp,
- if found properties in jar,
- then extract it into tmp,
- modify that property
- then pack it back into jar,
- then pack jar back into ear.
OR is there a better way in using shell script?
Please advise.
Thanks
I used the answer from @Christian Schlichtherle to get me started on what I was trying to accomplish, but the usage of True Zip has changed quite a bit. I thought I'd post what I needed to do here to hopefully help someone.
You need to create a class that extends TApplication. In my case I'm making it abstract so I can reuse the setup code in my implementing logic classes.
Application.java:
Then you just extend the abstract class and implement the "work" method as shown.
ChangeProperty.java: