[
http://jira.codehaus.org/browse/MDBUNIT-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=198727#action_198727
]
Nik Everett commented on MDBUNIT-1:
-----------------------------------
I had this problem and solved it by adding <format>flat</format> to my
configuration. It turns out I'm not using the xml format. I'm using the flat
format. Who knew? It looks like if you use the xml format instead it will
silently decide that you don't have any data and do nothing.
> maven2-dbunit-plugin does not work
> ----------------------------------
>
> Key: MDBUNIT-1
> URL: http://jira.codehaus.org/browse/MDBUNIT-1
> Project: Maven DbUnit Plugin
> Issue Type: Bug
> Environment: maven2, dbunit2.2, mysql, netbeans, ant
> Reporter: nilo de roock
> Assignee: David J. M. Karlsen
> Priority: Critical
> Fix For: 1.0
>
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> In my environment this works fine in Ant.
> <target name="resetdata">
> <taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask"/>
> <dbunit driver="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost/phonebook"
> userid="user"
> password="password">
> <classpath>
> <pathelement
> location="lib/mysql-connector-java-3.1.13-bin.jar"/>
> </classpath>
> <operation type="CLEAN_INSERT" src="insert.xml"/>
> </dbunit>
> </target>
> The following pom.xml works but does nothing in mysql ( first relevant
> snippet, complete pom after that ):
> SNIPPET>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>dbunit-maven-plugin</artifactId>
> <!--jar file that has the jdbc driver -->
> <dependencies>
> <dependency>
> <groupId>mysql</groupId>
> <artifactId>mysql-connector-java</artifactId>
> <version>5.0.4</version>
> </dependency>
> </dependencies>
> <!-- common configurations -->
> <configuration>
> <driver>com.mysql.jdbc.Driver</driver>
> <url>jdbc:mysql://localhost/phonebook</url>
> <username>root</username>
> <password>root</password>
> </configuration>
> <executions>
> <execution>
> <phase>compile</phase>
> <goals>
> <goal>operation</goal>
> </goals>
> <!-- specific configurations -->
> <configuration>
> <type>CLEAN_INSERT</type>
> <src>insert.xml</src>
> <format>xml</format>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> COMPLETE>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>wicket-stuff</groupId>
> <artifactId>wicket-phonebook</artifactId>
> <packaging>war</packaging>
> <version>1.2</version>
> <name>Wicket Phonebook Example</name>
> <description>Wicket Phonebook Example - Spring & [Hibernate|iBATIS]
> CrUD app</description>
> <url>http://wicket.sourceforge.net/</url>
> <inceptionYear>2005</inceptionYear>
>
> <repositories>
> <repository>
> <id>wicket-repo</id>
> <name>wicket-repo</name>
> <url>http://wicketframework.org/maven2</url>
> </repository>
> </repositories>
>
> <dependencies>
> <dependency>
> <groupId>org.apache.wicket</groupId>
> <artifactId>wicket</artifactId>
> <version>1.3-incubating-SNAPSHOT</version>
> <type>jar</type>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <groupId>org.apache.wicket</groupId>
> <artifactId>wicket-extensions</artifactId>
> <version>1.3-incubating-SNAPSHOT</version>
> <type>jar</type>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <groupId>org.apache.wicket</groupId>
> <artifactId>wicket-spring</artifactId>
> <version>1.3-incubating-SNAPSHOT</version>
> <type>jar</type>
> <scope>compile</scope>
> <exclusions>
> <exclusion>
> <groupId>cglib</groupId>
> <artifactId>cglib-nodep</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> <dependency>
> <groupId>org.apache.wicket</groupId>
> <artifactId>wicket-spring-annot</artifactId>
> <version>1.3-incubating-SNAPSHOT</version>
> <type>jar</type>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring</artifactId>
> <version>2.0.1</version>
> </dependency>
> <dependency>
> <groupId>org.hibernate</groupId>
> <artifactId>hibernate</artifactId>
> <version>3.2.0.ga</version>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <groupId>com.ibatis</groupId>
> <artifactId>ibatis2-sqlmap</artifactId>
> <version>2.1.7.597</version>
> </dependency>
> <dependency>
> <groupId>mysql</groupId>
> <artifactId>mysql-connector-java</artifactId>
> <version>5.0.4</version>
> </dependency>
> <dependency>
> <groupId>commons-dbcp</groupId>
> <artifactId>commons-dbcp</artifactId>
> <version>1.2.1</version>
> </dependency>
> <dependency>
> <groupId>org.mortbay.jetty</groupId>
> <artifactId>jetty</artifactId>
> <version>6.0.1</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>net.sf.shadesdb</groupId>
> <artifactId>shades</artifactId>
> <version>0.0.5</version>
> </dependency>
> <dependency>
> <groupId>org.mortbay.jetty</groupId>
> <artifactId>jetty</artifactId>
> <version>6.0.0beta17</version>
> <scope>compile</scope>
> </dependency>
>
> <dependency>
> <groupId>net.sourceforge.jwebunit</groupId>
> <artifactId>jwebunit-htmlunit-plugin</artifactId>
> <version>1.3</version>
> <scope>test</scope>
> </dependency>
> </dependencies>
>
> <build>
> <sourceDirectory>src/java</sourceDirectory>
> <testSourceDirectory>src/test</testSourceDirectory>
>
> <resources>
> <resource>
> <directory>src/conf</directory>
> <includes>
> <include>**/*</include>
> </includes>
> </resource>
> <resource>
> <directory>src/java</directory>
> <includes>
> <include>**/*</include>
> </includes>
> <!--
> Just for a demo project, don't exclude sources...
> <excludes>
> <exclude>**/*.java</exclude>
> </excludes>
> -->
> </resource>
> </resources>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-assembly-plugin</artifactId>
> <configuration>
> <descriptor>src/assembly/bin.xml</descriptor>
> <finalName>${artifactId}-${version}</finalName>
> <outputDirectory>target/distributions</outputDirectory>
> <workDirectory>target/assembly/work</workDirectory>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <warSourceDirectory>src/webapp</warSourceDirectory>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> <configuration>
> <minmemory>128m</minmemory>
> <maxmemory>256m</maxmemory>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-site-plugin</artifactId>
> <configuration>
>
> <templateDirectory>${basedir}/src/site/template/</templateDirectory>
> <template>wicket-site.vm</template>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <includes>
> <include>**/*Test.java</include>
> </includes>
> <testFailureIgnore>true</testFailureIgnore>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>surefire-report-maven-plugin</artifactId>
> </plugin>
> <plugin>
> <groupId>org.mortbay.jetty</groupId>
> <artifactId>maven-jetty6-plugin</artifactId>
> <version>6.0.0beta16</version>
> <configuration>
> <webAppSourceDirectory>src/webapp</webAppSourceDirectory>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>dbunit-maven-plugin</artifactId>
> <!--jar file that has the jdbc driver -->
> <dependencies>
> <dependency>
> <groupId>mysql</groupId>
> <artifactId>mysql-connector-java</artifactId>
> <version>5.0.4</version>
> </dependency>
> </dependencies>
> <!-- common configurations -->
> <configuration>
> <driver>com.mysql.jdbc.Driver</driver>
> <url>jdbc:mysql://localhost/phonebook</url>
> <username>root</username>
> <password>root</password>
> </configuration>
> <executions>
> <execution>
> <phase>compile</phase>
> <goals>
> <goal>operation</goal>
> </goals>
> <!-- specific configurations -->
> <configuration>
> <type>CLEAN_INSERT</type>
> <src>insert.xml</src>
> <format>xml</format>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
>
> <reporting>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-project-info-reports-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>dependencies</report>
> <report>project-team</report>
> <report>mailing-list</report>
> <report>issue-tracking</report>
> <report>license</report>
> <report>scm</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>surefire-report-maven-plugin</artifactId>
> </plugin>
> </plugins>
> </reporting>
>
> <distributionManagement>
> <site>
> <id>wicket-stuff-site</id>
>
> <url>scpexe://shell.sourceforge.net/home/groups/w/wi/wicket-stuff/htdocs/wicket-phonebook</url>
> </site>
> </distributionManagement>
> </project>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email