<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>switchyard-console-wildfly-components</artifactId>
        <groupId>org.switchyard.console.wildfly</groupId>
        <version>2.1.0.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>switchyard-console-wildfly-component-jca</artifactId>
    <name>SwitchYard: JCA Component Console Extension</name>
    <description>Provides customized UI for the SwitchYard JCA component.</description>
    <properties>
        <common.sources.dir>${project.build.directory}/dependency/eap/java</common.sources.dir>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-core</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="../../../component/jca/src/main/java/" includes="**/*.*"/>
                                </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>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
