plancys
plancys

Reputation: 3923

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. 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. 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.

Is this possible? Any ideas? Workarounds?

Upvotes: 1

Views: 272

Answers (1)

plancys
plancys

Reputation: 3923

I've finally found it...

link to documentation

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>

Upvotes: 1

Related Questions