<?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>
    <parent>
        <groupId>com.casic</groupId>
        <artifactId>casic-smartcity</artifactId>
        <relativePath>../pom.xml</relativePath>
        <version>2.0.0.alpha</version>
    </parent>
    <artifactId>casic-web</artifactId>
    <version>2.0.0.alpha</version>
    <packaging>jar</packaging>
    <name>casic-web</name>
    <description>casic web启动入口</description>
    <profiles>
        <profile>
            <!-- 默认为开发版本 -->
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <activatedProperties>dev</activatedProperties>
            </properties>
        </profile>
        <profile>
            <id>test</id>
            <properties>
                <activatedProperties>test</activatedProperties>
            </properties>
        </profile>
        <profile>
            <id>prod</id>
            <properties>
                <activatedProperties>prod</activatedProperties>
            </properties>
        </profile>
    </profiles>
    <dependencies>
        <!--        <dependency>-->
        <!--            <groupId>org.springframework.boot</groupId>-->
        <!--            <artifactId>spring-boot-starter-actuator</artifactId>-->
        <!--            <exclusions>-->
        <!--                <exclusion>-->
        <!--                    <groupId>io.micrometer</groupId>-->
        <!--                    <artifactId>micrometer-core</artifactId>-->
        <!--                </exclusion>-->
        <!--            </exclusions>-->
        <!--        </dependency>-->
        <!--基础包依赖-->
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-core</artifactId>
            <version>${core.version}</version>
        </dependency>
        <!--基础包依赖-->
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-alarm</artifactId>
            <version>${pro.version}</version>
        </dependency>
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-server</artifactId>
            <version>${pro.version}</version>
        </dependency>
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-export-support</artifactId>
            <version>${extension.version}</version>
        </dependency>
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-admin-core</artifactId>
            <version>${admin.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>io.springfox</groupId>
                    <artifactId>springfox-swagger-ui</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-admin-support</artifactId>
            <version>${admin.version}</version>
        </dependency>
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-server-support</artifactId>
            <version>${pro.version}</version>
        </dependency>
<!--        版本问题 nacos starter 支持boot 2.4之前版本　需通过java api方式集成-->
<!--        <dependency>-->
<!--            <groupId>com.alibaba.boot</groupId>-->
<!--            <artifactId>nacos-config-spring-boot-starter</artifactId>-->
<!--            <version>0.2.10</version>-->
<!--        </dependency>-->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${mysql.driver.version}</version>
        </dependency>
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-area-starter</artifactId>
            <version>${admin.version}</version>
        </dependency>

        <!--子项目包依赖-->
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-server</artifactId>
            <version>${pro.version}</version>
        </dependency>
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-sluicewell</artifactId>
            <version>${pro.version}</version>
        </dependency>
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-data-analysis</artifactId>
            <version>${pro.version}</version>
        </dependency>
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-cache-redis</artifactId>
            <version>${pro.version}</version>
        </dependency>
        <dependency>
            <groupId>com.casic</groupId>
            <artifactId>casic-device</artifactId>
            <version>${pro.version}</version>
        </dependency>
        <!--spring boot依赖-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <!--打包的时候可以不用包进去，别的设施会提供。事实上该依赖理论上可以参与编译，测试，运行等周期。相当于compile，但是打包阶段做了exclude操作-->
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.plugin.version}</version>
                <configuration>
                    <excludes>
                        <!--注意从编译结果目录开始算目录结构-->
                        <exclude>/config/*-*.yml</exclude>
                        <exclude>**/MockController.class</exclude>
                    </excludes>
                    <archive>
                        <manifest>
                            <mainClass>com.casic.missiles.CasicApplication</mainClass>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>./</classpathPrefix>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${maven.assembly.plugin.version}</version>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>${maven.war.plugin.version}</version>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>
</project>