Rob,
thanks for the help. This is a big step forward to a good solution to my
problem.
I'm now using profiles.xml as well.
The remaining problem is that the unit tests, which are executed in each
profile overwrite the data which is used by the web application, i.e.
all settings made in the app are reset to the default-data data.
Did you solve that problem somehow or do you just skip the tests in env-dev?
Thanks,
Joachim
Hi Joachim,
On 23 Oct 2007 at 15:49, Joachim Ansorg wrote:
I want test tests to use a seperate database. I already managed to change the
dbunit tests by fixing the
jdbc.properties in the test/resources dirs and by fixing some settings in the
pom.xml files. But the integration
tests which use cargo-maven2-plugin are not working yet. If I understand it
correctly then the war is build and
deployed by cargo-maven2-plugin into an integrated tomcat and tested. The
problem is that the jdbc.properties file in
the war used by the plugin is from web/src/main/ not from web/src/test.
Can I force the cargo-maven2-plugin to use the jdbc.properties file from
web/src/test/resources/ ? If yes, how could
I achieve that?
As I understand it, you shouldn't be modifying the original
jdbc.properties files as these have values inserted into them when
you run maven.
I have set up some profiles in a profiles.xml file in the same directory
as my pom.xml (see attached). I specify the profile I want to use
when I run maven. For example if I want to run Jetty with my app as
a WAR file and use the development profile, I'll run:
mvn -Denv=dev jetty:run-war
this will use the settings defined in the profile with the id "env-dev" in
my profiles file.
I've never had to touch the jdbc.properties file(s) that came with
AppFuse 2.0.
HTH,
Rob Hills
Waikiki, Western Australia
Mobile +61 (412) 904-357
Fax: +61 (8) 9529-2137
------------------------------------------------------------------------
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.
---- File information -----------
File: profiles.xml
Date: 23 Oct 2007, 21:24
Size: 3767 bytes.
Type: Unknown
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]