当 gradlew 运行 flywayRepair 或 flywayMigrate 时,无论成功或失败,返回状态始终为 0(零):
./gradlew --quiet -Pflyway.initOnMigrate=true -Pflyway.url=jdbc:mysql://localhost:3306/mars flywayRepair
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':common:flywayRepair'.
> Error occurred while executing flywayRepair
Unable to obtain Jdbc connection from DataSource (jdbc:mysql://localhost:3306/mars) for user 'flyaway'
Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Connection refused
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Exit status from flywayRepair for mars is 0