I have handled to complete some ant-script to populate my databases.. (simple script that runs some .sql files, like 'create', 'populate', 'drop', etc.)
Can there be any means by hell that the ant-script can make the database itself on your own? To JavaDB-Derby (in the glassfish bundle). Becasue it is a task for college, we discover that people recreate the database on different machines constantly, and I must avoid this. Also it would be great to understand.
Normally I'd produce a database through Netbeans, also it would request for any title, location, username, after which it might produce the link derby:jdbc://localhost:1527//DBUsername/
I realize this really is most likely a little too db-related, consider ant appears just like a good tool maybe it might help.. or maybe not, maybe another way (maybe another .sql file?)
Thank you for any replies.
I have produced databases via Ant. I do not recall getting an issue performing DDL using the SQL task. You might like to take a look at DBUnit.
Perhaps you have seen this link: Ant Script to create MySQL tables. Should not be way too hard to evolve it for Derby.
Apache Derby's JDBC driver allows you produce a database using
;create=true flag within the connection string:
This can be done from Ant by running
ij tool as command-line (or as java application). Here is a link to documentation