I have the following configuration for populating my database with the
dbunit-maven-plugin:

            <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>
                        <phase>test-compile</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>

While the "test-compile" phase seems like the best place to do this, it
still gets executed when running "mvn -Dmaven.test.skip=true".  Is there a
phase that'll work better i.e. test-pre-execute or something.  

I'd also like to skip integration tests when -Dmaven.test.skip=true, but it
still seems to execute them.  Is there another flag I can pass in to skip
them? Or is using profiles the best way to enable/disable integration tests?

Thanks,

Matt
-- 
View this message in context: 
http://www.nabble.com/Executing-plugins-before-tests-execute-tf2847567s177.html#a7952370
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to