2013-11-21 137 views
0

这里是错误说liquibase不是在cmd中LIQUIBASE:如何安装liquibase。我在与我创建

http://animobile.info/upload/1/error.bmp

识别为一个内部/外部 命令lb_update.bat代码1批处理文件中的错误:

@echo off call Liquibase --changeLogFile=update.xml 

update.xml coode:

<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
    <databaseChangeLog xmlns="http://www.Liquibase.org/xml/ns/dbchangelog/1.9" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.Liquibase.org/xml/ns/dbchangelog/1.9    http://www.Liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd"> 
    <include file="v000/master.xml" /> 
    </databaseChangeLog> 

master.xml代码:

 <?xml version="1.0" encoding="UTF-8" standalone="no"?> 
    <databaseChangeLog xmlns="http://www.Liquibase.org/xml/ns/dbchangelog/1.9" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.Liquibase.org/xml/ns/dbchangelog/1.9 http://www.Liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd"> 
    <preConditions> 
    <!-- These changes should only be run against a schema with major version 0 --> 
    <sqlCheck expectedResult="0"> 
     SELECT NVL(MAX(id),0) 
     FROM databasechangelog 
     WHERE author='MajorVersion ' 
     </sqlCheck> 
     </preConditions > 
     <include file="v000/2009-10-15-73.xml" /> 
     </databaseChangeLog>  

执行lb_update.bat时的预期结果是,将显示一条确认消息:迁移成功。

我该如何解决这个问题,请大家帮忙!谢谢!

+0

liquibase.bat在PATH中吗?如果没有,当您在呼叫命令中引用它时,可能有助于使用完整路径。 –

+0

“call”是否需要.bat扩展名?就像“@echo off call Liquibase.bat --changeLogFile = update.xml” –

+0

@NathanVoxland先生,我正在学习这个教程,但是我在执行lb_update.bat http:// www .liquibase.org /教程使用Oracle的 – Chad

回答

1

由于您尚未提及Liquibase.bat文件的完整路径,因此会在当前目录中搜索,即D:\Projects\lbdemo\trunk。看起来像Liquibase.bat文件不存在位置D:\Projects\lbdemo\trunk