<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ 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 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">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.apache.cassandra</groupId>
    <artifactId>apache-cassandra</artifactId>
    <version>${cassandra.version}</version>
    <packaging>pom</packaging>
    <name>Apache Cassandra</name>

    <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>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <configuration>
                            <target>
                                <property name="build.compiler" value="extJavac"/>
                                <property name="compile_classpath" refid="maven.compile.classpath"/>
                                <property name="runtime_classpath" refid="maven.runtime.classpath"/>
                                <property name="test_classpath" refid="maven.test.classpath"/>
                                <property name="plugin_classpath" refid="maven.plugin.classpath"/>
                                <ant target="build" inheritRefs="true"/>
                                <ant antfile="${basedir}/build.xml">
                                    <target name="jar"/>
                                    <!--target name="publish"/-->
                                </ant>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>commons-net</groupId>
                        <artifactId>commons-net</artifactId>
                        <version>1.4.1</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.ant</groupId>
                        <artifactId>ant-commons-net</artifactId>
                        <version>1.8.4</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.2</version>
                <executions>
                    <execution>
                        <id>install-cassandra jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.apache.cassandra</groupId>
                            <artifactId>apache-cassandra</artifactId>
                            <version>${cassandra.version}</version>
                            <packaging>jar</packaging>
                            <file>${basedir}/build/apache-cassandra-${cassandra.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-cassandra-thrift jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.apache.cassandra</groupId>
                            <artifactId>apache-cassandra-thrift</artifactId>
                            <version>${cassandra.version}</version>
                            <packaging>jar</packaging>
                            <file>${basedir}/build/apache-cassandra-thrift-${cassandra.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-cassandra-clientutil jar</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <groupId>org.apache.cassandra</groupId>
                            <artifactId>apache-cassandra-clientutil</artifactId>
                            <version>${cassandra.version}</version>
                            <packaging>jar</packaging>
                            <file>${basedir}/build/apache-cassandra-clientutil-${cassandra.build.version}.jar
                            </file>
                            <generatePom>true</generatePom>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <followSymLinks>false</followSymLinks>
                    <filesets>
                        <fileset>
                            <directory>${basedir}/build</directory>
                        </fileset>
			<fileset>
			    <directory>${basedir}/src/gen-java</directory>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <properties>
        <cassandra.build.version>1.2.13</cassandra.build.version>
        <cassandra.version>${cassandra.build.version}-wso2v2</cassandra.version>
    </properties>
  <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>
    <pluginRepositories>
        <pluginRepository>
            <id>repository.dev.java.net-maven2</id>
            <name>Java.net Repository for Maven</name>
            <url>http://download.java.net/maven/2/</url>
            <layout>default</layout>
        </pluginRepository>
    </pluginRepositories>
</project>
