<?xml version="1.0" encoding="UTF-8"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<groupId>net.enilink.platform</groupId>
	<artifactId>platform-parent</artifactId>
	<version>1.7.0</version>
	<packaging>pom</packaging>

	<name>eniLINK: Parent</name>
	<url>https://platform.enilink.net/</url>
	<description>eniLINK is a web platform for linked data applications based on the KOMMA framework
		and Lift.
	</description>

	<properties>
		<path.to.root>../../..</path.to.root>

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

		<lift.version>3.5.0</lift.version>
		<lift.bundle.version>${lift.version}-sp2</lift.bundle.version>
		<komma.version>1.9.0</komma.version>
		<scala.major.version>2.13</scala.major.version>
		<scala.version>2.13.12</scala.version>
		<scala.plugin.version>4.8.1</scala.plugin.version>
		<rap.version>3.29.0</rap.version>
		<osgi.version>7.0.0</osgi.version>

		<bnd.version>6.3.1</bnd.version>
		<karaf.version>4.4.7</karaf.version>
		<karaf.tooling.version>4.4.7</karaf.tooling.version>

		<enilink.scm.connection>scm:git:git://github.com:enilink/enilink.git</enilink.scm.connection>
		<enilink.scm.developerConnection>scm:git:git@github.com:enilink/enilink.git</enilink.scm.developerConnection>
		<enilink.scm.url>https://github.com/enilink/enilink</enilink.scm.url>
	</properties>

	<organization>
		<name>Fraunhofer IWU</name>
		<url>https://www.iwu.fraunhofer.de/</url>
	</organization>

	<issueManagement>
		<system>Github</system>
		<url>https://github.com/enilink/enilink/issues</url>
	</issueManagement>

	<developers>
		<developer>
			<id>kenwenzel</id>
			<name>Ken Wenzel</name>
			<roles>
				<role>architect</role>
				<role>developer</role>
			</roles>
			<url>https://github.com/kenwenzel</url>
		</developer>

		<developer>
			<id>mfriedemann</id>
			<name>Marko Friedemann</name>
			<roles>
				<role>developer</role>
			</roles>
			<url>https://github.com/mfriedemann</url>
		</developer>
	</developers>

	<licenses>
		<license>
			<name>Eclipse Public License v2.0</name>
			<url>https://www.eclipse.org/legal/epl-2.0/</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<connection>${enilink.scm.connection}</connection>
		<developerConnection>${enilink.scm.developerConnection}</developerConnection>
		<url>${enilink.scm.url}</url>
	</scm>

	<dependencies>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-launcher</artifactId>
			<version>1.13.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>5.13.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.vintage</groupId>
			<artifactId>junit-vintage-engine</artifactId>
			<version>5.13.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>1.7.36</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>4.11.0</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.eclipse.platform</groupId>
				<artifactId>org.eclipse.core.runtime</artifactId>
				<version>3.30.0</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.platform</groupId>
				<artifactId>org.eclipse.equinox.common</artifactId>
				<version>3.18.200</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.platform</groupId>
				<artifactId>org.eclipse.core.resources</artifactId>
				<version>3.20.0</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.platform</groupId>
				<artifactId>org.eclipse.osgi</artifactId>
				<version>3.18.600</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.platform</groupId>
				<artifactId>org.eclipse.core.commands</artifactId>
				<version>3.11.200</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.platform</groupId>
				<artifactId>org.eclipse.equinox.registry</artifactId>
				<version>3.11.400</version>
			</dependency>
			<dependency>
				<groupId>org.scala-lang</groupId>
				<artifactId>scala-library</artifactId>
				<version>${scala.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<plugins>
			<plugin>
				<!-- resolve variables and remove development configuration from POM
					files -->
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>flatten-maven-plugin</artifactId>
				<version>1.3.0</version>
				<configuration>
					<flattenMode>ossrh</flattenMode>
					<flattenDependencyMode>all</flattenDependencyMode>
				</configuration>
				<executions>
					<!-- enable flattening -->
					<execution>
						<id>flatten</id>
						<phase>process-resources</phase>
						<goals>
							<goal>flatten</goal>
						</goals>
					</execution>
					<!-- ensure proper cleanup -->
					<execution>
						<id>flatten.clean</id>
						<phase>clean</phase>
						<goals>
							<goal>clean</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>create-symlinks</id>
						<phase>validate</phase>
						<configuration>
							<target>
								<symlink link="OSGI-INF"
									resource="${project.build.outputDirectory}/OSGI-INF"
									failonerror="false" overwrite="true"/>
								<symlink link="META-INF"
									resource="${project.build.outputDirectory}/META-INF"
									failonerror="false" overwrite="true"/>
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.11.0</version>
					<configuration>
						<release>17</release>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.3.1</version>
					<configuration>
						<source>17</source>
						<additionalOptions>${javadoc.opts}</additionalOptions>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.3.0</version>
					<configuration>
						<archive>
							<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
						</archive>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>test-jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.22.2</version>
					<configuration>
						<encoding>UTF-8</encoding>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>3.0.1</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.2.1</version>
				</plugin>

				<plugin>
					<groupId>biz.aQute.bnd</groupId>
					<artifactId>bnd-maven-plugin</artifactId>
					<version>${bnd.version}</version>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>versions-maven-plugin</artifactId>
					<version>2.8.1</version>
				</plugin>

				<plugin>
					<groupId>org.apache.karaf.tooling</groupId>
					<artifactId>karaf-maven-plugin</artifactId>
					<version>${karaf.tooling.version}</version>
					<extensions>true</extensions>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>

				<!-- Plugins for copying of Webjars and Java dependencies into the projects. -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.2.0</version>
					<executions>
						<execution>
							<id>embed-webjars</id>
							<phase>none</phase>
							<goals>
								<goal>unpack-dependencies</goal>
							</goals>
							<configuration>
								<includeGroupIds>org.webjars, org.webjars.bower,
									org.webjars.npm
								</includeGroupIds>
								<outputDirectory>${project.build.outputDirectory}</outputDirectory>
								<includeScope>provided</includeScope>
								<includes>META-INF/resources/webjars/**</includes>
								<excludes>**/src/**</excludes>
								<overWriteIfNewer>true</overWriteIfNewer>
							</configuration>
						</execution>
					</executions>
				</plugin>

				<!-- Ignore flatten plugin in M2E -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.codehaus.mojo
										</groupId>
										<artifactId>
											flatten-maven-plugin
										</artifactId>
										<versionRange>
											[1.1.0,)
										</versionRange>
										<goals>
											<goal>flatten</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.maven.plugins
										</groupId>
										<artifactId>
											maven-antrun-plugin
										</artifactId>
										<versionRange>
											[1.8,)
										</versionRange>
										<goals>
											<goal>run</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute></execute>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<excludes>
					<exclude>.keep</exclude>
				</excludes>
			</resource>

			<resource>
				<directory>.</directory>
				<includes>
					<include>icons/**</include>
					<include>schema/*.exsd</include>
					<include>about.html</include>
					<include>plugin.xml</include>
					<include>plugin.properties</include>
				</includes>
			</resource>

			<resource>
				<directory>src/main/webapp</directory>
				<excludes>
					<exclude>.keep</exclude>
				</excludes>
			</resource>
		</resources>
	</build>

	<repositories>
		<repository>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
			<id>central-snapshots</id>
			<url>https://central.sonatype.com/repository/maven-snapshots/</url>
		</repository>
	</repositories>

	<modules>
		<module>bundles/vendor/net.enilink.bundles.liftweb</module>
		<module>bundles/core/net.enilink.platform.core</module>
		<module>bundles/core/net.enilink.platform.security</module>
		<module>bundles/web/net.enilink.platform.lift</module>
		<module>bundles/web/net.enilink.platform.web</module>
		<module>bundles/web/net.enilink.platform.ldp</module>
		<module>bundles/workbench/net.enilink.platform.workbench</module>
	</modules>

	<profiles>
		<profile>
			<id>doclint-java8-disable</id>
			<activation>
				<jdk>[1.8,)</jdk>
			</activation>
			<properties>
				<javadoc.opts>-Xdoclint:none</javadoc.opts>
			</properties>
		</profile>

		<profile>
			<id>release</id>
			<modules>
				<module>features</module>
				<module>products/enilink-server</module>
			</modules>
		</profile>

		<profile>
			<id>versions</id>
			<modules>
				<module>bundles/vendor</module>
				<module>features</module>
				<module>products/enilink-server</module>
				<module>launch/equinox</module>
				<module>launch/equinox-workbench</module>
				<module>launch/karaf</module>
				<module>launch/pde</module>
			</modules>
		</profile>

		<profile>
			<id>central</id>

			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.central</groupId>
						<artifactId>central-publishing-maven-plugin</artifactId>
						<version>0.8.0</version>
						<extensions>true</extensions>
						<configuration>
							<publishingServerId>central</publishingServerId>
							<ignorePublishedComponents>true</ignorePublishedComponents>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
