<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.frankframework</groupId>
		<artifactId>frankframework-console</artifactId>
		<version>10.0.1</version>
	</parent>

	<artifactId>frankframework-console-frontend</artifactId>
	<name>Frank Console Frontend</name>

	<developers>
		<developer>
			<name>Niels Meijer</name>
			<email>niels@frankframework.org</email>
			<organization>Frank!Framework</organization>
			<organizationUrl>https://frankframework.org</organizationUrl>
		</developer>
		<developer>
			<name>Vivy Booman</name>
			<email>vivy@frankframework.org</email>
			<organization>Frank!Framework</organization>
			<organizationUrl>https://frankframework.org</organizationUrl>
		</developer>
		<developer>
			<name>Sergi Philipsen</name>
			<email>sergi@frankframework.org</email>
			<organization>Frank!Framework</organization>
			<organizationUrl>https://frankframework.org</organizationUrl>
		</developer>
	</developers>

	<properties>
		<frontend.source.location>${project.basedir}/src/main/frontend</frontend.source.location>
		<frontend.target.location>${project.build.directory}/frontend</frontend.target.location>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.frankframework</groupId>
			<artifactId>frankframework-commons</artifactId>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
		</dependency>

		<dependency>
			<groupId>jakarta.servlet</groupId>
			<artifactId>jakarta.servlet-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-params</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<defaultGoal>generate-resources</defaultGoal>
		<pluginManagement>
			<plugins>
				<!-- This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.github.hazendaz.maven</groupId>
										<artifactId>directory-maven-plugin</artifactId>
										<versionRange>[1,)</versionRange>
										<goals>
											<goal>directory-of</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.codehaus.mojo</groupId>
										<artifactId>exec-maven-plugin</artifactId>
										<versionRange>[1,)</versionRange>
										<goals>
											<goal>exec</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-resources-plugin</artifactId>
										<versionRange>[1,)</versionRange>
										<goals>
											<goal>copy-resources</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>3.6.3</version>
				<configuration>
					<workingDirectory>${frontend.source.location}</workingDirectory>
				</configuration>
				<executions>
					<execution>
						<id>pnpm install</id>
						<goals>
							<goal>exec</goal>
						</goals>
						<phase>prepare-package</phase>
						<configuration>
							<executable>pnpm</executable>
							<arguments>
								<argument>i</argument>
								<argument>--frozen-lockfile</argument>
							</arguments>
						</configuration>
					</execution>
					<execution>
						<id>pnpm build</id>
						<goals>
							<goal>exec</goal>
						</goals>
						<phase>prepare-package</phase>
						<configuration>
							<executable>pnpm</executable>
							<arguments>
								<argument>run</argument>
								<argument>build</argument>
							</arguments>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<executions>
					<execution>
						<id>copy NPM dist to Maven build folder</id>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<phase>prepare-package</phase>
						<configuration>
							<outputDirectory>${project.build.outputDirectory}/console</outputDirectory>
							<resources>
								<resource>
									<directory>${frontend.target.location}</directory>
									<filtering>false</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.glassfish.copyright</groupId>
				<artifactId>glassfish-copyright-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>Check-CopyRight-Notice</id>
						<phase>none</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<executions>
					<execution>
						<id>verify-code-style</id>
						<phase>none</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-lib-ban</id>
						<phase>none</phase>
					</execution>
					<execution>
						<id>enforce-classpath-lib-ban</id>
						<phase>none</phase>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${javadoc-plugin.version}</version>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
		</plugins>
	</reporting>
</project>
