我有几个包含多个 sql 文件的目录。如何配置 maven 以运行目录中的所有 sql 文件。我目前的配置是这样的:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<version>${sql-maven-plugin.version}</version>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector.version}</version>
</dependency>
</dependencies>
<configuration>
<driver>${mysql.jdbc.driver.class.name}</driver>
<url>${mysql.jdbc.url}</url>
<username>${mysql.jdbc.username}</username>
<password>${mysql.jdbc.password}</password>
</configuration>
<executions>
<execution>
<id>create-schema</id>
<phase>install</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<skip>${mysql.db.skip}</skip>
<autocommit>true</autocommit>
<srcFiles>
<srcFile>src/main/resources/directory1/file1.sql</srcFile>
<srcFile>src/main/resources/directory1/file2.sql</srcFile>
<srcFile>src/main/resources/directory2/file1.sql</srcFile>
<srcFile>src/main/resources/directory2/file2.sql</srcFile>
</srcFiles>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
每个目录中有很多文件。
如何使用目录而不是列出每个文件?