2015-10-27 10:40:41 +00:00
<?xml version="1.0"?>
2016-02-03 10:20:22 +00:00
<!--
2016-09-02 11:55:49 +00:00
~ 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.
-->
2016-02-03 10:20:22 +00:00
2015-10-27 10:40:41 +00:00
<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</artifactId>
2021-07-30 12:55:12 +00:00
<version > 16.0.0-SNAPSHOT</version>
2015-10-27 10:40:41 +00:00
</parent>
<modelVersion > 4.0.0</modelVersion>
2016-09-02 11:55:49 +00:00
<artifactId > integration-arquillian-migration-server</artifactId>
2015-10-27 10:40:41 +00:00
<packaging > pom</packaging>
2016-09-02 11:55:49 +00:00
<name > Migration Server</name>
<properties >
2019-03-08 12:27:29 +00:00
<common.resources > ${basedir}/../auth-server/jboss/common</common.resources>
<ant.scenario > scenario-standalone</ant.scenario>
<auth.server.home > ${project.build.directory}/unpacked/keycloak-${migrated.auth.server.version}</auth.server.home>
<jdbc.driver.tmp.dir > ${project.build.directory}/jdbc-driver</jdbc.driver.tmp.dir>
2016-09-02 11:55:49 +00:00
</properties>
2015-10-27 10:40:41 +00:00
<build >
<plugins >
2016-09-02 11:55:49 +00:00
<plugin >
<groupId > org.apache.maven.plugins</groupId>
<artifactId > maven-enforcer-plugin</artifactId>
<executions >
<execution >
<id > enforce-properties</id>
<goals >
<goal > enforce</goal>
</goals>
<configuration >
<rules >
<requireProperty >
<property > migrated.auth.server.version</property>
2020-03-03 15:51:20 +00:00
<message > Property "migrated.auth.server.version" is required for this build. It should be one of supported versions. See base/src/test/resources/migration-test/</message>
</requireProperty>
<requireProperty >
2019-03-08 12:27:29 +00:00
<property > keycloak.connectionsJpa.user</property>
2020-03-03 15:51:20 +00:00
</requireProperty>
<requireProperty >
<property > keycloak.connectionsJpa.password</property>
<regex > ^(?!\s*$).+</regex>
<regexMessage > "keycloak.connectionsJpa.password" property cannot be empty string!</regexMessage>
</requireProperty>
<requireProperty >
2019-03-08 12:27:29 +00:00
<property > keycloak.connectionsJpa.url</property>
2020-03-03 15:51:20 +00:00
<regex > ((?!h2).)*</regex>
<regexMessage > "keycloak.connectionsJpa.url" property is not set correctly: "${keycloak.connectionsJpa.url}". Migration is not supported for default h2 values!</regexMessage>
2016-09-02 11:55:49 +00:00
</requireProperty>
<requireProperty >
<property > jdbc.mvn.groupId</property>
2019-03-08 12:27:29 +00:00
<regex > ((?!com.h2database).)*</regex>
2020-03-03 15:51:20 +00:00
<regexMessage > "jdbc.mvn.groupId" property is not set correctly: "${jdbc.mvn.groupId}". Migration is not supported for default h2 values!</regexMessage>
2016-09-02 11:55:49 +00:00
</requireProperty>
<requireProperty >
<property > jdbc.mvn.artifactId</property>
2019-03-08 12:27:29 +00:00
<regex > ((?!h2).)*</regex>
2020-03-03 15:51:20 +00:00
<regexMessage > "jdbc.mvn.artifactId" property is not set correctly: "${jdbc.mvn.artifactId}". Migration is not supported for default h2 values!</regexMessage>
2016-09-02 11:55:49 +00:00
</requireProperty>
<requireProperty >
2020-03-03 15:51:20 +00:00
<property > jdbc.mvn.version</property>
<regex > ((?!${h2.version}).)*</regex>
<regexMessage > "jdbc.mvn.version" property is not set correctly: "${jdbc.mvn.version}". Migration is not supported for default h2 values!</regexMessage>
2016-10-12 10:26:00 +00:00
</requireProperty>
2020-03-03 15:51:20 +00:00
2016-09-02 11:55:49 +00:00
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin >
<groupId > org.apache.maven.plugins</groupId>
<artifactId > maven-dependency-plugin</artifactId>
<executions >
<execution >
<id > unpack-server</id>
<phase > generate-resources</phase>
<goals >
<goal > unpack</goal>
</goals>
<configuration >
<artifactItems >
<artifactItem >
<groupId > org.keycloak</groupId>
<artifactId > keycloak-server-dist</artifactId>
<version > ${migrated.auth.server.version}</version>
<type > zip</type>
<outputDirectory > ${project.build.directory}/unpacked</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution >
<id > jdbc-driver</id>
<phase > process-resources</phase>
<goals >
<goal > copy</goal>
</goals>
<configuration >
<artifactItems >
<artifactItem >
<groupId > ${jdbc.mvn.groupId}</groupId>
<artifactId > ${jdbc.mvn.artifactId}</artifactId>
2020-03-03 15:51:20 +00:00
<version > ${jdbc.mvn.version}</version>
2016-09-02 11:55:49 +00:00
<type > jar</type>
</artifactItem>
</artifactItems>
2019-03-08 12:27:29 +00:00
<outputDirectory > ${jdbc.driver.tmp.dir}</outputDirectory>
2016-09-02 11:55:49 +00:00
<overWriteIfNewer > true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
2021-01-04 23:31:35 +00:00
<plugin >
<artifactId > maven-resources-plugin</artifactId>
<executions >
<execution >
<id > copy-keystore</id>
<phase > process-resources</phase>
<goals >
<goal > copy-resources</goal>
</goals>
<configuration >
<outputDirectory > ${auth.server.home}/standalone/configuration</outputDirectory>
<resources >
<resource >
<directory > ${common.resources}/keystore</directory>
<includes >
<include > keycloak.jks</include>
<include > keycloak.truststore</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
2016-09-02 11:55:49 +00:00
<plugin >
2019-03-08 12:27:29 +00:00
<groupId > org.apache.maven.plugins</groupId>
<artifactId > maven-antrun-plugin</artifactId>
2016-09-02 11:55:49 +00:00
<executions >
<execution >
2019-03-08 12:27:29 +00:00
<id > configure-server-jpa</id>
<phase > generate-resources</phase>
<goals >
<goal > run</goal>
</goals>
<configuration >
<target >
<ant antfile= "${common.resources}/ant/configure.xml" target= "configure-server-jpa-legacy" >
<!-- These properties become equivalent to properties defined on the command line. -->
<!-- Without specifying those the default values would be used regardless what is -->
<!-- defined via - Dproperty=value when executing maven command -->
<property name= "jdbc.driver.tmp.dir" > ${jdbc.driver.tmp.dir}</property>
<property name= "jdbc.mvn.artifactId" > ${jdbc.mvn.artifactId}</property>
2020-03-03 15:51:20 +00:00
<property name= "jdbc.mvn.version" > ${jdbc.mvn.version}</property>
2019-03-08 12:27:29 +00:00
<property name= "keycloak.connectionsJpa.url" > ${keycloak.connectionsJpa.url}</property>
<property name= "keycloak.connectionsJpa.user" > ${keycloak.connectionsJpa.user}</property>
<property name= "keycloak.connectionsJpa.password" > ${keycloak.connectionsJpa.password}</property>
<property name= "keycloak.connectionsJpa.schema" > ${keycloak.connectionsJpa.schema}</property>
</ant>
</target>
</configuration>
</execution>
2021-01-04 23:31:35 +00:00
<execution >
<id > inject-truststore</id>
<phase > generate-resources</phase>
<goals >
<goal > run</goal>
</goals>
<configuration >
<target >
<ant antfile= "${common.resources}/ant/configure.xml" target= "inject-truststore" />
</target>
</configuration>
</execution>
2019-03-08 12:27:29 +00:00
<execution >
<id > ant-apply-prepared-clis</id>
2016-09-02 11:55:49 +00:00
<phase > process-resources</phase>
<goals >
2019-03-08 12:27:29 +00:00
<goal > run</goal>
</goals>
<configuration >
<target >
<ant antfile= "${common.resources}/ant/configure.xml" target= "apply-cli-scripts" />
</target>
</configuration>
</execution>
<execution >
<!-- to workaround the fact that in older wildlfy/eap versions was missing the option -->
<!-- 'module - root - dir' when adding module we need to move it manually afterwards -->
<id > move-driver-module</id>
<phase > process-test-resources</phase>
<goals >
<goal > run</goal>
2016-09-02 11:55:49 +00:00
</goals>
<configuration >
2019-03-08 12:27:29 +00:00
<target >
<move file= "${auth.server.home}/modules/test" todir= "${auth.server.home}/modules/system/layers/base/" verbose= "true" />
</target>
2016-09-02 11:55:49 +00:00
</configuration>
</execution>
</executions>
</plugin>
<plugin >
<groupId > org.apache.maven.plugins</groupId>
<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>
2015-10-27 10:40:41 +00:00
</plugins>
</build>
2016-10-24 10:07:48 +00:00
<profiles >
2017-11-28 14:12:33 +00:00
<profile >
<id > community</id>
<activation >
<property >
<name > !product</name>
</property>
</activation>
<build >
<plugins >
<plugin >
<groupId > org.apache.maven.plugins</groupId>
<artifactId > maven-deploy-plugin</artifactId>
<configuration >
<skip > true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
2016-10-24 10:07:48 +00:00
<profile >
<id > productized-server</id>
<activation >
<property >
<name > previous.product.unpacked.folder.name</name>
</property>
</activation>
<properties >
2019-03-08 12:27:29 +00:00
<auth.server.home > ${project.build.directory}/unpacked/${previous.product.unpacked.folder.name}</auth.server.home>
2016-10-24 10:07:48 +00:00
</properties>
</profile>
</profiles>
2015-10-27 10:40:41 +00:00
</project>