287 lines
16 KiB
XML
287 lines
16 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
~ and other contributors as indicated by the @author tags.
|
|
~
|
|
~ 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 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">
|
|
<parent>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>integration-arquillian-servers-cache-server</artifactId>
|
|
<version>14.0.0-SNAPSHOT</version>
|
|
</parent>
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<artifactId>integration-arquillian-servers-cache-server-jboss</artifactId>
|
|
<packaging>pom</packaging>
|
|
<name>Cache Server - JBoss Family</name>
|
|
|
|
<properties>
|
|
<common.resources>${project.parent.basedir}/common</common.resources>
|
|
<assembly.xml>${project.parent.basedir}/assembly.xml</assembly.xml>
|
|
<cache.server.jboss.home>${containers.home}/${cache.server.jboss.unpacked.folder.name}</cache.server.jboss.home>
|
|
<cache.server.jboss.cache-authorization-disabled>true</cache.server.jboss.cache-authorization-disabled>
|
|
<cache.server.jboss.jdg-transactions-enabled>true</cache.server.jboss.jdg-transactions-enabled>
|
|
</properties>
|
|
|
|
<profiles>
|
|
|
|
<profile>
|
|
<id>cache-server-jboss-submodules</id>
|
|
<activation>
|
|
<file>
|
|
<exists>src</exists>
|
|
</file>
|
|
</activation>
|
|
<build>
|
|
<plugins>
|
|
|
|
<plugin>
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>enforce</goal>
|
|
</goals>
|
|
<configuration>
|
|
<rules>
|
|
<requireProperty>
|
|
<property>cache.server</property>
|
|
<property>cache.server.jboss.cache-authorization-enabled</property>
|
|
<property>cache.server.jboss.groupId</property>
|
|
<property>cache.server.jboss.artifactId</property>
|
|
<property>cache.server.jboss.version</property>
|
|
<property>cache.server.jboss.unpacked.folder.name</property>
|
|
</requireProperty>
|
|
</rules>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>xml-maven-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>configure-keycloak-caches</id>
|
|
<phase>process-test-resources</phase>
|
|
<goals>
|
|
<goal>transform</goal>
|
|
</goals>
|
|
<configuration>
|
|
<transformationSets>
|
|
|
|
<!-- Configure dc-0 site in file clustered-1.xml -->
|
|
<transformationSet>
|
|
<dir>${cache.server.jboss.home}/standalone/configuration</dir>
|
|
<includes>
|
|
<include>clustered.xml</include>
|
|
</includes>
|
|
<stylesheet>${common.resources}/add-keycloak-caches.xsl</stylesheet>
|
|
<parameters>
|
|
<parameter>
|
|
<name>local.site</name>
|
|
<value>dc-0</value>
|
|
</parameter>
|
|
<parameter>
|
|
<name>remote.site</name>
|
|
<value>dc-1</value>
|
|
</parameter>
|
|
<parameter>
|
|
<name>transactions.enabled</name>
|
|
<value>${cache.server.jboss.jdg-transactions-enabled}</value>
|
|
</parameter>
|
|
</parameters>
|
|
<outputDir>${cache.server.jboss.home}/standalone/configuration</outputDir>
|
|
<fileMappers>
|
|
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
|
|
<pattern>^(.*)\.xml$</pattern>
|
|
<replacement>$1-1.xml</replacement>
|
|
</fileMapper>
|
|
</fileMappers>
|
|
</transformationSet>
|
|
|
|
<!-- Configure dc-1 site in file clustered-2.xml -->
|
|
<transformationSet>
|
|
<dir>${cache.server.jboss.home}/standalone/configuration</dir>
|
|
<includes>
|
|
<include>clustered.xml</include>
|
|
</includes>
|
|
<stylesheet>${common.resources}/add-keycloak-caches.xsl</stylesheet>
|
|
<parameters>
|
|
<parameter>
|
|
<name>local.site</name>
|
|
<value>dc-1</value>
|
|
</parameter>
|
|
<parameter>
|
|
<name>remote.site</name>
|
|
<value>dc-0</value>
|
|
</parameter>
|
|
<parameter>
|
|
<name>transactions.enabled</name>
|
|
<value>${cache.server.jboss.jdg-transactions-enabled}</value>
|
|
</parameter>
|
|
</parameters>
|
|
<outputDir>${cache.server.jboss.home}/standalone/configuration</outputDir>
|
|
<fileMappers>
|
|
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
|
|
<pattern>^(.*)\.xml$</pattern>
|
|
<replacement>$1-2.xml</replacement>
|
|
</fileMapper>
|
|
</fileMappers>
|
|
</transformationSet>
|
|
|
|
</transformationSets>
|
|
</configuration>
|
|
</execution>
|
|
|
|
<execution>
|
|
<id>configure-keycloak-authorization</id>
|
|
<phase>process-test-resources</phase>
|
|
<goals>
|
|
<goal>transform</goal>
|
|
</goals>
|
|
<configuration>
|
|
<skip>${cache.server.jboss.cache-authorization-disabled}</skip>
|
|
<transformationSets>
|
|
<!-- Configure authorization in files clustered-__dc__.xml -->
|
|
<transformationSet>
|
|
<dir>${cache.server.jboss.home}/standalone/configuration</dir>
|
|
<includes>
|
|
<include>clustered-1.xml</include>
|
|
<include>clustered-2.xml</include>
|
|
</includes>
|
|
<stylesheet>${common.resources}/cache-authorization.xsl</stylesheet>
|
|
<outputDir>${cache.server.jboss.home}/standalone/configuration</outputDir>
|
|
</transformationSet>
|
|
</transformationSets>
|
|
</configuration>
|
|
</execution>
|
|
|
|
<execution>
|
|
<id>io-worker-threads</id>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>transform</goal>
|
|
</goals>
|
|
<configuration>
|
|
<transformationSets>
|
|
<transformationSet>
|
|
<dir>${cache.server.jboss.home}/standalone/configuration</dir>
|
|
<includes>
|
|
<include>standalone.xml</include>
|
|
<include>standalone-ha.xml</include>
|
|
</includes>
|
|
<stylesheet>${common.resources}/io.xsl</stylesheet>
|
|
<outputDir>${cache.server.jboss.home}/standalone/configuration</outputDir>
|
|
<parameters>
|
|
<parameter>
|
|
<name>worker.io-threads</name>
|
|
<value>${cache.server.worker.io-threads}</value>
|
|
</parameter>
|
|
<parameter>
|
|
<name>worker.task-max-threads</name>
|
|
<value>${cache.server.worker.task-max-threads}</value>
|
|
</parameter>
|
|
</parameters>
|
|
</transformationSet>
|
|
</transformationSets>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>enable-jboss-mgmt-admin</id>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${cache.server.jboss.home}/standalone/configuration</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${common.resources}</directory>
|
|
<includes>
|
|
<include>mgmt-users.properties</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
<overwrite>true</overwrite>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>copy-cache-server-configuration-for-dc-2</id>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${cache.server.jboss.home}/standalone-dc-2/deployments</outputDirectory>
|
|
<includeEmptyDirs>true</includeEmptyDirs>
|
|
<resources>
|
|
<resource>
|
|
<directory>${cache.server.jboss.home}/standalone/deployments</directory>
|
|
</resource>
|
|
</resources>
|
|
<overwrite>true</overwrite>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>create-zip</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>single</goal>
|
|
</goals>
|
|
<configuration>
|
|
<descriptors>
|
|
<descriptor>${assembly.xml}</descriptor>
|
|
</descriptors>
|
|
<appendAssemblyId>false</appendAssemblyId>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
|
|
<profile>
|
|
<id>cache-server-infinispan</id>
|
|
<modules>
|
|
<module>infinispan</module>
|
|
</modules>
|
|
</profile>
|
|
<profile>
|
|
<id>cache-server-jdg</id>
|
|
<modules>
|
|
<module>jdg</module>
|
|
</modules>
|
|
</profile>
|
|
</profiles>
|
|
|
|
</project>
|