<?xml version="1.0" encoding="UTF-8"?>
<!--

    *********************************************************************************************************************

    TheseFoolishThings: Miscellaneous utilities
    http://tidalwave.it/projects/thesefoolishthings

    Copyright (C) 2009 - 2023 by Tidalwave s.a.s. (http://tidalwave.it)

    *********************************************************************************************************************

    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.

    *********************************************************************************************************************

    git clone https://bitbucket.org/tidalwave/thesefoolishthings-src
    git clone https://github.com/tidalwave-it/thesefoolishthings-src

    *********************************************************************************************************************

-->
<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>it.tidalwave.thesefoolishthings</groupId>
        <artifactId>modules</artifactId>
        <version>3.2-ALPHA-16</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>it.tidalwave.thesefoolishthings</groupId>
    <artifactId>it-tidalwave-messagebus-spring</artifactId>
    <version>3.2-ALPHA-16</version>
    <packaging>jar</packaging>
    <name>TheseFoolishThings :: MessageBus :: Spring</name>
    <description>
        A Spring implementation of a simple message bus to be used within an application.
    </description>

    <properties>
        <tft.javadoc.excludePackageNames />
    </properties>

    <dependencies>
        <dependency>
            <groupId>it.tidalwave.thesefoolishthings</groupId>
            <artifactId>it-tidalwave-messagebus</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- FIXME: fixes the trouble with missing Hamcrest methods -->
        <dependency>
            <groupId>it.tidalwave.thesefoolishthings</groupId>
            <artifactId>it-tidalwave-util-test</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <configuration>
                    <aspectLibraries>
                        <dependency>
                            <groupId>org.springframework</groupId>
                            <artifactId>spring-aspects</artifactId>
                        </dependency>
                    </aspectLibraries>
                    <verbose>true</verbose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!--================================================================================================================


        =================================================================================================================-->
        <profile>
            <id>it.tidalwave-aspectj-aj-v1</id>
            <activation>
                <file>
                    <exists>src/main/aspect</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>add-aj-sources</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>add-source</goal>
                                </goals>
                                <configuration>
                                    <sources>
                                        <source>${basedir}/src/main/aspect</source>
                                    </sources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>aspectj-maven-plugin</artifactId>
                        <configuration>
                            <sources>
                                <source>
                                    <basedir>${basedir}/src/main/aspect</basedir>
                                    <includes>
                                        <include>**/*.aj</include>
                                    </includes>
                                </source>
                            </sources>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
