<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
         xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
   <parent>
      <groupId>org.infinispan</groupId>
      <artifactId>infinispan-server-parent</artifactId>
      <version>10.0.0.Beta4</version>
      <relativePath>../pom.xml</relativePath>
   </parent>

   <artifactId>infinispan-server-runtime</artifactId>
   <packaging>jar</packaging>
   <name>Infinispan Server</name>
   <description>Infinispan Server</description>

   <properties>
      <module.skipMavenRemoteResource>true</module.skipMavenRemoteResource>
      <defaultTestGroup />
      <defaultExcludedTestGroup />
   </properties>

   <dependencies>
      <!-- Compile dependencies. All of these will be shipped in the server -->
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-hotrod</artifactId>
         <type>jar</type>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-rest</artifactId>
         <type>jar</type>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-memcached</artifactId>
         <type>jar</type>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-router</artifactId>
         <type>jar</type>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.threads</groupId>
         <artifactId>jboss-threads</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.narayana.jta</groupId>
         <artifactId>narayana-jta</artifactId>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.logmanager</groupId>
         <artifactId>jboss-logmanager</artifactId>
      </dependency>
      <dependency>
         <groupId>org.jboss.slf4j</groupId>
         <artifactId>slf4j-jboss-logmanager</artifactId>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>org.kohsuke.metainf-services</groupId>
         <artifactId>metainf-services</artifactId>
      </dependency>
      <!-- Test dependencies -->
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-client-hotrod</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>net.spy</groupId>
         <artifactId>spymemcached</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-rest</artifactId>
         <type>test-jar</type>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.testcontainers</groupId>
         <artifactId>testcontainers</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.asynchttpclient</groupId>
         <artifactId>async-http-client</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-all</artifactId>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
               <execution>
                  <id>enforce-banned-dependencies</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <rules>
                        <bannedDependencies>
                           <excludes>
                              <exclude>org.apache.logging.log4j:log4j-slf4j-impl</exclude>
                           </excludes>
                        </bannedDependencies>
                     </rules>
                     <fail>true</fail>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <groups combine.self="override"></groups>
               <excludedGroups combine.self="override"></excludedGroups>
               <testNGArtifactName>none:none</testNGArtifactName>
               <parallel>classes</parallel>
               <properties>
                  <usedefaultlisteners>false</usedefaultlisteners>
                  <listener>${junitListener}</listener>
               </properties>
            </configuration>
         </plugin>
         <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
               <archive>
                  <manifest>
                     <addClasspath>true</addClasspath>
                     <mainClass>org.infinispan.server.Bootstrap</mainClass>
                  </manifest>
               </archive>
            </configuration>
         </plugin>
         <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
               <execution>
                  <id>clean-server</id>
                  <phase>clean</phase>
                  <goals>
                     <goal>run</goal>
                  </goals>
                  <configuration>
                     <target>
                        <property name="output.dir"
                                  value="${project.build.directory}/${infinispan.brand.prefix}-server-${infinispan.brand.version}"/>
                        <ant antfile="build.xml" inheritRefs="true">
                           <target name="clean"/>
                        </ant>
                     </target>
                  </configuration>
               </execution>
               <execution>
                  <id>build-server</id>
                  <phase>package</phase>
                  <goals>
                     <goal>run</goal>
                  </goals>
                  <configuration>
                     <target>
                        <property name="compile_classpath" refid="maven.compile.classpath"/>
                        <property name="output.dir"
                                  value="${project.build.directory}/${infinispan.brand.prefix}-server-${infinispan.brand.version}"/>
                        <property name="server.dir"
                                  value="${project.basedir}/src/main/server"/>
                        <dependencyfilesets scopes="compile"/>
                        <ant antfile="build.xml" inheritRefs="true">
                           <target name="build"/>
                        </ant>
                     </target>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>
</project>

