<?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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.github.sevdokimov.logviewer</groupId>
        <artifactId>log-parent</artifactId>
        <version>1.0.10</version>
    </parent>

    <artifactId>log-viewer-frontend</artifactId>
    <packaging>jar</packaging>

    <name>Log Viewer frontend</name>
    <description>The frontend part of Log Viewer</description>

    <url>https://github.com/sevdokimov/log-viewer</url>

    <profiles>
        <profile>
            <id>build-frontend</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>1.6</version>
                        <configuration>
                            <workingDirectory>./</workingDirectory>
                            <nodeVersion>v16.11.1</nodeVersion>
                            <npmVersion>7.24.2</npmVersion>
                            <installDirectory>target/npmWd</installDirectory>
                        </configuration>
                        <executions>
                            <execution>
                                <id>Install node and npm</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>install-node-and-npm</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>build</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>npm</goal>
                                </goals>
                                <configuration>
                                    <arguments>run-script build</arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>3.4.1</version>
                        <configuration>
                            <archive>
                                <addMavenDescriptor>false</addMavenDescriptor>
                                <manifest>
                                    <addClasspath>false</addClasspath>
                                </manifest>
                            </archive>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
