<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.gcube.iam</groupId>
		<artifactId>keycloak-d4science-spi-parent</artifactId>
		<version>2.26.0-SNAPSHOT</version>
	</parent>

    <artifactId>d4science-account-ui</artifactId>
    <name>D4Science Account UI</name>
    <description>The user interface to manage a D4Science account on the Keycloak server</description>
    <packaging>jar</packaging>

    <properties>
        <node.version>v18.18.0</node.version>
    </properties>

    <build>
        <resources>
            <resource>
                <directory>maven-resources</directory>
            </resource>
            <resource>
                <directory>dist</directory>
                <targetPath>theme/d4science-account/account/resources</targetPath>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.15.0</version>
                <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-build</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>run build</arguments>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <nodeVersion>${node.version}</nodeVersion>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
