-
Notifications
You must be signed in to change notification settings - Fork 60
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
liquibase-gradle-plugin should declare picocli as a transitive dependency #129
Comments
Your explanation of why Liquibase doesn't have picocli as a transitive dependency makes sense. Why bring it if you don't need it? The gradle plugin didn't bring picocli in as a transitive dependency for a similar reason. The plugin isn't tied to any particular version of Liquibase, and there is no need to bring in a dependency if you're not using a version of Liquibase that requires it. At this point, I think enough people have moved to a new enough version of Liquibase that it might make sense to just have it, but which version should it include? the plugin still doesn't know what version of LB you want, so it also doesn't know what version of picocli it depends on. |
I believe ideally the first move should be done on liquibase-core side:
Here is the issues that people already filed in support of these ideas:
If/when these changes done, the changes in I can think of few alternatives, but they require the maintenance of the |
The mention of another dependency in the documentation also surprised me. I would like to have it straight as a |
The challenge is that the liquibase-gradle-plugin doesn't know what version of Liquibase you want to use, so it also doesn't know what version of picocli it needs, or even if it is needed. Maintining mappings of Liquibase releases to the version of picocli needed means that I'd potentially need a new release of the plugin each time Liquibase had a new release - or at least whenever a new version of picocli was used. Less than ideal. |
But you are talking about versions where there is some BC break, right? It's still a much better solution than letting this effort to users, to be honest. |
@stevesaliman from the discussion here, I believe PR liquibase/liquibase#5042 that will be included in the next liquibase release and adds picocli as an optional dependency could help on that. |
@stevesaliman as per Florent closing comment on his own request (liquibase/liquibase#2751 (comment) ) , seems that replacing liquibase-core by liquibase-cli as a dependency resolves this. What do you think? |
The thought that comes to my mind is this: Does liquibase-cli include the classes from liquibase-core? The plugin doesn't necessarily need them, but the Groovy DSL will in order to parse groovy changes. But if the cli includes the core, that would be a good solution for the plugin. |
@stevesaliman liquibase-cli depends on liquibase-standard (that is core minus snowflake) . Pom is here: https://github.com/liquibase/liquibase/blob/master/liquibase-cli/pom.xml But I just noticed that we don't publish liquibase-cli to maven repo... so until that is changed it won't help :/ |
This issue is my reaction to the following note from README.md...
Liquibase supports multiple integration interfaces defined in liquibase-core.jar in liquibase.integration package:
I believe, developers of liquidate-core expected the consuming projects to define necessary dependencies for the integration type of consumer's choice, rather than providing them transitively. (e.g. I would be surprised to receive picocli, spring and servlet api from liquibase-core).
So I believe since liquibase-gradle-plugin has integration via commandline interface, it is on 'liquibase-gradle-plugin' to provide necessary dependencies (e.g. picocli) as transitive dependencies.
I would recommend to define picocli dependency in liquibaseRuntime on the plugin level, or adopt ant integration interface.
The text was updated successfully, but these errors were encountered: