<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2018 Radoslav Husár
  ~
  ~ 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>clusterbench</artifactId>
        <groupId>org.jboss.test</groupId>
        <version>4.0.0.Final</version>
    </parent>

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

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

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>clusterbench-common</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>jakarta.platform</groupId>
            <artifactId>jakarta.jakartaee-api</artifactId>
            <version>10.0.0</version>
            <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>
                <version>3.2.1</version>
                <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>
                        <version>3.2.1</version>
                        <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>
