<?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>cn.6tail</groupId>
    <artifactId>lunar</artifactId>
    <packaging>jar</packaging>
    <version>1.7.7</version>
    <name>${project.groupId}:${project.artifactId}</name>
    <url>https://github.com/6tail/lunar-java</url>
    <description>a calendar library for Solar and Chinese Lunar</description>
    <licenses>
        <license>
            <name>The MIT License</name>
            <url>http://opensource.org/licenses/MIT</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>6tail</name>
            <email>6tail@6tail.cn</email>
            <timezone>+8</timezone>
        </developer>
    </developers>
    <scm>
        <tag>master</tag>
        <connection>scm:git:git@github.com:6tail/lunar-java.git</connection>
        <developerConnection>scm:git:git@github.com:6tail/lunar-java.git</developerConnection>
        <url>git@github.com:6tail/lunar-java.git</url>
    </scm>
    <properties>
        <encoding>UTF-8</encoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <sourceEncoding>UTF-8</sourceEncoding>
        <source-version>1.5</source-version>
        <target-version>1.5</target-version>
        <creator>6tail</creator>
        <junit-version>4.13.2</junit-version>
        <maven-compiler-plugin-version>3.3</maven-compiler-plugin-version>
        <maven-jar-plugin-version>3.3.0</maven-jar-plugin-version>
        <maven-surefire-plugin-version>2.5</maven-surefire-plugin-version>
        <maven-javadoc-plugin-version>2.9</maven-javadoc-plugin-version>
        <maven-source-plugin-version>2.4</maven-source-plugin-version>
        <maven-release-plugin-version>2.2.2</maven-release-plugin-version>
        <maven-gpg-plugin-version>1.6</maven-gpg-plugin-version>
        <maven-deploy-plugin-version>3.1.2</maven-deploy-plugin-version>
        <maven-assembly-plugin-version>2.2-beta-5</maven-assembly-plugin-version>
        <central-publishing-maven-plugin-version>0.7.0</central-publishing-maven-plugin-version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit-version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin-version}</version>
                <configuration>
                    <source>${source-version}</source>
                    <target>${target-version}</target>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin-version}</version>
                <configuration>
                    <archive>
                        <index>true</index>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Created-By>${creator}</Created-By>
                            <Built-By>${creator}</Built-By>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin-version}</version>
                <configuration>
                    <argLine>-Dfile.encoding=UTF-8</argLine>
                    <skipTests>false</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin-version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
                            <additionalparam>-Xdoclint:none</additionalparam>
                            <source>${source-version}</source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin-version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin-version}</version>
                <configuration>
                    <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven-gpg-plugin-version}</version>
                <configuration>
                    <passphrase>${gpg.passphrase}</passphrase>
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${maven-assembly-plugin-version}</version>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <finalName>${project.artifactId}-${project.version}</finalName>
                    <descriptors>
                        <descriptor>${basedir}/src/assembly/assembly.xml</descriptor>
                    </descriptors>
                    <archive>
                        <manifestEntries>
                            <Created-By>${creator}</Created-By>
                            <Built-By>${creator}</Built-By>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven-deploy-plugin-version}</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>${central-publishing-maven-plugin-version}</version>
                <extensions>true</extensions>
                <configuration>
                    <autoPublish>true</autoPublish>
                    <publishingServerId>central</publishingServerId>
                    <deploymentName>${project.groupId}-${project.artifactId}-${project.version}</deploymentName>
                </configuration>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <goals>
                            <goal>publish</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <finalName>${project.artifactId}-${project.version}</finalName>
    </build>
</project>
