<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">

    <parent>
        <groupId>org.apache</groupId>
        <artifactId>apache</artifactId>
        <version>13</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.apache.hadoop.metadata</groupId>
    <artifactId>metadata-governance</artifactId>
    <version>0.1-incubating-SNAPSHOT</version>
    <description>Metadata Management and Data Governance Platform over Hadoop</description>
    <name>metadata-governance</name>
    <packaging>pom</packaging>
    <url>http://www.apache.org/</url>

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

    <organization>
        <name>Apache Software Foundation</name>
        <url>http://www.apache.org</url>
    </organization>

    <issueManagement>
        <system>JIRA</system>
        <url>https://issues.apache.org/jira/browse/XXX</url>
    </issueManagement>

    <ciManagement>
        <system>Jenkins</system>
        <url>https://builds.apache.org/job/XXX</url>
    </ciManagement>

    <inceptionYear>2014</inceptionYear>

    <properties>
        <!-- platform encoding override -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <slf4j.version>1.7.7</slf4j.version>
        <jetty.version>6.1.26</jetty.version>
        <jersey.version>1.9</jersey.version>
        <blueprints-core.version>2.5.0</blueprints-core.version>
        <titan.version>0.5.2</titan.version>
    </properties>

    <profiles>
        <profile>
            <id>hadoop-2</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <hadoop.version>2.5.0</hadoop.version>
            </properties>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.hadoop</groupId>
                        <artifactId>hadoop-client</artifactId>
                        <version>${hadoop.version}</version>
                        <scope>provided</scope>
                        <exclusions>
                            <exclusion>
                                <groupId>com.sun.jersey</groupId>
                                <artifactId>jersey-server</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>com.sun.jersey</groupId>
                                <artifactId>jersey-core</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>com.sun.jersey</groupId>
                                <artifactId>jersey-json</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>org.glassfish</groupId>
                                <artifactId>javax.servlet</artifactId>
                            </exclusion>
                            <exclusion>
                                <groupId>org.apache.hadoop</groupId>
                                <artifactId>hadoop-annotations</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.hadoop</groupId>
                        <artifactId>hadoop-hdfs</artifactId>
                        <version>${hadoop.version}</version>
                        <scope>provided</scope>
                        <exclusions>
                            <exclusion>
                                <groupId>org.apache.hadoop</groupId>
                                <artifactId>hadoop-annotations</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>

                    <dependency>
                        <groupId>org.apache.hadoop</groupId>
                        <artifactId>hadoop-common</artifactId>
                        <version>${hadoop.version}</version>
                        <scope>provided</scope>
                        <exclusions>
                            <exclusion>
                                <groupId>org.apache.hadoop</groupId>
                                <artifactId>hadoop-annotations</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>

                    <dependency>
                        <groupId>org.apache.hadoop</groupId>
                        <artifactId>hadoop-mapreduce-client-common</artifactId>
                        <version>${hadoop.version}</version>
                        <scope>provided</scope>
                        <exclusions>
                            <exclusion>
                                <groupId>org.apache.hadoop</groupId>
                                <artifactId>hadoop-annotations</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>

                    <dependency>
                        <groupId>org.apache.hadoop</groupId>
                        <artifactId>hadoop-hdfs</artifactId>
                        <version>${hadoop.version}</version>
                        <classifier>tests</classifier>
                        <scope>test</scope>
                    </dependency>

                    <dependency>
                        <groupId>org.apache.hadoop</groupId>
                        <artifactId>hadoop-common</artifactId>
                        <version>${hadoop.version}</version>
                        <classifier>tests</classifier>
                        <scope>test</scope>
                    </dependency>

                    <dependency>
                        <groupId>org.apache.hadoop</groupId>
                        <artifactId>hadoop-yarn-server-resourcemanager</artifactId>
                        <version>${hadoop.version}</version>
                        <scope>provided</scope>
                    </dependency>

                    <dependency>
                        <groupId>org.apache.hadoop</groupId>
                        <artifactId>hadoop-yarn-server-nodemanager</artifactId>
                        <version>${hadoop.version}</version>
                        <scope>provided</scope>
                    </dependency>

                    <dependency>
                        <groupId>org.apache.hadoop</groupId>
                        <artifactId>hadoop-auth</artifactId>
                        <version>${hadoop.version}</version>
                        <scope>provided</scope>
                        <exclusions>
                            <exclusion>
                                <groupId>org.apache.hadoop</groupId>
                                <artifactId>hadoop-annotations</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>

                    <dependency>
                        <groupId>org.apache.hadoop</groupId>
                        <artifactId>hadoop-distcp</artifactId>
                        <version>${hadoop.version}</version>
                        <scope>provided</scope>
                    </dependency>
                </dependencies>
            </dependencyManagement>
        </profile>

        <profile>
            <id>test-patch</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.rat</groupId>
                        <artifactId>apache-rat-plugin</artifactId>
                        <configuration>
                            <useDefaultExcludes>true</useDefaultExcludes>
                            <useMavenDefaultExcludes>true</useMavenDefaultExcludes>
                            <useIdeaDefaultExcludes>true</useIdeaDefaultExcludes>
                            <useEclipseDefaultExcludes>true</useEclipseDefaultExcludes>
                            <excludeSubProjects>true</excludeSubProjects>
                            <excludes>
                                <exclude>*.txt</exclude>
                                <exclude>**/*.txt</exclude>
                                <exclude>.git/**</exclude>
                                <exclude>**/.idea/**</exclude>
                                <exclude>**/*.twiki</exclude>
                                <exclude>**/*.iml</exclude>
                                <exclude>**/target/**</exclude>
                                <exclude>**/activemq-data/**</exclude>
                                <exclude>**/build/**</exclude>
                                <exclude>**/*.patch</exclude>
                                <exclude>derby.log</exclude>
                                <exclude>**/logs/**</exclude>
                                <exclude>**/.classpath</exclude>
                                <exclude>**/.project</exclude>
                                <exclude>**/.settings/**</exclude>
                                <exclude>**/test-output/**</exclude>
                                <exclude>**/data.txt</exclude>
                                <exclude>**/maven-eclipse.xml</exclude>
                                <exclude>**/.externalToolBuilders/**</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <id>rat-check</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
<!--
                        <dependencies>
                            <dependency>
                                <groupId>org.apache.hadoop.metadata</groupId>
                                <artifactId>checkstyle</artifactId>
                                <version>${project.version}</version>
                            </dependency>
                        </dependencies>
-->
                        <executions>
                            <execution>
                                <id>checkstyle-check</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <phase>verify</phase>
                                <configuration>
                                    <consoleOutput>true</consoleOutput>
                                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                                    <configLocation>build/checkstyle.xml</configLocation>
                                    <headerLocation>build/checkstyle-java-header.txt</headerLocation>
                                    <failOnViolation>true</failOnViolation>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>findbugs-maven-plugin</artifactId>
                        <configuration>
                            <!--debug>true</debug -->
                            <xmlOutput>true</xmlOutput>
                            <excludeFilterFile>${basedir}/../build/checkstyle/findbugs-exclude.xml</excludeFilterFile>
                            <failOnError>true</failOnError>
                        </configuration>
                        <executions>
                            <execution>
                                <id>findbugs-check</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Source code metrics: mvn javancss:report or mvn site -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>javancss-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
            <properties>
                <excluded.test.groups/>
            </properties>
        </profile>
    </profiles>

    <modules>
        <module>typesystem</module>
        <module>common</module>
        <module>repository</module>
        <module>webapp</module>
        <module>docs</module>
        <module>metadata-bridge-parent</module>
    </modules>

    <repositories>
        <repository>
            <id>central</id>
            <url>http://repo1.maven.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>hortonworks.repo</id>
            <url>http://repo.hortonworks.com/content/repositories/releases</url>
            <name>Hortonworks Repo</name>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>Codehaus repository</id>
            <url>http://repository.codehaus.org/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>apache.snapshots.repo</id>
            <url>https://repository.apache.org/content/groups/snapshots</url>
            <name>Apache Snapshots Repository</name>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>apache-staging</id>
            <url>https://repository.apache.org/content/groups/staging/</url>
        </repository>
        <repository>
            <id>default</id>
            <url>https://repository.apache.org/content/groups/public/</url>
        </repository>
        <repository>
            <id>java.net-Public</id>
            <name>Maven Java Net Snapshots and Releases</name>
            <url>https://maven.java.net/content/groups/public/</url>
        </repository>
        <repository>
            <id>repository.jboss.org-public</id>
            <name>JBoss repository</name>
            <url>https://repository.jboss.org/nexus/content/groups/public</url>
        </repository>
    </repositories>

    <dependencyManagement>
        <dependencies>
            <!-- Logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
                <scope>compile</scope>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun.jdmk</groupId>
                        <artifactId>jmxtools</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.sun.jmx</groupId>
                        <artifactId>jmxri</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.mail</groupId>
                        <artifactId>mail</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.jms</groupId>
                        <artifactId>jmx</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.jms</groupId>
                        <artifactId>jms</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- commons -->
            <dependency>
                <groupId>commons-configuration</groupId>
                <artifactId>commons-configuration</artifactId>
                <version>1.10</version>
            </dependency>

            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>1.2</version>
            </dependency>

            <dependency>
                <groupId>commons-el</groupId>
                <artifactId>commons-el</artifactId>
                <version>1.0</version>
            </dependency>

            <!-- utilities -->
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>3.0</version>
            </dependency>

            <dependency>
                <groupId>com.google.inject.extensions</groupId>
                <artifactId>guice-throwingproviders</artifactId>
                <version>3.0</version>
            </dependency>

            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>2.5</version>
            </dependency>

            <!-- Jersey -->
            <dependency>
                <groupId>com.sun.jersey</groupId>
                <artifactId>jersey-client</artifactId>
                <version>${jersey.version}</version>
            </dependency>

            <dependency>
                <groupId>com.sun.jersey</groupId>
                <artifactId>jersey-json</artifactId>
                <version>${jersey.version}</version>
            </dependency>

            <dependency>
                <groupId>com.sun.jersey</groupId>
                <artifactId>jersey-server</artifactId>
                <version>${jersey.version}</version>
            </dependency>

            <dependency>
                <groupId>com.sun.jersey</groupId>
                <artifactId>jersey-core</artifactId>
                <version>${jersey.version}</version>
            </dependency>

            <dependency>
                <groupId>javax.servlet.jsp</groupId>
                <artifactId>jsp-api</artifactId>
                <version>2.0</version>
            </dependency>

            <!-- JSON -->
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-core-asl</artifactId>
                <version>1.5.2</version>
            </dependency>

            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-mapper-asl</artifactId>
                <version>1.5.2</version>
            </dependency>

            <dependency>
                <groupId>org.codehaus.jettison</groupId>
                <artifactId>jettison</artifactId>
                <version>1.3</version>
            </dependency>

            <dependency>
                <groupId>com.googlecode.json-simple</groupId>
                <artifactId>json-simple</artifactId>
                <version>1.1.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- Jetty -->
            <dependency>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty</artifactId>
                <version>${jetty.version}</version>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-plus</artifactId>
                <version>${jetty.version}</version>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>net.sourceforge.findbugs</groupId>
                <artifactId>annotations</artifactId>
                <version>1.3.2</version>
            </dependency>

            <!-- Graph DB -->
            <dependency>
                <groupId>com.tinkerpop.blueprints</groupId>
                <artifactId>blueprints-core</artifactId>
                <version>${blueprints-core.version}</version>
            </dependency>

            <dependency>
                <groupId>com.thinkaurelius.titan</groupId>
                <artifactId>titan-core</artifactId>
                <version>${titan.version}</version>
                <exclusions>
                    <!-- rexster does not work with servlet-api -->
                    <exclusion>
                        <groupId>com.tinkerpop.rexster</groupId>
                        <artifactId>rexster-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.tinkerpop.rexster</groupId>
                        <artifactId>rexster-server</artifactId>
                    </exclusion>
                    <!-- asm 4.0 does not work with jersey asm 3.1 -->
                    <exclusion>
                        <groupId>com.tinkerpop</groupId>
                        <artifactId>frames</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.esotericsoftware.reflectasm</groupId>
                        <artifactId>reflectasm</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.thinkaurelius.titan</groupId>
                <artifactId>titan-berkeleyje</artifactId>
                <version>${titan.version}</version>
            </dependency>

            <dependency>
                <groupId>com.thinkaurelius.titan</groupId>
                <artifactId>titan-es</artifactId>
                <version>${titan.version}</version>
            </dependency>

            <!--  metadata modules -->
            <dependency>
                <groupId>org.apache.hadoop.metadata</groupId>
                <artifactId>metadata-common</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.hadoop.metadata</groupId>
                <artifactId>metadata-typesystem</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.hadoop.metadata</groupId>
                <artifactId>metadata-repository</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!--Test dependencies-->
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>6.1.1</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.easymock</groupId>
                <artifactId>easymock</artifactId>
                <version>2.4</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>1.8.5</version>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <finalName>metadata-governance</finalName>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>1.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.8.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.16</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.16</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.7</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.1.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.rat</groupId>
                    <artifactId>apache-rat-plugin</artifactId>
                    <version>0.7</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>2.9.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.2</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <!-- Source code metrics: mvn javancss:report or mvn site -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>javancss-maven-plugin</artifactId>
                    <version>2.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.8</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <optimize>true</optimize>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.7.2</version>
                <configuration>
                    <systemPropertyVariables>
                        <tapestry.execution-mode>Qa</tapestry.execution-mode>
                    </systemPropertyVariables>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.16</version>
                <configuration>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                    <forkMode>always</forkMode>
                    <argLine>-Djava.security.krb5.realm= -Djava.security.krb5.kdc=
                        -Dhadoop.tmp.dir=${project.build.directory}/tmp-hadoop-${user.name}</argLine>
                    <excludedGroups>${excluded.test.groups}</excludedGroups>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>verify</id>
                        <goals>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Run the application using "mvn jetty:run" -->
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.16</version>
                <configuration>
                    <!-- Log to the console. -->
                    <requestLog implementation="org.mortbay.jetty.NCSARequestLog">
                        <!-- This doesn't do anything for Jetty, but is a workaround for a Maven bug
                             that prevents the requestLog from being set. -->
                        <append>true</append>
                    </requestLog>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting/>
</project>
