<?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</groupId>
        <artifactId>switchyard-wildfly-parent</artifactId>
        <version>2.0.1.redhat-621216</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>switchyard-deploy-wildfly</artifactId>
    <packaging>jar</packaging>
    <name>SwitchYard: WildFly Extension</name>
    <description>SwitchYard WildFly Extension and Subsystem</description>
    <properties>
        <common.sources.dir>${project.build.directory}/dependency/jboss-as7/java</common.sources.dir>
        <common.resources.dir>${project.build.directory}/dependency/jboss-as7/resources</common.resources.dir>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-web-common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-undertow</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-weld</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-admin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-common-camel</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-deploy</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-runtime</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-http</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-jca</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-resteasy</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-sca</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-soap</artifactId>
        </dependency>
        <!-- external dependencies -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-addr</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-policy</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-security</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.neethi</groupId>
            <artifactId>neethi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.security</groupId>
            <artifactId>wss4j</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
        </dependency>
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>jboss-dmr</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-clustering-infinispan</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-controller</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-ee</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-naming</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-network</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-weld</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>jboss-vfs</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>staxmapper</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.com.sun.httpserver</groupId>
            <artifactId>httpserver</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.ironjacamar</groupId>
            <artifactId>ironjacamar-core-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-processor</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.metadata</groupId>
            <artifactId>jboss-metadata-common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.metadata</groupId>
            <artifactId>jboss-metadata-ear</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.metadata</groupId>
            <artifactId>jboss-metadata-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.modules</groupId>
            <artifactId>jboss-modules</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.msc</groupId>
            <artifactId>jboss-msc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.ws</groupId>
            <artifactId>jbossws-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.ws.cxf</groupId>
            <artifactId>jbossws-cxf-server</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.ws.cxf</groupId>
            <artifactId>jbossws-cxf-transports-httpserver</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.ws.projects</groupId>
            <artifactId>jaxws-jboss-httpserver-httpspi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.picketbox</groupId>
            <artifactId>picketbox</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>stage-common-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <copy todir="${common.sources.dir}">
                                    <fileset dir="../../extension/src/main/java/" includes="**/*.java">
                                        <exclude name="org/switchyard/as7/extension/SwitchYardModuleAdd.java"/>
                                        <exclude name="org/switchyard/as7/extension/cluster/RemoteEndpointListener.java"/>
                                        <exclude name="org/switchyard/as7/extension/deployment/SwitchYardCdiIntegrationProcessor.java"/>
                                        <exclude name="org/switchyard/as7/extension/deployment/SwitchYardDeployment.java"/>
                                        <exclude name="org/switchyard/as7/extension/deployment/SwitchYardDeploymentProcessor.java"/>
                                        <exclude name="org/switchyard/as7/extension/deployment/SwitchYardModuleDependencyProcessor.java"/>
                                        <exclude name="org/switchyard/as7/extension/http/JBossWebEndpoint.java"/>
                                        <exclude name="org/switchyard/as7/extension/http/JBossWebEndpointPublisher.java"/>
                                        <exclude name="org/switchyard/as7/extension/resteasy/RESTEasyResource.java"/>
                                        <exclude name="org/switchyard/as7/extension/resteasy/RESTEasyResourcePublisher.java"/>
                                        <exclude name="org/switchyard/as7/extension/util/ServerUtil.java"/>
                                        <exclude name="org/switchyard/as7/extension/ws/JBossWSEndpoint.java"/>
                                        <exclude name="org/switchyard/as7/extension/ws/JBossWSEndpointPublisher.java"/>
                                    </fileset>
                                </copy>
                                <copy todir="${common.resources.dir}">
                                    <fileset dir="../../extension/src/main/resources/"/>
                                </copy>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-common-sources-dir</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${common.sources.dir}</source>
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-common-resources-dir</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-resource</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>${common.resources.dir}</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
