<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright 2015 Red Hat Inc. and/or its affiliates and other contributors.
-
- 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.switchyard.karaf</groupId>
        <artifactId>switchyard-karaf-parent</artifactId>
        <version>2.0.0.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>switchyard-karaf-bpel</artifactId>
    <packaging>bundle</packaging>
    <name>SwitchYard: BPEL Component Bundle for Karaf</name>
    <description>OSGi bundle packaging for the SwitchYard BPEL component</description>
    <properties>
        <switchyard.osgi.export>
            org.switchyard.component.bpel.*;version="${switchyard.osgi.version}";-noimport:=true,
            org.riftsaw.*;version="${version.riftsaw.engine}";-noimport:=true,
            org.jboss.soa.bpel.*;version="${version.riftsaw.engine}";-noimport:=true,
            org.wso2.carbon.bpel.ui.*;version="${version.riftsaw.engine}";-noimport:=true,
            org.jboss.bpm.console.*;version="${version.riftsaw.console}";-noimport:=true,
            org.apache.ode.*;version="${version.riftsaw.ode}";-noimport:=true,
            org.jboss.bpm.monitor.*;version="${version.activity.monitor.model}";-noimport:=true
        </switchyard.osgi.export>
        <switchyard.osgi.import.bpel.saxon.version>version="[$(version;==;${version.net.sourceforge.saxon}),$(version;=+;${version.net.sourceforge.saxon}))"</switchyard.osgi.import.bpel.saxon.version>
        <switchyard.osgi.import>
            org.switchyard.*;${switchyard.osgi.import.switchyard.version},
            javax.persistence,
            org.hibernate.*,
            org.hibernate.proxy,
            javassist.util.proxy,
            org.osgi.framework,
            org.h2,
            org.apache.xmlbeans.impl.schema,
            com.ibm.wsdl,
            com.ibm.wsdl.extensions,
            com.ibm.wsdl.extensions.http,
            com.ibm.wsdl.extensions.mime,
            com.ibm.wsdl.extensions.schema,
            com.ibm.wsdl.extensions.soap,
            com.ibm.wsdl.extensions.soap12,
            com.ibm.wsdl.factory,
            com.ibm.wsdl.util,
            net.sf.saxon.*;${switchyard.osgi.import.bpel.saxon.version},
            !org.jboss.logmanager.*,
            !org.jboss.vfs.*,
            !org.jboss.as.*,
            !org.jboss.msc.*,
            !javax.resource.spi,
            !org.apache.axiom.*,
            !org.apache.commons.httpclient.*,
            !org.apache.geronimo.connector.*,
            !org.tranql.*,
            !org.apache.log4j.helpers,
            !org.jboss.errai.bus.server.annotations.*,
            *
        </switchyard.osgi.import>
        <switchyard.osgi.embed.dependency>*;inline=**.xml;groupId=!org.osgi;scope=compile,*;groupId=!org.osgi;scope=compile</switchyard.osgi.embed.dependency>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-bpel</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.riftsaw</groupId>
            <artifactId>engine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-agents</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-bpel-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-bpel-compiler</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-bpel-dao</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-bpel-epr</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-bpel-obj</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-bpel-ql</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-bpel-runtime</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-bpel-schemas</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-bpel-store</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-dao-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-dao-jpa-hibernate</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-jacob</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-scheduler-simple</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.soa.bpel</groupId>
            <artifactId>riftsaw-utils</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.bpm</groupId>
            <artifactId>activity-monitor-model</artifactId>
        </dependency>
        <!-- Console integration -->
        <dependency>
            <groupId>org.jboss.bpm</groupId>
            <artifactId>gwt-console-rpc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.bpm</groupId>
            <artifactId>gwt-console-server-integration</artifactId>
        </dependency>
        <dependency>
            <groupId>org.riftsaw.console</groupId>
            <artifactId>riftsaw-bpaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.riftsaw.console</groupId>
            <artifactId>riftsaw-bpel2svg</artifactId>
        </dependency>
        <dependency>
            <groupId>org.riftsaw.console</groupId>
            <artifactId>riftsaw-console-integration</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.karaf</groupId>
            <artifactId>switchyard-karaf-deploy</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
        </dependency>
        <!-- OSGi dependencies (build) -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>false</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <_exportcontents>
                            org.switchyard.component.bpel.*;version="${switchyard.osgi.version}";-noimport:=true,
                            org.riftsaw.engine;version="${version.riftsaw.engine}";-noimport:=true
                        </_exportcontents>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>target/classes/bpel.properties</file>
                                    <type>properties</type>
                                    <classifier>riftsaw</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
