<?xml version="1.0" encoding="utf-8"?>
<!--
 ~ Copyright (c) 2009-2010, 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.wso2.carbon</groupId>
        <artifactId>bam</artifactId>
        <version>3.1.0</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.wso2.carbon</groupId>
    <artifactId>org.wso2.carbon.bam.common</artifactId>
    <packaging>bundle</packaging>
    <version>3.1.0</version>
    <name>WSO2 Carbon - BAM Common</name>
    <description>A custom wso2 products or solution</description>
    <url>http://wso2.org</url>

    <dependencies>

        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.bam.util</artifactId>
            <version>${wso2carbon.version.bam}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.core</artifactId>
            <version>${wso2carbon.version.bam}</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-scr-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>1.4.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>
                            ${pom.artifactId}
                        </Bundle-SymbolicName>

                        <Export-Package>
                            org.wso2.carbon.bam.common.*
                        </Export-Package>
                        <Import-Package>
                            !org.wso2.carbon.bam.common*,
                            org.wso2.carbon.bam.util.*,
                            org.apache.commons.logging.*,
                            *;resolution:=optional
                        </Import-Package>
                        <DynamicImport-Package>*</DynamicImport-Package>
                    </instructions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <id>source-code-generation</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <!--<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">-->
                                    <!--<arg line="-uri src/main/resources/wsdl/AuthenticationAdminService_2_0_2.wsdl -u -uw-->
                                    <!---o target/generated-code -p org.wso2.carbon.bam.core.client.stub.authenticationadminservice202-->
                                    <!---ns2p http://authentication.services.core.carbon.wso2.org=org.wso2.carbon.bam.core.client.stub.authenticationadminservice202.types.carbon,http://common.core.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.authenticationadminservice202.types.carbon,http://authentication.services.core.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.authenticationadminservice202.types.carbon,http://core.user.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.authenticationadminservice202.types.carbon"/>-->
                                    <!--<classpath refid="maven.dependency.classpath"/>-->
                                    <!--<classpath refid="maven.compile.classpath"/>-->
                                    <!--<classpath refid="maven.runtime.classpath"/>-->
                                <!--</java>-->
                                <!--<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">-->
                                    <!--<arg line="-uri src/main/resources/wsdl/AuthenticationAdminService_2_0_3.wsdl -u -uw-->
                                    <!---o target/generated-code -p org.wso2.carbon.bam.core.client.stub.authenticationadminservice203-->
                                    <!---ns2p http://authentication.services.core.carbon.wso2.org=org.wso2.carbon.bam.core.client.stub.authenticationadminservice203.types.carbon,http://common.core.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.authenticationadminservice203.types.carbon,http://authentication.services.core.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.authenticationadminservice203.types.carbon,http://core.user.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.authenticationadminservice203.types.carbon"/>-->
                                    <!--<classpath refid="maven.dependency.classpath"/>-->
                                    <!--<classpath refid="maven.compile.classpath"/>-->
                                    <!--<classpath refid="maven.runtime.classpath"/>-->
                                <!--</java>-->
                                <!--<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">-->
                                    <!--<arg line="-uri src/main/resources/wsdl/AuthenticationAdmin.wsdl -u -uw-->
                                    <!---o target/generated-code -p org.wso2.carbon.bam.core.client.stub.authenticationadmin_3_1_0-->
                                    <!---ns2p http://authentication.services.core.carbon.wso2.org=org.wso2.carbon.bam.core.client.stub.authenticationadminservice203.types.carbon,http://common.core.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.authenticationadminservice203.types.carbon,http://authentication.services.core.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.authenticationadminservice203.types.carbon,http://core.user.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.authenticationadminservice203.types.carbon"/>-->
                                    <!--<classpath refid="maven.dependency.classpath"/>-->
                                    <!--<classpath refid="maven.compile.classpath"/>-->
                                    <!--<classpath refid="maven.runtime.classpath"/>-->
                                <!--</java>-->
                                <!--<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">-->
                                    <!--<arg line="-uri src/main/resources/wsdl/BAMArchiverDS.wsdl -u -uw-->
                                    <!---o target/generated-code -p org.wso2.carbon.bam.core.client.stub.bamarchiverds-->
                                    <!---ns2p http://ws.wso2.org/dataservice=org.wso2.carbon.bam.core.client.stub.bamarchiverds,http://bam.carbon.wso2.org=org.wso2.carbon.bam.core.client.stub.bamarchiverds.types"/>-->
                                    <!--<classpath refid="maven.dependency.classpath"/>-->
                                    <!--<classpath refid="maven.compile.classpath"/>-->
                                    <!--<classpath refid="maven.runtime.classpath"/>-->
                                <!--</java>-->
                                <!--<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">-->
                                    <!--<arg line="-uri src/main/resources/wsdl/ServiceAdmin.wsdl -u -uw-->
                                    <!---o target/generated-code -p org.wso2.carbon.bam.core.client.stub.serviceadmin-->
                                    <!---ns2p http://mgt.service.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.serviceadmin.types.carbon,http://utils.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.serviceadmin.types.carbon,http://util.java/xsd=org.wso2.carbon.bam.core.client.stub.serviceadmin.types.carbon,http://bam.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.serviceadmin.types.carbon,http://org.apache.axis2/xsd=org.wso2.carbon.bam.core.client.stub.serviceadmin.types.axis2,http://neethi.apache.org/xsd=org.wso2.carbon.bam.core.client.stub.serviceadmin.types.neethi"/>-->
                                    <!--<classpath refid="maven.dependency.classpath"/>-->
                                    <!--<classpath refid="maven.compile.classpath"/>-->
                                    <!--<classpath refid="maven.runtime.classpath"/>-->
                                <!--</java>-->
                                <!--<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">-->
                                    <!--<arg line="-uri src/main/resources/wsdl/OperationAdmin.wsdl -u -uw-->
                                    <!---o target/generated-code -p org.wso2.carbon.bam.core.client.stub.operationadmin-->
                                    <!---ns2p http://framework.osgi.org/xsd=org.wso2.carbon.bam.core.client.stub.operationadmin.types.carbon,http://mgt.operation.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.operationadmin.types.carbon,http://mgt.service.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.operationadmin.types.carbon,http://utils.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.operationadmin.types.carbon,http://util.java/xsd=org.wso2.carbon.bam.core.client.stub.operationadmin.types.carbon,http://bam.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.operationadmin.types.carbon,http://org.apache.axis2/xsd=org.wso2.carbon.bam.core.client.stub.operationadmin.types.axis2,http://neethi.apache.org/xsd=org.wso2.carbon.bam.core.client.stub.operationadmin.types.neethi"/>-->
                                    <!--<classpath refid="maven.dependency.classpath"/>-->
                                    <!--<classpath refid="maven.compile.classpath"/>-->
                                    <!--<classpath refid="maven.runtime.classpath"/>-->
                                <!--</java>-->
                                <!--<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">-->
                                    <!--<arg line="-uri src/main/resources/wsdl/StatisticsAdmin.wsdl -u -uw-->
                                    <!---o target/generated-code -p org.wso2.carbon.bam.core.client.stub.statisticsadmin-->
                                    <!---ns2p http://services.statistics.carbon.wso2.org=org.wso2.carbon.bam.core.client.stub.statisticsadmin,http://util.services.statistics.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.statisticsadmin.types.carbon,http://org.apache.axis2/xsd=org.wso2.carbon.bam.core.client.stub.statisticsadmin.types.axis2"/>-->
                                    <!--<classpath refid="maven.dependency.classpath"/>-->
                                    <!--<classpath refid="maven.compile.classpath"/>-->
                                    <!--<classpath refid="maven.runtime.classpath"/>-->
                                <!--</java>-->
                                <!--<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">-->
                                    <!--<arg line="-uri src/main/resources/wsdl/LoginStatisticsAdminService.wsdl -u -uw-->
                                    <!---o target/generated-code -p org.wso2.carbon.bam.core.client.stub.bamls-->
                                    <!---ns2p http://stats.authentication.services.core.carbon.wso2.org/xsd=org.wso2.carbon.bam.core.client.stub.bamls.types.carbon,http://stats.authentication.services.core.carbon.wso2.org=org.wso2.carbon.bam.core.client.stub.bamls.types.carbon"/>-->
                                    <!--<classpath refid="maven.dependency.classpath"/>-->
                                    <!--<classpath refid="maven.compile.classpath"/>-->
                                    <!--<classpath refid="maven.runtime.classpath"/>-->
                                <!--</java>-->
                                <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
                                    <arg line="-uri src/main/resources/wsdl/BAMListAdminService.wsdl -u -uw
                                                -o target/generated-code -p org.wso2.carbon.bam.common.listds
                                                -ns2p http://services.core.bam.carbon.wso2.org=org.wso2.carbon.bam.common.listds.services,http://org.apache.axis2/xsd=org.wso2.carbon.bam.common.listds.axis2,http://activity.dataobjects.core.bam.carbon.wso2.org/xsd=org.wso2.carbon.bam.common.listds.dataobjects.activity,http://util.bam.carbon.wso2.org/xsd=org.wso2.carbon.bam.common.listds.util,http://common.dataobjects.core.bam.carbon.wso2.org/xsd=org.wso2.carbon.bam.common.listds.dataobjects.commom,http://service.dataobjects.core.bam.carbon.wso2.org/xsd=org.wso2.carbon.bam.common.listds.dataobjects.service"/>
                                    <classpath refid="maven.dependency.classpath"/>
                                    <classpath refid="maven.compile.classpath"/>
                                    <classpath refid="maven.runtime.classpath"/>
                                </java>
                                <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
                                    <arg line="-uri src/main/resources/wsdl/BAMConfigurationDS.wsdl -u -uw
                                    -o target/generated-code -p org.wso2.carbon.bam.common.bamconfigurationds
                                    -ns2p http://ws.wso2.org/dataservice=org.wso2.carbon.bam.common.bamconfigurationds.types.carbon,http://bam.carbon.wso2.org=org.wso2.carbon.bam.common.bamconfigurationds.types.carbon"/>
                                    <classpath refid="maven.dependency.classpath"/>
                                    <classpath refid="maven.compile.classpath"/>
                                    <classpath refid="maven.runtime.classpath"/>
                                </java>
                                <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
                                    <arg line="-uri src/main/resources/wsdl/BAMDataCollectionDS.wsdl -u -uw
                                    -o target/generated-code -p org.wso2.carbon.bam.common.client.stub.bamdatacollectionds
                                    -ns2p http://ws.wso2.org/dataservice=org.wso2.carbon.bam.common.client.stub.bamdatacollectionds.types.carbon,http://bam.carbon.wso2.org=org.wso2.carbon.bam.common.client.stub.bamdatacollectionds.types.carbon"/>
                                    <classpath refid="maven.dependency.classpath"/>
                                    <classpath refid="maven.compile.classpath"/>
                                    <classpath refid="maven.runtime.classpath"/>
                                </java>
                                <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
                                    <arg line="-uri src/main/resources/wsdl/BAMSummaryGenerationDS.wsdl -u -uw
                                    -o target/generated-code -p org.wso2.carbon.bam.common.client.stub.bamsummarygenerationds
                                    -ns2p http://ws.wso2.org/dataservice=org.wso2.carbon.bam.common.client.stub.bamsummarygenerationds.types.carbon,http://bam.carbon.wso2.org=org.wso2.carbon.bam.common.client.stub.bamsummarygenerationds.types.carbon"/>
                                    <classpath refid="maven.dependency.classpath"/>
                                    <classpath refid="maven.compile.classpath"/>
                                    <classpath refid="maven.runtime.classpath"/>
                                </java>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>target/generated-code/src</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
