Here is a piece of plugin configuration:
<configuration>
<srcFiles>
<srcFile>src${file.separator}integration-test${file.separator}resources${file.separator}sql${file.separator}schema.sql</srcFile>
</srcFiles>
</configuration>
Everything works , but I see in log:
[INFO] --- sql-maven-plugin:1.5:execute (create-tables) @ smsfinance-server ---
[INFO] Executing file: C:\Users\User\AppData\Local\Temp\schema.915861870sql
Is there a way to disable copying?
No, this is not possible at the moment.
Reading from the source code of version 1.5, the SQL Maven Plugin is copying the sources files to a temporary directory to handle filtering, even when filtering is disabled. Filtering is enabled with the attribute enableFiltering
.
You could create an issue at their GitHub page to disable copying of the file when filtering is disabled (which is the default).
Workaround
For cases when sql files is placed on ssd disk, you can specify tmp dir on ssd - just add -Djava.io.tmpdir=/ssd-drive/tmp
to maven command line. It does not disable copying, but spead up sql execution process.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.