I am building a script that has to build EJB jars for multiple application servers and version. Bottom line, some processing needs to happen after the jar is built. This processing is application server and version specific (the same jar is processed once with WAS 6.1 and generates me a new jar, and once with WAS 7, it generates yet another jar). After I need to pick up those jars and use them in a ear task (depending if I build a WAS 6.1 or 7 ear I have to pickup the correct jar).
Of course I would like to reuse the same original jar to avoid having to recompile it.
What is the best way to achieve this?