<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Wildfly Camel Patch
  %%
  Copyright (C) 2013 - 2014 RedHat
  %%
  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.
  #L%
  -->


<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.wildfly.camel</groupId>
        <artifactId>wildfly-camel</artifactId>
        <version>2.1.0</version>
    </parent>

    <name>Wildfly Camel :: Modules</name>

    <artifactId>wildfly-camel-modules</artifactId>
    <packaging>pom</packaging>

    <!-- Properties -->
    <properties>
        <wildfly.patch>${project.build.directory}/${project.artifactId}-${project.version}</wildfly.patch>
        <wildfly.module.dir>${project.build.directory}/wildfly-${version.wildfly}/modules/system/layers/base</wildfly.module.dir>
        <smartics.module.dir>${project.build.directory}/wildfly-patch/modules/system/layers/fuse</smartics.module.dir>

        <!-- Used for dependency checking in module-checker.groovy -->
        <appserver.groupId>org.wildfly</appserver.groupId>
        <appserver.artifactId>wildfly-feature-pack</appserver.artifactId>
        <appserver.version>${version.wildfly}</appserver.version>
    </properties>

    <!-- Dependencies -->
    <dependencies>

        <!-- Provided -->
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v24</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v25</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-all</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-rar</artifactId>
            <type>rar</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-camel</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-atom</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-bindy</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-cdi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core-xml</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-cxf</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ftp</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-hl7</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jaxb</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jms</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jmx</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jpa</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-lucene</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mail</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mina2</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mqtt</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mvel</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-netty4</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ognl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-quartz</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-rss</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-saxon</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-script</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-soap</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-sql</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-weather</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.configadmin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.log</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.metatype</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.http.bridge</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-analyzers-common</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-queryparser</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.gravia</groupId>
            <artifactId>gravia-jmx-cm</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.gravia</groupId>
            <artifactId>gravia-provision</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.gravia</groupId>
            <artifactId>gravia-runtime-embedded</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.enterprise</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <!-- Build -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>groovy-maven-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>${version.groovy}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>module-check</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <source>${project.basedir}/scripts/module-checker.groovy</source>
                        </configuration>
                    </execution>
                    <execution>
                        <id>module-list-generate</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <source>${project.basedir}/scripts/module-list-generate.groovy</source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.fusesource.mvnplugins</groupId>
                <artifactId>smartics-jboss-modules-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>create-modules-archive</id>
                        <goals>
                            <goal>create-modules-archive</goal>
                        </goals>
                        <phase>generate-resources</phase>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>de.smartics.config</groupId>
                        <artifactId>config-smartics-jboss-modules</artifactId>
                        <version>${version.smartics.config}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <excludeDependencyManagementDependenciesInPomProject>true</excludeDependencyManagementDependenciesInPomProject>
                    <attach>false</attach>
                    <targetFolder>${smartics.module.dir}</targetFolder>
                    <modules>
                        <dir>etc/smartics</dir>
                    </modules>
                    <!-- 
                        These are dependencies we don't want to create/associate modules with.
                        Please keep them in alphabetical order. 
                    -->
                    <dependencyExcludes>
                        <exclude>
                            <groupId>biz.aQute</groupId>
                            <artifactId>bndlib</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>com.sun</groupId>
                            <artifactId>tools</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>net.sf.kxml</groupId>
                            <artifactId>kxml2</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.ant</groupId>
                            <artifactId>ant</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.ant</groupId>
                            <artifactId>ant-launcher</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.aries.blueprint</groupId>
                            <artifactId>org.apache.aries.blueprint</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.aries.blueprint</groupId>
                            <artifactId>org.apache.aries.blueprint.core</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.camel</groupId>
                            <artifactId>apt</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.camel</groupId>
                            <artifactId>camel-blueprint</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.cxf</groupId>
                            <artifactId>cxf-rt-bindings-soap</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.cxf</groupId>
                            <artifactId>cxf-rt-features-clustering</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.cxf</groupId>
                            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.cxf</groupId>
                            <artifactId>cxf-rt-frontend-jaxws</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.cxf</groupId>
                            <artifactId>cxf-rt-rs-security-oauth</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.deltaspike.test</groupId>
                            <artifactId>test-utils</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.geronimo.specs</groupId>
                            <artifactId>geronimo-activation_1.0.2_spec</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.geronimo.specs</groupId>
                            <artifactId>geronimo-javamail_1.4_spec</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.geronimo.specs</groupId>
                            <artifactId>geronimo-stax-api_1.0_spec</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.zookeeper</groupId>
                            <artifactId>zookeeper</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.linkedin</groupId>
                            <artifactId>org.linkedin.zookeeper-impl</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.linkedin</groupId>
                            <artifactId>org.linkedin.util-groovy</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.linkedin</groupId>
                            <artifactId>org.linkedin.util-core</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.osgi</groupId>
                            <artifactId>org.osgi.compendium</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.osgi</groupId>
                            <artifactId>org.osgi.core</artifactId>
                        </exclude>
                    </dependencyExcludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <inherited>false</inherited>
                <executions>
                    <execution>
                        <id>create-tgz</id>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                            <target>
                                <ant antfile="${basedir}/scripts/antrun-wildfly-patch.xml" inheritRefs="true" />
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </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>${wildfly.patch}.tar.gz</file>
                                    <type>tar.gz</type>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-wildfly</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <inherited>false</inherited>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.wildfly</groupId>
                                    <artifactId>wildfly-dist</artifactId>
                                    <version>${version.wildfly}</version>
                                    <type>zip</type>
                                    <overWrite>false</overWrite>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
