<?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">
    <parent>
        <artifactId>org.migor.server</artifactId>
        <groupId>org.migor.server</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>org.migor.webclient.mobile</artifactId>
    <packaging>war</packaging>

    <build>
        <finalName>${project.artifactId}-${project.version}.war</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <failOnMissingWebXml>true</failOnMissingWebXml>
                    <webResources>
                        <resource>
                            <directory>src/main/webapp</directory>
                            <filtering>true</filtering>
                            <includes>
                                <include>**/*.xml</include>
                            </includes>
                        </resource>
                    </webResources>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <!--suppress MavenModelInspection -->
                            <Implementation-Build>${buildNumber}</Implementation-Build>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.samaxes.maven</groupId>
                <artifactId>minify-maven-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>default-minify</id>
                        <phase>process-resources</phase>
                        <configuration>
                            <charset>utf-8</charset>
                            <jsEngine>closure</jsEngine>

                            <!--CSS-->
                            <cssSourceDir>css</cssSourceDir>
                            <cssSourceFiles>
                                <cssSourceFile>migor-mobile.css</cssSourceFile>

                            </cssSourceFiles>
                            <cssFinalFile>migor-mobile-comb.css</cssFinalFile>

                            <!--JS-->
                            <jsSourceDir>js</jsSourceDir>
                            <jsSourceFiles>

                                <jsSourceFile>init.js</jsSourceFile>

                            </jsSourceFiles>
                            <jsFinalFile>migor-mobile-comb.js</jsFinalFile>
                        </configuration>
                        <goals>
                            <goal>minify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>