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
Rewrite Maven Integration to use Command Framework #3285
base: master
Are you sure you want to change the base?
Conversation
Marked this as a draft PR because it's very much a work in progress still and currently focused around "can it work" vs. "making it work". My biggest question to answer first was "Can maven support the dynamic goals/parameters/classes needed for our plugin-based command framework?" What I found so far is:
The new LiquibaseMojo class handles 1 above. For 2, I so far have liquibase/liquibase-sdk-maven-plugin#7 which will generate a plugin.xml file based on the command framework. I'm not super-happy about that setup but it works for now:
Assuming we need that static plugin.xml, we still need a way to handle the fact that we have extensions that add additional commands, global settings, and command arguments. All I can think of so far is having a more generic/unmanaged map of arguments in a single goal. Like calling
where commandArguments and globalSettings are just mapped in Maven to Maps and can be anything. Like how the Ant maven support works. But while that lets us do what we want, it's not user friendly because you loose all the goal help and intellisense. So I'm thinking we want to support both: have a generic And even for people using those pre-made goal configurations, I found we can get all the passed user parameters even if they aren't mapped to specific configurations, so with our ValueProvider support any extension command arguments and global settings can still be set via maven properties. What do people think on that compromise? |
For my second experiment, I created #3286 which will likely eventually merge into here. But keeping them separate discussions for now. This is just on the "generic maven wrapper" and the other is on the "generic integration code" |
Impact
Description
We introduced the command framework to be a consistent business logic layer across all the integrations. Same command names, same arguments for commands, same extensibility pipeline, etc. With the command framework, each integration should just be a thin layer translating the user request that is specific to that integration to the generic command calls.
We rewrote the CLI to use the command framework a while ago, this applies the same pattern to Maven.
Things to be aware of
Things to worry about