I thought it more, one possible solution is the following:
1) don't copy mysql.properties to "classes/META-INF" during
"process-resources" phase;
2) copy hsql.properties to "classes/META-INF" as part of test resources; but
how to overwrite the database property in this phase?
3) copy mysql.properties to "classes/META-INF" during "package" phase;
again, I'm not sure how to do so? Maybe need to resort to embeding ant
script?

Any help is appreciated. Thanks,


fagfa wrote:
> 
> 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#a5926678
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to