Uploaded image for project: 'Liquibase Core'
  1. CORE-3378

Cannot load changelog parameters via properties when using maven

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: 3.6.2
    • Fix versions: None
    • Components: Maven
    • Environment:

      ???

    • Sprint:

      Description

      I am trying to load changelog parameters via a properties file as described in the documentation.
      I am using maven to run liquibase (goals update / updateSQL), but I get always the same result:

      • maven shows a warning in the beginning: `'parameter.indexTablespace' in properties file is not being used by this task.`
      • the parameter is not initialized and `updateSQL` produces output having the parameters not interpolated

      Command:
      ` mvn liquibase:updateSQL`

      Configuration:

      pom.xml

          <properties>
              <liquibase.propertyFile>src/main/env/dev.properties</liquibase.propertyFile>
              <liquibase.changeLogFile>src/main/resources/db/changelog/master-changelog.xml</liquibase.changeLogFile>
              <liquibase.verbose>false</liquibase.verbose>
          </properties>
      ...
              <pluginManagement>
                  <plugins>
                      <plugin>
                          <groupId>org.liquibase</groupId>
                          <artifactId>liquibase-maven-plugin</artifactId>
                          <version>3.6.2</version>
                      </plugin>
                  </plugins>
              </pluginManagement>
      

      Properties:

      parameter.indexTablespace=MYAPPINDEX
      

      Changelog:

      ...
          <changeSet author="bartacek" id="index-domain">
              <createIndex indexName="UX_MYDOMAIN_EXTID" tableName="MYUSER" unique="true" tablespace="${indexTablespace}">
                  <column name="DOMAINID"/>
                  <column name="EXTERNAL_ID"/>
              </createIndex>
          </changeSet>
      ...
      

      Result:

      CREATE UNIQUE INDEX UX_MYUSER_DOMAIN_EXTID ON MYUSER(DOMAINID, EXTERNAL_ID) TABLESPACE ${indexTablespace};
      

      Expected result:

      CREATE UNIQUE INDEX UX_MYUSER_DOMAIN_EXTID ON MYUSER(DOMAINID, EXTERNAL_ID) TABLESPACE MYAPPINDEX;
      

        Attachments

          Activity

            People

            • Reporter:
              vbartacek Vaclav Bartacek
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: