<?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>qrinvoice-rest</artifactId>
        <groupId>ch.codeblock.qrinvoice.rest</groupId>
        <version>1.3</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>qrinvoice-rest-webgui</artifactId>
    <name>QR Invoice REST API - Web GUI</name>

    <licenses>
        <license>
            <name>GNU Affero General Public License v3</name>
            <url>http://www.fsf.org/licensing/licenses/agpl-3.0.html</url>
        </license>
    </licenses>


    <build>
        <resources>
            <resource>
                <directory>dist</directory>
                <targetPath>app</targetPath>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <!-- Use the latest released version:
                https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
                <version>1.6</version>
                <configuration>
                    <nodeVersion>v8.11.2</nodeVersion>
                </configuration>
                <executions>
                    <execution>
                        <!-- optional: you don't really need execution ids, but it looks nice in your build log. -->
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                        <!-- optional: default phase is "generate-resources" -->
                        <phase>generate-resources</phase>
                    </execution>
                    <execution>
                        <id>npm run build</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>

                        <!-- optional: default phase is "generate-resources" -->
                        <phase>generate-resources</phase>

                        <configuration>
                            <!-- optional: The default argument is actually
                            "install", so unless you need to run some other npm command,
                            you can remove this whole <configuration> section.
                            -->
                            <arguments>run build</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>