Skip to content

Instantly share code, notes, and snippets.

@jogaco
Last active May 21, 2017 17:30
Show Gist options
  • Save jogaco/6799b73199c0b630b4227bec99eeeffa to your computer and use it in GitHub Desktop.
Save jogaco/6799b73199c0b630b4227bec99eeeffa to your computer and use it in GitHub Desktop.
Spring Boot Tutorial: Adding dbunit-maven-plugin
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>dbunit-maven-plugin</artifactId>
<version>1.0-beta-3</version>
<configuration>
<dataTypeFactoryName>${dbunit.dataTypeFactoryName}</dataTypeFactoryName>
<driver>${jdbc.driverClassName}</driver>
<username>${jdbc.username}</username>
<password>${jdbc.password}</password>
<url>${jdbc.url}</url>
<src>src/test/resources/sample-data.xml</src>
<type>${dbunit.operation.type}</type>
<schema>${dbunit.schema}</schema>
<skip>${skipTests}</skip>
<transaction>true</transaction>
<type>CLEAN_INSERT</type>
</configuration>
<executions>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>operation</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>${jdbc.groupId}</groupId>
<artifactId>${jdbc.artifactId}</artifactId>
<version>${jdbc.version}</version>
</dependency>
</dependencies>
</plugin>
...
<properties>
...
<dbunit.dataTypeFactoryName>org.dbunit.ext.mysql.MySqlDataTypeFactory</dbunit.dataTypeFactoryName>
<jdbc.groupId>mysql</jdbc.groupId>
<jdbc.artifactId>mysql-connector-java</jdbc.artifactId>
<jdbc.version>5.1.35</jdbc.version>
</properties>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment