<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>net.bbmsoft</groupId>
	<artifactId>bbmsoft-parent</artifactId>
	<version>3.0.0</version>

	<name>BBMSoft Parent POM</name>

	<description>Parent pom of all projects developed at http://gitlab.com/bbmsoft.net/</description>

	<url>http://gitlab.com/bbmsoft.net/bbmsoft-parent/</url>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Michael Bachmann</name>
			<email>kontakt@babymotte.de</email>
			<organization>bbmsoft.net</organization>
			<organizationUrl>https://gitlab.com/bbmsoft.net/</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git://gitlab.com/bbmsoft.net/bbmsoft-parent.git</connection>
		<developerConnection>scm:git:ssh://gitlab.com/bbmsoft.net/bbmsoft-parent.git</developerConnection>
		<url>http://gitlab.com/bbmsoft.net/bbmsoft-parent/tree/master</url>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>1.8</java.version>
		<jar.plugin.version>3.0.2</jar.plugin.version>
		<bnd.plugin.version>4.1.0</bnd.plugin.version>
		<compiler.plugin.version>3.0</compiler.plugin.version>
		<source.plugin.version>3.0.1</source.plugin.version>
		<javadoc.plugin.version>2.10.4</javadoc.plugin.version>
		<install.plugin.version>2.5.2</install.plugin.version>
		<surefire.plugin.version>2.12.4</surefire.plugin.version>
		<spotbugs.plugin.version>3.1.9</spotbugs.plugin.version>
		<gpg.plugin.version>1.6</gpg.plugin.version>
		<osgi.version>6.0.0</osgi.version>
		<slf4j.version>1.7.25</slf4j.version>
		<junit.version>4.12</junit.version>
		<mockito.version>1.10.19</mockito.version>
		<logback.version>1.2.3</logback.version>
		<maven.source.skip>true</maven.source.skip>
		<maven.javadoc.skip>true</maven.javadoc.skip>
	</properties>

	<packaging>pom</packaging>


	<dependencies>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>osgi.core</artifactId>
			<version>${osgi.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>osgi.annotation</artifactId>
			<version>${osgi.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>osgi.cmpn</artifactId>
			<version>${osgi.version}</version>
			<scope>provided</scope>
		</dependency>

	</dependencies>

	<dependencyManagement>
		<dependencies>

			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>

			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>${logback.version}</version>
				<scope>runtime</scope>
			</dependency>

		</dependencies>
	</dependencyManagement>

	<build>

		<defaultGoal>install</defaultGoal>

		<plugins>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${compiler.plugin.version}</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${surefire.plugin.version}</version>
				<configuration>
					<skip>${skipTests}</skip>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<version>${jar.plugin.version}</version>
				<configuration>
					<archive>
						<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
					</archive>
					<skip>${skipPackage}</skip>
				</configuration>
			</plugin>

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

				<executions>
					<execution>
						<goals>
							<goal>bnd-process</goal>
						</goals>
						<configuration>
							<skip>${skipPackage}</skip>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${source.plugin.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
						<configuration>
							<skipSource>${maven.source.skip}</skipSource>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${javadoc.plugin.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<skip>${maven.javadoc.skip}</skip>
						</configuration>
					</execution>
				</executions>
				<configuration>
					<additionalJOptions>
						<additionalJOption>-javafx</additionalJOption>
					</additionalJOptions>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
				<version>${install.plugin.version}</version>
				<executions>
					<execution>
						<id>default-install</id>
						<configuration>
							<skip>${skipPackage}</skip>
						</configuration>
					</execution>
					<execution>
						<id>default-test</id>
						<configuration>
							<skip>${skipPackage}</skip>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-maven-plugin</artifactId>
				<version>${spotbugs.plugin.version}</version>
			</plugin>

		</plugins>

	</build>

	<distributionManagement>
		<snapshotRepository>
			<id>${snapshot.repo.id}</id>
			<url>${snapshot.repo.url}</url>
		</snapshotRepository>
		<repository>
			<id>${staging.repo.id}</id>
			<url>${staging.repo.url}</url>
		</repository>
	</distributionManagement>

	<profiles>

		<profile>

			<id>deploy</id>

			<properties>
				<maven.source.skip>false</maven.source.skip>
				<maven.javadoc.skip>false</maven.javadoc.skip>
			</properties>

			<build>

				<defaultGoal>clean install spotbugs:check</defaultGoal>

				<plugins>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${gpg.plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<keyname>${gpg.keyname}</keyname>
									<passphraseServerId>${gpg.serverid}</passphraseServerId>
								</configuration>
							</execution>
						</executions>
					</plugin>

				</plugins>

			</build>

		</profile>

	</profiles>

	<modules>
		<module>bbmsoft-osgi-launch-dependencies</module>
	</modules>

</project>
