Search code examples
spring-bootjhipsterliquibase

how disable liquibase in jhipster 7.7.0


I'd like to know how can I temporarily disable Liquibase in JHipster 7.7.0 there is a similar question here I tried this suggested solution but it shows this error

org.springframework.boot.context.config.InvalidConfigDataPropertyException: Property 'spring.profiles.include' imported from location 'class path resource [config/application-dev.yml]' is invalid in a profile specific resource [origin: class path resource [config/application-dev.yml] - 43:14]

EDIT

I want to disable it because everytime I run mvnw I got this message and it takes minutes before the app get started on my localhost

2022-05-12 22:49:44.878 DEBUG 13536 --- [ restartedMain] m.p.g.config.LiquibaseConfiguration : Configuring Liquibase 2022-05-12 22:49:45.380 WARN 13536 --- [on-rd-vs-task-1] t.j.c.liquibase.AsyncSpringLiquibase : Starting Liquibase asynchronously, your database might not be ready at startup!

Thank you in advance


Solution

  • Maven project

    In order to disable Liquibase in Maven-based project, you need to edit pom.xml file and add the new profile in the profiles node.

    ...
      <profile>
          <id>no-liquibase</id>
          <properties>
              <profile.no-liquibase>,no-liquibase</profile.no-liquibase>
          </properties>
      </profile>
     ...
    

    pom.xml If you’re using IntelliJ IDEA you can do it conveniently using Maven menu and Profiles group as well.

    source: https://blog.mestwin.net/how-to-disable-liquibase-in-your-jhipster-project


    Another option is to run your application like that ./mvnw -Pdev,no-liquibase

    source: https://www.jhipster.tech/profiles/#spring-profiles-switches