<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>io.openvidu</groupId>
	<artifactId>openvidu-parent</artifactId>
	<version>1.9.0-beta-1</version>
	<packaging>pom</packaging>

	<name>OpenVidu</name>
	<description>OpenVidu parent pom: versioning, dependencies and plugins for all OpenVidu artifacts</description>
	<url>https://openvidu.io</url>

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

	<organization>
		<name>OpenVidu</name>
		<url>https://openvidu.io</url>
	</organization>

	<scm>
		<url>https://github.com/OpenVidu/openvidu.git</url>
		<connection>scm:git:https://github.com/OpenVidu/openvidu.git</connection>
		<developerConnection>scm:git:https://github.com/OpenVidu/openvidu.git</developerConnection>
		<tag>develop</tag>
	</scm>

	<developers>
		<developer>
			<id>openvidu.io</id>
			<name>-openvidu.io Community</name>
			<organization>openvidu.io</organization>
			<organizationUrl>https://openvidu.io</organizationUrl>
		</developer>
	</developers>

	<properties>
		<version.kurento>6.9.0</version.kurento>
		<version.spring-boot>1.4.2.RELEASE</version.spring-boot>
		<version.junit>4.12</version.junit>
		<version.slf4j>1.7.13</version.slf4j>
		<version.mockito>1.10.19</version.mockito>
		<version.powermock>1.6.3</version.powermock>
		<version.hamcrest-core>1.3</version.hamcrest-core>
		<version.hamcrest-library>1.3</version.hamcrest-library>
		<version.json-simple>1.1.1</version.json-simple>
		<version.httpclient>4.5.6</version.httpclient>
		<version.enforcer.plugin>1.4.1</version.enforcer.plugin>
		<version.eclipse.plugin>2.10</version.eclipse.plugin>

		<maven.compiler.target>1.8</maven.compiler.target>
		<maven.compiler.source>1.8</maven.compiler.source>

		<openvidu.scm.url>https://github.com/OpenVidu/openvidu</openvidu.scm.url>
		<openvidu.scm.connection>git@github.com:OpenVidu/openvidu.git</openvidu.scm.connection>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!-- ************** -->
		<!-- Build settings -->
		<!-- ************** -->

		<!-- Cross plugins settings -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<!-- maven-compiler-plugin -->
		<maven.compiler.target>1.8</maven.compiler.target>
		<maven.compiler.source>1.8</maven.compiler.source>

		<!-- Options to override the compiler arguments directly on the compiler 
			arument line to separate between what the IDE understands as the source level 
			and what the Maven compiler actually use. -->
		<maven.compiler.argument.target>${maven.compiler.target}</maven.compiler.argument.target>
		<maven.compiler.argument.source>${maven.compiler.source}</maven.compiler.argument.source>

		<!-- maven-enforcer-plugin -->
		<maven.min.version>3.0.3</maven.min.version>
		<jdk.min.version>${maven.compiler.source}</jdk.min.version>
		<jdk.max.version>${maven.compiler.source}</jdk.max.version>
	</properties>

	<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>

				<!-- Check for the minimum version of Java and Maven. Runs during the 
					validate phase. -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>${version.enforcer.plugin}</version>
				<executions>
					<execution>
						<id>enforce-java-version</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireJavaVersion>
									<message>To build this project JDK ${jdk.min.version} (or
										greater) is required. Please install it.</message>
									<version>${jdk.min.version}</version>
								</requireJavaVersion>
							</rules>
						</configuration>
					</execution>
					<execution>
						<id>enforce-maven-version</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<message>To build this project Maven ${maven.min.version} (or
										greater) is required. Please install it.</message>
									<version>${maven.min.version}</version>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
					<execution>
						<id>enforce-bytecode-version</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<enforceBytecodeVersion>
									<maxJdkVersion>${jdk.max.version}</maxJdkVersion>
								</enforceBytecodeVersion>
							</rules>
							<fail>true</fail>
						</configuration>
					</execution>
					<execution>
						<id>enforce-ban-duplicate-classes</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<banDuplicateClasses>
									<findAllDuplicates>true</findAllDuplicates>
								</banDuplicateClasses>
							</rules>
							<fail>false</fail>
						</configuration>
					</execution>
					<execution>
						<id>enforce-ban-circular-dependencies</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<banCircularDependencies />
							</rules>
							<fail>true</fail>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>extra-enforcer-rules</artifactId>
						<version>1.0-beta-4</version>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<module>openvidu-server</module>
				<module>openvidu-client</module>
				<module>openvidu-test</module>
				<module>openvidu-test-e2e</module>
				<module>openvidu-java-client</module>
			</modules>
		</profile>
		<profile>
			<id>deploy</id>
			<modules>
				<module>openvidu-server</module>
				<module>openvidu-client</module>
				<module>openvidu-test</module>
				<module>openvidu-test-e2e</module>
			</modules>
		</profile>
		<profile>
			<id>integration</id>
			<modules>
				<module>openvidu-demo</module>
				<module>openvidu-sampleapp-minimal</module>
			</modules>
		</profile>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<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>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.10.4</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</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.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.8</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<artifactId>maven-resources-plugin</artifactId>
						<executions>
							<execution>
								<id>copy-resources</id>
								<phase>validate</phase>
								<goals>
									<goal>copy-resources</goal>
								</goals>
								<configuration>
									<outputDirectory>${basedir}/target/classes/static/</outputDirectory>
									<resources>
										<resource>
											<directory>${basedir}/../elastest-torm-gui/dist</directory>
										</resource>
									</resources>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>io.openvidu</groupId>
				<artifactId>openvidu-server</artifactId>
			</dependency>
			<dependency>
				<groupId>io.openvidu</groupId>
				<artifactId>openvidu-client</artifactId>
			</dependency>
			<dependency>
				<groupId>io.openvidu</groupId>
				<artifactId>openvidu-test</artifactId>
			</dependency>
			<dependency>
				<groupId>io.openvidu</groupId>
				<artifactId>openvidu-test-e2e</artifactId>
			</dependency>
			<dependency>
				<groupId>io.openvidu</groupId>
				<artifactId>openvidu-java-client</artifactId>
			</dependency>
		</dependencies>
	</dependencyManagement>

</project>
