<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>org.finos.symphony.toolkit</groupId>
	<artifactId>symphony-java-toolkit</artifactId>
	<version>5.59.0</version>
	<packaging>pom</packaging>

	<name>Symphony Java Toolkit</name>
	<description>A collection of Java projects for building Symphony bots and apps</description>
	<url>https://github.com/finos/symphony-java-toolkit</url>
	
	<parent>
	 <groupId>org.finos</groupId>
	 <artifactId>finos</artifactId>
	 <version>2</version>
	</parent>

	<modules>
		<module>identity</module>
		<module>bindings</module>
		<module>symphony-api-spring-boot-starter</module>
		<module>symphony-app-spring-boot-starter</module>
		<module>entity-json</module>
		<module>quickfix-json</module>
		<module>shared-stream-spring-boot-starter</module>
		<module>chat-workflow-spring-boot-starter</module>
		<module>demos/demo-bot</module>
		<module>demos/demo-app</module>
		<module>demos/poll-bot</module>
		<module>demos/todo-bot</module>
		<module>demos/claim-bot</module>
    	<module>symphony-maven-build-reporter</module>
	</modules>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<spring-boot.version>2.3.4.RELEASE</spring-boot.version>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>

		<!-- this must match the version from the spring boot pom -->
		<jackson-databind.version>2.10.0</jackson-databind.version>
		<jackson.version>2.10.0</jackson.version>

		<!-- this configures the build reporter -->
		<symphony.reporter.identity>${symphony-test-identity}</symphony.reporter.identity>
		<symphony.reporter.recipients>y3EJYqKMwG7Jn7/YqyYdiX///pR3YrnTdA==</symphony.reporter.recipients>
		<symphony.reporter.agent.url>https://develop.symphony.com/agent</symphony.reporter.agent.url>
		<symphony.reporter.pod.url>https://develop.symphony.com/pod</symphony.reporter.pod.url>
		<symphony.reporter.login.url>https://develop.symphony.com/login</symphony.reporter.login.url>
		<symphony.reporter.relay.url>https://develop.symphony.com/relay</symphony.reporter.relay.url>
	</properties>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<organization>
		<name>Finos</name>
		<url>https://github.com/finos</url>
	</organization>

	<developers>
		<developer>
			<id>robmoffat</id>
			<name>Rob Moffat</name>
			<email>rob@kite9.com</email>
			<url>https://robmoff.at</url>
			<organization>Kite9 Ltd</organization>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>vladimirpar</id>
			<name>Vladimir Parnashvili</name>
			<email>vladimir.parnashvili@db.com</email>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<scm>
	  	<developerConnection>scm:git:https://github.com/finos/symphony-java-toolkit</developerConnection>
		<connection>scm:git@github.com:finos/symphony-java-toolkit.git</connection>
		<tag>HEAD</tag>
		<url>https://github.com/finos/symphony-java-toolkit</url>
	</scm>

	<profiles>
		<!-- using this profile creates Javadocs, etc. and signs the jars for upload 
			to maven central -->
		<profile>
			<id>symphony-release</id>
			<build>
				<plugins>
					<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>
						<configuration>
							<interactive>false</interactive>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.1.1</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
              </execution>
            </executions>							
						<configuration> <!-- add this to disable checking -->
							<doclint>none</doclint>
							<failOnError>false</failOnError>
							<source>8</source>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<!-- this profile generates code coverage, should be run by the ci server -->
			<id>symphony-ci</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>0.8.2</version>
						<executions>
							<execution>
								<goals>
									<goal>prepare-agent</goal>
                  <goal>prepare-agent-integration</goal>
								</goals>
							</execution>
 							<execution>
								<id>report</id>
								<phase>test</phase>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						  <execution>
                <id>report-integration</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>report-integration</goal>
                </goals>
              </execution>
						</executions>
					</plugin>
				  <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.18.1</version>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                 <systemPropertyVariables>
		    <symphony-test-identity>${symphony-test-identity}</symphony-test-identity>
                    <symphony-develop-bot1-identity>${symphony-develop-bot1-identity}</symphony-develop-bot1-identity>
                    <symphony-develop-bot2-identity>${symphony-develop-bot2-identity}</symphony-develop-bot2-identity>
                    <proxy>${symphony-proxy}</proxy>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
				</plugins>
			</build>
		</profile>
	</profiles>


  <!-- since we are building
     the build reporter, this must refer to an earlier, built version -->
 	<!-- <build>
		<extensions>
			<extension>
				<groupId>org.finos.symphony.toolkit</groupId>
				<artifactId>symphony-maven-build-reporter</artifactId>

				<version>4.59.6</version>
			</extension>
		</extensions>
	</build>  -->
	
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-core</artifactId>
				<version>${jackson.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>
</project>
