<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright The ClusterBench Authors
  ~ SPDX-License-Identifier: Apache-2.0
  -->
<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>
        <groupId>org.jboss.test</groupId>
        <artifactId>clusterbench</artifactId>
        <version>10.0.2.Final</version>
    </parent>

    <artifactId>clusterbench-ee10-ejb</artifactId>
    <version>10.0.2.Final</version>
    <packaging>ejb</packaging>

    <name>ClusterBench: EE 10 - EJB</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <!-- Project dependencies -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>clusterbench-common</artifactId>
        </dependency>
        <!-- Jakarta dependencies -->
        <dependency>
            <groupId>jakarta.ejb</groupId>
            <artifactId>jakarta.ejb-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.enterprise</groupId>
            <artifactId>jakarta.enterprise.cdi-api</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ejb-plugin</artifactId>
                <configuration>
                    <ejbVersion>3.2</ejbVersion>
                    <generateClient>true</generateClient>
                    <clientExcludes>
                        <clientExclude>**/**Impl.class</clientExclude>
                        <clientExclude>**/Local**.class</clientExclude>
                    </clientExcludes>
                    <excludes>
                        <exclude>**/org/jboss/test/clusterbench/ejb/stateful/*Forwarding*.class</exclude>
                        <exclude>**/org/jboss/test/clusterbench/ejb/stateless/*Forwarding*.class</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <!-- just contains the interfaces for acting as an EJB client -->
            <id>2clusters</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-ejb-plugin</artifactId>
                        <configuration>
                            <ejbVersion>3.2</ejbVersion>
                            <generateClient>true</generateClient>
                            <clientExcludes>
                                <clientExclude>**/**Impl.class</clientExclude>
                                <clientExclude>**/Local**.class</clientExclude>
                            </clientExcludes>
                            <excludes>
                                <!-- otherwise the local implementation is picked up first -->
                                <exclude>**/org/jboss/test/clusterbench/ejb/stateful/RemoteStatefulSBImpl.class</exclude>
                                <exclude>**/org/jboss/test/clusterbench/ejb/stateless/RemoteStatelessSBImpl.class</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
