Question

I have Eclipse (Spring Tool Suite, latest version) with the liquibase plugin installed.

What I want to do is generate a first change log from my existing database, which is this code form the command line, I understand.

liquibase --driver=oracle.jdbc.OracleDriver \
      --classpath=\path\to\classes:jdbcdriver.jar \
      --changeLogFile=com/example/db.changelog.xml \
      --url="jdbc:oracle:thin:@localhost:1521:XE" \
      --username=scott \
      --password=tiger \
      generateChangeLog

But I cant see any sign of Liquibase functions in Eclipse.

How do you run Liquibase from within Eclipse? I am hope it will be easier, not having to find driver paths, etc

I am doing this as I want to try Jhipster, and it need a Liquibase change log (cant find an example of someone do that either, in case you know of one!)

Was it helpful?

Solution

There is no built-in liquibase functions in eclipse. If you are trying to run a Liquibase often from within Eclipse the best option is to use the Ant or Maven interface since they can be easily called from Eclipse commands.

GenerateChangeLog is something you generally only need to run once to bootstrap an existing database into being managed by liquibase, so a quick command line call may be the easiest for you.

The Liquibase Quick Start Guide has an example changelog file for reference as well.

OTHER TIPS

You can install Liquibase Plugin from Windows Menu > Market place.
further information: https://marketplace.eclipse.org/content/liquibase-eclipse-plugin

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top