no problems rick.  i was hoping that some useful plugins can be
released... e.g. dbunit, hibernate3... but in the mean time, the only
way i know of executing them are through ant tasks like that.

ray,

On 6/27/06, Rick <[EMAIL PROTECTED]> wrote:
Thanks Ray. I found out the DBUnit Maven plugin is not done yet. This will
come in handy.



-----Original Message-----
From: Ray Tsang [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 27, 2006 2:16 PM
To: Maven Users List
Subject: Re: Does anyone know how to use the maven DBUnit plugin?

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]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to