2007年12月2日日曜日

mavenでdbunit

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>dbunit-maven-plugin</artifactId>
  <dependencies>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derbyLocale_ja_JP</artifactId>
      <version>${jdbc.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derbyclient</artifactId>
      <version>${jdbc.version}</version>
    </dependency>
  </dependencies>
  <configuration>
    <driver>${jdbc.driver}</driver>
    <url>${jdbc.url}</url>
    <skip>${maven.test.skip}</skip>
    <username>APP</username>
    <password>APP</password>
  </configuration>
  <executions>
    <execution>
      <id>import-all</id>
      <phase>test-compile</phase>
      <goals>
        <goal>operation</goal>
      </goals>
      <configuration>
        <type>CLEAN_INSERT</type>
        <src>${basedir}/sql/datas.xml</src>
      </configuration>
    </execution>
  </executions>
</plugin>

コメントを投稿