简体   繁体   English

如何强制sql-maven-plugin忽略failling sqls

[英]How to force sql-maven-plugin to ignore failling sqls

I have a build which copies schema from test environment (creates sqls) and executes (using sql-maven-plugin) those sql on local-database. 我有一个构建,它从测试环境中复制模式(创建sqls)并在本地数据库上执行(使用sql-maven-plugin)那些sql。 The problem is some views, stored procedures are broken on test environment. 问题是某些视图,存储过程在测试环境中被破坏。 I need to ignore broken sqls (with wrong views etc) and carry on the build. 我需要忽略损坏的SQL(具有错误的视图等)并继续构建。 I need to do this dynamically meaning eg we have sqls A,B,C and A sql is broken, I don't want to fail whole build but add some waring and executes next sqls B, C.. till the end. 我需要动态地做这个意思,例如我们有sqls A,B,C和一个sql被打破,我不想失败整个构建但是添加一些waring并执行下一个sqls B,C ..直到最后。

Is this possible? 这可能吗? Any ideas? 有任何想法吗? Workarounds? 解决方法?

I've finally found it... 我终于找到了...

link to documentation 链接到文档

onError: onerror的:

Action to perform if an error is found. Possible values are abort and continue.
Type: java.lang.String
Since: 1.0
Required: No
Expression: ${onError}
Default: abort

I added to config: 我添加到配置:

<configuration>
   (...)
   <onError>continue</onError>
</configuration>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM