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

    <parent>
        <groupId>org.wso2.carbon.business-process</groupId>
        <artifactId>humantask-stub</artifactId>
        <version>4.5.36</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.wso2.carbon.humantask.stub</artifactId>
    <packaging>bundle</packaging>
    <name>WSO2 Carbon - HumanTask Stub</name>
    <url>http://wso2.org</url>

    <build>
        <plugins>

            <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/HumanTaskUploader.wsdl -u -uw -o target/generated-code -p org.wso2.carbon.humantask.stub.upload -ns2p http://services.deployer.humantask.carbon.wso2.org=org.wso2.carbon.humantask.stub.upload,http://services.deployer.humantask.carbon.wso2.org/xsd=org.wso2.carbon.humantask.stub.upload.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/bps-humantask-package-management.wsdl -u -uw -o target/generated-code -p org.wso2.carbon.humantask.stub.mgt -ns2p http://wso2.org/bps/humantask/management/schema=org.wso2.carbon.humantask.stub.mgt.types,http://wso2.org/bps/management/wsdl/HumanTaskPackageManagement=org.wso2.carbon.humantask.stub.mgt" />
                                    <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/ws-humantask-api.wsdl -u -uw -o target/generated-code -p org.wso2.carbon.humantask.stub.ui.task.client.api -ns2p http://docs.oasis-open.org/ns/bpel4people/ws-humantask/200803=org.wso2.carbon.humantask.stub.ui.task.client.api,http://docs.oasis-open.org/ns/bpel4people/ws-humantask/api/200803=org.wso2.carbon.humantask.stub.ui.task.client.api,http://docs.oasis-open.org/ns/bpel4people/ws-humantask/200803=org.wso2.carbon.humantask.stub.ui.task.client.api.types,http://docs.oasis-open.org/ns/bpel4people/ws-humantask/types/200803=org.wso2.carbon.humantask.stub.ui.task.client.api.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/ws-humantask-rendering-api.wsdl -u -uw -o target/generated-code -p org.wso2.carbon.humantask.stub.ui.task.rendering.api -ns2p http://wso2.org/ht/schema/renderings/=org.wso2.carbon.humantask.stub.ui.task.rendering.api" />
                                    <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>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>

                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>${project.artifactId}</Bundle-Name>
                        <Export-Package>
                            org.wso2.carbon.humantask.stub.*,
                            org.wso2.carbon.humantask.stub.ui.task.*
                        </Export-Package>
                        <_nouse>true</_nouse>
                        <Import-Package>
                            javax.activation;resolution:=optional;version="0.0.0",
                            org.apache.axiom.*;version="${axiom.osgi.version.range}",*;resolution:=optional
                        </Import-Package>
                        <!--<Embed-Dependency>org.wso2.carbon.humantask.stub;scope=compile|runtime;inline=true</Embed-Dependency>-->
                        <!--<Carbon-Component>UIBundle</Carbon-Component>-->
                        <DynamicImport-Package>*</DynamicImport-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!--    <dependencies>
            <dependency>
                <groupId>org.apache.axis2.wso2</groupId>
                <artifactId>axis2</artifactId>
            </dependency>
            <dependency>
                <groupId>org.apache.axis2.wso2</groupId>
                <artifactId>axis2-client</artifactId>
            </dependency>
        </dependencies>-->
</project>
