Christian,
That is perfect - there is a little bit of work I have to do, but so far it looks promising. The other suggestion is valid if I'm running it through MySQL Query Browser or command line probably, but for this task, it won't work.
The solution that I'm implementing is finding all occurrences of database.configuration through getResources( ... ). Then for the entries that are in an archive, I have to use Java's support for reading Zip files. Once I locate all the files and read all the content, I prioritize the SQL files based on the priority configured in database.configuration so if a script in one jar needs to run before another, it will. After they're all sorted out, I begin running them through entityManager.createNativeQuery( ... ).executeUpdate();
Walter
|