You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by mraible <ma...@raibledesigns.com> on 2006/11/01 16:42:26 UTC

dbunit plugin - how to consolidate and not run when skipping tests

I have the following configuration for the dbunit plugin:

 <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>dbunit-maven-plugin</artifactId>
                <version>1.0-SNAPSHOT</version>
                <configuration>
                    <driver>${jdbc.driverClassName}</driver>
                    <username>${jdbc.username}</username>
                    <password>${jdbc.password}</password>
                    <url>${jdbc.url}</url>
                   
<sourceData>${basedir}/src/test/data/sample-data.xml</sourceData>
                    <sourceDataFormat>xml</sourceDataFormat>
                </configuration>
                <executions>
                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>clean-insert</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>pre-integration-test</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>clean-insert</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>${jdbc.groupId}</groupId>
                        <artifactId>${jdbc.artifactId}</artifactId>
                        <version>${jdbc.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

I'm using this in several poms in my application.  Is it possible to
consolidate this so it only resides in one location?  I'm guessing I can put
it into a top-level pom? If I do that, where should my sample-data.xml
reside so all child modules can see it?

Also, what phase should I use (instead of test-compile) so clean-insert is
skipped when maven.test.skip=true?

Thanks,

Matt
-- 
http://raibledesigns.com

-- 
View this message in context: http://www.nabble.com/dbunit-plugin---how-to-consolidate-and-not-run-when-skipping-tests-tf2553978s177.html#a7116451
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: dbunit plugin - how to consolidate and not run when skipping tests

Posted by Dan Tran <da...@gmail.com>.
dbunit plugin source was checked in sometimes ago to the mojo sanbox, but i
beleive no one is working on it  and no snapshot is ever deployed.

-D


On 11/3/06, Thomas Van de Velde <th...@gmail.com> wrote:
>
> Matt,
>
> Where is this dbunit hosted?  I couldn't find it under
>
> http://snapshots.repository.codehaus.org/
>
> Cheers,
> Thomas
>
>
> On 11/1/06, mraible <ma...@raibledesigns.com> wrote:
> >
> >
> > I have the following configuration for the dbunit plugin:
> >
> > <plugins>
> >            <plugin>
> >                <groupId>org.codehaus.mojo</groupId>
> >                <artifactId>dbunit-maven-plugin</artifactId>
> >                <version>1.0-SNAPSHOT</version>
> >                <configuration>
> >                    <driver>${jdbc.driverClassName}</driver>
> >                    <username>${jdbc.username}</username>
> >                    <password>${jdbc.password}</password>
> >                    <url>${jdbc.url}</url>
> >
> > <sourceData>${basedir}/src/test/data/sample-data.xml</sourceData>
> >                    <sourceDataFormat>xml</sourceDataFormat>
> >                </configuration>
> >                <executions>
> >                    <execution>
> >                        <id>test-compile</id>
> >                        <phase>test-compile</phase>
> >                        <goals>
> >                            <goal>clean-insert</goal>
> >                        </goals>
> >                    </execution>
> >                    <execution>
> >                        <id>pre-integration-test</id>
> >                        <phase>pre-integration-test</phase>
> >                        <goals>
> >                            <goal>clean-insert</goal>
> >                        </goals>
> >                    </execution>
> >                </executions>
> >                <dependencies>
> >                    <dependency>
> >                        <groupId>${jdbc.groupId}</groupId>
> >                        <artifactId>${jdbc.artifactId}</artifactId>
> >                        <version>${jdbc.version}</version>
> >                    </dependency>
> >                </dependencies>
> >            </plugin>
> >
> > I'm using this in several poms in my application.  Is it possible to
> > consolidate this so it only resides in one location?  I'm guessing I can
> > put
> > it into a top-level pom? If I do that, where should my sample-data.xml
> > reside so all child modules can see it?
> >
> > Also, what phase should I use (instead of test-compile) so clean-insert
> is
> > skipped when maven.test.skip=true?
> >
> > Thanks,
> >
> > Matt
> > --
> > http://raibledesigns.com
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/dbunit-plugin---how-to-consolidate-and-not-run-when-skipping-tests-tf2553978s177.html#a7116451
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>

Re: dbunit plugin - how to consolidate and not run when skipping tests

Posted by mraible <ma...@raibledesigns.com>.
We've compiled it and deployed it to the the AppFuse repo:

http://static.appfuse.org/repository/

We hope to figure out a way to get it released before we release AppFuse 2.0
final.  We're more than happy to contribute to the plugin.  AFAIK, Brian
Topping built the plugin when we converted an Ant-based AppFuse project to
Maven 2.

Matt


thomasvdv wrote:
> 
> Matt,
> 
> Where is this dbunit hosted?  I couldn't find it under
> 
> http://snapshots.repository.codehaus.org/
> 
> Cheers,
> Thomas
> 
> 
> On 11/1/06, mraible <ma...@raibledesigns.com> wrote:
>>
>>
>> I have the following configuration for the dbunit plugin:
>>
>> <plugins>
>>            <plugin>
>>                <groupId>org.codehaus.mojo</groupId>
>>                <artifactId>dbunit-maven-plugin</artifactId>
>>                <version>1.0-SNAPSHOT</version>
>>                <configuration>
>>                    <driver>${jdbc.driverClassName}</driver>
>>                    <username>${jdbc.username}</username>
>>                    <password>${jdbc.password}</password>
>>                    <url>${jdbc.url}</url>
>>
>> <sourceData>${basedir}/src/test/data/sample-data.xml</sourceData>
>>                    <sourceDataFormat>xml</sourceDataFormat>
>>                </configuration>
>>                <executions>
>>                    <execution>
>>                        <id>test-compile</id>
>>                        <phase>test-compile</phase>
>>                        <goals>
>>                            <goal>clean-insert</goal>
>>                        </goals>
>>                    </execution>
>>                    <execution>
>>                        <id>pre-integration-test</id>
>>                        <phase>pre-integration-test</phase>
>>                        <goals>
>>                            <goal>clean-insert</goal>
>>                        </goals>
>>                    </execution>
>>                </executions>
>>                <dependencies>
>>                    <dependency>
>>                        <groupId>${jdbc.groupId}</groupId>
>>                        <artifactId>${jdbc.artifactId}</artifactId>
>>                        <version>${jdbc.version}</version>
>>                    </dependency>
>>                </dependencies>
>>            </plugin>
>>
>> I'm using this in several poms in my application.  Is it possible to
>> consolidate this so it only resides in one location?  I'm guessing I can
>> put
>> it into a top-level pom? If I do that, where should my sample-data.xml
>> reside so all child modules can see it?
>>
>> Also, what phase should I use (instead of test-compile) so clean-insert
>> is
>> skipped when maven.test.skip=true?
>>
>> Thanks,
>>
>> Matt
>> --
>> http://raibledesigns.com
>>
>> --
>> View this message in context:
>> http://www.nabble.com/dbunit-plugin---how-to-consolidate-and-not-run-when-skipping-tests-tf2553978s177.html#a7116451
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/dbunit-plugin---how-to-consolidate-and-not-run-when-skipping-tests-tf2553978s177.html#a7169427
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: dbunit plugin - how to consolidate and not run when skipping tests

Posted by Thomas Van de Velde <th...@gmail.com>.
Matt,

Where is this dbunit hosted?  I couldn't find it under

http://snapshots.repository.codehaus.org/

Cheers,
Thomas


On 11/1/06, mraible <ma...@raibledesigns.com> wrote:
>
>
> I have the following configuration for the dbunit plugin:
>
> <plugins>
>            <plugin>
>                <groupId>org.codehaus.mojo</groupId>
>                <artifactId>dbunit-maven-plugin</artifactId>
>                <version>1.0-SNAPSHOT</version>
>                <configuration>
>                    <driver>${jdbc.driverClassName}</driver>
>                    <username>${jdbc.username}</username>
>                    <password>${jdbc.password}</password>
>                    <url>${jdbc.url}</url>
>
> <sourceData>${basedir}/src/test/data/sample-data.xml</sourceData>
>                    <sourceDataFormat>xml</sourceDataFormat>
>                </configuration>
>                <executions>
>                    <execution>
>                        <id>test-compile</id>
>                        <phase>test-compile</phase>
>                        <goals>
>                            <goal>clean-insert</goal>
>                        </goals>
>                    </execution>
>                    <execution>
>                        <id>pre-integration-test</id>
>                        <phase>pre-integration-test</phase>
>                        <goals>
>                            <goal>clean-insert</goal>
>                        </goals>
>                    </execution>
>                </executions>
>                <dependencies>
>                    <dependency>
>                        <groupId>${jdbc.groupId}</groupId>
>                        <artifactId>${jdbc.artifactId}</artifactId>
>                        <version>${jdbc.version}</version>
>                    </dependency>
>                </dependencies>
>            </plugin>
>
> I'm using this in several poms in my application.  Is it possible to
> consolidate this so it only resides in one location?  I'm guessing I can
> put
> it into a top-level pom? If I do that, where should my sample-data.xml
> reside so all child modules can see it?
>
> Also, what phase should I use (instead of test-compile) so clean-insert is
> skipped when maven.test.skip=true?
>
> Thanks,
>
> Matt
> --
> http://raibledesigns.com
>
> --
> View this message in context:
> http://www.nabble.com/dbunit-plugin---how-to-consolidate-and-not-run-when-skipping-tests-tf2553978s177.html#a7116451
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>