<?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">
    <!-- POM file generated with GWT webAppCreator -->
    <parent>
        <groupId>org.jboss.as</groupId>
        <artifactId>jboss-as-console-extension</artifactId>
        <version>2.8.23.Final</version>
        <relativePath/>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.switchyard.console.wildfly</groupId>
    <artifactId>switchyard-console-wildfly-extension</artifactId>
    <version>2.1.0.Final</version>
    <name>SwitchYard: WildFly Management Console Extension</name>
    <description>WildFly management console extension supporting the SwitchYard runtime.</description>
    <properties>
        <version.switchyard>2.1.0.Final</version.switchyard>
        <common.sources.dir>${project.build.directory}/dependency/eap/java</common.sources.dir>
        <common.resources.dir>${project.build.directory}/dependency/eap/resources</common.resources.dir>
        <common.test.resources.dir>${project.build.directory}/dependency/eap-test/resources</common.test.resources.dir>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-core</artifactId>
            <version>${version.switchyard}</version>
        </dependency>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-bean</artifactId>
            <version>${version.switchyard}</version>
        </dependency>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-bpel</artifactId>
            <version>${version.switchyard}</version>
        </dependency>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-bpm</artifactId>
            <version>${version.switchyard}</version>
        </dependency>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-camel</artifactId>
            <version>${version.switchyard}</version>
        </dependency>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-clojure</artifactId>
            <version>${version.switchyard}</version>
        </dependency>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-http</artifactId>
            <version>${version.switchyard}</version>
        </dependency>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-jca</artifactId>
            <version>${version.switchyard}</version>
        </dependency>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-resteasy</artifactId>
            <version>${version.switchyard}</version>
        </dependency>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-rules</artifactId>
            <version>${version.switchyard}</version>
        </dependency>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-sca</artifactId>
            <version>${version.switchyard}</version>
        </dependency>
        <dependency>
            <groupId>org.switchyard.console.wildfly</groupId>
            <artifactId>switchyard-console-wildfly-component-soap</artifactId>
            <version>${version.switchyard}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</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="../../gwt/src/main/java/" includes="**/*.*">
                                        <exclude name="org/switchyard/console/SwitchYard.gwt.xml"/>
                                        <exclude name="org/switchyard/console/client/NameTokens.java"/>
                                        <exclude name="org/switchyard/console/client/gin/SwitchYardGinjector.java"/>
                                        <exclude name="org/switchyard/console/client/gin/SwitchYardClientModule.java"/>
                                        <exclude name="org/switchyard/console/client/ui/component/ComponentPresenter.java"/>
                                        <exclude name="org/switchyard/console/client/ui/metrics/MetricsPresenter.java"/>
                                        <exclude name="org/switchyard/console/client/ui/runtime/RuntimePresenter.java"/>
                                    </fileset>
                                </copy>
                                <copy todir="${common.resources.dir}">
                                    <fileset dir="../../gwt/src/main/resources/" includes="**/*.*"/>
                                </copy>
                                <copy todir="${common.test.resources.dir}">
                                    <fileset dir="../../gwt/src/test/resources/" 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>
                   <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>
                    <execution>
                        <id>add-common-test-resources-dir</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-resource</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>${common.test.resources.dir}</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- GWT Maven Plugin -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>resources</goal>
                            <goal>test</goal>
                            <!--
                              ~ does not generate proper interfaces for
                              ~ non-string paramter types.  until the problem
                              ~ is corrected, the Messages class will need to
                              ~ be maintained manually.  update
                              ~ Messages.properties then run gwt:i18n goal and
                              ~ merge the newly generated file with the
                              ~ existing file.
                            <goal>i18n</goal>
                             -->
                        </goals>
                    </execution>
                </executions>
                <!-- Plugin configuration. There are many available options, see gwt-maven-plugin documentation at codehaus.org -->
                <configuration>
                    <htmlunit>FF3,IE7</htmlunit>
                    <i18nMessagesBundle>org.switchyard.console.client.Messages</i18nMessagesBundle>
                    <logLevel>TRACE</logLevel>
                    <mode>htmlunit</mode>
                    <extraJvmArgs>-Xmx512m</extraJvmArgs>
                    <localWorkers>2</localWorkers>
                </configuration>
            </plugin>
            <!-- Remove GWT tests -->
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/GwtTest*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
