i'm using dbunit ant task to load initial data.. i have something like
the following in profiles section of the pom.xml. it will execute
when `mvn -DloadData=true`
<profile>
<id>dbunit-load-data</id>
<activation>
<property>
<name>loadData</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>process-classes</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<property value="CLEAN_INSERT" name="operation" />
<property value="src/test/sql/test-data.xml" name="file" />
<taskdef name="dbunit"
classname="org.dbunit.ant.DbUnitTask" />
<dbunit driver="${database.driver}"
url="${database.url}"
userid="${database.username}"
password="${database.password}"
supportBatchStatement="false">
<operation type="${operation}"
src="${file}" format="xml" />
</dbunit>
</tasks>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>${database.dependency.groupId}</groupId>
<artifactId>${database.dependency.artifactId}</artifactId>
<version>${database.dependency.version}</version>
</dependency>
<dependency>
<groupId>dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.6.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
On 6/27/06, Rick Hightower <[EMAIL PROTECTED]> wrote:
A sample pom.xml would be cool. I've used the DBUnit ant tasks and am
looking for some sample for Maven2 and DBUnit.
I looked around but there seem to be no DBUnit maven task documents.
http://jroller.com/page/RickHigh?entry=getting_dbunit_to_work_with
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]