<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ MindmapsDB - A Distributed Semantic Database
  ~ Copyright (C) 2016  Mindmaps Research Ltd
  ~
  ~ MindmapsDB is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ MindmapsDB is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with MindmapsDB. If not, see <http://www.gnu.org/licenses/gpl.txt>.
  -->

<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>mindmaps</artifactId>
        <groupId>io.mindmaps</groupId>
        <version>0.2.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>mindmaps-dashboard</artifactId>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.5.0</version>

                <executions>
                    <execution>
                        <id>npm install</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                            <executable>npm</executable>
                            <arguments>
                                <argument>install</argument>
                                <argument>--no-optional</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm test</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <executable>npm</executable>
                            <arguments>
                                <argument>test</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>browserify</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>compile</phase>
                        <configuration>
                            <executable>browserify</executable>
                            <commandlineArgs>-t vueify -e src/main.js -o static/dashboard.js</commandlineArgs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
