<?xml version="1.0" encoding="UTF-8"?>
<!--
 ~ Copyright (c) 2009-2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 ~
 ~ Licensed 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 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">

    <parent>
        <groupId>org.apache.hive</groupId>
        <artifactId>hive-root</artifactId>
        <version>4.0.0</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-deploy</artifactId>
    <version>0.8.1-wso2v3</version>
    <packaging>pom</packaging>
    <name>hive-root</name>

    <distributionManagement>
        <repository>
            <id>wso2-maven2-repository</id>
            <name>WSO2 Maven2 Repository</name>
            <url>scp://dist.wso2.org/home/httpd/dist.wso2.org/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>wso2-maven2-snapshot-repository</id>
            <name>WSO2 Maven2 Snapshot Repository</name>
            <url>scp://dist.wso2.org/home/httpd/dist.wso2.org/snapshots/maven2/</url>
        </snapshotRepository>
    </distributionManagement>
    <build>
	<extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>2.1</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.jvnet.maven.incrementalbuild</groupId>
                <artifactId>incremental-build-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>incremental-build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
               <artifactId>maven-clean-plugin</artifactId>
               <version>2.4.1</version>
               <configuration>
                  <filesets>
                     <fileset>
                        <directory>../build</directory>
                        <includes>
                           <include>**/*</include>
                        </includes>
                     </fileset>
                   </filesets>
               </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <configuration>
                            <tasks>
                                <ant antfile="${project.basedir}/../build.xml" target="package">
					<property name="build.compiler" value="extJavac"/>
					<property name="basedir" value="${project.basedir}/.."/>
				</ant>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.2</version>
                <executions>
                    <execution>
                        <id>install hive-builtin jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.apache.hive</groupId>
                            <artifactId>hive-builtins</artifactId>
                            <version>${hive.version}</version>
                            <packaging>jar</packaging>
                            <file>${project.basedir}/../build/builtins/hive-builtins-${hive.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install hive-common jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.apache.hive</groupId>
                            <artifactId>hive-common</artifactId>
                            <version>${hive.version}</version>
                            <packaging>jar</packaging>
                            <file>${project.basedir}/../build/common/hive-common-${hive.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install hive-exec jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.apache.hive</groupId>
                            <artifactId>hive-exec</artifactId>
                            <version>${hive.version}</version>
                            <packaging>jar</packaging>
                            <file>${project.basedir}/../build/ql/hive-exec-${hive.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install hive-jdbc jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.apache.hive</groupId>
                            <artifactId>hive-jdbc</artifactId>
                            <version>${hive.version}</version>
                            <packaging>jar</packaging>
                            <file>${project.basedir}/../build/jdbc/hive-jdbc-${hive.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install hive-metastore jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.apache.hive</groupId>
                            <artifactId>hive-metastore</artifactId>
                            <version>${hive.version}</version>
                            <packaging>jar</packaging>
                            <file>${project.basedir}/../build/metastore/hive-metastore-${hive.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install hive-serde jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.apache.hive</groupId>
                            <artifactId>hive-serde</artifactId>
                            <version>${hive.version}</version>
                            <packaging>jar</packaging>
                            <file>${project.basedir}/../build/serde/hive-serde-${hive.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install jdbc-handler jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.wso2.carbon</groupId>
                            <artifactId>hive-jdbc-handler</artifactId>
                            <version>${hive.version}</version>
                            <packaging>jar</packaging>
                            <file>${project.basedir}/../build/jdbc-handler/hive-jdbc-handler-${hive.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>

                    <execution>
                        <id>install hive-service jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.apache.hive</groupId>
                            <artifactId>hive-service</artifactId>
                            <version>${hive.version}</version>
                            <packaging>jar</packaging>
                            <file>${project.basedir}/../build/service/hive-service-${hive.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install hive-shims jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.apache.hive</groupId>
                            <artifactId>hive-shims</artifactId>
                            <version>${hive.version}</version>
                            <packaging>jar</packaging>
                            <file>${project.basedir}/../build/shims/hive-shims-${hive.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
		  <execution>
                        <id>install hive-cassandra-handler jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.apache.hive</groupId>
                            <artifactId>hive-cassandra</artifactId>
                            <version>${hive.version}</version>
                            <packaging>jar</packaging>
                            <file>${project.basedir}/../build/cassandra-handler/hive-cassandra-handler-${hive.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <properties>
        <hive.build.version>0.8.1-wso2v3</hive.build.version>
        <hive.version>${hive.build.version}</hive.version>
    </properties>
</project>
