<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.wso2.carbon</groupId>
        <artifactId>wso2carbon-feature</artifactId>
        <version>2.0.3</version>
        <relativePath>../../../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.wso2.carbon.proxyadmin.server.feature</artifactId>
    <packaging>pom</packaging>
    <name>Proxy Services Core Feature</name>
    <version>${carbon.component.version}</version>
    <url>http://wso2.org</url>
    <description>This feature contains the core bundles required for Back-end Proxy Services functionality</description>
    <dependencies>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.proxyadmin</artifactId>
            <version>${carbon.component.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.proxyadmin.common</artifactId>
            <version>${carbon.component.version}</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.2-beta-2</version>
                <executions>
                    <execution>
                        <id>dist</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/dist_jar.xml</descriptor>
                                <descriptor>src/main/assembly/dist_zip.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <id>Copy to P2 repo</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <unzip dest="${user.home}/.p2/repository">
                                    <fileset dir="target">
                                        <include name="${pom.artifactId}-${pom.version}.zip"/>
                                    </fileset>
                                </unzip>
                                <echo message="Extracted the feature to P2 artifact repo at ${user.home}/.p2/repository"/>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <properties>
        <org.wso2.carbon.core.server.feature.version>${carbon.version}</org.wso2.carbon.core.server.feature.version>
        <synapse.core.feature.version>${apache.synapse.version}</synapse.core.feature.version>
        <org.wso2.carbon.mediation.initializer.server.feature.version>${carbon.component.version}</org.wso2.carbon.mediation.initializer.server.feature.version>
        <org.wso2.carbon.proxyadmin.bundle.version>${carbon.component.version}</org.wso2.carbon.proxyadmin.bundle.version>
        <org.wso2.carbon.proxyadmin.common.bundle.version>${carbon.component.version}</org.wso2.carbon.proxyadmin.common.bundle.version>
    </properties>
</project>
