191 lines
8.1 KiB
XML
191 lines
8.1 KiB
XML
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>3.5.15</version>
|
|
<relativePath/>
|
|
</parent>
|
|
|
|
<groupId>cn.nianxx</groupId>
|
|
<artifactId>th-hotel-server</artifactId>
|
|
<version>0.0.1-SNAPSHOT</version>
|
|
<name>th-hotel-server</name>
|
|
<description>TH Hotel backend service</description>
|
|
|
|
<properties>
|
|
<java.version>17</java.version>
|
|
<maven.compiler.release>17</maven.compiler.release>
|
|
<maven.compiler.parameters>true</maven.compiler.parameters>
|
|
<mybatis-plus.version>3.5.16</mybatis-plus.version>
|
|
<springdoc.version>2.8.17</springdoc.version>
|
|
<angus-mail.version>2.0.3</angus-mail.version>
|
|
<aliyun-oss.version>3.18.3</aliyun-oss.version>
|
|
<apache-poi.version>5.4.1</apache-poi.version>
|
|
<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
|
|
<th.hotel.build.commit>UNKNOWN</th.hotel.build.commit>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-validation</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.baomidou</groupId>
|
|
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
|
<version>${mybatis-plus.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.baomidou</groupId>
|
|
<artifactId>mybatis-plus-jsqlparser</artifactId>
|
|
<version>${mybatis-plus.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-core</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-mysql</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.mysql</groupId>
|
|
<artifactId>mysql-connector-j</artifactId>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springdoc</groupId>
|
|
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
|
<version>${springdoc.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.eclipse.angus</groupId>
|
|
<artifactId>angus-mail</artifactId>
|
|
<version>${angus-mail.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.security</groupId>
|
|
<artifactId>spring-security-crypto</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.aliyun.oss</groupId>
|
|
<artifactId>aliyun-sdk-oss</artifactId>
|
|
<version>${aliyun-oss.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.poi</groupId>
|
|
<artifactId>poi-ooxml</artifactId>
|
|
<version>${apache-poi.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.h2database</groupId>
|
|
<artifactId>h2</artifactId>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>build-info</goal>
|
|
</goals>
|
|
<configuration>
|
|
<additionalProperties>
|
|
<commit>${th.hotel.build.commit}</commit>
|
|
<runtimeMarker>m002_v4_review_pointer_deployment_proof_v1</runtimeMarker>
|
|
</additionalProperties>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<release>${maven.compiler.release}</release>
|
|
<parameters>${maven.compiler.parameters}</parameters>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
<version>${maven-antrun-plugin.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>verify-build-commit-before-package</id>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>run</goal>
|
|
</goals>
|
|
<configuration>
|
|
<target name="verify-build-commit-before-package">
|
|
<condition property="th.hotel.build.commit.unknown">
|
|
<equals arg1="${th.hotel.build.commit}" arg2="UNKNOWN"/>
|
|
</condition>
|
|
<fail if="th.hotel.build.commit.unknown"
|
|
message="TH_HOTEL_BUILD_COMMIT is required before packaging. Commit changes first, then use scripts/package-server-with-build-info.sh or set TH_HOTEL_BUILD_COMMIT to the current Git commit."/>
|
|
<exec executable="git" failonerror="true">
|
|
<arg value="rev-parse"/>
|
|
<arg value="--verify"/>
|
|
<arg value="--quiet"/>
|
|
<arg value="${th.hotel.build.commit}^{commit}"/>
|
|
</exec>
|
|
<exec executable="git" failonerror="true">
|
|
<arg value="update-index"/>
|
|
<arg value="-q"/>
|
|
<arg value="--refresh"/>
|
|
</exec>
|
|
<exec executable="git" failonerror="true" outputproperty="th.hotel.git.status">
|
|
<arg value="status"/>
|
|
<arg value="--porcelain"/>
|
|
</exec>
|
|
<condition property="th.hotel.git.dirty">
|
|
<not>
|
|
<equals arg1="${th.hotel.git.status}" arg2=""/>
|
|
</not>
|
|
</condition>
|
|
<fail if="th.hotel.git.dirty"
|
|
message="Git worktree must be clean before packaging a deployment-proof Jar. Commit or stash changes first. Dirty entries: ${th.hotel.git.status}"/>
|
|
</target>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>build-commit-from-env</id>
|
|
<activation>
|
|
<property>
|
|
<name>env.TH_HOTEL_BUILD_COMMIT</name>
|
|
</property>
|
|
</activation>
|
|
<properties>
|
|
<th.hotel.build.commit>${env.TH_HOTEL_BUILD_COMMIT}</th.hotel.build.commit>
|
|
</properties>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|