gradle Liquibase:generateChangeLog -升级到hsqldb 4.20后未创建输出

6qftjkof  于 2023-05-18  发布在  其他
关注(0)|答案(1)|浏览(163)

从liquibase 4.19.1升级到任何更新版本后,我的gradle任务不再生成任何更改日志文件。出于测试目的,我只创建了一个简单的数据库,其中包含一个表和两个列。
使用liquibase 4.19.1、4.20.0、4.21.1进行测试
HSQLDB版本2.7.1日志没有帮助,因为任务已成功执行…

task createPlainChangeLog(type: JavaExec) {
    main = 'liquibase.integration.commandline.Main'
    args = [
            '--url', "jdbc:hsqldb:file:./db/db",
            '--driver', "org.hsqldb.jdbcDriver",
            '--username', "xx",
            '--password', "xx",
            '--changeLogFile', "changelog.xml",
            'generateChangeLog'
    ]
    classpath = configurations.changelog
}

使用liquibase 4.19.1生成以下输出

<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
    <changeSet author="User (generated)" id="1683714327687-1">
        <createTable tableName="USERLIST">
            <column name="USERNAME" type="VARCHAR(255)">
                <constraints nullable="false" primaryKey="true" primaryKeyName="SYS_PK_10093"/>
            </column>
            <column name="CREDENTIALS" type="VARCHAR(255)"/>
        </createTable>
    </changeSet>
</databaseChangeLog>

不创建错误报告或类似报告。使用loglevel all记录输出:

[2023-05-10 12:27:56] FINE [liquibase.configuration] No configuration value for liquibase.showBanner found
[2023-05-10 12:27:56] FINE [liquibase.configuration] Configuration liquibase.showBanner is using the default value of true
[2023-05-10 12:27:56] INFO [liquibase.ui] ####################################################
##   _     _             _ _                      ##
##  | |   (_)           (_) |                     ##
##  | |    _  __ _ _   _ _| |__   __ _ ___  ___   ##
##  | |   | |/ _` | | | | | '_ \ / _` / __|/ _ \  ##
##  | |___| | (_| | |_| | | |_) | (_| \__ \  __/  ##
##  \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___|  ##
##              | |                               ##
##              |_|                               ##
##                                                ## 
##  Get documentation at docs.liquibase.com       ##
##  Get certified courses at learn.liquibase.com  ## 
##  Free schema change activity reports at        ##
##      https://hub.liquibase.com                 ##
##                                                ##
####################################################
Starte Liquibase am 12:27:56 (Version 4.21.1 #9070, kompiliert am 2023-04-13 20:56+0000)
[2023-05-10 12:27:56] FINE [liquibase.configuration] No configuration value for liquibase.shouldRun aka should.run found
[2023-05-10 12:27:56] FINE [liquibase.configuration] Configuration liquibase.shouldRun is using the default value of true
[2023-05-10 12:27:56] FINE [liquibase.resource] Creating resourceAccessor for directory C:\tmp\changelog
[2023-05-10 12:27:56] FINE [liquibase.configuration] No configuration value for liquibase.hub.url found
[2023-05-10 12:27:56] FINE [liquibase.configuration] Configuration liquibase.hub.url is using the default value of https://hub.liquibase.com
[2023-05-10 12:27:56] FINE [liquibase.integration] Liquibase Hub URL:      https://hub.liquibase.com
[2023-05-10 12:27:56] FINE [liquibase.configuration] No configuration value for liquibase.hub.mode found
[2023-05-10 12:27:56] FINE [liquibase.configuration] Configuration liquibase.hub.mode is using the default value of ALL
[2023-05-10 12:27:56] FINE [liquibase.integration] Liquibase Hub Mode:     ALL
[2023-05-10 12:27:56] FINE [liquibase.resource] Creating resourceAccessor for directory C:\tmp\changelog
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.CalculateChecksumCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ChangelogSyncCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ChangelogSyncSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ChangelogSyncToTagCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ChangelogSyncToTagSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ClearChecksumsCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.DbDocCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.DeactivateChangelogCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.DiffChangelogCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.DiffCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.DropAllCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ExecuteSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.FutureRollbackCountSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.FutureRollbackFromTagSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.FutureRollbackSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.GenerateChangelogCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.HistoryCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.InternalDropAllCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.InternalExecuteSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.InternalHistoryCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.InternalSnapshotCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.InternalSyncHubCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ListLocksCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.MarkNextChangesetRanCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.MarkNextChangesetRanSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RegisterChangelogCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ReleaseLocksCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RollbackCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RollbackCountCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RollbackCountSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RollbackSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RollbackToDateCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RollbackToDateSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.SnapshotCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.SnapshotReferenceCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.StartH2CommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.StatusCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.SyncHubCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.TagCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.TagExistsCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UnexpectedChangesetsCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateCountCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateCountSqlCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateSqlCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateTestingRollbackCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateToTagCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateToTagSqlCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ValidateCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.ChangeExecListenerCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.DatabaseChangelogCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.DbUrlConnectionCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.DiffOutputControlCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.LockServiceCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.OutputWriterCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.PreCompareCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.ReferenceDbUrlConnectionCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.ShowSummaryArgument
[2023-05-10 12:27:57] INFO [liquibase.ui] Liquibase: Der Befehl 'generateChangeLog' wurde erfolgreich ausgeführt.

有什么想法吗

7eumitmz

7eumitmz1#

将调用替换为:

liquibase.integration.commandline.Main

新的class:

liquibase.integration.commandline.LiquibaseCommandLine

相关问题