Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Plugin reports success even if changesets fail #3
When a changeset fails for whatever reason, a stack trace is printed on the console, but Gradle reports a successful build. Aside from being an incorrect status, this can cause issues. For example, suppose you have a CI server set to build and test your project. If the "gradle update" fails, ther's no sense trying to run the project's tests, but that is currently what would happen because the Liquibase plugin didn't report a failure.
I think the heart of the matter is in Main.java around lines 136 and again about 20 lines later. In both cases, we're in a catch block where the exception is logged, then eaten. I think the exception should be thrown so that Gradle registers this as a failure. If we throw the exception out to Gradle, we might not need to log the exception, which would clean up the code even further. Even cleaner still, we could skip the whole try/catch thing altogether since we need to throw exceptions to get Gradle to report failure anyway.
What do you think?
PS: I would have taken a stab at fixing the issue and issuing a pull request, but version 0.7-SNAPSHOT always fails, reporting "could not find method changelogs() for arguments..." when I try to run it, and that error was beyond my limited Gradle expertise to fix.