<?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>v24.9.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>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<version>3.4.0</version>
				<configuration>
					<filesets>
						<fileset>
							<directory>.</directory>
							<includes>
								<include>dist/</include>
								<include>node/</include>
								<include>node_modules/</include>
								<include>server</include>
							</includes>
							<followSymlinks>false</followSymlinks>
						</fileset>
					</filesets>
				</configuration>
			</plugin>
			<plugin>
				<groupId>com.github.eirslett</groupId>
				<artifactId>frontend-maven-plugin</artifactId>
				<version>1.15.0</version>
				<executions>
					<execution>
						<id>install-node-and-npm</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>install-node-and-npm</goal>
						</goals>
					</execution>
					<execution>
						<id>npm-install</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>npm</goal>
						</goals>
						<configuration>
							<arguments>install</arguments>
						</configuration>
					</execution>
					<execution>
						<id>npm-build</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>npm</goal>
						</goals>
						<configuration>
							<arguments>run build</arguments>
						</configuration>
					</execution>
				</executions>
				<configuration>
					<nodeVersion>${node.version}</nodeVersion>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>
