<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (c) Contributors to the Eclipse Foundation
   
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
   
        http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
   
    SPDX-License-Identifier: Apache-2.0
 -->
<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>

	<groupId>org.osgi</groupId>
	<artifactId>org.osgi.test.parent</artifactId>
	<description>OSGi Testing Support Parent</description>
	<name>${project.groupId}:${project.artifactId}</name>
	<packaging>pom</packaging>
	<version>${revision}</version>

	<properties>
		<revision>1.0.0</revision>
		<project.build.outputTimestamp>1980-02-01T00:00:00Z</project.build.outputTimestamp>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>1.8</java.version>
		<java.release>8</java.release>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<bnd.version>5.3.0</bnd.version>
		<junit-jupiter.compile.version>5.6.0</junit-jupiter.compile.version>
		<junit-platform.compile.version>1.6.0</junit-platform.compile.version>
		<junit-jupiter.version>5.7.2</junit-jupiter.version>
		<junit-platform.version>1.7.2</junit-platform.version>
		<assertj.version>3.19.0</assertj.version>
	</properties>

	<modules>
		<module>org.osgi.test.common</module>
		<module>org.osgi.test.assertj.framework</module>
		<module>org.osgi.test.assertj.promise</module>
		<module>org.osgi.test.junit4</module>
		<module>org.osgi.test.junit5</module>
		<module>org.osgi.test.junit5.cm</module>
		<module>org.osgi.test.bom</module>
	</modules>

	<url>https://www.osgi.org</url>
	<organization>
		<name>Eclipse Foundation</name>
		<url>https://www.eclipse.org</url>
	</organization>
	<licenses>
		<license>
			<name>Apache-2.0</name>
			<comments>Apache License, Version 2.0</comments>
			<url>https://opensource.org/licenses/Apache-2.0</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<scm>
		<url>https://github.com/osgi/osgi-test</url>
		<connection>scm:git:https://github.com/osgi/osgi-test.git</connection>
		<developerConnection>scm:git:git@github.com:osgi/osgi-test.git</developerConnection>
		<tag>HEAD</tag>
	</scm>
	<developers>
		<developer>
			<id>bjhargrave</id>
			<name>BJ Hargrave</name>
			<email>hargrave@us.ibm.com</email>
			<url>https://github.com/bjhargrave</url>
			<organization>IBM</organization>
			<organizationUrl>https://developer.ibm.com</organizationUrl>
			<roles>
				<role>developer</role>
			</roles>
			<timezone>America/New_York</timezone>
		</developer>
		<developer>
			<id>rotty3000</id>
			<name>Ray Augé</name>
			<email>raymond.auge@liferay.com</email>
			<url>https://rotty3000.github.io</url>
			<organization>Liferay Inc.</organization>
			<organizationUrl>https://www.liferay.com</organizationUrl>
			<roles>
				<role>developer</role>
			</roles>
			<timezone>America/New_York</timezone>
		</developer>
		<developer>
			<id>kriegfrj</id>
			<name>Fr Jeremy Krieg</name>
			<email>fr.jkrieg@greekwelfaresa.org.au</email>
			<timezone>Australia/Adelaide</timezone>
		</developer>
	</developers>
	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/osgi/osgi-test/issues</url>
	</issueManagement>
	<mailingLists>
		<mailingList>
			<name>OSGi Users List</name>
			<post>osgi-users@eclipse.org</post>
			<archive>http://www.eclipse.org/lists/osgi-users</archive>
		</mailingList>
	</mailingLists>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>biz.aQute.bnd</groupId>
					<artifactId>bnd-maven-plugin</artifactId>
					<version>${bnd.version}</version>
					<executions>
						<execution>
							<id>bnd-process</id>
							<phase>process-classes</phase>
							<goals>
								<goal>bnd-process</goal>
							</goals>
							<configuration>
								<bnd><![CDATA[
-includeresource.legal:\
 "META-INF/=${project.parent.basedir}/LICENSE",\
 "META-INF/=${project.parent.basedir}/NOTICE"
]]></bnd>
							</configuration>
						</execution>
						<!-- Integration Test Configuration -->
						<execution>
							<id>bnd-process-tests</id>
							<phase>process-test-classes</phase>
							<goals>
								<goal>bnd-process-tests</goal>
							</goals>
							<configuration>
								<artifactFragment>true</artifactFragment>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>biz.aQute.bnd</groupId>
					<artifactId>bnd-resolver-maven-plugin</artifactId>
					<version>${bnd.version}</version>
					<executions>
						<!-- Integration Test Configuration -->
						<execution>
							<id>resolve-test</id>
							<phase>pre-integration-test</phase>
							<goals>
								<goal>resolve</goal>
							</goals>
							<configuration>
								<bndruns>
									<bndrun>test.bndrun</bndrun>
								</bndruns>
								<bundles>
									<bundle>${project.build.directory}/${project.build.finalName}-tests.jar</bundle>
								</bundles>
								<failOnChanges>false</failOnChanges>
								<includeDependencyManagement>true</includeDependencyManagement>
								<reportOptional>false</reportOptional>
								<scopes>
									<scope>compile</scope>
									<scope>runtime</scope>
									<scope>test</scope>
								</scopes>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>biz.aQute.bnd</groupId>
					<artifactId>bnd-testing-maven-plugin</artifactId>
					<version>${bnd.version}</version>
					<executions>
						<!-- OSGi integration tests execution -->
						<execution>
							<id>testing</id>
							<goals>
								<goal>testing</goal>
							</goals>
							<configuration>
								<bndruns>
									<bndrun>test.bndrun</bndrun>
								</bndruns>
								<bundles>
									<bundle>${project.build.directory}/${project.build.finalName}-tests.jar</bundle>
								</bundles>
								<failOnChanges>false</failOnChanges>
								<includeDependencyManagement>true</includeDependencyManagement>
								<resolve>false</resolve>
								<scopes>
									<scope>compile</scope>
									<scope>runtime</scope>
									<scope>test</scope>
								</scopes>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>biz.aQute.bnd</groupId>
					<artifactId>bnd-baseline-maven-plugin</artifactId>
					<version>${bnd.version}</version>
					<executions>
						<execution>
							<id>baseline</id>
							<goals>
								<goal>baseline</goal>
							</goals>
							<configuration>
								<failOnMissing>false</failOnMissing>
								<fullReport>true</fullReport>
								<includeDistributionManagement>false</includeDistributionManagement>
								<diffignores>
									<diffignore>Bundle-Version</diffignore>
								</diffignores>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
					<configuration>
						<showWarnings>true</showWarnings>
						<showDeprecation>true</showDeprecation>
						<compilerArgs>
							<arg>-Xlint:unchecked</arg>
						</compilerArgs>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.2.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.2.0</version>
					<configuration>
						<archive>
							<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
						</archive>
					</configuration>
					<executions>
						<execution>
							<id>test-jar</id>
							<phase>package</phase>
							<goals>
								<goal>test-jar</goal>
							</goals>
							<configuration>
								<archive>
									<manifestFile>${project.build.testOutputDirectory}/META-INF/MANIFEST.MF</manifestFile>
								</archive>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.22.2</version>
					<!-- We let bnd-testing-maven-plugin do all the testing -->
					<configuration>
						<skipTests>true</skipTests>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.5.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.2.1</version>
					<executions>
						<execution>
							<id>attach-sources</id>
							<phase>verify</phase>
							<goals>
								<goal>jar-no-fork</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.3.0</version>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<phase>verify</phase>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<detectJavaApiLink>false</detectJavaApiLink>
						<doclint>none</doclint>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>3.0.1</version>
					<executions>
						<execution>
							<id>sign-artifacts</id>
							<phase>verify</phase>
							<goals>
								<goal>sign</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.8</version>
					<extensions>true</extensions>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>flatten-maven-plugin</artifactId>
					<version>1.2.7</version>
					<configuration>
						<flattenMode>oss</flattenMode>
					</configuration>
					<executions>
						<execution>
							<id>flatten</id>
							<phase>process-resources</phase>
							<goals>
								<goal>flatten</goal>
							</goals>
						</execution>
						<execution>
							<id>flatten-clean</id>
							<phase>clean</phase>
							<goals>
								<goal>clean</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<!-- generate jacoco report -->
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>0.8.7</version>
					<executions>
						<execution>
							<id>default-prepare-agent</id>
							<goals>
								<goal>prepare-agent</goal>
							</goals>
						</execution>
						<execution>
							<id>default-prepare-agent-integration</id>
							<goals>
								<goal>prepare-agent-integration</goal>
							</goals>
						</execution>
						<execution>
							<id>default-report</id>
							<goals>
								<goal>report</goal>
							</goals>
						</execution>
						<execution>
							<id>default-report-integration</id>
							<goals>
								<goal>report-integration</goal>
							</goals>
						</execution>
						<!-- <execution>
							<id>default-check</id>
							<goals>
							<goal>check</goal>
							</goals>
							<configuration>
							<rules>
							<rule>
							<element>BUNDLE</element>
							<limits>
							<limit>
							<counter>COMPLEXITY</counter>
							<value>COVEREDRATIO</value>
							<minimum>0.60</minimum>
							</limit>
							</limits>
							</rule>
							</rules>
							</configuration>
							</execution>
						-->
					</executions>
				</plugin>
				<!--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>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>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>biz.aQute.bnd</groupId>
				<artifactId>bnd-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>bnd-process</id>
						<goals>
							<goal>bnd-process</goal>
						</goals>
						<inherited>false</inherited>
						<configuration>
							<skip>true</skip>
						</configuration>
					</execution>
					<!-- Integration Test Configuration -->
					<execution>
						<id>bnd-process-tests</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>bnd-process-tests</goal>
						</goals>
						<inherited>false</inherited>
						<configuration>
							<skip>true</skip>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>biz.aQute.bnd</groupId>
				<artifactId>bnd-resolver-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>resolve-test</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>resolve</goal>
						</goals>
						<inherited>false</inherited>
						<configuration>
							<skip>true</skip>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>biz.aQute.bnd</groupId>
				<artifactId>bnd-testing-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>testing</id>
						<goals>
							<goal>testing</goal>
						</goals>
						<inherited>false</inherited>
						<configuration>
							<skip>true</skip>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>biz.aQute.bnd</groupId>
				<artifactId>bnd-baseline-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>baseline</id>
						<goals>
							<goal>baseline</goal>
						</goals>
						<!-- Disable baseline validation until we are at version > 1.0.0.
							Then change inherited to false. -->
						<inherited>true</inherited>
						<configuration>
							<skip>true</skip>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>flatten-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.osgi</groupId>
				<artifactId>osgi.annotation</artifactId>
				<version>8.0.0</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>org.osgi</groupId>
				<artifactId>org.osgi.service.log</artifactId>
				<version>1.4.0</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>org.osgi</groupId>
				<artifactId>osgi.core</artifactId>
				<version>6.0.0</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>org.osgi</groupId>
				<artifactId>org.osgi.service.cm</artifactId>
				<version>1.6.0</version>
				<scope>compile</scope>
			</dependency>
			<dependency>
				<groupId>org.osgi</groupId>
				<artifactId>org.osgi.util.function</artifactId>
				<version>1.0.0</version>
				<scope>compile</scope>
			</dependency>
			<dependency>
				<groupId>org.osgi</groupId>
				<artifactId>org.osgi.util.promise</artifactId>
				<version>1.0.0</version>
				<scope>compile</scope>
			</dependency>
			<dependency>
				<groupId>org.assertj</groupId>
				<artifactId>assertj-core</artifactId>
				<version>${assertj.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-api</artifactId>
				<version>${junit-jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.platform</groupId>
				<artifactId>junit-platform-commons</artifactId>
				<version>${junit-platform.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-params</artifactId>
				<version>${junit-jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-engine</artifactId>
				<version>${junit-jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.platform</groupId>
				<artifactId>junit-platform-engine</artifactId>
				<version>${junit-platform.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.platform</groupId>
				<artifactId>junit-platform-launcher</artifactId>
				<version>${junit-platform.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.platform</groupId>
				<artifactId>junit-platform-testkit</artifactId>
				<version>${junit-platform.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>3.11.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.servicemix.bundles</groupId>
				<artifactId>org.apache.servicemix.bundles.junit</artifactId>
				<version>4.13.2_1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.eclipse.platform</groupId>
				<artifactId>org.eclipse.osgi</artifactId>
				<version>3.16.200</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.felix</groupId>
				<artifactId>org.apache.felix.configadmin</artifactId>
				<version>1.9.22</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.felix</groupId>
				<artifactId>org.apache.felix.logback</artifactId>
				<version>1.0.2</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<profiles>
		<profile>
			<id>java-release</id>
			<activation>
				<jdk>[9,)</jdk>
			</activation>
			<properties>
				<maven.compiler.release>${java.release}</maven.compiler.release>
			</properties>
		</profile>
		<profile>
			<id>bnd-next</id>
			<properties>
				<bnd.version>6.0.0-SNAPSHOT</bnd.version>
			</properties>
			<repositories>
				<repository>
					<id>bnd-snapshots</id>
					<url>https://bndtools.jfrog.io/bndtools/libs-snapshot/</url>
					<layout>default</layout>
					<releases>
						<enabled>false</enabled>
					</releases>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>bnd-snapshots</id>
					<url>https://bndtools.jfrog.io/bndtools/libs-snapshot/</url>
					<layout>default</layout>
					<releases>
						<enabled>false</enabled>
					</releases>
				</pluginRepository>
			</pluginRepositories>
		</profile>
		<profile>
			<id>jacoco</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>ossrh</id>
			<properties>
				<skipTests>true</skipTests>
				<maven.test.skip>true</maven.test.skip>
				<bnd.baseline.skip>true</bnd.baseline.skip>
				<bnd.resolve.skip>true</bnd.resolve.skip>
				<jacoco.skip>true</jacoco.skip>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						</configuration>
					</plugin>
				</plugins>
			</build>
			<distributionManagement>
				<snapshotRepository>
					<id>ossrh</id>
					<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
				</snapshotRepository>
			</distributionManagement>
		</profile>
	</profiles>

</project>
