<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.pavis</groupId>
    <artifactId>pavis-admin</artifactId>
    <version>3.7.0</version>
  </parent>
  <artifactId>pavis-webapi</artifactId>
  <version>3.7.0</version>
  <description>API 及打包部署模块</description>
  <licenses>
    <license>
      <name>GNU LESSER GENERAL PUBLIC LICENSE</name>
      <url>http://www.gnu.org/licenses/lgpl.html</url>
    </license>
  </licenses>
  <properties>
    <config-path>config/</config-path>
    <lib-path>lib/</lib-path>
    <bin-path>bin/</bin-path>
    <main-class>com.pavis.admin.PavisAdminApplication</main-class>
  </properties>
  <dependencies>
    <dependency>
      <groupId>com.pavis</groupId>
      <artifactId>pavis-module-system</artifactId>
    </dependency>
    <dependency>
      <groupId>com.pavis</groupId>
      <artifactId>pavis-module-aigc</artifactId>
    </dependency>
    <dependency>
      <groupId>com.pavis</groupId>
      <artifactId>pavis-plugin-schedule</artifactId>
    </dependency>
    <dependency>
      <groupId>com.pavis</groupId>
      <artifactId>pavis-plugin-open</artifactId>
    </dependency>
    <dependency>
      <groupId>com.pavis</groupId>
      <artifactId>pavis-plugin-generator</artifactId>
    </dependency>
    <dependency>
      <groupId>top.continew</groupId>
      <artifactId>continew-starter-log-interceptor</artifactId>
    </dependency>
    <dependency>
      <groupId>top.continew</groupId>
      <artifactId>continew-starter-trace</artifactId>
    </dependency>
    <dependency>
      <groupId>org.liquibase</groupId>
      <artifactId>liquibase-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>cn.dev33</groupId>
      <artifactId>sa-token-spring-boot3-starter</artifactId>
      <version>1.42.0</version>
    </dependency>
  </dependencies>
  <build>
    <finalName>${project.parent.name}</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>${config-path}</exclude>
            <exclude>db/</exclude>
            <exclude>templates/</exclude>
            <exclude>logback-spring.xml</exclude>
          </excludes>
          <archive>
            <manifest>
              <mainClass>${main-class}</mainClass>
              <classpathPrefix>../${lib-path}</classpathPrefix>
              <addClasspath>true</addClasspath>
              <useUniqueVersions>false</useUniqueVersions>
            </manifest>
            <manifestEntries>
              <Class-Path>../${config-path}</Class-Path>
            </manifestEntries>
          </archive>
          <outputDirectory>${project.build.directory}/app/${bin-path}</outputDirectory>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/app/${lib-path}</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>package</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                  <directory>src/main/resources/${config-path}</directory>
                </resource>
                <resource>
                  <directory>src/main/resources</directory>
                  <includes>
                    <include>db/</include>
                    <include>templates/</include>
                    <include>logback-spring.xml</include>
                  </includes>
                </resource>
              </resources>
              <outputDirectory>${project.build.directory}/app/${config-path}</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
