0

Is there a way for executing a maven liquibase project using its GAV and supply maven profile to be used in its pom and other arguments, something like:

mvn com.group:liquibase-db:8.0.3 -Plocal,create clean install -DdefaultSchemaName=myschema

I know the same can be executed by explicitly giving the path to the project's pom and it works fine.

mvn -f <path_to_liquibase-db_pom> -Plocal,create clean install -DdefaultSchemaName=myschema

But the thing is I need to run this command using project coordinates only. Is it even possible to do that?

Faiz Kidwai
  • 463
  • 5
  • 26
  • I don't think what you want to do is possible with maven. I think what you are trying to do is run maven with a non-local pom, and maven needs at least some sort of local pom to even get started (with the exception of something like the maven archetype plugin - https://maven.apache.org/guides/introduction/introduction-to-archetypes.html ) – SteveDonie Dec 16 '19 at 22:17
  • 1
    @SteveDonie: Instead of doing it like this, I used maven dependency plugin to copy liquibase, my liquibase project and DB driver jar into a target folder and then executed java -jar on the liquibase jar with my liquibase project jar and driver jar in classpath and supplied db details, etc. as command line arguments. – Faiz Kidwai Dec 17 '19 at 05:35

0 Answers0