<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->

<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>io.helidon.applications</groupId>
        <artifactId>helidon-se</artifactId>
        <version>2.0.0-M4</version>
        <relativePath>../../../applications/se/pom.xml</relativePath>
    </parent>
    <groupId>io.helidon.examples.todo</groupId>
    <artifactId>helidon-examples-todo-frontend</artifactId>
    <name>Helidon Examples TODO Demo Frontend</name>

    <description>
        Front-end part of the application, uses pure Helidon SE
    </description>

    <properties>
        <mainClass>io.helidon.demo.todos.frontend.Main</mainClass>
        <exec.mainClass>${mainClass}</exec.mainClass>
        <version.nodejs>v12.16.1</version.nodejs>
        <version.npm>6.13.4</version.npm>
        <npm.download.root>https://registry.npmjs.org/npm/-/</npm.download.root>
        <npm.proxy.auto>false</npm.proxy.auto>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.helidon.common</groupId>
            <artifactId>helidon-common</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.webserver</groupId>
            <artifactId>helidon-webserver</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.webserver</groupId>
            <artifactId>helidon-webserver-access-log</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.media</groupId>
            <artifactId>helidon-media-jsonp</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.tracing</groupId>
            <artifactId>helidon-tracing</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.tracing</groupId>
            <artifactId>helidon-tracing-zipkin</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.tracing</groupId>
            <artifactId>helidon-tracing-jersey-client</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.bundles</groupId>
            <artifactId>helidon-bundles-config</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.bundles</groupId>
            <artifactId>helidon-bundles-security</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.security.providers</groupId>
            <artifactId>helidon-security-providers-google-login</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.security.integration</groupId>
            <artifactId>helidon-security-integration-webserver</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.security.integration</groupId>
            <artifactId>helidon-security-integration-jersey-client</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.metrics</groupId>
            <artifactId>helidon-metrics</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-json-processing</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.inject</groupId>
            <artifactId>jersey-hk2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-common</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.9.1</version>
                <configuration>
                    <nodeVersion>${version.nodejs}</nodeVersion>
                    <npmVersion>${version.npm}</npmVersion>
                    <npmDownloadRoot>${npm.download.root}</npmDownloadRoot>
                    <npmInheritsProxyConfigFromMaven>${npm.proxy.auto}</npmInheritsProxyConfigFromMaven>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>npm install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>install</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm-run-build</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>run build</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-libs</id>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
