keycloak-scim/testsuite/integration-arquillian/servers/cache-server/infinispan/pom.xml

305 lines
16 KiB
XML
Raw Normal View History

2017-05-29 07:02:57 +00:00
<?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">
<modelVersion>4.0.0</modelVersion>
2017-05-29 07:02:57 +00:00
<parent>
<groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-servers-cache-server</artifactId>
<version>18.0.0-SNAPSHOT</version>
2017-05-29 07:02:57 +00:00
</parent>
<packaging>pom</packaging>
<artifactId>integration-arquillian-servers-cache-server-infinispan</artifactId>
<name>Keycloak Arquillian Integration TestSuite - Cache Server - Infinispan</name>
2017-05-29 07:02:57 +00:00
<properties>
<common.resources>${project.parent.basedir}/common</common.resources>
<assembly.xml>${project.parent.basedir}/assembly.xml</assembly.xml>
<cache.server.infinispan.home>${containers.home}/${cache.server.infinispan.unpacked.folder.name}</cache.server.infinispan.home>
<cache.server.infinispan.jdg-transactions-enabled>true</cache.server.infinispan.jdg-transactions-enabled>
<cache.server.infinispan.config.dir>${cache.server.infinispan.home}/server/conf</cache.server.infinispan.config.dir>
<cache.server.cache-auth-xsl>cache-authentication-disabled.xsl</cache.server.cache-auth-xsl>
2017-05-29 07:02:57 +00:00
</properties>
<profiles>
<profile>
<id>cache-auth</id>
<properties>
<cache.server.cache-auth-xsl>cache-authentication-enabled.xsl</cache.server.cache-auth-xsl>
</properties>
</profile>
2017-05-29 07:02:57 +00:00
<profile>
<id>cache-server-infinispan-submodules</id>
2017-05-29 07:02:57 +00:00
<activation>
<file>
<exists>src</exists>
</file>
</activation>
<build>
<plugins>
2017-05-29 07:02:57 +00:00
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>cache.server.infinispan.groupId</property>
<property>cache.server.infinispan.artifactId</property>
<property>cache.server.infinispan.version</property>
<property>cache.server.infinispan.unpacked.folder.name</property>
2017-05-29 07:02:57 +00:00
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
2017-05-29 07:02:57 +00:00
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-keycloak-caches</id>
2017-05-29 07:02:57 +00:00
<phase>process-test-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<!-- Configure dc-0 site in file clustered-1.xml -->
2017-05-29 07:02:57 +00:00
<transformationSet>
<dir>${cache.server.infinispan.config.dir}</dir>
2017-05-29 07:02:57 +00:00
<includes>
<include>infinispan-xsite.xml</include>
2017-05-29 07:02:57 +00:00
</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.infinispan.jdg-transactions-enabled}</value>
</parameter>
</parameters>
<outputDir>${cache.server.infinispan.config.dir}</outputDir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
<pattern>^(.*)\.xml$</pattern>
<replacement>$1-1.xml</replacement>
</fileMapper>
</fileMappers>
2017-05-29 07:02:57 +00:00
</transformationSet>
<!-- Configure dc-1 site in file clustered-2.xml -->
<transformationSet>
<dir>${cache.server.infinispan.config.dir}</dir>
<includes>
<include>infinispan-xsite.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.infinispan.jdg-transactions-enabled}</value>
</parameter>
</parameters>
<outputDir>${cache.server.infinispan.config.dir}</outputDir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
<pattern>^(.*)\.xml$</pattern>
<replacement>$1-2.xml</replacement>
</fileMapper>
</fileMappers>
</transformationSet>
2017-05-29 07:02:57 +00:00
</transformationSets>
</configuration>
</execution>
<execution>
<id>configure-keycloak-authorization</id>
<phase>process-test-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<!-- Configure authorization in files clustered-__dc__.xml -->
<transformationSet>
<dir>${cache.server.infinispan.config.dir}</dir>
2017-05-29 07:02:57 +00:00
<includes>
<include>infinispan-xsite-1.xml</include>
<include>infinispan-xsite-2.xml</include>
2017-05-29 07:02:57 +00:00
</includes>
<stylesheet>${common.resources}/${cache.server.cache-auth-xsl}</stylesheet>
2017-05-29 07:02:57 +00:00
<parameters>
<parameter>
<name>hotrod.sasl.mechanism</name>
<value>${hotrod.sasl.mechanism}</value>
2017-05-29 07:02:57 +00:00
</parameter>
</parameters>
<outputDir>${cache.server.infinispan.config.dir}</outputDir>
2017-05-29 07:02:57 +00:00
</transformationSet>
</transformationSets>
</configuration>
</execution>
2017-05-29 07:02:57 +00:00
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-server-keystore</id>
<phase>process-test-resources</phase>
2017-05-29 07:02:57 +00:00
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${cache.server.infinispan.config.dir}</outputDirectory>
2017-05-29 07:02:57 +00:00
<resources>
<resource>
<directory>${common.resources}</directory>
<includes>
<include>server.jks</include>
2017-05-29 07:02:57 +00:00
</includes>
</resource>
</resources>
<overwrite>true</overwrite>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>remove-empty-xmlns</id>
<phase>process-test-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<replace file="${cache.server.infinispan.config.dir}/infinispan-xsite-1.xml" token="xmlns=&quot;&quot;" value=""/>
<replace file="${cache.server.infinispan.config.dir}/infinispan-xsite-2.xml" token="xmlns=&quot;&quot;" value=""/>
</target>
</configuration>
</execution>
2017-05-29 07:02:57 +00:00
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>create-infinispan-user</id>
<phase>process-test-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${cache.server.infinispan.home}/bin/cli.sh</executable>
<workingDirectory>${cache.server.infinispan.home}/bin</workingDirectory>
<arguments>
<argument>user</argument>
<argument>create</argument>
<argument>myuser</argument>
<argument>-p</argument>
<argument>"qwer1234!"</argument>
<argument>-g</argument>
<argument>admin</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
2017-05-29 07:02:57 +00:00
<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-datagrid</id>
<modules>
<module>datagrid</module>
</modules>
</profile>
2017-05-29 07:02:57 +00:00
</profiles>
</project>