<?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>{{packageName}}</groupId>
    <artifactId>{{projectName}}-apiclient-{{lowerCase api.codeName}}</artifactId>
    <name>{{projectDesc}} Microservice {{lowerCase api.codeName}}</name>
    <description> microservice</description>
    <version>0.0.1</version>


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- 阿里sentinel熔断器 -->
        <alibaba-sentinel.version>2.1.1.RELEASE</alibaba-sentinel.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>net.ibizsys.central.r8</groupId>
            <artifactId>ibiz-central-r8</artifactId>
            <version>0.2.52</version>
        </dependency>
        <!--  Alibaba Sentinel -->
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
            <version>${alibaba-sentinel.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-core</artifactId>
            <version>9.0.27</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>cn.ibizlab</groupId>
            <artifactId>ibizlab-template-apiclient</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>

    <repositories>

        <repository>
            <id>ibizmvnrepository</id>
            <name>ibizmvnrepository</name>
            <url>http://172.16.240.220:8081/repository/public/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>
        <repository>
            <id>aliyunmaven</id>
            <name>阿里云公共仓库</name>
            <url>https://maven.aliyun.com/repository/public/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>
    </repositories>


    <pluginRepositories>
        <pluginRepository>
            <id>ibizmvnrepository-plugin</id>
            <url>http://172.16.240.220:8081/repository/public/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>aliyun-plugin</id>
            <url>https://maven.aliyun.com/repository/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <!-- 更新元数据 -->
                    <updateReleaseInfo>true</updateReleaseInfo>
                </configuration>
            </plugin>
			<plugin>
				<groupId>cn.ibizlab</groupId>
				<artifactId>ibizlab-generator-plugin</artifactId>
				<version>1.0-SNAPSHOT</version>
				<configuration>
					<output>
						../
					</output>
					<inputSpec>
						${basedir}/src/main/resources/model/{{replace packageName "." "/"}}
					</inputSpec>
					<templateDirs>
						${basedir}/src/main/resources/templ
					</templateDirs>
					<packageName>
						${project.groupId}
					</packageName>
					<name>
						${parent.artifactId}
					</name>
				</configuration>
                <dependencies>
                    <dependency>
                        <groupId>cn.ibizlab</groupId>
                        <artifactId>ibizlab-template-apiclient</artifactId>
                        <version>1.0-SNAPSHOT</version>
                    </dependency>
                </dependencies>
			</plugin>
		</plugins>
	</build>
</project>
