Nach meiner File structure ich einen Fehler bekamLiquibase Maven kann nicht lesen changeLogFile
liquibase.exception.SetupException: file: /src/main/liquibase/changes/000-initial-schema.xml existiert nicht
Mein pom.xml Plugin wird wie folgt konfiguriert:
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.5.3</version>
<configuration>
<propertyFile>src/main/liquibase/liquibase.properties</propertyFile>
</configuration>
<executions>
<execution>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Mein liquibase.pro genschaften Dateien sind:
driver = com.mysql.jdbc.Driver
url = jdbc: mysql: // localhost: 3306/versioniert
username =
password =
changeLogFile = src/main/liquibase/master.xml
Mein master.xml ist
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
<includeAll path="src/main/liquibase/changes" />
</databaseChangeLog>
Warum L iquibase kann diese Datei nicht finden? Selbst wenn ich zu diesem Dateinamen ändern: 000-initial-schemaTEST.xml der Fehler ist:
liquibase.exception.SetupException: file: /src/main/liquibase/changes/000-initial-schemaTEST.xml nicht
existiert auch diese Datei ich setze (es wurde aus der Datenbank von generateChangeLog Ziel erzeugt)
<?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-3.5.xsd">
<changeSet author="arek (generated)" id="1489753245544-1">
<createTable tableName="user">
<column autoIncrement="true" name="id" type="INT">
<constraints primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="arek (generated)" id="1489753245544-2">
<addUniqueConstraint columnNames="id" constraintName="id_UNIQUE" tableName="user"/>
</changeSet>
Zum Vergleich, wenn Mast er.xml Datei ist:
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
<include file="src/main/liquibase/changes/001-add-user-address.xml" />
<!--<includeAll path="src/main/liquibase/changes" />-->
</databaseChangeLog>
Es funktioniert