Anil Kumar C
Anil Kumar C

Reputation: 1624

maven sql plugin configuration to display query on execution

I have configured the maven-sql plugin to execute the insert and delete scripts for the integration testing.

The delete script is running for longer time from sql plugin. I ran the same script from the OracleSQLDeveloper and it took few seconds to execute. I want to know which sql query is running out of resources.

<!-- Maven SQL plugin to insert test data to DB. -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>sql-maven-plugin</artifactId>
                <version>1.3</version>

                <configuration>
                    // DB CONFIGS
                </configuration>
                <executions>
                    <execution>
                        <id>create-database-tables</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <autocommit>false</autocommit>
                            <onError>continue</onError>
                            <srcFiles>
                                <srcFile>sql/delete_data.sql</srcFile>
                                <srcFile>sql/load_data.sql</srcFile>
                            </srcFiles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Is there a configuration to display the running query in the console.

Upvotes: 1

Views: 2329

Answers (1)

Anil Kumar C
Anil Kumar C

Reputation: 1624

I tried many ways but no use. The only way is to run the build in debug mode As per .

Thanks @Andyb

Upvotes: 1

Related Questions