<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>cn.javaer.springfox</groupId>
    <artifactId>swagger-document-ui</artifactId>
    <packaging>jar</packaging>
    <version>0.2.1</version>
    <name>Swagger Document UI</name>
    <description>WebJar for Swagger Document UI</description>
    <url>https://github.com/cn-src/swagger-document-ui</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <destDir>${project.build.outputDirectory}/META-INF/resources/</destDir>
    </properties>

    <developers>
        <developer>
            <id>cn-src</id>
            <name>cn-src</name>
            <email>public@javaer.cn</email>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache-2.0</name>
            <url>https://github.com/cn-src/swagger-document-ui</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/cn-src/swagger-document-ui</url>
        <connection>scm:git:https://github.com/cn-src/swagger-document-ui.git</connection>
        <developerConnection>scm:git:https://github.com/cn-src/swagger-document-ui.git</developerConnection>
        <tag>v0.2.1</tag>
    </scm>

    <build>
        <sourceDirectory>${project.build.directory}/cpSrc</sourceDirectory>
        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <echo message="copy src resources"/>
                                <copydir src="${basedir}/src" dest="${project.build.directory}/cpSrc/src"/>
                                <copydir src="${basedir}/public" dest="${project.build.directory}/cpSrc/public"/>
                                <copyfile src="${basedir}/package.json" dest="${project.build.directory}/cpSrc/package.json"/>
                                <copyfile src="${basedir}/LICENSE" dest="${project.build.directory}/cpSrc/LICENSE"/>
                                <echo message="copy dist resources"/>
                                <copy todir="${destDir}">
                                    <fileset dir="${basedir}/dist"/>
                                </copy>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.googlecode.todomap</groupId>
                <artifactId>maven-jettygzip-plugin</artifactId>
                <version>0.0.4</version>
                <configuration>
                    <webappDirectory>target/classes</webappDirectory>
                    <outputDirectory>target/classes</outputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>process</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <attach>true</attach>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
