Thanks. But I do want to use "-D" to pass database variable since I also package for other databases, such as oracle, db2, psql, etc.
Alexandre Russel-2 wrote: > > On Tuesday 22 August 2006 16:15, fagfa wrote: > I had the same problem testing ejb. The unit test where using toplink but > package needed to use jboss. > You could use mvn test, and then instead of using -Ddb=mysql, use the > antrun > plugin to copy mysq.properties into /META-INF and maybe delete the hsql > file. >> Hi, I have a database specific resource file which needs to copy to >> "classes/META-INF" and as a result, package into the jar file, for >> example, >> hsql.properties, mysql.properties, etc. I specify this database property >> in >> POM, and default value is "hsql". >> >> The problem is that I only use hsql for my unit test. So if I just do >> "mvn >> test", it works perfectly. But if I do "mvn -Ddb=mysql package", I got a >> problem, apparently. mysql.properties is copied to "class/META-INF" and >> broke my unit tests, which are executed before package phase and using >> "hsql" database. >> >> Any suggestions? Thanks, > > -- View this message in context: http://www.nabble.com/Use-different-database-for-test-and-package-phase-tf2146572.html#a5930433 Sent from the Maven - Users forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]