<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>

	<!-- Maven Coordinates -->
	<groupId>de.serviceflow</groupId>
	<artifactId>lbt4j</artifactId>
	<version>0.2.0</version>
	<packaging>jar</packaging>

	<prerequisites>
		<maven>3.2.5</maven>
	</prerequisites>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	</properties>

	<scm>
		<connection>scm:git:https://github.com/olir/lbt4j.git</connection>
		<developerConnection>scm:git:https://github.com/olir/lbt4j.git</developerConnection>
		<url>https://github.com/olir/lbt4j.git</url>
		<tag>HEAD</tag>
	</scm>

	<!-- set version then mvn clean deploy, then check at https://oss.sonatype.org/ ,
	     Select Staging Repositories, select entry, close, release. in case of error
		 check http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22nexus-staging-maven-plugin%22 
		 for latest version. -->
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
	</distributionManagement>


	<!-- More Project Information -->
	<name>lbt4j</name>
	<description>lbt4j.</description>
	<url>https://github.com/olir/lbt4j</url>
	<inceptionYear>2016</inceptionYear>
	<organization>
		<name>Oliver Rode</name>
		<url>http://www.serviceflow.de/</url>
	</organization>
	<licenses>
		<license>
			<name>LGPL, Version 2.1</name>
			<url>http://www.gnu.de/documents/lgpl-2.1.en.html</url>
			<distribution>repo</distribution>
			<comments>
			For the API documentation of BlueZ:
			
 This GNU Lesser General Public License counts as the successor of the GNU Library General Public License. For an explaination of why this change was necessary, read the Why you shouldn't use the Lesser GPL for your next library article.

