我的Maven项目使用Liquibase插件来生成具有所有DDLS和DML的文本文件。它针对SQL Server执行这些数据库查询和脚本。
MVN运行仅在控制台上显示液体酶输出(如下所示(,但不显示SQL语句的输出。我能够使用Maven目标中的sqlcmd -e
命令在日志文件中捕获SQL语句的输出。在Maven执行期间,如何在控制台上获得相同的输出?
INFO 3:50 PM: liquibase: Successfully acquired change log lock
DEBUG 3:50 PM: LiquibaseSchemaResolver: Found namespace details class liquibase.parser.core.xml.StandardNamespaceDetails for http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd
DEBUG 3:50 PM: LiquibaseSchemaResolver: Local path for http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd is liquibase/parser/core/xml/dbchangelog-3.5.xsd
DEBUG 3:50 PM: LiquibaseSchemaResolver: Successfully loaded XSD from liquibase/parser/core/xml/dbchangelog-3.5.xsd
INFO 3:50 PM: liquibase: Reading from [dbo].[DATABASECHANGELOG]
INFO 3:50 PM: liquibase: Successfully released change log lock
INFO 3:50 PM: liquibase: Successfully acquired change log lock
DEBUG 3:50 PM: LiquibaseSchemaResolver: Found namespace details class liquibase.parser.core.xml.StandardNamespaceDetails for http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd
DEBUG 3:50 PM: LiquibaseSchemaResolver: Local path for http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd is liquibase/parser/core/xml/dbchangelog-3.5.xsd
DEBUG 3:50 PM: LiquibaseSchemaResolver: Successfully loaded XSD from liquibase/parser/core/xml/dbchangelog-3.5.xsd
INFO 3:50 PM: liquibase: Reading from [dbo].[DATABASECHANGELOG]
INFO 3:50 PM: liquibase: Successfully released change log lock
在mvn中指定配置文件(请注意"配置"部分(:
<project>
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>x.x.x.x</version>
<configuration>
<propertyFileWillOverride>true</propertyFileWillOverride>
<propertyFile>target/classes/liquibase.properties</propertyFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
在配置文件中指定
verbose: true
来源:http://www.liquibase.org/documentation/maven/
我不好。我以相当模式执行它。在没有-q
的情况下运行相同的运行产生了全部输出。谢谢