Specifying ResourceAccessor from command line?

What is the best way to specify a ResourceAccessor to use during command line execution?

I see that CommandLineResourceAccessor is the one that is used by default.  Do I simply follow the (slightly arcane; why not use java.util.ServiceLoader instead?) Liquibase extension methodology?  Will the command line pick up my ResourceAccessor if it has a super-high getPriority()?

Best,
Laird

No, the resource accessors do not follow the extension methodology because each way of running liquibase needs a different collection and combination of accessors.  The accessor to use is passed into the initial liquibase object creation and is hard-coded into each execution method. 

What are you wanting to do that the standard ComandLineResourceAccessor does not do?

Nathan

Given a group ID, an artifact ID, a version and an optional classifier, resolve a changelog from a Maven repository.  Not quite a URLResourceAccessor, not quite a ClasspathResourceAccessor.

Best,
Laird

Makes sense, seems handy.

To support that, you’ll have to modify the liquibase.integration.commandline.Main class and create your own ResourceAccessor.  The reason you’d have to modify Main is because it doesn’t support a createResourceAccessor() type method that can be overloaded.  If you wanted to modify Main to allow overriding that and sent a patch, I would add it into trunk.

Nathan