<?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.jxdinfo.hussar</groupId>
        <artifactId>hussar-formdesign-parent</artifactId>
        <version>8.2.1-beta</version>
        <relativePath>../hussar-formdesign-parent/pom.xml</relativePath>
    </parent>

    <artifactId>hussar-formdesign-common</artifactId>
    <name>${project.artifactId}</name>
    <packaging>jar</packaging>
    <description>天斧公共模块、包含通用工具类、实体、拦截器、线程池等</description>

    <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>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
    </properties>

    <distributionManagement>
        <repository>
            <id>formdesign-release</id>
            <name>formdesign-release</name>
            <url>http://192.168.2.222:8081/nexus/content/repositories/hussar_formdesign/</url>
        </repository>
        <snapshotRepository>
            <id>222snapshots</id>
            <name>internal thirdparty</name>
            <url>http://192.168.2.222:8081/nexus/content/repositories/private-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <dependencies>
        <!--引用天斧内部依赖-->
        <dependency>
            <groupId>com.jxdinfo.hussar</groupId>
            <artifactId>hussar-formdesign-storage-client</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jxdinfo.hussar</groupId>
            <artifactId>hussar-formdesign-interface</artifactId>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jxdinfo.hussar</groupId>
            <artifactId>hussar-core-license</artifactId>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>json-schema-validator</artifactId>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
        </dependency>
        <!--        利刃包支持开始-->
        <dependency>
            <groupId>com.jxdinfo.hussar</groupId>
            <artifactId>hussar-engine-metadata-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jxdinfo.hussar</groupId>
            <artifactId>hussar-engine-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jxdinfo.hussar</groupId>
            <artifactId>hussar-engine-metadata-mysql</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jxdinfo.hussar</groupId>
            <artifactId>hussar-engine-metadata-oracle</artifactId>

        </dependency>
        <dependency>
            <groupId>com.jxdinfo.hussar</groupId>
            <artifactId>hussar-engine-metadata-oscar</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jxdinfo.hussar</groupId>
            <artifactId>hussar-engine-bpm-proxy</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jxdinfo.hussar</groupId>
            <artifactId>hussar-engine-compile</artifactId>
        </dependency>
        <!--        利刃包支持结束-->
        <!--先把平台的包放着-->
        <dependency>
            <groupId>com.jxdinfo.hussar</groupId>
            <artifactId>hussar-common</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.data</groupId>
                    <artifactId>spring-data-mongodb</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.jxdinfo.hussar</groupId>
            <artifactId>hussar-datasource-api</artifactId>
        </dependency>
        <!-- 平台包结束-->
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <skip>true</skip>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <encoding>${maven.compiler.encoding}</encoding>
                </configuration>
            </plugin>

            <!-- Copying Allatori configuration file to 'target' directory. The destination
                file will be filtered (Maven properties used in configuration file will be
                resolved). -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <skip>true</skip>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <execution>
                        <id>copy-and-filter-allatori-config</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${basedir}/confusion</directory>
                                    <includes>
                                        <include>confusion.xml</include>
                                    </includes>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Running Allatori -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>run-allatori</id>
                        <phase>package</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>java</executable>
                    <arguments>
                        <argument>-Xms128m</argument>
                        <argument>-Xmx512m</argument>
                        <argument>-jar</argument>
                        <argument>${basedir}/lib/confusion.jar</argument>
                        <argument>${basedir}/target/confusion.xml</argument>
                    </arguments>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.8</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>${project.basedir}/src/main/java</directory>
                <targetPath>${project.build.outputDirectory}/</targetPath>
                <includes>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>
    </build>

</project>
