<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>
	<groupId>com.xlrit.gears.runtime</groupId>
	<artifactId>gears-frontend</artifactId>
	<version>0.71.0</version>
	<packaging>jar</packaging>
	<name>${project.groupId}:${project.artifactId}</name>

	<description>GEARS Frontend</description>
	<url>https://gitlab.com/xlrit/gears/frontend</url>
  
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Marcus Klimstra</name>
			<email>marcus@xlrit.com</email>
			<organization>XLRIT</organization>
			<organizationUrl>http://www.xlrit.com</organizationUrl>
		</developer>
		<developer>
			<name>Giso Dal</name>
			<email>giso@xlrit.com</email>
			<organization>XLRIT</organization>
			<organizationUrl>http://www.xlrit.com</organizationUrl>
		</developer>
	</developers>

	<scm>
		<url>https://gitlab.com/xlrit/gears/frontend.git</url>
		<connection>scm:git:git@gitlab.com:xlrit/gears/frontend.git</connection>
		<developerConnection>scm:git:git@gitlab.com:xlrit/gears/frontend.git</developerConnection>
	</scm>

	<distributionManagement>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<executions>
					<execution>
						<id>position-react-build</id>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<phase>prepare-package</phase>
						<configuration>
							<resources>
								<resource>
									<directory>build</directory>
									<filtering>false</filtering>
								</resource>
							</resources>
							<outputDirectory>${project.build.outputDirectory}/public</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>npm</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>
						<version>1.3.2</version>
						<executions>
							<execution>
								<id>npm-install</id>
								<goals>
									<goal>exec</goal>
								</goals>
								<phase>generate-resources</phase>
								<configuration>
									<executable>npm</executable>
									<arguments>
										<argument>install</argument>
									</arguments>
								</configuration>
							</execution>
							<execution>
								<id>npm-run-build</id>
								<goals>
									<goal>exec</goal>
								</goals>
								<phase>compile</phase>
								<configuration>
									<executable>npm</executable>
									<arguments>
										<argument>run</argument>
										<argument>build</argument>
									</arguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>performRelease</id>
			<build>
				<plugins>
					<!-- Include javadoc/*.* in the javadoc jar and src/*.* in the source jar -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jar-plugin</artifactId>
						<executions>
							<execution>
								<id>source-jar</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<classifier>sources</classifier>
									<classesDirectory>${basedir}/src</classesDirectory>
								</configuration>
							</execution>
							<execution>
								<id>javadoc-jar</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<classifier>javadoc</classifier>
									<classesDirectory>${basedir}/javadoc</classesDirectory>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<!-- Sign artifacts -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>