<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>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>org.webjars</groupId>
    <artifactId>font-mfizz</artifactId>
    <name>Font Mfizz</name>
    <version>1.2</version>
    <packaging>jar</packaging>
    <description>WebJar for Font Mfizz</description>
    <url>http://webjars.org</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/webjars/font-mfizz.git</url>
        <connection>scm:git:https://github.com/webjars/font-mfizz.git</connection>
        <developerConnection>scm:git:https://github.com/webjars/font-mfizz.git</developerConnection>
        <tag>font-mfizz-1.2</tag>
    </scm>

    <developers>
        <developer>
            <id>aholland</id>
            <name>Andrew Holland</name>
            <email>aholland@a1dutch.co.uk</email>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <upstream.url>https://bitbucket.org/jlauer/mfz-cdn/downloads/</upstream.url>
        <upstream.version>1.2</upstream.version>
        <destDir>${project.build.outputDirectory}/META-INF/resources/webjars/${project.artifactId}/${upstream.version}</destDir>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>wagon-maven-plugin</artifactId>
                <version>1.0-beta-4</version>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>download-single</goal>
                        </goals>
                        <configuration>
                            <url>${upstream.url}</url>
                            <fromFile>font-mfizz-${upstream.version}.tar.gz</fromFile>
                            <toDir>${project.build.directory}</toDir>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <echo message="unzip archive" />
                                <untar src="${project.build.directory}/font-mfizz-${upstream.version}.tar.gz" dest="${project.build.directory}" compression="gzip" />
                                <move todir="${destDir}">
                                    <fileset dir="${project.build.directory}/font-mfizz-${upstream.version}" />
                                </move>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4.1</version>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
                <targetPath>${destDir}</targetPath>
            </resource>
        </resources>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>font-awesome</artifactId>
            <version>3.2.1</version>
        </dependency>
    </dependencies>

</project>
