我正在使用exec-maven-plugin
运行SQL脚本(简单DML),然后运行:
mvn clean install -Prunmysql
并且在执行期间我打开了SQL>
控制台,直到手动输入EXIT
才能继续。
如何让插件知道,执行后需要退出SQL控制台?
<profile>
<id>runmysql</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sqlplus</executable>
<arguments>
<argument>user/pwd@localhost:1521/dbname</argument>
<argument>@myfile.sql</argument>
</arguments>
<workingDirectory>C:\sqlproject\</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>