<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">

    <parent>
        <groupId>org.wso2.carbon.commons</groupId>
        <artifactId>data-bridge-feature</artifactId>
    	<version>4.3.2</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <version>4.3.2</version>
    <artifactId>org.wso2.carbon.databridge.agent.thrift.server.feature</artifactId>
    <packaging>pom</packaging>
    <name>WSO2 Carbon - Data Bridge - Thrift Agent Server Feature</name>
    <url>http://wso2.org</url>
    <description>Server feature of the Data Bridge Thrift Agent</description>

    <dependencies>
        <dependency>
            <groupId>org.wso2.carbon.commons</groupId>
            <artifactId>org.wso2.carbon.databridge.agent.thrift</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-pool.wso2</groupId>
            <artifactId>commons-pool</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents.wso2</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents.wso2</groupId>
            <artifactId>httpcore</artifactId>
        </dependency>
    </dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<!-- inherited version -->
				<configuration>
					<encoding>UTF-8</encoding>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>src/main/resources</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>resources</directory>
                                    <includes>
                                        <include>build.properties</include>
                                        <include>conf/thrift-agent-config.xml</include>
                                        <include>p2.inf</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
			</plugin>
			<plugin>
				<groupId>org.wso2.maven</groupId>
				<artifactId>carbon-p2-plugin</artifactId>
				<version>${carbon.p2.plugin.version}</version>
				<executions>
					<execution>
						<id>p2-feature-generation</id>
						<phase>package</phase>
						<goals>
							<goal>p2-feature-gen</goal>
						</goals>
						<configuration>
                            <id>org.wso2.carbon.databridge.agent.thrift.server</id>
							<propertiesFile>../../../etc/feature.properties</propertiesFile>
                            <adviceFile>
                                <properties>
									<propertyDef>org.wso2.carbon.p2.category.type:server</propertyDef>
									<propertyDef>org.eclipse.equinox.p2.type.group:false</propertyDef>
                                </properties>
                            </adviceFile>
                            <bundles>
                                <bundleDef>org.wso2.carbon.commons:org.wso2.carbon.databridge.agent.thrift:${carbon.commons.version}
                                </bundleDef>
                                <bundleDef>commons-pool.wso2:commons-pool:1.5.6.wso2v1</bundleDef>
                                <bundleDef>org.apache.httpcomponents.wso2:httpclient</bundleDef>
                                <bundleDef>org.apache.httpcomponents.wso2:httpcore</bundleDef>
                            </bundles>
                            <importFeatures>
                                <importFeatureDef>org.wso2.carbon.core.server:${carbon.kernel.version}</importFeatureDef>
                                <importFeatureDef>
                                    org.wso2.carbon.databridge.commons.server:${carbon.commons.version}
                                </importFeatureDef>
                                <importFeatureDef>
                                    org.wso2.carbon.databridge.commons.thrift.server:${carbon.commons.version}
                                </importFeatureDef>
                            </importFeatures>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


</project>
