liquibase / liquibase-gradle-plugin

A Gradle plugin for Liquibase
Other
197 stars 57 forks source link

Gradle 6.4 problems #70

Closed bomgar closed 4 years ago

bomgar commented 4 years ago

Upgrading gradle to 6.4 causes build problems.

> Task :liquibaseUpdate FAILED                                                                                                                                                                                                                                
Caching disabled for task ':liquibaseUpdate' because:                                                                                                                                                                                                         
  Build cache is disabled                                                                                                      
Task ':liquibaseUpdate' is not up-to-date because:                                                                             
  Task has not declared any outputs despite executing actions.                                                                 
Excluding []                                                                                                                   
:liquibaseUpdate (Thread[Execution worker for ':' Thread 9,5,main]) completed. Took 0.033 secs.                                                                                                                                                               

FAILURE: Build failed with an exception.                                                                                                                                                                                                                      

* What went wrong:                                                                                                             
Execution failed for task ':liquibaseUpdate'.                                                                                  
> The value for task ':liquibaseUpdate' property 'mainClass' is final and cannot be changed any further.                

* Try:                                                                                                                                                                                                                                                        
Run with --debug option to get more log output. Run with --scan to get full insights.                                        

* Exception is:                                                                                                                                                                                                                                               
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':liquibaseUpdate'.                                                                                                                                                                    
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:207)                                                                                                                    
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)                                       
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:205)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:186)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:114)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57) 
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
bomgar commented 4 years ago

This might be connected: https://github.com/gradle/gradle/issues/12833

atapin commented 4 years ago

@bomgar did you have any success with it? Even though the gradle regressions is reported to be fixed in 6.4, it's still reproduced for me with liquibase plugin.

bomgar commented 4 years ago

The regression was introduced with 6.4. This plugins works fine with 6.3 Gradle changed something and this plugin is not compatible. Unfortunately I don't have a solution.

atapin commented 4 years ago

@bomgar yeah, thanks! 6.3 works fine

niktekusho commented 4 years ago

Just seen this error as well. The Gradle Lombok plugin solved this issue in the PR https://github.com/franzbecker/gradle-lombok/pull/77

Long story short: setMain in LiquibaseTask cannot be called during the run phase, but only in configuration time.

stevesaliman commented 4 years ago

Release 2.0.3 of the plugin is now out, with the fix for this issue.