<?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 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>de.ibapl.spsw</groupId>
	<artifactId>spsw-project</artifactId>
	<packaging>pom</packaging>
	<version>2.1.0</version>
	<name>SPSW</name>
	<url>https://github.com/aploese/spsw</url>
	<inceptionYear>2009</inceptionYear>

	<description>
        Access the serial port with spsw subpackages.
    </description>

	<organization>
		<name>Arne Plöse</name>
	</organization>

	<properties>
		<project.scm.id>github</project.scm.id>
		<compile.source>1.8</compile.source>
		<compile.target>1.8</compile.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<license.licenseName.lgpl>spsw-lgpl-3</license.licenseName.lgpl>
	</properties>

	<developers>
		<developer>
			<id>apl</id>
			<name>Arne Plöse</name>
			<email>aploese@gmx.de</email>
			<url>http://github.com/aploese</url>
			<roles>
				<role>architect</role>
				<role>developer</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
	</developers>

	<!-- Licenses -->
	<licenses>
		<license>
			<name>GNU LESSER GENERAL PUBLIC LICENSE, Version 3</name>
			<url>http://www.gnu.org/licenses/lgpl.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<issueManagement>
		<url>https://github.com/aploese/spsw/issues</url>
		<system>GitHub Issues</system>
	</issueManagement>

	<!--repositories> <repository> <id>sonatype-nexus-snapshots</id> <name>Sonatype 
		Nexus Snapshots</name> <url>https://oss.sonatype.org/content/repositories/snapshots</url> 
		<releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> 
		</snapshots> </repository> </repositories -->

	<profiles>

		<profile>
			<id>release</id>
			<properties>
				<!-- Exclude all HW tests -->
				<excludeJunit5Tags>Baseline,DtrDsr,HighSpeed,LowSpeed,NotSupportedByDevice,RtsCts,SlowTest</excludeJunit5Tags>
				<includeJunit5Tags />
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>BaselineTests</id>
			<properties>
				<excludeJunit5Tags />
				<includeJunit5Tags>Baseline</includeJunit5Tags>
			</properties>
		</profile>

		<profile>
			<id>RtsCtsTests</id>
			<properties>
				<excludeJunit5Tags />
				<includeJunit5Tags>RtsCts</includeJunit5Tags>
			</properties>
		</profile>
	</profiles>


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


	<scm>
		<url>https://github.com/aploese/spsw</url>
		<connection>scm:git:https://github.com/aploese/spsw.git</connection>
		<developerConnection>scm:git:git@github.com:aploese/spsw.git</developerConnection>
	  <tag>spsw-project-2.1.0</tag>
  </scm>


	<modules>
		<module>de.ibapl.spsw.api</module>
		<module>de.ibapl.spsw.api.tests</module>
		<module>de.ibapl.spsw.jniprovider</module>
		<module>de.ibapl.spsw.jnhwprovider</module>
	</modules>

	<!-- Dependency Management and Dependencies to Inherit -->
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.osgi</groupId>
				<artifactId>org.osgi.annotation</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.osgi</groupId>
				<artifactId>org.osgi.service.component.annotations</artifactId>
				<version>1.3.0</version>
				<!--TODO using 1.4.0 will bring lots of unresolved issues in integration 
					tests .... -->
			</dependency>
			<dependency>
				<groupId>de.ibapl.jnhw</groupId>
				<artifactId>de.ibapl.jnhw.libloader</artifactId>
				<version>[1.0.0,1.1.0)</version>
			</dependency>
			<dependency>
				<groupId>de.ibapl.jnhw</groupId>
				<artifactId>de.ibapl.jnhw.posix</artifactId>
				<version>[1.0.0,1.1.0)</version>
			</dependency>
			<dependency>
				<groupId>de.ibapl.jnhw</groupId>
				<artifactId>de.ibapl.jnhw.winapi</artifactId>
				<version>[1.0.0,1.1.0)</version>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-api</artifactId>
				<version>5.4.2</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-engine</artifactId>
				<version>5.4.2</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-params</artifactId>
				<version>5.4.2</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>


	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>3.0.0-M3</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
					<configuration>
						<source>${compile.source}</source>
						<target>${compile.target}</target>
						<encoding>${sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>3.0</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.1.2</version>
					<configuration>
						<archive>
							<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.3</version>
					<configuration>
						<localCheckout>true</localCheckout>
						<pushChanges>false</pushChanges>
					</configuration>
				</plugin>
				<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>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>biz.aQute.bnd</groupId>
					<artifactId>bnd-maven-plugin</artifactId>
					<version>4.2.0</version>
					<executions>
						<execution>
							<goals>
								<goal>bnd-process</goal>
							</goals>
						</execution>
					</executions>
					<configuration />
				</plugin>
				<plugin>
					<groupId>biz.aQute.bnd</groupId>
					<artifactId>bnd-testing-maven-plugin</artifactId>
					<version>4.2.0</version>
					<executions>
						<execution>
							<goals>
								<goal>testing</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

			</plugins>

		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>biz.aQute.bnd</groupId>
				<artifactId>bnd-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-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.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<inherited>false</inherited>
				<configuration>
					<failIfMissing>true</failIfMissing>
					<aggregate>true</aggregate>
					<strictCheck>true</strictCheck>
					<properties>
						<copyright-range>${project.inceptionYear}-2019</copyright-range>
					</properties>
				</configuration>
				<executions>
					<execution>
						<id>check-java-headers</id>
						<phase>verify</phase>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<header>header-template-lgpl-java.txt</header>
							<mapping>
								<java>SLASHSTAR_STYLE</java>
							</mapping>
							<includes>
								<include>**/*.java</include>
							</includes>
							<excludes>
							</excludes>
						</configuration>
					</execution>
					<execution>
						<id>check-c-headers-and-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<header>header-template-lgpl-java.txt</header>
							<mapping>
								<c>SLASHSTAR_STYLE</c>
							</mapping>
							<includes>
								<include>**/*.c</include>
								<include>**/*.h</include>
							</includes>
							<excludes>
								<exclude>**/jni-includes/**</exclude>
								<exclude>de.ibapl.spsw.jniprovider/config.h</exclude>
							</excludes>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>
