每次运行“mvn test”时,如何让 maven 运行以下插件。
我不想每次运行时都发出“mvn sql:execute”
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<!-- JDBC Driver -->
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.0.5</version>
</dependency>
</dependencies>
<configuration>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://localhost:3306/jboss</url>
<username>xxx</username>
<password>xxxx</password>
<autocommit>true</autocommit>
<onError>continue</onError>
<srcFiles>
<srcFile>src/test/sql/removeuser.sql</srcFile>
</srcFiles>
</configuration>
</plugin>