Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix using liquibase in non root project and add some configuration properties #82

Closed
wants to merge 2 commits into from

Conversation

chomats
Copy link

@chomats chomats commented Jan 22, 2021

I add two properties in LiquibaseTask

  • useDefaultParentProperties allow to skip "inherit" the system properties from the Gradle JVM. by default is false
  • runList can override the project.liquibase.runList. It's optional property, the default value is ''

By default, the behavior is the same than before

@stevesaliman
Copy link
Collaborator

Thank you for your contribution.

I'd like to get a better understanding of the technical aspects of the problem. Does this solve a problem where the plugin is applied to a child project, or is it applied by the parent and configured by the child? How does adding 2 task properties solve the problem? How would the two new properties get set to a non-default value? Are there things that would be in build.gradle or the property files?

Thanks for any info.

@gzeskas
Copy link

gzeskas commented May 18, 2021

@stevesaliman I have the same problem with liquidbase-gradle-plugin applied in submodule. I tried changes purposed by @chomats and that fixed the problem.
For me it was enough to remove systemProperties System.properties this line to enable correct work with gradle submodule.

It would be nice merge this MR ot to solve multi-module project issue somehow another way, or maybe there is an example how to configure multi-module project ? And I'm just missing something ?

Plugin works perfectly with one single project, but after migration to multi-module structure I don't know how to configure it, without removing this one line: systemProperties System.properties

task luruTagLiquibase(type:org.liquibase.gradle.LiquibaseTask) {
    group="liquibase"
    workingDir = project.file('.')
    useDefaultParentProperties= false
    runList="principal"
    command = "tag"
    requiresValue = true
    value= project.ext.luruTagName
}

task luruRollbackLiquibase(type:org.liquibase.gradle.LiquibaseTask) {
    group="liquibase"
    workingDir = project.file('.')
    useDefaultParentProperties= false
    runList="principal"
    command = "rollback"
    requiresValue = true
    value= project.ext.luruTagName
}

task tagRollbackLiquibase(type:org.liquibase.gradle.LiquibaseTask) {
    group="liquibase"
    workingDir = project.file('.')
    useDefaultParentProperties= false
    runList="principal"
    command = "rollback"
    requiresValue = true
    value= project.rollbacktag
}
@MalloD12
Copy link

Hi @chomats,

Could you please resolve these merge conflicts? If this fix is still valid with the latest master changes.

Thanks,
Daniel.

@MalloD12 MalloD12 self-assigned this Sep 27, 2023
@MalloD12 MalloD12 self-requested a review September 27, 2023 21:03
@MalloD12
Copy link

Hi @chomats,

I'm moving this PR to our "In Discussion" project column. Feel free to update the existing merge conflicts when you have a chance so we can move forward with its review.

Thanks,
Daniel.

@chomats
Copy link
Author

chomats commented Oct 27, 2023 via email

@kevin-atx
Copy link

kevin-atx commented May 20, 2024

This PR is being closed at the creator's request.

@kevin-atx kevin-atx closed this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants