Hi, I have created a 'database' pom which uses exec-maven-plugin to automatically build our Database, my SQL files all reside under <pomroot>/src/main/resources/db so exec-maven-plugin looks to this location when executing sqlplus e.g. sqlplus user/passw...@schema @<pomroot>/src/main/resources/db/mysqlfile.sql
I have bound the plugin execution to the process-test-resources phase and the Database builds perfectly when I execute mvn test for this POM, however ultimately I want to package this POM as an artifact upon which other 'database dependant' POMs will depend and this is where I get in to difficulty... I have tried deploying the database pom, which has packaging set to 'pom', as a snapshot to my local repository, when I do this it builds a jar file containing all the sql files and deploys successfully. When I then add a dependency on the snapshot from another POM and execute mvn test the jar is obtained from the repository but sqlplus cannot find the sql files because they now live in a jar rather than in a folder structure. I'm keen to find out where other people keep their SQL files and how do they package them up in to an artifact for other POMs to use? Is there some sort of standard approach that I'm missing here? It's probably worth mentioning that I have tried the sql-maven-plugin but cannot use it since it doesn't deal with sql includes e.g. @<somesqlfile> at all. Many thanks, Edd -- View this message in context: http://www.nabble.com/How-do-I-package-%28and-then-re-unpackage%29-SQL-files-as-an-artifact--tp22412576p22412576.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
