Hi again,

First off, thanks Matt for the instant reply. I got sql-maven-plugin working
with the help of this 
http://svn.codehaus.org/mojo/trunk/mojo/dbunit-maven-plugin/src/example/pom.xml
pom  (the Mojo's example wasn't working out for me). 

Here's my pom plugin snippet:
<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>sql-maven-plugin</artifactId>
        <dependencies>
                <dependency>
                        <groupId>${jdbc.groupId}</groupId>
                        <artifactId>${jdbc.artifactId}</artifactId>
                        <version>${jdbc.version}</version>
                </dependency>
        </dependencies>
        <configuration>
                <driver>${jdbc.driverClassName}</driver>
                <url>${jdbc.url}</url>
                <username>${jdbc.username}</username>
                <password>${jdbc.password}</password>
                <autocommit>true</autocommit>
                <skip>${maven.test.skip}</skip>
                <srcFiles>
                        <srcFile>src/test/resources/sample-data.sql</srcFile>
                </srcFiles>
        </configuration>
        <executions>
                <execution>
                        <id>create-data</id>
                        <phase>test-compile</phase>
                        <goals>
                                <goal>execute</goal>
                        </goals>
                </execution>
        </executions>
</plugin>

Cheers,
Eric
=)




mraible wrote:
> 
> If DbUnit is working for you, you could use the sql-maven-plugin and
> .sql files to prepopulate the database. The advantage of DbUnit is its
> Java API and the fact that its database agnostic. However, it's
> unlikely you'll need to support many databases and Spring's
> JdbcTemplate is just as good as DbUnit's Java API IMO.
> 
> Matt
> 
> 
> 
> -- 
> http://raibledesigns.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Populating-Database-and-DAO-Testing-tf4264560s2369.html#a12218936
Sent from the AppFuse - User mailing list archive at Nabble.com.

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

Reply via email to