<?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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	
	<groupId>ai.olami</groupId>
	<artifactId>olami-java-client-sdk</artifactId>
	<version>0.1.0</version>
	<packaging>pom</packaging>
	
	<name>OLAMI Java Client SDK</name>
	<url>http://olami.ai</url>
	<description>OLAMI APIs Java client library and samples</description>
	
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<jdk.version>1.7</jdk.version>
	</properties>
	
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>olami</name>
            <email>olami.ai@viatech.com</email>
        </developer>
    </developers>
    <scm>
        <connection>scm:git@github.com:olami-developers/olami-java-client-sdk.git</connection>
        <developerConnection>scm:git@github.com:olami-developers/olami-java-client-sdk.git</developerConnection>
        <url>https://github.com/olami-developers/olami-java-client-sdk</url>
    </scm>
	
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>3.8.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>com.google.code.gson</groupId>
				<artifactId>gson</artifactId>
				<version>2.8.0</version>
			</dependency>
		</dependencies>
	</dependencyManagement>
	
	<modules>
		<module>lib</module>
	</modules>
	
	<profiles>
    	<profile>
    		<id>all</id>
			<modules>
				<module>examples/text-input-example</module>
				<module>examples/speech-input-example</module>
				<module>examples/dump-nli-results-example</module>
		        <module>examples/async-text-chatbot-example</module>
			</modules>
		</profile>
    	<profile>
    		<id>release-sign-ossrh</id>
		    <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>
    		<build>
    			<plugins>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.7</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</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-source-plugin</artifactId>
		                <version>3.0.1</version>
		                <executions>
		                    <execution>
		                        <id>attach-sources</id>
		                        <goals>
		                            <goal>jar-no-fork</goal>
		                        </goals>
		                    </execution>
		                </executions>
		            </plugin>
    			</plugins>
    		</build>
    	</profile>
    	<profile>
    		<id>release-sign-bintray</id>
		    <distributionManagement>
				<repository>
					<id>bintray-olami-developers-api-client</id>
					<name>olami-developers-api-client</name>
					<url>https://api.bintray.com/maven/olami-developers/api-client/olami-java-client-sdk/;publish=1</url>
				</repository>
		    </distributionManagement>
		    <build>
		    	<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</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-source-plugin</artifactId>
		                <version>3.0.1</version>
		                <executions>
		                    <execution>
		                        <id>attach-sources</id>
		                        <goals>
		                            <goal>jar-no-fork</goal>
		                        </goals>
		                    </execution>
		                </executions>
		            </plugin>
		    	</plugins>
		    </build>
    	</profile>
    </profiles>
	
    <build>
        <pluginManagement>
	        <plugins>
                <plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.6.1</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.8</version>
                </plugin>
	            <plugin>
	                <groupId>org.apache.maven.plugins</groupId>
	                <artifactId>maven-jar-plugin</artifactId>
	                <version>3.0.2</version>
	            </plugin>
	            <plugin>
	                <groupId>org.apache.maven.plugins</groupId>
	                <artifactId>maven-assembly-plugin</artifactId>
	                <version>3.0.0</version>
                    <configuration>
                        <descriptorRefs>
                            <descriptorRef>jar-with-dependencies</descriptorRef>
                        </descriptorRefs>
                        <appendAssemblyId>false</appendAssemblyId>
                    </configuration>
	            </plugin>
	        </plugins>
        </pluginManagement>   
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>clean</phase>
                        <configuration>
                            <tasks>
                                <delete dir="bin"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
			<plugin>  
				<groupId>org.apache.maven.plugins</groupId>  
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.4</version>
				<configuration>
					<excludePackageNames>org.*</excludePackageNames>
					<additionalparam>-Xdoclint:none</additionalparam>
					<encoding>${chartset.UTF8}</encoding>
					<aggregate>true</aggregate>
					<charset>${chartset.UTF8}</charset>
					<docencoding>${chartset.UTF8}</docencoding>
				</configuration>
				<executions>  
					<execution>
						<id>attach-javadocs</id>  
						<goals>  
							<goal>jar</goal>  
						</goals>  
					</execution>  
				</executions>  
			</plugin>
         </plugins>
    </build>

</project>