Hi, This might be more of an maven/jetty/springframework question but
I guess you guys can help as well.
I have a maven parent project P with two modules A and B (web apps).
The project B has a H2 database which I configure with a
database.property file where I specify
database.url=jdbc\:h2\:./stubber;DB_CLOSE_DELAY\=-1
Then, in the test integration phase I need to have application A and B
run by the jetty plugin in two separate contexts.
Since the maven command for building the project can be run from
either the parent or the A project, I get the H2 database saved where
the maven process was started. I would really like a way to pass in
somehow the project's home location ${basedir} from the A projects pom
and have the database always saved under project A. Any idea how this
can be done?
Currently I have this configuration for jetty
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>7.4.2.v20110526</version>
<configuration>
<useTestClasspath>true</useTestClasspath>
<webAppConfig>
<contextPath>/integration-api</contextPath>
</webAppConfig>
<contextHandlers>
<contextHandler
implementation="org.eclipse.jetty.webapp.WebAppContext">
<!--
<resourceBase>../stubber/target/stubber-0.1.0.BUILD-
SNAPSHOT</resourceBase> -->
<war>${basedir}/../stubber/target/stubber-0.1.0.BUILD-
SNAPSHOT.war</war>
<contextPath>/stubber</contextPath>
</contextHandler>
</contextHandlers>
<useTestClasspath>true</useTestClasspath>
<connectors>
<connector
implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>9960</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<stopKey>foo</stopKey>
<stopPort>9911</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.