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

	<!--
	***********************************************************************************************
		NOTE: Because Aloha is the parent, we automatically include a Scala build 
		plugin even though there isn't any Scala source or dependency in this project. 
		This may give a compiler warning and may add a few seconds to the build but 
		will not add any superfluous Maven dependencies. 
	***********************************************************************************************
	-->

	<modelVersion>4.0.0</modelVersion>
	<groupId>com.eharmony</groupId>
	<artifactId>aloha-proto</artifactId>
	<version>2.0.0</version>
	<name>${project.artifactId}</name>
	<description>Protocol Buffer definitions for Aloha.</description>
	<url>https://github.com/eHarmony/aloha-proto</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!-- Same as "protobuf.version" property in the aloha project. -->
		<protobuf.version>2.4.1</protobuf.version>
		<protoc>protoc</protoc>
	</properties>

	<distributionManagement>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://opensource.org/licenses/MIT</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git@github.com:eHarmony/aloha-proto.git</connection>
		<url>git@github.com:eHarmony/aloha-proto.git</url>
		<developerConnection>scm:git:git@github.com:eHarmony/aloha-proto.git</developerConnection>
	  <tag>aloha-proto-2.0.0</tag>
  </scm>

	<pluginRepositories>
		<pluginRepository>
			<id>dtrott-protoc-plugin</id>
			<url>http://maven.davidtrott.com/repository</url>
			<layout>default</layout>
			<releases>
				<enabled>true</enabled>
			</releases>
		</pluginRepository>
	</pluginRepositories>

	<developers>
		<developer>
			<id>ryan</id>
			<name>Ryan Deak</name>
			<email>rdeak@eharmony.com</email>
			<organization>eHarmony</organization>
			<organizationUrl>http://www.eharmony.com</organizationUrl>
			<roles>
				<role>creator</role>
				<role>developer</role>
			</roles>
			<timezone>-8</timezone>
		</developer>
	</developers>

	<dependencies>
		<dependency>
			<groupId>com.google.protobuf</groupId>
			<artifactId>protobuf-java</artifactId>
			<version>${protobuf.version}</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<version>3.1</version>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>

			<!-- Generate the protocol buffer source. -->
			<plugin>
				<groupId>com.google.protobuf.tools</groupId>
				<artifactId>maven-protoc-plugin</artifactId>
				<version>0.1.10</version>
				<configuration>
					<protocExecutable>${protoc}</protocExecutable>
				</configuration>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>compile</goal>
							<goal>testCompile</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireUpperBoundDeps />
                                <banDuplicateClasses>
                                    <ignoreClasses />
                                    <findAllDuplicates>true</findAllDuplicates>
                                </banDuplicateClasses>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>extra-enforcer-rules</artifactId>
                        <version>1.0-alpha-3</version>
                    </dependency>
                </dependencies>
            </plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.2</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy</goals>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
					   	<artifactId>maven-scm-provider-gitexe</artifactId>
					   	<version>1.3</version>
			   		</dependency>
	   			</dependencies>

			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.8.1</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.1.2</version>
						<executions>
							<execution>
								<id>attach-sources</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>
						<configuration>
							<gpgArguments>
								<argument>--no-tty</argument>
							</gpgArguments>
						</configuration>
						<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.6</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
