A way to deploy plsql to Oracle in Java project with Maven build tool
I join to project where plsql sources developed and stored in Oracle DB.
There are two copies of sources - on test and on production servers. So SPOT (single point of trust) rule was broken. Copies require synchronisation from time to time and this job is performed manually.
But most annoying thing come from configuration management - I can't reproduce previous working project copy because old plsql scripts was lost (new version have changes in API).
After studying subject I found awesome project: https://code.google.com/p/plsqlmaven
By following https://code.google.com/p/plsqlmaven/wiki/Basics I can dump all plsql scrips (and diff between production and testing) from DB'es:
$ mvn plsql:extract -Dforce
but I stuck with plsql:deploy command (it print error about missing jars, I don't understand how to create it). I will contact to author soon and will fill some bug reports.
But I hope that community already solve such basic task for project vitality.
How can I deploy plsql scripts to Oracle DB in Java project (my project uses Maven build system)?
PS I look to SQL Developer tutorials on oracle.com - I can't find how to deploy entirely plsql files hierarchy by one button click. And I prefer command line solution...
PPS I report related errors to plsqlmaven project:
- https://code.google.com/p/plsqlmaven/issues/detail?id=4 (Need tutorial for deploying plsql files to Oracle DB.)
- https://code.google.com/p/plsqlmaven/issues/detail?id=5 (Please release 1.11 to Maven central.)
- https://code.google.com/p/plsqlmaven/issues/detail?id=6 (plsql:extract dump plsql code to src/main/java by default in 1.10)
PPPS I ask question at http://rsdn.ru/forum/java/5011849.flat (Russian)
This is one of the situations I'd love to use flyway, as it lets you manage version and scripts.
It is also handy when testing, as it lets you seed the database into a given state.