Details
Reporter
Cezary StatkiewiczCezary StatkiewiczComponents
Affects versions
Priority
Minor
Details
Details
Reporter
Cezary Statkiewicz
Cezary StatkiewiczComponents
Affects versions
Priority
Created November 30, 2011 at 2:40 PM
Updated June 12, 2013 at 9:50 PM
sqlFile refactoring tag would be useful for automatic data importing in web application deployments if relative path handling would be more consistent with import tag. The latter one uses path relative to importing xml file, while sqlFile uses path relative to current working directory. Deployed web application sets it's working directory to exploded war's resources dir (WEB-INF/classes/), where all files from src/main/resources are copied.
Example:
Typical maven source code layout:
src/main/resouces/changelog.xml - location of main changelog src/main/resouces/data.sql - physical location of sql file to import
tag used with maven:
<sqlFile path="src/main/resources/data.sql"/>
Will work with maven
Will not work with deployed web application because of
liquibase.exception.SetupException: <sqlfile path=src/main/resources/data.sql> -Unable to read file
Web application deployment would work if
<sqlFile path="data.sql"/>
tag would be used.