<?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.github.hazendaz</groupId>
        <artifactId>base-parent</artifactId>
        <version>23</version>
        <relativePath />
    </parent>

    <groupId>com.github.hazendaz.git</groupId>
    <artifactId>github-desktop</artifactId>
    <version>2.2.2</version>
    <packaging>pom</packaging>

    <name>github-desktop</name>
    <description>Distribution for Github Desktop</description>
    <url>https://hazendaz.github.io/github-desktop/</url>

    <scm>
        <connection>scm:git:ssh://git@github.com/hazendaz/github-desktop.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/hazendaz/github-desktop.git</developerConnection>
        <url>https://github.com/hazendaz/github-desktop</url>
        <tag>github-desktop-2.2.2</tag>
    </scm>

    <properties>
        <download-plugin.version>1.4.2</download-plugin.version>
    </properties>

    <build>
        <finalName>github-desktop</finalName>
        <plugins>
            <!-- Download -->
            <plugin>
                <groupId>com.googlecode.maven-download-plugin</groupId>
                <artifactId>download-maven-plugin</artifactId>
                <version>${download-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>wget</goal>
                        </goals>
                        <configuration>
                            <url>https://central.github.com/deployments/desktop/desktop/latest/win32</url>
                            <outputFileName>GitHubDesktopSetup.exe</outputFileName>
                            <outputDirectory>${project.build.directory}/github-desktop</outputDirectory>
                            <skipCache>true</skipCache>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Assembly -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>${project.basedir}/src/assembly/assembly.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
