首页 > 其他分享 >liquibase maven

liquibase maven

时间:2022-11-17 11:46:28浏览次数:61  
标签:UTF -- 1.8 maven liquibase mysql

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.nvxclouds.apollo</groupId>
    <artifactId>apollo-database</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.30</version>
        </dependency>
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <version>4.17.2</version>
        </dependency>
    </dependencies>

    <distributionManagement>
        <repository>
            <id>Releases</id>
            <name>Releases</name>
            <url>http://192.168.10.16:8081/repository/maven-releases/</url>
        </repository>
        <snapshotRepository>
            <id>Snapshots</id>
            <name>Snapshots</name>
            <url>http://192.168.10.16:8081/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-maven-plugin</artifactId>
                <version>4.17.2</version>
                <configuration>
                    <propertyFileWillOverride>true</propertyFileWillOverride>
                    <!--配置参数,以禁用弹出的对话框,该对话框将确认非本地数据库上的迁移-->
                    <promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
                    <propertyFile>src/main/resources/liquibase.properties</propertyFile>
<!--                    <changeLogFile>${changeLogFile}</changeLogFile>-->
                    <driver>com.mysql.cj.jdbc.Driver</driver>
                    <url>${url}</url>
                    <username>${username}</username>
                    <password>${password}</password>
                    <!--生成文件的路径-->
                    <outputChangeLogFile>src/main/resources/changelog/changelog.xml</outputChangeLogFile>
                    <dropFirst>false</dropFirst>
                    <verbose>true</verbose>
                    <logging>debug</logging>
                    <rollbackTag>${project.version}</rollbackTag>
                    <tag>${project.version}</tag>
                    <!--输出文件的编码 -->
                    <outputFileEncoding>UTF-8</outputFileEncoding>
<!--                    <systemProperties>-->
<!--                        <file.encoding>UTF-8</file.encoding>-->
<!--                        <liquibase.file.encoding>UTF-8</liquibase.file.encoding>-->
<!--                        <liquibase.ouputFileEncoding>UTF-8</liquibase.ouputFileEncoding>-->
<!--                    </systemProperties>-->
                </configuration>
                <executions>
                    <execution>
                        <!--配置什么时候执行数据库变更日志中的SQL脚本-->
                        <phase>process-resources</phase>
                        <goals>
                            <!--执行类型-->
                            <goal>update</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>

 

标签:UTF,--,1.8,maven,liquibase,mysql
From: https://www.cnblogs.com/exmyth/p/16898943.html

相关文章