Copyright © 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 
			</comments>
		</license>

	</licenses>
	<issueManagement>
		<url>https://github.com/olir/lbt4j/issues</url>
		<system>github</system>
	</issueManagement>
	<developers>
		<developer>
			<id>olir</id>
			<name>Oliver Rode</name>
			<url>https://github.com/olir</url>
			<roles>
				<role>project administrator</role>
				<role>architect</role>
				<role>developer</role>
			</roles>
			<timezone>Europe/Berlin</timezone>
		</developer>
	</developers>
	<contributors>
		<!-- No credits so far. -->
	</contributors>

	<!-- POM Relationships -->
	<dependencies>
		<dependency>
			<groupId>de.serviceflow</groupId>
			<artifactId>codegenj</artifactId>
			<version>1.3.2</version>
		</dependency>	
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>2.2.1</version>
		</dependency>
	</dependencies>

	<!-- Build Settings -->
	<build>
		<plugins>
			<!-- compile -->
			<plugin>  
			   <groupId>org.codehaus.mojo</groupId>  
			   <artifactId>exec-maven-plugin</artifactId>  
			   <version>1.1.1</version>  
			   <executions>  
				<execution>  
				 <phase>generate-sources</phase>  
				 <goals>  
				  <goal>java</goal>  
				 </goals>  
				 <configuration>  
				  <mainClass>de.serviceflow.codegenj.CodegenJ</mainClass>  
				  <arguments>  
				   <argument>-d</argument>  
				   <argument>${basedir}/target</argument>  
				   <argument>-l</argument>  
				   <argument>bluezdbus</argument>  
				   <argument>-b</argument>  
				   <argument>org.bluez</argument>  
				   <argument>-i</argument>  
				   <argument>org.bluez.</argument>  
				   <argument>${basedir}/src/main/resources/org_bluez.xml</argument>
				  </arguments>  
				 </configuration>  
				</execution>  
			   </executions>  
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals><goal>add-source</goal></goals>
						<configuration>
							<sources>
								<source>${basedir}/target/generated</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>			  
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.2</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
					<id>make-jni-headers</id>
					<phase>process-classes</phase>
					<goals>
						<goal>run</goal>
					</goals>
					<configuration>
						<tasks>
						   <exec dir="${project.basedir}" executable="javah" failonerror="true">
							   <arg value="-cp"/>
							   <arg value="target/classes"/>
							   <arg value="-d"/>
							   <arg value="target/jni/include"/>
							   <arg value="de.serviceflow.codegenj.ObjectManager"/>
							   <arg value="org.bluez.Adapter1"/>
							   <arg value="org.bluez.Device1"/>
							   <arg value="org.bluez.GattCharacteristic1"/>
							   <arg value="org.bluez.GattDescriptor1"/>
							   <arg value="org.bluez.GattService1"/>
							   <arg value="org.bluez.AgentManager1"/>
							   <arg value="org.bluez.Agent1"/>
						   </exec>
						</tasks>
					</configuration>
				   </execution>				   
				</executions>
				<dependencies>
				   <dependency>
					 <groupId>com.sun</groupId>
					 <artifactId>tools</artifactId>
					 <version>1.7</version>
					 <scope>system</scope>
					 <systemPath>${java.home}/../lib/tools.jar</systemPath>
				   </dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<executions>
				  <execution>
					<phase>package</phase>
					<goals>
					  <goal>jar</goal>
					</goals>
					<configuration>
					  <classesDirectory>${basedir}/target</classesDirectory>
					  <classifier>native</classifier>
					  <includes>
						<include>classes/**/*.class</include>
						<include>classes/**/*.xml</include>
						<include>jni/**/*.c</include>
						<include>jni/**/*.h</include>
						<include>jni/**/Makefile</include>
					  </includes>
					</configuration>
				  </execution>
				</executions>
			</plugin>		
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<executions>
					<execution>
						<id>empty-javadoc-jar</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<classifier>javadoc</classifier>
							<classesDirectory>${basedir}/javadoc</classesDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>			
			<!-- test -->
			<!-- pre-test -->
			<plugin>
			  <artifactId>maven-antrun-plugin</artifactId>
			  <executions>
				<execution>
				  <id>mkdir_classes</id>
				  <phase>test</phase>
				  <configuration>
					<tasks>
					  <mkdir dir="${basedir}/target/classes"/>
					</tasks>
				  </configuration>
				  <goals>
					<goal>run</goal>
				  </goals>
				</execution>
			  </executions>
			</plugin>
			
			<!-- Test plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.12.4</version>
				<configuration>
					<skipTests>true</skipTests>
				</configuration>
			</plugin>			
			
			<!-- release -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.5</version>
				<configuration>
					<skip>false</skip>
				</configuration>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>deploy</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>


			<!-- Reporting: mvn site:run -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.4</version>
				<configuration>
					<port>9000</port>
					<tempWebappDirectory>${basedir}/target/site/tempdir</tempWebappDirectory>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.doxia</groupId>
						<artifactId>doxia-module-markdown</artifactId>
						<version>1.6</version>
					</dependency>
				</dependencies>
			</plugin>
			<!-- travis -->
			<plugin>
				<groupId>org.eluder.coveralls</groupId>
				<artifactId>coveralls-maven-plugin</artifactId>
				<version>4.2.0</version>
				<configuration>
					<repoToken>rIpE5Q655q4J9S6U8FHkLfEe8Q4zW8ydP</repoToken>
				</configuration>				
			</plugin>
			<!-- travis -->
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.7.2.201409121644</version>
				<executions>
					<execution>
						<id>pre-unit-test</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<!-- Sets the path to the file which contains the execution data. -->
							<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
							<!-- Sets the name of the property containing the settings for JaCoCo 
								runtime agent. -->
							<propertyName>surefireArgLine</propertyName>
						</configuration>
					</execution>
					<!-- Ensures that the code coverage report for unit tests is created 
						after unit tests have been run. -->
					<execution>
						<id>post-unit-test</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
						<configuration>
							<!-- Sets the path to the file which contains the execution data. -->
							<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
							<!-- Sets the output directory for the code coverage report. -->
							<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- travis -->
			<!-- NOT STABLE <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> 
				<version>2.7</version> <configuration> <formats> <format>html</format> <format>xml</format> 
				</formats> <maxmem>256m</maxmem> </configuration> </plugin> -->
			<!-- travis -->
			<plugin>
				<groupId>com.github.timurstrekalov</groupId>
				<artifactId>saga-maven-plugin</artifactId>
				<version>1.5.2</version>
				<executions>
					<execution>
						<goals>
							<goal>coverage</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<baseDir>http://localhost:8234</baseDir>
					<outputDir>${project.build.directory}/saga-coverage</outputDir>
					<noInstrumentPatterns>
						<pattern>.*/spec/.*</pattern>
					</noInstrumentPatterns>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!--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.jacoco</groupId>
										<artifactId>
											jacoco-maven-plugin
										</artifactId>
										<versionRange>
											[0.7.2.201409121644,)
										</versionRange>
										<goals>
											<goal>prepare-agent</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<!-- Reporting: mvn site -->
	<reporting>
		<plugins>
			<!-- Default Site Pages -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>2.8</version>
				<reportSets>
					<reportSet>
						<reports>
							<report>index</report>
							<report>summary</report>
							<report>license</report>
							<report>dependencies</report>
							<report>project-team</report>

							<report>cim</report>
							<report>dependency-convergence</report>
							<report>dependency-info</report>
							<report>dependency-management</report>
							<report>distribution-management</report>
							<report>help</report>
							<report>issue-tracking</report>
							<report>mailing-list</report>
							<report>modules</report>
							<report>scm</report>
							<report>plugin-management</report>
							<report>plugins</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<!-- Java Documentation -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.1</version>
				<configuration>
					<doctitle>My API for ${project.name} ${project.version}</doctitle>
					<windowtitle>My API for ${project.name} ${project.version}</windowtitle>

					<testDoctitle>My Test API for ${project.name} ${project.version}</testDoctitle>
					<testWindowtitle>My Test API for ${project.name} ${project.version}</testWindowtitle>
					<show>private</show>
					<failOnError>true</failOnError>
				</configuration>
				<reportSets>
					<reportSet>
						<reports>
							<report>javadoc-no-fork</report>
							<report>test-javadoc-no-fork</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<!-- Source Code Cross-Reference -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jxr-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<linkJavadoc>true</linkJavadoc>
					<javadocDir>${basedir}/target/site/apidocs/</javadocDir>
				</configuration>
			</plugin>

			<!--  -->
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.7.2.201409121644</version>
			</plugin>
		</plugins>
	</reporting>
</project>
